diff --git a/.gitignore b/.gitignore new file mode 100755 index 000000000..7e4260bbf --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bin-debug +bin-release +/.git.7z diff --git a/JC.js b/JC.js old mode 100644 new mode 100755 index 6da6d1e53..6de670f34 --- a/JC.js +++ b/JC.js @@ -1,23 +1,48 @@ //TODO: use 方法 nginx 模式添加 url 最大长度判断 //TODO: use add custom type +//TODO: 支持解析带 JC. 命名空间 +/** + *

业务逻辑命名空间

+ *
这个命名空间的组件主要为满足业务需求, 不是通用组件~ + *
但在某个项目中应该是常用组件~ + *
+ *
业务组件的存放位置:
+ *
libpath/bizs/
+ * + *
使用业务组件
+ *
JC.use( 'Bizs.BizComps' ); // libpath/bizs/BizComps/BizComps.js
+ * + *
使用业务文件
+ *
JC.use( 'bizs.BizFile' ); // libpath/bizs/BizFile.js
+ *
+ * @namespace + * @class Bizs + * @static + */ +window.Bizs = window.Bizs || {}; ;(function( $ ){ - if( window.JC && typeof JC.PATH != 'undefined' ) return; + if( window.JC && typeof JC.compsDir != 'undefined' ) return; + window.JC && JC.f && JC.f.backward( 1 ); //这里启用 JC.common 的向后兼容, 为 window 注入全局静态函数变量 /** * JC jquery 组件库 资源调用控制类 *
这是一个单例模式, 全局访问使用 JC 或 window.JC - *

requires: jQuery

+ *

require: + * jQuery + * , JC.common + *

*

JC Project Site - * | API docs + * | API docs * | demo link

+ * @namespace * @class JC - * @namespace window * @static * @example * JC.use( 组件名[,组件名] ); * @author qiushaowei | 75 team * @date 2013-08-04 */ - window.JC = { + window.JC = window.JC || {}; + var CLASS = { /** * JC组件库所在路径 * @property PATH @@ -39,12 +64,11 @@ * 导入JC组件 * @method use * @static - * @param {string} _names - 模块名 + * @param {string} _items - 模块名 * 或者模块下面的某个js文件(test/test1.js, 路径前面不带"/"将视为test模块下的test1.js) * 或者一个绝对路径的js文件, 路径前面带 "/" + * @param {callback} _readyCb * - * @param {string} _basePath - 指定要导入资源所在的主目录, 这个主要应用于 nginx 路径输出 - * @param {bool} _enableNginxStyle - 指定是否需要使用 nginx 路径输出脚本资源 * * @example JC.use( 'SomeClass' ); //导入类 SomeClass @@ -75,8 +99,9 @@ ].join() ); */ - , use: function( _items ){ + , use: function( _items, _readyCb ){ if( ! _items ) return; + _readyCb && $( document ).ready( function( _evt ){ _readyCb( _evt ); } ); var _p = this , _paths = [] , _parts = $.trim( _items ).split(/[\s]*?,[\s]*/) @@ -92,6 +117,12 @@ _parts = JC._usePatch( _parts, 'Form', 'AutoSelect' ); _parts = JC._usePatch( _parts, 'Form', 'AutoChecked' ); + _parts = JC._usePatch( _parts, 'Form', 'FormFillUrl' ); + + /* + _parts = JC._usePatch( _parts, 'AjaxUpload', 'plugins.SWFUpload' ); + */ + _parts = JC._usePatch( _parts, 'AjaxUpload', 'Panel' ); $.each( _parts, function( _ix, _part ){ var _isComps = !_compRe.test( _part ) @@ -119,7 +150,7 @@ }else if( _compFileRe.test( _path ) ){//组件文件 _path = printf( '{0}{1}{2}.js', JC.PATH, JC.compsDir, _part.replace( _compFileRe, '' ) ); }else{//组件 - _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.compsDir, _part ); + _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.compsDir, _part.replace( /^JC\./, '' ) ); } } !_isComps && !_isFullpath && ( _path = printf( '{0}/{1}', JC.PATH, _part ) ); @@ -137,7 +168,7 @@ _paths.push( _path ); }); - JC.log( _paths ); + //JC.log( _paths ); !JC.enableNginxStyle && JC._writeNormalScript( _paths ); JC.enableNginxStyle && JC._writeNginxScript( _paths ); @@ -156,7 +187,7 @@ function( _items, _fromClass, _patchClass ){ var i, j, k, l, _find; for( i = 0, j = _items.length; i < j; i++ ){ - if( ( $.trim( _items[i].toString() ) == _fromClass ) ){ + if( ( $.trim( _items[i].toString() ).replace( /^JC\./, '' ) == _fromClass ) ){ _find = true; break; } @@ -170,7 +201,8 @@ * @method log * @static */ - , log: function(){ JC.debug && window.console && console.log( sliceArgs( arguments ).join(' ') ); } + //, log: function(){ JC.debug && window.console && console.log( sliceArgs( arguments ).join(' ') ); } + //已在 JC.common 声明 /** * 定义输出路径的 v 参数, 以便控制缓存 * @property pathPostfix @@ -187,6 +219,14 @@ * @static */ , enableNginxStyle: false + /** + * 定义 nginx 合并文件时, URL 的最大长度 + * @property nginxUrlLen + * @type int + * @default 200 + * @static + */ + , nginxUrlLen: 280 /** * 定义 nginx style 的基础路径 *
注意: 如果这个属性为空, 即使 enableNginxStyle = true, 也是直接输出默认路径 @@ -234,18 +274,11 @@ http://jc.openjavascript.org/plugins/jquery.form.js */ , FILE_MAP: null - /** - * 输出 nginx concat 模块的脚本路径格式 - * @method _writeNginxScript - * @param {array} _paths - * @private - * @static - */ , _writeNginxScript: function( _paths ){ if( !JC.enableNginxStyle ) return; for( var i = 0, j = _paths.length, _ngpath = [], _npath = []; i < j; i++ ){ - JC.log( _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase(), JC.nginxBasePath.toLowerCase() ); + //JC.log( _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase(), JC.nginxBasePath.toLowerCase() ); if( _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase() == JC.nginxBasePath.toLowerCase() ) @@ -256,12 +289,48 @@ } } - var _postfix = JC.pathPostfix ? '?v=' + JC.pathPostfix : ''; + var _postfix = JC.pathPostfix ? '?v=' + JC.pathPostfix : ''; + /* _ngpath.length && document.write( printf( ' + + + +
+
JC.use 使用示例 - 自动截断长URL
+
+
+ + + diff --git a/_demo/version_control.html b/_demo/version_control.html old mode 100644 new mode 100755 diff --git a/bizs/ActionLogic/ActionLogic.js b/bizs/ActionLogic/ActionLogic.js old mode 100644 new mode 100755 index 24742317f..5217481f4 --- a/bizs/ActionLogic/ActionLogic.js +++ b/bizs/ActionLogic/ActionLogic.js @@ -1,3 +1,4 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Panel' ], function(){ /** *

node 点击操作逻辑

* 应用场景 @@ -5,13 +6,14 @@ *
点击后弹框( AJAX ) *
点击后弹框( Dom 模板 ) *
点击后执行 AJAX 操作 + *

require: + * JC.BaseMVC + * , JC.Panel + *

*

JC Project Site * | API docs * | demo link

* - * require: jQuery - *
require: JC.Panel - * * a|button 需要 添加 class="js_bizsActionLogic" * *

可用的 HTML 属性

@@ -23,8 +25,13 @@ *
panel: 弹框
*
link: 链接跳转
*
ajaxaction: ajax操作, 删除, 启用, 禁用
+ *
ec: 展开或收起(expand and contract)
+ *
hit_value: 点击赋值
* * + * + *
balUnHtmlEntity = bool, default = false
+ *
是否将 Panel 转义的 html 反转回来
* *

balType = panel 可用的 HTML 属性

*
@@ -40,10 +47,10 @@ *
balCallback = function
*
* 显示模板后的回调 -function balPanelInitCb( _panelIns ){ +<pre>function balPanelInitCb( _panelIns ){ var _trigger = $(this); //return true; //如果返回真的话, 表单提交后会关闭弹框 -} +} *
*
*

balType = link 可用的 HTML 属性

@@ -74,21 +81,58 @@ *
balSuccessPopupType = string, default = msgbox
*
错误提示的弹框类型: alert, msgbox, dialog.alert, dialog.msgbox
* - *
balCallback = function
+ *
balCallback = function, window 变量域
*
* 操作完成后的回调 -function ajaxDelCallback( _d, _ins ){ +<pre>function ajaxDelCallback( _d, _ins ){ var _trigger = $(this); if( _d && !_d.errorno ){ JC.msgbox( _d.errmsg || '操作成功', _trigger, 0, function(){ - reloadPage( '?usercallback=ajaxaction' ); + JC.f.reloadPage( '?usercallback=ajaxaction' ); }); }else{ JC.Dialog.alert( _d && _d.errmsg ? _d.errmsg : '操作失败, 请重试!' , 1 ); } } - + *
+ * + *
balRequestData = json
+ *
ajax 请求发送的数据
+ * + *
balAjaxType = string, default = get
+ *
ajax 请求的类型
+ * + *
balDoneRemoveSelector = selector
+ *
ajax 操作完成后要删除的 node
+ + * + *

balType = ec( expand and contract) 可用的 HTML 属性

+ *
+ *
balTarget = selector
+ *
显示/隐藏的选择器
+ * + *
balExpandWord = string, default = "展开"
+ *
balExpandClass= string, default = "js_ecExpand"
+ * + *
balContractWord = string, default = "收起"
+ *
balContractClass = string, default = "js_ecContract"
+ *
+ *

balType = hit_value 可用的 HTML 属性

+ *
+ *
balTarget = selector
+ *
显示/隐藏的选择器
+ * + *
balValue = string, default = ""
+ *
赋给 balTarget 的值
+ *
+ *

balType = remove_element 可用的 HTML 属性

+ *
+ *
balDoneRemoveSelector = selector
+ *
点击操作完成后要删除的 node
+ * + *
balDoneBeforeRemoveCallback= function, window 变量域
+ *
删除前的回调
*
* * @namespace window.Bizs @@ -98,7 +142,6 @@ * @version dev 0.1 2013-09-17 * @author qiushaowei | 75 Team */ -;(function($){ window.Bizs.ActionLogic = ActionLogic; function ActionLogic( _selector ){ @@ -112,7 +155,7 @@ this._init(); } - !JC.Panel && JC.use( 'Panel' ); + !define.amd && JC.use && !JC.Panel && JC.use( 'Panel' ); /** * 获取或设置 ActionLogic 的实例 @@ -145,6 +188,23 @@ && ( _r = _selector.is( '[baltype]' ) ); return _r; }; + /** + * 禁用按钮一定时间, 默认为1秒 + * @method disableButton + * @static + * @param {selector} _selector 要禁用button的选择器 + * @param {int} _durationMs 禁用多少时间, 单位毫秒, 默认1秒 + */ + ActionLogic.disableButton = + function( _selector, _durationMs ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _durationMs = _durationMs || 1000; + _selector.attr('disabled', true); + JC.f.safeTimeout( function(){ + _selector.attr('disabled', false); + }, _selector, 'DISABLE_BUTTON', _durationMs ); + }; /** * 批量初始化 ActionLogic *
页面加载完毕时, 已使用 事件代理 初始化 @@ -157,6 +217,7 @@ _selector && $( _selector ).find( [ 'a.js_bizsActionLogic' + , 'span.js_bizsActionLogic' , 'input.js_bizsActionLogic' , 'button.js_bizsActionLogic' ].join() ).on( 'click', function( _evt ){ @@ -196,13 +257,16 @@ * 脚本模板 Panel */ _p.on('StaticPanel', function( _evt, _item ){ - _p.trigger( 'ShowPanel', [ scriptContent( _item ) ] ); + _p.trigger( 'ShowPanel', [ JC.f.scriptContent( _item ) ] ); }); /** * 显示 Panel */ _p.on(ActionLogic.Model.SHOW_PANEL, function( _evt, _html){ + + _html = _p._model.unHtmlEntity( _html ); var _pins = JC.Dialog( _html ); + _pins.on('confirm', function(){ if( _p._model.balCallback() && _p._model.balCallback().call( _p._model.selector(), _pins, _p ) @@ -216,7 +280,7 @@ _p.on('AjaxPanel', function( _evt, _type, _url ){ if( !( _type && _url ) ) return; _p._model.balRandom() - && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); + && ( _url = JC.f.addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); $.get( _url ).done( function( _d ){ switch( _type ){ @@ -246,42 +310,115 @@ _p.on( 'Go', function( _evt, _url ){ if( !_url ) return; _p._model.balRandom() - && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - reloadPage( _url ); + && ( _url = JC.f.addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); + JC.f.reloadPage( _url ); }); /** * ajax 执行操作 */ - _p.on( 'AjaxAction', function( _evt, _url ){ + _p.on( 'AjaxAction', function( _evt, _url, _rdata, _rmethod ){ if( !_url ) return; _p._model.balRandom() - && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - $.get( _url ).done( function( _d ){ - try{ _d = $.parseJSON( _d ); }catch(ex){} + && ( _url = JC.f.addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - if( _p._model.balCallback() ){ - _p._model.balCallback().call( _p.selector(), _d, _p ); - }else{ - if( _d && 'errorno' in _d ){ - if( _d.errorno ){ - _p.trigger( 'ShowError', [ _d.errmsg || '操作失败, 请重试!', 1 ] ); + _rmethod = _p._model.balAjaxType() || _rmethod; + _rdata = _rdata || _p._model.balRequestData(); + + if( _p._model.balRequestData() ){ + $[ _rmethod ]( _url, _rdata ).done( innerDone ); + }else{ + $[ _rmethod ]( _url ).done( innerDone ); + } + + function innerDone( _d ){ + _p.trigger( 'AjaxActionDone', [ _d, _url ] ); + } + }); + + _p.on( 'AjaxActionDone', function( _evt, _d, _url ){ + try{ _d = $.parseJSON( _d ); }catch(ex){} + + if( _p._model.balCallback() ){ + _p._model.balCallback().call( _p.selector(), _d, _p ); + }else{ + if( _d && typeof _d != 'string' && 'errorno' in _d ){ + if( _d.errorno ){ + _p.trigger( 'ShowError', [ _d.errmsg || '操作失败, 请重试!', 1 ] ); + }else{ + + if( _d.data + && _d.data.balAction + && _d.data.balAction.url + && _d.data.balAction.msg + && _d.data.balAction.type + && _d.data.balAction.type.toLowerCase() == 'ajaxaction' + ){ + _p.trigger( 'AjaxAction_Custom_Confirm', [ _d ] ); }else{ _p.trigger( 'ShowSuccess', [ _d.errmsg || '操作完成' , function(){ + _p._model.balDoneRemoveSelector() + && _p._model.balDoneRemoveSelector().remove(); + _p._model.balDoneUrl() - && reloadPage( _p._model.balDoneUrl() || location.href ) + && JC.f.reloadPage( _p._model.balDoneUrl() || location.href ) ; } ] ); } - }else{ - JC.Dialog.alert( _d, 1 ); } + }else{ + var _msg = JC.f.printf( + '服务端错误, 无法解析返回数据:

{0}

' + , _d.replace( //g, '>' ) + ); + JC.Dialog.alert( _msg, 1 ); } - }); + } + }); + + _p.on( 'AjaxAction_Custom_Confirm', function( _evt, _d ){ + if( !_d ) return; + _p.trigger( 'ShowConfirm', + [ + _d.data.balAction.msg + , 2 + , function(){ + _p.trigger( 'AjaxAction', [ + _d.data.balAction.url + , _d.data.balAction.ajaxData + , _d.data.balAction.ajaxMethod + ] ); + } + , function(){ + var _rurl = _p._model.balDoneUrl(); + _rurl = _d.data.balAction.returnurl || _rurl; + _rurl && ( location.href = _rurl ); + } + , function( _panel ){ + if( _d.data.balAction.btnText ){ + $.each( _d.data.balAction.btnText, function( _ix, _item ){ + _panel.find( JC.f.printf( 'button[eventtype={0}]', _ix ) ).html( _item ); + }); + } + } + ] + ); + }); + + _p.on( 'RemoveElementAction', function( _evt ){ + var _list = _p._model.balDoneRemoveSelector(); + if( _p.selector().is( '[balDoneRemoveSelector]' ) ){ + _p._model.balDoneBeforeRemoveCallback() + && _list && _list.length + && _p._model.balDoneBeforeRemoveCallback().call( _p.selector(), _list, _p ); + try{ _list.remove(); }catch( ex ){} + }else{ + _p.selector().remove(); + } }); /** * 处理错误提示 @@ -318,19 +455,23 @@ /** * 处理二次确认 */ - _p.on('ShowConfirm', function( _evt, _msg, _status, _cb ){ + _p.on('ShowConfirm', function( _evt, _msg, _status, _cb, _cancelCb, _eventCb ){ var _panel; switch( _p._model.balConfirmPopupType() ){ case 'dialog.confirm': { _panel = JC.Dialog.confirm( _msg, _status || 1 ); _cb && _panel.on('confirm', function(){ _cb() } ); + _cancelCb && _panel.on('cancel', function(){ _cancelCb() } ); + _eventCb && _eventCb( _panel ); break; } default: { _panel = JC.confirm( _msg, _p._model.selector(), _status || 1 ); _cb && _panel.on('confirm', function(){ _cb() } ); + _cancelCb && _panel.on('cancel', function(){ _cancelCb() } ); + _eventCb && _eventCb( _panel ); break; } } @@ -340,6 +481,10 @@ */ _p.on('ShowSuccess', function( _evt, _msg, _cb ){ var _panel; + if( _p._model.balIgnoreSuccess() ){ + _cb && _cb(); + return; + } switch( _p._model.balSuccessPopupType() ){ case 'alert': { @@ -419,6 +564,48 @@ } break; } + + case 'remove_element': + { + if( _p._model.is( '[balConfirmMsg]' ) ){ + var _panel = JC.confirm( _p._model.balConfirmMsg(), _p.selector(), 2 ); + _panel.on('confirm', function(){ + _p.trigger( 'RemoveElementAction' ); + }); + }else{ + _p.trigger( 'RemoveElementAction' ); + } + break; + } + + case 'ec'://expand and contract + { + var _target = _p._model.balTarget(); + if( !_target ) return; + + if( _target.is( ':visible' ) ){ + _target.hide(); + _p.selector() + .html( _p._model.balExpandWord() ) + .addClass( _p._model.balExpandClass() ) + .removeClass( _p._model.balContractClass() ) + ; + }else{ + _target.show(); + _p.selector() + .html( _p._model.balContractWord() ) + .addClass( _p._model.balContractClass() ) + .removeClass( _p._model.balExpandClass() ) + ; + } + } + + case 'hit_value': + { + var _target = _p._model.balTarget(); + if( !_target ) return; + _target.val( _p._model.balValue() ); + } } return this; } @@ -431,6 +618,38 @@ init: function(){ } + + , balTarget: + function( ){ + var _r; + this.is( '[balTarget]' ) && ( _r = this.selectorProp( 'balTarget' ) ); + return _r; + } + + , balValue: function(){ return this.attrProp( 'balValue' ) || ''; } + + , balExpandWord: function(){ return this.attrProp( 'balExpandWord' ) || '展开'; } + , balExpandClass: function(){ return this.attrProp( 'balExpandClass' ) || 'js_ecExpand'; } + + , balContractWord: function(){ return this.attrProp( 'balContractWord' ) || '收起'; } + , balContractClass: function(){ return this.attrProp( 'balContractClass' ) || 'js_ecContract'; } + + , unHtmlEntity: + function( _html ){ + var _r = this.boolProp( 'balUnHtmlEntity' ); + _r && + _html + && ( $.isArray(_html) && ( _html = _html.join('') ) ) + && ( + _html = _html.replace( /\>/g, '>' ) + .replace(/\&/g, '&') + .replace( /\</g, '<') + .replace(/\"/g, '"') + .replace(/\ /g, ' ') + ); + + return _html; + } , baltype: function(){ return this.stringProp( 'baltype' ); } , balPanelTpl: @@ -450,7 +669,24 @@ , balRandom: function(){ var _r = ActionLogic.random, _p = this; - _p.is('[balRandom]') && ( _r = parseBool( _p.stringProp( 'balRandom' ) ) ); + _p.is('[balRandom]') && ( _r = JC.f.parseBool( _p.stringProp( 'balRandom' ) ) ); + return _r; + } + , balRequestData: + function(){ + var _r; + if( this.attrProp( 'balRequestData' ) ){ + _r = eval( '(' + this.attrProp( 'balRequestData' ) + ')' ); + try{ + }catch( ex ){} + } + return _r; + } + , balAjaxType: + function(){ + var _r = 'get'; + this.balRequestData() && ( _r = 'post' ); + _r = this.attrProp( 'balAjaxType' ) || _r; return _r; } , balUrl: @@ -459,12 +695,20 @@ _p.selector().prop('nodeName').toLowerCase() == 'a' && ( _r = _p.selector().attr('href') ); _p.is( '[balUrl]' ) && ( _r = _p.selector().attr('balUrl') ); - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } , balDoneUrl: function(){ var _r = this.attrProp( 'balDoneUrl' ); - return urlDetect( _r ); + return JC.f.urlDetect( _r ); + } + , balDoneRemoveSelector: + function(){ + return this.selectorProp( 'balDoneRemoveSelector' ); + } + , balDoneBeforeRemoveCallback: + function(){ + return this.callbackProp( 'balDoneBeforeRemoveCallback' ); } , balConfirmMsg: function(){ @@ -487,6 +731,10 @@ var _r = this.stringProp('balConfirmPopupType') || 'confirm'; return _r; } + , balIgnoreSuccess: + function(){ + return this.boolProp( 'balIgnoreSuccess' ); + } } JC.BaseMVC.buildView( ActionLogic ); @@ -500,6 +748,7 @@ $(document).ready( function(){ $( document ).delegate( [ 'a.js_bizsActionLogic' + , 'span.js_bizsActionLogic' , 'input.js_bizsActionLogic' , 'button.js_bizsActionLogic' ].join(), 'click', function( _evt ){ @@ -508,4 +757,13 @@ }); }); -}(jQuery)); + return Bizs.ActionLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/ActionLogic/_demo/data/dataPanel.php b/bizs/ActionLogic/_demo/data/dataPanel.php old mode 100644 new mode 100755 diff --git a/bizs/ActionLogic/_demo/data/handler.php b/bizs/ActionLogic/_demo/data/handler.php old mode 100644 new mode 100755 diff --git a/bizs/ActionLogic/_demo/data/htmlPanel.php b/bizs/ActionLogic/_demo/data/htmlPanel.php old mode 100644 new mode 100755 diff --git a/bizs/ActionLogic/_demo/demo.html b/bizs/ActionLogic/_demo/demo.html old mode 100644 new mode 100755 index 5e0506583..7c5f20210 --- a/bizs/ActionLogic/_demo/demo.html +++ b/bizs/ActionLogic/_demo/demo.html @@ -38,7 +38,7 @@ if( _d && !_d.errorno ){ JC.msgbox( _d.errmsg || '操作成功', _trigger, 0, function(){ - reloadPage( '?usercallback=ajaxaction' ); + JC.f.reloadPage( '?usercallback=ajaxaction' ); }); }else{ JC.Dialog.alert( _d && _d.errmsg ? _d.errmsg : '操作失败, 请重试!' , 1 ); @@ -166,6 +166,14 @@ balUrl="./data/handler.php" balCallback="ajaxDelCallback" >delete with callback + +
二次确认 @@ -193,6 +201,9 @@ balErrorPopupType="msgbox" balSuccessPopupType="dialog.alert" >balDoneUrl, balErrorPopupType, balSuccessPopupType + +
+ balCallback + + with data + + data error +
+
+
balType = remove_element
+
+ + +
+ parent text + + remove parent + +
+ +
+
+ + + + + + +

JC.AutoComplete 示例

+

自动生成列表弹框, JC.AutoComplete#update

+
+
+
+ + + + + 添加 +
+ +  cacIdSelector: + +
+
+
+
+ + + + + back +
+ + +
+ + diff --git a/bizs/AutoSelectComplete/_demo/index.php b/bizs/AutoSelectComplete/_demo/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/bizs/AutoSelectComplete/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/AutoSelectComplete/index.php b/bizs/AutoSelectComplete/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/bizs/AutoSelectComplete/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/AutoSelectComplete/res/default/index.php b/bizs/AutoSelectComplete/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/bizs/AutoSelectComplete/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/AutoSelectComplete/res/default/style.css b/bizs/AutoSelectComplete/res/default/style.css new file mode 100755 index 000000000..d924cf976 --- /dev/null +++ b/bizs/AutoSelectComplete/res/default/style.css @@ -0,0 +1,9 @@ +.AC_box a { text-decoration: none; color: #333; } +.AC_box{ max-height: 300px; overflow-y: auto; } +.AC_box{ border: 1px solid #ccc; padding: 0; } +.AC_box{ margin: -1px 0 0; list-style: none; background: #fff; display: none; position: absolute; } +.AC_box li{ line-height: 24px; text-indent: 3px; } + +.AC_box li.AC_active{ background: #eee; } +.AC_fakebox{ border-color: #4d90fe; } + diff --git a/bizs/AutoSelectComplete/res/index.php b/bizs/AutoSelectComplete/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/bizs/AutoSelectComplete/res/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/ChangeLogic/ChangeLogic.js b/bizs/ChangeLogic/ChangeLogic.js new file mode 100755 index 000000000..7dac13986 --- /dev/null +++ b/bizs/ChangeLogic/ChangeLogic.js @@ -0,0 +1,619 @@ +//TODO: 完善 select 的相关判断逻辑 +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + *

input[type=radio|type=checkbox], select change 事件的响应逻辑

+ *
应用场景
+ *
表单操作时, 选择某个 radio 时, 对应的 内容有效, + *
但选择其他 radio 时, 其他的内容无效 + *
checkbox / select 也可使用( 带change事件的标签 ) + *

require: + * JC.BaseMVC + *

+ *

JC Project Site + * | API docs + * | demo link

+ * + * div 需要 添加 class="js_bizChangeLogic" + * + *

box 的 HTML 属性

+ *
+ *
bclTrigger
+ *
触发禁用/起用的control
+ * + *
bclDisableTarget
+ *
需要禁用/起用的control
+ * + *
bclHideTarget
+ *
需要根据禁用起用隐藏/可见的标签
+ * + *
bclDoneCallback = function
+ *
+ * 启用/禁用后会触发的回调, window 变量域 +
function bclDoneCallback( _triggerItem, _boxItem ){
+    var _ins = this;
+    JC.log( 'bclDoneCallback', new Date().getTime() );
+}
+ *
+ * + *
bclEnableCallback = function
+ *
+ * 启用后的回调, window 变量域 +
function bclEnableCallback( _triggerItem, _boxItem ){
+    var _ins = this;
+    JC.log( 'bclEnableCallback', new Date().getTime() );
+}
+ *
+ * + *
bclDisableCallback = function
+ *
+ * 禁用后的回调, window 变量域 +
function bclDisableCallback( _triggerItem, _boxItem ){
+    var _ins = this;
+    JC.log( 'bclDisableCallback', new Date().getTime() );
+}
+ *
+ * + *
bclChangeCleanTarget = selector
+ *
radio change 的时候, 清除目标选择器的 html 内容
+ * + *
bclTriggerChangeOnInit = bool, default = true
+ *
初始化实例时, 是否触发 change 事件
+ *
+ * + *

trigger 的 HTML 属性

+ *
+ *
bclDisable = bool, default = false
+ *
+ * 指定 bclDisableTarget 是否置为无效 + *
还可以根据这个属性 指定 bclHideTarget 是否显示 + *
+ * + *
bclDisplay = bool
+ *
指定 bclHideTarget 是否显示
+ * + *
bclDelimiter = string, default = "||"
+ *
bclDisplay 和 bclDisable 多值分隔符
+ * + *
bclHideTargetSub = selector
+ *
根据 trigger 的 checked 状态 显示或者隐藏 bclHideTargetSub node
+ * + *
bclShowToggleFilter = selector | html attr
+ *
显示的时候, 如果匹配到 filter, 那么将会隐藏
+ *
+ * + *

hide target 的 HTML 属性

+ *
+ *
bclHideToggle = bool, default = false
+ *
显示或显示的时候, 是否与他项相反
+ * + *
bclDisableToggle= bool, default = false
+ *
disabled 的时候, 是否与他项相反
+ *
+ * + * @namespace window.Bizs + * @class ChangeLogic + * @constructor + * @version dev 0.1 2013-09-04 + * @author qiushaowei | 75 Team + * + * @example +
+
+ + +
+ */ + window.Bizs.ChangeLogic = ChangeLogic; + JC.f.addAutoInit && JC.f.addAutoInit( ChangeLogic ); + + function ChangeLogic( _selector ){ + if( ChangeLogic.getInstance( _selector ) ) return ChangeLogic.getInstance( _selector ); + ChangeLogic.getInstance( _selector, this ); + + //JC.log( 'Bizs.ChangeLogic:', new Date().getTime() ); + + this._model = new Model( _selector ); + this._view = new View( this._model ); + + this._init(); + } + + ChangeLogic.prototype = { + _init: + function(){ + var _p = this, _tmp; + + _p._initHandlerEvent(); + + $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ + _p.on( _evtName, _cb ); + }); + + $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ + var _data = JC.f.sliceArgs( arguments ).slice( 2 ); + _p.trigger( _evtName, _data ); + }); + + _p._model.init(); + _p._view.init(); + + _p._model.bclTrigger().on('change', function(_evt){ + _p.trigger( 'item_change', [ $(this), _evt ] ); + }); + + _p.on( 'item_change', function( _evt, _item, _srcEvt ){ + _item = $( _item ); + + _p._view.change( _item ); + + if( _p._model.ready() ){ + _p._model.bclChangeCleanTarget() + && _p._model.bclChangeCleanTarget().each( function(){ + if (/(input|textarea)/i.test( $(this).prop( 'nodeName' ).toLowerCase() )) { + $( this ).val( '' ); + } else { + $( this ).html( '' ); + } + + }); + } + }); + + if( _p._model.bclTriggerChangeOnInit() ){ + + ( _tmp = _p._model.bclTrigger( true ) ) + && !_tmp.prop( 'disabled' ) + && _tmp.trigger( 'change'); + } + + _p._model.ready( true ); + + return _p; + } + , _initHandlerEvent: + function(){ + var _p = this; + + _p.on( 'DisableItem', function( _evt, _triggerItem ){ + _p._model.bclDisableCallback() + && _p._model.bclDisableCallback().call( _p, _triggerItem, _p._model.selector() ); + }); + + _p.on( 'EnableItem', function( _evt, _triggerItem ){ + _p._model.bclEnableCallback() + && _p._model.bclEnableCallback().call( _p, _triggerItem, _p._model.selector() ); + }); + + _p.on( 'ChangeDone', function( _evt, _triggerItem ){ + _p._model.bclDoneCallback() + && _p._model.bclDoneCallback().call( _p, _triggerItem, _p._model.selector() ); + }); + } + /** + * 获取 显示 ChangeLogic 的触发源选择器, 比如 a 标签 + * @method selector + * @return selector + */ + , selector: function(){ return this._model.selector(); } + /** + * 使用 jquery on 绑定事件 + * @method {string} on + * @param {string} _evtName + * @param {function} _cb + * @return ChangeLogicInstance + */ + , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;} + /** + * 使用 jquery trigger 绑定事件 + * @method {string} trigger + * @param {string} _evtName + * @return ChangeLogicInstance + */ + , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;} + } + /** + * 获取或设置 ChangeLogic 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {ChangeLogic instance} + */ + ChangeLogic.getInstance = + function( _selector, _setter ){ + if( typeof _selector == 'string' && !/ -1; + } + if( _selectedItem.is( '[bclDisable]' ) ){ + _r = JC.f.parseBool( _selectedItem.attr( 'bclDisable' ) ); + } + + }else{ + if( _triggerItem.is( '[bclDisplay]' ) ){ + _r = _p.delimiterItems( _triggerItem.attr('bclDisplay'), _triggerItem ).indexOf( _triggerItem.val() ) > -1; + } + if( _selectedItem.is( '[bclDisplay]' ) ){ + _r = JC.f.parseBool( _selectedItem.attr( 'bclDisplay' ) ); + } + } + }else{ + if( !_triggerItem.is('[bclDisplay]') ){ + _triggerItem.is( '[bclDisable]' ) + && ( _r = !JC.f.parseBool( _triggerItem.attr('bclDisable') ) ) + ; + }else{ + _triggerItem.is( '[bclDisplay]' ) + && ( _r = JC.f.parseBool( _triggerItem.attr('bclDisplay') ) ) + ; + } + } + + if( _triggerItem.prop('nodeName').toLowerCase() == 'input' + && _triggerItem.attr('type').toLowerCase() == 'checkbox' ){ + _r = _triggerItem.prop('checked'); + } + + return _r; + } + + , bclHideTarget: + function( _triggerItem ){ + var _p = this, _r, _tmp; + + _p.selector().attr('bclHideTarget') + && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('bclHideTarget') ) ) + ; + + _triggerItem + && ( _triggerItem = $(_triggerItem) ).length + && _triggerItem.attr('bclHideTarget') + && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('bclHideTarget') ) ) + ; + return _r; + } + + , bclShowToggleFilter: + function( _triggerItem ){ + var _r = ''; + _triggerItem.attr( 'bclShowToggleFilter' ) && ( _r = _triggerItem.attr( 'bclShowToggleFilter' ) );; + return _r; + } + + , bclHideToggle: + function( _hideTarget ){ + var _r; + _hideTarget && _hideTarget.is( '[bclHideToggle]' ) + && ( _r = JC.f.parseBool( _hideTarget.attr('bclHideToggle') ) ); + return _r; + } + + , bclDisableToggle: + function( _target ){ + var _r; + _target && _target.is( '[bclDisableToggle]' ) + && ( _r = JC.f.parseBool( _target.attr('bclDisableToggle') ) ); + return _r; + } + + , bclDoneCallback: + function(){ + var _r = ChangeLogic.doneCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('bclDoneCallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , bclEnableCallback: + function(){ + var _r = ChangeLogic.enableCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('bclEnableCallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , bclDisableCallback: + function(){ + var _r = ChangeLogic.disableCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('bclDisableCallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + }; + + function View( _model ){ + this._model = _model; + } + + View.prototype = { + init: + function() { + return this; + } + + , change: + function( _triggerItem ){ + + _triggerItem && ( _triggerItem = $( _triggerItem ) ); + if( !( _triggerItem && _triggerItem.length && _triggerItem.is(':visible') ) ) return; + var _p = this + , _isDisable = _p._model.bclDisable( _triggerItem ) + , _bclDisableTarget = _p._model.bclDisableTarget( _triggerItem ) + , _bclDisplay = _p._model.bclDisplay( _triggerItem ) + , _bclHideTarget = _p._model.bclHideTarget( _triggerItem ) + ; + + if( _triggerItem.is( '[bclHideTargetSub]' ) ){ + var _starget = JC.f.parentSelector( _triggerItem, _triggerItem.attr( 'bclHideTargetSub' ) ); + if( _starget && _starget.length ){ + if( _triggerItem.prop('checked') ){ + _starget.show(); + }else{ + _starget.hide(); + } + } + } + + + if( _bclDisableTarget && _bclDisableTarget.length ){ + _bclDisableTarget.each( function(){ + var _sp = $( this ); + + if( _p._model.bclDisableToggle( _sp ) ){ + _sp.attr('disabled', !_isDisable); + }else{ + _sp.attr('disabled', _isDisable); + } + JC.Valid && JC.Valid.setValid( _sp ); + + if( _sp.is( '[bclHideTargetSub]' ) ){ + var _starget = JC.f.parentSelector( _sp, _sp.attr( 'bclHideTargetSub' ) ); + if( !( _starget && _starget.length ) ) return; + if( _isDisable ){ + _starget.hide(); + }else{ + if( _sp.prop('checked') ){ + _starget.show(); + }else{ + _starget.hide(); + } + } + } + }); + } + + if( _bclHideTarget && _bclHideTarget.length ){ + _bclHideTarget.each( function(){ + var _display = _p._model.bclHideToggle( $(this) ) ? !_bclDisplay : _bclDisplay, _sp = $( this ); + if( _display ){ + if( _p._model.bclShowToggleFilter( _triggerItem ) ){ + if( _sp.is( _p._model.bclShowToggleFilter( _triggerItem ) ) ){ + _sp.hide(); + }else{ + _sp.show(); + } + }else{ + _sp.show(); + } + }else{ + _sp.hide(); + }; + //JC.log( _display, new Date().getTime() ); + }); + } + + _isDisable + ? $( _p ).trigger( 'TriggerEvent', [ 'DisableItem', _triggerItem ] ) + : $( _p ).trigger( 'TriggerEvent', [ 'EnableItem', _triggerItem ] ) + ; + + $( _p ).trigger( 'TriggerEvent', [ 'ChangeDone', _triggerItem ] ); + + //JC.log( 'ChangeLogic view change', new Date().getTime(), _isDisable ); + } + }; + + $(document).ready( function(){ + setTimeout( function(){ + ChangeLogic.init(); + }, 10); + }); + + return Bizs.ChangeLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/ChangeLogic/_demo/demo.bclHideTargetSub.html b/bizs/ChangeLogic/_demo/demo.bclHideTargetSub.html new file mode 100755 index 000000000..fe4b616cc --- /dev/null +++ b/bizs/ChangeLogic/_demo/demo.bclHideTargetSub.html @@ -0,0 +1,139 @@ + + + + + Open JQuery Components Library - suches + + + + + + + +
+
ChangeLogic, trigger 隐藏对应的 node ( bclHideTargetSub )
+
+ + + + + +
+ + +
+ +
+      + + +
+
+
+
+ +
+
+ +
+ +
+
+
国内
+
国内国内国内国内国内国内
+
+
+
国外
+
国外国外国外国外国外国外
+
+
+
导航资料
+
导航资料导航资料导航资料导航资料
+
+
+
+
+ + + + diff --git a/bizs/ChangeLogic/_demo/demo.html b/bizs/ChangeLogic/_demo/demo.html new file mode 100755 index 000000000..7bf8e4b68 --- /dev/null +++ b/bizs/ChangeLogic/_demo/demo.html @@ -0,0 +1,170 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +
+
ChangeLogic 禁用逻辑演示 1
+
+
+
+ + + +
+
+
+ +
+
ChangeLogic 禁用逻辑演示 2 ( disable one more item )
+
+
+
+ + + + + +
+
+
+ +
+
ChangeLogic 禁用逻辑演示 3 ( bclHideTarget )
+
+
+
+ + + + + +

测试用

+
+
+
+
+ +
+
ChangeLogic 禁用逻辑演示 4 ( bclHideToggle )
+
+
+
+ + + + + +

测试用

+
+
+
+
+ + + diff --git a/bizs/ChangeLogic/_demo/demo.select.html b/bizs/ChangeLogic/_demo/demo.select.html new file mode 100755 index 000000000..3dd300be9 --- /dev/null +++ b/bizs/ChangeLogic/_demo/demo.select.html @@ -0,0 +1,191 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +

Bizs.ChangeLogic demo - select + +
+
attr bclDisplay, for 其他
+
+
+
+ + +
+
+
+
+ +
+
attr bclDisplay, for 测试2
+ +
+
+
+ + +
+
+
+ +
+ +
+
attr bclDisable, for 其他
+
+
+
+ + + + +
+
+
+
+ +
+
attr bclDisable, for 测试2
+ +
+
+
+ + + + +
+
+
+
+ +
+
attr bclDisable, bclDisplay, for 测试2
+ +
+
+
+ + + + +
+
+
+
+ +
+
attr bclDisable, bclDisplay, for 测试2
+ +
+
+
+ + +
+
+
+
+ + + + + + diff --git a/bizs/ChangeLogic/_demo/index.php b/bizs/ChangeLogic/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/ChangeLogic/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/ChangeLogic/index.php b/bizs/ChangeLogic/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/bizs/ChangeLogic/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/CommonModify/CommonModify.js b/bizs/CommonModify/CommonModify.js old mode 100644 new mode 100755 index c202f3a11..99958e121 --- a/bizs/CommonModify/CommonModify.js +++ b/bizs/CommonModify/CommonModify.js @@ -1,8 +1,11 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ /** *

Dom 通用 添加删除 逻辑

*
应用场景 *
需要动态添加删除内容的地方可以使用这个类 - * + *

require: + * JC.BaseMVC + *

*

JC Project Site * | API docs * | demo link

@@ -26,60 +29,60 @@ *
cmdonecallback = function
*
* 添加或删除完后会触发的回调, window 变量域 -function cmdonecallback( _ins, _boxParent ){ +<pre>function cmdonecallback( _ins, _boxParent ){ var _trigger = $(this); JC.log( 'cmdonecallback', new Date().getTime() ); -} +} *
* *
cmtplfiltercallback = function
*
* 模板内容过滤回调, window 变量域 -window.COUNT = 1; +<pre>window.COUNT = 1; function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmtplfiltercallback', new Date().getTime() ); - _tpl = printf( _tpl, COUNT++ ); + _tpl = JC.f.printf( _tpl, COUNT++ ); return _tpl; -} +} *
* *
cmbeforeaddcallabck = function
*
* 添加之前的回调, 如果返回 false, 将不执行添加操作, window 变量域 -function cmbeforeaddcallabck( _cmitem, _boxParent ){ +<pre>function cmbeforeaddcallabck( _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmbeforeaddcallabck', new Date().getTime() ); //return false; -} +} *
* *
cmaddcallback = function
*
* 添加完成的回调, window 变量域 -function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){ +<pre>function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmaddcallback', new Date().getTime() ); -} +} *
* *
cmbeforedelcallback = function
*
* 删除之前的回调, 如果返回 false, 将不执行删除操作, window 变量域 -function cmbeforedelcallback( _cmitem, _boxParent ){ +<pre>function cmbeforedelcallback( _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmbeforedelcallback', new Date().getTime() ); //return false; -} +} *
* *
cmdelcallback = function
*
* 删除完成的回调, window 变量域 -function cmdelcallback( _ins, _boxParent ){ +<pre>function cmdelcallback( _ins, _boxParent ){ JC.log( 'cmdelcallback', new Date().getTime() ); -} +} *
* *
cmMaxItems = int
@@ -148,7 +151,6 @@ function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ */ -;(function($){ window.Bizs.CommonModify = CommonModify; function CommonModify( _selector ){ @@ -300,12 +302,12 @@ function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ , cmtemplate: function(){ var _r = '', _tmp; - _tmp = parentSelector( this.selector(), this.selector().attr('cmtemplate') ); - !( _tmp && _tmp.length ) && ( _tmp = parentSelector( this.selector(), this.selector().attr('cmtpl') ) ); + _tmp = JC.f.parentSelector( this.selector(), this.selector().attr('cmtemplate') ); + !( _tmp && _tmp.length ) && ( _tmp = JC.f.parentSelector( this.selector(), this.selector().attr('cmtpl') ) ); this.selector() && ( _tmp && _tmp.length ) - && ( _r = scriptContent( _tmp ) ) + && ( _r = JC.f.scriptContent( _tmp ) ) ; return _r; } @@ -351,7 +353,7 @@ function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ , cmOutRangeMsg: function(){ - var _r = printf( this.attrProp( 'cmOutRangeMsg' ) ||'最多只能上传 {0}个文件!', this.cmMaxItems() ); + var _r = JC.f.printf( this.attrProp( 'cmOutRangeMsg' ) ||'最多只能上传 {0}个文件!', this.cmMaxItems() ); return _r; } @@ -412,7 +414,7 @@ function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ var _r, _tmp; this.selector() && ( _tmp = this.selector().attr('cmitem') ) - && ( _r = parentSelector( this.selector(), _tmp ) ) + && ( _r = JC.f.parentSelector( this.selector(), _tmp ) ) ; return _r; } @@ -476,7 +478,7 @@ function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ default: _item.after( _newItem ); break; } - window.jcAutoInitComps && jcAutoInitComps( _newItem ); + JC.f.autoInit && JC.f.autoInit( _newItem ); $( _p ).trigger( 'TriggerEvent', [ 'add', _newItem, _boxParent ] ); $( _p ).trigger( 'TriggerEvent', [ 'done', _newItem, _boxParent ] ); @@ -505,7 +507,18 @@ function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ $(document).delegate( 'a.js_autoCommonModify, button.js_autoCommonModify' + ', a.js_bizsCommonModify, button.js_bizsCommonModify', 'click', function( _evt ){ - CommonModify.getInstance().process( $(this) ); + var _p = $( this ); + _p.prop( 'nodeName' ).toLowerCase() == 'a' && _evt.preventDefault(); + CommonModify.getInstance().process( _p ); }); -}(jQuery)); + return Bizs.CommonModify; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/CommonModify/_demo/data/handler.php b/bizs/CommonModify/_demo/data/handler.php old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/_demo/demo.addAutoSelect.html b/bizs/CommonModify/_demo/demo.addAutoSelect.html old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/_demo/demo.cmMaxItems.html b/bizs/CommonModify/_demo/demo.cmMaxItems.html old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/_demo/demo.html b/bizs/CommonModify/_demo/demo.html old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/_demo/demo_crm.example.html b/bizs/CommonModify/_demo/demo_crm.example.html old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/_demo/demo_crm.example_1.html b/bizs/CommonModify/_demo/demo_crm.example_1.html old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/_demo/index.php b/bizs/CommonModify/_demo/index.php old mode 100644 new mode 100755 diff --git a/bizs/CommonModify/index.php b/bizs/CommonModify/index.php old mode 100644 new mode 100755 diff --git a/bizs/CustomColumn/CustomColumn.js b/bizs/CustomColumn/CustomColumn.js new file mode 100755 index 000000000..b6655a05b --- /dev/null +++ b/bizs/CustomColumn/CustomColumn.js @@ -0,0 +1,495 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.Panel', 'JC.Valid', 'Bizs.FormLogic' ], function(){ + if( JC.use ){ + !JC.Panel && JC.use( 'JC.Panel' ); + !JC.Valid && JC.use( 'JC.Valid' ); + !Bizs.FormLogic && JC.use( 'Bizs.FormLogic' ); + } + +/** + * 组件用途简述 + * + *

require: + * JC.Panel + * , JC.Valid + * , Bizs.FormLogic + *

+ * + *

JC Project Site + * | API docs + * | demo link

+ * + *

页面只要引用本脚本, 默认会自动处理 div class="js_bizCustomColumn"

+ * + *

可用的 HTML attribute

+ * + *
+ *
[ data-url | data-query ] = url
+ *
提交数据的URL
+ * + *
data-data = json var name
+ *
自定义列的数据 变量名, window 变量域
+ * + *
data-scriptData = script selector
+ *
脚本数据
+ * + *
data-id = string
+ *
{id}占位符的数值
+ * + *
data-minCol = int
+ *
最小需要选择多少列
+ * + *
data-maxCol = int
+ *
最多只能选择多少列
+ * + *
data-name = string
+ *
数据复选框的 name
+ * + *
data-saveSelector = selector
+ *
保存所要复选框值的选择器
+ * + *
data-tpl = script tpl
+ *
显示弹框的脚本模板
+ * + *
data-formDoneCallback = window function name
+ *
自定义提交数据后的响应函数
+ * + *
data-formAfterProcessCallback = window function name
+ *
自定义表单提交前的校验函数
+ *
+ * + * @namespace window.Bizs + * @class CustomColumn + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +

Bizs.CustomColumn 示例

+ */ + var _jdoc = $( document ), _jwin = $( window ); + + Bizs.CustomColumn = CustomColumn; + + function CustomColumn( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, CustomColumn ) ) + return JC.BaseMVC.getInstance( _selector, CustomColumn ); + + JC.BaseMVC.getInstance( _selector, CustomColumn, this ); + + this._model = new CustomColumn.Model( _selector ); + this._view = new CustomColumn.View( this._model ); + + this._init(); + + JC.log( CustomColumn.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 CustomColumn 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of CustomColumnInstance} + */ + CustomColumn.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_bizCustomColumn' ) ){ + _r.push( new CustomColumn( _selector ) ); + }else{ + _selector.find( 'a.js_bizCustomColumn, button.js_bizCustomColumn' ).each( function(){ + _r.push( new CustomColumn( this ) ); + }); + } + } + return _r; + }; + + CustomColumn.ID_COUNT = 1; + + window.BizsCustomColumnFormDoneCallback = + function( _json, _submitButton, _ins ){ + var _form = $(this), _panel; + if( _json.errorno ){ + _panel = JC.alert( _json.errmsg || '操作失败, 请重新尝试!', _submitButton, 1 ); + }else{ + _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){ + JC.f.reloadPage( _ins._model.formAjaxDoneAction() || JC.f.urlDetect( 'URL' ) ); + }); + } + }; + + window.BizsCustomColumnFormAfterProcessCallback = + function formAfterProcess( _evt, _ins ){ + var _form = $(this) + , _panel = JC.f.parentSelector( _form, 'div.UPanel' ) + , _cc + ; + if( !_panel ) return; + _panel = JC.Panel.getInstance( _panel ); + if( !_panel ) return; + _cc = _panel.CustomColumnIns; + if( !_cc ) return; + + var _saveSelector = _cc._model.saveSelector(), _tmp, _selected; + if( _saveSelector && _saveSelector.length ){ + _tmp = []; + _selected = _panel.selector().find( 'input.js_typeItem:checked' ); + + _cc.trigger( 'update_selected_status' ); + + if( _selected.length < _cc._model.minCol() ){ + return false; + } + + if( _selected.length > _cc._model.maxCol() ){ + return false; + } + + _selected.each( function(){ + _tmp.push( $( this ).val().trim() ); + }); + _saveSelector.val( _tmp.join(',') ); + } + }; + + JC.BaseMVC.build( CustomColumn ); + + JC.f.extendObject( CustomColumn.prototype, { + _beforeInit: + function(){ + JC.log( 'CustomColumn _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + }); + + _p.on( 'showPopup', function(){ + _p._view.showPopup(); + }); + + _p.on( 'hidePopup', function(){ + _p.view.hidePopup(); + }); + + _p.on( 'panel_inited', function( _evt, _panel ){ + _p._model.currentPanel( _panel ); + _panel.CustomColumnIns = _p; + }); + + _p.on( 'update_default', function( _evt, _panel ){ + _panel.selector().find( 'input.js_typeItem' ).each( function(){ + var _sp = $( this ) + , _dataItem = _p._model.data()[ _sp.attr( 'data-topIndex' ) ].content[ _sp.attr( 'data-subIndex' ) ] + ; + if( _dataItem.isdefault ){ + _sp.prop( 'checked', true ); + }else{ + _sp.prop( 'checked', false ); + } + }); + }); + + _p.on( 'update_custom', function( _evt, _panel ){ + _panel.selector().find( 'input.js_typeItem' ).each( function(){ + var _sp = $( this ) + , _dataItem = _p._model.data()[ _sp.attr( 'data-topIndex' ) ].content[ _sp.attr( 'data-subIndex' ) ] + ; + if( _dataItem.ison ){ + _sp.prop( 'checked', true ); + }else{ + _sp.prop( 'checked', false ); + } + }); + }); + + _p.on( 'update_selected_status', function(){ + var _panel = _p._model.currentPanel(), _selected, _em = _panel.find( 'em.js_bccErrEm' ); + _selected = _panel.selector().find( 'input.js_typeItem:checked' ); + + if( _selected.length < _p._model.minCol() ){ + _em.html( '请选择数据列, 最少需要选择' + _p._model.minCol() + '个数据列!' ).show(); + return; + } + + if( _selected.length > _p._model.maxCol() ){ + _em.html( '最多只能选择' + _p._model.maxCol() + '个数据列!' ).show(); + return; + } + _em.hide(); + }); + } + + , _inited: + function(){ + JC.log( 'CustomColumn _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + + , show: function(){ this.trigger( 'showPopup' ); } + , hide: function(){ this.trigger( 'hidePopup' ); } + , close: function(){ this.trigger( 'hidePopup' ); } + }); + + CustomColumn.Model._instanceName = 'JCCustomColumn'; + JC.f.extendObject( CustomColumn.Model.prototype, { + init: + function(){ + JC.log( 'CustomColumn.Model.init:', new Date().getTime() ); + this._gid = 'CustomColumnIns_' + CustomColumn.ID_COUNT; + CustomColumn.ID_COUNT++; + } + + , currentPanel: + function( _setter ){ + typeof _setter != 'undefined' && ( this._currentPanel = _setter ); + return this._currentPanel; + } + + , gid: function(){ return this._gid; } + + , url: + function(){ + var _r = this.attrProp( 'data-query') || this.attrProp( 'data-url' ) || '?'; + return _r; + } + + , id: + function(){ + var _r = this.attrProp( 'pagename') || this.attrProp( 'data-id' ) || ''; + return _r; + } + + , name: + function(){ + var _r = this.attrProp( 'data-name' ) || 'selectedItem'; + return _r; + } + + , data: + function(){ + if( !this._data ){ + this.is( '[data-data]' ) && ( this._data = this.windowProp( 'data-data' ) ); + this.is( '[data-scriptData]' ) && ( this._data = this.scriptDataProp( 'data-scriptData' ) ); + } + return this._data; + } + + , typeSelector: + function(){ + return this.attrProp( 'data-typeSelector' ) || 'js_selectType'; + } + + , saveSelector: + function(){ + if( this.is( '[data-saveSelector]' ) ){ + return this.selectorProp( 'data-saveSelector' ) ; + }else{ + return this.selector().find( 'input.js_saveSelector' ); + } + } + + , maxCol: + function(){ + return this.intProp( 'data-maxCol' ) || 20; + } + + , minCol: + function(){ + return this.intProp( 'data-minCol' ) || 1; + } + + , tpl: + function(){ + if( !this._tpl ){ + this.is( '[data-tpl]' ) && ( this._tpl = this.scriptTplProp( 'data-tpl' ) ); + } + return this._tpl; + } + + , formDoneCallback: + function(){ + var _r = 'BizsCustomColumnFormDoneCallback'; + this.attrProp( 'data-formDoneCallback' ) + && this.windowProp( 'data-formDoneCallback' ) + && ( _r = this.attrProp( 'data-formDoneCallback' ) ); + return _r; + } + + , formAfterProcessCallback: + function(){ + var _r = 'BizsCustomColumnFormAfterProcessCallback'; + this.attrProp( 'data-formAfterProcessCallback' ) + && this.windowProp( 'data-formAfterProcessCallback' ) + && ( _r = this.attrProp( 'data-formAfterProcessCallback' ) ); + return _r; + } + + , isDefault: + function(){ + var _r = true, _p = this; + $.each( _p.data(), function( _k, _item ){ + $.each( _item.content, function( _sk, _sitem ){ + if( ( _sitem.ison && !_sitem.isdefault ) || ( !( _sitem.ison || _sitem.dftchk ) && _sitem.isdefault ) ){ + return _r = false; + } + }); + if( !_r ) return false; + }); + return _r; + } + }); + + JC.f.extendObject( CustomColumn.View.prototype, { + init: + function(){ + JC.log( 'CustomColumn.View.init:', new Date().getTime() ); + } + + , showPopup: + function(){ + var _p = this + , _tpl = _p._model.tpl() + , _panel + , _columns = [] + , _isDefault = _p._model.isDefault() + ; + + $.each( _p._model.data(), function( _k, _item ){ + _columns.push( '
' ); + _columns.push( '
' ); + _item.name && ( _columns.push( _item.groupName ) ); + _columns.push( '
' ); + _columns.push( '
' ); + + if( _item.content ){ + _columns.push( '
    ' ); + $.each( _item.content, function( _sk, _sitem ){ + + if( !_sitem ){ + return; + } + + var _isChecked = '', _dftchk = '', _class = ''; + + _sitem.isdefault && ( _class = 'js_isDefaultItem' ); + + if( _isDefault ){ + _sitem.isdefault && ( _isChecked = ' checked="checked" ' ); + }else{ + _sitem.ison && ( _isChecked = ' checked="checked" ' ); + } + + if( _sitem.isdefault && _sitem.dftchk ) { + ( _isChecked += ' disabled="disabled" ' ); + _dftchk = ''; + } + + _columns.push( JC.f.printf( '
  • ' + , _dftchk + , _sitem.name, _sitem.title + , _p._model.name() + , _isChecked + , _class + , _k, _sk + )); + }); + _columns.push( '
' ); + } + + _columns.push( '
' ); + _columns.push( '
' ); + }); + + _tpl = JC.f.printKey( _tpl, { + id: _p._model.id() + , url: _p._model.url() + , content: _columns.join( '' ) + , formDoneCallback: _p._model.formDoneCallback() + , formAfterProcessCallback: _p._model.formAfterProcessCallback() + } ); + + _panel = JC.Dialog( _tpl ); + _p.trigger( 'panel_inited', [ _panel ] ); + + if( _isDefault ){ + _panel.find( 'input.js_defaultType' ).prop( 'checked', true ); + }else{ + _panel.find( 'input.js_customType' ).prop( 'checked', true ); + } + + _panel.find( 'input.js_customType' ).on( 'click', function( _sevt ){ + if( _p._model.isDefault() ){ + return false; + } + _p.trigger( 'update_custom', [ _panel ] ); + _p.trigger( 'update_selected_status' ); + }); + + _panel.selector().delegate( 'input.js_selectType', 'change', function(){ + var _sp = $( this ); + if( _sp.val() != 'default' ) return; + _p.trigger( 'update_default', [ _panel ] ); + _p.trigger( 'update_selected_status' ); + }); + + _panel.selector().delegate( 'input.js_typeItem', 'change', function(){ + var _sp = $( this ) + , _dataItem = _p._model.data()[ _sp.attr( 'data-topIndex' ) ].content[ _sp.attr( 'data-subIndex' ) ] + ; + if( _sp.prop( 'checked' ) ){ + _dataItem.ison = true; + }else{ + _dataItem.ison = false; + } + + if( _p._model.isDefault() ){ + _panel.find( 'input.js_defaultType' ).prop( 'checked', true ); + }else{ + _panel.find( 'input.js_customType' ).prop( 'checked', true ); + } + + _p.trigger( 'update_selected_status' ); + }); + + + } + }); + + _jdoc.ready( function(){ + /* + JC.f.safeTimeout( function(){ + CustomColumn.autoInit && CustomColumn.init(); + }, null, 'CustomColumnasdfae', 1 ); + */ + + $( document ).delegate( 'button.js_bizCustomColumn, a.js_bizCustomColumn', 'click', function(){ + var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, CustomColumn ); + if( !_ins ){ + _ins = new CustomColumn( _p ); + } + _ins && _ins.show(); + }); + }); + + return Bizs.CustomColumn; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/CustomColumn/_demo/data/handler.php b/bizs/CustomColumn/_demo/data/handler.php new file mode 100755 index 000000000..4830211e6 --- /dev/null +++ b/bizs/CustomColumn/_demo/data/handler.php @@ -0,0 +1,13 @@ + 0, 'errmsg' => '', 'data' => array () ); + + isset( $_REQUEST['errorno'] ) && ( $r['errorno'] = (int)$_REQUEST['errorno'] ); + isset( $_REQUEST['errmsg'] ) && ( $r['errmsg'] = $_REQUEST['errmsg'] ); + isset( $_REQUEST['url'] ) && ( $r['url'] = $_REQUEST['url'] ); + + $r['data'] = $_REQUEST; + + isset( $_REQUEST['formReturnUrl'] ) && ( $r['url'] = $_REQUEST['formReturnUrl'] ); + + echo json_encode( $r ); +?> diff --git a/bizs/CustomColumn/_demo/data/handler_jsonp.php b/bizs/CustomColumn/_demo/data/handler_jsonp.php new file mode 100755 index 000000000..a620aa356 --- /dev/null +++ b/bizs/CustomColumn/_demo/data/handler_jsonp.php @@ -0,0 +1,28 @@ + 0, 'errmsg' => '', 'data' => array () ); + + isset( $_REQUEST['errorno'] ) && ( $r['errorno'] = (int)$_REQUEST['errorno'] ); + isset( $_REQUEST['errmsg'] ) && ( $r['errmsg'] = $_REQUEST['errmsg'] ); + isset( $_REQUEST['url'] ) && ( $r['url'] = $_REQUEST['url'] ); + + $r['data'] = $_REQUEST; + + isset( $_REQUEST['formReturnUrl'] ) && ( $r['url'] = $_REQUEST['formReturnUrl'] ); + + $callback = "callback"; + $callbackInfo = ""; + + isset( $_REQUEST['callback'] ) && ( $callback = $_REQUEST['callback'] ); + isset( $_REQUEST['callbackInfo'] ) && ( $callbackInfo = $_REQUEST['callbackInfo'] ); + + $jsonstr = json_encode( $r ); + echo << +window.parent + && window.parent != this + && window.parent[ '$callback' ] + && window.parent[ '$callback' ]( $jsonstr, '$callbackInfo' ) + ; + +EOF; +?> diff --git a/bizs/CustomColumn/_demo/demo.html b/bizs/CustomColumn/_demo/demo.html new file mode 100755 index 000000000..aa8b28b08 --- /dev/null +++ b/bizs/CustomColumn/_demo/demo.html @@ -0,0 +1,136 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + + +
+
Bizs.CustomColumn - 示例
+
+ + + +
+
+ + + + diff --git a/bizs/CustomColumn/_demo/index.php b/bizs/CustomColumn/_demo/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/bizs/CustomColumn/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/CustomColumn/index.php b/bizs/CustomColumn/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/bizs/CustomColumn/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/CustomColumn/res/default/style.css b/bizs/CustomColumn/res/default/style.css new file mode 100755 index 000000000..642ae5003 --- /dev/null +++ b/bizs/CustomColumn/res/default/style.css @@ -0,0 +1,24 @@ +/*UPanel*/ +div.bcc_Panel-Asearch * { + font-size: 12px!important; + font-family: Tahoma,Helvetica,Arial,'宋体',sans-serif; +} +.bcc_UPanel-ft { height: 46px; border-top: 1px solid #efefef; background: #fafafa; } +.bcc_UPanel-btn { float: right; margin: 7px 19px 0 0!important; } +.bcc_Panel-flist { width: 610px; } +.bcc_Panel-flist-con .frm-list { padding:10px 20px; } +div.UPanel .bcc_Panel-flist-con .bcc_data-box2{ margin:0 20px 20px;} +.bcc_UPanel-key{ width:880px;} +.bcc_UPanel-txt{ width:310px;} +.bcc_UPanel-txt .Panel-flist-con{ text-align:center; padding:20px; line-height:1.8;} +.bcc_Panel-Asearch { width: 700px; } +.bcc_Asearch-con { padding: 0 20px!important; min-height: 100px; } +.bcc_Asearch-con dl { clear: both; padding: 10px 0; color: #666; } +.bcc_Asearch-con dt { float: left; font-weight: bold; width: 60px; padding: 3px 0; display:none;} +.bcc_Asearch-con dd { overflow: hidden; zoom: 1; } +.bcc_Asearch-con li { float: left; width: 165px; height: 20px; overflow: hidden; padding: 3px 0; } +.bcc_Asearch-con li.cur { color: #999; } +div.UPanel .bcc_Diylist-hd { height: 35px; line-height: 35px; border-bottom: 1px solid #edecec; padding: 0 20px; background:#f0f0f0;} +div.UPanel .bcc_Diylist-hd span { font-size: 14px!important; padding-right: 10px; } +.bcc_Diylist-hd .cur { font-weight: bold; } +.bcc_Diylist-hd label{ margin-right:12px;} diff --git a/bizs/CustomColumn/res/index.php b/bizs/CustomColumn/res/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/bizs/CustomColumn/res/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/DMultiDate/DMultiDate.js b/bizs/DMultiDate/DMultiDate.js new file mode 100755 index 000000000..c2fce383d --- /dev/null +++ b/bizs/DMultiDate/DMultiDate.js @@ -0,0 +1,819 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Calendar' ], function(){ + window.Bizs.DMultiDate = DMultiDate; + /** + * DMultiDate 复合日历业务逻辑 + *
Dom 加载后会自动加载页面上所有.js_autoDMultiDate的标签 + *

require: + * JC.BaseMVC + * , JC.Calendar + *

+ *

JC Project Site + * | API docs + * | demo link

+ * + *

可用的html属性

+ *
+ *
mddate = css selector
+ *
声明日期input[type=text][datatype=daterange]的标签
+ * 如果缺省则自动查找子元素.js_multidate
+ * + *
mdstartdate = css selector
+ *
声明开始日期的隐藏域标签, 默认查找子元素.js_startdate
+ * + *
mdenddate = css selector
+ *
声明结束日期的隐藏域标签, 默认查找子元素.js_enddate
+ * + *
mddayrange = num
+ *
声明时间粒度为日时,最长可选取多少天,如果不需要则不声明此属性
+ * + *
mdweekrange = num
+ *
声明时间粒度为周时,最长可选取多少周,如果不需要则不声明此属性
+ * + *
mdmonthrange = num
+ *
声明时间粒度为月时,最长可选取多少月,如果不需要则不声明此属性
+ * + *
mdseasonrange = num
+ *
声明时间粒度为季时,最长可选取多少季,如果不需要则不声明此属性
+ * + *
mdyearrange = num
+ *
声明时间粒度为年时,最长可选取多少年,如果不需要则不声明此属性
+ * + *
mdIgnoreUrlFill = bool, default = false
+ *
是否忽略 URL 自动填充
+ * + *
+ * + * @class DMultiDate + * @namespace window.Bizs + * @constructor + * @private + * @version dev 0.1 2014-03-03 + * @author zuojing | 75 Team + */ + function DMultiDate( _selector ){ + if( DMultiDate.getInstance( _selector ) ) return DMultiDate.getInstance( _selector ); + DMultiDate.getInstance( _selector, this ); + + this._model = new DMultiDate.Model( _selector ); + this._view = new DMultiDate.View( this._model ); + + this._init(); + } + + DMultiDate.prototype = { + _beforeInit: function () { + this._model.mddateEl().attr( 'ignoreInitCalendarDate', 'true' ).data( 'ignoreInitCalendarDate', true ); + DMultiDate.Model._defaultMaxvalue = this._model.mddateEl().eq(0).attr('maxvalue') || ''; + DMultiDate.Model._defaultMinvalue = this._model.mddateEl().eq(1).attr('minvalue') || ''; + }, + + _initHanlderEvent: function () { + var _p = this, + _count = DMultiDate.Model._inscount++, + _updatestartcb = 'Bizs.DMultiDate_update_start' + _count, + _updateendcb = 'Bizs.DMultiDate_update_end' + _count, + _showstartcb = 'Bizs.DMultiDate_show_start' + _count, + _showendcb = 'Bizs.DMultiDate_show_end' + _count, + _hidestartcb = 'Bizs.DMultiDate_hide_start' + _count, + _hideendcb = 'Bizs.DMultiDate_hide_end' + _count, + _layoutchangestartcb = 'Bizs.DMultiDate_layoutchange_start' + _count, + _layoutchangeendcb = 'Bizs.DMultiDate_layoutchange_end' + _count, + _clearstartcb = 'Bizs.DMultiDate_clear_start' + _count, + _clearendcb = 'Bizs.DMultiDate_clear_end' + _count, + _parseweekdate = 'parsedateweek', + _parsemonthdate = 'parsedatemonth', + _parseseasondate = 'parsedateseason', + _parseyeardate = 'parsedateyear'; + + //如果url上有参数则回填到html tag的value; + _p._initDefaultData(); + + _p._model.calendarTypeEl().on('change', function (_evt, _flag) { + + var _sp = $(this), + _type = _sp.val(); + + //日期日历类型crm后端用的是day类型,这里作一下转换 + if (_type === 'day') _type = 'date'; + + _p._model.updatemddateElProp(_type); + + /** + *更新日历的类型day/week/season/year + *日历输入框,及隐藏域的值清空 + *打开第一个日历输入框的日历面板 + */ + + if( _type == 'custom' || _type == 'customized' ){ + _p._model.lastIptBox().show(); + }else{ + _p._model.lastIptBox().hide(); + } + + if (_flag) return; + + setTimeout( function () { + _p._model.setmddate(''); + _p._model.setHiddenStartdate(''); + _p._model.setHiddenEnddate(''); + Calendar.pickDate(_p._model.mddateEl().eq(0)[0]); + }, 10); + + }); + + _p._model.mddateEl().eq(0) + .attr('calendarupdate', _updatestartcb) + .attr('calendarshow', _showstartcb) + .attr('calendarhide', _hidestartcb) + .attr('calendarlayoutchange', _layoutchangestartcb) + .attr('calendarclear', _clearstartcb); + + _p._model.mddateEl().eq(1) + .attr('calendarupdate', _updateendcb) + .attr('calendarshow', _showendcb) + .attr('calendarhide', _hideendcb) + .attr('calendarlayoutchange', _layoutchangeendcb) + .attr('calendarclear', _clearendcb); + + window[_updatestartcb] = function (_d, _dend, _ins) { + console.log("_updatestartcb", JC.f.formatISODate(_d), JC.f.formatISODate(_dend)); + var _mddateEl = _p._model.mddateEl(), + _type = _p._model.calendarType(), + _newmaxdate = JC.f.cloneDate(_d), + _curmaxdate = DMultiDate.Model._defaultMaxvalue, + _range; + + _d = JC.f.formatISODate(_d); + _curmaxdate && (_curmaxdate = JC.f.dateDetect(_curmaxdate)); + + switch ( _type ) { + case 'week': + _range = _p._model.weekrange(); + _range && _newmaxdate.setDate( _newmaxdate.getDate() + (_range - 1) * 7 + 6); + break; + + case 'month': + _range = _p._model.monthrange(); + + if (_range) { + _newmaxdate.setMonth( _newmaxdate.getMonth() + (_range - 1) ); + _newmaxdate.setDate(JC.f.maxDayOfMonth(_newmaxdate)); + } + + break; + + case 'season': + //case 'quarter': + _range = _p._model.seasonrange(); + + if (_range) { + _newmaxdate.setMonth( _newmaxdate.getMonth() + (_range - 1) * 3 + 2 ); + _newmaxdate.setDate(JC.f.maxDayOfMonth(_newmaxdate)); + } + + break; + + case 'year': + _range = _p._model.yearrange(); + _range && _newmaxdate.setYear( _newmaxdate.getFullYear() + _range - 1 ); + break; + + case 'custom': + case 'customized': + _range = _p._model.dayrange(); + _range && _newmaxdate.setDate( _newmaxdate.getDate() + _range - 1 ); + break; + + case 'date': + default: + _range = _p._model.dayrange(); + _range && _newmaxdate.setDate( _newmaxdate.getDate() + _range - 1 ); + } + + if ( _range ) { + + if ( _curmaxdate && ( _curmaxdate.getTime() <= _newmaxdate.getTime() ) ) { + _newmaxdate = _curmaxdate; + } + + _mddateEl.eq(1) + .attr('maxvalue', JC.f.formatISODate(_newmaxdate)) + .attr('minvalue', _d) + .attr('defaultdate', _d); + } + _p._model.setHiddenStartdate(_d); + + var _tmpNum = 0; + $.each( _p._model.mddateEl(), function( _i, _item ){ + if( !$( _item ).is(":hidden") ){ + _tmpNum++; + } + } ); + + if ( _tmpNum == 1 ) { + _p._model.setHiddenEnddate(JC.f.formatISODate(_dend)); + } else { + if (!_p._model.mddateEl().eq(1).is('reqmsg') && !_p._model.hiddenEnddateEl().val() ) { + _p._model.setHiddenEnddate(JC.f.formatISODate(_dend)); + } + } + }; + + window[_updateendcb] = function (_d,_dend, _ins) { + var _mddateEl = _p._model.mddateEl(), + _type = _p._model.calendarType(), + _mindate = new Date(_d.getFullYear(), _d.getMonth(), _d.getDate()), + _curmindate = DMultiDate.Model._defaultMinvalue, + _range, + _temp = new Date(_d.getFullYear(), _d.getMonth(), _d.getDate()); + + _curmindate && (_curmindate = JC.f.dateDetect(_curmindate)); + + switch (_type) { + case 'week': + _range = _p._model.weekrange(); + _range && _mindate.setDate( _mindate.getDate() - (_range - 1) * 7 ); + break; + + case 'month': + _range = _p._model.monthrange(); + _range && (_mindate.setMonth( _mindate.getMonth() - (_range - 1) ) && _temp.setDate(JC.f.maxDayOfMonth(_d))); + break; + + case 'season': + //case 'quarter': + _range = _p._model.seasonrange(); + _range && (_mindate.setMonth( _mindate.getMonth() - (_range - 1) * 3 )); + break; + + case 'year': + _range = _p._model.yearrange(); + _range && (_mindate.setYear( _mindate.getFullYear() - _range + 1 )); + break; + + case 'custom': + case 'customized': + _range = _p._model.dayrange(); + _range && _mindate.setDate(_mindate.getDate() - _range + 1 ); + break; + + case 'date': + default: + _range = _p._model.dayrange(); + _range && _mindate.setDate(_mindate.getDate() - _range + 1 ); + } + + if (_range) { + + if ( _curmindate && _curmindate.getTime() > _mindate.getTime() ) { + _mindate = _curmindate; + } + + _mindate = JC.f.formatISODate(_mindate); + _mddateEl.eq(0) + .attr('maxvalue', JC.f.formatISODate(_temp)) + .attr('minvalue', _mindate) + .attr('defaultdate', _mindate); + } + + _p._model.setHiddenEnddate(JC.f.formatISODate(_dend)); + if (!_p._model.mddateEl().eq(0).is('reqmsg') && !_p._model.hiddenStartdateEl().val() ) { + _p._model.setHiddenStartdate(JC.f.formatISODate(_d)); + } + }; + + window[_showstartcb] = function () { + + var _layout = $('body > div.UXCCalendar:visible'); + + _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); + }; + + window[_showendcb] = function () { + var _layout = $('body > div.UXCCalendar:visible'); + + _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); + }; + + window[_hidestartcb] = function () { + JC.Tips && JC.Tips.hide(); + if (!_p._model.hiddendateiso()) { + _p._model.updateHiddenStartdate(); + } + + }; + + window[_hideendcb] = function () { + JC.Tips && JC.Tips.hide(); + if (!_p._model.hiddendateiso()) { + _p._model.updateHiddenEnddate(); + } + }; + + window[_layoutchangestartcb] = function () { + JC.Tips && JC.Tips.hide(); + var _layout = $('body > div.UXCCalendar:visible'); + _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); + }; + + window[_layoutchangeendcb] = function () { + JC.Tips && JC.Tips.hide(); + var _layout = $('body > div.UXCCalendar:visible'); + _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); + }; + + window[_clearstartcb] = function ( _selector, _ins ) { + var _enddateEl = _p._model.mddateEl().eq(1), + _maxdate = DMultiDate.Model._defaultMaxvalue, + _mindate = DMultiDate.Model._defaultMinvalue; + + if ( _maxdate ) { + _enddateEl.attr('maxvalue', _maxdate) + .attr('defaultdate', _maxdate ); + } else { + _enddateEl.removeAttr('maxvalue') + .removeAttr('defaultdate'); + } + + if ( _mindate ) { + _enddateEl.attr('minvalue', _mindate); + } else { + _enddateEl.removeAttr('minvalue'); + } + + }; + + window[_clearendcb] = function () { + var _enddateEl = _p._model.mddateEl().eq(0), + _maxdate = DMultiDate.Model._defaultMaxvalue, + _mindate = DMultiDate.Model._defaultMinvalue; + + if ( _maxdate ) { + _enddateEl.attr('maxvalue', _maxdate); + } else { + _enddateEl.removeAttr('maxvalue'); + } + + if ( _mindate ) { + _enddateEl.attr('minvalue', _mindate) + .attr('defaultdate', _mindate); + } else { + _enddateEl.removeAttr('minvalue') + .removeAttr('defaultdate'); + } + + }; + + window[_parseweekdate] = function (_dateStr) { + _dateStr = $.trim( _dateStr || '' ); + var _r = { start: null, end: null }, _normalDate; + + if( _dateStr ){ + _normalDate = _dateStr.replace( /[^\d]+/g, '' ); + _dateStr = _dateStr.split( 'W' ); + + if ( _normalDate.length === 8 ) { + _r.start = JC.f.parseISODate( _normalDate ); + _r.end = _r.start; + return _r; + } else if( _normalDate.length === 16 ) { + _r.start = JC.f.parseISODate( _normalDate.slice( 0, 8 ) ); + _r.end = JC.f.parseISODate( _normalDate.slice( 8, 16 ) ); + return _r; + } + + var _year, _week, _sdate, _edate, _weeks, _date + + _year = parseInt( _dateStr[0], 10 ); + _week = parseInt( _dateStr[1], 10 ); + _sdate = JC.f.pureDate( new Date( _dateStr[0] ), 0, 1 ); + _edate = JC.f.pureDate( new Date( _dateStr[1] ), 0, 1 ); + _weeks = _weeks || JC.f.weekOfYear( _dateStr[0], JC.Calendar.weekDayOffset ); + + $( _weeks ).each( function( _ix, _item ){ + if( _item.week === _week ){ + _r.start = new Date(); + _r.end = new Date(); + + _r.start.setTime( _item.start ); + _r.end.setTime( _item.end ); + return false; + } + }); + } + + return _r; + }; + + window[_parsemonthdate] = function (_dateStr) { + + _dateStr = $.trim( _dateStr || '' ); + + var _r = { start: null, end: null }, + _normalDate; + + if( _dateStr ){ + _normalDate = _dateStr.replace( /[^\d]+/g, '' ); + _dateStr = _dateStr.replace( /[^\d]+/g, '' ); + + if( _normalDate.length === 8 ){ + _r.start = JC.f.parseISODate( _normalDate ); + _r.end = _r.start; + return _r; + }else if( _normalDate.length === 16 ){ + _r.start = JC.f.parseISODate( _normalDate.slice( 0, 8 ) ); + _r.end = JC.f.parseISODate( _normalDate.slice( 8, 16 ) ); + return _r; + } + + var _year = _dateStr.slice( 0, 4 ), + _month = parseInt( _dateStr.slice( 4, 6 ), 10 ) - 1; + + _r.start = new Date( _year, _month, 1 ); + _r.end = JC.f.cloneDate(_r.start); + _r.end.setDate(JC.f.maxDayOfMonth(_r.start)); + } + + return _r; + }; + + window[_parseseasondate] = function (_dateStr) { + _dateStr = $.trim( _dateStr || '' ); + var _r = { start: null, end: null }, _normalDate; + + if( _dateStr ){ + _normalDate = _dateStr.replace( /[^\d]+/g, '' ); + _dateStr = _dateStr.split( 'Q' ); + + if( _normalDate.length === 8 ){ + _r.start = JC.f.parseISODate( _normalDate ); + _r.end = _r.start; + return _r; + }else if( _normalDate.length === 16 ){ + _r.start = JC.f.parseISODate( _normalDate.slice( 0, 8 ) ); + _r.end = JC.f.parseISODate( _normalDate.slice( 8, 16 ) ); + return _r; + } + + var _year = parseInt( _dateStr[0], 10 ), _season = parseInt( _dateStr[1], 10 ) + , _sdate = JC.f.pureDate( new Date( _dateStr[0] ), 0, 1 ) + , _edate = JC.f.pureDate( new Date( _dateStr[1] ), 0, 1 ) + , _seasons = JC.f.seasonOfYear( _dateStr[0] ) + ; + + $( _seasons ).each( function( _ix, _item ){ + if( _item.season === _season ){ + _r.start = new Date(); + _r.end = new Date(); + + _r.start.setTime( _item.start ); + _r.end.setTime( _item.end ); + return false; + } + }); + } + + return _r; + }; + + window[_parseyeardate] = function (_dateStr) { + _dateStr = $.trim( _dateStr || '' ); + var _r = { start: null, end: null }, _year; + + if( _dateStr ){ + _dateStr = _dateStr.replace( /[^\d]+/g, '' ); + _year = _dateStr.slice( 0, 4 ); + _r.start = new Date( _year, 0, 1 ); + } + + if( !_r.start ){ + _r.start = new Date(); + _r.end = new Date(); + } + return _r; + }; + + _p._model.calendarTypeEl().trigger( 'change', [ true ] ); + + }, + + _initDefaultData: function () { + + if( this._model.mcIgnoreUrlFill() ){ + return; + } + + var _p = this, + _startdate = _p._model.urlStartdate() || _p._model.mddateEl().eq(0).val(), + _enddate = _p._model.urlEnddate() || _p._model.mddateEl().eq(1).val(), + _type = _p._model.urlCalendarType() || _p._model.calendarType() + ; + + _p._model.calendarTypeEl().val(_type); + _p._model.updatemddateElProp(_type); + + setTimeout(function () { + _p._model.setmddate( _startdate, _enddate ); + _p._model.setHiddenStartdate(_startdate); + _p._model.setHiddenEnddate(_enddate); + }, 200); + + }, + + _inited:function () { + //JC.log( 'DMultiDate _inited', new Date().getTime() ); + } + } + + /** + * 获取或设置 DMultiDate 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {DMultiDateInstance} + */ + DMultiDate.getInstance = function ( _selector, _setter ) { + if( typeof _selector == 'string' && !/select'); + }, + + mcIgnoreUrlFill: function() { + return this.boolProp( 'mdIgnoreUrlFill' ); + }, + + calendarType: function () { + return this.calendarTypeEl().val(); + }, + + mddateEl: function () { + var _p = this, + _el = _p.attrProp('mddateEl') || '.js_multidate'; + + return _p.selector().find(_el); + }, + + setmddate: function (_starttime, _endtime) { + var _el = this.mddateEl(); + + _starttime && ( _starttime = JC.f.dateFormat( JC.f.dateDetect( _starttime ), _el.eq(0).attr( 'dateformat' ) ) ); + _endtime && ( _endtime = JC.f.dateFormat( JC.f.dateDetect( _endtime ), _el.eq(1).attr( 'dateformat' ) ) ); + + _el.eq(0).val(_starttime); + _el.eq(1).val(_endtime); + }, + + updatemddateElProp: function (_setter) { + var _p = this, + _el = _p.mddateEl(); + + //_setter && ( _setter.toLowerCase() == 'quarter' ) && ( _setter = 'season' ); + + _el.attr('multidate', _setter); + + if (_setter === 'date') { + _el.removeAttr('dateparse') + .removeAttr('dateformat') + .removeAttr('fulldateformat'); + } else { + _el.eq(0).attr('fulldateformat', '{0}'); + _el.eq(1).attr('fulldateformat', '{0}'); + + _el.attr('dateformat', _p.dateformartType(_setter)) + .attr('dateparse', 'parsedate' + _setter); + } + + if ( DMultiDate.Model._defaultMinvalue ) { + _el.attr('minvalue', DMultiDate.Model._defaultMinvalue) + } else { + _el.removeAttr('minvalue'); + } + + if ( DMultiDate.Model._defaultMaxvalue ) { + _el.attr('maxvalue', DMultiDate.Model._defaultMaxvalue) + .attr('defaultdate', DMultiDate.Model._defaultMaxvalue); + } else { + _el.removeAttr('maxvalue').removeAttr('defaultdate'); + } + + }, + + dateformartType: function (_setter) { + var _r; + + switch (_setter) { + case 'week': + _r = 'YYWWK'; + break; + case 'month': + _r = 'YY-MM'; + break; + case 'season': + //case 'quarter': + _r = 'YYQYQ'; + break; + case 'year': + _r = 'YY'; + break; + case 'date': + default: + _r = ''; + } + + return _r; + }, + + hiddenStartdateEl: function () { + var _p = this, + _el = _p.attrProp('mdstartdate') || '.js_startdate'; + + return _p.selector().find(_el); + }, + + hiddenEnddateEl: function () { + var _p = this, + _el = _p.attrProp('mdenddate') || '.js_enddate'; + + return _p.selector().find(_el); + }, + + setHiddenStartdate: function (_date) { + var _p = this, _old = _date; + if( _date ){ + _date = JC.f.parseDate( _date, _p.mddateEl().first() ); + _date && ( _date = JC.f.dateFormat( _date, _p.hiddendateiso() ? '' : _p.mddateEl().first().attr( 'dateformat' ) ) ); + !_date && ( _date = _old ); + } + _p.hiddenStartdateEl().val(_date); + }, + + setHiddenEnddate: function (_date) { + var _p = this, _old = _date; + if( _date ){ + _date = JC.f.parseDate( _date, _p.mddateEl().first() ); + _date && ( _date = JC.f.dateFormat( _date, _p.hiddendateiso() ? '' : _p.mddateEl().first().attr( 'dateformat' ) ) ); + !_date && ( _date = _old ); + } + _p.hiddenEnddateEl().val(_date); + }, + + updateHiddenStartdate: function () { + var _p = this, + _date = _p.mddateEl().eq(0).val(); + + if ( !_date ) { + _p.setHiddenStartdate(''); + return; + } + + _p.setHiddenStartdate(_date); + }, + + updateHiddenEnddate: function () { + var _p = this, + _date = _p.mddateEl().eq(1).val(); + + if ( !_date ) { + _p.setHiddenEnddate(''); + return; + } + + _p.setHiddenEnddate(_date); + }, + + urlCalendarType: function () { + var _p = this; + + //需要转为小写 + + return _p.decodedata( JC.f.getUrlParam(_p.calendarTypeEl().attr('name') || '') || '' ).toLowerCase(); + }, + + urlStartdate: function () { + var _p = this; + + //不能转为小写 + + return _p.decodedata( JC.f.getUrlParam(_p.hiddenStartdateEl().attr('name') || '') || ''); + }, + + urlEnddate: function () { + var _p = this; + + //不能转为小写 + + return _p.decodedata( JC.f.getUrlParam(_p.hiddenEnddateEl().attr('name') || '') || '' ); + }, + + decodedata: function ( _d ) { + _d = _d.replace( /[\+]/g, ' ' ); + + //这里取url参数需要转码 + try { + _d = decodeURIComponent( _d ); + } catch (ex) { + + } + + return _d; + }, + + dayrange: function () { + return this.intProp('mddayrange'); + }, + + weekrange: function () { + return this.intProp('mdweekrange'); + },  + + monthrange: function () { + return this.intProp('mdmonthrange'); + }, + + seasonrange: function () { + return this.intProp('mdseasonrange'); + }, + + yearrange: function () { + return this.intProp('mdyearrange'); + }, + + hiddendateiso: function () { + return this.boolProp('hiddendateiso'); + } + + }; + + BaseMVC.buildView( DMultiDate ); + DMultiDate.View.prototype = { + init: function () { + return this; + } + }; + + BaseMVC.build( DMultiDate, 'Bizs' ); + + $(document).ready( function(){ + + JC.f.safeTimeout( function(){ + $('.js_autoDMultiDate').each( function(){ + new DMultiDate( $(this) ); + }); + }, null, 'DMultiDatesdfasd', 50 ); + + }); + + return Bizs.DMultiDate; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/DMultiDate/_demo/crm.example.html b/bizs/DMultiDate/_demo/crm.example.html new file mode 100755 index 000000000..6d6780789 --- /dev/null +++ b/bizs/DMultiDate/_demo/crm.example.html @@ -0,0 +1,273 @@ + + + + + 360 75 team + + + + + + + + +





+
+
+
JC.Calendar CRM 示例
+
+
+ + + + + + +
+ + + +
+
+
+
+ +
+
+
+ +
+
JC.Calendar CRM 示例
+
+
+ + + + + + +
+ + + +
+
+ + + diff --git a/bizs/DMultiDate/_demo/index.php b/bizs/DMultiDate/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/DMultiDate/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/DMultiDate/index.php b/bizs/DMultiDate/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/bizs/DMultiDate/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/DisableLogic/DisableLogic.js b/bizs/DisableLogic/DisableLogic.js old mode 100644 new mode 100755 index 0b485c185..0c1485817 --- a/bizs/DisableLogic/DisableLogic.js +++ b/bizs/DisableLogic/DisableLogic.js @@ -1,10 +1,14 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ /** + *

这个应用将不再维护, 请使用 Bizs.ChangeLogic

*

Form Control禁用启用逻辑

*
应用场景
*
表单操作时, 选择某个 radio 时, 对应的 内容有效, *
但选择其他 radio 时, 其他的内容无效 *
checkbox / select 也可使用( 带change事件的标签 ) - * + *

require: + * JC.BaseMVC + *

*

JC Project Site * | API docs * | demo link

@@ -25,28 +29,28 @@ *
dldonecallback = function
*
* 启用/禁用后会触发的回调, window 变量域 -function dldonecallback( _triggerItem, _boxItem ){ +<pre>function dldonecallback( _triggerItem, _boxItem ){ var _ins = this; JC.log( 'dldonecallback', new Date().getTime() ); -} +} *
* *
dlenablecallback = function
*
* 启用后的回调, window 变量域 -function dlenablecallback( _triggerItem, _boxItem ){ +<pre>function dlenablecallback( _triggerItem, _boxItem ){ var _ins = this; JC.log( 'dlenablecallback', new Date().getTime() ); -} +} *
* *
dldisablecallback = function
*
* 禁用后的回调, window 变量域 -function dldisablecallback( _triggerItem, _boxItem ){ +<pre>function dldisablecallback( _triggerItem, _boxItem ){ var _ins = this; JC.log( 'dldisablecallback', new Date().getTime() ); -} +} *
* * @@ -67,8 +71,11 @@ * *

hide target 的 HTML 属性

*
- *
dlhidetoggle = bool
+ *
dlhidetoggle = bool, false
*
显示或显示的时候, 是否与他项相反
+ * + *
dlDisableToggle = bool, default = false
+ *
disabled 的时候, 是否与他项相反
*
* * @namespace window.Bizs @@ -96,9 +103,8 @@ /> */ -;(function($){ - window.Bizs.DisableLogic = DisableLogic; + JC.f.addAutoInit && JC.f.addAutoInit( DisableLogic ); function DisableLogic( _selector ){ if( DisableLogic.getInstance( _selector ) ) return DisableLogic.getInstance( _selector ); @@ -124,7 +130,7 @@ }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ).slice( 2 ); + var _data = JC.f.sliceArgs( arguments ).slice( 2 ); _p.trigger( _evtName, _data ); }); @@ -235,7 +241,7 @@ , dltrigger: function( _curItem ){ - var _p = this, _r = parentSelector( this.selector(), this.selector().attr('dltrigger') ), _tmp; + var _p = this, _r = JC.f.parentSelector( this.selector(), this.selector().attr('dltrigger') ), _tmp; if( _curItem ){ _r.each( function(){ _tmp = $(this); @@ -253,13 +259,13 @@ var _p = this, _r, _tmp; _p.selector().attr('dltarget') - && ( _r = parentSelector( _p.selector(), _p.selector().attr('dltarget') ) ) + && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('dltarget') ) ) ; _triggerItem && ( _triggerItem = $(_triggerItem) ).length && _triggerItem.attr('dltrigger') - && ( _r = parentSelector( _triggerItem, _triggerItem.attr('dltarget') ) ) + && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('dltarget') ) ) ; return _r; } @@ -270,7 +276,7 @@ _triggerItem && ( _triggerItem = $( _triggerItem ) ).length && _triggerItem.is( '[dldisable]' ) - && ( _r = parseBool( _triggerItem.attr('dldisable') ) ) + && ( _r = JC.f.parseBool( _triggerItem.attr('dldisable') ) ) ; if( _triggerItem.prop('nodeName').toLowerCase() == 'input' && _triggerItem.attr('type').toLowerCase() == 'checkbox' ){ @@ -285,12 +291,12 @@ if( !_triggerItem.is('[dldisplay]') ){ ( _triggerItem = $( _triggerItem ) ).length && _triggerItem.is( '[dldisable]' ) - && ( _r = !parseBool( _triggerItem.attr('dldisable') ) ) + && ( _r = !JC.f.parseBool( _triggerItem.attr('dldisable') ) ) ; }else{ ( _triggerItem = $( _triggerItem ) ).length && _triggerItem.is( '[dldisplay]' ) - && ( _r = parseBool( _triggerItem.attr('dldisplay') ) ) + && ( _r = JC.f.parseBool( _triggerItem.attr('dldisplay') ) ) ; } @@ -306,13 +312,13 @@ var _p = this, _r, _tmp; _p.selector().attr('dlhidetarget') - && ( _r = parentSelector( _p.selector(), _p.selector().attr('dlhidetarget') ) ) + && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('dlhidetarget') ) ) ; _triggerItem && ( _triggerItem = $(_triggerItem) ).length && _triggerItem.attr('dlhidetarget') - && ( _r = parentSelector( _triggerItem, _triggerItem.attr('dlhidetarget') ) ) + && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('dlhidetarget') ) ) ; return _r; } @@ -321,7 +327,15 @@ function( _hideTarget ){ var _r; _hideTarget && _hideTarget.is( '[dlhidetoggle]' ) - && ( _r = parseBool( _hideTarget.attr('dlhidetoggle') ) ); + && ( _r = JC.f.parseBool( _hideTarget.attr('dlhidetoggle') ) ); + return _r; + } + + , dlDisableToggle: + function( _target ){ + var _r; + _target && _target.is( '[dlDisableToggle]' ) + && ( _r = JC.f.parseBool( _target.attr('dlDisableToggle') ) ); return _r; } @@ -388,7 +402,7 @@ ; if( _triggerItem.is( '[dlhidetargetsub]' ) ){ - var _starget = parentSelector( _triggerItem, _triggerItem.attr( 'dlhidetargetsub' ) ); + var _starget = JC.f.parentSelector( _triggerItem, _triggerItem.attr( 'dlhidetargetsub' ) ); if( _starget && _starget.length ){ if( _triggerItem.prop('checked') ){ _starget.show(); @@ -401,11 +415,15 @@ if( _dlTarget && _dlTarget.length ){ _dlTarget.each( function(){ var _sp = $( this ); - _sp.attr('disabled', _isDisable); + if( _p._model.dlDisableToggle( _sp ) ){ + _sp.attr('disabled', !_isDisable); + }else{ + _sp.attr('disabled', _isDisable); + } JC.Valid && JC.Valid.setValid( _sp ); if( _sp.is( '[dlhidetargetsub]' ) ){ - var _starget = parentSelector( _sp, _sp.attr( 'dlhidetargetsub' ) ); + var _starget = JC.f.parentSelector( _sp, _sp.attr( 'dlhidetargetsub' ) ); if( !( _starget && _starget.length ) ) return; if( _isDisable ){ _starget.hide(); @@ -447,4 +465,13 @@ }, 10); }); -}(jQuery)); + return Bizs.DisableLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/DisableLogic/_demo/demo.dlhidetargetsub.html b/bizs/DisableLogic/_demo/demo.dlhidetargetsub.html old mode 100644 new mode 100755 diff --git a/bizs/DisableLogic/_demo/demo.html b/bizs/DisableLogic/_demo/demo.html old mode 100644 new mode 100755 diff --git a/bizs/DisableLogic/_demo/index.php b/bizs/DisableLogic/_demo/index.php old mode 100644 new mode 100755 diff --git a/bizs/DisableLogic/index.php b/bizs/DisableLogic/index.php old mode 100644 new mode 100755 diff --git a/bizs/DropdownTree/DropdownTree.js b/bizs/DropdownTree/DropdownTree.js new file mode 100755 index 000000000..c836948f4 --- /dev/null +++ b/bizs/DropdownTree/DropdownTree.js @@ -0,0 +1,432 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Tree' ], function(){ +/** + * 树菜单 形式模拟下拉框 + * + *

require: + * JC.BaseMVC + * , JC.Tree + *

+ * + *

JC Project Site + * | API docs + * | demo link

+ * + *

页面只要引用本脚本, 默认会自动处理 div class="js_bizDropdownTree"

+ * + *

可用的 HTML attribute

+ * + *
+ *
bdtData = json, window 变量域
+ *
+ * 初始化的数据变量名 + *
数据格式:
+ *
+ *
            {
+ *                  root: [ id, label ]
+ *                  data: {
+ *                      id: [ [id, label], [id, label]... ] 
+ *                      , id: [ [id, label], [id, label]... ]...
+ *                  }
+ *              }
+ *
+ *
+ *
+ * + *
bdtDefaultLabel = string
+ *
用于显示的 默认 label
+ * + *
bdtDefaultValue = string
+ *
默认选中 ID
+ * + *
bdtLabel = selector, default = "|.bdtLabel"
+ *
树的 label
+ * + *
bdtInput = selector, default = "|.bdtInput"
+ *
保存树 ID的 input
+ * + *
bdtTreeBox = selector, default = "|.bdtTreeBox"
+ *
树的 node
+ *
+ * + * @namespace window.Bizs + * @class DropdownTree + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +
+ + + +
+
+ */ + Bizs.DropdownTree = DropdownTree; + + function DropdownTree( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, DropdownTree ) ) + return JC.BaseMVC.getInstance( _selector, DropdownTree ); + + JC.BaseMVC.getInstance( _selector, DropdownTree, this ); + + this._model = new DropdownTree.Model( _selector ); + this._view = new DropdownTree.View( this._model ); + + this._init(); + + JC.log( DropdownTree.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 DropdownTree 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of DropdownTreeInstance} + */ + DropdownTree.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector && _selector.length ){ + if( _selector.hasClass( 'js_bizDropdownTree' ) ){ + _r.push( new DropdownTree( _selector ) ); + }else{ + _selector.find( 'div.js_bizDropdownTree' ).each( function(){ + _r.push( new DropdownTree( this ) ); + }); + } + } + return _r; + }; + + BaseMVC.build( DropdownTree ); + + JC.f.extendObject( DropdownTree.prototype, { + _beforeInit: + function(){ + //JC.log( 'DropdownTree _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + _p.on( 'DropdownTreeSelected', function( _evt, _id, _name, _triggerSelector ){ + _p.hide(); + }); + + _p.on( 'INITED', function(){ + _p.update(); + }); + + _p.on( 'INITED_STATUS', function( _evt, _userId ){ + var _selectedId = _p._model.bdtInput().val().trim() + , _treeItem + ; + + typeof _userId != 'undefined' && ( _selectedId = _userId ); + + _p._model.bdtInput().is( '[name]' ) + && ( _selectedId = JC.f.getUrlParam( _p._model.bdtInput().attr('name') ) || _selectedId ); + + _selectedId && ( _treeItem = _p._model.treeIns().getItem( _selectedId ) ); + + if( !(_selectedId && _treeItem && _treeItem.length ) ){ + if( _p._model.is( '[bdtDefaultLabel]' ) ){ + _p._model.bdtLabel().html( _p._model.bdtDefaultLabel() ); + } + + if( _p._model.is( '[bdtDefaultValue]' ) ){ + _p._model.bdtInput().val( _p._model.bdtDefaultValue() ); + _selectedId = _p._model.bdtDefaultValue(); + } + } + + //JC.log( _selectedId ); + _selectedId + && _p._model.bdtLabel().html( _p._model.treeIns().getItem( _selectedId ).attr( 'dataname' ) ) + && ( _p._model.bdtInput().val( _selectedId ) + , _p._model.treeIns().selectedItem( _p._model.treeIns().getItem( _selectedId ) ) + ) + ; + }); + + _p.on( 'CLEAR_STATUS', function(){ + _p._model.bdtInput().val( '' ); + _p._model.bdtLabel().html( '' ); + }); + + } + + , _inited: + function(){ + //JC.log( 'DropdownTree _inited', new Date().getTime() ); + this.trigger( 'INITED' ); + } + /** + * 显示 树弹框 + * @method show + */ + , show: function(){ this._view.show(); return this; } + /** + * 隐藏 树弹框 + * @method hide + */ + , hide: function(){ this._view.hide(); return this; } + /** + * 显式/隐藏 树弹框 + * @method toggle + */ + , toggle: function(){ this._view.toggle(); return this; } + /** + * 更新树菜单数据 + * @method update + * @param {json} _data + * @param {string} _selectedId + */ + , update: + function( _data, _selectedId ){ + //this.clear(); + var _isReload; + _data && ( _isReload = true ); + _isReload && this.trigger( 'CLEAR_STATUS' ); + this._view.update( _data, _isReload ); + this.trigger( 'INITED_STATUS', [ _selectedId ] ); + return this; + } + /** + * 清除选择数据 + * @method clear + */ + , clear: + function(){ + var _p = this; + if( _p._model.is( '[bdtDefaultLabel]' ) ){ + _p._model.bdtLabel().html( _p._model.bdtDefaultLabel() ); + }else{ + _p._model.bdtLabel().html( '' ); + } + + if( _p._model.is( '[bdtDefaultValue]' ) ){ + _p._model.bdtInput().val( _p._model.bdtDefaultValue() ); + }else{ + _p._model.bdtInput().val( '' ); + } + return this; + } + /** + * 获取选中的 label + * @method label + * @return string + */ + , label: function(){ return this._model.bdtLabel(); } + /** + * 获取或设置 选中的 id + * @method val + * @param {string} _nodeId + * @return {string of id} + */ + , val: + function( _nodeId ){ + typeof _nodeId != 'undefined' && this.getItem( _nodeId ).trigger( 'click' ); + return this._model.bdtInput().val(); + } + }); + + DropdownTree.Model._instanceName = 'DropdownTreeIns'; + JC.f.extendObject( DropdownTree.Model.prototype, { + init: + function(){ + //JC.log( 'DropdownTree.Model.init:', new Date().getTime() ); + } + + , bdtData: function(){ return this.windowProp( 'bdtData' ) || {}; } + + , bdtDefaultLabel: function(){ return this.attrProp( 'bdtDefaultLabel' ) } + , bdtDefaultValue: function(){ return this.attrProp( 'bdtDefaultValue' ) } + + , bdtTreeBox: + function(){ + var _r = this.selector().find( '> .bdtTreeBox' ); + return _r; + } + + , bdtLabel: + function(){ + var _r = this.selector().find( '> .bdtLabel' ); + return _r; + } + + , bdtInput: + function(){ + var _r = this.selector().find( '> .bdtInput' ); + return _r; + } + + , treeIns: + function( _setter ){ + this._treeIns = _setter || JC.Tree.getInstance( this.bdtTreeBox() ); + return this._treeIns; + } + }); + + JC.f.extendObject( DropdownTree.View.prototype, { + init: + function(){ + //JC.log( 'DropdownTree.View.init:', new Date().getTime() ); + } + + , update: + function( _data, _isReload ){ + var _p = this; + _data = _data || _p._model.bdtData(); + + if( _isReload ){ + } + + if( ( !_p._model.treeIns() ) || _isReload ){ + _p._model.bdtTreeBox().html(''); + _p._model.bdtTreeBox().data( JC.Tree.Model._instanceName , null ); + _p._model.treeIns( new JC.Tree( _p._model.bdtTreeBox(), _data ) ); + + _p._model.treeIns().on( 'click', function(){ + var _sp = $(this) + , _dataid = _sp.attr('dataid') + , _dataname = _sp.attr('dataname'); + + _p._model.bdtLabel().html( _dataname ); + _p._model.bdtInput().val( _dataid ); + + $( _p ).trigger( 'TriggerEvent', [ 'DropdownTreeSelected', _dataid, _dataname, _sp ] ); + }); + + _p._model.treeIns().on( 'RenderLabel', function( _data ){ + var _node = $(this); + _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) ); + }); + + _p._model.treeIns().init(); + _p._model.treeIns().open(); + } + } + + , show: + function(){ + var _p = this; + JC.f.safeTimeout( setTimeout( function(){}, 50), _p._model.selector(), 'DropdownTreeUi' ); + _p.updateZIndex(); + _p._model.selector().addClass( 'bdtBox-active' ); + _p._model.bdtTreeBox().show(); + _p._model.bdtTreeBox().css( { 'z-index': ZINDEX_COUNT++ } ); + } + + , hide: + function(){ + var _p = this; + _p._model.bdtTreeBox().hide(); + JC.f.safeTimeout( setTimeout( function(){ + _p._model.selector().removeClass( 'bdtBox-active' ); + }, 50), _p._model.selector(), 'DropdownTreeUi' ); + } + + , toggle: + function(){ + this.updateZIndex(); + + if( this._model.bdtTreeBox().is( ':visible' ) ){ + this.hide(); + }else{ + this.show(); + } + } + + , updateZIndex: + function(){ + this._model.bdtTreeBox().css( { 'z-index': ZINDEX_COUNT++ } ); + } + }); + /** + * 选择树节点时触发的事件 + * @event DropdownTreeSelected + * @param {object} _evt + * @param {string} _id + * @param {string} _name + * @param {selector} _triggerSelector + * @example + $( 'div.js_bizDropdownTree' ).each( function(){ + var _ins = JC.BaseMVC.getInstance( $(this), Bizs.DropdownTree ); + _ins + && _ins.on( 'DropdownTreeSelected', function( _evt, _id, _name, _triggerSelector ){ + JC.log( [ _evt, _id, _name ] ); + }); + }); + */ + + JC.Tree.dataFilter = JC.Tree.dataFilter || + function( _data ){ + var _r = {}; + + if( _data && _data.root && _data.root.length > 2 ){ + _data.root.shift(); + _r.root = _data.root; + _r.data = {}; + for( var k in _data.data ){ + _r.data[ k ] = []; + for( var i = 0, j = _data.data[k].length; i < j; i++ ){ + if( _data.data[k][i].length < 3 ) { + _r.data[k].push( _data.data[k][i] ); + continue; + } + _data.data[k][i].shift(); + _r.data[k].push( _data.data[k][i] ); + } + } + }else{ + _r = _data; + } + return _r; + }; + + $(document).ready( function(){ + var _insAr = 0; + DropdownTree.autoInit + && ( _insAr = DropdownTree.init() ) + ; + }); + + $(document).delegate( 'div.js_bizDropdownTree', 'click', function( _evt ){ + var _p = $(this), _ins; + + JC.f.safeTimeout( function(){ + _ins = JC.BaseMVC.getInstance( _p, DropdownTree ); + !_ins && ( _ins = new DropdownTree( _p ) ); + _ins.toggle(); + JC.log( 'div.js_bizDropdownTree click', new Date().getTime() ); + }, _p, 'DropdownTreeClick', 50 ); + }); + + $(document).click( function(){ + $( 'div.js_bizDropdownTree' ).each( function(){ + var _ins = JC.BaseMVC.getInstance( $(this), DropdownTree ); + _ins && _ins.hide(); + }); + }); + + $(document).delegate( 'div.js_bizDropdownTree > .bdtTreeBox', 'click', function( _evt ){ + _evt.stopPropagation(); + }); + + return Bizs.DropdownTree; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/DropdownTree/_demo/demo.filterData.html b/bizs/DropdownTree/_demo/demo.filterData.html new file mode 100755 index 000000000..ad69d2742 --- /dev/null +++ b/bizs/DropdownTree/_demo/demo.filterData.html @@ -0,0 +1,61 @@ + + + + + Bizs.DropdownTree 0.1 + + + + + + + + +

Bizs.DropdownTree 示例

+
+
+
+
+ + 销售二组 + +
+
+
+ +
+
+
+ + + +
+
+
+ +
+ + diff --git a/bizs/DropdownTree/_demo/demo.html b/bizs/DropdownTree/_demo/demo.html new file mode 100755 index 000000000..eb606161a --- /dev/null +++ b/bizs/DropdownTree/_demo/demo.html @@ -0,0 +1,103 @@ + + + + + Bizs.DropdownTree 0.1 + + + + + + + + +

Bizs.DropdownTree 示例

+ +
+
+
+
+
+ + 销售二组 + +
+
+
+ +
+
+ + + +
+
+
+ + +
+
+
+ + + +
+
+
+ +
+
+
+ + 请选择 + +
+
+
+ + +
+
+
+ + + +
+
+
+ +
+
+ + + back +
+
+ + diff --git a/bizs/DropdownTree/_demo/index.php b/bizs/DropdownTree/_demo/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/bizs/DropdownTree/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/DropdownTree/index.php b/bizs/DropdownTree/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/bizs/DropdownTree/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/DropdownTree/res/default/index.php b/bizs/DropdownTree/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/bizs/DropdownTree/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/DropdownTree/res/default/style.css b/bizs/DropdownTree/res/default/style.css new file mode 100755 index 000000000..9bdd755b3 --- /dev/null +++ b/bizs/DropdownTree/res/default/style.css @@ -0,0 +1,101 @@ +.bdtBox{ + width: 260px; + height: 19px; + overflow: hidden; + border: 1px solid #ccc; + padding: 1px 1px 0; + margin: 0; + background: #fff; + position: relative; +} + +.bdtBox-active{ + overflow: visible; +} + +.bdtBox .bdtLabel{ + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0 0 3px; + margin: 0; + line-height: 18px; + color: #444; + margin-right: 20px; + cursor: pointer; +} + +.bdtBox .bdtIcon{ + position: absolute; + display: block; + right: 1px; + top: 1px; + width: 17px; + height: 18px; + background: url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat; + overflow: hidden; + padding: 0; + margin: 0; + font-size: 0; + line-height: 0; + float: right; +} + +.bdtBox:hover .bdtIcon{ + background-position: 0 -18px; +} + +.bdtBox-disabled{ + border: 1px solid #ddd; + background: #f0f0f0; +} + +.bdtBox-disabled .bdtLabel{ + color: #666; + cursor: default; +} + +.bdtBox-disabled:hover .bdtIcon{ + background-position: 0 0; +} + +.bdtBox-disabled .bdtIcon{ + filter: alpha(opacity=70); + opacity: 0.7; +} + +.bdtTreeBox{ + display: none; + background: #fff; + width: 100%; + border: 1px solid #ccc; + position: absolute; + left: -1px; + top: 19px; + overflow-x: auto; +} + +.bdtTreeBox .tree_wrap{ + padding-top: 4px!important; +} + +/* +.bdtTreeIcon{ + position: absolute; + border: 1px solid #ddd; + width: 262px; + min-height: 100px; + _height: 100px; + top: 200px; + left: 200px; + background: #fff; + display: none; + margin: 0; +} + +.bdtTreeIcon .tree-wrap{ + padding-top: 4px; +} +*/ + diff --git a/bizs/DropdownTree/res/index.php b/bizs/DropdownTree/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/bizs/DropdownTree/res/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/FormLogic/FormLogic.js b/bizs/FormLogic/FormLogic.js old mode 100644 new mode 100755 index 134092b17..9972c79c1 --- a/bizs/FormLogic/FormLogic.js +++ b/bizs/FormLogic/FormLogic.js @@ -1,18 +1,23 @@ //TODO: 添加 disabled bind hidden 操作 -;(function($){ +//TODO: formSubmitIgnoreCheck 时, 如果在控件里回车提交的话, 控制逻辑可能会有问题, 需要仔细检查 +;(function(define, _win) { 'use strict'; define( 'Bizs.FormLogic', [ 'JC.BaseMVC', 'JC.Valid', 'JC.Panel', 'JC.FormFillUrl' ], function(){ /** *

提交表单控制逻辑

* 应用场景 *
get 查询表单 *
post 提交表单 *
ajax 提交表单 + *

require: + * JC.BaseMVC + * , JC.Valid + * , JC.Panel + *

+ *

optional: + * JC.FormFillUrl + *

*

JC Project Site * | API docs * | demo link

- * require: jQuery - *
require: JC.Valid - *
require: JC.Form - *
require: JC.Panel * *

页面只要引用本文件, 默认会自动初始化 from class="js_bizsFormLogic" 的表单

*

Form 可用的 HTML 属性

@@ -20,7 +25,7 @@ *
formType = string, default = get
*
* form 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性 - *
类型有: get, post, ajax + *
类型有: get, post, ajax, jsonp *
* *
formSubmitDisable = bool, default = true
@@ -29,39 +34,52 @@ *
formResetAfterSubmit = bool, default = true
*
表单提交后, 是否重置内容
* - *
formBeforeProcess = function
+ *
formBeforeProcess = function, window 变量域
*
- * 表单开始提交时且没开始验证时, 触发的回调, window 变量域 -function formBeforeProcess( _evt, _ins ){ + * 表单开始提交时且没开始验证时, 触发的回调 +<pre>function formBeforeProcess( _evt, _ins ){ var _form = $(this); JC.log( 'formBeforeProcess', new Date().getTime() ); //return false; -} +} *
* - *
formProcessError = function
+ *
formProcessError = function, window 变量域
*
- * 提交时, 验证未通过时, 触发的回调, window 变量域 -function formProcessError( _evt, _ins ){ + * 提交时, 验证未通过时, 触发的回调 +<pre>function formProcessError( _evt, _ins ){ var _form = $(this); JC.log( 'formProcessError', new Date().getTime() ); //return false; -} +} *
* - *
formAfterProcess = function
+ *
formAfterProcess = function, window 变量域
*
- * 表单开始提交时且验证通过后, 触发的回调, window 变量域 -function formAfterProcess( _evt, _ins ){ + * 表单开始提交时且验证通过后, 触发的回调 +<pre>function formAfterProcess( _evt, _ins ){ var _form = $(this); JC.log( 'formAfterProcess', new Date().getTime() ); //return false; -} +} *
* - *
formConfirmPopupType = string, default = dialog
+ *
formBeforeSubmit = function, window 变量域
+ *
+ * 表单开始发送数据到服务器之前的回调 +
function formBeforeSubmit( _evt, _ins ){
+    var _form = $(this);
+    JC.log( 'formBeforeSubmit', new Date().getTime() );
+    //return false;
+}
+ *
+ * + *
formPopupType = string, default = dialog
*
定义提示框的类型: dialog, popup
* + *
formConfirmPopupType = string, default = dialog
+ *
定义确认提示框的类型: dialog, popup
+ * *
formResetUrl = url
*
表单重置时, 返回的URL
* @@ -84,7 +102,7 @@ *
* AJAX 提交完成后的回调, window 变量域 *
如果没有显式声明, FormLogic将自行处理 -function formAjaxDone( _json, _submitButton, _ins ){ +<pre>function formAjaxDone( _json, _submitButton, _ins ){ var _form = $(this); JC.log( 'custom formAjaxDone', new Date().getTime() ); @@ -92,14 +110,44 @@ _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); }else{ _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){ - reloadPage( "?donetype=custom" ); + JC.f.reloadPage( "?donetype=custom" ); }); } -}; +}; *
* *
formAjaxDoneAction = url
*
声明 ajax 提交完成后的返回路径, 如果没有, 提交完成后将不继续跳转操作
+ * + *
formJsonpCb = function, default = FormLogic#_model._innerJsonpCb
+ *
自定义 JSOPN 处理回调, window 变量域 +
function customFormJsonpCb( _data, _info ){
+    if( !( _data && _info ) ) return;
+
+    var _frm = $( 'form.' + _info ), _ins;
+    if( !_frm.length ) return;
+    _ins = JC.BaseMVC.getInstance( _frm, Bizs.FormLogic );
+    if( !_ins ) return;
+
+    _ins.trigger( Bizs.FormLogic.Model.AJAX_DONE, [ _data ] );
+}
+ +
URL: handler_jsonp.php?callbackInfo=FormLogic_1&callback=callback
+OUTPUT:
+<script>
+window.parent 
+    && window.parent != this
+    && window.parent[ 'callback' ]
+    && window.parent[ 'callback' ]( {"errorno":0,"errmsg":"","data":{"callbackInfo":"FormLogic_1","callback":"callback"}}, 'FormLogic_1' )
+    ;
+</script>
+ *
+ * + * + *

Form Control 可用的 html 属性

+ *
+ *
ignoreResetClear = bool, default = false
+ *
重置时, 是否忽略清空控件的值, 默认清空
*
* *

submit button 可用的 html 属性

@@ -117,12 +165,27 @@ *
formConfirmCheckCallback = function
*
* 提交表单时, 进行二次确认的条件判断, window 变量域 -function formConfirmCheckCallback( _trigger, _evt, _ins ){ +<pre>function formConfirmCheckCallback( _trigger, _evt, _ins ){ var _form = $(this); JC.log( 'formConfirmCheckCallback', new Date().getTime() ); return _form.find('td.js_confirmCheck input[value=0]:checked').length; -} - * +} + *
+ * + *
formSubmitIgnoreCheck = bool, default = false
+ *
+ * 表单提交时, 是否忽略 JC.Valid 的验证 + *
注意: 仅忽略内容为空的项, 如果已经填写内容, 那么内容必须与验证规则匹配 + *
注: 有时 提交操作 仅为保存为草稿的时候, 是不需要验证所有内容的, 不过还是会对值非空的项进行验证 + *
+ * + *
formResetCallback = callback
+ *
表单重置后的回调 +
function formResetCallback( _evt, _ins ){
+    var _form = $(this);
+    JC.log( 'formResetCallback', JC.f.ts() );
+}
+ * * * *

reset button 可用的 html 属性

@@ -141,6 +204,7 @@ * *
formPopupCloseMs = int, default = 2000
*
msgbox 弹框的显示时间
+ * * * *

普通 [a | button] 可用的 html 属性

@@ -156,11 +220,18 @@ * *
popupstatus = int, default = 2
*
提示状态: 0: 成功, 1: 失败, 2: 警告
+ * + *
buttonClickBindSelector = selector
+ *
+ * 点击按钮时, 把按钮的值赋值给 绑定的 控件 + *
注意: 这个属性仅支持 [input|button] 标签 + *
* * @namespace window.Bizs * @class FormLogic * @extends JC.BaseMVC * @constructor + * @version dev 0.2 2014-01-22 * @version dev 0.1 2013-09-08 * @author qiushaowei | 75 Team * @example @@ -187,7 +258,7 @@ _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); }else{ _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){ - reloadPage( "?donetype=custom" ); + JC.f.reloadPage( "?donetype=custom" ); }); } }; @@ -240,15 +311,22 @@ */ Bizs.FormLogic = FormLogic; + JC.f.addAutoInit && JC.f.addAutoInit( FormLogic ); + function FormLogic( _selector ){ _selector && ( _selector = $( _selector ) ); - if( FormLogic.getInstance( _selector ) ) return FormLogic.getInstance( _selector ); - FormLogic.getInstance( _selector, this ); + + if( JC.BaseMVC.getInstance( _selector, FormLogic ) ) + return JC.BaseMVC.getInstance( _selector, FormLogic ); + + JC.BaseMVC.getInstance( _selector, FormLogic, this ); this._model = new FormLogic.Model( _selector ); this._view = new FormLogic.View( this._model ); this._init(); + + //JC.log( FormLogic.Model._instanceName, 'all inited', new Date().getTime() ); } /** * 获取或设置 FormLogic 的实例 @@ -259,18 +337,14 @@ */ FormLogic.getInstance = function( _selector, _setter ){ - if( typeof _selector == 'string' && !/所有换回结果都会调用 + *
arg: _data[string of result] + * @property GLOBAL_AJAX_CHECK + * @type function + * @default null + * @static + */ + FormLogic.GLOBAL_AJAX_CHECK; - FormLogic.prototype = { + /** + * 全局数据解析函数 + *
所有换回结果都会调用 + *
arg: _data[string of result] + * @property DATA_PARSE + * @type function + * @default null + * @return Object + * @static + */ + FormLogic.DATA_PARSE; + + FormLogic._currentIns; + + + JC.BaseMVC.build( FormLogic ); + + JC.f.extendObject( FormLogic.prototype, { _beforeInit: function(){ //JC.log( 'FormLogic._beforeInit', new Date().getTime() ); @@ -356,18 +457,39 @@ _p.selector().on('submit', function( _evt ){ //_evt.preventDefault(); _p._model.isSubmited( true ); + FormLogic._currentIns = _p; + //JC.log( 1 ); + + var _ignoreCheck, _btn = _p.selector().data( FormLogic.Model.GENERIC_SUBMIT_BUTTON ); + _btn && ( _btn = $( _btn ) ); + if( _btn && _btn.length ){ + _ignoreCheck = JC.f.parseBool( _btn.attr( FormLogic.Model.IGNORE_KEY ) ); + JC.Valid.ignore( _p.selector(), !_ignoreCheck ); + }else{ + JC.Valid.ignore( _p.selector(), true ); + } if( _p._model.formBeforeProcess() ){ if( _p._model.formBeforeProcess().call( _p.selector(), _evt, _p ) === false ){ return _p._model.prevent( _evt ); } } + //JC.log( 2 ); + + if( !_ignoreCheck && !JC.Valid.check( _p.selector() ) ){ + _p._model.prevent( _evt ); + + if( !_p._model.checkDataValid() ){ + _p._view.dataValidError(); + return false; + } + //JC.log( 3 ); - if( !JC.Valid.check( _p.selector() ) ){ if( _p._model.formProcessError() ){ _p._model.formProcessError().call( _p.selector(), _evt, _p ); } - return _p._model.prevent( _evt ); + return false; + //JC.log( 4 ); } if( _p._model.formAfterProcess() ){ @@ -375,62 +497,87 @@ return _p._model.prevent( _evt ); } } + //JC.log( 5 ); if( _p.selector().data( FormLogic.Model.SUBMIT_CONFIRM_BUTTON ) ){ _p.trigger( FormLogic.Model.EVT_CONFIRM ); return _p._model.prevent( _evt ); } + //JC.log( 6 ); - _p.trigger( 'ProcessDone' ); - /* - if( _type == FormLogic.Model.AJAX ){ - _p.trigger( FormLogic.Model.EVT_AJAX_SUBMIT ); - return _p._model.prevent( _evt ); + + if( _p._model.formBeforeSubmit() ){ + if( _p._model.formBeforeSubmit().call( _p.selector(), _evt, _p ) === false ){ + return _p._model.prevent( _evt ); + } } - */ + + //JC.log( 7 ); + _p.trigger( FormLogic.Model.PROCESS_DONE ); }); - _p.on( 'BindFrame', function( _evt ){ + _p.on( FormLogic.Model.INITED, function( _evt ){ + _p.trigger( FormLogic.Model.INIT_JSONP ); + _p.trigger( FormLogic.Model.BIND_FORM ); + }); + + _p.on( FormLogic.Model.INIT_JSONP, function( _evt ){ + if( !( _type == FormLogic.Model.JSONP ) ) return; + + window[ _p._model.jsonpKey() ] = _p._model.jsonpCb(); + }); + + _p.on( FormLogic.Model.BIND_FORM, function( _evt ){ var _frame , _type = _p._model.formType() , _frameName ; - if( _type != FormLogic.Model.AJAX ) return; + if( !( _type == FormLogic.Model.AJAX || _type == FormLogic.Model.JSONP ) ) return; _frame = _p._model.frame(); _frame.on( 'load', function( _evt ){ + if( _p._model.formType() == FormLogic.Model.JSONP ) return; var _w = _frame.prop('contentWindow') , _wb = _w.document.body - , _d = $.trim( _wb.innerHTML ) + , _d = $( '
' + ( $.trim( _wb.innerHTML ) || '' ) + '
' ).text() ; if( !_p._model.isSubmited() ) return; - JC.log( 'common ajax done' ); - _p.trigger( 'AjaxDone', [ _d ] ); + //JC.log( 'common ajax done' ); + _p.trigger( FormLogic.Model.AJAX_DONE, [ _d ] ); }); }); /** * 全局 AJAX 提交完成后的处理事件 */ - _p.on('AjaxDone', function( _evt, _data ){ + _p.on( FormLogic.Model.AJAX_DONE, function( _evt, _data ){ + + _p.trigger( 'HIDE_PROMPT' ); + + FormLogic.GLOBAL_AJAX_CHECK + && FormLogic.GLOBAL_AJAX_CHECK( _data ); /** * 这是个神奇的BUG * chrome 如果没有 reset button, 触发 reset 会导致页面刷新 */ var _resetBtn = _p._model.selector().find('button[type=reset], input[type=reset]'); - _p._model.formSubmitDisable() && _p.trigger( 'EnableSubmit' ); + _p._model.formSubmitDisable() && _p.trigger( FormLogic.Model.ENABLE_SUBMIT ); + + _p._model.dataParse() && ( _data = _p._model.dataParse()( _data ) ); var _json, _fatalError, _resultType = _p._model.formAjaxResultType(); - if( _resultType == 'json' ){ + if( Object.prototype.toString.call( _data ) == '[object Object]' ){ + _json = _data; + }else if( _resultType == 'json' ){ try{ _json = $.parseJSON( _data ); }catch(ex){ _fatalError = true; _json = _data; } } if( _fatalError ){ - var _msg = printf( '服务端错误, 无法解析返回数据:

{0}

' + var _msg = JC.f.printf( '服务端错误, 无法解析返回数据:

{0}

' , _data ); - JC.Dialog.alert( _msg, 1 ) + _p.trigger( 'SHOW_POPUP', [ _p._model.formPopupType(), _msg, null, 1 ] ); return; } @@ -452,19 +599,23 @@ , _p ); + /* _p._model.formResetAfterSubmit() && !_p._model.userFormAjaxDone() && _resetBtn.length && _p.selector().trigger('reset'); + */ }); /** * 表单内容验证通过后, 开始提交前的处理事件 */ - _p.on('ProcessDone', function(){ + _p.on( FormLogic.Model.PROCESS_DONE, function( _evt ){ + _p.trigger( FormLogic.Model.BEFORE_SUBMIT ); + _p._model.formSubmitDisable() && _p.selector().find('input[type=submit], button[type=submit]').each( function(){ - $( this ).prop('disabled', true); + !_p._model.formIgnoreStatus() && $( this ).prop('disabled', true); }); }); @@ -474,13 +625,17 @@ _btn && ( _btn = $( _btn ) ); if( !( _btn && _btn.length ) ) return; - var _popup; + var _popup, _type = _p._model.formConfirmPopupType( _btn ) || 'dialog'; + _type += '.confirm'; + _popup = _p.triggerHandler( 'SHOW_POPUP', [ _type, _p._model.formSubmitConfirm( _btn ), _btn, 2 ] ); + /* if( _p._model.formConfirmPopupType( _btn ) == 'dialog' ){ _popup = JC.Dialog.confirm( _p._model.formSubmitConfirm( _btn ), 2 ); }else{ _popup = JC.confirm( _p._model.formSubmitConfirm( _btn ), _btn, 2 ); } + */ _popup.on('confirm', function(){ _p.selector().data( FormLogic.Model.SUBMIT_CONFIRM_BUTTON, null ); @@ -494,50 +649,117 @@ _p.selector().on('reset', function( _evt ){ if( _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON ) ){ - _p.trigger( FormLogic.Model.EVT_RESET ); + _p.trigger( FormLogic.Model.EVT_RESET, [ _evt ] ); return _p._model.prevent( _evt ); }else{ _p._view.reset(); - _p.trigger( 'EnableSubmit' ); + _p.trigger( FormLogic.Model.ENABLE_SUBMIT ); + _p.trigger( 'FORM_RESET', [ _evt ] ); } }); - _p.on( 'EnableSubmit', function(){ + _p.on( FormLogic.Model.ENABLE_SUBMIT, function(){ _p.selector().find('input[type=submit], button[type=submit]').each( function(){ - $( this ).prop('disabled', false ); + !_p._model.formIgnoreStatus() && $( this ).prop('disabled', false ); }); }); - _p.on( FormLogic.Model.EVT_RESET, function( _evt ){ + _p.on( FormLogic.Model.EVT_RESET, function( _evt, _srcEvt ){ var _btn = _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON ) ; _btn && ( _btn = $( _btn ) ); if( !( _btn && _btn.length ) ) return; - var _popup; + var _popup, _type = _p._model.formConfirmPopupType( _btn ) || 'dialog'; + _type += '.confirm'; + _popup = _p.triggerHandler( 'SHOW_POPUP', [ _type, _p._model.formResetConfirm( _btn ), _btn, 2 ] ); + /* if( _p._model.formConfirmPopupType( _btn ) == 'dialog' ){ _popup = JC.Dialog.confirm( _p._model.formResetConfirm( _btn ), 2 ); }else{ _popup = JC.confirm( _p._model.formResetConfirm( _btn ), _btn, 2 ); } + */ _popup.on('confirm', function(){ _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON, null ); _p.selector().trigger( 'reset' ); _p._view.reset(); - _p.trigger( 'EnableSubmit' ); + _p.trigger( FormLogic.Model.ENABLE_SUBMIT ); + _p.trigger( 'FORM_RESET', [ _srcEvt ] ); }); _popup.on('close', function(){ _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON, null ); }); }); - + + _p.on( FormLogic.Model.BEFORE_SUBMIT, function( _evt ){ + _p.trigger( 'SHOW_PROMPT' ); + if( _p._model.formType() != 'ajax' ){ + JC.f.safeTimeout( function(){ + _p.trigger( 'HIDE_PROMPT' ); + }, _p, 'hidePromptasdfasd', 2000 ); + } + }); + + _p.on( 'SHOW_PROMPT', function( _evt ){ + var _promptSelctor = _p._model.submitPromptSelector(); + if( !( _promptSelctor && _promptSelctor.length ) ) return; + _promptSelctor.html( _p._model.submitPromptMsg() ).show(); + }); + + _p.on( 'HIDE_PROMPT', function( _evt ){ + var _promptSelctor = _p._model.submitPromptSelector(); + if( !( _promptSelctor && _promptSelctor.length ) ) return; + _promptSelctor.hide(); + }); + + _p.on( 'FORM_RESET', function( _evt, _srcEvt ){ + JC.f.safeTimeout( function(){ + _p._model.formResetCallback() && _p._model.formResetCallback().call( _p.selector(), _srcEvt, _p ); + }, _p, 'asdfawerasdfase_reset', 100 ); + }); + + + _p.on( 'SHOW_POPUP', function( _evt, _type, _str, _src, _status, _cb ){ + _type = ( _type || '' ).toLowerCase(); + var _popup; + + switch( _type ){ + case 'dialog.confirm': { + _popup = JC.Dialog.confirm( _str, _status, _cb ); + break; + } + case 'popup.confirm': { + _popup = JC.confirm( _str, _src, _status, _cb ); + break; + } + case 'popup.msgbox': { + _popup = JC.msgbox( _str, _src, _status, _cb ); + break; + } + case 'dialog.msgbox': { + _popup = JC.Dialog.msgbox( _str, _status, _cb ); + break; + } + case 'popup': { + _popup = JC.alert( _str, _src, _status, _cb ); + break; + } + default: { + _popup = JC.Dialog.alert( _str, _status, _cb ); + break; + } + } + + return _popup; + }); } , _inited: function(){ - JC.log( 'FormLogic#_inited', new Date().getTime() ); + //JC.log( 'FormLogic#_inited', new Date().getTime() ); var _p = this , _files = _p.selector().find('input[type=file][name]') ; @@ -547,16 +769,20 @@ && _p.selector().attr( 'encoding', 'multipart/form-data' ) ; - _p.trigger( 'BindFrame' ); + _p._model.trigger( FormLogic.Model.INITED ); } - }; - JC.BaseMVC.buildModel( FormLogic ); + }) ; + + FormLogic.Model._instanceName = 'FormLogic'; + + FormLogic.Model.INITED = 'inited'; + FormLogic.Model.INIT_JSONP = 'init_jsonp'; - FormLogic.Model._instanceName = 'FormLogicIns'; FormLogic.Model.GET = 'get'; FormLogic.Model.POST = 'post'; FormLogic.Model.AJAX = 'ajax'; + FormLogic.Model.JSONP = 'jsonp'; FormLogic.Model.IFRAME = 'iframe'; FormLogic.Model.SUBMIT_CONFIRM_BUTTON = 'SubmitButton'; @@ -567,21 +793,163 @@ FormLogic.Model.EVT_CONFIRM = "ConfirmEvent" FormLogic.Model.EVT_RESET = "ResetEvent" - FormLogic.Model.EVT_AJAX_SUBMIT = "AjaxSubmit" FormLogic.Model.INS_COUNT = 1; - FormLogic.Model.prototype = { + FormLogic.Model.PROCESS_DONE = "ProcessDone"; + FormLogic.Model.BEFORE_SUBMIT = 'FORMBEFORESUBMIT'; + + FormLogic.Model.IGNORE_KEY = "formSubmitIgnoreCheck"; + FormLogic.Model.BIND_FORM = "BindFrame"; + FormLogic.Model.AJAX_DONE = "AjaxDone"; + FormLogic.Model.ENABLE_SUBMIT = "EnableSubmit"; + + FormLogic.Model.SHOW_DATA_VALID_ERROR = true; + + JC.f.extendObject( FormLogic.Model.prototype, { init: function(){ this.id(); + this.selector().addClass( FormLogic.Model._instanceName ); + this.selector().addClass( this.id() ); + + if( this.formType() == FormLogic.Model.JSONP ){ + var _r = this.attrProp( 'formAjaxAction' ) || this.attrProp( 'action' ) || '?'; + + this.attrProp( 'action' ) + && ( + this.selector().attr( 'action' + , JC.f.addUrlParams( this.attrProp( 'action' ), { 'callbackInfo': this.id() } ) ) + , this.selector().attr( 'action' + , JC.f.addUrlParams( this.attrProp( 'action' ), { 'callback': this.jsonpKey() } ) ) + ); + + this.attrProp( 'formAjaxAction' ) + && ( + this.selector().attr( 'formAjaxAction', + JC.f.addUrlParams( this.attr( 'formAjaxAction' ), { 'callbackInfo': this.id() } ) ) + , this.selector().attr( 'formAjaxAction', + JC.f.addUrlParams( this.attr( 'formAjaxAction' ), { 'callback': this.jsonpKey() } ) ) + ); + } + } + , submitPromptSelector: + function(){ + return this.selectorProp( 'formSubmitPromptSelector' ); + } + + , submitPromptMsg: + function( _btn ){ + var _r = '正在提交数据,请稍候...'; + _r = this.attrProp( 'formSubmitPromptMsg' ) || _r; + _btn && ( _r = this.attrProp( _btn, 'formSubmitPromptMsg' ) || _r ); + return _r; + } + + , showDataValidError: + function( _item ){ + var _p = this, _r = FormLogic.Model.SHOW_DATA_VALID_ERROR; + + _p.selector().is( '[formShowDataValidError]' ) && ( _r = JC.f.parseBool( _p.attrProp( 'formShowDataValidError' ) ) ); + _item && _item.is( '[formShowDataValidError]' ) && ( _r = JC.f.parseBool( _item.attr( 'formShowDataValidError' ) ) ); + + return _r; + } + + , formIgnoreStatus: + function(){ + return this.boolProp( 'formIgnoreStatus'); + } + + , checkDataValid: + function(){ + var _p = this,_r = true, _iv = true, i, j; + + for( i = 0, j = _p.selector()[0].length; i < j; i++ ){ + var _item = $(_p.selector()[0][i]); + var _v = _item.val().trim() + , _status = _item.attr('datavalid') + , _datatypestatus = _item.attr('datatypestatus') + ; + if( _v ){ + if( _status && _datatypestatus ){ + _r && ( _r = JC.f.parseBool( _status ) ); + }else if( _datatypestatus ){ + _iv && ( _iv = JC.f.parseBool( _datatypestatus ) ); + } + }else if( _datatypestatus ){ + _iv && ( _iv = JC.f.parseBool( _datatypestatus ) ); + if( ! _iv ) break; + } + + } + !_iv && ( _r = true ); + return _r; } + + , dataValidItems: + function(){ + var _r = []; + this.selector().find( 'input[type=text][subdatatype]' ).each( function(){ + var _item = $(this); + if( !/datavalid/i.test( _item.attr( 'subdatatype' ) ) ) return; + _r.push( _item ); + }); + + return $( _r ); + } + , id: function(){ if( ! this._id ){ - this._id = 'FormLogicIns_' + ( FormLogic.Model.INS_COUNT++ ); + this._id = FormLogic.Model._instanceName + '_' + ( FormLogic.Model.INS_COUNT++ ); } return this._id; } + + , jsonpCb: + function(){ + var _r = this._innerJsonpCb + , _action = this.formAjaxAction() + ; + + _r = this.callbackProp( 'formJsonpCb' ) || _r; + + if( JC.f.hasUrlParam( _action, 'callback' ) ){ + _r = this.windowProp( JC.f.getUrlParam( _action, 'callback' ) ) || _r; + } + + return _r; + } + + , jsonpKey: + function(){ + var _r = this.id() + '_JsonpCb' + , _action = this.formAjaxAction() + ; + + _r = this.attrProp( 'formJsonpCb' ) || _r; + + if( JC.f.hasUrlParam( _action, 'callback' ) ){ + _r = JC.f.getUrlParam( _action, 'callback' ) || _r; + } + + return _r; + } + /** + * 这个回调的 this 指针是 window + */ + , _innerJsonpCb: + function( _data, _info ){ + if( !( _data && _info ) ) return; + + var _frm = $( 'form.' + _info ), _ins; + if( !_frm.length ) return; + _ins = JC.BaseMVC.getInstance( _frm, Bizs.FormLogic ); + if( !_ins ) return; + + _ins.trigger( Bizs.FormLogic.Model.AJAX_DONE, [ _data ] ); + } + , isSubmited: function( _setter ){ typeof _setter != 'undefined' && ( this._submited = _setter ); @@ -602,12 +970,12 @@ if( !( _p._frame && _p._frame.length && _p._frame.parent() ) ){ if( _p.selector().is('[target]') ){ - _p._frame = $( printf( 'iframe[name={0}]', _p.selector().attr('target') ) ); + _p._frame = $( JC.f.printf( 'iframe[name={0}]', _p.selector().attr('target') ) ); } if( !( _p._frame && _p._frame.length ) ) { _p.selector().prop( 'target', _p.frameId() ); - _p._frame = $( printf( FormLogic.frameTpl, _p.frameId() ) ); + _p._frame = $( JC.f.printf( FormLogic.frameTpl, _p.frameId() ) ); _p.selector().after( _p._frame ); } @@ -640,7 +1008,7 @@ , formAjaxAction: function(){ var _r = this.attrProp( 'formAjaxAction' ) || this.attrProp( 'action' ) || '?'; - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } , formSubmitDisable: function(){ @@ -649,11 +1017,11 @@ ; _p.selector().is('[formSubmitDisable]') - && ( _r = parseBool( _p.selector().attr('formSubmitDisable') ) ); + && ( _r = JC.f.parseBool( _p.selector().attr('formSubmitDisable') ) ); _btn && _btn.is('[formSubmitDisable]') - && ( _r = parseBool( _btn.attr('formSubmitDisable') ) ); + && ( _r = JC.f.parseBool( _btn.attr('formSubmitDisable') ) ); return _r; } @@ -662,7 +1030,7 @@ var _p = this, _r = FormLogic.resetAfterSubmit; _p.selector().is('[formResetAfterSubmit]') - && ( _r = parseBool( _p.selector().attr('formResetAfterSubmit') ) ); + && ( _r = JC.f.parseBool( _p.selector().attr('formResetAfterSubmit') ) ); return _r; } , formAjaxDone: @@ -673,6 +1041,13 @@ _r = _p.userFormAjaxDone() || _r; return _r; } + , dataParse: + function(){ + var _p = this, _r = FormLogic.DATA_PARSE; + _r = _p.windowProp( 'formDataParse' ) || _r; + return _r; + } + , userFormAjaxDone: function(){ var _p = this, _r @@ -693,6 +1068,7 @@ var _form = $(this) , _panel , _url = '' + , _type = _p._model.formPopupType() + '.msgbox'; ; _json.data @@ -703,19 +1079,21 @@ && ( _url = _json.url ) ; + if( _json.errorno ){ - _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); + _p.triggerHandler( 'SHOW_POPUP', [ _type, _json.errmsg || '操作失败, 请重新尝试!', _btn, 1 ] ); }else{ - _panel = JC.Dialog.msgbox( _json.errmsg || '操作成功', 0, function(){ + _panel = _p.triggerHandler( 'SHOW_POPUP', [ _type, _json.errmsg || '操作成功', null, 0, function(){ _url = _url || _p._model.formAjaxDoneAction(); if( _url ){ try{_url = decodeURIComponent( _url ); } catch(ex){} - /^URL/.test( _url) && ( _url = urlDetect( _url ) ); - reloadPage( _url ); + /^URL/.test( _url) && ( _url = JC.f.urlDetect( _url ) ); + JC.f.reloadPage( _url ); } - }, _p._model.formPopupCloseMs() ); + }, _p._model.formPopupCloseMs() ] ); } } + , formPopupCloseMs: function( _btn ){ var _p = this @@ -745,29 +1123,45 @@ && ( _r = _p.attrProp( _btn, 'formAjaxDoneAction' ) || _r ) ; - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } - - , formBeforeProcess: function(){ return this.callbackProp( 'formBeforeProcess' ); } , formAfterProcess: function(){ return this.callbackProp( 'formAfterProcess' ); } + , formBeforeSubmit: function(){ return this.callbackProp( 'formBeforeSubmit' ); } , formProcessError: function(){ var _r = this.callbackProp( 'formProcessError' ) || FormLogic.processErrorCb; return _r; } + , formResetCallback: function(){ return this.callbackProp( 'formResetCallback'); } + , prevent: function( _evt ){ _evt && _evt.preventDefault(); return false; } , formConfirmPopupType: function( _btn ){ - var _r = this.stringProp( 'formConfirmPopupType' ) || 'dialog'; + var _r = this.stringProp( 'formConfirmPopupType' ); _btn && ( _btn = $( _btn ) ).length && _btn.is('[formConfirmPopupType]') && ( _r = _btn.attr('formConfirmPopupType') ) ; + + _r = _r || this.formPopupType( _btn ); + return _r.toLowerCase(); } + + , formPopupType: + function( _btn ){ + var _r = this.stringProp( 'formPopupType' ) || 'dialog'; + + _btn && ( _btn = $( _btn ) ).length + && _btn.is('[formPopupType]') + && ( _r = _btn.attr('formPopupType') ) + ; + return _r.toLowerCase(); + } + , formResetUrl: function(){ var _p = this @@ -779,7 +1173,7 @@ && ( _r = _p.attrProp( _btn, 'formResetUrl' ) || _r ) ; - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } , formSubmitConfirm: function( _btn ){ @@ -802,30 +1196,39 @@ return _r.trim(); } - }; + , datavalidFormLogicMsg: + function( _item ){ + var _msg = "需要表单异步验证后才能提交, 请重试..."; + _msg = $( _item ).attr( 'datavalidFormLogicMsg' ) || _msg; + return _msg; + } + }); - JC.BaseMVC.buildView( FormLogic ); - FormLogic.View.prototype = { + JC.f.extendObject( FormLogic.View.prototype, { initQueryVal: function(){ var _p = this; if( _p._model.formType() != FormLogic.Model.GET ) return; - JC.Form && JC.Form.initAutoFill( _p._model.selector() ); + JC.FormFillUrl && JC.FormFillUrl.init( _p._model.selector() ); } , reset: function( _btn ){ var _p = this, _resetUrl = _p._model.formResetUrl(); - _resetUrl && reloadPage( _resetUrl ); + _resetUrl && JC.f.reloadPage( _resetUrl ); _p._model.resetTimeout && clearTimeout( _p._model.resetTimeout ); _p._model.resetTimeout = setTimeout(function(){ var _form = _p._model.selector(); - _form.find('input[type=text], input[type=password], input[type=file], textarea').val(''); + _form.find('input[type=text], input[type=password], input[type=file], textarea').each( function(){ + if( $( this ).attr( 'ignoreResetClear' ) ) return; + $( this ).val( '' ); + }); _form.find('select').each( function() { + if( $( this ).attr( 'ignoreResetClear' ) ) return; var sp = $(this); var cs = sp.find('option'); if( cs.length > 1 ){ @@ -845,20 +1248,39 @@ JC.hideAllPopup( 1 ); } - }; + , dataValidError: + function(){ + var _p = this; + $.each( this._model.dataValidItems(), function( _ix, _item ){ + var _v = _item.val().trim(), _status = _item.attr('datavalid'); + if( !( _v && _status ) ) return; + + if( JC.f.parseBool( _status ) ) return; - JC.BaseMVC.build( FormLogic, 'Bizs' ); + if( _p._model.showDataValidError( _item ) ){ + var _popupType = _p._model.formPopupType() + '.msgbox'; + _p.triggerHandler( 'SHOW_POPUP', [ _popupType, _p._model.datavalidFormLogicMsg( _item ), _item, 2 ] ); + + JC.f.safeTimeout( function(){ + _item.trigger( 'blur' ); + }, _item, 'FORMLOGIC_DATAVALID', 10 ); + } + return false; + }); + } + }); $(document).delegate( 'input[formSubmitConfirm], button[formSubmitConfirm]', 'click', function( _evt ){ var _p = $(this) - , _fm = getJqParent( _p, 'form' ) + , _fm = JC.f.getJqParent( _p, 'form' ) , _ins = FormLogic.getInstance( _fm ) , _tmp ; if( _fm && _fm.length ){ if( _ins ){ + _fm.data( FormLogic.Model.SUBMIT_CONFIRM_BUTTON, null ) if( _p.is('[formConfirmCheckSelector]') ){ - _tmp = parentSelector( _p, _p.attr('formConfirmCheckSelector') ); + _tmp = JC.f.parentSelector( _p, _p.attr('formConfirmCheckSelector') ); if( !( _tmp && _tmp.length ) ) return; } else if( _p.is( '[formConfirmCheckCallback]') ){ @@ -873,26 +1295,32 @@ }); $(document).delegate( 'input[formResetConfirm], button[formResetConfirm]', 'click', function( _evt ){ - var _p = $(this), _fm = getJqParent( _p, 'form' ); + var _p = $(this), _fm = JC.f.getJqParent( _p, 'form' ); _fm && _fm.length && _fm.data( FormLogic.Model.RESET_CONFIRM_BUTTON, _p ) ; }); $(document).delegate( 'input[type=reset], button[type=reset]', 'click', function( _evt ){ - var _p = $(this), _fm = getJqParent( _p, 'form' ); + var _p = $(this), _fm = JC.f.getJqParent( _p, 'form' ); _fm && _fm.length && _fm.data( FormLogic.Model.GENERIC_RESET_BUTTON , _p ) ; }); $(document).delegate( 'input[type=submit], button[type=submit]', 'click', function( _evt ){ - var _p = $(this), _fm = getJqParent( _p, 'form' ); + var _p = $(this), _fm = JC.f.getJqParent( _p, 'form' ); _fm && _fm.length && _fm.data( FormLogic.Model.GENERIC_SUBMIT_BUTTON , _p ) ; }); + $(document).delegate( 'input[buttonClickBindSelector], button[buttonClickBindSelector]', 'click', function( _evt ){ + var _p = $(this), _target = JC.f.parentSelector( _p, _p.attr('buttonClickBindSelector') ); + if( !( _target && _target.length ) ) return; + _target.val( _p.val() || '' ); + }); + $(document).delegate( 'a[buttonReturnUrl], input[buttonReturnUrl], button[buttonReturnUrl]', 'click', function( _evt ){ var _p = $(this) , _url = _p.attr('buttonReturnUrl').trim() @@ -903,7 +1331,7 @@ ; if( !_url ) return; - _url = urlDetect( _url ); + _url = JC.f.urlDetect( _url ); _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault(); @@ -921,10 +1349,10 @@ } } _panel.on('confirm', function(){ - reloadPage( _url ); + JC.f.reloadPage( _url ); }); }else{ - reloadPage( _url ); + JC.f.reloadPage( _url ); } }); @@ -936,4 +1364,13 @@ }, 1 ); }); -}(jQuery)); + return Bizs.FormLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/FormLogic/_demo/ajax.html b/bizs/FormLogic/_demo/ajax.html old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/ajax_upload.html b/bizs/FormLogic/_demo/ajax_upload.html old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/data/handler.php b/bizs/FormLogic/_demo/data/handler.php old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/data/upload.php b/bizs/FormLogic/_demo/data/upload.php old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/formConfirmCheckSelector_formConfirmCheckCallback.html b/bizs/FormLogic/_demo/formConfirmCheckSelector_formConfirmCheckCallback.html old mode 100644 new mode 100755 index e5263a56f..369c3dd1a --- a/bizs/FormLogic/_demo/formConfirmCheckSelector_formConfirmCheckCallback.html +++ b/bizs/FormLogic/_demo/formConfirmCheckSelector_formConfirmCheckCallback.html @@ -18,7 +18,7 @@ + + + +
+
Bizs.FormLogic, formSubmitIgnoreCheck
+
+
+
+
+
+ 文件框: +
+
+ URL: +
+ +
+ 日期: + +
+
+ 下拉框: + +
+
+ return url: + +
+
+ + + + + + + + back +
+
+
+
+
+
+ +
+
Bizs.FormLogic, formSubmitIgnoreCheck
+
+
+
+
+
+ 文件框: +
+
+ URL: +
+ +
+ 日期: + +
+
+ 下拉框: + +
+
+ return url: + +
+
+ + + + + + + + back +
+
+
+
+
+
+ + + + + + diff --git a/bizs/FormLogic/_demo/form_reset_test.html b/bizs/FormLogic/_demo/form_reset_test.html old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/get_form.html b/bizs/FormLogic/_demo/get_form.html old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/index.php b/bizs/FormLogic/_demo/index.php old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/_demo/post_form.html b/bizs/FormLogic/_demo/post_form.html old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/index.php b/bizs/FormLogic/index.php old mode 100644 new mode 100755 diff --git a/bizs/FormLogic/res/default/style.css b/bizs/FormLogic/res/default/style.css new file mode 100755 index 000000000..21a7a6dcb --- /dev/null +++ b/bizs/FormLogic/res/default/style.css @@ -0,0 +1,12 @@ +.js_formSubmitPormpt { + border:1px solid #daecce; + border-radius:3px; + background:#f3f8ef; + overflow:hidden; + line-height:15px; + color:#000; + margin:5px; + padding: 5px 20px; + display: none; + color: green; +} diff --git a/bizs/InputSelect/InputSelect.js b/bizs/InputSelect/InputSelect.js new file mode 100755 index 000000000..0fce9e951 --- /dev/null +++ b/bizs/InputSelect/InputSelect.js @@ -0,0 +1,464 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 输入下拉框 + * 可以输入数据也可以通过点下拉箭头选择数据。 + * 下拉的数据支持Ajax接口和php前段铺数据。 + * + *

JC Project Site + * | API docs + * | demo link

+ * + *

页面只要引用本脚本, 默认会自动处理 div class="js_bizInputSelect"

+ * + *

可用的 HTML attribute

+ * + *
+ *
iptseldatabox = string
+ *
指定下拉数据存放的父容器
+ *
iptseldataboxheight = int
+ *
指定下拉数据存放的父容器的高度,默然为自适应
+ *
iptseloption = string
+ *
指定下拉数据选项
+ *
iptselipt = string
+ *
指定输入框
+ *
iptselhideipt = string
+ *
指定隐藏域
+ *
iptselprevententer = bool
+ *
回车键阻止表单提交, default = true
+ *
iptselitemselected = function
+ *
选择数据后的回调
+ * + *
iptseldataurl = string
+ *
指定下拉数据的ajax接口,要求返回json数据格式如下: + * { errorno: 0, + * data: [{label: 'item1', 'value': 0}] + * }
+ *
+ * + * + * + * @namespace window.Bizs + * @class InputSelect + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-12-02 + * @author zuojing | 75 Team + + */ + Bizs.InputSelect = InputSelect; + JC.f.addAutoInit && JC.f.addAutoInit( InputSelect ); + + function InputSelect( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, InputSelect ) ) + return JC.BaseMVC.getInstance( _selector, InputSelect ); + + JC.BaseMVC.getInstance( _selector, InputSelect, this ); + + this._model = new InputSelect.Model( _selector ); + this._view = new InputSelect.View( this._model ); + + this._init(); + + //JC.log( InputSelect.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 InputSelect 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of InputSelectInstance} + */ + InputSelect.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_bizInputSelect' ) ){ + _r.push( new InputSelect( _selector ) ); + }else{ + _selector.find( '.js_bizInputSelect' ).each( function(){ + _r.push( new InputSelect( this ) ); + }); + } + } + return _r; + }; + + + BaseMVC.build( InputSelect ); + + JC.f.extendObject( InputSelect.prototype, { + _beforeInit: function () { + var p = this; + + p._model.selector().addClass('IPTSEL-BOX').append(''); + if ( p._model.iptselbox().length ) { + p._model.iptselbox().addClass('IPTSEL-DROPDOWN'); + p._model.iptselboxheight() + && p._model.iptselbox().css({'height': p._model.iptselboxheight() + 'px', 'overflow-y': 'auto'}); + } + p._model.iptseloption().length && p._model.iptseloption().addClass('IPTSEL-ITEM'); + //JC.log( 'InputSelect _beforeInit', new Date().getTime() ); + + }, + + _initHanlderEvent: function () { + var p = this; + + p._model.selector().data('visible', 0); + + p._model.iptselipt().on('keyup', function( _evt, _showPopup ){ + var _sp = $(this) + , _val = _sp.val().trim() + , _keycode = _evt.keyCode + , _ignoreTime = _sp.data('IgnoreTime') + ; + + if( _keycode ){ + switch( _keycode ){ + case 38://up + case 40://down + { + _evt.preventDefault(); + } + case 37: //left + case 39: //right + { + return; + } + case 27: //ESC + { + p._hide(); + return; + } + } + } + + }); + + //输入框事件处理 + p._model.iptselipt().on('click', function () { + if ( p.selector().data('visible') ) { + p._hide(); + } else { + return; + }; + }); + + //箭头事件处理 + p._model.iptselarrow().on('click', function (e) { + e.stopPropagation(); + if (p._model.dataurl() && !p._model.dataready) { + p._model.ajaxdata(); + } + + p[p._model.selector().data('visible') ? '_hide': '_show'](); + }); + + //键盘事件处理 + p._model.iptselipt().on('keydown', function (e) { + + var keycode = e.keyCode, + $this = $(this), + keyindex, + isBackward, + items = p._model.iptseloption(), + item; + + keycode == 38 && ( isBackward = true ); + //JC.log( 'keyup', new Date().getTime(), keycode ); + + switch ( keycode ) { + case 38://up + case 40://down + { + if (p._model.dataurl()) { + p._model.iptselarrow().trigger('click'); + } + p._show(); + keyindex = p._model.nextIndex( isBackward ); + + if( keyindex >= 0 && keyindex < items.length ){ + e.preventDefault(); + item = $(items[keyindex]); + p._model.selectedIdentifier( item ); + p._model.iptselipt().val( p._model.getKeyword(item ) ); + p._model.iptselhideipt().val(item.data('value') || ''); + return; + } + break; + } + case 9://tab + { + p._hide(); + return; + } + case 13://回车 + { + var tmpSelectedItem; + + if( p._model.iptselbox().is( ':visible' ) + && ( tmpSelectedItem = p._model.iptselbox().find( 'li.active') ) && tmpSelectedItem.length ){ + p.trigger('iptselitemselected', [ tmpSelectedItem, p._model.getKeyword( tmpSelectedItem ) ]); + } + p._hide(); + p._model.iptselprevententer() && e.preventDefault(); + break; + } + } + }); + + //容器事件处理阻止冒泡 + p._model.iptselbox().on('mousedown', function (e) { + e.stopPropagation(); + }); + + //选项mouseenter,mouseleave事件处理 + p._model.iptselbox() + .delegate('.IPTSEL-ITEM', 'mouseenter', function (e) { + var $this = $(this); + p._model.selectedIdentifier($this, true); + }) + .delegate('.IPTSEL-ITEM', 'mouseleave', function (e) { + var $this = $(this); + $this.removeClass('active'); + }); + + //选项click事件处理 + p._model.iptselbox().delegate('.IPTSEL-ITEM', 'click', function (e) { + var $this = $(this), + keyword = $this.data('label'), + kvalue = $this.data('value') || ''; + + p._model.iptselipt().val(keyword); + p._model.iptselhideipt().val(kvalue); + p._hide(); + + p.trigger('iptselitemselected', [$this, keyword, kvalue ]); + JC.f.safeTimeout( function(){ + p._model.iptselipt().trigger( 'blur' ); + }, null, 'IptSelItemClick', 200); + }); + + p.on('iptselitemselected', function (e, sp, keyword, kvalue) { + p._model.iptselitemselectedcallback() + && p._model.iptselitemselectedcallback().call(p, keyword, kvalue); + }); + + //空白处点击处理 + $(document).on('mousedown', function () { + p._hide(); + }); + + }, + + _inited: function () { + + }, + + _show: function () { + var p = this; + p._view.show(); + p._model.selector().data('visible', 1); + return this; + }, + + _hide: function () { + var p = this; + p._view.hide(); + p._model.selector().data('visible', 0); + return this; + } + + }); + + InputSelect.Model._instanceName = 'InputSelectIns'; + + JC.f.extendObject( InputSelect.Model.prototype, { + init: function () { + }, + + //输入框 + iptselipt: function () { + var r = JC.f.parentSelector(this.selector(), this.attrProp('iptselipt')); + r.length && r.addClass('IPTSEL-INPUT'); + return r; + }, + + //隐藏域 + iptselhideipt: function () { + var r = JC.f.parentSelector(this.selector(), this.attrProp('iptselhideipt')); + r.length && r.addClass('IPTSEL-HIDE'); + return r; + }, + + //箭头 + iptselarrow: function () { + return this.selector().find('.IPTSEL-ARROW'); + }, + + //选项 + iptseloption: function () { + var selector = this.selector(); + return JC.f.parentSelector(selector, this.attrProp('iptseloption')); + }, + + //选项的容器 + iptselbox: function () { + var p = this, + r = p.attrProp('iptseldatabox'); + + return JC.f.parentSelector(p.selector(), r ); + + }, + + //选项容器的高度 + iptselboxheight: function () { + return this.intProp('iptselboxheight'); + }, + + //是否阻止enter提交表单 + iptselprevententer: function () { + var r = true, + selector = this.selector(); + + selector.is( '[iptselprevententer]' ) + && ( r = this.boolProp('iptselprevententer') ); + + return r; + }, + + //ajax数据url + dataurl: function () { + return this.attrProp('iptseldataurl'); + }, + + //获取ajax数据 + ajaxdata: function () { + var p = this, + url = this.dataurl(); + + $.get(url).done(function (res) { + res = $.parseJSON(res); + var tpl = '
    ', + str = '
  • {0}
  • ', + i = 0, + l; + + if (res.errorno) { + JC.f.alert('操作失败', 2); + } else { + l = res.data.length; + if (l === 0) { + tpl = '
  • 暂无数据
  • '; + } else { + for (i = 0; i < l; i++) { + tpl += JC.f.printf(str, res.data[i].label, i, res.data[i].value || ''); + } + } + + tpl += '
'; + + p.iptselbox().html(tpl); + p.dataready = 1; + } + }); + }, + + nextIndex: function (isBackward) { + var p = this, + items = p.iptseloption(), + len = items.length; + + if (isBackward) { + if (p.keyindex <= 0) { + p.keyindex = len - 1; + } else { + p.keyindex--; + } + } else { + if( p.keyindex >= len - 1 ) { + p.keyindex = 0; + } else { + p.keyindex++; + } + } + + return p.keyindex; + }, + + //高亮显示选中项 + selectedIdentifier: function (selector, updateKeyIndex) { + this.preSelected && this.preSelected.removeClass('active'); + selector.addClass('active'); + updateKeyIndex && (this.keyindex = parseInt(selector.data('keyindex'))); + this.preSelected = selector; + }, + + //获取下拉选项的值 + getKeyword: function (selector) { + var keyword = selector.data('label'); + try { + keyword = decodeURIComponent(keyword); + } catch (ex) { + + } + return keyword; + }, + + keyindex: -1, + + dataready: 0, + + //下拉选中后的回调 + iptselitemselectedcallback: function () { + var p = this; + + p.selector().is('[iptselitemselectedcallback]') + && (p._iptselselectedcallback = p.selector().attr('iptselitemselectedcallback')); + + return p._iptselselectedcallback ? window[p._iptselselectedcallback]: null; + } + + }); + + JC.f.extendObject( InputSelect.View.prototype, { + init: function () { + + }, + + show: function () { + var p = this; + + p._model.iptselbox().show().css('z-index', window.ZINDEX_COUNT++); + }, + + hide: function () { + var p = this; + p._model.iptselbox().hide(); + } + + }); + + var $doc = $(document); + + $doc.ready( function(){ + var _insAr = 0; + InputSelect.autoInit + && ( _insAr = InputSelect.init() ); + }); + + return Bizs.InputSelect; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/InputSelect/_demo/data/index.php b/bizs/InputSelect/_demo/data/index.php new file mode 100755 index 000000000..676451ff0 --- /dev/null +++ b/bizs/InputSelect/_demo/data/index.php @@ -0,0 +1,17 @@ + 1, 'data' => array() ); + + $r['errorno'] = 0; + $r['errmsg'] = ''; + + $r['data'] = array( + array('label' => 'test0', '1' => '448', '2' => 0 ), + array('label' => 'test1', '1' => '453', '2' => 0 ), + array('label' => 'test2', '1' => '418', '2' => 1 ), + array('label' => 'test3', '1' => '413', '2' => 1 ), + array('label' => 'test4', '1' => '4458', '2' => 0 ), + array('label' => 'test5', '1' => '4553', '2' => 0 ), + ); + + echo json_encode( $r ); +?> diff --git a/bizs/InputSelect/_demo/demo.html b/bizs/InputSelect/_demo/demo.html new file mode 100755 index 000000000..5d25a0de4 --- /dev/null +++ b/bizs/InputSelect/_demo/demo.html @@ -0,0 +1,67 @@ + + + + + Bizs.InputSelect 0.1 + + + + + + + + +
+
normal demo
+
+ +
+
+ + + +
+ +
+ + + +
+








+
ajax demo
+
+
+
+ + +
+
+
+ +
+
+
+ + diff --git a/bizs/InputSelect/_demo/index.php b/bizs/InputSelect/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/InputSelect/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/InputSelect/index.php b/bizs/InputSelect/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/bizs/InputSelect/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/InputSelect/res/default/style.css b/bizs/InputSelect/res/default/style.css new file mode 100755 index 000000000..5cad30796 --- /dev/null +++ b/bizs/InputSelect/res/default/style.css @@ -0,0 +1,48 @@ +.IPTSEL-BOX{ + position: relative; + width: 180px; + height: 22px; +} +.IPTSEL-INPUT{ + border: 1px solid #ddd; + width: 178px; +} +.IPTSEL-ARROW{ + position: absolute; + display: block; + right: 0; + top: 1px; + width: 17px; + height: 18px; + background: url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat; + overflow: hidden; + padding: 0; + margin: 0; + font-size: 0; + line-height: 0; +} + +.IPTSEL-DROPDOWN{ + display: none; + position: absolute; + background: #FFF; + border: 1px solid #ddd; + line-height: 22px; + list-style: none; + width: 178px; +} +.IPTSEL-DROPDOWN ul{ + padding: 0; + margin: 0; +} +.IPTSEL-DROPDOWN li{ + list-style: none; + cursor: default; + padding: 0 5px; +} +.IPTSEL-DROPDOWN li.active{ + background: #eee; +} +.SELECTBOX:hover .SELECTIcon{ + background-position: 0 -18px; +} diff --git a/bizs/InputSelect/res/index.php b/bizs/InputSelect/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/InputSelect/res/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/KillISPCache/KillISPCache.js b/bizs/KillISPCache/KillISPCache.js old mode 100644 new mode 100755 index 5f526084f..6529b695a --- a/bizs/KillISPCache/KillISPCache.js +++ b/bizs/KillISPCache/KillISPCache.js @@ -1,14 +1,16 @@ -;(function($){ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ /** * 应用场景 *
ISP 缓存问题 引起的用户串号 *
ajax 或者动态添加的内容, 请显式调用 JC.KillISPCache.getInstance().process( newNodeContainer ) *
这是个单例类 - + *

require: + * jQuery + * , JC.BaseMVC + *

*

JC Project Site * | API docs * | demo link

- * require: jQuery * *

页面只要引用本文件, 默认会自动初始化 KillISPCache 逻辑

*
@@ -132,7 +134,7 @@ KillISPCache.Model.prototype = { init: function(){ - this._postfix = printf( '{0}_{1}_' + this._postfix = JC.f.printf( '{0}_{1}_' , new Date().getTime().toString() , Math.round( Math.random() * 100000 ) ); @@ -191,7 +193,7 @@ if( _ignore ) return; - _url = addUrlParams( _url, _p.keyVal() ); + _url = JC.f.addUrlParams( _url, _p.keyVal() ); _sp.attr( 'href', _url ); _sp.html( _text ); }); @@ -233,7 +235,7 @@ _ignore = true; } }); - !_ignore && ( _settings.url = addUrlParams( _settings.url, _p.keyVal() ) ); + !_ignore && ( _settings.url = JC.f.addUrlParams( _settings.url, _p.keyVal() ) ); }); } , ignoreSameLinkText: @@ -263,4 +265,13 @@ }, 100 ); }); -}(jQuery)); + return Bizs.KillISPCache; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/KillISPCache/_demo/data/handler.php b/bizs/KillISPCache/_demo/data/handler.php old mode 100644 new mode 100755 diff --git a/bizs/KillISPCache/_demo/demo.html b/bizs/KillISPCache/_demo/demo.html old mode 100644 new mode 100755 diff --git a/bizs/KillISPCache/_demo/demo.ignoreTest.html b/bizs/KillISPCache/_demo/demo.ignoreTest.html old mode 100644 new mode 100755 diff --git a/bizs/KillISPCache/_demo/index.php b/bizs/KillISPCache/_demo/index.php old mode 100644 new mode 100755 diff --git a/bizs/KillISPCache/index.php b/bizs/KillISPCache/index.php old mode 100644 new mode 100755 diff --git a/bizs/MoneyTips/MoneyTips.js b/bizs/MoneyTips/MoneyTips.js new file mode 100755 index 000000000..7db9e1618 --- /dev/null +++ b/bizs/MoneyTips/MoneyTips.js @@ -0,0 +1,304 @@ +//TODO: 提供静态格式化方法 +//TODO: 提供 页面载入时, 指定 class 进行格式化支持 +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + *

金额格式化 业务逻辑

+ *
应用场景 + *
用户在文本框输入金额时, 在指定的 node 显示以逗号分隔的金额 + *

require: + * JC.BaseMVC + *

+ *

JC Project Site + * | API docs + * | demo link

+ * + * input[type=text] 需要 添加 class="js_bizMoneyTips" + *
只要带有 class = js_bizMoneyTips 的文本框, 默认会自动初始化 MoneyTips 实例 + * + *

+ * 页面载入时, Bizs.MoneyTips 会对 span.js_bmtLabel, label.js_bmtLabel 进行自动格式化 + *

+ * + *

可用的 HTML 属性

+ *
+ *
bmtDisplayLabel = selector, default = span
+ *
+ * 指定显示 格式化金额的 node, 如果没有显式指定 node, 那么将会动态生成一个用于显示的 span + *
+ * + *
bmtPattern = string, default = {0}
+ *
+ * 用于显示格式化金额的显示内容, {0} = 金额占位符 + *
example: <input type="text" class="js_bizMoneyTips" bmtPattern="格式化金额: {0}" /> + *
+ *
+ * + * @namespace window.Bizs + * @class MoneyTips + * @extends JC.BaseMVC + * @constructor + * @version dev 0.1 2013-11-21 + * @author qiushaowei | 75 Team + * + * @example +
+ 金额: + + +
+ */ + Bizs.MoneyTips = MoneyTips; + JC.f.addAutoInit && JC.f.addAutoInit( MoneyTips ); + + function MoneyTips( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( MoneyTips.getInstance( _selector ) ) return MoneyTips.getInstance( _selector ); + MoneyTips.getInstance( _selector, this ); + + this._model = new MoneyTips.Model( _selector ); + this._view = new MoneyTips.View( this._model ); + + this._init(); + + JC.log( 'MoneyTips inited', new Date().getTime() ); + } + /** + * 获取或设置 MoneyTips 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {MoneyTipsInstance} + */ + MoneyTips.getInstance = + function( _selector, _setter ){ + if( typeof _selector == 'string' && !/, 还可以通过 html 属性 bmtFormatOutput 指定单独的 _outputSelector + * @static + * @return _selector + */ + MoneyTips.format = + function( _selector, _outputSelector ){ + _selector && ( _selector = $( _selector ) ); + _outputSelector && ( _outputSelector = $( _outputSelector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.each( function(){ + var _item = $(this) + , _v + , _subOutputSelector = JC.f.parentSelector( _item, _item.attr( 'bmtFormatOutput' ) ) + , _floatLen = 2 + ; + + _item.is( '[floatLen]' ) && ( _floatLen = parseInt( _item.attr( 'floatLen' ) ) || 0 ); + + !( _subOutputSelector && _subOutputSelector.length ) && ( _subOutputSelector = _item ); + _outputSelector && _outputSelector.length && ( _subOutputSelector = _outputSelector ); + !( _subOutputSelector && _subOutputSelector.length ) && ( _subOutputSelector = _item ); + + if( 'value' in this ){ + _v = _item.val().trim(); + }else{ + _v = _item.html().trim(); + } + _v = _v || 0; + + if( 'value' in _subOutputSelector[0] ){ + _subOutputSelector.val( JC.f.moneyFormat( _v, 3, _floatLen ) ); + }else{ + _subOutputSelector.html( JC.f.moneyFormat( _v, 3, _floatLen ) ); + } + }); + + return _selector; + }; + + MoneyTips.getFloatLen = + function( _item ){ + var _r = 0; + _item && ( _item = $( _item ) ); + _item + && _item.length + && _item.is( '[floatLen]' ) + && ( _r = parseInt( _item.attr( 'floatLen' ) ) || 0 ) + ; + + return _r; + }; + + MoneyTips.prototype = { + _beforeInit: + function(){ + //JC.log( 'MoneyTips _beforeInit', new Date().getTime() ); + } + , _initHanlderEvent: + function(){ + var _p = this; + + _p._model.selector().on( 'focus blur ', function( _evt ){ + JC.log( 'focus or blur', new Date().getTime() ); + _p.trigger( 'BMTUpdate', [ _p._model.selector().val().trim() ] ); + }); + + _p._model.selector().bind( 'input propertychange', function( _evt ){ + JC.log( 'input or propertychange', new Date().getTime() ); + _p.trigger( 'BMTUpdate', [ _p._model.selector().val().trim() ] ); + }); + + _p.on( 'BMTUpdate', function( _evt, _number ){ + var _v = _number + , _number = JC.f.parseFinance( _v ) + , _formated + , _floatLen = 2 + , _dt = _p.selector().attr( 'datatype' ) + ; + + _dt.replace( /n\-[\d]+\.([\d]+)/, function( $0, $1 ){ + _floatLen = parseInt( $1 ) || _floatLen; + }); + if( _p.selector().is( '[floatLen]' ) ){ + _floatLen = MoneyTips.getFloatLen( _p.selector() ); + } + + if( isNaN( _number ) || !_number ) { + _p._view.update(); + return; + } + !_number && ( _number = 0 ); + _formated = JC.f.moneyFormat( _v, 3, _floatLen ); + _p._view.update( _formated ); + }); + } + , _inited: + function(){ + //JC.log( 'MoneyTips _inited', new Date().getTime() ); + var _p = this; + _p.trigger( 'BMTUpdate', [ _p._model.selector().val().trim() ] ); + } + /** + * 更新 tips 的值 + * @method update + * @param {int|string} _val + */ + , update: + function( _val ){ + this.trigger( 'BMTUpdate', [ _val || '' ] ); + return this; + } + }; + + BaseMVC.buildModel( MoneyTips ); + MoneyTips.Model._instanceName = 'MoneyTips'; + MoneyTips.Model.prototype = { + init: + function(){ + //JC.log( 'MoneyTips.Model.init:', new Date().getTime() ); + } + + , bmtDisplayLabel: + function(){ + this._bmtDisplayLabel = this._bmtDisplayLabel || this.selectorProp( 'bmtDisplayLabel' ); + + if( !( this._bmtDisplayLabel && this._bmtDisplayLabel.length ) ){ + this._bmtDisplayLabel = $( '' ); + this.selector().after( this._bmtDisplayLabel ); + } + + return this._bmtDisplayLabel; + } + + , bmtPattern: + function(){ + var _r = this.attrProp( 'bmtPattern' ) || '{0}'; + return _r; + } + }; + + BaseMVC.buildView( MoneyTips ); + MoneyTips.View.prototype = { + init: + function(){ + //JC.log( 'MoneyTips.View.init:', new Date().getTime() ); + } + + , show: + function(){ + this._model.bmtDisplayLabel().show(); + } + + , hide: + function(){ + this._model.bmtDisplayLabel().hide(); + } + + , update: + function( _val ){ + var _p = this; + if( !_val ){ + _p.hide(); + }else{ + _p._model.bmtDisplayLabel().html( JC.f.printf( _p._model.bmtPattern(), _val ) ); + _p.show(); + } + } + }; + + BaseMVC.build( MoneyTips, 'Bizs' ); + + $(document).ready( function(){ + var _insAr = 0; + MoneyTips.autoInit + && ( _insAr = MoneyTips.init() ) + && MoneyTips.format( $( 'span.js_bmtLabel, label.js_bmtLabel' ) ) + ; + }); + + $(document).delegate( 'input.js_bizMoneyTips', 'focus click', function( _evt ){ + !MoneyTips.getInstance( $(this) ) + && new MoneyTips( $(this) ) + ; + }); + + return Bizs.MoneyTips; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MoneyTips/_demo/demo.html b/bizs/MoneyTips/_demo/demo.html new file mode 100755 index 000000000..4bd4508cc --- /dev/null +++ b/bizs/MoneyTips/_demo/demo.html @@ -0,0 +1,95 @@ + + + + + AutoComplete + + + + + + + + +

Bizs.MoneyTips 示例

+
+
+
+ 金额: + + + +
+ +
+ 金额: + +
+ +
+ 金额: + + + + +
+ +
+ 金额: + +
+ + +
+ 金额范围: + + + + + +
+ +
+
+ + diff --git a/bizs/MoneyTips/_demo/index.php b/bizs/MoneyTips/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/MoneyTips/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MoneyTips/index.php b/bizs/MoneyTips/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/bizs/MoneyTips/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MoneyTips/res/default/style.css b/bizs/MoneyTips/res/default/style.css new file mode 100755 index 000000000..8d1c8b69c --- /dev/null +++ b/bizs/MoneyTips/res/default/style.css @@ -0,0 +1 @@ + diff --git a/bizs/MultiAutoComplete/MultiAutoComplete.js b/bizs/MultiAutoComplete/MultiAutoComplete.js new file mode 100755 index 000000000..2c127cd52 --- /dev/null +++ b/bizs/MultiAutoComplete/MultiAutoComplete.js @@ -0,0 +1,824 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.AutoComplete', 'JC.AutoChecked', 'JC.Placeholder', 'JC.Panel' ], function(){ +/** + * 级联 Suggest + * + *

require: + * JC.AutoComplete + * , JC.Placeholder + * , JC.Panel + *

+ * + *

JC Project Site + * | API docs + * | demo link

+ * + *

页面只要引用本脚本, 默认会自动处理 input[defaultMultiAutomComplete]

+ * + *

可用的 HTML attribute

+ * + *
+ *
defaultMultiAutomComplete = empty
+ *
声明第一级联动框
+ * + *
macUrl = url
+ *
获取数据的URL接口
+ * + *
macAddtionUrl = url
+ *
用于最后一级的附加数据接口, 如果所有父级没有选中内容, 将启用该接口
+ * + *
macAddtionBox = selector
+ *
指定用于保存选择内容的选择器
+ * + *
macAddtionBoxItemTpl = selector
+ *
保存内容项的模板
+ * + *
macAddtionBoxItemSelector = selector
+ *
保存内容项的选择器
+ * + *
macAddtionItemAddCallback = callback
+ *
添加保存内容项时的回调 + function macAddtionItemAddCallback( _item, _id, _label, _parent, _parentBox ){ + var _macIns = this; + JC.log( 'macAddtionItemAddCallback', _id, _label ); +} + *
+ * + *
macAddtionItemRemoveCallback = callback
+ *
删除保存内容项时的回调 +function macAddtionItemRemoveCallback( _item, _id, _label, _parent, _parentBox ){ + var _macIns = this; + JC.log( 'macAddtionItemRemoveCallback', _id, _label ); +} + *
+ * + *
+ * + * @namespace window.Bizs + * @class MultiAutoComplete + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +<div class="ui-sug-mod"> + <input type="text" class="ui-sug-ipt js_compAutoComplete js_k1" name="k1" value="" + autocomplete="off" + + cacPopup="/ul.js_compAutoCompleteBox" + cacLabelKey="data-label" + cacIdKey="data-id" + cacIdSelector="/input.js_k1_id" + cacStrictData="true" + cacDataFilter="cacDataFilter" + cacNoDataText="暂无数据!" + + cacPreventEnter="true" + + defaultMultiAutomComplete="" + macUrl="./data/shengshi_with_error_code.php?id=0" + macTarget="/input.js_k2" + + Placeholder="一级位置" + /> + <input type="hidden" value="14" class="js_k1_id" name="k1_id" /> + + <input type="text" class="ui-sug-ipt js_compAutoComplete js_k2" name="k2" value="" + autocomplete="off" + + cacPopup="/ul.js_compAutoCompleteBox" + cacLabelKey="data-label" + cacIdKey="data-id" + cacIdSelector="/input.js_k2_id" + cacStrictData="true" + cacDataFilter="cacDataFilter" + cacNoDataText="暂无数据!" + + cacPreventEnter="true" + + macUrl="./data/shengshi_with_error_code.php?id={0}" + macTarget="/input.js_k3" + Placeholder="二级位置" + /> + <input type="hidden" value="2341" class="js_k2_id" name="k2_id" /> + + <input type="text" class="ui-sug-ipt js_compAutoComplete js_k3" name="k3" value="区" + autocomplete="off" + Placeholder="三级位置" + + cacPopup="/ul.js_compAutoCompleteBox" + cacLabelKey="data-label" + cacIdKey="data-id" + cacStrictData="false" + cacDataFilter="cacDataFilter" + cacNoDataText="暂无数据!" + cacAddtionItem="true" + cacListItemTpl="/script.cacItemTpl" + + cacPreventEnter="true" + + macUrl="./data/shengshi_with_error_code.php?id={0}" + macAddtionUrl="./data/shengshi_with_error_code.php?id=0" + macAddtionBox="/.js_macAddtionBox" + macAddtionBoxItemTpl="/script.macAddtionBoxItemTpl" + macAddtionBoxItemSelector="> a" + macAddtionItemAddCallback="macAddtionItemAddCallback" + macAddtionItemRemoveCallback="macAddtionItemRemoveCallback" + /> + <span class="js_macAddtionBox" style="display:none;"> + <span class="js_macAddtionBoxList"> + <a href="javascript:" class="js_macAddtionBoxItem" data-id="2345" id="macAddtionBoxItemId_1_2345" data-label="枫溪区"> + <label>枫溪区</label> + <button type="button" class="AURemove"></button> + <input type="hidden" name="condition[]" value="2345"> + </a> + </span> + <a href="javascript:" class="js_macClearAddtionList"> + 清空<button type="button" class="AUClose"></button> + </a> + </span> + <script type="text/template" class="cacItemTpl"> + <li data-id="{0}" data-label="{1}" data-index="{2}" class="AC_listItem {3} js_macAddtionBoxItemClick"> + <a href="javascript:;" data-id="{0}" data-label="{1}" data-index="{2}" class="AC_control AC_customAdd">添加</a> + <label>{1} </label> + </li> + </script> + <script type="text/template" class="macAddtionBoxItemTpl"> + <a href="javascript:" class="js_macAddtionBoxItem" data-id="{0}" id="{2}" data-label="{1}"> + <label>{1}</label> + <button type="button" class="AURemove"></button> + <input type="hidden" name="condition[]" value="{0}" /> + </a> + </script> +</div> + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.use && ( + !JC.AutoComplete && JC.use( 'JC.AutoComplete' ) + , !JC.Placeholder && JC.use( 'JC.Placeholder' ) + , !JC.Panel && JC.use( 'JC.Panel' ) + ); + + Bizs.MultiAutoComplete = MultiAutoComplete; + + function MultiAutoComplete( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, MultiAutoComplete ) ) + return JC.BaseMVC.getInstance( _selector, MultiAutoComplete ); + + JC.BaseMVC.getInstance( _selector, MultiAutoComplete, this ); + + this._model = new MultiAutoComplete.Model( _selector ); + this._view = new MultiAutoComplete.View( this._model ); + + this._init(); + + JC.log( MultiAutoComplete.Model._instanceName, 'all inited', new Date().getTime() ); + } + Bizs.MultiAutoComplete.insCount = 1; + Bizs.MultiAutoComplete.AJAX_CACHE = {}; + /** + * 初始化可识别的 MultiAutoComplete 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of MultiAutoCompleteInstance} + */ + MultiAutoComplete.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.is( '[defaultMultiAutomComplete]' ) ){ + _r.push( new MultiAutoComplete( _selector ) ); + }else{ + _selector.find( 'input[defaultMultiAutomComplete]' ).each( function(){ + _r.push( new MultiAutoComplete( this ) ); + }); + } + } + return _r; + }; + + MultiAutoComplete.ajaxRandom = true; + + JC.BaseMVC.build( MultiAutoComplete ); + + JC.f.extendObject( MultiAutoComplete.prototype, { + _beforeInit: + function(){ + //JC.log( 'MultiAutoComplete _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited' , function(){ + _p.trigger( 'init_relationship' ); + _p.trigger( 'fix_id_callback' ); + _p.trigger( 'init_autoComplete' ); + _p.trigger( 'update_selector', [ _p.selector() ] ); + _p.trigger( 'init_user_input' ); + _p._model.ready( true ); + _p.trigger( 'inited_done' ); + }); + + _p.on( 'init_relationship', function( _evt ){ + _p._model.init_relationship(); + }); + + _p.on( 'fix_id_callback', function( _evt ){ + _p._model.fixIdCallback(); + }); + + _p.on( 'init_autoComplete', function( _evt ){ + _p._model.each( function( _selector ){ + var _acIns; + _selector.hasClass( 'js_compAutoComplete' ) + && !( _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete ) ) + && ( _acIns = new JC.AutoComplete( _selector ) ) + ; + + _acIns.on( 'after_inited', function( _evt ){ + _p.trigger( 'init_checked_status', [ _acIns ] ); + }); + }); + }); + + _p.on( 'update_selector', function( _evt, _selector, _ignoreClear ){ + if( !( _selector && _selector.length ) ) return; + + !_ignoreClear && _p.trigger( 'clear_selector', [ _selector ] ); + _p.trigger( 'ajax_data', [ _selector ] ); + }); + + _p.on( 'clear_selector', function( _evt, _selector ){ + if( !_p._model.ready() ) return; + _p._model.clearData( _selector ); + }); + + _p.on( 'ajax_data', function( _evt, _selector, _noTriggerAllUpdated ){ + if( !_selector ) return; + + _p._model.ajax_data( _selector, _noTriggerAllUpdated ); + }); + + _p.on( 'ajax_done', function( _evt, _data, _selector, _text, _noTriggerAllUpdated ){ + if( _data && _data.errorno == 0 ){ + _p.trigger( 'update', [ _data, _selector, _text, _noTriggerAllUpdated ] ); + }else{ + _p.trigger( 'ajax_error', [ _data, _selector, _text ] ); + } + }); + + _p.on( 'update', function( _evt, _data, _selector, _text, _noTriggerAllUpdated ){ + var _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete ) + , _nextSelector + , _macDefaultValue + ; + //JC.log( '_acIns:', _acIns ); + + if( !_acIns ) return; + _macDefaultValue = _p._model.macDefaultValue( _selector ) || undefined; + _acIns.update( _data.data, _macDefaultValue ); + + _nextSelector = _p._model.nextSelector( _selector ); + if( _nextSelector && _nextSelector.length && _data.data.length ){ + _p.trigger( 'update_selector', [ _nextSelector, true ] ); + }else{ + !_noTriggerAllUpdated && _p.trigger( 'all_updated' ); + if( _noTriggerAllUpdated ){ + _acIns._model.layoutPopup().find( 'span.cacMultiSelectBarTplLabel' ).hide(); + }else{ + _acIns._model.layoutPopup().find( 'span.cacMultiSelectBarTplLabel' ).show(); + } + } + }); + + _p.on( 'all_updated', function(){ + _p._model.checkLast(); + }); + + _p.on( 'init_user_input', function( _evt ){ + _p._model.each( function( _selector ){ + _selector.on( 'focus', function( _evt ){ + _selector.data( 'old_value', _selector.val() ); + }); + + _selector.on( 'blur', function( _evt ){ + + JC.f.safeTimeout( function(){ + var _oldValue = _selector.data( 'old_value' ) + , _newValue = _selector.val() + , _nextSelector + ; + + //JC.log( JC.f.printf( 'oldValue: {0}, newValue: {1}', _oldValue, _newValue ) ); + + if( _oldValue != _newValue ){ + _nextSelector = _p._model.nextSelector( _selector ); + + + _nextSelector + && _nextSelector.length + && _p.trigger( 'update_selector', [ _nextSelector ] ); + } + }, _selector, 'forMultiAutoCompleteSelectorBlur', 200 ); + }); + }); + }); + + _p.on( 'inited_done', function(){ + _p._model.each( function( _selector ){ + _p.trigger( 'init_addtionBox', [ _selector ] ); + }); + }); + + _p.on( 'init_addtionBox', function( _evt, _selector ){ + var _box = _p._model.macAddtionBox( _selector ), _boxList, _acIns; + if( !( _box && _box.length ) ) return; + _boxList = _box.find( '.js_macAddtionBoxList' ); + if( !( _boxList && _boxList.length ) ) return; + _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete ); + + _box.delegate( '.js_macClearAddtionList', 'click', function( _evt ){ + JC.confirm( '是否清空内容', this, 2, function( _evt ){ + _boxList.html( '' ); + _box.hide(); + }); + }); + + _box.delegate( '.js_macAddtionBoxItem', 'click', function( _evt ){ + var _sp = $( this ), _id = _sp.attr( 'data-id' ), _label = _sp.attr( 'data-label' ); + + _p._model.macAddtionItemRemoveCallback( _selector ) + && _p._model.macAddtionItemRemoveCallback( _selector ).call( _p, _sp, _id, _label, _boxList, _box ); + + _sp.remove(); + _p.trigger( 'update_list_box_status', [ _acIns, true ] ); + }); + + _p.trigger( 'update_list_box_status', [ _acIns, true ] ); + }); + + _p.on( 'update_list_box_status', function( _evt, _acIns, _ignoreCheckStatus ){ + var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList; + if( !( _box && _box.length ) ) return; + _boxList = _box.find( '.js_macAddtionBoxList' ); + if( !( _boxList && _boxList.length ) ) return; + + var _items = _boxList.find( _p._model.macAddtionBoxItemSelector( _selector ) ) + _items.length ? _box.show() : _box.hide(); + + !_ignoreCheckStatus && _p.trigger( 'update_checked_status', [ _acIns, true ] ); + }); + + _p.on( 'init_checked_status', function( _evt, _acIns ){ + + var _selector = _acIns.selector(); + + if( _selector.is( 'macAddtionBox' ) ) return; + + _acIns.on( 'after_popup_show', function( _evt ){ + //JC.log( 'after_popup_show', new Date().getTime() ); + }); + + _acIns.on( 'build_data', function(){ + _p.trigger( 'update_checked_show_status', [ _acIns ] ); + _p.trigger( 'fixed_checkAll_status', [ _acIns ] ); + }); + + _acIns._model.layoutPopup().delegate( 'input[schecktype=all]', 'change', function( _evt ){ + var _sp = $( this ); + _acIns._model.layoutPopup().find( 'input[schecktype=item]' ).prop( 'checked', _sp.prop( 'checked' ) ); + + _p.trigger( 'update_checked_status', [ _acIns ] ); + _p.trigger( 'fixed_checkAll_status', [ _acIns ] ); + }); + + _selector.on( 'cacItemClickHanlder', function( _evt, _sp, _acIns){ + JC.f.safeTimeout( function(){ + //_p.trigger( 'update_checked_status', [ _acIns ] ); + var _ckItem = _sp.find( 'input[schecktype=item]' ), _d; + if( !_ckItem.length ) return; + _d = { item: _ckItem }; + _p.trigger( 'update_list_item', [ _ckItem, _acIns ] ); + _p.trigger( 'item_checked', [ _d, _d.item.prop( 'checked' ) ] ); + _p.trigger( 'fixed_checkAll_status', [ _acIns ] ); + + }, _acIns, 'adfasdfasdf', 50 ); + }); + }); + + _p.on( 'fixed_checkAll_status', function( _evt, _acIns ){ + var _checked = true; + _acIns._model.layoutPopup().find( 'input[schecktype=item]' ).each( function( _evt ){ + var _sp = $( this ); + if( !_sp.prop( 'checked' ) ){ + _checked = false; + return false; + } + }); + + _acIns._model.layoutPopup().find( 'input[schecktype=all]' ).prop( 'checked', _checked ); + }); + + _p.on( 'update_list_item', function( _evt, _sp, _acIns ){ + var _d = { item: _sp }; + if( !_d.item.length ) return; + + var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList, _sitem, _isAdd; + if( !( _box && _box.length ) ) return; + _boxList = _box.find( '.js_macAddtionBoxList' ); + if( !( _boxList && _boxList.length ) ) return; + + if( _p._model.macAddtionBoxWithId( _selector ) ){ + _sitem = $( JC.f.printf( '#macAddtionBoxItemId_{0}_{1}', _p._model.insCount(), _d.item.val() ) ); + }else{ + _sitem = []; + _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) + '[data-id]' ).each( function(){ + if( $( this ).data( 'id' ) == _d.item.val() ){ + _sitem.push( this ); + } + }); + _sitem = jQuery( _sitem ); + } + + if( _d.item.prop( 'checked' ) ){ + if( !_sitem.length ){ + _p.trigger( 'add_list_item', [ _d.item, _acIns, _box, _boxList ] ); + _isAdd = true; + } + }else{ + _sitem.length && _sitem.remove(); + } + + JC.f.safeTimeout( function(){ + //if( !_acIns._model.layoutPopup().is( ':visible' ) ) return; + _isAdd && _p.trigger( 'sort_list_item', [ _boxList, _acIns ] ); + }, _p, 'SORT_LIST_ITEM', 1000 ); + }); + + _p.on( 'update_checked_status', function( _evt, _acIns, _preventRecursive ){ + if( !_acIns ) return; + var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList, _acIns; + if( !( _box && _box.length ) ) return; + _boxList = _box.find( '.js_macAddtionBoxList' ); + if( !( _boxList && _boxList.length ) ) return; + + var _popupItems = _acIns._model.layoutPopup().find( 'input[schecktype=item]' ) + , _popupItemAll = _acIns._model.layoutPopup().find( 'input[schecktype=all]' ) + , _listItems = _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) ) + ; + + + //JC.log( _popupItems.length, _popupItemAll.length, _listItems.length ); + if( !_popupItems.length ) return; + + var _listItemsObj = {}, _popupItemsObj= {}; + + _listItems.each( function(){ + var _listSp = $( this ); + _listItemsObj[ _listSp.attr( 'data-id' ) ] = { + item: _listSp + }; + + }); + + _popupItems.each( function( _ix ){ + var _sp = $( this ), _sitem; + _p.trigger( 'update_list_item', [ _sp, _acIns ] ); + }); + + !_preventRecursive && _p.trigger( 'update_list_box_status', [ _acIns ] ); + }); + + + _p.on( 'update_checked_show_status', function( _evt, _acIns ){ + if( !_acIns ) return; + var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList, _acIns; + if( !( _box && _box.length ) ) return; + _boxList = _box.find( '.js_macAddtionBoxList' ); + if( !( _boxList && _boxList.length ) ) return; + + var _popupItems = _acIns._model.layoutPopup().find( 'input[schecktype=item]' ) + , _popupItemAll = _acIns._model.layoutPopup().find( 'input[schecktype=all]' ) + , _listItems = _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) ) + ; + + if( !_popupItems.length ) return; + + var _allChecked = true, _popupItemsObj= {}; + + _popupItems.each( function(){ + var _sp = $( this ); + _popupItemsObj[ _sp.val() ] = { item: _sp }; + }); + + _listItems.each( function(){ + var _listSp = $( this ), _sitem; + if( _listSp.attr( 'data-id' ) in _popupItemsObj ){ + _p.trigger( 'item_checked', [ _popupItemsObj[ _listSp.attr( 'data-id' ) ], true ] ); + } + }); + }); + + _p.on( 'sort_list_item', function( _evt, _boxList, _acIns ){ + var _items = _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) ); + + _items.each( function(){ + var _item = $( this ), _id = _item.attr( 'data-id' ), _label = _item.attr( 'data-label' ); + _items.each( function(){ + var _sitem = $( this ), _sid = _sitem.attr( 'data-id' ), _slabel = _sitem.attr( 'data-label' ); + if( _id == _sid ) return; + + if( _label.localeCompare( _slabel ) > 0 ){ + _sitem.after( _item ); + } + }); + }); + }); + + _p.on( 'add_list_item', function( _evt, _sp, _acIns, _box, _boxList ){ + var _pnt = JC.f.getJqParent( _sp, 'li' ) + , _selector = _acIns.selector() + , _item + , _tpl = _p._model.macAddtionBoxItemTpl( _selector ) + , _id = _pnt.attr( 'data-id' ) + , _label = _pnt.attr( 'data-label' ) + ; + + _item = $( JC.f.printf( _tpl, _id, _label, _p._model.insCount() ) ); + _item.appendTo( _boxList ); + _item.attr( 'data-id', _id ); + _item.attr( 'data-label', _label ); + _box.show(); + }); + + _p.on( 'item_checked', function( _evt, _data, _checked ){ + _checked + ? JC.f.getJqParent( _data.item, 'li' ).addClass( 'macDisable' ) + : JC.f.getJqParent( _data.item, 'li' ).removeClass( 'macDisable' ); + _data.item.prop( 'checked', _checked ); + }); + + } + + , _inited: + function(){ + //JC.log( 'MultiAutoComplete _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + MultiAutoComplete.Model._instanceName = 'JCMultiAutoComplete'; + JC.f.extendObject( MultiAutoComplete.Model.prototype, { + init: + function(){ + //JC.log( 'MultiAutoComplete.Model.init:', new Date().getTime() ); + this.insCount( MultiAutoComplete.insCount++ ); + } + + , insCount: + function( _setter ){ + typeof _setter != 'undefined' && ( this._insCount = _setter ); + return this._insCount; + } + + , macAddtionBoxWithId: + function( _selector ){ + return JC.f.parseBool( _selector.attr( 'macAddtionBoxWithId' ) ); + } + + , macAddtionItemAddCallback: function( _selector ){ return this.callbackProp( _selector, 'macAddtionItemAddCallback' ); } + , macAddtionItemRemoveCallback: function( _selector ){ return this.callbackProp( _selector, 'macAddtionItemRemoveCallback' ); } + + , macAddtionBoxItemSelector: function( _selector ){ return this.attrProp( _selector, 'macAddtionBoxItemSelector' ); } + , macAddtionBoxItemTpl: + function( _selector ){ + return JC.f.scriptContent( this.selectorProp( _selector, 'macAddtionBoxItemTpl' ) ); + } + + , macAddtionBox: + function( _selector ){ + return this.selectorProp( _selector, 'macAddtionBox' ); + } + + , ready: + function( _setter ){ + typeof _setter != 'undefined' && ( this._ready = _setter ); + return this._ready; + } + + , clearData: + function( _selector ){ + var _p = this + , _nextSelector = _p.nextSelector( _selector ) + , _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete ) + ; + + _acIns && _acIns.clearAll(); + + _nextSelector && _p.clearData( _nextSelector ); + } + + , init_relationship: + function( _selector, _prevSelector ){ + var _p = this + , _selector = _selector || _p.selector() + , _nextSelector + ; + + _prevSelector && ( _selector.data( 'prevSelector', _prevSelector ) ); + + if( _selector.is( '[macTarget]' ) ){ + _nextSelector = JC.f.parentSelector( _selector, _selector.attr( 'macTarget' ) ); + if( ( _nextSelector && _nextSelector.length ) ){ + _selector.data( 'nextSelector', _nextSelector ); + _p.init_relationship( _nextSelector, _selector ); + //JC.log( _selector.attr( 'macTarget' ) ); + } + }else{ + _p.lastSelecotr( _selector ); + } + } + + , fixIdCallback: + function(){ + var _p = this; + _p.each( function( _selector ){ + //JC.log( _selector.attr( 'name' ) ); + !_selector.is( '[macIdCallback]' ) + && _selector.attr( 'macIdCallback', 'MultiAutoCompleteIdCallback' ) + ; + + !_selector.is( '[cacDataFilter]' ) + && _selector.attr( 'cacDataFilter', 'MultiAutoCompleteDataFilter' ); + }); + } + + , firstSelector: function(){ return this.selector(); } + + , lastSelecotr: + function( _selector ){ + _selector && ( this._lastSelecotr = _selector ); + return this._lastSelecotr; + } + + , nextSelector: + function( _selector ){ + if( _selector ){ + return $( _selector ).data( 'nextSelector' ); + } + } + + , prevSelector: + function( _selector ){ + if( _selector ){ + return $( _selector ).data( 'prevSelector' ); + } + } + + , macAddtionUrl: function( _selector ){ return _selector.attr( 'macAddtionUrl' ); } + + , checkLast: + function(){ + var _p = this + , _last = _p.lastSelecotr() + , _tmpSelector = _p.prevSelector( _last ) + , _hasValue + ; + + while( _tmpSelector && _tmpSelector.length ){ + _tmpSelector.val() && ( _hasValue = true ); + if( _hasValue ) break; + _tmpSelector = _p.prevSelector( _tmpSelector ); + } + + !_hasValue + && _p.macAddtionUrl( _last ) + && _p.ajax_data( _last, true, _p.macAddtionUrl( _last ) ) + ; + } + + , ajax_data: + function( _selector, _noTriggerAllUpdated, _addUrl ){ + var _p = this + , _url = _addUrl || _selector.attr( 'macUrl' ) + , _prevSelector + , _parentId + ; + if( !_url ) return; + + _p.ajax_random( _selector ) && ( _url = JC.f.addUrlParams( _url, { rnd: 0 } ) ); + + _prevSelector = _p.prevSelector( _selector ); + + if( _prevSelector && _prevSelector.length ){ + _parentId = _p.macDefaultValue( _prevSelector ); + + if( !_parentId ){ + !_noTriggerAllUpdated && _p.trigger( 'all_updated' ); + if( !_noTriggerAllUpdated ) return; + } + _url = JC.f.printf( _url, _parentId ); + } + + if( _url in MultiAutoComplete.AJAX_CACHE ){ + _p.trigger( 'ajax_done', [ MultiAutoComplete.AJAX_CACHE[ _url ], _selector, '', _noTriggerAllUpdated ] ); + }else{ + $.get( _url ).done( function( _text ){ + //JC.log( _text ); + var _data = $.parseJSON( _text ); + MultiAutoComplete.AJAX_CACHE[ _url ] = _data; + _p.trigger( 'ajax_done', [ _data, _selector, _text, _noTriggerAllUpdated ] ); + }); + } + + } + + , ajax_random: + function( _selector ){ + var _r = MultiAutoComplete.ajaxRandom; + _selector.is( '[macAjaxRandom]' ) + && ( _r = JC.f.parseBool( _selector.attr( 'macAjaxRandom' ) ) ); + return _r; + } + + , each: + function( _cb, _selector ){ + var _p = this, _nextSelector; + _selector = _selector || _p.selector(); + + if( _selector && _selector.length ){ + _cb.call( _p, _selector ); + _nextSelector = _p.nextSelector( _selector ); + + _nextSelector + && _nextSelector.length + && _p.each( _cb, _nextSelector ) + ; + } + } + + , macDefaultValue: + function( _selector ){ + var _r = _selector.attr( 'macDefaultValue' ), _idSelector; + + if( _selector.is( '[cacIdSelector]' ) ){ + _idSelector = JC.f.parentSelector( _selector, _selector.attr( 'cacIdSelector' ) ); + + _idSelector + && _idSelector.length + && ( _r = _idSelector.val() ); + } + + return _r; + } + }); + + JC.f.extendObject( MultiAutoComplete.View.prototype, { + init: + function(){ + //JC.log( 'MultiAutoComplete.View.init:', new Date().getTime() ); + } + }); + + window.MultiAutoCompleteIdCallback = + function(){ + }; + + window.MultiAutoCompleteDataFilter = + function ( _json ){ + if( _json.data && _json.data.length ){ + _json = _json.data; + } + + $.each( _json, function( _ix, _item ){ + _item.length && + ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } ) + ; + }); + return _json; + }; + + _jdoc.ready( function(){ + JC.f.safeTimeout( function(){ + MultiAutoComplete.autoInit && MultiAutoComplete.init(); + }, null, 'MultiAutoCompleteInit', 5 ); + }); + + return Bizs.MultiAutoComplete; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiAutoComplete/_demo/data/SHENGSHI.js b/bizs/MultiAutoComplete/_demo/data/SHENGSHI.js new file mode 100755 index 000000000..7c149c09d --- /dev/null +++ b/bizs/MultiAutoComplete/_demo/data/SHENGSHI.js @@ -0,0 +1 @@ +SHENGSHI = [["28","\u5317\u4eac ","0"],["3705","\u4e1c\u57ce\u533a ","28"],["3706","\u897f\u57ce\u533a ","28"],["3708","\u5d07\u6587\u533a ","28"],["3709","\u5ba3\u6b66\u533a ","28"],["3710","\u671d\u9633\u533a ","28"],["3711","\u4e30\u53f0\u533a ","28"],["3712","\u77f3\u666f\u5c71\u533a ","28"],["3713","\u6d77\u6dc0\u533a ","28"],["3714","\u95e8\u5934\u6c9f\u533a ","28"],["3715","\u623f\u5c71\u533a ","28"],["3716","\u901a\u5dde\u533a ","28"],["3718","\u987a\u4e49\u533a ","28"],["3719","\u660c\u5e73\u533a ","28"],["3720","\u5927\u5174\u533a ","28"],["3721","\u6000\u67d4\u533a ","28"],["3722","\u5e73\u8c37\u533a ","28"],["3723","\u5bc6\u4e91\u53bf ","28"],["3724","\u5ef6\u5e86\u53bf ","28"],["29","\u5929\u6d25 ","0"],["3726","\u548c\u5e73\u533a ","29"],["3727","\u6cb3\u4e1c\u533a ","29"],["3728","\u6cb3\u897f\u533a ","29"],["3729","\u5357\u5f00\u533a ","29"],["3730","\u6cb3\u5317\u533a ","29"],["3731","\u7ea2\u6865\u533a ","29"],["3732","\u5858\u6cbd\u533a ","29"],["3733","\u6c49\u6cbd\u533a ","29"],["3734","\u5927\u6e2f\u533a ","29"],["3735","\u4e1c\u4e3d\u533a ","29"],["3736","\u897f\u9752\u533a ","29"],["35","\u6d25\u5357\u533a ","29"],["36","\u5317\u8fb0\u533a ","29"],["37","\u6b66\u6e05\u533a ","29"],["38","\u5b9d\u577b\u533a ","29"],["39","\u5b81\u6cb3\u53bf ","29"],["40","\u9759\u6d77\u53bf ","29"],["41","\u84df\u53bf ","29"],["34","\u6cb3\u5317\u7701 ","0"],["44","\u77f3\u5bb6\u5e84\u5e02 ","34"],["45","\u957f\u5b89\u533a ","44"],["46","\u6865\u4e1c\u533a ","44"],["47","\u6865\u897f\u533a ","44"],["48","\u65b0\u534e\u533a ","44"],["49","\u4e95\u9649\u77ff\u533a ","44"],["50","\u88d5\u534e\u533a ","44"],["51","\u4e95\u9649\u53bf ","44"],["52","\u6b63\u5b9a\u53bf ","44"],["53","\u683e\u57ce\u53bf ","44"],["54","\u884c\u5510\u53bf ","44"],["55","\u7075\u5bff\u53bf ","44"],["56","\u9ad8\u9091\u53bf ","44"],["57","\u6df1\u6cfd\u53bf ","44"],["58","\u8d5e\u7687\u53bf ","44"],["59","\u65e0\u6781\u53bf ","44"],["60","\u5e73\u5c71\u53bf ","44"],["61","\u5143\u6c0f\u53bf ","44"],["62","\u8d75\u53bf ","44"],["63"," \u8f9b\u96c6\u5e02 ","44"],["64","\u85c1\u57ce\u5e02 ","44"],["65","\u664b\u5dde\u5e02 ","44"],["66","\u65b0\u4e50\u5e02 ","44"],["67","\u9e7f\u6cc9\u5e02 ","44"],["69","\u5510\u5c71\u5e02 ","34"],["70","\u8def\u5357\u533a ","69"],["270","\u77ff\u533a ","268"],["271","\u90ca\u533a ","268"],["272","\u5e73\u5b9a\u53bf ","268"],["273","\u76c2\u53bf ","268"],["275","\u957f\u6cbb\u5e02 ","1"],["276","\u957f\u6cbb\u53bf ","275"],["277","\u8944\u57a3\u53bf ","275"],["278","\u5c6f\u7559\u53bf ","275"],["279","\u5e73\u987a\u53bf ","275"],["280","\u9ece\u57ce\u53bf ","275"],["281","\u58f6\u5173\u53bf ","275"],["282","\u957f\u5b50\u53bf ","275"],["283","\u6b66\u4e61\u53bf ","275"],["284","\u6c81\u53bf ","275"],["285","\u6c81\u6e90\u53bf ","275"],["286","\u6f5e\u57ce\u5e02 ","275"],["287","\u57ce\u533a ","275"],["288","\u90ca\u533a ","275"],["289","\u9ad8\u65b0\u533a ","275"],["291","\u664b\u57ce\u5e02 ","1"],["292","\u57ce\u533a ","291"],["293","\u6c81\u6c34\u53bf ","291"],["294","\u9633\u57ce\u53bf ","291"],["295","\u9675\u5ddd\u53bf ","291"],["296","\u6cfd\u5dde\u53bf ","291"],["297","\u9ad8\u5e73\u5e02 ","291"],["299","\u6714\u5dde\u5e02 ","1"],["300","\u6714\u57ce\u533a ","299"],["301","\u5e73\u9c81\u533a ","299"],["302","\u5c71\u9634\u53bf ","299"],["303","\u5e94\u53bf ","299"],["304","\u53f3\u7389\u53bf ","299"],["305","\u6000\u4ec1\u53bf ","299"],["307","\u664b\u4e2d\u5e02 ","1"],["308","\u6986\u6b21\u533a ","307"],["309","\u6986\u793e\u53bf ","307"],["310","\u5de6\u6743\u53bf ","307"],["311","\u548c\u987a\u53bf ","307"],["312","\u6614\u9633\u53bf ","307"],["313","\u5bff\u9633\u53bf ","307"],["314","\u592a\u8c37\u53bf ","307"],["315","\u7941\u53bf ","307"],["316","\u5e73\u9065\u53bf ","307"],["317","\u7075\u77f3\u53bf ","307"],["318","\u4ecb\u4f11\u5e02 ","307"],["320","\u8fd0\u57ce\u5e02 ","1"],["321","\u76d0\u6e56\u533a ","320"],["322","\u4e34\u7317\u53bf ","320"],["323","\u4e07\u8363\u53bf ","320"],["324","\u95fb\u559c\u53bf ","320"],["325","\u7a37\u5c71\u53bf ","320"],["326","\u65b0\u7edb\u53bf ","320"],["327","\u7edb\u53bf ","320"],["328","\u57a3\u66f2\u53bf ","320"],["329","\u590f\u53bf ","320"],["330"," \u5e73\u9646\u53bf ","320"],["331","\u82ae\u57ce\u53bf ","320"],["332","\u6c38\u6d4e\u5e02 ","320"],["333","\u6cb3\u6d25\u5e02 ","320"],["71","\u8def\u5317\u533a ","69"],["72","\u53e4\u51b6\u533a ","69"],["73","\u5f00\u5e73\u533a ","69"],["74","\u4e30\u5357\u533a ","69"],["75","\u4e30\u6da6\u533a ","69"],["76","\u6ee6\u53bf ","69"],["77","\u6ee6\u5357\u53bf ","69"],["78","\u4e50\u4ead\u53bf ","69"],["79","\u8fc1\u897f\u53bf ","69"],["80","\u7389\u7530\u53bf ","69"],["81","\u5510\u6d77\u53bf ","69"],["82","\u9075\u5316\u5e02 ","69"],["83","\u8fc1\u5b89\u5e02 ","69"],["85","\u79e6\u7687\u5c9b\u5e02 ","34"],["86","\u6d77\u6e2f\u533a ","85"],["87","\u5c71\u6d77\u5173\u533a ","85"],["88","\u5317\u6234\u6cb3\u533a ","85"],["89","\u9752\u9f99\u6ee1\u65cf\u81ea\u6cbb\u53bf ","85"],["90","\u660c\u9ece\u53bf ","85"],["91","\u629a\u5b81\u53bf ","85"],["92","\u5362\u9f99\u53bf ","85"],["94","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","85"],["95","\u90af\u90f8\u5e02 ","34"],["96","\u90af\u5c71\u533a ","95"],["97","\u4e1b\u53f0\u533a ","95"],["98","\u590d\u5174\u533a ","95"],["99","\u5cf0\u5cf0\u77ff\u533a ","95"],["100","\u90af\u90f8\u53bf ","95"],["101","\u4e34\u6f33\u53bf ","95"],["102","\u6210\u5b89\u53bf ","95"],["103","\u5927\u540d\u53bf ","95"],["104","\u6d89\u53bf ","95"],["105"," \u78c1\u53bf ","95"],["106","\u80a5\u4e61\u53bf ","95"],["107","\u6c38\u5e74\u53bf ","95"],["108","\u90b1\u53bf ","95"],["109","\u9e21\u6cfd\u53bf ","95"],["110","\u5e7f\u5e73\u53bf ","95"],["111","\u9986\u9676\u53bf ","95"],["112","\u9b4f\u53bf ","95"],["113"," \u66f2\u5468\u53bf ","95"],["114","\u6b66\u5b89\u5e02 ","95"],["116","\u90a2\u53f0\u5e02 ","34"],["117","\u6865\u4e1c\u533a ","116"],["118","\u6865\u897f\u533a ","116"],["119","\u90a2\u53f0\u53bf ","116"],["120","\u4e34\u57ce\u53bf ","116"],["121","\u5185\u4e18\u53bf ","116"],["122","\u67cf\u4e61\u53bf ","116"],["123","\u9686\u5c27\u53bf ","116"],["124","\u4efb\u53bf ","116"],["125","\u5357\u548c\u53bf ","116"],["126","\u5b81\u664b\u53bf ","116"],["127","\u5de8\u9e7f\u53bf ","116"],["128","\u65b0\u6cb3\u53bf ","116"],["129","\u5e7f\u5b97\u53bf ","116"],["130","\u5e73\u4e61\u53bf ","116"],["131","\u5a01\u53bf ","116"],["132","\u6e05\u6cb3\u53bf ","116"],["133","\u4e34\u897f\u53bf ","116"],["134","\u5357\u5bab\u5e02 ","116"],["135","\u6c99\u6cb3\u5e02 ","116"],["137","\u4fdd\u5b9a\u5e02 ","34"],["138","\u65b0\u5e02\u533a ","137"],["139","\u5317\u5e02\u533a ","137"],["140","\u5357\u5e02\u533a ","137"],["141","\u6ee1\u57ce\u53bf ","137"],["142","\u6e05\u82d1\u53bf ","137"],["143","\u6d9e\u6c34\u53bf ","137"],["144","\u961c\u5e73\u53bf ","137"],["145","\u5f90\u6c34\u53bf ","137"],["146","\u5b9a\u5174\u53bf ","137"],["147","\u5510\u53bf ","137"],["148","\u9ad8\u9633\u53bf ","137"],["149","\u5bb9\u57ce\u53bf ","137"],["150","\u6d9e\u6e90\u53bf ","137"],["151","\u671b\u90fd\u53bf ","137"],["152","\u5b89\u65b0\u53bf ","137"],["153","\u6613\u53bf ","137"],["154","\u66f2\u9633\u53bf ","137"],["155","\u8821\u53bf ","137"],["156","\u987a\u5e73\u53bf ","137"],["157","\u535a\u91ce\u53bf ","137"],["158","\u96c4\u53bf ","137"],["159","\u6dbf\u5dde\u5e02 ","137"],["160","\u5b9a\u5dde\u5e02 ","137"],["161","\u5b89\u56fd\u5e02 ","137"],["162","\u9ad8\u7891\u5e97\u5e02 ","137"],["163","\u9ad8\u5f00\u533a ","137"],["165","\u5f20\u5bb6\u53e3\u5e02 ","34"],["166","\u6865\u4e1c\u533a ","165"],["167","\u6865\u897f\u533a ","165"],["168","\u5ba3\u5316\u533a ","165"],["169","\u4e0b\u82b1\u56ed\u533a ","165"],["170","\u5ba3\u5316\u53bf ","165"],["171","\u5f20\u5317\u53bf ","165"],["172","\u5eb7\u4fdd\u53bf ","165"],["173","\u6cbd\u6e90\u53bf ","165"],["174","\u5c1a\u4e49\u53bf ","165"],["175","\u851a\u53bf ","165"],["176","\u9633\u539f\u53bf ","165"],["177"," \u6000\u5b89\u53bf ","165"],["178","\u4e07\u5168\u53bf ","165"],["179","\u6000\u6765\u53bf ","165"],["180","\u6dbf\u9e7f\u53bf ","165"],["181","\u8d64\u57ce\u53bf ","165"],["182","\u5d07\u793c\u53bf ","165"],["184","\u627f\u5fb7\u5e02 ","34"],["185","\u53cc\u6865\u533a ","184"],["186","\u53cc\u6ee6\u533a ","184"],["187","\u9e70\u624b\u8425\u5b50\u77ff\u533a ","184"],["188","\u627f\u5fb7\u53bf ","184"],["189","\u5174\u9686\u53bf ","184"],["190","\u5e73\u6cc9\u53bf ","184"],["191","\u6ee6\u5e73\u53bf ","184"],["192","\u9686\u5316\u53bf ","184"],["193","\u4e30\u5b81\u6ee1\u65cf\u81ea\u6cbb\u53bf ","184"],["194","\u5bbd\u57ce\u6ee1\u65cf\u81ea\u6cbb\u53bf ","184"],["195","\u56f4\u573a\u6ee1\u65cf\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","184"],["197","\u6ca7\u5dde\u5e02 ","34"],["198","\u65b0\u534e\u533a ","197"],["199","\u8fd0\u6cb3\u533a ","197"],["200","\u6ca7\u53bf ","197"],["201","\u9752\u53bf ","197"],["202","\u4e1c\u5149\u53bf ","197"],["203"," \u6d77\u5174\u53bf ","197"],["204","\u76d0\u5c71\u53bf ","197"],["205","\u8083\u5b81\u53bf ","197"],["206","\u5357\u76ae\u53bf ","197"],["207","\u5434\u6865\u53bf ","197"],["208","\u732e\u53bf ","197"],["209","\u5b5f\u6751\u56de\u65cf\u81ea\u6cbb\u53bf ","197"],["210","\u6cca\u5934\u5e02 ","197"],["211","\u4efb\u4e18\u5e02 ","197"],["212","\u9ec4\u9a85\u5e02 ","197"],["213","\u6cb3\u95f4\u5e02 ","197"],["215","\u5eca\u574a\u5e02 ","34"],["216","\u5b89\u6b21\u533a ","215"],["217","\u5e7f\u9633\u533a ","215"],["218","\u56fa\u5b89\u53bf ","215"],["219","\u6c38\u6e05\u53bf ","215"],["220","\u9999\u6cb3\u53bf ","215"],["221","\u5927\u57ce\u53bf ","215"],["222","\u6587\u5b89\u53bf ","215"],["223","\u5927\u5382\u56de\u65cf\u81ea\u6cbb\u53bf ","215"],["224","\u5f00\u53d1\u533a ","215"],["225","\u71d5\u90ca\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","215"],["226","\u9738\u5dde\u5e02 ","215"],["227","\u4e09\u6cb3\u5e02 ","215"],["229","\u8861\u6c34\u5e02 ","34"],["230","\u6843\u57ce\u533a ","229"],["231","\u67a3\u5f3a\u53bf ","229"],["232","\u6b66\u9091\u53bf ","229"],["233","\u6b66\u5f3a\u53bf ","229"],["234","\u9976\u9633\u53bf ","229"],["235","\u5b89\u5e73\u53bf ","229"],["236","\u6545\u57ce\u53bf ","229"],["237","\u666f\u53bf ","229"],["238","\u961c\u57ce\u53bf ","229"],["239","\u5180\u5dde\u5e02 ","229"],["240","\u6df1\u5dde\u5e02 ","229"],["1","\u5c71\u897f\u7701 ","0"],["243","\u592a\u539f\u5e02 ","1"],["244","\u5c0f\u5e97\u533a ","243"],["245","\u8fce\u6cfd\u533a ","243"],["246","\u674f\u82b1\u5cad\u533a ","243"],["247","\u5c16\u8349\u576a\u533a ","243"],["248","\u4e07\u67cf\u6797\u533a ","243"],["249","\u664b\u6e90\u533a ","243"],["250","\u6e05\u5f90\u53bf ","243"],["251","\u9633\u66f2\u53bf ","243"],["252","\u5a04\u70e6\u53bf ","243"],["253","\u53e4\u4ea4\u5e02 ","243"],["255","\u5927\u540c\u5e02 ","1"],["256","\u57ce\u533a ","255"],["257","\u77ff\u533a ","255"],["258","\u5357\u90ca\u533a ","255"],["259","\u65b0\u8363\u533a ","255"],["260","\u9633\u9ad8\u53bf ","255"],["261","\u5929\u9547\u53bf ","255"],["262","\u5e7f\u7075\u53bf ","255"],["263","\u7075\u4e18\u53bf ","255"],["264","\u6d51\u6e90\u53bf ","255"],["265","\u5de6\u4e91\u53bf ","255"],["266","\u5927\u540c\u53bf ","255"],["268","\u9633\u6cc9\u5e02 ","1"],["269","\u57ce\u533a ","268"],["798","\u5b9d\u6e05\u53bf ","791"],["799","\u9976\u6cb3\u53bf ","791"],["801","\u5927\u5e86\u5e02 ","4"],["802","\u8428\u5c14\u56fe\u533a ","801"],["803","\u9f99\u51e4\u533a ","801"],["804","\u8ba9\u80e1\u8def\u533a ","801"],["805","\u7ea2\u5c97\u533a ","801"],["806","\u5927\u540c\u533a ","801"],["807","\u8087\u5dde\u53bf ","801"],["808","\u8087\u6e90\u53bf ","801"],["809","\u6797\u7538\u53bf ","801"],["810","\u675c\u5c14\u4f2f\u7279\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","801"],["812","\u4f0a\u6625\u5e02 ","4"],["813","\u4f0a\u6625\u533a ","812"],["814","\u5357\u5c94\u533a ","812"],["815","\u53cb\u597d\u533a ","812"],["816","\u897f\u6797\u533a ","812"],["817","\u7fe0\u5ce6\u533a ","812"],["818","\u65b0\u9752\u533a ","812"],["819","\u7f8e\u6eaa\u533a ","812"],["820","\u91d1\u5c71\u5c6f\u533a ","812"],["821","\u4e94\u8425\u533a ","812"],["822","\u4e4c\u9a6c\u6cb3\u533a ","812"],["823","\u6c64\u65fa\u6cb3\u533a ","812"],["824","\u5e26\u5cad\u533a ","812"],["825","\u4e4c\u4f0a\u5cad\u533a ","812"],["826","\u7ea2\u661f\u533a ","812"],["827","\u4e0a\u7518\u5cad\u533a ","812"],["828","\u5609\u836b\u53bf ","812"],["829","\u94c1\u529b\u5e02 ","812"],["831","\u4f73\u6728\u65af\u5e02 ","4"],["832","\u6c38\u7ea2\u533a ","831"],["833","\u5411\u9633\u533a ","831"],["834","\u524d\u8fdb\u533a ","831"],["835","\u4e1c\u98ce\u533a ","831"],["836","\u90ca\u533a ","831"],["837","\u6866\u5357\u53bf ","831"],["838"," \u6866\u5ddd\u53bf ","831"],["839","\u6c64\u539f\u53bf ","831"],["840","\u629a\u8fdc\u53bf ","831"],["841","\u540c\u6c5f\u5e02 ","831"],["842","\u5bcc\u9526\u5e02 ","831"],["844","\u4e03\u53f0\u6cb3\u5e02 ","4"],["845","\u65b0\u5174\u533a ","844"],["846","\u6843\u5c71\u533a ","844"],["847","\u8304\u5b50\u6cb3\u533a ","844"],["848","\u52c3\u5229\u53bf ","844"],["850","\u7261\u4e39\u6c5f\u5e02 ","4"],["851","\u4e1c\u5b89\u533a ","850"],["852","\u9633\u660e\u533a ","850"],["853","\u7231\u6c11\u533a ","850"],["854","\u897f\u5b89\u533a ","850"],["855","\u4e1c\u5b81\u53bf ","850"],["856","\u6797\u53e3\u53bf ","850"],["857","\u7ee5\u82ac\u6cb3\u5e02 ","850"],["858","\u6d77\u6797\u5e02 ","850"],["859","\u5b81\u5b89\u5e02 ","850"],["860","\u7a46\u68f1\u5e02 ","850"],["862","\u9ed1\u6cb3\u5e02 ","4"],["863","\u7231\u8f89\u533a ","862"],["335","\u5ffb\u5dde\u5e02 ","1"],["336","\u5ffb\u5e9c\u533a ","335"],["337","\u5b9a\u8944\u53bf ","335"],["338","\u4e94\u53f0\u53bf ","335"],["339","\u4ee3\u53bf ","335"],["340","\u7e41\u5cd9\u53bf ","335"],["341","\u5b81\u6b66\u53bf ","335"],["342","\u9759\u4e50\u53bf ","335"],["343","\u795e\u6c60\u53bf ","335"],["344","\u4e94\u5be8\u53bf ","335"],["345","\u5ca2\u5c9a\u53bf ","335"],["346","\u6cb3\u66f2\u53bf ","335"],["347","\u4fdd\u5fb7\u53bf ","335"],["348","\u504f\u5173\u53bf ","335"],["349","\u539f\u5e73\u5e02 ","335"],["351","\u4e34\u6c7e\u5e02 ","1"],["352","\u5c27\u90fd\u533a ","351"],["353","\u66f2\u6c83\u53bf ","351"],["354","\u7ffc\u57ce\u53bf ","351"],["355","\u8944\u6c7e\u53bf ","351"],["356","\u6d2a\u6d1e\u53bf ","351"],["357","\u53e4\u53bf ","351"],["358","\u5b89\u6cfd\u53bf ","351"],["359","\u6d6e\u5c71\u53bf ","351"],["360","\u5409\u53bf ","351"],["361","\u4e61\u5b81\u53bf ","351"],["362"," \u5927\u5b81\u53bf ","351"],["363","\u96b0\u53bf ","351"],["364","\u6c38\u548c\u53bf ","351"],["365","\u84b2\u53bf ","351"],["366","\u6c7e\u897f\u53bf ","351"],["367","\u4faf\u9a6c\u5e02 ","351"],["368","\u970d\u5dde\u5e02 ","351"],["370","\u5415\u6881\u5e02 ","1"],["371","\u79bb\u77f3\u533a ","370"],["372","\u6587\u6c34\u53bf ","370"],["373","\u4ea4\u57ce\u53bf ","370"],["374","\u5174\u53bf ","370"],["375","\u4e34\u53bf ","370"],["376","\u67f3\u6797\u53bf ","370"],["377","\u77f3\u697c\u53bf ","370"],["378","\u5c9a\u53bf ","370"],["379","\u65b9\u5c71\u53bf ","370"],["380","\u4e2d\u9633\u53bf ","370"],["381","\u4ea4\u53e3\u53bf ","370"],["382","\u5b5d\u4e49\u5e02 ","370"],["383","\u6c7e\u9633\u5e02 ","370"],["23","\u5185\u8499\u53e4\u81ea\u6cbb\u533a ","0"],["386","\u547c\u548c\u6d69\u7279\u5e02 ","23"],["387","\u65b0\u57ce\u533a ","386"],["388","\u56de\u6c11\u533a ","386"],["389","\u7389\u6cc9\u533a ","386"],["390","\u8d5b\u7f55\u533a ","386"],["391","\u571f\u9ed8\u7279\u5de6\u65d7 ","386"],["392","\u6258\u514b\u6258\u53bf ","386"],["393","\u548c\u6797\u683c\u5c14\u53bf ","386"],["394","\u6e05\u6c34\u6cb3\u53bf ","386"],["395","\u6b66\u5ddd\u53bf ","386"],["397","\u5305\u5934\u5e02 ","23"],["398","\u4e1c\u6cb3\u533a ","397"],["399","\u6606\u90fd\u4ed1\u533a ","397"],["400","\u9752\u5c71\u533a ","397"],["401","\u77f3\u62d0\u533a ","397"],["402","\u767d\u4e91\u77ff\u533a ","397"],["403","\u4e5d\u539f\u533a ","397"],["404","\u571f\u9ed8\u7279\u53f3\u65d7 ","397"],["405","\u56fa\u9633\u53bf ","397"],["406","\u8fbe\u5c14\u7f55\u8302\u660e\u5b89\u8054\u5408\u65d7 ","397"],["408","\u4e4c\u6d77\u5e02 ","23"],["409","\u6d77\u52c3\u6e7e\u533a ","408"],["410","\u6d77\u5357\u533a ","408"],["411","\u4e4c\u8fbe\u533a ","408"],["413","\u8d64\u5cf0\u5e02 ","23"],["414","\u7ea2\u5c71\u533a ","413"],["415","\u5143\u5b9d\u5c71\u533a ","413"],["416","\u677e\u5c71\u533a ","413"],["417","\u963f\u9c81\u79d1\u5c14\u6c81\u65d7 ","413"],["418","\u5df4\u6797\u5de6\u65d7 ","413"],["419","\u5df4\u6797\u53f3\u65d7 ","413"],["420","\u6797\u897f\u53bf ","413"],["421","\u514b\u4ec0\u514b\u817e\u65d7 ","413"],["422","\u7fc1\u725b\u7279\u65d7 ","413"],["423","\u5580\u5587\u6c81\u65d7 ","413"],["424","\u5b81\u57ce\u53bf ","413"],["425","\u6556\u6c49\u65d7 ","413"],["427","\u901a\u8fbd\u5e02 ","23"],["428","\u79d1\u5c14\u6c81\u533a ","427"],["429","\u79d1\u5c14\u6c81\u5de6\u7ffc\u4e2d\u65d7 ","427"],["430","\u79d1\u5c14\u6c81\u5de6\u7ffc\u540e\u65d7 ","427"],["431","\u5f00\u9c81\u53bf ","427"],["432","\u5e93\u4f26\u65d7 ","427"],["433","\u5948\u66fc\u65d7 ","427"],["434","\u624e\u9c81\u7279\u65d7 ","427"],["435","\u970d\u6797\u90ed\u52d2\u5e02 ","427"],["437","\u9102\u5c14\u591a\u65af\u5e02 ","23"],["438","\u4e1c\u80dc\u533a ","437"],["439","\u8fbe\u62c9\u7279\u65d7 ","437"],["440","\u51c6\u683c\u5c14\u65d7 ","437"],["441","\u9102\u6258\u514b\u524d\u65d7 ","437"],["442","\u9102\u6258\u514b\u65d7 ","437"],["443","\u676d\u9526\u65d7 ","437"],["444","\u4e4c\u5ba1\u65d7 ","437"],["445","\u4f0a\u91d1\u970d\u6d1b\u65d7 ","437"],["447","\u547c\u4f26\u8d1d\u5c14\u5e02 ","23"],["448","\u6d77\u62c9\u5c14\u533a ","447"],["449","\u963f\u8363\u65d7 ","447"],["450","\u83ab\u529b\u8fbe\u74e6\u8fbe\u65a1\u5c14\u65cf\u81ea\u6cbb\u65d7 ","447"],["451","\u9102\u4f26\u6625\u81ea\u6cbb\u65d7 ","447"],["452","\u9102\u6e29\u514b\u65cf\u81ea\u6cbb\u65d7 ","447"],["453","\u9648\u5df4\u5c14\u864e\u65d7 ","447"],["454","\u65b0\u5df4\u5c14\u864e\u5de6\u65d7 ","447"],["455","\u65b0\u5df4\u5c14\u864e\u53f3\u65d7 ","447"],["456","\u6ee1\u6d32\u91cc\u5e02 ","447"],["457","\u7259\u514b\u77f3\u5e02 ","447"],["458","\u624e\u5170\u5c6f\u5e02 ","447"],["459","\u989d\u5c14\u53e4\u7eb3\u5e02 ","447"],["460","\u6839\u6cb3\u5e02 ","447"],["462","\u5df4\u5f66\u6dd6\u5c14\u5e02 ","23"],["463","\u4e34\u6cb3\u533a ","462"],["464","\u4e94\u539f\u53bf ","462"],["465","\u78f4\u53e3\u53bf ","462"],["466","\u4e4c\u62c9\u7279\u524d\u65d7 ","462"],["467","\u4e4c\u62c9\u7279\u4e2d\u65d7 ","462"],["468","\u4e4c\u62c9\u7279\u540e\u65d7 ","462"],["469","\u676d\u9526\u540e\u65d7 ","462"],["471","\u4e4c\u5170\u5bdf\u5e03\u5e02 ","23"],["472","\u96c6\u5b81\u533a ","471"],["473","\u5353\u8d44\u53bf ","471"],["474","\u5316\u5fb7\u53bf ","471"],["475","\u5546\u90fd\u53bf ","471"],["476","\u5174\u548c\u53bf ","471"],["477","\u51c9\u57ce\u53bf ","471"],["478","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u524d\u65d7 ","471"],["479","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u4e2d\u65d7 ","471"],["480","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u540e\u65d7 ","471"],["481","\u56db\u5b50\u738b\u65d7 ","471"],["482","\u4e30\u9547\u5e02 ","471"],["484","\u5174\u5b89\u76df ","23"],["485","\u4e4c\u5170\u6d69\u7279\u5e02 ","484"],["486","\u963f\u5c14\u5c71\u5e02 ","484"],["487","\u79d1\u5c14\u6c81\u53f3\u7ffc\u524d\u65d7 ","484"],["488","\u79d1\u5c14\u6c81\u53f3\u7ffc\u4e2d\u65d7 ","484"],["489","\u624e\u8d49\u7279\u65d7 ","484"],["490","\u7a81\u6cc9\u53bf ","484"],["492","\u9521\u6797\u90ed\u52d2\u76df ","23"],["493","\u4e8c\u8fde\u6d69\u7279\u5e02 ","492"],["494","\u9521\u6797\u6d69\u7279\u5e02 ","492"],["495","\u963f\u5df4\u560e\u65d7 ","492"],["496","\u82cf\u5c3c\u7279\u5de6\u65d7 ","492"],["497","\u82cf\u5c3c\u7279\u53f3\u65d7 ","492"],["498","\u4e1c\u4e4c\u73e0\u7a46\u6c81\u65d7 ","492"],["499","\u897f\u4e4c\u73e0\u7a46\u6c81\u65d7 ","492"],["500","\u592a\u4ec6\u5bfa\u65d7 ","492"],["501","\u9576\u9ec4\u65d7 ","492"],["502","\u6b63\u9576\u767d\u65d7 ","492"],["503","\u6b63\u84dd\u65d7 ","492"],["504","\u591a\u4f26\u53bf ","492"],["506","\u963f\u62c9\u5584\u76df ","23"],["507","\u963f\u62c9\u5584\u5de6\u65d7 ","506"],["508","\u963f\u62c9\u5584\u53f3\u65d7 ","506"],["509","\u989d\u6d4e\u7eb3\u65d7 ","506"],["2","\u8fbd\u5b81\u7701 ","0"],["512","\u6c88\u9633\u5e02 ","2"],["513","\u548c\u5e73\u533a ","512"],["514","\u6c88\u6cb3\u533a ","512"],["515","\u5927\u4e1c\u533a ","512"],["516","\u7687\u59d1\u533a ","512"],["517","\u94c1\u897f\u533a ","512"],["518","\u82cf\u5bb6\u5c6f\u533a ","512"],["519","\u4e1c\u9675\u533a ","512"],["520","\u65b0\u57ce\u5b50\u533a ","512"],["521","\u4e8e\u6d2a\u533a ","512"],["522","\u8fbd\u4e2d\u53bf ","512"],["523","\u5eb7\u5e73\u53bf ","512"],["524","\u6cd5\u5e93\u53bf ","512"],["525","\u65b0\u6c11\u5e02 ","512"],["526","\u6d51\u5357\u65b0\u533a ","512"],["527","\u5f20\u58eb\u5f00\u53d1\u533a ","512"],["528","\u6c88\u5317\u65b0\u533a ","512"],["530","\u5927\u8fde\u5e02 ","2"],["531","\u4e2d\u5c71\u533a ","530"],["532","\u897f\u5c97\u533a ","530"],["533","\u6c99\u6cb3\u53e3\u533a ","530"],["534","\u7518\u4e95\u5b50\u533a ","530"],["535","\u65c5\u987a\u53e3\u533a ","530"],["536","\u91d1\u5dde\u533a ","530"],["537","\u957f\u6d77\u53bf ","530"],["538","\u5f00\u53d1\u533a ","530"],["539","\u74e6\u623f\u5e97\u5e02 ","530"],["540","\u666e\u5170\u5e97\u5e02 ","530"],["541","\u5e84\u6cb3\u5e02 ","530"],["542","\u5cad\u524d\u533a ","530"],["544","\u978d\u5c71\u5e02 ","2"],["545","\u94c1\u4e1c\u533a ","544"],["546","\u94c1\u897f\u533a ","544"],["547","\u7acb\u5c71\u533a ","544"],["548","\u5343\u5c71\u533a ","544"],["549","\u53f0\u5b89\u53bf ","544"],["550","\u5cab\u5ca9\u6ee1\u65cf\u81ea\u6cbb\u53bf ","544"],["551","\u9ad8\u65b0\u533a ","544"],["552","\u6d77\u57ce\u5e02 ","544"],["554","\u629a\u987a\u5e02 ","2"],["555","\u65b0\u629a\u533a ","554"],["556","\u4e1c\u6d32\u533a ","554"],["557","\u671b\u82b1\u533a ","554"],["558","\u987a\u57ce\u533a ","554"],["559","\u629a\u987a\u53bf ","554"],["560","\u65b0\u5bbe\u6ee1\u65cf\u81ea\u6cbb\u53bf ","554"],["561","\u6e05\u539f\u6ee1\u65cf\u81ea\u6cbb\u53bf ","554"],["563","\u672c\u6eaa\u5e02 ","2"],["564","\u5e73\u5c71\u533a ","563"],["565","\u6eaa\u6e56\u533a ","563"],["566","\u660e\u5c71\u533a ","563"],["567","\u5357\u82ac\u533a ","563"],["568","\u672c\u6eaa\u6ee1\u65cf\u81ea\u6cbb\u53bf ","563"],["569","\u6853\u4ec1\u6ee1\u65cf\u81ea\u6cbb\u53bf ","563"],["571","\u4e39\u4e1c\u5e02 ","2"],["572","\u5143\u5b9d\u533a ","571"],["573","\u632f\u5174\u533a ","571"],["574","\u632f\u5b89\u533a ","571"],["575","\u5bbd\u7538\u6ee1\u65cf\u81ea\u6cbb\u53bf ","571"],["576","\u4e1c\u6e2f\u5e02 ","571"],["577","\u51e4\u57ce\u5e02 ","571"],["579","\u9526\u5dde\u5e02 ","2"],["580","\u53e4\u5854\u533a ","579"],["581","\u51cc\u6cb3\u533a ","579"],["582","\u592a\u548c\u533a ","579"],["583","\u9ed1\u5c71\u53bf ","579"],["584","\u4e49\u53bf ","579"],["585","\u51cc\u6d77\u5e02 ","579"],["586"," \u5317\u9547\u5e02 ","579"],["588","\u8425\u53e3\u5e02 ","2"],["589","\u7ad9\u524d\u533a ","588"],["590","\u897f\u5e02\u533a ","588"],["591","\u9c85\u9c7c\u5708\u533a ","588"],["592","\u8001\u8fb9\u533a ","588"],["593","\u76d6\u5dde\u5e02 ","588"],["594","\u5927\u77f3\u6865\u5e02 ","588"],["596","\u961c\u65b0\u5e02 ","2"],["597","\u6d77\u5dde\u533a ","596"],["598","\u65b0\u90b1\u533a ","596"],["599","\u592a\u5e73\u533a ","596"],["600","\u6e05\u6cb3\u95e8\u533a ","596"],["601","\u7ec6\u6cb3\u533a ","596"],["602","\u961c\u65b0\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","596"],["603","\u5f70\u6b66\u53bf ","596"],["605","\u8fbd\u9633\u5e02 ","2"],["606","\u767d\u5854\u533a ","605"],["607","\u6587\u5723\u533a ","605"],["608","\u5b8f\u4f1f\u533a ","605"],["609","\u5f13\u957f\u5cad\u533a ","605"],["610","\u592a\u5b50\u6cb3\u533a ","605"],["611","\u8fbd\u9633\u53bf ","605"],["612","\u706f\u5854\u5e02 ","605"],["614","\u76d8\u9526\u5e02 ","2"],["615","\u53cc\u53f0\u5b50\u533a ","614"],["616","\u5174\u9686\u53f0\u533a ","614"],["617","\u5927\u6d3c\u53bf ","614"],["618","\u76d8\u5c71\u53bf ","614"],["620","\u94c1\u5cad\u5e02 ","2"],["621","\u94f6\u5dde\u533a ","620"],["622","\u6e05\u6cb3\u533a ","620"],["623","\u94c1\u5cad\u53bf ","620"],["624","\u897f\u4e30\u53bf ","620"],["625","\u660c\u56fe\u53bf ","620"],["626","\u8c03\u5175\u5c71\u5e02 ","620"],["627","\u5f00\u539f\u5e02 ","620"],["629","\u671d\u9633\u5e02 ","2"],["630","\u53cc\u5854\u533a ","629"],["631","\u9f99\u57ce\u533a ","629"],["632","\u671d\u9633\u53bf ","629"],["633","\u5efa\u5e73\u53bf ","629"],["634","\u5580\u5587\u6c81\u5de6\u7ffc\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","629"],["635","\u5317\u7968\u5e02 ","629"],["636","\u51cc\u6e90\u5e02 ","629"],["638","\u846b\u82a6\u5c9b\u5e02 ","2"],["639","\u8fde\u5c71\u533a ","638"],["640","\u9f99\u6e2f\u533a ","638"],["641","\u5357\u7968\u533a ","638"],["642","\u7ee5\u4e2d\u53bf ","638"],["643","\u5efa\u660c\u53bf ","638"],["644","\u5174\u57ce\u5e02 ","638"],["3","\u5409\u6797\u7701 ","0"],["647","\u957f\u6625\u5e02 ","3"],["648","\u5357\u5173\u533a ","647"],["649","\u5bbd\u57ce\u533a ","647"],["650","\u671d\u9633\u533a ","647"],["651","\u4e8c\u9053\u533a ","647"],["652","\u7eff\u56ed\u533a ","647"],["653","\u53cc\u9633\u533a ","647"],["654","\u519c\u5b89\u53bf ","647"],["655","\u4e5d\u53f0\u5e02 ","647"],["656","\u6986\u6811\u5e02 ","647"],["657","\u5fb7\u60e0\u5e02 ","647"],["658","\u9ad8\u65b0\u6280\u672f\u4ea7\u4e1a\u5f00\u53d1\u533a ","647"],["659","\u6c7d\u8f66\u4ea7\u4e1a\u5f00\u53d1\u533a ","647"],["660","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","647"],["661","\u51c0\u6708\u65c5\u6e38\u5f00\u53d1\u533a ","647"],["663","\u5409\u6797\u5e02 ","3"],["664","\u660c\u9091\u533a ","663"],["665","\u9f99\u6f6d\u533a ","663"],["666","\u8239\u8425\u533a ","663"],["667","\u4e30\u6ee1\u533a ","663"],["668","\u6c38\u5409\u53bf ","663"],["669","\u86df\u6cb3\u5e02 ","663"],["670","\u6866\u7538\u5e02 ","663"],["671","\u8212\u5170\u5e02 ","663"],["672","\u78d0\u77f3\u5e02 ","663"],["674","\u56db\u5e73\u5e02 ","3"],["675","\u94c1\u897f\u533a ","674"],["676","\u94c1\u4e1c\u533a ","674"],["677","\u68a8\u6811\u53bf ","674"],["678","\u4f0a\u901a\u6ee1\u65cf\u81ea\u6cbb\u53bf ","674"],["679","\u516c\u4e3b\u5cad\u5e02 ","674"],["680","\u53cc\u8fbd\u5e02 ","674"],["682","\u8fbd\u6e90\u5e02 ","3"],["683","\u9f99\u5c71\u533a ","682"],["684","\u897f\u5b89\u533a ","682"],["685","\u4e1c\u4e30\u53bf ","682"],["686","\u4e1c\u8fbd\u53bf ","682"],["688","\u901a\u5316\u5e02 ","3"],["689","\u4e1c\u660c\u533a ","688"],["690","\u4e8c\u9053\u6c5f\u533a ","688"],["691","\u901a\u5316\u53bf ","688"],["692","\u8f89\u5357\u53bf ","688"],["693","\u67f3\u6cb3\u53bf ","688"],["694","\u6885\u6cb3\u53e3\u5e02 ","688"],["695","\u96c6\u5b89\u5e02 ","688"],["697","\u767d\u5c71\u5e02 ","3"],["698","\u516b\u9053\u6c5f\u533a ","697"],["699","\u629a\u677e\u53bf ","697"],["700","\u9756\u5b87\u53bf ","697"],["701","\u957f\u767d\u671d\u9c9c\u65cf\u81ea\u6cbb\u53bf ","697"],["702","\u6c5f\u6e90\u53bf ","697"],["703","\u4e34\u6c5f\u5e02 ","697"],["705","\u677e\u539f\u5e02 ","3"],["706","\u5b81\u6c5f\u533a ","705"],["707","\u524d\u90ed\u5c14\u7f57\u65af\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","705"],["708","\u957f\u5cad\u53bf ","705"],["709","\u4e7e\u5b89\u53bf ","705"],["710","\u6276\u4f59\u53bf ","705"],["712","\u767d\u57ce\u5e02 ","3"],["713","\u6d2e\u5317\u533a ","712"],["714","\u9547\u8d49\u53bf ","712"],["715","\u901a\u6986\u53bf ","712"],["716","\u6d2e\u5357\u5e02 ","712"],["717","\u5927\u5b89\u5e02 ","712"],["719","\u5ef6\u8fb9\u671d\u9c9c\u65cf\u81ea\u6cbb\u5dde ","3"],["720","\u5ef6\u5409\u5e02 ","719"],["721","\u56fe\u4eec\u5e02 ","719"],["722","\u6566\u5316\u5e02 ","719"],["723","\u73f2\u6625\u5e02 ","719"],["724","\u9f99\u4e95\u5e02 ","719"],["725","\u548c\u9f99\u5e02 ","719"],["726","\u6c6a\u6e05\u53bf ","719"],["727","\u5b89\u56fe\u53bf ","719"],["4","\u9ed1\u9f99\u6c5f\u7701 ","0"],["730","\u54c8\u5c14\u6ee8\u5e02 ","4"],["731","\u9053\u91cc\u533a ","730"],["732","\u5357\u5c97\u533a ","730"],["733","\u9053\u5916\u533a ","730"],["734","\u9999\u574a\u533a ","730"],["735","\u52a8\u529b\u533a ","730"],["736","\u5e73\u623f\u533a ","730"],["737","\u677e\u5317\u533a ","730"],["738","\u547c\u5170\u533a ","730"],["739","\u4f9d\u5170\u53bf ","730"],["740","\u65b9\u6b63\u53bf ","730"],["741","\u5bbe\u53bf ","730"],["742","\u5df4\u5f66\u53bf ","730"],["743","\u6728\u5170\u53bf ","730"],["744","\u901a\u6cb3\u53bf ","730"],["745","\u5ef6\u5bff\u53bf ","730"],["746","\u963f\u57ce\u5e02 ","730"],["747","\u53cc\u57ce\u5e02 ","730"],["748","\u5c1a\u5fd7\u5e02 ","730"],["749","\u4e94\u5e38\u5e02 ","730"],["752","\u9f50\u9f50\u54c8\u5c14\u5e02 ","4"],["753","\u9f99\u6c99\u533a ","752"],["754","\u5efa\u534e\u533a ","752"],["755","\u94c1\u950b\u533a ","752"],["756","\u6602\u6602\u6eaa\u533a ","752"],["757","\u5bcc\u62c9\u5c14\u57fa\u533a ","752"],["758","\u78be\u5b50\u5c71\u533a ","752"],["759","\u6885\u91cc\u65af\u8fbe\u65a1\u5c14\u65cf\u533a ","752"],["760","\u9f99\u6c5f\u53bf ","752"],["761","\u4f9d\u5b89\u53bf ","752"],["762","\u6cf0\u6765\u53bf ","752"],["763","\u7518\u5357\u53bf ","752"],["764","\u5bcc\u88d5\u53bf ","752"],["765","\u514b\u5c71\u53bf ","752"],["766","\u514b\u4e1c\u53bf ","752"],["767","\u62dc\u6cc9\u53bf ","752"],["768","\u8bb7\u6cb3\u5e02 ","752"],["770","\u9e21\u897f\u5e02 ","4"],["771","\u9e21\u51a0\u533a ","770"],["772","\u6052\u5c71\u533a ","770"],["773","\u6ef4\u9053\u533a ","770"],["774","\u68a8\u6811\u533a ","770"],["775","\u57ce\u5b50\u6cb3\u533a ","770"],["776","\u9ebb\u5c71\u533a ","770"],["777","\u9e21\u4e1c\u53bf ","770"],["778","\u864e\u6797\u5e02 ","770"],["779","\u5bc6\u5c71\u5e02 ","770"],["781","\u9e64\u5c97\u5e02 ","4"],["782","\u5411\u9633\u533a ","781"],["783","\u5de5\u519c\u533a ","781"],["784","\u5357\u5c71\u533a ","781"],["785","\u5174\u5b89\u533a ","781"],["786","\u4e1c\u5c71\u533a ","781"],["787","\u5174\u5c71\u533a ","781"],["788","\u841d\u5317\u53bf ","781"],["789","\u7ee5\u6ee8\u53bf ","781"],["791","\u53cc\u9e2d\u5c71\u5e02 ","4"],["792","\u5c16\u5c71\u533a ","791"],["793","\u5cad\u4e1c\u533a ","791"],["794","\u56db\u65b9\u53f0\u533a ","791"],["795","\u5b9d\u5c71\u533a ","791"],["796","\u96c6\u8d24\u53bf ","791"],["797","\u53cb\u8c0a\u53bf ","791"],["1063","\u4e34\u5b89\u5e02 ","1050"],["1065","\u5b81\u6ce2\u5e02 ","6"],["1066","\u6d77\u66d9\u533a ","1065"],["1067","\u6c5f\u4e1c\u533a ","1065"],["1068","\u6c5f\u5317\u533a ","1065"],["1069","\u5317\u4ed1\u533a ","1065"],["1070","\u9547\u6d77\u533a ","1065"],["1071","\u911e\u5dde\u533a ","1065"],["1072","\u8c61\u5c71\u53bf ","1065"],["1073","\u5b81\u6d77\u53bf ","1065"],["1074","\u4f59\u59da\u5e02 ","1065"],["1075","\u6148\u6eaa\u5e02 ","1065"],["1076","\u5949\u5316\u5e02 ","1065"],["1078","\u6e29\u5dde\u5e02 ","6"],["1079","\u9e7f\u57ce\u533a ","1078"],["1080","\u9f99\u6e7e\u533a ","1078"],["1081","\u74ef\u6d77\u533a ","1078"],["1082","\u6d1e\u5934\u53bf ","1078"],["1083","\u6c38\u5609\u53bf ","1078"],["1084","\u5e73\u9633\u53bf ","1078"],["1085","\u82cd\u5357\u53bf ","1078"],["1086","\u6587\u6210\u53bf ","1078"],["1087","\u6cf0\u987a\u53bf ","1078"],["1088","\u745e\u5b89\u5e02 ","1078"],["1089","\u4e50\u6e05\u5e02 ","1078"],["1091","\u5609\u5174\u5e02 ","6"],["1092","\u5357\u6e56\u533a ","1091"],["1093","\u79c0\u6d32\u533a ","1091"],["1094","\u5609\u5584\u53bf ","1091"],["1095","\u6d77\u76d0\u53bf ","1091"],["1096","\u6d77\u5b81\u5e02 ","1091"],["1097","\u5e73\u6e56\u5e02 ","1091"],["1098","\u6850\u4e61\u5e02 ","1091"],["1100","\u6e56\u5dde\u5e02 ","6"],["1101","\u5434\u5174\u533a ","1100"],["1102","\u5357\u6d54\u533a ","1100"],["1103","\u5fb7\u6e05\u53bf ","1100"],["1104","\u957f\u5174\u53bf ","1100"],["1105","\u5b89\u5409\u53bf ","1100"],["1107","\u7ecd\u5174\u5e02 ","6"],["1108","\u8d8a\u57ce\u533a ","1107"],["1109","\u7ecd\u5174\u53bf ","1107"],["1110","\u65b0\u660c\u53bf ","1107"],["1111","\u8bf8\u66a8\u5e02 ","1107"],["1112","\u4e0a\u865e\u5e02 ","1107"],["1113","\u5d4a\u5dde\u5e02 ","1107"],["1115","\u91d1\u534e\u5e02 ","6"],["1116","\u5a7a\u57ce\u533a ","1115"],["1117","\u91d1\u4e1c\u533a ","1115"],["1118","\u6b66\u4e49\u53bf ","1115"],["1119","\u6d66\u6c5f\u53bf ","1115"],["1120","\u78d0\u5b89\u53bf ","1115"],["1121","\u5170\u6eaa\u5e02 ","1115"],["1122","\u4e49\u4e4c\u5e02 ","1115"],["1123","\u4e1c\u9633\u5e02 ","1115"],["1124","\u6c38\u5eb7\u5e02 ","1115"],["1126","\u8862\u5dde\u5e02 ","6"],["1127","\u67ef\u57ce\u533a ","1126"],["1128","\u8862\u6c5f\u533a ","1126"],["1129","\u5e38\u5c71\u53bf ","1126"],["1262","\u7800\u5c71\u53bf ","1260"],["1263","\u8427\u53bf ","1260"],["1264","\u7075\u74a7\u53bf ","1260"],["1265","\u6cd7\u53bf ","1260"],["1267","\u5de2\u6e56\u5e02 ","7"],["1268","\u5c45\u5de2\u533a ","1267"],["1269","\u5e90\u6c5f\u53bf ","1267"],["1270","\u65e0\u4e3a\u53bf ","1267"],["1271","\u542b\u5c71\u53bf ","1267"],["1272","\u548c\u53bf ","1267"],["1274","\u516d\u5b89\u5e02 ","7"],["1275","\u91d1\u5b89\u533a ","1274"],["1276","\u88d5\u5b89\u533a ","1274"],["1277","\u5bff\u53bf ","1274"],["1278","\u970d\u90b1\u53bf ","1274"],["1279","\u8212\u57ce\u53bf ","1274"],["1280","\u91d1\u5be8\u53bf ","1274"],["1281","\u970d\u5c71\u53bf ","1274"],["1283","\u4eb3\u5dde\u5e02 ","7"],["1284","\u8c2f\u57ce\u533a ","1283"],["1285","\u6da1\u9633\u53bf ","1283"],["1286","\u8499\u57ce\u53bf ","1283"],["1287","\u5229\u8f9b\u53bf ","1283"],["1289","\u6c60\u5dde\u5e02 ","7"],["1290","\u8d35\u6c60\u533a ","1289"],["1291","\u4e1c\u81f3\u53bf ","1289"],["1292","\u77f3\u53f0\u53bf ","1289"],["1293","\u9752\u9633\u53bf ","1289"],["1295","\u5ba3\u57ce\u5e02 ","7"],["1296","\u5ba3\u5dde\u533a ","1295"],["1297","\u90ce\u6eaa\u53bf ","1295"],["1298","\u5e7f\u5fb7\u53bf ","1295"],["1299","\u6cfe\u53bf ","1295"],["1300"," \u7ee9\u6eaa\u53bf ","1295"],["1301","\u65cc\u5fb7\u53bf ","1295"],["1302","\u5b81\u56fd\u5e02 ","1295"],["8","\u798f\u5efa\u7701 ","0"],["1305","\u798f\u5dde\u5e02 ","8"],["1306","\u9f13\u697c\u533a ","1305"],["1307","\u53f0\u6c5f\u533a ","1305"],["1308","\u4ed3\u5c71\u533a ","1305"],["1309","\u9a6c\u5c3e\u533a ","1305"],["1310","\u664b\u5b89\u533a ","1305"],["1311","\u95fd\u4faf\u53bf ","1305"],["1312","\u8fde\u6c5f\u53bf ","1305"],["1313","\u7f57\u6e90\u53bf ","1305"],["1314","\u95fd\u6e05\u53bf ","1305"],["1315","\u6c38\u6cf0\u53bf ","1305"],["1316","\u5e73\u6f6d\u53bf ","1305"],["1317","\u798f\u6e05\u5e02 ","1305"],["1318","\u957f\u4e50\u5e02 ","1305"],["1320","\u53a6\u95e8\u5e02 ","8"],["1321","\u601d\u660e\u533a ","1320"],["1322","\u6d77\u6ca7\u533a ","1320"],["1323","\u6e56\u91cc\u533a ","1320"],["1324","\u96c6\u7f8e\u533a ","1320"],["1325","\u540c\u5b89\u533a ","1320"],["1326","\u7fd4\u5b89\u533a ","1320"],["1130","\u5f00\u5316\u53bf ","1126"],["1131","\u9f99\u6e38\u53bf ","1126"],["1132","\u6c5f\u5c71\u5e02 ","1126"],["1134","\u821f\u5c71\u5e02 ","6"],["1135","\u5b9a\u6d77\u533a ","1134"],["1136","\u666e\u9640\u533a ","1134"],["1137","\u5cb1\u5c71\u53bf ","1134"],["1138","\u5d4a\u6cd7\u53bf ","1134"],["1140","\u53f0\u5dde\u5e02 ","6"],["1141","\u6912\u6c5f\u533a ","1140"],["1142","\u9ec4\u5ca9\u533a ","1140"],["1143","\u8def\u6865\u533a ","1140"],["1144","\u7389\u73af\u53bf ","1140"],["1145","\u4e09\u95e8\u53bf ","1140"],["1146","\u5929\u53f0\u53bf ","1140"],["1147","\u4ed9\u5c45\u53bf ","1140"],["1148","\u6e29\u5cad\u5e02 ","1140"],["1149","\u4e34\u6d77\u5e02 ","1140"],["1151","\u4e3d\u6c34\u5e02 ","6"],["1152","\u83b2\u90fd\u533a ","1151"],["1153","\u9752\u7530\u53bf ","1151"],["1154","\u7f19\u4e91\u53bf ","1151"],["1155","\u9042\u660c\u53bf ","1151"],["1156","\u677e\u9633\u53bf ","1151"],["1157","\u4e91\u548c\u53bf ","1151"],["1158","\u5e86\u5143\u53bf ","1151"],["1159","\u666f\u5b81\u7572\u65cf\u81ea\u6cbb\u53bf ","1151"],["1160","\u9f99\u6cc9\u5e02 ","1151"],["7","\u5b89\u5fbd\u7701 ","0"],["1163","\u5408\u80a5\u5e02 ","7"],["1164","\u7476\u6d77\u533a ","1163"],["1165","\u5e90\u9633\u533a ","1163"],["1166","\u8700\u5c71\u533a ","1163"],["1167","\u5305\u6cb3\u533a ","1163"],["1168","\u957f\u4e30\u53bf ","1163"],["1169","\u80a5\u4e1c\u53bf ","1163"],["1170","\u80a5\u897f\u53bf ","1163"],["1171","\u9ad8\u65b0\u533a ","1163"],["1172","\u4e2d\u533a ","1163"],["1174","\u829c\u6e56\u5e02 ","7"],["1175","\u955c\u6e56\u533a ","1174"],["1176","\u5f0b\u6c5f\u533a ","1174"],["1177","\u9e20\u6c5f\u533a ","1174"],["1178","\u4e09\u5c71\u533a ","1174"],["1179","\u829c\u6e56\u53bf ","1174"],["1180","\u7e41\u660c\u53bf ","1174"],["1181","\u5357\u9675\u53bf ","1174"],["1183","\u868c\u57e0\u5e02 ","7"],["1184","\u9f99\u5b50\u6e56\u533a ","1183"],["1185","\u868c\u5c71\u533a ","1183"],["1186","\u79b9\u4f1a\u533a ","1183"],["1187","\u6dee\u4e0a\u533a ","1183"],["1188","\u6000\u8fdc\u53bf ","1183"],["1189","\u4e94\u6cb3\u53bf ","1183"],["1190","\u56fa\u9547\u53bf ","1183"],["1192","\u6dee\u5357\u5e02 ","7"],["1193","\u5927\u901a\u533a ","1192"],["1194","\u7530\u5bb6\u5eb5\u533a ","1192"],["1195","\u8c22\u5bb6\u96c6\u533a ","1192"],["1196","\u516b\u516c\u5c71\u533a ","1192"],["1197","\u6f58\u96c6\u533a ","1192"],["1198","\u51e4\u53f0\u53bf ","1192"],["1200","\u9a6c\u978d\u5c71\u5e02 ","7"],["1201","\u91d1\u5bb6\u5e84\u533a ","1200"],["1202","\u82b1\u5c71\u533a ","1200"],["1203","\u96e8\u5c71\u533a ","1200"],["1204","\u5f53\u6d82\u53bf ","1200"],["1206","\u6dee\u5317\u5e02 ","7"],["1207","\u675c\u96c6\u533a ","1206"],["1208","\u76f8\u5c71\u533a ","1206"],["1209","\u70c8\u5c71\u533a ","1206"],["1210","\u6fc9\u6eaa\u53bf ","1206"],["1212","\u94dc\u9675\u5e02 ","7"],["1213","\u94dc\u5b98\u5c71\u533a ","1212"],["1214","\u72ee\u5b50\u5c71\u533a ","1212"],["1215","\u90ca\u533a ","1212"],["1216","\u94dc\u9675\u53bf ","1212"],["1218","\u5b89\u5e86\u5e02 ","7"],["1219","\u8fce\u6c5f\u533a ","1218"],["1220","\u5927\u89c2\u533a ","1218"],["1221","\u5b9c\u79c0\u533a ","1218"],["1222","\u6000\u5b81\u53bf ","1218"],["1223","\u679e\u9633\u53bf ","1218"],["1224","\u6f5c\u5c71\u53bf ","1218"],["1225","\u592a\u6e56\u53bf ","1218"],["1226","\u5bbf\u677e\u53bf ","1218"],["1227","\u671b\u6c5f\u53bf ","1218"],["1228","\u5cb3\u897f\u53bf ","1218"],["1229","\u6850\u57ce\u5e02 ","1218"],["1231","\u9ec4\u5c71\u5e02 ","7"],["1232","\u5c6f\u6eaa\u533a ","1231"],["1233","\u9ec4\u5c71\u533a ","1231"],["1234","\u5fbd\u5dde\u533a ","1231"],["1235","\u6b59\u53bf ","1231"],["1236"," \u4f11\u5b81\u53bf ","1231"],["1237","\u9edf\u53bf ","1231"],["1238","\u7941\u95e8\u53bf ","1231"],["1240","\u6ec1\u5dde\u5e02 ","7"],["1241","\u7405\u740a\u533a ","1240"],["1242","\u5357\u8c2f\u533a ","1240"],["1243","\u6765\u5b89\u53bf ","1240"],["1244","\u5168\u6912\u53bf ","1240"],["1245","\u5b9a\u8fdc\u53bf ","1240"],["1246","\u51e4\u9633\u53bf ","1240"],["1247","\u5929\u957f\u5e02 ","1240"],["1248","\u660e\u5149\u5e02 ","1240"],["1250","\u961c\u9633\u5e02 ","7"],["1251","\u988d\u5dde\u533a ","1250"],["1252"," \u988d\u4e1c\u533a ","1250"],["1253","\u988d\u6cc9\u533a ","1250"],["1254","\u4e34\u6cc9\u53bf ","1250"],["1255","\u592a\u548c\u53bf ","1250"],["1256","\u961c\u5357\u53bf ","1250"],["1257","\u988d\u4e0a\u53bf ","1250"],["1258","\u754c\u9996\u5e02 ","1250"],["1260","\u5bbf\u5dde\u5e02 ","7"],["1261","\u57c7\u6865\u533a ","1260"],["864","\u5ae9\u6c5f\u53bf ","862"],["865","\u900a\u514b\u53bf ","862"],["866","\u5b59\u5434\u53bf ","862"],["867","\u5317\u5b89\u5e02 ","862"],["868","\u4e94\u5927\u8fde\u6c60\u5e02 ","862"],["870","\u7ee5\u5316\u5e02 ","4"],["871","\u5317\u6797\u533a ","870"],["872","\u671b\u594e\u53bf ","870"],["873","\u5170\u897f\u53bf ","870"],["874","\u9752\u5188\u53bf ","870"],["875","\u5e86\u5b89\u53bf ","870"],["876","\u660e\u6c34\u53bf ","870"],["877","\u7ee5\u68f1\u53bf ","870"],["878","\u5b89\u8fbe\u5e02 ","870"],["879","\u8087\u4e1c\u5e02 ","870"],["880","\u6d77\u4f26\u5e02 ","870"],["882","\u5927\u5174\u5b89\u5cad\u5730\u533a ","4"],["883","\u547c\u739b\u53bf ","882"],["884","\u5854\u6cb3\u53bf ","882"],["885","\u6f20\u6cb3\u53bf ","882"],["886","\u52a0\u683c\u8fbe\u5947\u533a ","882"],["30","\u4e0a\u6d77 ","0"],["890","\u9ec4\u6d66\u533a ","30"],["891","\u5362\u6e7e\u533a ","30"],["892","\u5f90\u6c47\u533a ","30"],["893","\u957f\u5b81\u533a ","30"],["894","\u9759\u5b89\u533a ","30"],["895","\u666e\u9640\u533a ","30"],["896","\u95f8\u5317\u533a ","30"],["897","\u8679\u53e3\u533a ","30"],["898","\u6768\u6d66\u533a ","30"],["899","\u95f5\u884c\u533a ","30"],["900","\u5b9d\u5c71\u533a ","30"],["901","\u5609\u5b9a\u533a ","30"],["902","\u6d66\u4e1c\u65b0\u533a ","30"],["903","\u91d1\u5c71\u533a ","30"],["904","\u677e\u6c5f\u533a ","30"],["905","\u9752\u6d66\u533a ","30"],["906","\u5357\u6c47\u533a ","30"],["907","\u5949\u8d24\u533a ","30"],["908","\u5ddd\u6c99\u533a ","30"],["909","\u5d07\u660e\u53bf ","30"],["5","\u6c5f\u82cf\u7701 ","0"],["912","\u5357\u4eac\u5e02 ","5"],["913","\u7384\u6b66\u533a ","912"],["914","\u767d\u4e0b\u533a ","912"],["915","\u79e6\u6dee\u533a ","912"],["916","\u5efa\u90ba\u533a ","912"],["917","\u9f13\u697c\u533a ","912"],["918","\u4e0b\u5173\u533a ","912"],["919","\u6d66\u53e3\u533a ","912"],["920","\u6816\u971e\u533a ","912"],["921","\u96e8\u82b1\u53f0\u533a ","912"],["922","\u6c5f\u5b81\u533a ","912"],["923","\u516d\u5408\u533a ","912"],["924","\u6ea7\u6c34\u53bf ","912"],["925","\u9ad8\u6df3\u53bf ","912"],["927","\u65e0\u9521\u5e02 ","5"],["928","\u5d07\u5b89\u533a ","927"],["929","\u5357\u957f\u533a ","927"],["930","\u5317\u5858\u533a ","927"],["931","\u9521\u5c71\u533a ","927"],["932","\u60e0\u5c71\u533a ","927"],["933","\u6ee8\u6e56\u533a ","927"],["934","\u6c5f\u9634\u5e02 ","927"],["935","\u5b9c\u5174\u5e02 ","927"],["936","\u65b0\u533a ","927"],["938","\u5f90\u5dde\u5e02 ","5"],["939","\u9f13\u697c\u533a ","938"],["940","\u4e91\u9f99\u533a ","938"],["941","\u4e5d\u91cc\u533a ","938"],["942","\u8d3e\u6c6a\u533a ","938"],["943","\u6cc9\u5c71\u533a ","938"],["944","\u4e30\u53bf ","938"],["945","\u6c9b\u53bf ","938"],["946","\u94dc\u5c71\u53bf ","938"],["947","\u7762\u5b81\u53bf ","938"],["948","\u65b0\u6c82\u5e02 ","938"],["949","\u90b3\u5dde\u5e02 ","938"],["951","\u5e38\u5dde\u5e02 ","5"],["952","\u5929\u5b81\u533a ","951"],["953","\u949f\u697c\u533a ","951"],["954","\u621a\u5885\u5830\u533a ","951"],["955","\u65b0\u5317\u533a ","951"],["956","\u6b66\u8fdb\u533a ","951"],["957","\u6ea7\u9633\u5e02 ","951"],["958","\u91d1\u575b\u5e02 ","951"],["960","\u82cf\u5dde\u5e02 ","5"],["961","\u6ca7\u6d6a\u533a ","960"],["962","\u5e73\u6c5f\u533a ","960"],["963","\u91d1\u960a\u533a ","960"],["964","\u864e\u4e18\u533a ","960"],["965","\u5434\u4e2d\u533a ","960"],["966","\u76f8\u57ce\u533a ","960"],["967","\u5e38\u719f\u5e02 ","960"],["968","\u5f20\u5bb6\u6e2f\u5e02 ","960"],["969","\u6606\u5c71\u5e02 ","960"],["970","\u5434\u6c5f\u5e02 ","960"],["971","\u592a\u4ed3\u5e02 ","960"],["972","\u65b0\u533a ","960"],["973","\u56ed\u533a ","960"],["975","\u5357\u901a\u5e02 ","5"],["976","\u5d07\u5ddd\u533a ","975"],["977","\u6e2f\u95f8\u533a ","975"],["978","\u6d77\u5b89\u53bf ","975"],["979","\u5982\u4e1c\u53bf ","975"],["980","\u542f\u4e1c\u5e02 ","975"],["981","\u5982\u768b\u5e02 ","975"],["982","\u901a\u5dde\u5e02 ","975"],["983","\u6d77\u95e8\u5e02 ","975"],["984","\u5f00\u53d1\u533a ","975"],["986","\u8fde\u4e91\u6e2f\u5e02 ","5"],["987","\u8fde\u4e91\u533a ","986"],["988","\u65b0\u6d66\u533a ","986"],["989","\u6d77\u5dde\u533a ","986"],["990","\u8d63\u6986\u53bf ","986"],["991","\u4e1c\u6d77\u53bf ","986"],["992","\u704c\u4e91\u53bf ","986"],["993","\u704c\u5357\u53bf ","986"],["995","\u6dee\u5b89\u5e02 ","5"],["996","\u6e05\u6cb3\u533a ","995"],["997","\u695a\u5dde\u533a ","995"],["998","\u6dee\u9634\u533a ","995"],["999","\u6e05\u6d66\u533a ","995"],["1000","\u6d9f\u6c34\u53bf ","995"],["1001","\u6d2a\u6cfd\u53bf ","995"],["1002","\u76f1\u7719\u53bf ","995"],["1003","\u91d1\u6e56\u53bf ","995"],["1005","\u76d0\u57ce\u5e02 ","5"],["1006","\u4ead\u6e56\u533a ","1005"],["1007","\u76d0\u90fd\u533a ","1005"],["1008","\u54cd\u6c34\u53bf ","1005"],["1009","\u6ee8\u6d77\u53bf ","1005"],["1010","\u961c\u5b81\u53bf ","1005"],["1011","\u5c04\u9633\u53bf ","1005"],["1012","\u5efa\u6e56\u53bf ","1005"],["1013","\u4e1c\u53f0\u5e02 ","1005"],["1014","\u5927\u4e30\u5e02 ","1005"],["1016","\u626c\u5dde\u5e02 ","5"],["1017","\u5e7f\u9675\u533a ","1016"],["1018","\u9097\u6c5f\u533a ","1016"],["1019","\u7ef4\u626c\u533a ","1016"],["1020","\u5b9d\u5e94\u53bf ","1016"],["1021","\u4eea\u5f81\u5e02 ","1016"],["1022","\u9ad8\u90ae\u5e02 ","1016"],["1023","\u6c5f\u90fd\u5e02 ","1016"],["1024","\u7ecf\u6d4e\u5f00\u53d1\u533a ","1016"],["1026","\u9547\u6c5f\u5e02 ","5"],["1027","\u4eac\u53e3\u533a ","1026"],["1028","\u6da6\u5dde\u533a ","1026"],["1029","\u4e39\u5f92\u533a ","1026"],["1030","\u4e39\u9633\u5e02 ","1026"],["1031","\u626c\u4e2d\u5e02 ","1026"],["1032","\u53e5\u5bb9\u5e02 ","1026"],["1034","\u6cf0\u5dde\u5e02 ","5"],["1035","\u6d77\u9675\u533a ","1034"],["1036","\u9ad8\u6e2f\u533a ","1034"],["1037","\u5174\u5316\u5e02 ","1034"],["1038","\u9756\u6c5f\u5e02 ","1034"],["1039","\u6cf0\u5174\u5e02 ","1034"],["1040","\u59dc\u5830\u5e02 ","1034"],["1042","\u5bbf\u8fc1\u5e02 ","5"],["1043","\u5bbf\u57ce\u533a ","1042"],["1044","\u5bbf\u8c6b\u533a ","1042"],["1045","\u6cad\u9633\u53bf ","1042"],["1046","\u6cd7\u9633\u53bf ","1042"],["1047","\u6cd7\u6d2a\u53bf ","1042"],["6","\u6d59\u6c5f\u7701 ","0"],["1050","\u676d\u5dde\u5e02 ","6"],["1051","\u4e0a\u57ce\u533a ","1050"],["1052","\u4e0b\u57ce\u533a ","1050"],["1053","\u6c5f\u5e72\u533a ","1050"],["1054","\u62f1\u5885\u533a ","1050"],["1055","\u897f\u6e56\u533a ","1050"],["1056","\u6ee8\u6c5f\u533a ","1050"],["1057","\u8427\u5c71\u533a ","1050"],["1058","\u4f59\u676d\u533a ","1050"],["1059","\u6850\u5e90\u53bf ","1050"],["1060","\u6df3\u5b89\u53bf ","1050"],["1061","\u5efa\u5fb7\u5e02 ","1050"],["1062","\u5bcc\u9633\u5e02 ","1050"],["1791","\u65b0\u4e61\u5e02 ","11"],["1792","\u7ea2\u65d7\u533a ","1791"],["1793","\u536b\u6ee8\u533a ","1791"],["1794","\u51e4\u6cc9\u533a ","1791"],["1795","\u7267\u91ce\u533a ","1791"],["1796","\u65b0\u4e61\u53bf ","1791"],["1797","\u83b7\u5609\u53bf ","1791"],["1798","\u539f\u9633\u53bf ","1791"],["1799","\u5ef6\u6d25\u53bf ","1791"],["1800","\u5c01\u4e18\u53bf ","1791"],["1801","\u957f\u57a3\u53bf ","1791"],["1802","\u536b\u8f89\u5e02 ","1791"],["1803","\u8f89\u53bf\u5e02 ","1791"],["1805","\u7126\u4f5c\u5e02 ","11"],["1806","\u89e3\u653e\u533a ","1805"],["1807","\u4e2d\u7ad9\u533a ","1805"],["1808","\u9a6c\u6751\u533a ","1805"],["1809","\u5c71\u9633\u533a ","1805"],["1810","\u4fee\u6b66\u53bf ","1805"],["1811","\u535a\u7231\u53bf ","1805"],["1812","\u6b66\u965f\u53bf ","1805"],["1813","\u6e29\u53bf ","1805"],["1814","\u6c81\u9633\u5e02 ","1805"],["1815","\u5b5f\u5dde\u5e02 ","1805"],["1817","\u6d4e\u6e90\u5e02 ","11"],["1818","\u6fee\u9633\u5e02 ","11"],["1819","\u534e\u9f99\u533a ","1818"],["1820","\u6e05\u4e30\u53bf ","1818"],["1821","\u5357\u4e50\u53bf ","1818"],["1822","\u8303\u53bf ","1818"],["1823","\u53f0\u524d\u53bf ","1818"],["1824","\u6fee\u9633\u53bf ","1818"],["1826","\u8bb8\u660c\u5e02 ","11"],["1827","\u9b4f\u90fd\u533a ","1826"],["1828","\u8bb8\u660c\u53bf ","1826"],["1829","\u9122\u9675\u53bf ","1826"],["1830","\u8944\u57ce\u53bf ","1826"],["1831","\u79b9\u5dde\u5e02 ","1826"],["1832","\u957f\u845b\u5e02 ","1826"],["1834","\u6f2f\u6cb3\u5e02 ","11"],["1835","\u6e90\u6c47\u533a ","1834"],["1836","\u90fe\u57ce\u533a ","1834"],["1837","\u53ec\u9675\u533a ","1834"],["1838","\u821e\u9633\u53bf ","1834"],["1839","\u4e34\u988d\u53bf ","1834"],["1841","\u4e09\u95e8\u5ce1\u5e02 ","11"],["1842","\u6e56\u6ee8\u533a ","1841"],["1843","\u6e11\u6c60\u53bf ","1841"],["1844","\u9655\u53bf ","1841"],["1845","\u5362\u6c0f\u53bf ","1841"],["1846","\u4e49\u9a6c\u5e02 ","1841"],["1847","\u7075\u5b9d\u5e02 ","1841"],["1849","\u5357\u9633\u5e02 ","11"],["1850","\u5b9b\u57ce\u533a ","1849"],["1851","\u5367\u9f99\u533a ","1849"],["1852","\u5357\u53ec\u53bf ","1849"],["1853","\u65b9\u57ce\u53bf ","1849"],["1854","\u897f\u5ce1\u53bf ","1849"],["1855","\u9547\u5e73\u53bf ","1849"],["1328","\u8386\u7530\u5e02 ","8"],["1329","\u57ce\u53a2\u533a ","1328"],["1330","\u6db5\u6c5f\u533a ","1328"],["1331","\u8354\u57ce\u533a ","1328"],["1332","\u79c0\u5c7f\u533a ","1328"],["1333","\u4ed9\u6e38\u53bf ","1328"],["1335","\u4e09\u660e\u5e02 ","8"],["1336","\u6885\u5217\u533a ","1335"],["1337","\u4e09\u5143\u533a ","1335"],["1338","\u660e\u6eaa\u53bf ","1335"],["1339","\u6e05\u6d41\u53bf ","1335"],["1340","\u5b81\u5316\u53bf ","1335"],["1341","\u5927\u7530\u53bf ","1335"],["1342","\u5c24\u6eaa\u53bf ","1335"],["1343","\u6c99\u53bf ","1335"],["1344","\u5c06\u4e50\u53bf ","1335"],["1345","\u6cf0\u5b81\u53bf ","1335"],["1346","\u5efa\u5b81\u53bf ","1335"],["1347","\u6c38\u5b89\u5e02 ","1335"],["1349","\u6cc9\u5dde\u5e02 ","8"],["1350","\u9ca4\u57ce\u533a ","1349"],["1351","\u4e30\u6cfd\u533a ","1349"],["1352","\u6d1b\u6c5f\u533a ","1349"],["1353","\u6cc9\u6e2f\u533a ","1349"],["1354","\u60e0\u5b89\u53bf ","1349"],["1355","\u5b89\u6eaa\u53bf ","1349"],["1356","\u6c38\u6625\u53bf ","1349"],["1357","\u5fb7\u5316\u53bf ","1349"],["1358","\u91d1\u95e8\u53bf ","1349"],["1359","\u77f3\u72ee\u5e02 ","1349"],["1360","\u664b\u6c5f\u5e02 ","1349"],["1361","\u5357\u5b89\u5e02 ","1349"],["1363","\u6f33\u5dde\u5e02 ","8"],["1364","\u8297\u57ce\u533a ","1363"],["1365","\u9f99\u6587\u533a ","1363"],["1366","\u4e91\u9704\u53bf ","1363"],["1367","\u6f33\u6d66\u53bf ","1363"],["1368","\u8bcf\u5b89\u53bf ","1363"],["1369","\u957f\u6cf0\u53bf ","1363"],["1370","\u4e1c\u5c71\u53bf ","1363"],["1371","\u5357\u9756\u53bf ","1363"],["1372","\u5e73\u548c\u53bf ","1363"],["1373","\u534e\u5b89\u53bf ","1363"],["1374","\u9f99\u6d77\u5e02 ","1363"],["1376","\u5357\u5e73\u5e02 ","8"],["1377","\u5ef6\u5e73\u533a ","1376"],["1378","\u987a\u660c\u53bf ","1376"],["1379","\u6d66\u57ce\u53bf ","1376"],["1380","\u5149\u6cfd\u53bf ","1376"],["1381","\u677e\u6eaa\u53bf ","1376"],["1382","\u653f\u548c\u53bf ","1376"],["1383","\u90b5\u6b66\u5e02 ","1376"],["1384","\u6b66\u5937\u5c71\u5e02 ","1376"],["1385","\u5efa\u74ef\u5e02 ","1376"],["1386","\u5efa\u9633\u5e02 ","1376"],["1388","\u9f99\u5ca9\u5e02 ","8"],["1389","\u65b0\u7f57\u533a ","1388"],["1390","\u957f\u6c40\u53bf ","1388"],["1391","\u6c38\u5b9a\u53bf ","1388"],["1392","\u4e0a\u676d\u53bf ","1388"],["1393","\u6b66\u5e73\u53bf ","1388"],["1394","\u8fde\u57ce\u53bf ","1388"],["1395","\u6f33\u5e73\u5e02 ","1388"],["1397","\u5b81\u5fb7\u5e02 ","8"],["1398","\u8549\u57ce\u533a ","1397"],["1399","\u971e\u6d66\u53bf ","1397"],["1400","\u53e4\u7530\u53bf ","1397"],["1401","\u5c4f\u5357\u53bf ","1397"],["1402","\u5bff\u5b81\u53bf ","1397"],["1403","\u5468\u5b81\u53bf ","1397"],["1404","\u67d8\u8363\u53bf ","1397"],["1405","\u798f\u5b89\u5e02 ","1397"],["1406","\u798f\u9f0e\u5e02 ","1397"],["9","\u6c5f\u897f\u7701 ","0"],["1409","\u5357\u660c\u5e02 ","9"],["1410","\u4e1c\u6e56\u533a ","1409"],["1411","\u897f\u6e56\u533a ","1409"],["1412","\u9752\u4e91\u8c31\u533a ","1409"],["1413","\u6e7e\u91cc\u533a ","1409"],["1414","\u9752\u5c71\u6e56\u533a ","1409"],["1415","\u5357\u660c\u53bf ","1409"],["1416","\u65b0\u5efa\u53bf ","1409"],["1417","\u5b89\u4e49\u53bf ","1409"],["1418","\u8fdb\u8d24\u53bf ","1409"],["1419","\u7ea2\u8c37\u6ee9\u65b0\u533a ","1409"],["1420","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","1409"],["1421","\u660c\u5317\u533a ","1409"],["1423","\u666f\u5fb7\u9547\u5e02 ","9"],["1424","\u660c\u6c5f\u533a ","1423"],["1425","\u73e0\u5c71\u533a ","1423"],["1426","\u6d6e\u6881\u53bf ","1423"],["1427","\u4e50\u5e73\u5e02 ","1423"],["1429","\u840d\u4e61\u5e02 ","9"],["1430","\u5b89\u6e90\u533a ","1429"],["1431","\u6e58\u4e1c\u533a ","1429"],["1432","\u83b2\u82b1\u53bf ","1429"],["1433","\u4e0a\u6817\u53bf ","1429"],["1434","\u82a6\u6eaa\u53bf ","1429"],["1436","\u4e5d\u6c5f\u5e02 ","9"],["1437","\u5e90\u5c71\u533a ","1436"],["1438","\u6d54\u9633\u533a ","1436"],["1439","\u4e5d\u6c5f\u53bf ","1436"],["1440","\u6b66\u5b81\u53bf ","1436"],["1441","\u4fee\u6c34\u53bf ","1436"],["1442","\u6c38\u4fee\u53bf ","1436"],["1443","\u5fb7\u5b89\u53bf ","1436"],["1444","\u661f\u5b50\u53bf ","1436"],["1445","\u90fd\u660c\u53bf ","1436"],["1446","\u6e56\u53e3\u53bf ","1436"],["1447","\u5f6d\u6cfd\u53bf ","1436"],["1448","\u745e\u660c\u5e02 ","1436"],["1450","\u65b0\u4f59\u5e02 ","9"],["1451","\u6e1d\u6c34\u533a ","1450"],["1452","\u5206\u5b9c\u53bf ","1450"],["1454","\u9e70\u6f6d\u5e02 ","9"],["1455","\u6708\u6e56\u533a ","1454"],["1456","\u4f59\u6c5f\u53bf ","1454"],["1457","\u8d35\u6eaa\u5e02 ","1454"],["1459","\u8d63\u5dde\u5e02 ","9"],["1460","\u7ae0\u8d21\u533a ","1459"],["1461","\u8d63\u53bf ","1459"],["1462","\u4fe1\u4e30\u53bf ","1459"],["1463","\u5927\u4f59\u53bf ","1459"],["1464","\u4e0a\u72b9\u53bf ","1459"],["1465","\u5d07\u4e49\u53bf ","1459"],["1466","\u5b89\u8fdc\u53bf ","1459"],["1467","\u9f99\u5357\u53bf ","1459"],["1468","\u5b9a\u5357\u53bf ","1459"],["1469","\u5168\u5357\u53bf ","1459"],["1470","\u5b81\u90fd\u53bf ","1459"],["1471","\u4e8e\u90fd\u53bf ","1459"],["1472","\u5174\u56fd\u53bf ","1459"],["1473","\u4f1a\u660c\u53bf ","1459"],["1474","\u5bfb\u4e4c\u53bf ","1459"],["1475","\u77f3\u57ce\u53bf ","1459"],["1476","\u9ec4\u91d1\u533a ","1459"],["1477","\u745e\u91d1\u5e02 ","1459"],["1478","\u5357\u5eb7\u5e02 ","1459"],["1480","\u5409\u5b89\u5e02 ","9"],["1481","\u5409\u5dde\u533a ","1480"],["1482","\u9752\u539f\u533a ","1480"],["1483","\u5409\u5b89\u53bf ","1480"],["1484","\u5409\u6c34\u53bf ","1480"],["1485","\u5ce1\u6c5f\u53bf ","1480"],["1486","\u65b0\u5e72\u53bf ","1480"],["1487","\u6c38\u4e30\u53bf ","1480"],["1488","\u6cf0\u548c\u53bf ","1480"],["1489","\u9042\u5ddd\u53bf ","1480"],["1490","\u4e07\u5b89\u53bf ","1480"],["1491","\u5b89\u798f\u53bf ","1480"],["1492","\u6c38\u65b0\u53bf ","1480"],["1493","\u4e95\u5188\u5c71\u5e02 ","1480"],["1495","\u5b9c\u6625\u5e02 ","9"],["1496","\u8881\u5dde\u533a ","1495"],["1497","\u5949\u65b0\u53bf ","1495"],["1498","\u4e07\u8f7d\u53bf ","1495"],["1499","\u4e0a\u9ad8\u53bf ","1495"],["1500","\u5b9c\u4e30\u53bf ","1495"],["1501","\u9756\u5b89\u53bf ","1495"],["1502","\u94dc\u9f13\u53bf ","1495"],["1503","\u4e30\u57ce\u5e02 ","1495"],["1504","\u6a1f\u6811\u5e02 ","1495"],["1505","\u9ad8\u5b89\u5e02 ","1495"],["1507","\u629a\u5dde\u5e02 ","9"],["1508","\u4e34\u5ddd\u533a ","1507"],["1509","\u5357\u57ce\u53bf ","1507"],["1510","\u9ece\u5ddd\u53bf ","1507"],["1511","\u5357\u4e30\u53bf ","1507"],["1512","\u5d07\u4ec1\u53bf ","1507"],["1513","\u4e50\u5b89\u53bf ","1507"],["1514","\u5b9c\u9ec4\u53bf ","1507"],["1515","\u91d1\u6eaa\u53bf ","1507"],["1516","\u8d44\u6eaa\u53bf ","1507"],["1517","\u4e1c\u4e61\u53bf ","1507"],["1518","\u5e7f\u660c\u53bf ","1507"],["1520","\u4e0a\u9976\u5e02 ","9"],["1521","\u4fe1\u5dde\u533a ","1520"],["1522","\u4e0a\u9976\u53bf ","1520"],["1523","\u5e7f\u4e30\u53bf ","1520"],["1524","\u7389\u5c71\u53bf ","1520"],["1525","\u94c5\u5c71\u53bf ","1520"],["1526","\u6a2a\u5cf0\u53bf ","1520"],["1527","\u5f0b\u9633\u53bf ","1520"],["1528","\u4f59\u5e72\u53bf ","1520"],["1529","\u9131\u9633\u53bf ","1520"],["1530","\u4e07\u5e74\u53bf ","1520"],["1531","\u5a7a\u6e90\u53bf ","1520"],["1532","\u5fb7\u5174\u5e02 ","1520"],["10","\u5c71\u4e1c\u7701 ","0"],["1535","\u6d4e\u5357\u5e02 ","10"],["1536","\u5386\u4e0b\u533a ","1535"],["1537","\u5e02\u4e2d\u533a ","1535"],["1538","\u69d0\u836b\u533a ","1535"],["1539","\u5929\u6865\u533a ","1535"],["1540","\u5386\u57ce\u533a ","1535"],["1541","\u957f\u6e05\u533a ","1535"],["1542","\u5e73\u9634\u53bf ","1535"],["1543","\u6d4e\u9633\u53bf ","1535"],["1544","\u5546\u6cb3\u53bf ","1535"],["1545","\u7ae0\u4e18\u5e02 ","1535"],["1547","\u9752\u5c9b\u5e02 ","10"],["1548","\u5e02\u5357\u533a ","1547"],["1549","\u5e02\u5317\u533a ","1547"],["1550","\u56db\u65b9\u533a ","1547"],["1551","\u9ec4\u5c9b\u533a ","1547"],["1552","\u5d02\u5c71\u533a ","1547"],["1553","\u674e\u6ca7\u533a ","1547"],["1554","\u57ce\u9633\u533a ","1547"],["1555","\u5f00\u53d1\u533a ","1547"],["1556","\u80f6\u5dde\u5e02 ","1547"],["1557","\u5373\u58a8\u5e02 ","1547"],["1558","\u5e73\u5ea6\u5e02 ","1547"],["1559","\u80f6\u5357\u5e02 ","1547"],["1560","\u83b1\u897f\u5e02 ","1547"],["1562","\u6dc4\u535a\u5e02 ","10"],["1563","\u6dc4\u5ddd\u533a ","1562"],["1564","\u5f20\u5e97\u533a ","1562"],["1565","\u535a\u5c71\u533a ","1562"],["1566","\u4e34\u6dc4\u533a ","1562"],["1567","\u5468\u6751\u533a ","1562"],["1568","\u6853\u53f0\u53bf ","1562"],["1569","\u9ad8\u9752\u53bf ","1562"],["1570","\u6c82\u6e90\u53bf ","1562"],["1572","\u67a3\u5e84\u5e02 ","10"],["1573","\u5e02\u4e2d\u533a ","1572"],["1574","\u859b\u57ce\u533a ","1572"],["1575","\u5cc4\u57ce\u533a ","1572"],["1576","\u53f0\u513f\u5e84\u533a ","1572"],["1577","\u5c71\u4ead\u533a ","1572"],["1578","\u6ed5\u5dde\u5e02 ","1572"],["1580","\u4e1c\u8425\u5e02 ","10"],["1581","\u4e1c\u8425\u533a ","1580"],["1582","\u6cb3\u53e3\u533a ","1580"],["1583","\u57a6\u5229\u53bf ","1580"],["1584","\u5229\u6d25\u53bf ","1580"],["1585","\u5e7f\u9976\u53bf ","1580"],["1586","\u897f\u57ce\u533a ","1580"],["1587","\u4e1c\u57ce\u533a ","1580"],["1589","\u70df\u53f0\u5e02 ","10"],["1590","\u829d\u7f58\u533a ","1589"],["1591","\u798f\u5c71\u533a ","1589"],["1592","\u725f\u5e73\u533a ","1589"],["1593","\u83b1\u5c71\u533a ","1589"],["1594","\u957f\u5c9b\u53bf ","1589"],["1595","\u9f99\u53e3\u5e02 ","1589"],["1596","\u83b1\u9633\u5e02 ","1589"],["1597","\u83b1\u5dde\u5e02 ","1589"],["1598","\u84ec\u83b1\u5e02 ","1589"],["1599","\u62db\u8fdc\u5e02 ","1589"],["1600","\u6816\u971e\u5e02 ","1589"],["1601","\u6d77\u9633\u5e02 ","1589"],["1603","\u6f4d\u574a\u5e02 ","10"],["1604","\u6f4d\u57ce\u533a ","1603"],["1605","\u5bd2\u4ead\u533a ","1603"],["1606","\u574a\u5b50\u533a ","1603"],["1607","\u594e\u6587\u533a ","1603"],["1608","\u4e34\u6710\u53bf ","1603"],["1609","\u660c\u4e50\u53bf ","1603"],["1610","\u5f00\u53d1\u533a ","1603"],["1611","\u9752\u5dde\u5e02 ","1603"],["1612","\u8bf8\u57ce\u5e02 ","1603"],["1613","\u5bff\u5149\u5e02 ","1603"],["1614","\u5b89\u4e18\u5e02 ","1603"],["1615","\u9ad8\u5bc6\u5e02 ","1603"],["1616","\u660c\u9091\u5e02 ","1603"],["1618","\u6d4e\u5b81\u5e02 ","10"],["1619","\u5e02\u4e2d\u533a ","1618"],["1620","\u4efb\u57ce\u533a ","1618"],["1621","\u5fae\u5c71\u53bf ","1618"],["1622","\u9c7c\u53f0\u53bf ","1618"],["1623","\u91d1\u4e61\u53bf ","1618"],["1624","\u5609\u7965\u53bf ","1618"],["1625","\u6c76\u4e0a\u53bf ","1618"],["1626","\u6cd7\u6c34\u53bf ","1618"],["1627","\u6881\u5c71\u53bf ","1618"],["1628","\u66f2\u961c\u5e02 ","1618"],["1629","\u5156\u5dde\u5e02 ","1618"],["1630","\u90b9\u57ce\u5e02 ","1618"],["1632","\u6cf0\u5b89\u5e02 ","10"],["1633","\u6cf0\u5c71\u533a ","1632"],["1634","\u5cb1\u5cb3\u533a ","1632"],["1635","\u5b81\u9633\u53bf ","1632"],["1636","\u4e1c\u5e73\u53bf ","1632"],["1637","\u65b0\u6cf0\u5e02 ","1632"],["1638","\u80a5\u57ce\u5e02 ","1632"],["1640","\u5a01\u6d77\u5e02 ","10"],["1641","\u73af\u7fe0\u533a ","1640"],["1642","\u6587\u767b\u5e02 ","1640"],["1643","\u8363\u6210\u5e02 ","1640"],["1644","\u4e73\u5c71\u5e02 ","1640"],["1646","\u65e5\u7167\u5e02 ","10"],["1647","\u4e1c\u6e2f\u533a ","1646"],["1648","\u5c9a\u5c71\u533a ","1646"],["1649","\u4e94\u83b2\u53bf ","1646"],["1650","\u8392\u53bf ","1646"],["1652","\u83b1\u829c\u5e02 ","10"],["1653","\u83b1\u57ce\u533a ","1652"],["1654","\u94a2\u57ce\u533a ","1652"],["1656","\u4e34\u6c82\u5e02 ","10"],["1657","\u5170\u5c71\u533a ","1656"],["1658","\u7f57\u5e84\u533a ","1656"],["1659","\u6cb3\u4e1c\u533a ","1656"],["1660","\u6c82\u5357\u53bf ","1656"],["1661","\u90ef\u57ce\u53bf ","1656"],["1662","\u6c82\u6c34\u53bf ","1656"],["1663","\u82cd\u5c71\u53bf ","1656"],["1665"," \u5e73\u9091\u53bf ","1656"],["1666","\u8392\u5357\u53bf ","1656"],["1667","\u8499\u9634\u53bf ","1656"],["1668","\u4e34\u6cad\u53bf ","1656"],["1670","\u5fb7\u5dde\u5e02 ","10"],["1671","\u5fb7\u57ce\u533a ","1670"],["1672","\u9675\u53bf ","1670"],["1673"," \u5b81\u6d25\u53bf ","1670"],["1674","\u5e86\u4e91\u53bf ","1670"],["1675","\u4e34\u9091\u53bf ","1670"],["1676","\u9f50\u6cb3\u53bf ","1670"],["1677","\u5e73\u539f\u53bf ","1670"],["1678","\u590f\u6d25\u53bf ","1670"],["1679","\u6b66\u57ce\u53bf ","1670"],["1680","\u5f00\u53d1\u533a ","1670"],["1681","\u4e50\u9675\u5e02 ","1670"],["1682","\u79b9\u57ce\u5e02 ","1670"],["1684","\u804a\u57ce\u5e02 ","10"],["1685","\u4e1c\u660c\u5e9c\u533a ","1684"],["1686","\u9633\u8c37\u53bf ","1684"],["1687","\u8398\u53bf ","1684"],["1688","\u830c\u5e73\u53bf ","1684"],["1689"," \u4e1c\u963f\u53bf ","1684"],["1690","\u51a0\u53bf ","1684"],["1691","\u9ad8\u5510\u53bf ","1684"],["1692","\u4e34\u6e05\u5e02 ","1684"],["1694","\u6ee8\u5dde\u5e02 ","10"],["1695","\u6ee8\u57ce\u533a ","1694"],["1696","\u60e0\u6c11\u53bf ","1694"],["1697","\u9633\u4fe1\u53bf ","1694"],["1698","\u65e0\u68e3\u53bf ","1694"],["1699","\u6cbe\u5316\u53bf ","1694"],["1700","\u535a\u5174\u53bf ","1694"],["1701","\u90b9\u5e73\u53bf ","1694"],["1703","\u83cf\u6cfd\u5e02 ","10"],["1704","\u7261\u4e39\u533a ","1703"],["1705","\u66f9\u53bf ","1703"],["1706","\u5355\u53bf ","1703"],["1707","\u6210\u6b66\u53bf ","1703"],["1708","\u5de8\u91ce\u53bf ","1703"],["1709","\u90d3\u57ce\u53bf ","1703"],["1710","\u9104\u57ce\u53bf ","1703"],["1711","\u5b9a\u9676\u53bf ","1703"],["1712","\u4e1c\u660e\u53bf ","1703"],["11","\u6cb3\u5357\u7701 ","0"],["1715","\u90d1\u5dde\u5e02 ","11"],["1716","\u4e2d\u539f\u533a ","1715"],["1717","\u4e8c\u4e03\u533a ","1715"],["1718","\u7ba1\u57ce\u56de\u65cf\u533a ","1715"],["1719","\u91d1\u6c34\u533a ","1715"],["1720","\u4e0a\u8857\u533a ","1715"],["1721","\u60e0\u6d4e\u533a ","1715"],["1722","\u4e2d\u725f\u53bf ","1715"],["1723","\u5de9\u4e49\u5e02 ","1715"],["1724","\u8365\u9633\u5e02 ","1715"],["1725","\u65b0\u5bc6\u5e02 ","1715"],["1726","\u65b0\u90d1\u5e02 ","1715"],["1727","\u767b\u5c01\u5e02 ","1715"],["1728","\u90d1\u4e1c\u65b0\u533a ","1715"],["1729","\u9ad8\u65b0\u533a ","1715"],["1731","\u5f00\u5c01\u5e02 ","11"],["1732","\u9f99\u4ead\u533a ","1731"],["1733","\u987a\u6cb3\u56de\u65cf\u533a ","1731"],["1734","\u9f13\u697c\u533a ","1731"],["1735","\u79b9\u738b\u53f0\u533a ","1731"],["1736","\u91d1\u660e\u533a ","1731"],["1737","\u675e\u53bf ","1731"],["1738","\u901a\u8bb8\u53bf ","1731"],["1739","\u5c09\u6c0f\u53bf ","1731"],["1740","\u5f00\u5c01\u53bf ","1731"],["1741","\u5170\u8003\u53bf ","1731"],["1743","\u6d1b\u9633\u5e02 ","11"],["1744","\u8001\u57ce\u533a ","1743"],["1745","\u897f\u5de5\u533a ","1743"],["1746","\u5edb\u6cb3\u56de\u65cf\u533a ","1743"],["1747","\u6da7\u897f\u533a ","1743"],["1748","\u5409\u5229\u533a ","1743"],["1749","\u6d1b\u9f99\u533a ","1743"],["1750","\u5b5f\u6d25\u53bf ","1743"],["1751","\u65b0\u5b89\u53bf ","1743"],["1752","\u683e\u5ddd\u53bf ","1743"],["1753","\u5d69\u53bf ","1743"],["1754","\u6c5d\u9633\u53bf ","1743"],["1755","\u5b9c\u9633\u53bf ","1743"],["1756","\u6d1b\u5b81\u53bf ","1743"],["1757","\u4f0a\u5ddd\u53bf ","1743"],["1758","\u5043\u5e08\u5e02 ","1743"],["1759","\u9ad8\u65b0\u533a ","1743"],["1761","\u5e73\u9876\u5c71\u5e02 ","11"],["1762","\u65b0\u534e\u533a ","1761"],["1763","\u536b\u4e1c\u533a ","1761"],["1764","\u77f3\u9f99\u533a ","1761"],["1765","\u6e5b\u6cb3\u533a ","1761"],["1766","\u5b9d\u4e30\u53bf ","1761"],["1767","\u53f6\u53bf ","1761"],["1768","\u9c81\u5c71\u53bf ","1761"],["1769"," \u90cf\u53bf ","1761"],["1770","\u821e\u94a2\u5e02 ","1761"],["1771","\u6c5d\u5dde\u5e02 ","1761"],["1773","\u5b89\u9633\u5e02 ","11"],["1774","\u6587\u5cf0\u533a ","1773"],["1775","\u5317\u5173\u533a ","1773"],["1776","\u6bb7\u90fd\u533a ","1773"],["1777","\u9f99\u5b89\u533a ","1773"],["1778","\u5b89\u9633\u53bf ","1773"],["1779","\u6c64\u9634\u53bf ","1773"],["1780","\u6ed1\u53bf ","1773"],["1781","\u5185\u9ec4\u53bf ","1773"],["1782","\u6797\u5dde\u5e02 ","1773"],["1784","\u9e64\u58c1\u5e02 ","11"],["1785","\u9e64\u5c71\u533a ","1784"],["1786","\u5c71\u57ce\u533a ","1784"],["1787","\u6dc7\u6ee8\u533a ","1784"],["1788","\u6d5a\u53bf ","1784"],["1789","\u6dc7\u53bf ","1784"],["2054","\u6d4f\u9633\u5e02 ","2045"],["2056","\u682a\u6d32\u5e02 ","13"],["2057","\u8377\u5858\u533a ","2056"],["2058","\u82a6\u6dde\u533a ","2056"],["2059","\u77f3\u5cf0\u533a ","2056"],["2060","\u5929\u5143\u533a ","2056"],["2061","\u682a\u6d32\u53bf ","2056"],["2062","\u6538\u53bf ","2056"],["2063","\u8336\u9675\u53bf ","2056"],["2064"," \u708e\u9675\u53bf ","2056"],["2065","\u91b4\u9675\u5e02 ","2056"],["2067","\u6e58\u6f6d\u5e02 ","13"],["2068","\u96e8\u6e56\u533a ","2067"],["2069","\u5cb3\u5858\u533a ","2067"],["2070","\u6e58\u6f6d\u53bf ","2067"],["2071","\u6e58\u4e61\u5e02 ","2067"],["2072","\u97f6\u5c71\u5e02 ","2067"],["2074","\u8861\u9633\u5e02 ","13"],["2075","\u73e0\u6656\u533a ","2074"],["2076","\u96c1\u5cf0\u533a ","2074"],["2077","\u77f3\u9f13\u533a ","2074"],["2078","\u84b8\u6e58\u533a ","2074"],["2079","\u5357\u5cb3\u533a ","2074"],["2080","\u8861\u9633\u53bf ","2074"],["2081","\u8861\u5357\u53bf ","2074"],["2082","\u8861\u5c71\u53bf ","2074"],["2083","\u8861\u4e1c\u53bf ","2074"],["2084","\u7941\u4e1c\u53bf ","2074"],["2085","\u8012\u9633\u5e02 ","2074"],["2086","\u5e38\u5b81\u5e02 ","2074"],["2088","\u90b5\u9633\u5e02 ","13"],["2089","\u53cc\u6e05\u533a ","2088"],["2090","\u5927\u7965\u533a ","2088"],["2091","\u5317\u5854\u533a ","2088"],["2092","\u90b5\u4e1c\u53bf ","2088"],["2093","\u65b0\u90b5\u53bf ","2088"],["2094","\u90b5\u9633\u53bf ","2088"],["2095","\u9686\u56de\u53bf ","2088"],["2096","\u6d1e\u53e3\u53bf ","2088"],["2097","\u7ee5\u5b81\u53bf ","2088"],["2098","\u65b0\u5b81\u53bf ","2088"],["2099","\u57ce\u6b65\u82d7\u65cf\u81ea\u6cbb\u53bf ","2088"],["2100","\u6b66\u5188\u5e02 ","2088"],["2102","\u5cb3\u9633\u5e02 ","13"],["2103","\u5cb3\u9633\u697c\u533a ","2102"],["2104","\u4e91\u6eaa\u533a ","2102"],["2105","\u541b\u5c71\u533a ","2102"],["2106","\u5cb3\u9633\u53bf ","2102"],["2107","\u534e\u5bb9\u53bf ","2102"],["2108","\u6e58\u9634\u53bf ","2102"],["2109","\u5e73\u6c5f\u53bf ","2102"],["2110","\u6c68\u7f57\u5e02 ","2102"],["2111","\u4e34\u6e58\u5e02 ","2102"],["2113","\u5e38\u5fb7\u5e02 ","13"],["2114","\u6b66\u9675\u533a ","2113"],["2115","\u9f0e\u57ce\u533a ","2113"],["2116","\u5b89\u4e61\u53bf ","2113"],["2117","\u6c49\u5bff\u53bf ","2113"],["2118","\u6fa7\u53bf ","2113"],["2119","\u4e34\u6fa7\u53bf ","2113"],["2120"," \u6843\u6e90\u53bf ","2113"],["2254","\u6c5f\u95e8\u5e02 ","14"],["2255","\u84ec\u6c5f\u533a ","2254"],["2256","\u6c5f\u6d77\u533a ","2254"],["2257","\u65b0\u4f1a\u533a ","2254"],["2258","\u53f0\u5c71\u5e02 ","2254"],["2259","\u5f00\u5e73\u5e02 ","2254"],["2260","\u9e64\u5c71\u5e02 ","2254"],["2261","\u6069\u5e73\u5e02 ","2254"],["2263","\u6e5b\u6c5f\u5e02 ","14"],["2264","\u8d64\u574e\u533a ","2263"],["2265","\u971e\u5c71\u533a ","2263"],["2266","\u5761\u5934\u533a ","2263"],["2267","\u9ebb\u7ae0\u533a ","2263"],["2268","\u9042\u6eaa\u53bf ","2263"],["2269","\u5f90\u95fb\u53bf ","2263"],["2270","\u5ec9\u6c5f\u5e02 ","2263"],["2271","\u96f7\u5dde\u5e02 ","2263"],["2272","\u5434\u5ddd\u5e02 ","2263"],["2274","\u8302\u540d\u5e02 ","14"],["2275","\u8302\u5357\u533a ","2274"],["2276","\u8302\u6e2f\u533a ","2274"],["2277","\u7535\u767d\u53bf ","2274"],["2278","\u9ad8\u5dde\u5e02 ","2274"],["2279","\u5316\u5dde\u5e02 ","2274"],["2280","\u4fe1\u5b9c\u5e02 ","2274"],["2282","\u8087\u5e86\u5e02 ","14"],["2283","\u7aef\u5dde\u533a ","2282"],["2284","\u9f0e\u6e56\u533a ","2282"],["2285","\u5e7f\u5b81\u53bf ","2282"],["2286","\u6000\u96c6\u53bf ","2282"],["2287","\u5c01\u5f00\u53bf ","2282"],["2288","\u5fb7\u5e86\u53bf ","2282"],["2289","\u9ad8\u8981\u5e02 ","2282"],["2290","\u56db\u4f1a\u5e02 ","2282"],["2292","\u60e0\u5dde\u5e02 ","14"],["2293","\u60e0\u57ce\u533a ","2292"],["2294","\u60e0\u9633\u533a ","2292"],["2295","\u535a\u7f57\u53bf ","2292"],["2296","\u60e0\u4e1c\u53bf ","2292"],["2297","\u9f99\u95e8\u53bf ","2292"],["2299","\u6885\u5dde\u5e02 ","14"],["2300","\u6885\u6c5f\u533a ","2299"],["2301","\u6885\u53bf ","2299"],["2302"," \u5927\u57d4\u53bf ","2299"],["2303","\u4e30\u987a\u53bf ","2299"],["2304","\u4e94\u534e\u53bf ","2299"],["2305","\u5e73\u8fdc\u53bf ","2299"],["2306","\u8549\u5cad\u53bf ","2299"],["2307","\u5174\u5b81\u5e02 ","2299"],["2309","\u6c55\u5c3e\u5e02 ","14"],["2310","\u57ce\u533a ","2309"],["2311","\u6d77\u4e30\u53bf ","2309"],["2312","\u9646\u6cb3\u53bf ","2309"],["2313","\u9646\u4e30\u5e02 ","2309"],["2315","\u6cb3\u6e90\u5e02 ","14"],["2316","\u6e90\u57ce\u533a ","2315"],["2317","\u7d2b\u91d1\u53bf ","2315"],["2121","\u77f3\u95e8\u53bf ","2113"],["2122","\u6d25\u5e02\u5e02 ","2113"],["2124","\u5f20\u5bb6\u754c\u5e02 ","13"],["2125","\u6c38\u5b9a\u533a ","2124"],["2126","\u6b66\u9675\u6e90\u533a ","2124"],["2127","\u6148\u5229\u53bf ","2124"],["2128","\u6851\u690d\u53bf ","2124"],["2130","\u76ca\u9633\u5e02 ","13"],["2131","\u8d44\u9633\u533a ","2130"],["2132","\u8d6b\u5c71\u533a ","2130"],["2133","\u5357\u53bf ","2130"],["2134","\u6843\u6c5f\u53bf ","2130"],["2135","\u5b89\u5316\u53bf ","2130"],["2136","\u6c85\u6c5f\u5e02 ","2130"],["2138","\u90f4\u5dde\u5e02 ","13"],["2139","\u5317\u6e56\u533a ","2138"],["2140","\u82cf\u4ed9\u533a ","2138"],["2141","\u6842\u9633\u53bf ","2138"],["2142","\u5b9c\u7ae0\u53bf ","2138"],["2143","\u6c38\u5174\u53bf ","2138"],["2144","\u5609\u79be\u53bf ","2138"],["2145","\u4e34\u6b66\u53bf ","2138"],["2146","\u6c5d\u57ce\u53bf ","2138"],["2147","\u6842\u4e1c\u53bf ","2138"],["2148","\u5b89\u4ec1\u53bf ","2138"],["2149","\u8d44\u5174\u5e02 ","2138"],["2151","\u6c38\u5dde\u5e02 ","13"],["2152","\u96f6\u9675\u533a ","2151"],["2153","\u51b7\u6c34\u6ee9\u533a ","2151"],["2154","\u7941\u9633\u53bf ","2151"],["2155","\u4e1c\u5b89\u53bf ","2151"],["2156","\u53cc\u724c\u53bf ","2151"],["2157","\u9053\u53bf ","2151"],["2158","\u6c5f\u6c38\u53bf ","2151"],["2159","\u5b81\u8fdc\u53bf ","2151"],["2160","\u84dd\u5c71\u53bf ","2151"],["2161","\u65b0\u7530\u53bf ","2151"],["2162","\u6c5f\u534e\u7476\u65cf\u81ea\u6cbb\u53bf ","2151"],["2164","\u6000\u5316\u5e02 ","13"],["2165","\u9e64\u57ce\u533a ","2164"],["2166","\u4e2d\u65b9\u53bf ","2164"],["2167","\u6c85\u9675\u53bf ","2164"],["2168","\u8fb0\u6eaa\u53bf ","2164"],["2169","\u6e86\u6d66\u53bf ","2164"],["2170","\u4f1a\u540c\u53bf ","2164"],["2171","\u9ebb\u9633\u82d7\u65cf\u81ea\u6cbb\u53bf ","2164"],["2172","\u65b0\u6643\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2173","\u82b7\u6c5f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2174","\u9756\u5dde\u82d7\u65cf\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2175","\u901a\u9053\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2176","\u6d2a\u6c5f\u5e02 ","2164"],["2178","\u5a04\u5e95\u5e02 ","13"],["2179","\u5a04\u661f\u533a ","2178"],["2180","\u53cc\u5cf0\u53bf ","2178"],["2181","\u65b0\u5316\u53bf ","2178"],["2182","\u51b7\u6c34\u6c5f\u5e02 ","2178"],["2183","\u6d9f\u6e90\u5e02 ","2178"],["2185","\u6e58\u897f\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","13"],["2186","\u5409\u9996\u5e02 ","2185"],["2187","\u6cf8\u6eaa\u53bf ","2185"],["2188","\u51e4\u51f0\u53bf ","2185"],["2189","\u82b1\u57a3\u53bf ","2185"],["2190","\u4fdd\u9756\u53bf ","2185"],["2191","\u53e4\u4e08\u53bf ","2185"],["2192","\u6c38\u987a\u53bf ","2185"],["2193","\u9f99\u5c71\u53bf ","2185"],["14","\u5e7f\u4e1c\u7701 ","0"],["2196","\u5e7f\u5dde\u5e02 ","14"],["2197","\u8354\u6e7e\u533a ","2196"],["2198","\u8d8a\u79c0\u533a ","2196"],["2199","\u6d77\u73e0\u533a ","2196"],["2200","\u5929\u6cb3\u533a ","2196"],["2201","\u767d\u4e91\u533a ","2196"],["2202","\u9ec4\u57d4\u533a ","2196"],["2203","\u756a\u79ba\u533a ","2196"],["2204","\u82b1\u90fd\u533a ","2196"],["2205","\u5357\u6c99\u533a ","2196"],["2206","\u841d\u5c97\u533a ","2196"],["2207","\u589e\u57ce\u5e02 ","2196"],["2208","\u4ece\u5316\u5e02 ","2196"],["2209","\u4e1c\u5c71\u533a ","2196"],["2211","\u97f6\u5173\u5e02 ","14"],["2212","\u6b66\u6c5f\u533a ","2211"],["2213","\u6d48\u6c5f\u533a ","2211"],["2214","\u66f2\u6c5f\u533a ","2211"],["2215","\u59cb\u5174\u53bf ","2211"],["2216","\u4ec1\u5316\u53bf ","2211"],["2217","\u7fc1\u6e90\u53bf ","2211"],["2218","\u4e73\u6e90\u7476\u65cf\u81ea\u6cbb\u53bf ","2211"],["2219","\u65b0\u4e30\u53bf ","2211"],["2220","\u4e50\u660c\u5e02 ","2211"],["2221","\u5357\u96c4\u5e02 ","2211"],["2223","\u6df1\u5733\u5e02 ","14"],["2224","\u7f57\u6e56\u533a ","2223"],["2225","\u798f\u7530\u533a ","2223"],["2226","\u5357\u5c71\u533a ","2223"],["2227","\u5b9d\u5b89\u533a ","2223"],["2228","\u9f99\u5c97\u533a ","2223"],["2229","\u76d0\u7530\u533a ","2223"],["2231","\u73e0\u6d77\u5e02 ","14"],["2232","\u9999\u6d32\u533a ","2231"],["2233","\u6597\u95e8\u533a ","2231"],["2234","\u91d1\u6e7e\u533a ","2231"],["2235","\u91d1\u5510\u533a ","2231"],["2236","\u5357\u6e7e\u533a ","2231"],["2238","\u6c55\u5934\u5e02 ","14"],["2239","\u9f99\u6e56\u533a ","2238"],["2240","\u91d1\u5e73\u533a ","2238"],["2241","\u6fe0\u6c5f\u533a ","2238"],["2242","\u6f6e\u9633\u533a ","2238"],["2243","\u6f6e\u5357\u533a ","2238"],["2244","\u6f84\u6d77\u533a ","2238"],["2245","\u5357\u6fb3\u53bf ","2238"],["2247","\u4f5b\u5c71\u5e02 ","14"],["2248","\u7985\u57ce\u533a ","2247"],["2249","\u5357\u6d77\u533a ","2247"],["2250","\u987a\u5fb7\u533a ","2247"],["2251","\u4e09\u6c34\u533a ","2247"],["2252","\u9ad8\u660e\u533a ","2247"],["1856","\u5185\u4e61\u53bf ","1849"],["1857","\u6dc5\u5ddd\u53bf ","1849"],["1858","\u793e\u65d7\u53bf ","1849"],["1859","\u5510\u6cb3\u53bf ","1849"],["1860","\u65b0\u91ce\u53bf ","1849"],["1861","\u6850\u67cf\u53bf ","1849"],["1862","\u9093\u5dde\u5e02 ","1849"],["1864","\u5546\u4e18\u5e02 ","11"],["1865","\u6881\u56ed\u533a ","1864"],["1866","\u7762\u9633\u533a ","1864"],["1867","\u6c11\u6743\u53bf ","1864"],["1868","\u7762\u53bf ","1864"],["1869","\u5b81\u9675\u53bf ","1864"],["1870","\u67d8\u57ce\u53bf ","1864"],["1871","\u865e\u57ce\u53bf ","1864"],["1872","\u590f\u9091\u53bf ","1864"],["1873","\u6c38\u57ce\u5e02 ","1864"],["1875","\u4fe1\u9633\u5e02 ","11"],["1876","\u6d49\u6cb3\u533a ","1875"],["1877","\u5e73\u6865\u533a ","1875"],["1878","\u7f57\u5c71\u53bf ","1875"],["1879","\u5149\u5c71\u53bf ","1875"],["1880","\u65b0\u53bf ","1875"],["1881"," \u5546\u57ce\u53bf ","1875"],["1882","\u56fa\u59cb\u53bf ","1875"],["1883","\u6f62\u5ddd\u53bf ","1875"],["1884","\u6dee\u6ee8\u53bf ","1875"],["1885","\u606f\u53bf ","1875"],["1887","\u5468\u53e3\u5e02 ","11"],["1888","\u5ddd\u6c47\u533a ","1887"],["1889","\u6276\u6c9f\u53bf ","1887"],["1890","\u897f\u534e\u53bf ","1887"],["1891","\u5546\u6c34\u53bf ","1887"],["1892","\u6c88\u4e18\u53bf ","1887"],["1893","\u90f8\u57ce\u53bf ","1887"],["1894","\u6dee\u9633\u53bf ","1887"],["1895","\u592a\u5eb7\u53bf ","1887"],["1896","\u9e7f\u9091\u53bf ","1887"],["1897","\u9879\u57ce\u5e02 ","1887"],["1899","\u9a7b\u9a6c\u5e97\u5e02 ","11"],["1900","\u9a7f\u57ce\u533a ","1899"],["1901","\u897f\u5e73\u53bf ","1899"],["1902","\u4e0a\u8521\u53bf ","1899"],["1903","\u5e73\u8206\u53bf ","1899"],["1904","\u6b63\u9633\u53bf ","1899"],["1905","\u786e\u5c71\u53bf ","1899"],["1906","\u6ccc\u9633\u53bf ","1899"],["1907","\u6c5d\u5357\u53bf ","1899"],["1908","\u9042\u5e73\u53bf ","1899"],["1909","\u65b0\u8521\u53bf ","1899"],["12","\u6e56\u5317\u7701 ","0"],["1912","\u6b66\u6c49\u5e02 ","12"],["1913","\u6c5f\u5cb8\u533a ","1912"],["1914","\u6c5f\u6c49\u533a ","1912"],["1915","\u785a\u53e3\u533a ","1912"],["1916","\u6c49\u9633\u533a ","1912"],["1917","\u6b66\u660c\u533a ","1912"],["1918","\u9752\u5c71\u533a ","1912"],["1919","\u6d2a\u5c71\u533a ","1912"],["1920","\u4e1c\u897f\u6e56\u533a ","1912"],["1921","\u6c49\u5357\u533a ","1912"],["1922","\u8521\u7538\u533a ","1912"],["1923","\u6c5f\u590f\u533a ","1912"],["1924","\u9ec4\u9642\u533a ","1912"],["1925","\u65b0\u6d32\u533a ","1912"],["1927","\u9ec4\u77f3\u5e02 ","12"],["1928","\u9ec4\u77f3\u6e2f\u533a ","1927"],["1929","\u897f\u585e\u5c71\u533a ","1927"],["1930","\u4e0b\u9646\u533a ","1927"],["1931","\u94c1\u5c71\u533a ","1927"],["1932","\u9633\u65b0\u53bf ","1927"],["1933","\u5927\u51b6\u5e02 ","1927"],["1935","\u5341\u5830\u5e02 ","12"],["1936","\u8305\u7bad\u533a ","1935"],["1937","\u5f20\u6e7e\u533a ","1935"],["1938","\u90e7\u53bf ","1935"],["1939","\u90e7\u897f\u53bf ","1935"],["1940","\u7af9\u5c71\u53bf ","1935"],["1941","\u7af9\u6eaa\u53bf ","1935"],["1942","\u623f\u53bf ","1935"],["1943","\u4e39\u6c5f\u53e3\u5e02 ","1935"],["1944","\u57ce\u533a ","1935"],["1946","\u5b9c\u660c\u5e02 ","12"],["1947","\u897f\u9675\u533a ","1946"],["1948","\u4f0d\u5bb6\u5c97\u533a ","1946"],["1949","\u70b9\u519b\u533a ","1946"],["1950","\u7307\u4ead\u533a ","1946"],["1951","\u5937\u9675\u533a ","1946"],["1952","\u8fdc\u5b89\u53bf ","1946"],["1953","\u5174\u5c71\u53bf ","1946"],["1954","\u79ed\u5f52\u53bf ","1946"],["1955","\u957f\u9633\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","1946"],["1956","\u4e94\u5cf0\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","1946"],["1957","\u845b\u6d32\u575d\u533a ","1946"],["1958","\u5f00\u53d1\u533a ","1946"],["1959","\u5b9c\u90fd\u5e02 ","1946"],["1960","\u5f53\u9633\u5e02 ","1946"],["1961","\u679d\u6c5f\u5e02 ","1946"],["1963","\u8944\u6a0a\u5e02 ","12"],["1964","\u8944\u57ce\u533a ","1963"],["1965","\u6a0a\u57ce\u533a ","1963"],["1966","\u8944\u9633\u533a ","1963"],["1967","\u5357\u6f33\u53bf ","1963"],["1968","\u8c37\u57ce\u53bf ","1963"],["1969","\u4fdd\u5eb7\u53bf ","1963"],["1970","\u8001\u6cb3\u53e3\u5e02 ","1963"],["1971","\u67a3\u9633\u5e02 ","1963"],["1972","\u5b9c\u57ce\u5e02 ","1963"],["1974","\u9102\u5dde\u5e02 ","12"],["1975","\u6881\u5b50\u6e56\u533a ","1974"],["1976","\u534e\u5bb9\u533a ","1974"],["1977","\u9102\u57ce\u533a ","1974"],["1979","\u8346\u95e8\u5e02 ","12"],["1980","\u4e1c\u5b9d\u533a ","1979"],["1981","\u6387\u5200\u533a ","1979"],["1982","\u4eac\u5c71\u53bf ","1979"],["1983","\u6c99\u6d0b\u53bf ","1979"],["1984","\u949f\u7965\u5e02 ","1979"],["1986","\u5b5d\u611f\u5e02 ","12"],["1987","\u5b5d\u5357\u533a ","1986"],["1988","\u5b5d\u660c\u53bf ","1986"],["1989","\u5927\u609f\u53bf ","1986"],["1990","\u4e91\u68a6\u53bf ","1986"],["1991","\u5e94\u57ce\u5e02 ","1986"],["1992","\u5b89\u9646\u5e02 ","1986"],["1993","\u6c49\u5ddd\u5e02 ","1986"],["1995","\u8346\u5dde\u5e02 ","12"],["1996","\u6c99\u5e02\u533a ","1995"],["1997","\u8346\u5dde\u533a ","1995"],["1998","\u516c\u5b89\u53bf ","1995"],["1999","\u76d1\u5229\u53bf ","1995"],["2000","\u6c5f\u9675\u53bf ","1995"],["2001","\u77f3\u9996\u5e02 ","1995"],["2002","\u6d2a\u6e56\u5e02 ","1995"],["2003","\u677e\u6ecb\u5e02 ","1995"],["2005","\u9ec4\u5188\u5e02 ","12"],["2006","\u9ec4\u5dde\u533a ","2005"],["2007","\u56e2\u98ce\u53bf ","2005"],["2008","\u7ea2\u5b89\u53bf ","2005"],["2009","\u7f57\u7530\u53bf ","2005"],["2010","\u82f1\u5c71\u53bf ","2005"],["2011","\u6d60\u6c34\u53bf ","2005"],["2012","\u8572\u6625\u53bf ","2005"],["2013","\u9ec4\u6885\u53bf ","2005"],["2014","\u9ebb\u57ce\u5e02 ","2005"],["2015","\u6b66\u7a74\u5e02 ","2005"],["2017","\u54b8\u5b81\u5e02 ","12"],["2018","\u54b8\u5b89\u533a ","2017"],["2019","\u5609\u9c7c\u53bf ","2017"],["2020","\u901a\u57ce\u53bf ","2017"],["2021","\u5d07\u9633\u53bf ","2017"],["2022","\u901a\u5c71\u53bf ","2017"],["2023","\u8d64\u58c1\u5e02 ","2017"],["2024","\u6e29\u6cc9\u57ce\u533a ","2017"],["2026","\u968f\u5dde\u5e02 ","12"],["2027","\u66fe\u90fd\u533a ","2026"],["2028","\u5e7f\u6c34\u5e02 ","2026"],["2030","\u6069\u65bd\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","12"],["2031","\u6069\u65bd\u5e02 ","2030"],["2032","\u5229\u5ddd\u5e02 ","2030"],["2033","\u5efa\u59cb\u53bf ","2030"],["2034","\u5df4\u4e1c\u53bf ","2030"],["2035","\u5ba3\u6069\u53bf ","2030"],["2036","\u54b8\u4e30\u53bf ","2030"],["2037","\u6765\u51e4\u53bf ","2030"],["2038","\u9e64\u5cf0\u53bf ","2030"],["2040"," \u4ed9\u6843\u5e02 ","12"],["2041","\u6f5c\u6c5f\u5e02 ","12"],["2042","\u5929\u95e8\u5e02 ","12"],["2043","\u795e\u519c\u67b6\u6797\u533a ","12"],["13","\u6e56\u5357\u7701 ","0"],["2045","\u957f\u6c99\u5e02 ","13"],["2046","\u8299\u84c9\u533a ","2045"],["2047","\u5929\u5fc3\u533a ","2045"],["2048","\u5cb3\u9e93\u533a ","2045"],["2049","\u5f00\u798f\u533a ","2045"],["2050","\u96e8\u82b1\u533a ","2045"],["2051","\u957f\u6c99\u53bf ","2045"],["2052","\u671b\u57ce\u53bf ","2045"],["2053","\u5b81\u4e61\u53bf ","2045"],["2782","\u4f1a\u7406\u53bf ","2777"],["2783","\u4f1a\u4e1c\u53bf ","2777"],["2784","\u5b81\u5357\u53bf ","2777"],["2785","\u666e\u683c\u53bf ","2777"],["2786","\u5e03\u62d6\u53bf ","2777"],["2787","\u91d1\u9633\u53bf ","2777"],["2788","\u662d\u89c9\u53bf ","2777"],["2789","\u559c\u5fb7\u53bf ","2777"],["2790","\u5195\u5b81\u53bf ","2777"],["2791","\u8d8a\u897f\u53bf ","2777"],["2792","\u7518\u6d1b\u53bf ","2777"],["2793","\u7f8e\u59d1\u53bf ","2777"],["2794","\u96f7\u6ce2\u53bf ","2777"],["17","\u8d35\u5dde\u7701 ","0"],["2797","\u8d35\u9633\u5e02 ","17"],["2798","\u5357\u660e\u533a ","2797"],["2799","\u4e91\u5ca9\u533a ","2797"],["2800","\u82b1\u6eaa\u533a ","2797"],["2801","\u4e4c\u5f53\u533a ","2797"],["2802","\u767d\u4e91\u533a ","2797"],["2803","\u5c0f\u6cb3\u533a ","2797"],["2804","\u5f00\u9633\u53bf ","2797"],["2805","\u606f\u70fd\u53bf ","2797"],["2806","\u4fee\u6587\u53bf ","2797"],["2807","\u91d1\u9633\u5f00\u53d1\u533a ","2797"],["2808","\u6e05\u9547\u5e02 ","2797"],["2810","\u516d\u76d8\u6c34\u5e02 ","17"],["2811","\u949f\u5c71\u533a ","2810"],["2812","\u516d\u679d\u7279\u533a ","2810"],["2813","\u6c34\u57ce\u53bf ","2810"],["2814","\u76d8\u53bf ","2810"],["2816","\u9075\u4e49\u5e02 ","17"],["2817","\u7ea2\u82b1\u5c97\u533a ","2816"],["2818","\u6c47\u5ddd\u533a ","2816"],["2819","\u9075\u4e49\u53bf ","2816"],["2820","\u6850\u6893\u53bf ","2816"],["2821","\u7ee5\u9633\u53bf ","2816"],["2822","\u6b63\u5b89\u53bf ","2816"],["2823","\u9053\u771f\u4ee1\u4f6c\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2816"],["2824","\u52a1\u5ddd\u4ee1\u4f6c\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2816"],["2825","\u51e4\u5188\u53bf ","2816"],["2826","\u6e44\u6f6d\u53bf ","2816"],["2827","\u4f59\u5e86\u53bf ","2816"],["2828","\u4e60\u6c34\u53bf ","2816"],["2829","\u8d64\u6c34\u5e02 ","2816"],["2830","\u4ec1\u6000\u5e02 ","2816"],["2832","\u5b89\u987a\u5e02 ","17"],["2833","\u897f\u79c0\u533a ","2832"],["2834","\u5e73\u575d\u53bf ","2832"],["2835","\u666e\u5b9a\u53bf ","2832"],["2836","\u9547\u5b81\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2832"],["2837","\u5173\u5cad\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2832"],["2838","\u7d2b\u4e91\u82d7\u65cf\u5e03\u4f9d\u65cf\u81ea\u6cbb\u53bf ","2832"],["2840","\u94dc\u4ec1\u5730\u533a ","17"],["2841","\u94dc\u4ec1\u5e02 ","2840"],["2842","\u6c5f\u53e3\u53bf ","2840"],["2843","\u7389\u5c4f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2840"],["2844","\u77f3\u9621\u53bf ","2840"],["2845","\u601d\u5357\u53bf ","2840"],["2846","\u5370\u6c5f\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2840"],["2847","\u5fb7\u6c5f\u53bf ","2840"],["2318","\u9f99\u5ddd\u53bf ","2315"],["2319","\u8fde\u5e73\u53bf ","2315"],["2320","\u548c\u5e73\u53bf ","2315"],["2321","\u4e1c\u6e90\u53bf ","2315"],["2323","\u9633\u6c5f\u5e02 ","14"],["2324","\u6c5f\u57ce\u533a ","2323"],["2325","\u9633\u897f\u53bf ","2323"],["2326","\u9633\u4e1c\u53bf ","2323"],["2327","\u9633\u6625\u5e02 ","2323"],["2329","\u6e05\u8fdc\u5e02 ","14"],["2330","\u6e05\u57ce\u533a ","2329"],["2331","\u4f5b\u5188\u53bf ","2329"],["2332","\u9633\u5c71\u53bf ","2329"],["2333","\u8fde\u5c71\u58ee\u65cf\u7476\u65cf\u81ea\u6cbb\u53bf ","2329"],["2334","\u8fde\u5357\u7476\u65cf\u81ea\u6cbb\u53bf ","2329"],["2335","\u6e05\u65b0\u53bf ","2329"],["2336","\u82f1\u5fb7\u5e02 ","2329"],["2337","\u8fde\u5dde\u5e02 ","2329"],["2339","\u4e1c\u839e\u5e02 ","14"],["2340","\u4e2d\u5c71\u5e02 ","14"],["2341","\u6f6e\u5dde\u5e02 ","14"],["2342","\u6e58\u6865\u533a ","2341"],["2343","\u6f6e\u5b89\u53bf ","2341"],["2344","\u9976\u5e73\u53bf ","2341"],["2345","\u67ab\u6eaa\u533a ","2341"],["2347","\u63ed\u9633\u5e02 ","14"],["2348","\u6995\u57ce\u533a ","2347"],["2349","\u63ed\u4e1c\u53bf ","2347"],["2350","\u63ed\u897f\u53bf ","2347"],["2351","\u60e0\u6765\u53bf ","2347"],["2352","\u666e\u5b81\u5e02 ","2347"],["2353","\u4e1c\u5c71\u533a ","2347"],["2355","\u4e91\u6d6e\u5e02 ","14"],["2356","\u4e91\u57ce\u533a ","2355"],["2357","\u65b0\u5174\u53bf ","2355"],["2358","\u90c1\u5357\u53bf ","2355"],["2359","\u4e91\u5b89\u53bf ","2355"],["2360","\u7f57\u5b9a\u5e02 ","2355"],["24","\u5e7f\u897f\u58ee\u65cf\u81ea\u6cbb\u533a ","0"],["2363"," \u5357\u5b81\u5e02 ","24"],["2364","\u5174\u5b81\u533a ","2363"],["2365","\u9752\u79c0\u533a ","2363"],["2366","\u6c5f\u5357\u533a ","2363"],["2367","\u897f\u4e61\u5858\u533a ","2363"],["2368","\u826f\u5e86\u533a ","2363"],["2369","\u9095\u5b81\u533a ","2363"],["2370","\u6b66\u9e23\u53bf ","2363"],["2371","\u9686\u5b89\u53bf ","2363"],["2372","\u9a6c\u5c71\u53bf ","2363"],["2373","\u4e0a\u6797\u53bf ","2363"],["2374","\u5bbe\u9633\u53bf ","2363"],["2375","\u6a2a\u53bf ","2363"],["2377","\u67f3\u5dde\u5e02 ","24"],["2378","\u57ce\u4e2d\u533a ","2377"],["2379","\u9c7c\u5cf0\u533a ","2377"],["2380","\u67f3\u5357\u533a ","2377"],["2381","\u67f3\u5317\u533a ","2377"],["2382","\u67f3\u6c5f\u53bf ","2377"],["2383","\u67f3\u57ce\u53bf ","2377"],["2384","\u9e7f\u5be8\u53bf ","2377"],["2385","\u878d\u5b89\u53bf ","2377"],["2386","\u878d\u6c34\u82d7\u65cf\u81ea\u6cbb\u53bf ","2377"],["2387","\u4e09\u6c5f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2377"],["2389","\u6842\u6797\u5e02 ","24"],["2390","\u79c0\u5cf0\u533a ","2389"],["2391","\u53e0\u5f69\u533a ","2389"],["2392","\u8c61\u5c71\u533a ","2389"],["2393","\u4e03\u661f\u533a ","2389"],["2394","\u96c1\u5c71\u533a ","2389"],["2395","\u9633\u6714\u53bf ","2389"],["2396","\u4e34\u6842\u53bf ","2389"],["2397","\u7075\u5ddd\u53bf ","2389"],["2398","\u5168\u5dde\u53bf ","2389"],["2399","\u5174\u5b89\u53bf ","2389"],["2400","\u6c38\u798f\u53bf ","2389"],["2401","\u704c\u9633\u53bf ","2389"],["2402","\u9f99\u80dc\u5404\u65cf\u81ea\u6cbb\u53bf ","2389"],["2403","\u8d44\u6e90\u53bf ","2389"],["2404","\u5e73\u4e50\u53bf ","2389"],["2405","\u8354\u6d66\u53bf ","2389"],["2406","\u606d\u57ce\u7476\u65cf\u81ea\u6cbb\u53bf ","2389"],["2408","\u68a7\u5dde\u5e02 ","24"],["2409","\u4e07\u79c0\u533a ","2408"],["2410","\u8776\u5c71\u533a ","2408"],["2411","\u957f\u6d32\u533a ","2408"],["2412","\u82cd\u68a7\u53bf ","2408"],["2413","\u85e4\u53bf ","2408"],["2414","\u8499\u5c71\u53bf ","2408"],["2415","\u5c91\u6eaa\u5e02 ","2408"],["2417","\u5317\u6d77\u5e02 ","24"],["2418","\u6d77\u57ce\u533a ","2417"],["2419","\u94f6\u6d77\u533a ","2417"],["2420","\u94c1\u5c71\u6e2f\u533a ","2417"],["2421","\u5408\u6d66\u53bf ","2417"],["2423","\u9632\u57ce\u6e2f\u5e02 ","24"],["2424","\u6e2f\u53e3\u533a ","2423"],["2425","\u9632\u57ce\u533a ","2423"],["2426","\u4e0a\u601d\u53bf ","2423"],["2427","\u4e1c\u5174\u5e02 ","2423"],["2429","\u94a6\u5dde\u5e02 ","24"],["2430","\u94a6\u5357\u533a ","2429"],["2431","\u94a6\u5317\u533a ","2429"],["2432","\u7075\u5c71\u53bf ","2429"],["2433","\u6d66\u5317\u53bf ","2429"],["2435","\u8d35\u6e2f\u5e02 ","24"],["2436","\u6e2f\u5317\u533a ","2435"],["2437","\u6e2f\u5357\u533a ","2435"],["2438","\u8983\u5858\u533a ","2435"],["2439","\u5e73\u5357\u53bf ","2435"],["2440","\u6842\u5e73\u5e02 ","2435"],["2442","\u7389\u6797\u5e02 ","24"],["2443","\u7389\u5dde\u533a ","2442"],["2444","\u5bb9\u53bf ","2442"],["2445","\u9646\u5ddd\u53bf ","2442"],["2446","\u535a\u767d\u53bf ","2442"],["2447","\u5174\u4e1a\u53bf ","2442"],["2448","\u5317\u6d41\u5e02 ","2442"],["2450","\u767e\u8272\u5e02 ","24"],["2451","\u53f3\u6c5f\u533a ","2450"],["2452","\u7530\u9633\u53bf ","2450"],["2453","\u7530\u4e1c\u53bf ","2450"],["2454","\u5e73\u679c\u53bf ","2450"],["2455","\u5fb7\u4fdd\u53bf ","2450"],["2456","\u9756\u897f\u53bf ","2450"],["2457","\u90a3\u5761\u53bf ","2450"],["2458","\u51cc\u4e91\u53bf ","2450"],["2459","\u4e50\u4e1a\u53bf ","2450"],["2460","\u7530\u6797\u53bf ","2450"],["2461","\u897f\u6797\u53bf ","2450"],["2462","\u9686\u6797\u5404\u65cf\u81ea\u6cbb\u53bf ","2450"],["2464","\u8d3a\u5dde\u5e02 ","24"],["2465","\u516b\u6b65\u533a ","2464"],["2466","\u662d\u5e73\u53bf ","2464"],["2467","\u949f\u5c71\u53bf ","2464"],["2468","\u5bcc\u5ddd\u7476\u65cf\u81ea\u6cbb\u53bf ","2464"],["2470","\u6cb3\u6c60\u5e02 ","24"],["2471","\u91d1\u57ce\u6c5f\u533a ","2470"],["2472","\u5357\u4e39\u53bf ","2470"],["2473","\u5929\u5ce8\u53bf ","2470"],["2474","\u51e4\u5c71\u53bf ","2470"],["2475","\u4e1c\u5170\u53bf ","2470"],["2476","\u7f57\u57ce\u4eeb\u4f6c\u65cf\u81ea\u6cbb\u53bf ","2470"],["2477","\u73af\u6c5f\u6bdb\u5357\u65cf\u81ea\u6cbb\u53bf ","2470"],["2478","\u5df4\u9a6c\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2479","\u90fd\u5b89\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2480","\u5927\u5316\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2481","\u5b9c\u5dde\u5e02 ","2470"],["2483","\u6765\u5bbe\u5e02 ","24"],["2484","\u5174\u5bbe\u533a ","2483"],["2485","\u5ffb\u57ce\u53bf ","2483"],["2486","\u8c61\u5dde\u53bf ","2483"],["2487","\u6b66\u5ba3\u53bf ","2483"],["2488","\u91d1\u79c0\u7476\u65cf\u81ea\u6cbb\u53bf ","2483"],["2489","\u5408\u5c71\u5e02 ","2483"],["2491","\u5d07\u5de6\u5e02 ","24"],["2492","\u6c5f\u5dde\u533a ","2491"],["2493","\u6276\u7ee5\u53bf ","2491"],["2494","\u5b81\u660e\u53bf ","2491"],["2495","\u9f99\u5dde\u53bf ","2491"],["2496","\u5927\u65b0\u53bf ","2491"],["2497","\u5929\u7b49\u53bf ","2491"],["2498","\u51ed\u7965\u5e02 ","2491"],["15","\u6d77\u5357\u7701 ","0"],["2501","\u6d77\u53e3\u5e02 ","15"],["2502","\u79c0\u82f1\u533a ","2501"],["2503","\u9f99\u534e\u533a ","2501"],["2504","\u743c\u5c71\u533a ","2501"],["2505","\u7f8e\u5170\u533a ","2501"],["2507","\u4e09\u4e9a\u5e02 ","15"],["2508","\u4e94\u6307\u5c71\u5e02 ","15"],["2509","\u743c\u6d77\u5e02 ","15"],["2510","\u510b\u5dde\u5e02 ","15"],["2511","\u6587\u660c\u5e02 ","15"],["2512","\u4e07\u5b81\u5e02 ","15"],["2513","\u4e1c\u65b9\u5e02 ","15"],["2514","\u5b9a\u5b89\u53bf ","15"],["2515","\u5c6f\u660c\u53bf ","15"],["2516","\u6f84\u8fc8\u53bf ","15"],["2517","\u4e34\u9ad8\u53bf ","15"],["2518","\u767d\u6c99\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2519","\u660c\u6c5f\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2520","\u4e50\u4e1c\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2521","\u9675\u6c34\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2522","\u4fdd\u4ead\u9ece\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","15"],["2523","\u743c\u4e2d\u9ece\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","15"],["2524","\u897f\u6c99\u7fa4\u5c9b ","15"],["2525","\u5357\u6c99\u7fa4\u5c9b ","15"],["2526","\u4e2d\u6c99\u7fa4\u5c9b\u7684\u5c9b\u7901\u53ca\u5176\u6d77\u57df ","15"],["31","\u91cd\u5e86 ","0"],["2529","\u4e07\u5dde\u533a ","31"],["2530"," \u6daa\u9675\u533a ","31"],["2531","\u6e1d\u4e2d\u533a ","31"],["2532","\u5927\u6e21\u53e3\u533a ","31"],["2533","\u6c5f\u5317\u533a ","31"],["2534","\u6c99\u576a\u575d\u533a ","31"],["2535","\u4e5d\u9f99\u5761\u533a ","31"],["2536","\u5357\u5cb8\u533a ","31"],["2537","\u5317\u789a\u533a ","31"],["2538","\u4e07\u76db\u533a ","31"],["2539","\u53cc\u6865\u533a ","31"],["2540","\u6e1d\u5317\u533a ","31"],["2541","\u5df4\u5357\u533a ","31"],["2542","\u9ed4\u6c5f\u533a ","31"],["2543","\u957f\u5bff\u533a ","31"],["2544","\u7da6\u6c5f\u53bf ","31"],["2545","\u6f7c\u5357\u53bf ","31"],["2546","\u94dc\u6881\u53bf ","31"],["2547","\u5927\u8db3\u53bf ","31"],["2548","\u8363\u660c\u53bf ","31"],["2549","\u74a7\u5c71\u53bf ","31"],["2550","\u6881\u5e73\u53bf ","31"],["2551","\u57ce\u53e3\u53bf ","31"],["2552","\u4e30\u90fd\u53bf ","31"],["2553","\u57ab\u6c5f\u53bf ","31"],["2554","\u6b66\u9686\u53bf ","31"],["2555","\u5fe0\u53bf ","31"],["2556","\u5f00\u53bf ","31"],["2557","\u4e91\u9633\u53bf ","31"],["2558","\u5949\u8282\u53bf ","31"],["2559","\u5deb\u5c71\u53bf ","31"],["2560","\u5deb\u6eaa\u53bf ","31"],["2561","\u77f3\u67f1\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","31"],["2562","\u79c0\u5c71\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","31"],["2563","\u9149\u9633\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","31"],["2564","\u5f6d\u6c34\u82d7\u65cf\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","31"],["2565","\u6c5f\u6d25\u533a ","31"],["2566","\u5408\u5ddd\u533a ","31"],["2567","\u6c38\u5ddd\u533a ","31"],["2568","\u5357\u5ddd\u533a ","31"],["16","\u56db\u5ddd\u7701 ","0"],["2571","\u6210\u90fd\u5e02 ","16"],["2572","\u9526\u6c5f\u533a ","2571"],["2573","\u9752\u7f8a\u533a ","2571"],["2574","\u91d1\u725b\u533a ","2571"],["2575","\u6b66\u4faf\u533a ","2571"],["2576","\u6210\u534e\u533a ","2571"],["2577","\u9f99\u6cc9\u9a7f\u533a ","2571"],["2578","\u9752\u767d\u6c5f\u533a ","2571"],["2579","\u65b0\u90fd\u533a ","2571"],["2580","\u6e29\u6c5f\u533a ","2571"],["2581","\u91d1\u5802\u53bf ","2571"],["2582","\u53cc\u6d41\u53bf ","2571"],["2583","\u90eb\u53bf ","2571"],["2584","\u5927\u9091\u53bf ","2571"],["2585","\u84b2\u6c5f\u53bf ","2571"],["2586","\u65b0\u6d25\u53bf ","2571"],["2587","\u90fd\u6c5f\u5830\u5e02 ","2571"],["2588","\u5f6d\u5dde\u5e02 ","2571"],["2589","\u909b\u5d03\u5e02 ","2571"],["2590","\u5d07\u5dde\u5e02 ","2571"],["2592","\u81ea\u8d21\u5e02 ","16"],["2593","\u81ea\u6d41\u4e95\u533a ","2592"],["2594","\u8d21\u4e95\u533a ","2592"],["2595","\u5927\u5b89\u533a ","2592"],["2596","\u6cbf\u6ee9\u533a ","2592"],["2597","\u8363\u53bf ","2592"],["2598"," \u5bcc\u987a\u53bf ","2592"],["2600","\u6500\u679d\u82b1\u5e02 ","16"],["2601","\u4e1c\u533a ","2600"],["2602","\u897f\u533a ","2600"],["2603","\u4ec1\u548c\u533a ","2600"],["2604","\u7c73\u6613\u53bf ","2600"],["2605","\u76d0\u8fb9\u53bf ","2600"],["2607","\u6cf8\u5dde\u5e02 ","16"],["2608","\u6c5f\u9633\u533a ","2607"],["2609","\u7eb3\u6eaa\u533a ","2607"],["2610","\u9f99\u9a6c\u6f6d\u533a ","2607"],["2611","\u6cf8\u53bf ","2607"],["2612","\u5408\u6c5f\u53bf ","2607"],["2613","\u53d9\u6c38\u53bf ","2607"],["2614","\u53e4\u853a\u53bf ","2607"],["2616","\u5fb7\u9633\u5e02 ","16"],["2617","\u65cc\u9633\u533a ","2616"],["2618","\u4e2d\u6c5f\u53bf ","2616"],["2619","\u7f57\u6c5f\u53bf ","2616"],["2620","\u5e7f\u6c49\u5e02 ","2616"],["2621","\u4ec0\u90a1\u5e02 ","2616"],["2622","\u7ef5\u7af9\u5e02 ","2616"],["2624","\u7ef5\u9633\u5e02 ","16"],["2625","\u6daa\u57ce\u533a ","2624"],["2626","\u6e38\u4ed9\u533a ","2624"],["2627","\u4e09\u53f0\u53bf ","2624"],["2628","\u76d0\u4ead\u53bf ","2624"],["2629","\u5b89\u53bf ","2624"],["2630"," \u6893\u6f7c\u53bf ","2624"],["2631","\u5317\u5ddd\u7f8c\u65cf\u81ea\u6cbb\u53bf ","2624"],["2632","\u5e73\u6b66\u53bf ","2624"],["2633","\u9ad8\u65b0\u533a ","2624"],["2634","\u6c5f\u6cb9\u5e02 ","2624"],["2636","\u5e7f\u5143\u5e02 ","16"],["2637","\u5229\u5dde\u533a ","2636"],["2638","\u5143\u575d\u533a ","2636"],["2639","\u671d\u5929\u533a ","2636"],["2640","\u65fa\u82cd\u53bf ","2636"],["2641","\u9752\u5ddd\u53bf ","2636"],["2642","\u5251\u9601\u53bf ","2636"],["2643","\u82cd\u6eaa\u53bf ","2636"],["2645","\u9042\u5b81\u5e02 ","16"],["2646","\u8239\u5c71\u533a ","2645"],["2647","\u5b89\u5c45\u533a ","2645"],["2648","\u84ec\u6eaa\u53bf ","2645"],["2649","\u5c04\u6d2a\u53bf ","2645"],["2650","\u5927\u82f1\u53bf ","2645"],["2652","\u5185\u6c5f\u5e02 ","16"],["2653","\u5e02\u4e2d\u533a ","2652"],["2654","\u4e1c\u5174\u533a ","2652"],["2655","\u5a01\u8fdc\u53bf ","2652"],["2656","\u8d44\u4e2d\u53bf ","2652"],["2657","\u9686\u660c\u53bf ","2652"],["2659","\u4e50\u5c71\u5e02 ","16"],["2660","\u5e02\u4e2d\u533a ","2659"],["2661","\u6c99\u6e7e\u533a ","2659"],["2662","\u4e94\u901a\u6865\u533a ","2659"],["2663","\u91d1\u53e3\u6cb3\u533a ","2659"],["2664","\u728d\u4e3a\u53bf ","2659"],["2665","\u4e95\u7814\u53bf ","2659"],["2666","\u5939\u6c5f\u53bf ","2659"],["2667","\u6c90\u5ddd\u53bf ","2659"],["2668","\u5ce8\u8fb9\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2659"],["2669","\u9a6c\u8fb9\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2659"],["2670","\u5ce8\u7709\u5c71\u5e02 ","2659"],["2672","\u5357\u5145\u5e02 ","16"],["2673","\u987a\u5e86\u533a ","2672"],["2674","\u9ad8\u576a\u533a ","2672"],["2675","\u5609\u9675\u533a ","2672"],["2676","\u5357\u90e8\u53bf ","2672"],["2677","\u8425\u5c71\u53bf ","2672"],["2678","\u84ec\u5b89\u53bf ","2672"],["2679","\u4eea\u9647\u53bf ","2672"],["2680","\u897f\u5145\u53bf ","2672"],["2681","\u9606\u4e2d\u5e02 ","2672"],["2683","\u7709\u5c71\u5e02 ","16"],["2684","\u4e1c\u5761\u533a ","2683"],["2685","\u4ec1\u5bff\u53bf ","2683"],["2686","\u5f6d\u5c71\u53bf ","2683"],["2687","\u6d2a\u96c5\u53bf ","2683"],["2688","\u4e39\u68f1\u53bf ","2683"],["2689","\u9752\u795e\u53bf ","2683"],["2691","\u5b9c\u5bbe\u5e02 ","16"],["2692","\u7fe0\u5c4f\u533a ","2691"],["2693","\u5b9c\u5bbe\u53bf ","2691"],["2694","\u5357\u6eaa\u53bf ","2691"],["2695","\u6c5f\u5b89\u53bf ","2691"],["2696","\u957f\u5b81\u53bf ","2691"],["2697","\u9ad8\u53bf ","2691"],["2698","\u73d9\u53bf ","2691"],["2699","\u7b60\u8fde\u53bf ","2691"],["2700","\u5174\u6587\u53bf ","2691"],["2701","\u5c4f\u5c71\u53bf ","2691"],["2703","\u5e7f\u5b89\u5e02 ","16"],["2704","\u5e7f\u5b89\u533a ","2703"],["2705","\u5cb3\u6c60\u53bf ","2703"],["2706","\u6b66\u80dc\u53bf ","2703"],["2707","\u90bb\u6c34\u53bf ","2703"],["2708","\u534e\u84e5\u5e02 ","2703"],["2709","\u5e02\u8f96\u533a ","2703"],["2711","\u8fbe\u5dde\u5e02 ","16"],["2712","\u901a\u5ddd\u533a ","2711"],["2713","\u8fbe\u53bf ","2711"],["2714","\u5ba3\u6c49\u53bf ","2711"],["2715","\u5f00\u6c5f\u53bf ","2711"],["2716","\u5927\u7af9\u53bf ","2711"],["2717","\u6e20\u53bf ","2711"],["2718"," \u4e07\u6e90\u5e02 ","2711"],["2720","\u96c5\u5b89\u5e02 ","16"],["2721","\u96e8\u57ce\u533a ","2720"],["2722","\u540d\u5c71\u53bf ","2720"],["2723","\u8365\u7ecf\u53bf ","2720"],["2724","\u6c49\u6e90\u53bf ","2720"],["2725","\u77f3\u68c9\u53bf ","2720"],["2726","\u5929\u5168\u53bf ","2720"],["2727","\u82a6\u5c71\u53bf ","2720"],["2728","\u5b9d\u5174\u53bf ","2720"],["2730","\u5df4\u4e2d\u5e02 ","16"],["2731","\u5df4\u5dde\u533a ","2730"],["2732","\u901a\u6c5f\u53bf ","2730"],["2733","\u5357\u6c5f\u53bf ","2730"],["2734","\u5e73\u660c\u53bf ","2730"],["2736","\u8d44\u9633\u5e02 ","16"],["2737","\u96c1\u6c5f\u533a ","2736"],["2738","\u5b89\u5cb3\u53bf ","2736"],["2739","\u4e50\u81f3\u53bf ","2736"],["2740","\u7b80\u9633\u5e02 ","2736"],["2742","\u963f\u575d\u85cf\u65cf\u7f8c\u65cf\u81ea\u6cbb\u5dde ","16"],["2743","\u6c76\u5ddd\u53bf ","2742"],["2744","\u7406\u53bf ","2742"],["2745","\u8302\u53bf ","2742"],["2746","\u677e\u6f58\u53bf ","2742"],["2747"," \u4e5d\u5be8\u6c9f\u53bf ","2742"],["2748","\u91d1\u5ddd\u53bf ","2742"],["2749","\u5c0f\u91d1\u53bf ","2742"],["2750","\u9ed1\u6c34\u53bf ","2742"],["2751","\u9a6c\u5c14\u5eb7\u53bf ","2742"],["2752","\u58e4\u5858\u53bf ","2742"],["2753","\u963f\u575d\u53bf ","2742"],["2754","\u82e5\u5c14\u76d6\u53bf ","2742"],["2755","\u7ea2\u539f\u53bf ","2742"],["2757","\u7518\u5b5c\u85cf\u65cf\u81ea\u6cbb\u5dde ","16"],["2758","\u5eb7\u5b9a\u53bf ","2757"],["2759","\u6cf8\u5b9a\u53bf ","2757"],["2760","\u4e39\u5df4\u53bf ","2757"],["2761","\u4e5d\u9f99\u53bf ","2757"],["2762","\u96c5\u6c5f\u53bf ","2757"],["2763","\u9053\u5b5a\u53bf ","2757"],["2764","\u7089\u970d\u53bf ","2757"],["2765","\u7518\u5b5c\u53bf ","2757"],["2766","\u65b0\u9f99\u53bf ","2757"],["2767","\u5fb7\u683c\u53bf ","2757"],["2768","\u767d\u7389\u53bf ","2757"],["2769","\u77f3\u6e20\u53bf ","2757"],["2770","\u8272\u8fbe\u53bf ","2757"],["2771","\u7406\u5858\u53bf ","2757"],["2772","\u5df4\u5858\u53bf ","2757"],["2773","\u4e61\u57ce\u53bf ","2757"],["2774","\u7a3b\u57ce\u53bf ","2757"],["2775","\u5f97\u8363\u53bf ","2757"],["2777","\u51c9\u5c71\u5f5d\u65cf\u81ea\u6cbb\u5dde ","16"],["2778","\u897f\u660c\u5e02 ","2777"],["2779","\u6728\u91cc\u85cf\u65cf\u81ea\u6cbb\u53bf ","2777"],["2780","\u76d0\u6e90\u53bf ","2777"],["2781","\u5fb7\u660c\u53bf ","2777"],["3046","\u9e64\u5e86\u53bf ","3034"],["3048","\u5fb7\u5b8f\u50a3\u65cf\u666f\u9887\u65cf\u81ea\u6cbb\u5dde ","18"],["3049","\u745e\u4e3d\u5e02 ","3048"],["3050","\u6f5e\u897f\u5e02 ","3048"],["3051","\u6881\u6cb3\u53bf ","3048"],["3052","\u76c8\u6c5f\u53bf ","3048"],["3053","\u9647\u5ddd\u53bf ","3048"],["3055","\u6012\u6c5f\u5088\u50f3\u65cf\u81ea\u6cbb\u5dde ","18"],["3056","\u6cf8\u6c34\u53bf ","3055"],["3057","\u798f\u8d21\u53bf ","3055"],["3058","\u8d21\u5c71\u72ec\u9f99\u65cf\u6012\u65cf\u81ea\u6cbb\u53bf ","3055"],["3059","\u5170\u576a\u767d\u65cf\u666e\u7c73\u65cf\u81ea\u6cbb\u53bf ","3055"],["3061","\u8fea\u5e86\u85cf\u65cf\u81ea\u6cbb\u5dde ","18"],["3062","\u9999\u683c\u91cc\u62c9\u53bf ","3061"],["3063","\u5fb7\u94a6\u53bf ","3061"],["3064","\u7ef4\u897f\u5088\u50f3\u65cf\u81ea\u6cbb\u53bf ","3061"],["25","\u897f\u85cf\u81ea\u6cbb\u533a ","0"],["3067","\u62c9\u8428\u5e02 ","25"],["3068","\u57ce\u5173\u533a ","3067"],["3069","\u6797\u5468\u53bf ","3067"],["3070","\u5f53\u96c4\u53bf ","3067"],["3071","\u5c3c\u6728\u53bf ","3067"],["3072","\u66f2\u6c34\u53bf ","3067"],["3073","\u5806\u9f99\u5fb7\u5e86\u53bf ","3067"],["3074","\u8fbe\u5b5c\u53bf ","3067"],["3075","\u58a8\u7af9\u5de5\u5361\u53bf ","3067"],["3077","\u660c\u90fd\u5730\u533a ","25"],["3078","\u660c\u90fd\u53bf ","3077"],["3079","\u6c5f\u8fbe\u53bf ","3077"],["3080","\u8d21\u89c9\u53bf ","3077"],["3081","\u7c7b\u4e4c\u9f50\u53bf ","3077"],["3082","\u4e01\u9752\u53bf ","3077"],["3083","\u5bdf\u96c5\u53bf ","3077"],["3084","\u516b\u5bbf\u53bf ","3077"],["3085","\u5de6\u8d21\u53bf ","3077"],["3086","\u8292\u5eb7\u53bf ","3077"],["3087","\u6d1b\u9686\u53bf ","3077"],["3088","\u8fb9\u575d\u53bf ","3077"],["3090","\u5c71\u5357\u5730\u533a ","25"],["3091","\u4e43\u4e1c\u53bf ","3090"],["3092","\u624e\u56ca\u53bf ","3090"],["3093","\u8d21\u560e\u53bf ","3090"],["3094","\u6851\u65e5\u53bf ","3090"],["3095","\u743c\u7ed3\u53bf ","3090"],["3096","\u66f2\u677e\u53bf ","3090"],["3097","\u63aa\u7f8e\u53bf ","3090"],["3098","\u6d1b\u624e\u53bf ","3090"],["3099","\u52a0\u67e5\u53bf ","3090"],["3100","\u9686\u5b50\u53bf ","3090"],["3101","\u9519\u90a3\u53bf ","3090"],["3102","\u6d6a\u5361\u5b50\u53bf ","3090"],["3104","\u65e5\u5580\u5219\u5730\u533a ","25"],["3105","\u65e5\u5580\u5219\u5e02 ","3104"],["3106","\u5357\u6728\u6797\u53bf ","3104"],["3107","\u6c5f\u5b5c\u53bf ","3104"],["3108","\u5b9a\u65e5\u53bf ","3104"],["3109","\u8428\u8fe6\u53bf ","3104"],["3110","\u62c9\u5b5c\u53bf ","3104"],["3111","\u6602\u4ec1\u53bf ","3104"],["3112","\u8c22\u901a\u95e8\u53bf ","3104"],["3247","\u6986\u6797\u5e02 ","19"],["3248","\u6986\u9633\u533a ","3247"],["3249","\u795e\u6728\u53bf ","3247"],["3250","\u5e9c\u8c37\u53bf ","3247"],["3251","\u6a2a\u5c71\u53bf ","3247"],["3252","\u9756\u8fb9\u53bf ","3247"],["3253","\u5b9a\u8fb9\u53bf ","3247"],["3254","\u7ee5\u5fb7\u53bf ","3247"],["3255","\u7c73\u8102\u53bf ","3247"],["3256","\u4f73\u53bf ","3247"],["3257","\u5434\u5821\u53bf ","3247"],["3258","\u6e05\u6da7\u53bf ","3247"],["3259","\u5b50\u6d32\u53bf ","3247"],["3261","\u5b89\u5eb7\u5e02 ","19"],["3262","\u6c49\u6ee8\u533a ","3261"],["3263","\u6c49\u9634\u53bf ","3261"],["3264","\u77f3\u6cc9\u53bf ","3261"],["3265","\u5b81\u9655\u53bf ","3261"],["3266","\u7d2b\u9633\u53bf ","3261"],["3267","\u5c9a\u768b\u53bf ","3261"],["3268","\u5e73\u5229\u53bf ","3261"],["3269","\u9547\u576a\u53bf ","3261"],["3270","\u65ec\u9633\u53bf ","3261"],["3271","\u767d\u6cb3\u53bf ","3261"],["3273","\u5546\u6d1b\u5e02 ","19"],["3274","\u5546\u5dde\u533a ","3273"],["3275","\u6d1b\u5357\u53bf ","3273"],["3276","\u4e39\u51e4\u53bf ","3273"],["3277","\u5546\u5357\u53bf ","3273"],["3278","\u5c71\u9633\u53bf ","3273"],["3279","\u9547\u5b89\u53bf ","3273"],["3280","\u67de\u6c34\u53bf ","3273"],["20","\u7518\u8083\u7701 ","0"],["3283","\u5170\u5dde\u5e02 ","20"],["3284","\u57ce\u5173\u533a ","3283"],["3285","\u4e03\u91cc\u6cb3\u533a ","3283"],["3286","\u897f\u56fa\u533a ","3283"],["3287","\u5b89\u5b81\u533a ","3283"],["3288","\u7ea2\u53e4\u533a ","3283"],["3289","\u6c38\u767b\u53bf ","3283"],["3290","\u768b\u5170\u53bf ","3283"],["3291","\u6986\u4e2d\u53bf ","3283"],["3293","\u5609\u5cea\u5173\u5e02 ","20"],["3294","\u91d1\u660c\u5e02 ","20"],["3295","\u91d1\u5ddd\u533a ","3294"],["3296","\u6c38\u660c\u53bf ","3294"],["3298","\u767d\u94f6\u5e02 ","20"],["3299","\u767d\u94f6\u533a ","3298"],["3300","\u5e73\u5ddd\u533a ","3298"],["3301","\u9756\u8fdc\u53bf ","3298"],["3302","\u4f1a\u5b81\u53bf ","3298"],["3303","\u666f\u6cf0\u53bf ","3298"],["3305","\u5929\u6c34\u5e02 ","20"],["3306","\u79e6\u5dde\u533a ","3305"],["3307","\u9ea6\u79ef\u533a ","3305"],["3308","\u6e05\u6c34\u53bf ","3305"],["3309","\u79e6\u5b89\u53bf ","3305"],["3310","\u7518\u8c37\u53bf ","3305"],["3113","\u767d\u6717\u53bf ","3104"],["3114","\u4ec1\u5e03\u53bf ","3104"],["3115","\u5eb7\u9a6c\u53bf ","3104"],["3116","\u5b9a\u7ed3\u53bf ","3104"],["3117","\u4ef2\u5df4\u53bf ","3104"],["3118","\u4e9a\u4e1c\u53bf ","3104"],["3119","\u5409\u9686\u53bf ","3104"],["3120","\u8042\u62c9\u6728\u53bf ","3104"],["3121","\u8428\u560e\u53bf ","3104"],["3122","\u5c97\u5df4\u53bf ","3104"],["3124","\u90a3\u66f2\u5730\u533a ","25"],["3125","\u90a3\u66f2\u53bf ","3124"],["3126","\u5609\u9ece\u53bf ","3124"],["3127","\u6bd4\u5982\u53bf ","3124"],["3128","\u8042\u8363\u53bf ","3124"],["3129","\u5b89\u591a\u53bf ","3124"],["3130","\u7533\u624e\u53bf ","3124"],["3131","\u7d22\u53bf ","3124"],["3132","\u73ed\u6208\u53bf ","3124"],["3133","\u5df4\u9752\u53bf ","3124"],["3134","\u5c3c\u739b\u53bf ","3124"],["3136","\u963f\u91cc\u5730\u533a ","25"],["3137","\u666e\u5170\u53bf ","3136"],["3138","\u672d\u8fbe\u53bf ","3136"],["3139","\u5676\u5c14\u53bf ","3136"],["3140","\u65e5\u571f\u53bf ","3136"],["3141","\u9769\u5409\u53bf ","3136"],["3142","\u6539\u5219\u53bf ","3136"],["3143","\u63aa\u52e4\u53bf ","3136"],["3145","\u6797\u829d\u5730\u533a ","25"],["3146","\u6797\u829d\u53bf ","3145"],["3147","\u5de5\u5e03\u6c5f\u8fbe\u53bf ","3145"],["3148","\u7c73\u6797\u53bf ","3145"],["3149","\u58a8\u8131\u53bf ","3145"],["3150","\u6ce2\u5bc6\u53bf ","3145"],["3151","\u5bdf\u9685\u53bf ","3145"],["3152","\u6717\u53bf ","3145"],["19","\u9655\u897f\u7701 ","0"],["3155","\u897f\u5b89\u5e02 ","19"],["3156","\u65b0\u57ce\u533a ","3155"],["3157","\u7891\u6797\u533a ","3155"],["3158","\u83b2\u6e56\u533a ","3155"],["3159","\u705e\u6865\u533a ","3155"],["3160","\u672a\u592e\u533a ","3155"],["3161","\u96c1\u5854\u533a ","3155"],["3162","\u960e\u826f\u533a ","3155"],["3163","\u4e34\u6f7c\u533a ","3155"],["3164","\u957f\u5b89\u533a ","3155"],["3165","\u84dd\u7530\u53bf ","3155"],["3166","\u5468\u81f3\u53bf ","3155"],["3167","\u6237\u53bf ","3155"],["3168","\u9ad8\u9675\u53bf ","3155"],["3170","\u94dc\u5ddd\u5e02 ","19"],["3171","\u738b\u76ca\u533a ","3170"],["3172","\u5370\u53f0\u533a ","3170"],["3173","\u8000\u5dde\u533a ","3170"],["3174","\u5b9c\u541b\u53bf ","3170"],["3176","\u5b9d\u9e21\u5e02 ","19"],["3177","\u6e2d\u6ee8\u533a ","3176"],["3178","\u91d1\u53f0\u533a ","3176"],["3179","\u9648\u4ed3\u533a ","3176"],["3180","\u51e4\u7fd4\u53bf ","3176"],["3181","\u5c90\u5c71\u53bf ","3176"],["3182","\u6276\u98ce\u53bf ","3176"],["3183","\u7709\u53bf ","3176"],["3184","\u9647\u53bf ","3176"],["3185","\u5343\u9633\u53bf ","3176"],["3186","\u9e9f\u6e38\u53bf ","3176"],["3187","\u51e4\u53bf ","3176"],["3188","\u592a\u767d\u53bf ","3176"],["3190","\u54b8\u9633\u5e02 ","19"],["3191","\u79e6\u90fd\u533a ","3190"],["3192","\u6768\u51cc\u533a ","3190"],["3193","\u6e2d\u57ce\u533a ","3190"],["3194","\u4e09\u539f\u53bf ","3190"],["3195","\u6cfe\u9633\u53bf ","3190"],["3196","\u4e7e\u53bf ","3190"],["3197","\u793c\u6cc9\u53bf ","3190"],["3198","\u6c38\u5bff\u53bf ","3190"],["3199","\u5f6c\u53bf ","3190"],["3200","\u957f\u6b66\u53bf ","3190"],["3201","\u65ec\u9091\u53bf ","3190"],["3202","\u6df3\u5316\u53bf ","3190"],["3203","\u6b66\u529f\u53bf ","3190"],["3204","\u5174\u5e73\u5e02 ","3190"],["3206","\u6e2d\u5357\u5e02 ","19"],["3207","\u4e34\u6e2d\u533a ","3206"],["3208","\u534e\u53bf ","3206"],["3209","\u6f7c\u5173\u53bf ","3206"],["3210","\u5927\u8354\u53bf ","3206"],["3211","\u5408\u9633\u53bf ","3206"],["3212","\u6f84\u57ce\u53bf ","3206"],["3213","\u84b2\u57ce\u53bf ","3206"],["3214","\u767d\u6c34\u53bf ","3206"],["3215","\u5bcc\u5e73\u53bf ","3206"],["3216","\u97e9\u57ce\u5e02 ","3206"],["3217","\u534e\u9634\u5e02 ","3206"],["3219","\u5ef6\u5b89\u5e02 ","19"],["3220","\u5b9d\u5854\u533a ","3219"],["3221","\u5ef6\u957f\u53bf ","3219"],["3222","\u5ef6\u5ddd\u53bf ","3219"],["3223","\u5b50\u957f\u53bf ","3219"],["3224","\u5b89\u585e\u53bf ","3219"],["3225","\u5fd7\u4e39\u53bf ","3219"],["3226","\u5434\u8d77\u53bf ","3219"],["3227","\u7518\u6cc9\u53bf ","3219"],["3228","\u5bcc\u53bf ","3219"],["3229","\u6d1b\u5ddd\u53bf ","3219"],["3230","\u5b9c\u5ddd\u53bf ","3219"],["3231","\u9ec4\u9f99\u53bf ","3219"],["3232","\u9ec4\u9675\u53bf ","3219"],["3234","\u6c49\u4e2d\u5e02 ","19"],["3235","\u6c49\u53f0\u533a ","3234"],["3237","\u57ce\u56fa\u53bf ","3234"],["3238","\u6d0b\u53bf ","3234"],["3239"," \u897f\u4e61\u53bf ","3234"],["3240","\u52c9\u53bf ","3234"],["3241","\u5b81\u5f3a\u53bf ","3234"],["3242","\u7565\u9633\u53bf ","3234"],["3243","\u9547\u5df4\u53bf ","3234"],["3244","\u7559\u575d\u53bf ","3234"],["3245","\u4f5b\u576a\u53bf ","3234"],["2848","\u6cbf\u6cb3\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","2840"],["2849","\u677e\u6843\u82d7\u65cf\u81ea\u6cbb\u53bf ","2840"],["2850","\u4e07\u5c71\u7279\u533a ","2840"],["2852","\u9ed4\u897f\u5357\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","17"],["2853","\u5174\u4e49\u5e02 ","2852"],["2854","\u5174\u4ec1\u53bf ","2852"],["2855","\u666e\u5b89\u53bf ","2852"],["2856","\u6674\u9686\u53bf ","2852"],["2857","\u8d1e\u4e30\u53bf ","2852"],["2858","\u671b\u8c1f\u53bf ","2852"],["2859","\u518c\u4ea8\u53bf ","2852"],["2860","\u5b89\u9f99\u53bf ","2852"],["2862","\u6bd5\u8282\u5730\u533a ","17"],["2863","\u6bd5\u8282\u5e02 ","2862"],["2864","\u5927\u65b9\u53bf ","2862"],["2865","\u9ed4\u897f\u53bf ","2862"],["2866","\u91d1\u6c99\u53bf ","2862"],["2867","\u7ec7\u91d1\u53bf ","2862"],["2868","\u7eb3\u96cd\u53bf ","2862"],["2869","\u5a01\u5b81\u5f5d\u65cf\u56de\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2862"],["2870","\u8d6b\u7ae0\u53bf ","2862"],["2872","\u9ed4\u4e1c\u5357\u82d7\u65cf\u4f97\u65cf\u81ea\u6cbb\u5dde ","17"],["2873","\u51ef\u91cc\u5e02 ","2872"],["2874","\u9ec4\u5e73\u53bf ","2872"],["2875","\u65bd\u79c9\u53bf ","2872"],["2876","\u4e09\u7a57\u53bf ","2872"],["2877","\u9547\u8fdc\u53bf ","2872"],["2878","\u5c91\u5de9\u53bf ","2872"],["2879","\u5929\u67f1\u53bf ","2872"],["2880","\u9526\u5c4f\u53bf ","2872"],["2881","\u5251\u6cb3\u53bf ","2872"],["2882","\u53f0\u6c5f\u53bf ","2872"],["2883","\u9ece\u5e73\u53bf ","2872"],["2884","\u6995\u6c5f\u53bf ","2872"],["2885","\u4ece\u6c5f\u53bf ","2872"],["2886","\u96f7\u5c71\u53bf ","2872"],["2887","\u9ebb\u6c5f\u53bf ","2872"],["2888","\u4e39\u5be8\u53bf ","2872"],["2890","\u9ed4\u5357\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","17"],["2891","\u90fd\u5300\u5e02 ","2890"],["2892","\u798f\u6cc9\u5e02 ","2890"],["2893","\u8354\u6ce2\u53bf ","2890"],["2894","\u8d35\u5b9a\u53bf ","2890"],["2895","\u74ee\u5b89\u53bf ","2890"],["2896","\u72ec\u5c71\u53bf ","2890"],["2897","\u5e73\u5858\u53bf ","2890"],["2898","\u7f57\u7538\u53bf ","2890"],["2899","\u957f\u987a\u53bf ","2890"],["2900","\u9f99\u91cc\u53bf ","2890"],["2901","\u60e0\u6c34\u53bf ","2890"],["2902","\u4e09\u90fd\u6c34\u65cf\u81ea\u6cbb\u53bf ","2890"],["18","\u4e91\u5357\u7701 ","0"],["2905","\u6606\u660e\u5e02 ","18"],["2906","\u4e94\u534e\u533a ","2905"],["2907","\u76d8\u9f99\u533a ","2905"],["2908","\u5b98\u6e21\u533a ","2905"],["2909","\u897f\u5c71\u533a ","2905"],["2910","\u4e1c\u5ddd\u533a ","2905"],["2911","\u5448\u8d21\u53bf ","2905"],["2912","\u664b\u5b81\u53bf ","2905"],["2913","\u5bcc\u6c11\u53bf ","2905"],["2914","\u5b9c\u826f\u53bf ","2905"],["2915","\u77f3\u6797\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2905"],["2916","\u5d69\u660e\u53bf ","2905"],["2917","\u7984\u529d\u5f5d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2905"],["2918","\u5bfb\u7538\u56de\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2905"],["2919","\u5b89\u5b81\u5e02 ","2905"],["2921","\u66f2\u9756\u5e02 ","18"],["2922","\u9e92\u9e9f\u533a ","2921"],["2923","\u9a6c\u9f99\u53bf ","2921"],["2924","\u9646\u826f\u53bf ","2921"],["2925","\u5e08\u5b97\u53bf ","2921"],["2926","\u7f57\u5e73\u53bf ","2921"],["2927","\u5bcc\u6e90\u53bf ","2921"],["2928","\u4f1a\u6cfd\u53bf ","2921"],["2929","\u6cbe\u76ca\u53bf ","2921"],["2930","\u5ba3\u5a01\u5e02 ","2921"],["2932","\u7389\u6eaa\u5e02 ","18"],["2933","\u7ea2\u5854\u533a ","2932"],["2934","\u6c5f\u5ddd\u53bf ","2932"],["2935","\u6f84\u6c5f\u53bf ","2932"],["2936","\u901a\u6d77\u53bf ","2932"],["2937","\u534e\u5b81\u53bf ","2932"],["2938","\u6613\u95e8\u53bf ","2932"],["2939","\u5ce8\u5c71\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2932"],["2940","\u65b0\u5e73\u5f5d\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2932"],["2941","\u5143\u6c5f\u54c8\u5c3c\u65cf\u5f5d\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2932"],["2943","\u4fdd\u5c71\u5e02 ","18"],["2944","\u9686\u9633\u533a ","2943"],["2945","\u65bd\u7538\u53bf ","2943"],["2946","\u817e\u51b2\u53bf ","2943"],["2947","\u9f99\u9675\u53bf ","2943"],["2948","\u660c\u5b81\u53bf ","2943"],["2950","\u662d\u901a\u5e02 ","18"],["2951","\u662d\u9633\u533a ","2950"],["2952","\u9c81\u7538\u53bf ","2950"],["2953","\u5de7\u5bb6\u53bf ","2950"],["2954","\u76d0\u6d25\u53bf ","2950"],["2955","\u5927\u5173\u53bf ","2950"],["2956","\u6c38\u5584\u53bf ","2950"],["2957","\u7ee5\u6c5f\u53bf ","2950"],["2958","\u9547\u96c4\u53bf ","2950"],["2959","\u5f5d\u826f\u53bf ","2950"],["2960","\u5a01\u4fe1\u53bf ","2950"],["2961","\u6c34\u5bcc\u53bf ","2950"],["2963","\u4e3d\u6c5f\u5e02 ","18"],["2964","\u53e4\u57ce\u533a ","2963"],["2965","\u7389\u9f99\u7eb3\u897f\u65cf\u81ea\u6cbb\u53bf ","2963"],["2966","\u6c38\u80dc\u53bf ","2963"],["2967","\u534e\u576a\u53bf ","2963"],["2968","\u5b81\u8497\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2963"],["2970","\u666e\u6d31\u5e02 ","18"],["2971","\u601d\u8305\u533a ","2970"],["2972","\u5b81\u6d31\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2973","\u58a8\u6c5f\u54c8\u5c3c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2974","\u666f\u4e1c\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2975","\u666f\u8c37\u50a3\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2976","\u9547\u6c85\u5f5d\u65cf\u54c8\u5c3c\u65cf\u62c9\u795c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2977","\u6c5f\u57ce\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2978","\u5b5f\u8fde\u50a3\u65cf\u62c9\u795c\u65cf\u4f64\u65cf\u81ea\u6cbb\u53bf ","2970"],["2979","\u6f9c\u6ca7\u62c9\u795c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2980","\u897f\u76df\u4f64\u65cf\u81ea\u6cbb\u53bf ","2970"],["2982","\u4e34\u6ca7\u5e02 ","18"],["2983","\u4e34\u7fd4\u533a ","2982"],["2984","\u51e4\u5e86\u53bf ","2982"],["2985","\u4e91\u53bf ","2982"],["2986"," \u6c38\u5fb7\u53bf ","2982"],["2987","\u9547\u5eb7\u53bf ","2982"],["2988","\u53cc\u6c5f\u62c9\u795c\u65cf\u4f64\u65cf\u5e03\u6717\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2982"],["2989","\u803f\u9a6c\u50a3\u65cf\u4f64\u65cf\u81ea\u6cbb\u53bf ","2982"],["2990","\u6ca7\u6e90\u4f64\u65cf\u81ea\u6cbb\u53bf ","2982"],["2992","\u695a\u96c4\u5f5d\u65cf\u81ea\u6cbb\u5dde ","18"],["2993","\u695a\u96c4\u5e02 ","2992"],["2994","\u53cc\u67cf\u53bf ","2992"],["2995","\u725f\u5b9a\u53bf ","2992"],["2996","\u5357\u534e\u53bf ","2992"],["2997","\u59da\u5b89\u53bf ","2992"],["2998","\u5927\u59da\u53bf ","2992"],["2999","\u6c38\u4ec1\u53bf ","2992"],["3000","\u5143\u8c0b\u53bf ","2992"],["3001","\u6b66\u5b9a\u53bf ","2992"],["3002","\u7984\u4e30\u53bf ","2992"],["3004","\u7ea2\u6cb3\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u5dde ","18"],["3005","\u4e2a\u65e7\u5e02 ","3004"],["3006","\u5f00\u8fdc\u5e02 ","3004"],["3007","\u8499\u81ea\u53bf ","3004"],["3008","\u5c4f\u8fb9\u82d7\u65cf\u81ea\u6cbb\u53bf ","3004"],["3009","\u5efa\u6c34\u53bf ","3004"],["3010","\u77f3\u5c4f\u53bf ","3004"],["3011","\u5f25\u52d2\u53bf ","3004"],["3012","\u6cf8\u897f\u53bf ","3004"],["3013","\u5143\u9633\u53bf ","3004"],["3014","\u7ea2\u6cb3\u53bf ","3004"],["3015","\u91d1\u5e73\u82d7\u65cf\u7476\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","3004"],["3016","\u7eff\u6625\u53bf ","3004"],["3017","\u6cb3\u53e3\u7476\u65cf\u81ea\u6cbb\u53bf ","3004"],["3019","\u6587\u5c71\u58ee\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","18"],["3020","\u6587\u5c71\u53bf ","3019"],["3021","\u781a\u5c71\u53bf ","3019"],["3022","\u897f\u7574\u53bf ","3019"],["3023","\u9ebb\u6817\u5761\u53bf ","3019"],["3024","\u9a6c\u5173\u53bf ","3019"],["3025","\u4e18\u5317\u53bf ","3019"],["3026","\u5e7f\u5357\u53bf ","3019"],["3027","\u5bcc\u5b81\u53bf ","3019"],["3029","\u897f\u53cc\u7248\u7eb3\u50a3\u65cf\u81ea\u6cbb\u5dde ","18"],["3030","\u666f\u6d2a\u5e02 ","3029"],["3031","\u52d0\u6d77\u53bf ","3029"],["3032","\u52d0\u814a\u53bf ","3029"],["3034","\u5927\u7406\u767d\u65cf\u81ea\u6cbb\u5dde ","18"],["3035","\u5927\u7406\u5e02 ","3034"],["3036","\u6f3e\u6fde\u5f5d\u65cf\u81ea\u6cbb\u53bf ","3034"],["3037","\u7965\u4e91\u53bf ","3034"],["3038","\u5bbe\u5ddd\u53bf ","3034"],["3039","\u5f25\u6e21\u53bf ","3034"],["3040","\u5357\u6da7\u5f5d\u65cf\u81ea\u6cbb\u53bf ","3034"],["3041","\u5dcd\u5c71\u5f5d\u65cf\u56de\u65cf\u81ea\u6cbb\u53bf ","3034"],["3042","\u6c38\u5e73\u53bf ","3034"],["3043","\u4e91\u9f99\u53bf ","3034"],["3044","\u6d31\u6e90\u53bf ","3034"],["3045","\u5251\u5ddd\u53bf ","3034"],["3311","\u6b66\u5c71\u53bf ","3305"],["3312","\u5f20\u5bb6\u5ddd\u56de\u65cf\u81ea\u6cbb\u53bf ","3305"],["3314","\u6b66\u5a01\u5e02 ","20"],["3315","\u51c9\u5dde\u533a ","3314"],["3316","\u6c11\u52e4\u53bf ","3314"],["3317","\u53e4\u6d6a\u53bf ","3314"],["3318","\u5929\u795d\u85cf\u65cf\u81ea\u6cbb\u53bf ","3314"],["3320","\u5f20\u6396\u5e02 ","20"],["3321","\u7518\u5dde\u533a ","3320"],["3322","\u8083\u5357\u88d5\u56fa\u65cf\u81ea\u6cbb\u53bf ","3320"],["3323","\u6c11\u4e50\u53bf ","3320"],["3324","\u4e34\u6cfd\u53bf ","3320"],["3325","\u9ad8\u53f0\u53bf ","3320"],["3326","\u5c71\u4e39\u53bf ","3320"],["3328","\u5e73\u51c9\u5e02 ","20"],["3329","\u5d06\u5cd2\u533a ","3328"],["3330","\u6cfe\u5ddd\u53bf ","3328"],["3331","\u7075\u53f0\u53bf ","3328"],["3332","\u5d07\u4fe1\u53bf ","3328"],["3333","\u534e\u4ead\u53bf ","3328"],["3334","\u5e84\u6d6a\u53bf ","3328"],["3335","\u9759\u5b81\u53bf ","3328"],["3337","\u9152\u6cc9\u5e02 ","20"],["3338","\u8083\u5dde\u533a ","3337"],["3339","\u91d1\u5854\u53bf ","3337"],["3340","\u5b89\u897f\u53bf ","3337"],["3341","\u8083\u5317\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","3337"],["3342","\u963f\u514b\u585e\u54c8\u8428\u514b\u65cf\u81ea\u6cbb\u53bf ","3337"],["3343","\u7389\u95e8\u5e02 ","3337"],["3344","\u6566\u714c\u5e02 ","3337"],["3346","\u5e86\u9633\u5e02 ","20"],["3347","\u897f\u5cf0\u533a ","3346"],["3348","\u5e86\u57ce\u53bf ","3346"],["3349","\u73af\u53bf ","3346"],["3350","\u534e\u6c60\u53bf ","3346"],["3351","\u5408\u6c34\u53bf ","3346"],["3352","\u6b63\u5b81\u53bf ","3346"],["3353","\u5b81\u53bf ","3346"],["3354","\u9547\u539f\u53bf ","3346"],["3356","\u5b9a\u897f\u5e02 ","20"],["3357","\u5b89\u5b9a\u533a ","3356"],["3358","\u901a\u6e2d\u53bf ","3356"],["3359","\u9647\u897f\u53bf ","3356"],["3360","\u6e2d\u6e90\u53bf ","3356"],["3361","\u4e34\u6d2e\u53bf ","3356"],["3362","\u6f33\u53bf ","3356"],["3363","\u5cb7\u53bf ","3356"],["3365","\u9647\u5357\u5e02 ","20"],["3366","\u6b66\u90fd\u533a ","3365"],["3367","\u6210\u53bf ","3365"],["3368"," \u6587\u53bf ","3365"],["3369","\u5b95\u660c\u53bf ","3365"],["3370","\u5eb7\u53bf ","3365"],["3371","\u897f\u548c\u53bf ","3365"],["3372","\u793c\u53bf ","3365"],["3373","\u5fbd\u53bf ","3365"],["3374","\u4e24\u5f53\u53bf ","3365"],["3376","\u4e34\u590f\u56de\u65cf\u81ea\u6cbb\u5dde ","20"],["3377","\u4e34\u590f\u5e02 ","3376"],["3378","\u4e34\u590f\u53bf ","3376"],["3379","\u5eb7\u4e50\u53bf ","3376"],["3380","\u6c38\u9756\u53bf ","3376"],["3381","\u5e7f\u6cb3\u53bf ","3376"],["3382","\u548c\u653f\u53bf ","3376"],["3383","\u4e1c\u4e61\u65cf\u81ea\u6cbb\u53bf ","3376"],["3384","\u79ef\u77f3\u5c71\u4fdd\u5b89\u65cf\u4e1c\u4e61\u65cf\u6492\u62c9\u65cf\u81ea\u6cbb\u53bf ","3376"],["3386","\u7518\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","20"],["3387","\u5408\u4f5c\u5e02 ","3386"],["3388","\u4e34\u6f6d\u53bf ","3386"],["3389","\u5353\u5c3c\u53bf ","3386"],["3390","\u821f\u66f2\u53bf ","3386"],["3391","\u8fed\u90e8\u53bf ","3386"],["3392","\u739b\u66f2\u53bf ","3386"],["3393","\u788c\u66f2\u53bf ","3386"],["3394","\u590f\u6cb3\u53bf ","3386"],["21","\u9752\u6d77\u7701 ","0"],["3397","\u897f\u5b81\u5e02 ","21"],["3398","\u57ce\u4e1c\u533a ","3397"],["3399","\u57ce\u4e2d\u533a ","3397"],["3400","\u57ce\u897f\u533a ","3397"],["3401","\u57ce\u5317\u533a ","3397"],["3402","\u5927\u901a\u56de\u65cf\u571f\u65cf\u81ea\u6cbb\u53bf ","3397"],["3403","\u6e5f\u4e2d\u53bf ","3397"],["3404","\u6e5f\u6e90\u53bf ","3397"],["3406","\u6d77\u4e1c\u5730\u533a ","21"],["3407","\u5e73\u5b89\u53bf ","3406"],["3408","\u6c11\u548c\u56de\u65cf\u571f\u65cf\u81ea\u6cbb\u53bf ","3406"],["3409","\u4e50\u90fd\u53bf ","3406"],["3410","\u4e92\u52a9\u571f\u65cf\u81ea\u6cbb\u53bf ","3406"],["3411","\u5316\u9686\u56de\u65cf\u81ea\u6cbb\u53bf ","3406"],["3412","\u5faa\u5316\u6492\u62c9\u65cf\u81ea\u6cbb\u53bf ","3406"],["3414","\u6d77\u5317\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3415","\u95e8\u6e90\u56de\u65cf\u81ea\u6cbb\u53bf ","3414"],["3416","\u7941\u8fde\u53bf ","3414"],["3417","\u6d77\u664f\u53bf ","3414"],["3418","\u521a\u5bdf\u53bf ","3414"],["3420","\u9ec4\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3421","\u540c\u4ec1\u53bf ","3420"],["3422","\u5c16\u624e\u53bf ","3420"],["3423","\u6cfd\u5e93\u53bf ","3420"],["3424","\u6cb3\u5357\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","3420"],["3426","\u6d77\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3427","\u5171\u548c\u53bf ","3426"],["3428","\u540c\u5fb7\u53bf ","3426"],["3429","\u8d35\u5fb7\u53bf ","3426"],["3430","\u5174\u6d77\u53bf ","3426"],["3431","\u8d35\u5357\u53bf ","3426"],["3433","\u679c\u6d1b\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3434","\u739b\u6c81\u53bf ","3433"],["3435","\u73ed\u739b\u53bf ","3433"],["3436","\u7518\u5fb7\u53bf ","3433"],["3437"," \u8fbe\u65e5\u53bf ","3433"],["3438","\u4e45\u6cbb\u53bf ","3433"],["3439","\u739b\u591a\u53bf ","3433"],["3441","\u7389\u6811\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3442","\u7389\u6811\u53bf ","3441"],["3443","\u6742\u591a\u53bf ","3441"],["3444","\u79f0\u591a\u53bf ","3441"],["3445","\u6cbb\u591a\u53bf ","3441"],["3446","\u56ca\u8c26\u53bf ","3441"],["3447","\u66f2\u9ebb\u83b1\u53bf ","3441"],["3449","\u6d77\u897f\u8499\u53e4\u65cf\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3450","\u683c\u5c14\u6728\u5e02 ","3449"],["3451","\u5fb7\u4ee4\u54c8\u5e02 ","3449"],["3452","\u4e4c\u5170\u53bf ","3449"],["3453","\u90fd\u5170\u53bf ","3449"],["3454","\u5929\u5cfb\u53bf ","3449"],["26","\u5b81\u590f\u56de\u65cf\u81ea\u6cbb\u533a ","0"],["3457","\u94f6\u5ddd\u5e02 ","26"],["3458"," \u5174\u5e86\u533a ","3457"],["3459","\u897f\u590f\u533a ","3457"],["3460","\u91d1\u51e4\u533a ","3457"],["3461","\u6c38\u5b81\u53bf ","3457"],["3462","\u8d3a\u5170\u53bf ","3457"],["3463","\u7075\u6b66\u5e02 ","3457"],["3465","\u77f3\u5634\u5c71\u5e02 ","26"],["3466","\u5927\u6b66\u53e3\u533a ","3465"],["3467","\u60e0\u519c\u533a ","3465"],["3468","\u5e73\u7f57\u53bf ","3465"],["3470","\u5434\u5fe0\u5e02 ","26"],["3471","\u5229\u901a\u533a ","3470"],["3472","\u76d0\u6c60\u53bf ","3470"],["3473","\u540c\u5fc3\u53bf ","3470"],["3474","\u9752\u94dc\u5ce1\u5e02 ","3470"],["3476","\u56fa\u539f\u5e02 ","26"],["3477","\u539f\u5dde\u533a ","3476"],["3478","\u897f\u5409\u53bf ","3476"],["3479","\u9686\u5fb7\u53bf ","3476"],["3480","\u6cfe\u6e90\u53bf ","3476"],["3481","\u5f6d\u9633\u53bf ","3476"],["3483","\u4e2d\u536b\u5e02 ","26"],["3484","\u6c99\u5761\u5934\u533a ","3483"],["3485","\u4e2d\u5b81\u53bf ","3483"],["3486","\u6d77\u539f\u53bf ","3483"],["27","\u65b0\u7586\u7ef4\u543e\u5c14\u81ea\u6cbb\u533a ","0"],["3489","\u4e4c\u9c81\u6728\u9f50\u5e02 ","27"],["3490","\u5929\u5c71\u533a ","3489"],["3491","\u6c99\u4f9d\u5df4\u514b\u533a ","3489"],["3492","\u65b0\u5e02\u533a ","3489"],["3493","\u6c34\u78e8\u6c9f\u533a ","3489"],["3494","\u5934\u5c6f\u6cb3\u533a ","3489"],["3495","\u8fbe\u5742\u57ce\u533a ","3489"],["3496","\u4e1c\u5c71\u533a ","3489"],["3497","\u7c73\u4e1c\u533a ","3489"],["3498","\u4e4c\u9c81\u6728\u9f50\u53bf ","3489"],["3500","\u514b\u62c9\u739b\u4f9d\u5e02 ","27"],["3501","\u72ec\u5c71\u5b50\u533a ","3500"],["3502","\u514b\u62c9\u739b\u4f9d\u533a ","3500"],["3503","\u767d\u78b1\u6ee9\u533a ","3500"],["3504","\u4e4c\u5c14\u79be\u533a ","3500"],["3506","\u5410\u9c81\u756a\u5730\u533a ","27"],["3507","\u5410\u9c81\u756a\u5e02 ","3506"],["3508","\u912f\u5584\u53bf ","3506"],["3509","\u6258\u514b\u900a\u53bf ","3506"],["3511","\u54c8\u5bc6\u5730\u533a ","27"],["3512","\u54c8\u5bc6\u5e02 ","3511"],["3513","\u5df4\u91cc\u5764\u54c8\u8428\u514b\u81ea\u6cbb\u53bf ","3511"],["3514","\u4f0a\u543e\u53bf ","3511"],["3516","\u660c\u5409\u56de\u65cf\u81ea\u6cbb\u5dde ","27"],["3517","\u660c\u5409\u5e02 ","3516"],["3518","\u961c\u5eb7\u5e02 ","3516"],["3519","\u7c73\u6cc9\u5e02 ","3516"],["3520","\u547c\u56fe\u58c1\u53bf ","3516"],["3521","\u739b\u7eb3\u65af\u53bf ","3516"],["3522","\u5947\u53f0\u53bf ","3516"],["3523","\u5409\u6728\u8428\u5c14\u53bf ","3516"],["3524","\u6728\u5792\u54c8\u8428\u514b\u81ea\u6cbb\u53bf ","3516"],["3526","\u535a\u5c14\u5854\u62c9\u8499\u53e4\u81ea\u6cbb\u5dde ","27"],["3527","\u535a\u4e50\u5e02 ","3526"],["3528","\u7cbe\u6cb3\u53bf ","3526"],["3529","\u6e29\u6cc9\u53bf ","3526"],["3531","\u5df4\u97f3\u90ed\u695e\u8499\u53e4\u81ea\u6cbb\u5dde ","27"],["3532","\u5e93\u5c14\u52d2\u5e02 ","3531"],["3533","\u8f6e\u53f0\u53bf ","3531"],["3534","\u5c09\u7281\u53bf ","3531"],["3535","\u82e5\u7f8c\u53bf ","3531"],["3536","\u4e14\u672b\u53bf ","3531"],["3537","\u7109\u8006\u56de\u65cf\u81ea\u6cbb\u53bf ","3531"],["3538","\u548c\u9759\u53bf ","3531"],["3539","\u548c\u7855\u53bf ","3531"],["3540","\u535a\u6e56\u53bf ","3531"],["3542","\u963f\u514b\u82cf\u5730\u533a ","27"],["3543","\u963f\u514b\u82cf\u5e02 ","3542"],["3544","\u6e29\u5bbf\u53bf ","3542"],["3545","\u5e93\u8f66\u53bf ","3542"],["3546","\u6c99\u96c5\u53bf ","3542"],["3547","\u65b0\u548c\u53bf ","3542"],["3548","\u62dc\u57ce\u53bf ","3542"],["3549","\u4e4c\u4ec0\u53bf ","3542"],["3550","\u963f\u74e6\u63d0\u53bf ","3542"],["3551","\u67ef\u576a\u53bf ","3542"],["3553","\u514b\u5b5c\u52d2\u82cf\u67ef\u5c14\u514b\u5b5c\u81ea\u6cbb\u5dde ","27"],["3554","\u963f\u56fe\u4ec0\u5e02 ","3553"],["3555","\u963f\u514b\u9676\u53bf ","3553"],["3556","\u963f\u5408\u5947\u53bf ","3553"],["3557","\u4e4c\u6070\u53bf ","3553"],["3559","\u5580\u4ec0\u5730\u533a ","27"],["3560","\u5580\u4ec0\u5e02 ","3559"],["3561","\u758f\u9644\u53bf ","3559"],["3562","\u758f\u52d2\u53bf ","3559"],["3563","\u82f1\u5409\u6c99\u53bf ","3559"],["3564","\u6cfd\u666e\u53bf ","3559"],["3565","\u838e\u8f66\u53bf ","3559"],["3566","\u53f6\u57ce\u53bf ","3559"],["3567","\u9ea6\u76d6\u63d0\u53bf ","3559"],["3568","\u5cb3\u666e\u6e56\u53bf ","3559"],["3569","\u4f3d\u5e08\u53bf ","3559"],["3570","\u5df4\u695a\u53bf ","3559"],["3571","\u5854\u4ec0\u5e93\u5c14\u5e72\u5854\u5409\u514b\u81ea\u6cbb\u53bf ","3559"],["3573","\u548c\u7530\u5730\u533a ","27"],["3574","\u548c\u7530\u5e02 ","3573"],["3575","\u548c\u7530\u53bf ","3573"],["3576","\u58a8\u7389\u53bf ","3573"],["3577","\u76ae\u5c71\u53bf ","3573"],["3578","\u6d1b\u6d66\u53bf ","3573"],["3579","\u7b56\u52d2\u53bf ","3573"],["3580","\u4e8e\u7530\u53bf ","3573"],["3581","\u6c11\u4e30\u53bf ","3573"],["3583","\u4f0a\u7281\u54c8\u8428\u514b\u81ea\u6cbb\u5dde ","27"],["3584","\u4f0a\u5b81\u5e02 ","3583"],["3585","\u594e\u5c6f\u5e02 ","3583"],["3586","\u4f0a\u5b81\u53bf ","3583"],["3587","\u5bdf\u5e03\u67e5\u5c14\u9521\u4f2f\u81ea\u6cbb\u53bf ","3583"],["3588","\u970d\u57ce\u53bf ","3583"],["3589","\u5de9\u7559\u53bf ","3583"],["3590","\u65b0\u6e90\u53bf ","3583"],["3591","\u662d\u82cf\u53bf ","3583"],["3592","\u7279\u514b\u65af\u53bf ","3583"],["3593","\u5c3c\u52d2\u514b\u53bf ","3583"],["3595","\u5854\u57ce\u5730\u533a ","27"],["3596","\u5854\u57ce\u5e02 ","3595"],["3597","\u4e4c\u82cf\u5e02 ","3595"],["3598","\u989d\u654f\u53bf ","3595"],["3599","\u6c99\u6e7e\u53bf ","3595"],["3600","\u6258\u91cc\u53bf ","3595"],["3601","\u88d5\u6c11\u53bf ","3595"],["3602","\u548c\u5e03\u514b\u8d5b\u5c14\u8499\u53e4\u81ea\u6cbb\u53bf ","3595"],["3604","\u963f\u52d2\u6cf0\u5730\u533a ","27"],["3605","\u963f\u52d2\u6cf0\u5e02 ","3604"],["3606","\u5e03\u5c14\u6d25\u53bf ","3604"],["3607","\u5bcc\u8574\u53bf ","3604"],["3608","\u798f\u6d77\u53bf ","3604"],["3609","\u54c8\u5df4\u6cb3\u53bf ","3604"],["3610","\u9752\u6cb3\u53bf ","3604"],["3611","\u5409\u6728\u4e43\u53bf ","3604"],["3613","\u77f3\u6cb3\u5b50\u5e02 ","27"],["3614","\u963f\u62c9\u5c14\u5e02 ","27"],["3615","\u56fe\u6728\u8212\u514b\u5e02 ","27"],["3616","\u4e94\u5bb6\u6e20\u5e02 ","27"],["22","\u53f0\u6e7e\u7701 ","0"],["3618","\u53f0\u5317\u5e02 ","22"],["3619","\u4e2d\u6b63\u533a ","3618"],["3620","\u5927\u540c\u533a ","3618"],["3621","\u4e2d\u5c71\u533a ","3618"],["3622","\u677e\u5c71\u533a ","3618"],["3623","\u5927\u5b89\u533a ","3618"],["3624","\u4e07\u534e\u533a ","3618"],["3625","\u4fe1\u4e49\u533a ","3618"],["3626","\u58eb\u6797\u533a ","3618"],["3627","\u5317\u6295\u533a ","3618"],["3628","\u5185\u6e56\u533a ","3618"],["3629","\u5357\u6e2f\u533a ","3618"],["3630","\u6587\u5c71\u533a ","3618"],["3632","\u9ad8\u96c4\u5e02 ","22"],["3633","\u65b0\u5174\u533a ","3632"],["3634","\u524d\u91d1\u533a ","3632"],["3635","\u82a9\u96c5\u533a ","3632"],["3636","\u76d0\u57d5\u533a ","3632"],["3637","\u9f13\u5c71\u533a ","3632"],["3638","\u65d7\u6d25\u533a ","3632"],["3639","\u524d\u9547\u533a ","3632"],["3640","\u4e09\u6c11\u533a ","3632"],["3641","\u5de6\u8425\u533a ","3632"],["3642","\u6960\u6893\u533a ","3632"],["3643","\u5c0f\u6e2f\u533a ","3632"],["3645","\u53f0\u5357\u5e02 ","22"],["3646","\u4e2d\u897f\u533a ","3645"],["3647","\u4e1c\u533a ","3645"],["3648","\u5357\u533a ","3645"],["3649","\u5317\u533a ","3645"],["3650","\u5b89\u5e73\u533a ","3645"],["3651","\u5b89\u5357\u533a ","3645"],["3653","\u53f0\u4e2d\u5e02 ","22"],["3654","\u4e2d\u533a ","3653"],["3655","\u4e1c\u533a ","3653"],["3656","\u5357\u533a ","3653"],["3657","\u897f\u533a ","3653"],["3658","\u5317\u533a ","3653"],["3659","\u5317\u5c6f\u533a ","3653"],["3660","\u897f\u5c6f\u533a ","3653"],["3661","\u5357\u5c6f\u533a ","3653"],["3663","\u91d1\u95e8\u53bf ","22"],["3664","\u5357\u6295\u53bf ","22"],["3665","\u57fa\u9686\u5e02 ","22"],["3666","\u4ec1\u7231\u533a ","3665"],["3667","\u4fe1\u4e49\u533a ","3665"],["3668","\u4e2d\u6b63\u533a ","3665"],["3669","\u4e2d\u5c71\u533a ","3665"],["3670","\u5b89\u4e50\u533a ","3665"],["3671","\u6696\u6696\u533a ","3665"],["3672","\u4e03\u5835\u533a ","3665"],["3674","\u65b0\u7af9\u5e02 ","22"],["3675","\u4e1c\u533a ","3674"],["3676","\u5317\u533a ","3674"],["3677","\u9999\u5c71\u533a ","3674"],["3679","\u5609\u4e49\u5e02 ","22"],["3680","\u4e1c\u533a ","3679"],["3681","\u897f\u533a ","3679"],["3683","\u53f0\u5317\u53bf ","22"],["3684","\u5b9c\u5170\u53bf ","22"],["3685","\u65b0\u7af9\u53bf ","22"],["3686","\u6843\u56ed\u53bf ","22"],["3687","\u82d7\u6817\u53bf ","22"],["3688","\u53f0\u4e2d\u53bf ","22"],["3689","\u5f70\u5316\u53bf ","22"],["3690","\u5609\u4e49\u53bf ","22"],["3691","\u4e91\u6797\u53bf ","22"],["3692","\u53f0\u5357\u53bf ","22"],["3693","\u9ad8\u96c4\u53bf ","22"],["3694","\u5c4f\u4e1c\u53bf ","22"],["3695","\u53f0\u4e1c\u53bf ","22"],["3696","\u82b1\u83b2\u53bf ","22"],["3697","\u6f8e\u6e56\u53bf ","22"],["32","\u9999\u6e2f\u7279\u522b\u884c\u653f\u533a ","0"],["3699","\u9999\u6e2f\u5c9b ","32"],["3700","\u4e5d\u9f99 ","32"],["3701","\u65b0\u754c ","32"],["33","\u6fb3\u95e8\u7279\u522b\u884c\u653f\u533a ","0"],["3703","\u6fb3\u95e8\u534a\u5c9b ","33"],["3704","\u79bb\u5c9b ","33"],["274","d\u5e02\u573a ","36"]] diff --git a/bizs/MultiAutoComplete/_demo/data/shengshi.php b/bizs/MultiAutoComplete/_demo/data/shengshi.php new file mode 100755 index 000000000..e300811e2 --- /dev/null +++ b/bizs/MultiAutoComplete/_demo/data/shengshi.php @@ -0,0 +1,23 @@ += $max ){ + break; + } + if( !$id ){ + array_push( $r, $json[$i] ); + }else if( $json[$i][2] == $id ){ + array_push( $r, $json[$i] ); + } + } + + echo json_encode( $r ); +?> diff --git a/bizs/MultiAutoComplete/_demo/data/shengshi_with_error_code.php b/bizs/MultiAutoComplete/_demo/data/shengshi_with_error_code.php new file mode 100755 index 000000000..cd1e756f5 --- /dev/null +++ b/bizs/MultiAutoComplete/_demo/data/shengshi_with_error_code.php @@ -0,0 +1,23 @@ + 0, 'data' => $r ); + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + echo json_encode( $result ); +?> diff --git a/bizs/MultiAutoComplete/_demo/demo.html b/bizs/MultiAutoComplete/_demo/demo.html new file mode 100755 index 000000000..fdba9a111 --- /dev/null +++ b/bizs/MultiAutoComplete/_demo/demo.html @@ -0,0 +1,150 @@ + + + + + AutoComplete + + + + + + + + + + + +

JC.MultiAutoComplete 示例

+
+
+ + + + + + + + + + + + + + +
+
+ + diff --git a/bizs/MultiAutoComplete/_demo/index.php b/bizs/MultiAutoComplete/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/MultiAutoComplete/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiAutoComplete/index.php b/bizs/MultiAutoComplete/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/bizs/MultiAutoComplete/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiAutoComplete/res/default/btn.png b/bizs/MultiAutoComplete/res/default/btn.png new file mode 100755 index 000000000..a2240dca3 Binary files /dev/null and b/bizs/MultiAutoComplete/res/default/btn.png differ diff --git a/bizs/MultiAutoComplete/res/default/index.php b/bizs/MultiAutoComplete/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/bizs/MultiAutoComplete/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiAutoComplete/res/default/style.css b/bizs/MultiAutoComplete/res/default/style.css new file mode 100755 index 000000000..68dd51b1f --- /dev/null +++ b/bizs/MultiAutoComplete/res/default/style.css @@ -0,0 +1,33 @@ + +.js_macAddtionBox { + font: 12px/1.5 Tahoma,Helvetica,Arial,'宋体',sans-serif; +} + +.js_macAddtionBox .js_macClearAddtionList { + font-weight: bold; +} + +.js_macAddtionBox a { + text-decoration: none; + cursor: pointer; + color: #069300; + outline: none; +} + +.js_macAddtionBoxItem { + padding-right: 5px; +} + +.js_macAddtionBoxItem:hover .AURemove{ + background-position: -172px -380px!important; +} + +.js_macAddtionBoxItem:hover .AURemove1{ + background-position: -75px -404px!important; +} + +.macDisable, .macDisable * { + color: #bbb!important; + cursor: default!important; +} + diff --git a/bizs/MultiChangeLogic/MultiChangeLogic.js b/bizs/MultiChangeLogic/MultiChangeLogic.js new file mode 100755 index 000000000..4b07c926d --- /dev/null +++ b/bizs/MultiChangeLogic/MultiChangeLogic.js @@ -0,0 +1,310 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * + * @namespace window.Bizs + * @class MultiChangeLogic + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version 2014-12-25 + * @author zuojing | 75 Team + * @example + + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.MultiChangeLogic = MultiChangeLogic; + + function MultiChangeLogic( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, MultiChangeLogic ) ) + return JC.BaseMVC.getInstance( _selector, MultiChangeLogic ); + + JC.BaseMVC.getInstance( _selector, MultiChangeLogic, this ); + + this._model = new MultiChangeLogic.Model( _selector ); + this._view = new MultiChangeLogic.View( this._model ); + + this._init(); + + //JC.log( MultiChangeLogic.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 MultiChangeLogic 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of MultiChangeLogicInstance} + */ + MultiChangeLogic.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_bizsMultiChangeLogic' ) ){ + _r.push( new MultiChangeLogic( _selector ) ); + }else{ + _selector.find( '.js_bizsMultiChangeLogic' ).each( function(){ + _r.push( new MultiChangeLogic( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( MultiChangeLogic ); + + JC.f.extendObject( MultiChangeLogic.prototype, { + _beforeInit: function () { + //JC.log( 'MultiChangeLogic _beforeInit', new Date().getTime() ); + }, + + _initHanlderEvent: function () { + var p = this, + tmp; + + //trigger Element change event + p._model.bclTrigger().on('change', function () { + var $cleanElement = p._model.bclChangeCleanTarget(), + $el = $(this); + + if ( $cleanElement.length ) { + $.each($cleanElement, function () { + var $this = $(this); + if ( /(input|textarea|select)/i.test($this.prop('nodeName').toLowerCase()) ) { + $this.val(''); + } else { + $this.html(''); + } + + }); + } + + p.trigger('itemchange', [$el]); + + }); + + p.on('itemchange', function (evt, triggerElement) { + + var $el = triggerElement, + $target, + $selfthidetarget, + isDisable = p._model.isDisable($el), + isDisplay = p._model.isDisplay($el); + + p._model.bclHideTarget().each(function () { + var $this = $(this); + + $this[isDisplay? 'show': 'hide'](); + }); + + p._model.bclDisabledTarget().each(function () { + var $this = $(this); + + $this.prop('disabled', isDisable); + }); + + + if ( $el.attr('bclselfdisplaytarget') ) { + + $target = $( JC.f.parentSelector(triggerElement, $el.attr('bclselfdisplaytarget') ) ); + + $.each($target, function () { + $(this).show(); + }); + + if ( $el.attr('bclselfhidetarget') ) { + $selfthidetarget = $( JC.f.parentSelector(triggerElement, $el.attr('bclselfhidetarget')) ); + if ( $selfthidetarget.length ) { + $.each($selfthidetarget, function () { + var $this = $(this); + $this.hide(); + }); + } + } + } + + if ( $el.attr('bclselfdisplayscript') ) { + $target = JC.f.scriptContent($el.attr('bclselfdisplayscript')); + p._model.bclHideScriptBox() && $(p._model.bclHideScriptBox()).html($target); + } + + }); + + p.on('checkboxchange', function (evt, triggerElement) { + + }); + + //这个逻辑是处理onload后选中的项 + if ( p._model.bclTriggerChangeOnInit() ) { + ( tmp = p._model.bclTrigger(true) ) + && (!tmp.prop('disabled')) + && (tmp.trigger('change')); + } + + + }, + + _inited: function () { + JC.log("_inited:", new Date().getTime() ); + } + }); + + MultiChangeLogic.Model._instanceName = 'MultiChangeLogic'; + JC.f.extendObject( MultiChangeLogic.Model.prototype, { + init: function () { + + }, + + bclTrigger: function (curItem) { + var r = $(JC.f.parentSelector(this.selector(), this.attrProp('bclTrigger'))); + + if ( curItem ) { + + $.each(r, function () { + var $this = $(this); + if ( $this.prop('checked') || $this.prop('selected') ) { + r = $this; + return false; + } + }); + } + + return r; + }, + + bclDisabledTarget: function () { + return $(JC.f.parentSelector(this.selector(), this.attrProp('bclDisabledTarget'))); + }, + + bclHideTarget: function () { + var r = $(JC.f.parentSelector(this.selector(), this.attrProp('bclHideTarget'))); + + return r; + }, + + bclChangeCleanTarget: function () { + return $(JC.f.parentSelector(this.selector(), this.attrProp('bclChangeCleanTarget'))); + }, + + bclTriggerChangeOnInit: function () { + var r = true, + attr = this.selector().attr('bclTriggerChangeOnInit'); + + attr && (r = this.boolProp('bclTriggerChangeOnInit')); + return r; + }, + + bclHideScriptBox: function () { + return this.attrProp('bclHideScriptBox'); + }, + + bclDelimiter: function (triggerElement) { + var r = '||'; + + this.selector().is( '[bclDelimiter]' ) + && ( r = this.selector().attr( 'bclDelimiter' ) ); + triggerElement + && triggerElement.is( '[bclDelimiter]' ) + && ( r = triggerElement.attr( 'bclDelimiter' ) ); + + return r; + }, + + bclDelimeterItem: function (items, triggerElement) { + + return items.split(this.bclDelimiter(triggerElement)); + }, + + isDisplay: function (triggerElement) { + var p = this, + $el = triggerElement, + $selectedItem, + r = false, + attr; + + if (!$el.length) return false; + + if (/(select)/i.test($el.prop('nodeName').toLowerCase())) { + //处理没有option的select + $selectedItem = $el.find(':selected'); + if (!$selectedItem.length) return false; + + if ( $el.attr('bcldisplay') ) { + r = p.bclDelimeterItem($el.attr('bcldisplay'), $el).indexOf($el.val()) > - 1; + } + + if ( $selectedItem.attr('bcldisplay') ) { + r = JC.f.parseBool($selectedItem.attr('bcldisplay')); + } + + } else { + if ( p.attrProp('bcldisplay') ) { + r = p.bclDelimeterItem(p.attrProp('bcldisplay'), p.selector()).indexOf($el.val()) > - 1; + } + attr = $el.attr('bcldisplay'); + attr && (r = JC.f.parseBool(attr)); + + } + + return r; + }, + + isDisable: function (triggerElement) { + var p = this, + $el = triggerElement, + $selectedItem, + r = false; + + if ( !$el.length ) return false; + + if (/(select)/i.test($el.prop('nodeName').toLowerCase())) { + //处理没有option的select + $selectedItem = $el.find(':selected'); + if (!$selectedItem.length) return false; + + if ( $el.attr('bcldisabled') ) { + r = p.bclDelimeterItem($el.attr('bcldisabled'), $el).indexOf($el.val()) > - 1; + } + + if ( $selectedItem.attr('bcldisabled') ) { + r = JC.f.parseBool($selectedItem.attr('bcldisabled')); + } + + } else { + if ( p.attrProp('bcldisabled') ) { + r = p.bclDelimeterItem(p.attrProp('bcldisabled'), p.selector()).indexOf($el.val()) > - 1; + } + + if ( $el.attr('bcldisabled') ) { + r = JC.f.parseBool($el.attr('bcldisabled')); + } + + } + + return r; + } + }); + + JC.f.extendObject( MultiChangeLogic.View.prototype, { + init: function () { + + } + }); + + _jdoc.ready( function () { + MultiChangeLogic.autoInit && MultiChangeLogic.init(); + }); + + return JC.MultiChangeLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiDate/MultiDate.js b/bizs/MultiDate/MultiDate.js old mode 100644 new mode 100755 index 9959ef6d8..9caa8ab6a --- a/bizs/MultiDate/MultiDate.js +++ b/bizs/MultiDate/MultiDate.js @@ -1,10 +1,11 @@ -;(function($){ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Calendar' ], function(){ window.Bizs.MultiDate = MultiDate; /** * MultiDate 复合日历业务逻辑 - *

- * require: JC.Calendar - *
require: jQuery + * 根据select选项弹出日、周、月、季日历,并计算出起始日期和结束日期 + *

require: v + * JC.BaseMVC + * , JC.Calendar *

*

JC Project Site * | API docs @@ -29,55 +30,74 @@ MultiDate.prototype = { _beforeInit: function(){ + this._model.mdstartdate().attr( 'ignoreInitCalendarDate', true ).data( 'ignoreInitCalendarDate', true ); + this._model.mdenddate().attr( 'ignoreInitCalendarDate', true ).data( 'ignoreInitCalendarDate', true ); JC.log( 'MultiDate _beforeInit', new Date().getTime() ); } , _initHanlderEvent: function(){ var _p = this; + $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ _p.on( _evtName, _cb ); }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ); _data.shift(); _data.shift(); + var _data = JC.f.sliceArgs( arguments ); _data.shift(); _data.shift(); _p.trigger( _evtName, _data ); + }); _p._initDefaultValue(); + JC.f.safeTimeout( function(){ + _p._initDefaultValue(); + }, _p.selector(), 'as3asdfasew3asdf', 201 ); _p._initHandlerEvent(); _p.selector().trigger( 'change', [ true ] ); } , _initDefaultValue: function(){ + //将url上带入的参数赋给各标签 var _p = this , _qs = _p._model.qstartdate() , _qe = _p._model.qenddate() , _mdcusStart = _p._model.mdCustomStartDate() , _mdcusEnd= _p._model.mdCustomEndDate() + , _type = _p._model.qtype() || _p._model.selector().val() + , _defaultBox = _p._model.mdDefaultBox() + , _customBox = _p._model.mdCustomBox() ; _p._model.selector( _p._model.qtype() ); _p._model.mdstartdate( _qs ); _p._model.mdenddate( _qe ); + //如果日期没有name属性,那么赋值 if( !_p._model.mddate().attr('name') ){ + if( _qs && _qe ){ if( _qs == _qe ){ - _p._model.mddate( formatISODate(parseISODate(_qs)) ); + _p._model.mddate( JC.f.formatISODate(JC.f.parseISODate(_qs)) ); }else{ - _p._model.mddate( printf( '{0} 至 {1}' - , formatISODate(parseISODate(_qs)) - , formatISODate(parseISODate(_qe)) + _p._model.mddate( JC.f.printf( '{0} 至 {1}' + , JC.f.formatISODate(JC.f.parseISODate(_qs)) + , JC.f.formatISODate(JC.f.parseISODate(_qe)) ) ); } } }else{ + //将url上的日期赋给日期控件 _p._model.mddate( _p._model.qdate() ); } - _mdcusStart && _mdcusStart.length && _mdcusStart.val( _qs ? formatISODate( parseISODate( _qs ) ) : _qs ); - _mdcusEnd&& _mdcusEnd.length && _mdcusEnd.val( _qe ? formatISODate( parseISODate( _qe ) ) : _qe ); + if (_type !== 'custom' && _p._model.mdlastdate() ) { + _p._model.setmaxdate(_type); + } + + //如果是daterange类型,那么将url上的起止时间赋值给他们。 + _mdcusStart && _mdcusStart.length && _mdcusStart.val( _qs ? JC.f.formatISODate( JC.f.parseISODate( _qs ) ) : _qs ); + _mdcusEnd && _mdcusEnd.length && _mdcusEnd.val( _qe ? JC.f.formatISODate( JC.f.parseISODate( _qe ) ) : _qe ); } , _initHandlerEvent: @@ -89,7 +109,7 @@ , _defaultBox = _p._model.mdDefaultBox() , _customBox = _p._model.mdCustomBox() ; - JC.log( 'type:', _type ); + if( _type == 'custom' ){ if( _defaultBox && _customBox && _defaultBox.length && _customBox.length ){ _defaultBox.hide(); @@ -100,18 +120,28 @@ } }else{ if( _defaultBox && _customBox && _defaultBox.length && _customBox.length ){ + _customBox.hide(); _customBox.find('input').prop( 'disabled', true); _defaultBox.find('input').prop( 'disabled', false); _defaultBox.show(); } + + if ( _p._model.mdlastdate() ) { + _p._model.setmaxdate(_type); + } + + //页面load,不需要显示日期面板,直接return; if( _noPick ) return; _p._model.settype( _type ); + setTimeout(function(){ JC.Calendar.pickDate( _p._model.mddate()[0] ); - _p._model.mdstartdate( '' ); - _p._model.mdenddate( '' ); + if (!_p._model.setdefaulthiddendate()) { + _p._model.mdstartdate( '' ); + _p._model.mdenddate( '' ); + } }, 10); } }); @@ -171,16 +201,16 @@ MultiDate.Model._inscount++; window[ _updatecb ] = - function( _type, _startDate, _endDate ){ - _p.mdstartdate( formatISODate( _startDate, '' ) ); - _p.mdenddate( formatISODate( _endDate, '' ) ); + function( _startDate, _endDate, _calendarIns ){ + _p.mdstartdate( JC.f.formatISODate( _startDate, '' ) ); + _p.mdenddate( JC.f.formatISODate( _endDate, '' ) ); }; _p.mddate().attr('calendarupdate', _updatecb); window[ _showcb ] = function(){ var _layout = $('body > div.UXCCalendar:visible'); - _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); + _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); }; _p.mddate().attr('calendarshow', _showcb ); @@ -202,14 +232,20 @@ return _p; } - , mdDefaultBox: function(){ return this.selectorProp( 'mdDefaultBox' ); } - , mdCustomBox: function(){ return this.selectorProp( 'mdCustomBox' ); } + , mdDefaultBox: function(){ + return this.selectorProp( 'mdDefaultBox' ); + } + , mdCustomBox: function(){ + //datatype = datarange + return this.selectorProp( 'mdCustomBox' ); + } , mdCustomStartDate: function(){ return this.selectorProp( 'mdCustomStartDate' ); } , mdCustomEndDate: function(){ return this.selectorProp( 'mdCustomEndDate' ); } , selector: function( _setter ){ + typeof _setter != 'undefined' && this.hastype( this.qtype() ) && this._selector.val( _setter ) @@ -218,42 +254,62 @@ return this._selector; } + , mdlastdate: + function () { + var r = this.selector().attr('mdlastdate'); + r = JC.f.parseBool(r); + return r ; + } + , mddate: + //返回日期控件,如果有日期赋值 function( _setter ){ - var _r = parentSelector( this.selector(), this.selector().attr('mddate') ); + var _r = JC.f.parentSelector( this.selector(), this.selector().attr('mddate') ); typeof _setter != 'undefined' && _r.val( _setter ); + return _r; } , mdstartdate: + //隐藏域开始日期 function( _setter ){ - var _r = parentSelector( this.selector(), this.selector().attr('mdstartdate') ); + var _r = JC.f.parentSelector( this.selector(), this.selector().attr('mdstartdate') ); typeof _setter != 'undefined' && _r.val( _setter.replace(/[^\d]/g, '') ); return _r; } , mdenddate: + //隐藏域结束日期 function( _setter ){ - var _r = parentSelector( this.selector(), this.selector().attr('mdenddate') ); + var _r = JC.f.parentSelector( this.selector(), this.selector().attr('mdenddate') ); typeof _setter != 'undefined' && _r.val( _setter.replace(/[^\d]/g, '') ); return _r; } + , setdefaulthiddendate: function () { + return JC.f.parseBool(this.selector().attr('setdefaulthiddendate')); + } + , qtype: function(){ - return this.decodedata( getUrlParam( this.selector().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的日期类型参数 + return this.decodedata( JC.f.getUrlParam( this.selector().attr('name') || '' ) || '' ).toLowerCase(); } , qdate: function(){ - return this.decodedata( getUrlParam( this.mddate().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的日期值 + return this.decodedata( JC.f.getUrlParam( this.mddate().attr('name') || '' ) || '' ).toLowerCase(); } , qstartdate: function(){ - return this.decodedata( getUrlParam( this.mdstartdate().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的开始日期 + return this.decodedata( JC.f.getUrlParam( this.mdstartdate().attr('name') || '' ) || '' ).toLowerCase(); } , qenddate: function(){ - return this.decodedata( getUrlParam( this.mdenddate().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的结束日期 + return this.decodedata( JC.f.getUrlParam( this.mdenddate().attr('name') || '' ) || '' ).toLowerCase(); } , hastype: + //是否为可处理的日期类型 function( _type ){ var _r = false; this.selector().find('> option').each( function(){ @@ -266,6 +322,7 @@ } , settype: + //修改日期控件的日期类型日、周、月、季 function( _type ){ this.mddate().val('').attr( 'multidate', _type ); } @@ -276,6 +333,7 @@ return _d; } , updateHiddenDate: + //更新隐藏域开始结束日期的值,如果日期为空那么隐藏域的值为空,否则8位日期 function (){ var _date = $.trim( this.mddate().val() ); if( !_date ){ @@ -294,6 +352,52 @@ } } + , setmaxdate: function (_type) { + var _p = this, + _tmpDate, + _maxDate, + _startDate, + _strDate; + + switch( _type ) { + case 'week': + _tmpDate = JC.f.dateDetect('now -1w'); + _maxDate = JC.f.formatISODate(JC.f.dayOfWeek(_tmpDate).end); + _strDate = JC.f.formatISODate(JC.f.dayOfWeek(_tmpDate).start) + '至' + _maxDate; + break; + case 'month': + _tmpDate = JC.f.dateDetect('now -1m'); + _maxDate = JC.f.cloneDate(_tmpDate); + _maxDate.setDate(JC.f.maxDayOfMonth(_tmpDate)); + _maxDate = JC.f.formatISODate(_maxDate); + _startDate = JC.f.cloneDate(_tmpDate); + _startDate.setDate(1); + _strDate = JC.f.formatISODate(_startDate) + '至' + _maxDate; + break; + case 'season': + _tmpDate = JC.f.dayOfSeason(new Date()).q - 2; + _tmpDate > 0? _tmpDate: 0; + _maxDate = JC.f.seasonOfYear(new Date().getFullYear())[_tmpDate].end; + _maxDate = JC.f.formatISODate(_maxDate); + _startDate = JC.f.formatISODate(JC.f.seasonOfYear(new Date().getFullYear())[_tmpDate].start); + _strDate = _startDate + '至' + _maxDate; + break; + case 'date': + _maxDate = new Date(); + _maxDate.setDate(_maxDate.getDate() - 1); + _maxDate = JC.f.formatISODate(_maxDate); + _strDate = _maxDate + break; + } + + _p.mddate().attr('maxValue', _maxDate); + if (_p.setdefaulthiddendate()) { + setTimeout(function () { + _p.mddate().val(_strDate); + }, 30); + } + } + }; BaseMVC.buildView( MultiDate ); @@ -312,7 +416,7 @@ } }; - BaseMVC.build( MultiDate, 'Bizs' ); + BaseMVC.build( MultiDate, 'Bizs' ); $(document).ready( function(){ $('select.js_autoMultidate').each( function(){ @@ -320,4 +424,13 @@ }); }); -}(jQuery)); + return Bizs.MultiDate; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiDate/_demo/crm.example.custom.html b/bizs/MultiDate/_demo/crm.example.custom.html old mode 100644 new mode 100755 diff --git a/bizs/MultiDate/_demo/crm.example.html b/bizs/MultiDate/_demo/crm.example.html old mode 100644 new mode 100755 index 155df40ee..2e5c7a5a3 --- a/bizs/MultiDate/_demo/crm.example.html +++ b/bizs/MultiDate/_demo/crm.example.html @@ -33,14 +33,17 @@ mddate="/input.js_multidate" mdstartdate="/input.js_startdate" mdenddate="/input.js_enddate" + mdlastdate="true" > - + diff --git a/bizs/MultiDate/_demo/index.php b/bizs/MultiDate/_demo/index.php old mode 100644 new mode 100755 diff --git a/bizs/MultiDate/index.php b/bizs/MultiDate/index.php old mode 100644 new mode 100755 diff --git a/bizs/MultiSelect/MultiSelect.js b/bizs/MultiSelect/MultiSelect.js new file mode 100755 index 000000000..7c0cafc74 --- /dev/null +++ b/bizs/MultiSelect/MultiSelect.js @@ -0,0 +1,370 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +//Todo:对于已选中的数据,自动铺出数据列表,展示数据 +/** + * 模拟多选下拉框 + * 框的click将列表拉出来。 + * close和document的click将面板关闭,返回数据,并把数据铺到指定的面板里 + * + *

JC Project Site + * | API docs + * | demo link

+ * + *

页面只要引用本脚本, 默认会自动处理 div class="js_bizMultiSelect"

+ * + *

可用的 HTML attribute

+ * + *
+ *
defaultLabel = string
+ *
+ * 声明下拉框默认显示的文字信息 + *
+ *
binddatabox = string(selector)
+ *
声明选中数据,关闭下拉面板后,数据的回填区域
+ * 如果此属性为空,则不会在其他区域展示选中的数据 + *
+ *
ajaxurl = string
+ *
声明ajax加载数据的url + *
+ *
数据格式
+ *
+ * {errorno: 0, + * data: [ { "id": "id value", "label": "label value", "isChecked": "is checked" }, ... ], + * errormsg: ""} + *
+ *
+ *
dataFilter = callback
+ *
+ *
+ *
如果 数据接口获取的数据不是默认格式, + * 可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式 + *
+ *
+
function cacDataFilter( _json ){
+if( _json.data && _json.data.length ){
+    _json = _json.data;
+}
+ 
+$.each( _json, function( _ix, _item ){
+    _item.length &&
+        ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1], 'isChecked': _item[2] } )
+        ;
+});
+return _json;
+}
+ *
+ *
+ *
+ *
dataname=string
+ *
声明checkbox的name属性, 适用于ajax接口的数据
+ * + *
+ * + * @namespace window.Bizs + * @class MultiSelect + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-02-20 + * @author zuojing | 75 Team + * @example +
+
+ + 共选中2条数据 + +
+
  • 北京天地在线广告有限公司
  • 河南天地在线广告有限公司
+
+ */ + Bizs.MultiSelect = MultiSelect; + + function MultiSelect( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, MultiSelect ) ) + return JC.BaseMVC.getInstance( _selector, MultiSelect ); + + JC.BaseMVC.getInstance( _selector, MultiSelect, this ); + + this._model = new MultiSelect.Model( _selector ); + this._view = new MultiSelect.View( this._model ); + + this._init(); + + //JC.log( MultiSelect.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 MultiSelect 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of MultiSelectInstance} + */ + MultiSelect.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector && _selector.length ){ + if( _selector.hasClass( 'js_bizMultiSelect' ) ){ + _r.push( new MultiSelect( _selector ) ); + }else{ + _selector.find( 'div.js_bizMultiSelect' ).each( function(){ + _r.push( new MultiSelect( this ) ); + }); + } + } + return _r; + }; + + /** + * 定义全局数据过滤函数 + * @method dataFilter + * @param {json} _json + * @static + * @return {json} + */ + MultiSelect.dataFilter; + + BaseMVC.build( MultiSelect ); + + JC.f.extendObject( MultiSelect.prototype, { + _beforeInit: function () { + //JC.log( 'MultiSelect _beforeInit', new Date().getTime() ); + }, + + _initHanlderEvent: function () { + + }, + + _inited: function () { + + }, + + show: function () { + this._view.show(); + return this; + }, + + hide: function () { + this._view.hide(); + return this; + } + + }); + + MultiSelect.Model._instanceName = 'MultiSelectIns'; + MultiSelect.Model.SHOW = 'SHOW'; + JC.f.extendObject( MultiSelect.Model.prototype, { + init: function () { + + }, + + defaultLabel: function () { + return this.attrProp('defaultLabel'); + }, + + dataBindBox: function () { + var _p = this, + _r = _p.attrProp('dataBindBox'); + + return JC.f.parentSelector(_p.selector(), _r); + }, + + listBox: function () { + return this.selector().find('.SELECTListBox'); + }, + + ajaxUrl: function () { + return this.attrProp('ajaxUrl'); + }, + + ajaxData: function () { + var _p = this, + _url = _p.ajaxUrl(), + _name = _p.attrProp('dataname'), + _tpl = [], + _box = _p.listBox(); + + if ( !_url ) return; + + _tpl.push('
  • '); + + $.get(_url, function (_res) { + _res = _p.dataFilter( $.parseJSON(_res) ); + + var i = 0, + l = _res.length, + _str = '', + _checked; + + for (i = 0; i < l; i++) { + _checked = _res[i].isChecked? 'checked': ''; + _str = '
  • '; + + _tpl.push(_str); + } + + _tpl.push('
'); + $(_tpl.join(' ')).prependTo(_box); + JC.f.autoInit && JC.f.autoInit(_box); + + } ); + + }, + + dataFilter: function ( _data ) { + var _p = this, + _filter = _p.callbackProp('dataFilter') || MultiSelect.dataFilter; + + _filter && ( _data = _filter(_data) ); + + return _data; + }, + + dataList: function () { + var _p = this, + _list = _p.listBox().find('>ul>li').not('.SELECTIgnore'), + _r = []; + + ( _list.length === 0 ) && _p.ajaxUrl() && _p.ajaxData() ; + + _list.each(function () { + var _sp = $(this), + _str = '', + _ipt = _sp.find('input'); + + if ( _ipt.prop('checked') ) { + _str = '
  • ' + _ipt.data('text') + '
  • ' ; + _r.push(_str); + } + + }); + + return _r; + }, + + bindData: function () { + var _p = this, + _box = _p.dataBindBox(), + _datalist = _p.dataList(), + _l = _datalist.length, + _label = _p.defaultLabel(), + _t = ''; + + _box.html('
      ' + _datalist.join(' ') + '
    '); + _t = _l ? '已选择' + _l + '个' + _label: '请选择' + _label; + _p.selector().find('.SELECTLabel').html(_t); + } + + }); + + JC.f.extendObject( MultiSelect.View.prototype, { + init: function () { + + }, + + show: function () { + var _p = this, + _selector = _p._model.selector(); + + JC.f.safeTimeout( setTimeout( function(){}, 50), _selector, 'SELECTListBoxUi' ); + _selector.addClass('SELECTBOX-active'); + _p._model.listBox().show().css( { 'z-index': ZINDEX_COUNT++ } ); + }, + + hide: function () { + var _p = this, + _selector = _p._model.selector(); + + _p._model.listBox().hide(); + JC.f.safeTimeout( setTimeout( function(){ + _selector.removeClass( 'SELECTBOX-active' ); + _p._model.bindData(); + }, 50), _selector, 'SELECTListBoxUi' ); + } + + + }); + + var doc = $(document); + + doc.ready( function(){ + var _insAr = 0; + MultiSelect.autoInit + && ( _insAr = MultiSelect.init() ); + }); + + doc.delegate('.js_bizMultiSelect', 'click', function () { + var _p = $(this), + _ins; + + JC.f.safeTimeout( function(){ + _ins = JC.BaseMVC.getInstance( _p, MultiSelect ); + !_ins && ( _ins = new MultiSelect( _p ) ); + _ins.show(); + }, _p, 'bizMultiSelectClick', 50 ); + + }); + + doc.on('mousedown', function () { + JC.f.safeTimeout( function(){ + $('.js_bizMultiSelect').each( function(){ + var _ins = JC.BaseMVC.getInstance( $(this), MultiSelect ); + _ins && _ins.hide(); + }); + }, null, 'CLOSE_MULTI_SELECT') + + } ); + + doc.delegate('.SELECTCloseBtn', 'mousedown', function () { + var _ins = JC.BaseMVC.getInstance( JC.f.getJqParent($(this), '.js_bizMultiSelect'), MultiSelect ); + _ins && _ins.hide(); + }); + + doc.delegate('.js_bizMultiSelect>.SELECTListBox', 'mousedown', function( _evt ){ + _evt.stopPropagation(); + }); + + return Bizs.MultiSelect; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiSelect/_demo/data/index.php b/bizs/MultiSelect/_demo/data/index.php new file mode 100755 index 000000000..6535b2194 --- /dev/null +++ b/bizs/MultiSelect/_demo/data/index.php @@ -0,0 +1,17 @@ + 1, 'data' => array() ); + + $r['errorno'] = 0; + $r['errmsg'] = ''; + + $r['data'] = array( + array('0' => 'test0', '1' => '448', '2' => 0 ), + array('0' => 'test1', '1' => '453', '2' => 0 ), + array('0' => 'test2', '1' => '418', '2' => 1 ), + array('0' => 'test3', '1' => '413', '2' => 1 ), + array('0' => 'test4', '1' => '4458', '2' => 0 ), + array('0' => 'test5', '1' => '4553', '2' => 0 ), + ); + + echo json_encode( $r ); +?> diff --git a/bizs/MultiSelect/_demo/demo.html b/bizs/MultiSelect/_demo/demo.html new file mode 100755 index 000000000..7963cb8bd --- /dev/null +++ b/bizs/MultiSelect/_demo/demo.html @@ -0,0 +1,98 @@ + + + + + Bizs.MultiSelect 0.1 + + + + + + + + +
    +
    normal demo
    +
    +
    +
    + + +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    + +
    +
    +
    +
    +
    +
    +
    ajax demo
    +
    +
    + + +
    + +
    +
    +
    +
    +
    +
    + + + + + diff --git a/bizs/MultiSelect/_demo/index.php b/bizs/MultiSelect/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/MultiSelect/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiSelect/index.php b/bizs/MultiSelect/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/bizs/MultiSelect/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiSelect/res/default/style.css b/bizs/MultiSelect/res/default/style.css new file mode 100755 index 000000000..7b772a72e --- /dev/null +++ b/bizs/MultiSelect/res/default/style.css @@ -0,0 +1,117 @@ +.red{ + color: #f00; +} +.SELECTBOX{ + width: 260px; + height: 19px; + overflow: hidden; + border: 1px solid #ccc; + padding: 1px 1px 0; + margin: 0; + background: #fff; + position: relative; + font-size: 12px; +} + +.SELECTBOX-active{ + overflow: visible; +} + +.SELECTBOX .SELECTLabel{ + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0 0 3px; + margin: 0; + line-height: 18px; + color: #444; + margin-right: 20px; + cursor: pointer; +} + +.SELECTBOX .SELECTIcon{ + position: absolute; + display: block; + right: 1px; + top: 1px; + width: 17px; + height: 18px; + background: url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat; + overflow: hidden; + padding: 0; + margin: 0; + font-size: 0; + line-height: 0; + float: right; +} + +.SELECTBOX:hover .SELECTIcon{ + background-position: 0 -18px; +} + +.SELECTBOX-disabled{ + border: 1px solid #ddd; + background: #f0f0f0; +} + +.SELECTBOX-disabled .SELECTLabel{ + color: #666; + cursor: default; +} + +.SELECTBOX-disabled:hover .SELECTIcon{ + background-position: 0 0; +} + +.SELECTBOX-disabled .SELECTIcon{ + filter: alpha(opacity=70); + opacity: 0.7; +} + +.SELECTListBox{ + display: none; + background: #fff; + width: 100%; + border: 1px solid #ccc; + position: absolute; + left: -1px; + top: 19px; + overflow-x: auto; +} + +.SELECTListBox ul{ + list-style: none; + padding: 0; + margin: 0; + max-height: 200px; + overflow-y: scroll; +} + +.SELECTListBox li{ + padding: 0; + vertical-align: middle; + float: none; + display:block; +} + +.SELECTListBox li label{ + padding: 4px 8px; + display: block !important; +} +.SELECTListBox li input{ + margin: 0 3px 0 0; + vertical-align: -3px; +} +.SELECTClose{ + /*background: #eee;*/ + border-top: 1px solid #ccc; + text-align: right; + padding: 2px 10px; +} +/*.SELECTListBox .tree_wrap{ + padding-top: 4px!important; +}*/ + + + diff --git a/bizs/MultiSelectTree/MultiSelectTree.js b/bizs/MultiSelectTree/MultiSelectTree.js new file mode 100755 index 000000000..204b9fec4 --- /dev/null +++ b/bizs/MultiSelectTree/MultiSelectTree.js @@ -0,0 +1,127 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.common', 'JC.Tree' ], function(){ +/** + * MultiSelect
    + * 多选树
    + * 基于JC.Tree的扩展
    + * + *

    require: + * JC.common + * , JC.Tree + *

    + * + *

    JC Project Site + * | API docs + * | demo link

    + * + * @namespace window.Bizs + * @class MultiSelectTree + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-06-19 + * @author sunlei | 75 Team + */ + JC.use && !JC.Tree && JC.use( 'JC.Tree' ); + Bizs.MultiSelectTree = MultiSelectTree + + function MultiSelectTree( _treeEle, _treeData, _cb, _renderTpl ){ + // init tree and callback + this._tree = new JC.Tree( _treeEle, _treeData ); + this._getSelected = _cb; + this._renderTpl = _renderTpl; + } + MultiSelectTree.prototype = { + /** + * explain~ + * @method expandChild + * @param {event} _evt + */ + "expandChild" : function(_evt){ + var target = $(_evt.target); + var dataid = target.attr('dataid'); + if(this._tree._model.hasChild(dataid)){ + this._tree._view.open(dataid); + var children = this._tree._model.child(dataid); + for(var i=0;i{1}' + , _data[0], _data[1] ) ); + }); + this._tree.on('change', this.update.bind(this)); + + // triger tree init + this._tree.init(); + return this._tree; + } + , tree: function(){ return this._tree; } + }; + + return JC.MultiSelectTree; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiSelectTree/_demo/data/crm.css b/bizs/MultiSelectTree/_demo/data/crm.css new file mode 100755 index 000000000..2a86b7e6a --- /dev/null +++ b/bizs/MultiSelectTree/_demo/data/crm.css @@ -0,0 +1,24 @@ +.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;} +.clearfix{zoom:1;} +.clear{clear:both;} + +.tree_container{ display: none; background: #fff; width: 100%; border: 1px solid #ccc; position: absolute; + overflow-x: auto; +} + +/* +*department select styles +*2013-05-17 +*/ +div.dpt-select{ float:left; width:260px; height:19px; overflow:hidden; border:1px solid #ccc; padding:1px 1px 0; margin:0; background:#fff; position:relative;} +div.dpt-select-active{ height: auto; overflow:visible; } +div.dpt-select span.label{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 0 0 3px; margin:0; line-height:18px; color:#444; margin-right:20px; cursor: pointer;} +div.dpt-select i{ position:absolute; display:block; right:1px; top:1px; width:17px; height:18px; background:url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat; overflow:hidden; padding:0; margin:0; font-size:0; line-height:0;} +div.dpt-select:hover i{ background-position: 0 -18px;} +div.dpt-select-disabled{ border:1px solid #ddd; background:#f0f0f0;} +div.dpt-select-disabled span.label{ color:#666; cursor:default;} +div.dpt-select-disabled:hover i{ background-position: 0 0;} +div.dpt-select-disabled i{ filter:alpha(opacity=70);opacity: 0.7; } + +div.dpt-treeCon{position:absolute; border:1px solid #ddd; width:262px; min-height:100px; _height:100px; top:200px; left:200px; background:#fff; display:none; margin:0;} +div.dpt-treeCon .tree-wrap{ padding-top:4px;} diff --git a/bizs/MultiSelectTree/_demo/data/crm.js b/bizs/MultiSelectTree/_demo/data/crm.js new file mode 100755 index 000000000..70aa8edc0 --- /dev/null +++ b/bizs/MultiSelectTree/_demo/data/crm.js @@ -0,0 +1,79 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.Tree' ], function(){ +;( function( $ ){ + window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001; + + JC.Tree.dataFilter = JC.Tree.dataFilter || + function( _data ){ + var _r = {}; + + if( _data && _data.root && _data.root.length > 2 ){ + _data.root.shift(); + _r.root = _data.root; + _r.data = {}; + for( var k in _data.data ){ + _r.data[ k ] = []; + for( var i = 0, j = _data.data[k].length; i < j; i++ ){ + if( _data.data[k][i].length < 3 ) { + _r.data[k].push( _data.data[k][i] ); + continue; + } + _data.data[k][i].shift(); + _r.data[k].push( _data.data[k][i] ); + } + } + }else{ + _r = _data; + } + return _r; + }; + + $(document).delegate('div.tree_container', 'click', function( _evt ){ + _evt.stopPropagation(); + }); + + $(document).on('click', function(){ + $('div.dpt-select-active').trigger('click'); + }); + + $(document).delegate( 'div.dpt-select', 'click', function( _evt ){ + _evt.stopPropagation(); + var _p = $(this), _treeNode = $( _p.attr('treenode') ); + var _treeIns = _treeNode.data('TreeIns'); + if( !_p.hasClass( 'dpt-select-active') ){ + $('div.dpt-select-active').trigger('click'); + } + if( !_treeIns ){ + var _data = window[ _p.attr( 'treedata' ) ]; + + var _tree = new JC.Tree( _treeNode, _data ); + _tree.on( 'click', function(){ + var _sp = $(this) + , _dataid = _sp.attr('dataid') + , _dataname = _sp.attr('dataname'); + + _p.find( '> span.label' ).html( _dataname ); + _p.find( '> input[type=hidden]' ).val( _dataid ); + _p.trigger( 'click' ); + }); + _tree.on( 'RenderLabel', function( _data ){ + var _node = $(this); + _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) ); + }); + _tree.init(); + _tree.open(); + + var _defSelected = _p.find( '> input[type=hidden]' ).val(); + _defSelected && _tree.open( _defSelected ); + } + _treeNode.css( { 'z-index': ZINDEX_COUNT++ } ); + if( _treeNode.css('display') != 'none' ){ + _p.removeClass( 'dpt-select-active' ); + _treeNode.hide(); + }else{ + _treeNode.show(); + _p.addClass( 'dpt-select-active' ); + _treeNode.css( { 'top': _p.prop( 'offsetHeight' ) -2 + 'px', 'left': '-1px' } ); + } + }); +}(jQuery)); +});}(typeof define === 'function' && define.amd ? define : function (_require, _cb) { _cb && _cb(); }, this)); diff --git a/bizs/MultiSelectTree/_demo/data/data1.js b/bizs/MultiSelectTree/_demo/data/data1.js new file mode 100755 index 000000000..04c6fef3e --- /dev/null +++ b/bizs/MultiSelectTree/_demo/data/data1.js @@ -0,0 +1 @@ + {"data":{"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]},"root":["23","客户发展部"]} diff --git a/bizs/MultiSelectTree/_demo/multiselect_tree.html b/bizs/MultiSelectTree/_demo/multiselect_tree.html new file mode 100755 index 000000000..e717a8cae --- /dev/null +++ b/bizs/MultiSelectTree/_demo/multiselect_tree.html @@ -0,0 +1,70 @@ + + + + +360 75 team + + + + + + +
    +
    MultiSelectTree 示例
    +
    +
    +
    +
    +
    + +
    + + + diff --git a/bizs/MultiSelectTree/res/default/images/closed.gif b/bizs/MultiSelectTree/res/default/images/closed.gif new file mode 100755 index 000000000..07b89a21c Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/closed.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/closed_last.gif b/bizs/MultiSelectTree/res/default/images/closed_last.gif new file mode 100755 index 000000000..71adab60a Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/closed_last.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/open.gif b/bizs/MultiSelectTree/res/default/images/open.gif new file mode 100755 index 000000000..319ccc9f4 Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/open.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/open_last.gif b/bizs/MultiSelectTree/res/default/images/open_last.gif new file mode 100755 index 000000000..cba44f082 Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/open_last.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/root.gif b/bizs/MultiSelectTree/res/default/images/root.gif new file mode 100755 index 000000000..14d302547 Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/root.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/root_plus.gif b/bizs/MultiSelectTree/res/default/images/root_plus.gif new file mode 100755 index 000000000..bb3ea2f44 Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/root_plus.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/treeline.gif b/bizs/MultiSelectTree/res/default/images/treeline.gif new file mode 100755 index 000000000..ce41c2ab3 Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/treeline.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/treeline1.gif b/bizs/MultiSelectTree/res/default/images/treeline1.gif new file mode 100755 index 000000000..cbf413392 Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/treeline1.gif differ diff --git a/bizs/MultiSelectTree/res/default/images/treeline2.gif b/bizs/MultiSelectTree/res/default/images/treeline2.gif new file mode 100755 index 000000000..32bd0b78a Binary files /dev/null and b/bizs/MultiSelectTree/res/default/images/treeline2.gif differ diff --git a/bizs/MultiSelectTree/res/default/style.css b/bizs/MultiSelectTree/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/bizs/MultiUpload/MultiUpload.js b/bizs/MultiUpload/MultiUpload.js new file mode 100755 index 000000000..69937a95d --- /dev/null +++ b/bizs/MultiUpload/MultiUpload.js @@ -0,0 +1,430 @@ + ;(function(define, _win) { 'use strict'; define( [ 'JC.AjaxUpload' ], function(){ +/** + * 上传多个文件, 基于 JC.AjaxUpload + * + *

    require: + * jQuery + * , JC.BaseMVC + * , JC.AjaxUpload + *

    + * + *

    JC Project Site + * | API docs + * | demo link

    + * + *

    页面只要引用本脚本, 默认会自动处理 div class="js_bizMultiUpload"

    + * + *

    可用的 HTML attribute

    + * + *
    + *
    bmuItemLimit = int, default = 0
    + *
    限制上传的数量, 0 为不限制, 非 0 为限制的数量
    + * + *
    bmuBoxSelector = selector, default = '|.bmuBoxSelector'
    + *
    上传内容的父容器
    + * + *
    bmuTplSelector = selector, default = 组件生成
    + *
    上传内容的模板内容, {0} = file url, {1} = file name
    + * + *
    bmuAjaxUploadSelector = selector, default = '|.js_compAjaxUpload'
    + *
    JC.AjaxUpload 的选择器
    + * + *
    bmuItemDelegate = selector, default = '>'
    + *
    bmuBoxSelector 的子级标签
    + * + *
    bmuRemoveDelegate = selector, default = '.js_removeUploadItem'
    + *
    删除子级标签的选择器
    + * + *
    bmuRemoveItemParentSelector = selector, default = '('
    + *
    相对于 bmuRemoveDelegate 的子级标签父选择器
    + * + *
    bmuItemAddedCallback = function
    + *
    添加上传内容后的回调 +
    function bmuItemAddedCallback( _newItem, _json, _boxSelector ){
    +    var _bmuIns = this;
    +}
    + *
    + * + *
    bmuItemDeletedCallback = function
    + *
    删除上传内容后的回调 +
    function bmuItemDeletedCallback( _deletedItem, _boxSelector ){
    +    var _bmuIns = this;
    +}
    + *
    + * + *
    + * + * @namespace window.Bizs + * @class MultiUpload + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +<div class="js_bizMultiUpload" + bmuBoxSelector="|.uploadItemBox" + bmuTplSelector="|script" + bmuItemDelegate=">" + bmuRemoveDelegate=".js_removeUploadItem" + bmuRemoveItemParentSelector="(" + bmuAjaxUploadSelector="|.js_compAjaxUpload" + bmuItemLimit="2" + > + <div> + <input type="hidden" class="ipt ipt-w180 js_compAjaxUpload" value="" + cauStyle="w1" + cauButtonText="上传资质文件" + cauUrl="../_demo/data/handler.php" + cauFileExt=".jpg, .jpeg, .png, .gif" + cauFileName="file" + cauValueKey="url" + cauLabelKey="name" + cauProgressBox="/span.AUProgressBox" + /> + <span class="AUProgressBox" style="display:none;"> + <button type="button" class="AUProgress"><div class="AUPercent"></div></button> + <button type="button" class="AUCancelProgress"></button> + </span> + .jpg, .jpeg, .png, .gif + (最多上传2个) + </div> + <dl class="uploadItemBox"> + </dl> + <script type="text/template"> + <dd class="js_multiUploadItem"> + <input type="hidden" name="file[]" value="{0}" class="js_multiUploadHidden" /> + <a href="{0}" target="_blank"><label class="js_multiUploadLabel">{1}</label></a> + <button type="button" class="AURemove js_removeUploadItem"></button> + </dd> + </script> +</div> + */ + Bizs.MultiUpload = MultiUpload; + + JC.use && !JC.AjaxUpload && JC.use( 'JC.AjaxUpload' ); + + function MultiUpload( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, MultiUpload ) ) + return JC.BaseMVC.getInstance( _selector, MultiUpload ); + + JC.BaseMVC.getInstance( _selector, MultiUpload, this ); + + this._model = new MultiUpload.Model( _selector ); + this._view = new MultiUpload.View( this._model ); + + this._init(); + + JC.log( MultiUpload.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 MultiUpload 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of MultiUploadInstance} + */ + MultiUpload.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector && _selector.length ){ + if( _selector.hasClass( 'js_bizMultiUpload' ) ){ + _r.push( new MultiUpload( _selector ) ); + }else{ + _selector.find( 'div.js_bizMultiUpload' ).each( function(){ + _r.push( new MultiUpload( this ) ); + }); + } + } + return _r; + }; + + BaseMVC.build( MultiUpload ); + + JC.f.extendObject( MultiUpload.prototype, { + _beforeInit: + function(){ + //JC.log( 'MultiUpload _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + _p._model.saveAjaxUploadHandler(); + _p._model.injectAjaxHandler(); + + _p.trigger( 'CheckItemLimit' ); + }); + + //{"errorno":0,"errmsg":"","data":{"name":"test.jpg","url":"./data/images/test.jpg"}} + _p.on( 'AjaxDone', function( _evt, _json, _setter, _ajaxUpload ){ + //JC.dir( _json ); + //JC.log( JSON.stringify( _json ) ); + + var _tpl = _p._model.bmuTpl() + , _boxSelector = _p._model.bmuBoxSelector() + ; + + if( !( _boxSelector && _boxSelector.length ) ) return; + + if( _json.errorno ) return; + _p._view.newItem( _json, _tpl, _boxSelector ); + }); + + _p.on( 'ItemAdded', function( _evt, _newItem, _json, _boxSelector ){ + JC.f.safeTimeout( function(){ _p.trigger( 'CheckItemLimit' ); }, _p, 'OnItemAdded', 10 ); + + _p._model.bmuItemAddedCallback() + && _p._model.bmuItemAddedCallback().call( _p, _newItem, _json, _boxSelector ); + }); + + _p.on( 'ItemDeleted', function( _evt, _deletedItem ){ + _p._model.bmuItemDeletedCallback() + && _p._model.bmuItemDeletedCallback().call( _p, _deletedItem, _p._model.bmuBoxSelector() ); + }); + + _p.on( 'CheckItemLimit', function(){ + _p._view.checkItemLimit(); + }); + + + _p._model.bmuBoxSelector().delegate( _p._model.bmuRemoveDelegate(), 'click', function(){ + //JC.log( 'bmuRemoveDelegate click', new Date().getTime() ); + var _pnt = JC.f.parentSelector( this, _p._model.bmuRemoveItemParentSelector() ); + + _pnt && _pnt.length && _pnt.remove(); + _p.updateStatus(); + + _p.trigger( 'ItemDeleted', [ this ] ); + }); + } + + , _inited: + function(){ + //JC.log( 'MultiUpload _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + /** + * 更新按钮的状态 + * @method updateStatus + */ + , updateStatus: + function(){ + this.trigger( 'CheckItemLimit' ); + return this; + } + }); + + MultiUpload.Model._instanceName = 'MultiUpload'; + MultiUpload.Model._insCount = 1; + MultiUpload.Model._handlerPrefix = 'bizMultiUploadHandler_'; + + JC.f.extendObject( MultiUpload.Model.prototype, { + init: + function(){ + //JC.log( 'MultiUpload.Model.init:', new Date().getTime() ); + this._id = MultiUpload.Model._insCount++; + } + + , bmuItemLimit: function(){ return this.intProp( 'bmuItemLimit' ); } + + , id: + function( _setter ){ + typeof _setter != 'undefined' && ( this._id = _setter ); + return this._id; + } + , bmuBoxSelector: + function(){ + var _r = this._bmuBoxSelector || this.selectorProp( 'bmuBoxSelector' ); + !( _r && _r.length ) && ( _r = this.selector().find( '.bmuBoxSelector' ) ); + if( !( _r && _r.length ) ){ + _r = this._bmuBoxSelector = $( '
    ' ); + this._bmuBoxSelector.appendTo( this.selector() ); + } + return _r; + } + , bmuTplSelector: + function(){ + var _r = this.selectorProp( 'bmuTplSelector' ); + !( _r && _r.length ) && ( _r = this.selector().find( '.bmuTplSelector' ) ); + return _r; + } + , bmuTpl: + function(){ + var _r = [ + '
    ' + ,'' + ,'' + ,' ' + ,'
    ' + ].join('') + , _tplSelector = this.bmuTplSelector() + ; + + _tplSelector && _tplSelector.length && ( _r = JC.f.scriptContent( _tplSelector ) ); + + return _r; + } + , bmuAjaxUploadSelector: + function(){ + var _r = this.selectorProp( 'bmuAjaxUploadSelector' ); + !( _r && _r.length ) && ( _r = this.selector().find( '.js_compAjaxUpload' ) ); + return _r; + } + + , ajaxUploadIns: + function(){ + var _r; + + this.bmuAjaxUploadSelector() + && this.bmuAjaxUploadSelector().length + && ( _r = JC.BaseMVC.getInstance( this.bmuAjaxUploadSelector(), JC.AjaxUpload ) ) + ; + + return _r; + } + + , bmuItemDelegate: function(){ return this.attrProp( 'bmuItemDelegate' ) || '>'; } + + , bmuItems: function(){ return this.bmuBoxSelector().find( this.bmuItemDelegate() ); } + + , bmuRemoveDelegate: function(){ return this.attrProp( 'bmuRemoveDelegate' ) || '.js_removeUploadItem'; } + , bmuRemoveItemParentSelector: function(){ return this.attrProp( 'bmuRemoveItemParentSelector' ) || '('; } + + , saveAjaxUploadHandler: + function(){ + this._ajaxUploadDoneHandler = this.windowProp( this.bmuAjaxUploadSelector(), 'cauUploadDoneCallback' ); + this._ajaxUploadErrorHandler = this.windowProp( this.bmuAjaxUploadSelector(), 'cauUploadErrorCallback' ); + } + , ajaxUploadDoneHandler: function(){ return this._ajaxUploadDoneHandler; } + , ajaxUploadErrorHandler: function(){ return this._ajaxUploadErrorHandler; } + + , injectAjaxHandler: + function(){ + var _p = this + , _prefix = MultiUpload.Model._handlerPrefix + , _doneHandlerName = _prefix + 'done' + this.id() + , _errorHandlerName = _prefix + 'error' + this.id() + , _cancelHandlerName = _prefix + 'cancel' + this.id() + ; + + this.setAjaxUplaodHandler( _doneHandlerName, 'cauUploadDoneCallback', + function( _json, _selector ){ + var _ajaxUpload = this; + + _p.ajaxUploadDoneHandler() + && _p.ajaxUploadDoneHandler().call( _ajaxUpload, _json, _selector ); + + _p.trigger( 'AjaxDone', [ _json, _selector, _ajaxUpload ] ); + + //JC.log( 'cauUploadDoneCallback', new Date().getTime() ); + }); + + this.setAjaxUplaodHandler( _errorHandlerName, 'cauBeforeUploadErrCallback', + function( ){ + JC.f.safeTimeout( function(){ _p.trigger( 'CheckItemLimit' ); }, _p, 'OnError', 10 ); + }); + + this.setAjaxUplaodHandler( _cancelHandlerName, 'cauCancelCallback', + function( ){ + JC.f.safeTimeout( function(){ _p.trigger( 'CheckItemLimit' ); }, _p, 'OnCancel', 10 ); + }); + } + + , setAjaxUplaodHandler: + function( _name, _attrName, _handler ){ + window[ _name ] = _handler; + this.bmuAjaxUploadSelector().attr( _attrName, _name ); + } + , bmuItemAddedCallback: function(){ return this.callbackProp('bmuItemAddedCallback'); } + , bmuItemDeletedCallback: function(){ return this.callbackProp('bmuItemDeletedCallback'); } + }); + + JC.f.extendObject( MultiUpload.View.prototype, { + init: + function(){ + //JC.log( 'MultiUpload.View.init:', new Date().getTime() ); + } + + , newItem: + function( _json, _tpl, _boxSelector ){ + JC.dir( _json ); + _tpl = JC.f.printf( _tpl, _json.data.url, _json.data.name ); + var _newItem = $( _tpl ); + + _newItem.appendTo( _boxSelector ); + + this.trigger( 'ItemAdded', [ _newItem, _json, _boxSelector ] ); + + JC.f.autoInit && JC.f.autoInit( _newItem ); + } + + , checkItemLimit: + function(){ + var _p = this + , _limit = this._model.bmuItemLimit() + , _items + , _ins = _p._model.ajaxUploadIns() + ; + //JC.log( '_limit', _limit ); + if( !_limit ) return; + + _items = _p._model.bmuItems(); + //if( !( _items && _items.length ) ) return; + _items = _items || []; + + if( !_ins ) return; + + if( _items.length >= _limit ){ + //JC.log( 'out limit', new Date().getTime() ); + _ins.disable(); + }else{ + //JC.log( 'in limit', new Date().getTime() ); + _ins.enable(); + } + } + + }); + /** + * Bizs.MultiUpload 初始化后触发的事件 + * @event inited + */ + /** + * ajax 上传完毕后触发的事件 + * @event AjaxDone + */ + /** + * 添加上传内容后触发的事件 + * @event ItemAdded + */ + /** + * 删除上传内容后触发的事件 + * @event ItemDeleted + */ + /** + * 修正按钮状态的事件 + * @event CheckItemLimit + */ + + $(document).ready( function(){ + MultiUpload.autoInit + && JC.f.safeTimeout( function(){ MultiUpload.init() }, null, 'MultiUploadInit', 2 ) + ; + }); + + return Bizs.MultiUpload; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiUpload/_demo/data/handler.jsonp.php b/bizs/MultiUpload/_demo/data/handler.jsonp.php new file mode 100755 index 000000000..893feb714 --- /dev/null +++ b/bizs/MultiUpload/_demo/data/handler.jsonp.php @@ -0,0 +1,32 @@ + 0, 'errmsg' => '', 'data' => array () ); + $callback = "callback"; + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + if( isset( $_REQUEST['errmsg'] ) ){ + $r['errmsg'] = $_REQUEST['errmsg']; + } + + if( isset( $_REQUEST['callback'] ) ){ + $callback = $_REQUEST['callback']; + } + + if( isset( $_REQUEST['callback_first'] ) ){ + $callback = $_REQUEST['callback_first']; + } + + $r['data']['name'] = 'test.jpg'; + $r['data']['url'] = './data/images/test.jpg'; + + $data = json_encode( $r ); + + echo << + window.parent && window.parent.$callback && window.parent.$callback( $data ); + +EOF; + +?> diff --git a/bizs/MultiUpload/_demo/data/handler.php b/bizs/MultiUpload/_demo/data/handler.php new file mode 100755 index 000000000..1d163ccdc --- /dev/null +++ b/bizs/MultiUpload/_demo/data/handler.php @@ -0,0 +1,19 @@ + 0, 'errmsg' => '', 'data' => array () ); + $callback = "callback"; + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + if( isset( $_REQUEST['errmsg'] ) ){ + $r['errmsg'] = $_REQUEST['errmsg']; + } + + $r['data']['name'] = 'test.jpg'; + $r['data']['url'] = './data/images/test.jpg'; + + $data = json_encode( $r ); + + echo $data; +?> diff --git a/bizs/MultiUpload/_demo/data/images/test.jpg b/bizs/MultiUpload/_demo/data/images/test.jpg new file mode 100755 index 000000000..43a9c9a6b Binary files /dev/null and b/bizs/MultiUpload/_demo/data/images/test.jpg differ diff --git a/bizs/MultiUpload/_demo/data/upload.php b/bizs/MultiUpload/_demo/data/upload.php new file mode 100755 index 000000000..f26f9c3ff --- /dev/null +++ b/bizs/MultiUpload/_demo/data/upload.php @@ -0,0 +1,77 @@ + 1, 'errmsg' => '', 'data' => array () ); + +$host = strtolower($_SERVER['HTTP_HOST']); +if( $host != 'git.me.btbtd.org' ){ + $r['errmsg'] = '出于安全原因, 上传功能已被禁止!'; + print_data_f(); +} + +if( !isset($_FILES[$fileKeyName]) ){ + $r['errmsg'] = '上传文件不能为空!'; + print_data_f(); +}else if ($_FILES[$fileKeyName]["error"] > 0){ + $r['errmsg'] = $_FILES[$fileKeyName]["error"]; + print_data_f(); +}else{ + + $path = "uploads/" . $_FILES[$fileKeyName]["name"]; + + $ar = explode('.', $_FILES[$fileKeyName]["name"]); + + if( count($ar) < 2 ){ + $r['errmsg'] = '文件格式错误!'; + print_data_f(); + } + + $ext = strtolower( $ar[ count($ar) - 1 ] ); + + $allowExt = array( 'jpg', 'jpeg', "png", "gif" ); + $find = false; + + for( $i = 0, $j = count( $allowExt ); $i < $j; $i++ ){ + if( $ext == strtolower( $allowExt[$i] ) ){ + $find = true; + break; + } + } + + if( !$find ){ + $r['errmsg'] = "不支持的图片类型($ext), 支持类型: " . implode(', ', $allowExt); + print_data_f(); + } + + move_uploaded_file($_FILES[$fileKeyName]["tmp_name"], $path); + + $r['data']['name'] = $_FILES[$fileKeyName]["name"]; + $r['data']['url'] = "./data/{$path}"; + $r['errorno'] = 0; + + print_data_f(); +} + + +if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; +} + +echo json_encode( $r ); + +function print_data_f(){ + global $r, $callback; + $text = json_encode( $r ); + echo $text; + exit(); +} + + +?> diff --git a/bizs/MultiUpload/_demo/data/uploads/.gitignore b/bizs/MultiUpload/_demo/data/uploads/.gitignore new file mode 100755 index 000000000..ecba9b89c --- /dev/null +++ b/bizs/MultiUpload/_demo/data/uploads/.gitignore @@ -0,0 +1,4 @@ +*.jpg +*.jpeg +*.gif +*.png diff --git a/bizs/MultiUpload/_demo/demo.error.html b/bizs/MultiUpload/_demo/demo.error.html new file mode 100755 index 000000000..090aab8ed --- /dev/null +++ b/bizs/MultiUpload/_demo/demo.error.html @@ -0,0 +1,144 @@ + + + + +Open JQuery Components Library - suches + + + + + + + + + +

    Bizs.MultiUpload - 示例

    + +
    +
    兼容所有版本 - 不带进度条
    +
    +
    +
    + + + .jpg, .jpeg, .png, .gif +
    +
    +
    +
    +
    +
    + +
    +
    version: 0.2+ - 带进度条
    +
    +
    +
    + + + .jpg, .jpeg, .png, .gif + (最多上传2个) +
    +
    +
    + +
    +
    + +
    + + + + + diff --git a/bizs/MultiUpload/_demo/demo.html b/bizs/MultiUpload/_demo/demo.html new file mode 100755 index 000000000..b6238adb7 --- /dev/null +++ b/bizs/MultiUpload/_demo/demo.html @@ -0,0 +1,331 @@ + + + + +Open JQuery Components Library - suches + + + + + + + + + +

    Bizs.MultiUpload - 示例

    + +
    +
    兼容所有版本 - 不带进度条
    +
    +
    +
    + + + .jpg, .jpeg, .png, .gif +
    +
    +
    +
    + +
    +
    version: 0.2+ - 带进度条
    +
    +
    +
    + + + .jpg, .jpeg, .png, .gif + (最多上传2个) +
    +
    +
    + +
    +
    + +
    +
    +
    + + + .jpg, .jpeg, .png, .gif + (最多上传2个) +
    +
    +
    + + + +
    +
    + + + +
    +
    + +
    +
    + + +
    +
    +
    + + + .jpg, .jpeg, .png, .gif + (最多上传5个) +
    +
    +
    + +
    +
    + +
    +
    +
    + + + .jpg, .jpeg, .png, .gif + (最多上传2个) +
    +
    +
    + + + +
    +
    + + + +
    +
    + +
    +
    + + +
    +
    +
    + + + .jpg, .jpeg, .png, .gif + (最多上传2个) + (真实上传实例, 仅对 host = git.me.btbtd.org 生效) +
    +
    +
    + +
    +
    + +
    + + + + + diff --git a/bizs/MultiUpload/_demo/index.php b/bizs/MultiUpload/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/MultiUpload/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiUpload/index.php b/bizs/MultiUpload/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/bizs/MultiUpload/index.php @@ -0,0 +1,4 @@ + diff --git a/bizs/MultiUpload/res/default/style.css b/bizs/MultiUpload/res/default/style.css new file mode 100755 index 000000000..8d1c8b69c --- /dev/null +++ b/bizs/MultiUpload/res/default/style.css @@ -0,0 +1 @@ + diff --git a/bizs/MultiselectPanel/MultiselectPanel.js b/bizs/MultiselectPanel/MultiselectPanel.js new file mode 100755 index 000000000..b8c6cefb8 --- /dev/null +++ b/bizs/MultiselectPanel/MultiselectPanel.js @@ -0,0 +1,503 @@ + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Panel' ], function(){ +/** + * 二级分类复选弹框 + * + *

    require: + * JC.BaseMVC + * , JC.Panel + *

    + * + *

    JC Project Site + * | API docs + * | demo link

    + * + *

    页面只要引用本脚本, 默认会自动处理 [input|button] class="js_bizMultiselectPanel"

    + * + *

    共用的 HTML attribute

    + *
    + *
    bmspUrl = url
    + *
    获取一级分类数据的URL
    + * + *
    bmspChildUrl = url
    + *
    获取子级分类数据的URL, "{0}" 代表父级ID
    + * + *
    bmspPopupHideButton = bool, default = false
    + *
    显示弹框的时候, 是否遮盖触发源标签
    + * + *
    bmspPanel = selector
    + *
    显示内容的弹框
    + * + *
    bmspPanelBoxSelector = selector
    + *
    弹框里显示分类内容的容器
    + * + *
    bmspTopTpl = script selector
    + *
    一级分类的脚本模板
    + * + *
    bmspChildTpl = script selector
    + *
    子级分类的脚本模板
    + * + *
    bmspOpenClass = css class name
    + *
    展开子级分类的样式
    + * + *
    bmspCloseClass = css class name
    + *
    关闭子级分类的样式
    + * + *
    bmspNoItemText = string
    + *
    没有选择内容时的提示文本
    + * + *
    bmspHasItemText = string
    + *
    有选择内容时的提示文本, "{0}" 代表选择的数量
    + * + *
    bmspSaveTopIdSelector = selector
    + *
    保存一级分类ID的选择器
    + *
    + * + *

    URL 回填的 HTML attribute

    + *
    + *
    bmspAutoFillTopKey = url arg name
    + *
    回填一级分类的URL识别name
    + * + *
    bmspAutoFillChildKey = url arg name
    + *
    回填子级分类的URL识别name
    + *
    + * + *

    数据 回填的 HTML attribute

    + *
    + *
    bmspDefaultFillData = json data name, window 变量域
    + *
    初始化的数据变量名
    +window.testData = { "parents": [ 1, 2, 3 ], "children": [4, 5, 6, 7, 8 ] };
    +
    + *
    + * + * @namespace window.Bizs + * @class MultiselectPanel + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-05-09 + * @author qiushaowei | 75 Team + */ + var _jdoc = $( document ), _jwin = $( window ); + + Bizs.MultiselectPanel = MultiselectPanel; + + function MultiselectPanel( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, MultiselectPanel ) ) + return JC.BaseMVC.getInstance( _selector, MultiselectPanel ); + + JC.BaseMVC.getInstance( _selector, MultiselectPanel, this ); + + this._model = new MultiselectPanel.Model( _selector ); + this._view = new MultiselectPanel.View( this._model ); + + this._init(); + + JC.log( MultiselectPanel.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 MultiselectPanel 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of MultiselectPanelInstance} + */ + MultiselectPanel.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_bizMultiselectPanel' ) ){ + _r.push( new MultiselectPanel( _selector ) ); + }else{ + _selector.find( 'input.js_bizMultiselectPanel, button.js_bizMultiselectPanel' ).each( function(){ + _r.push( new MultiselectPanel( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( MultiselectPanel ); + + JC.f.extendObject( MultiselectPanel.prototype, { + _beforeInit: + function(){ + //JC.log( 'MultiselectPanel _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + _p.trigger( 'init_top' ); + }); + + var _panel = new JC.Panel( _p._model.panel() ); + _p._model.panelIns( _panel ); + + _panel.on( 'close', function( _evt, _panel ){ _panel.hide(); return false; }); + + _panel.on( 'hide', function(){ + JC.f.safeTimeout( function(){ + _p.trigger( 'updateStatus' ); + }, _p.selector(), 'HIDE_PANEL', 50 ); + }); + + _panel.on( 'beforeshow', function(){ + JC.hideAllPanel(); + }); + + _panel.layout().on( 'click', function( _evt ){ + JC.f.safeTimeout( function(){ + _p.trigger( 'saveParentId' ); + }, _p.selector(), 'HIDE_PANEL', 50 ); + }); + + + if( _p._model.popupHideButton() ){ + _panel.offsetTop( -_p.selector().prop( 'offsetHeight' ) - 1 ); + } + + _p.selector().on( 'click', function( _evt ){ + _panel.show( _p.selector() ); + }); + + _p.on( 'init_top', function( _evt ){ + _p._model.initTop(); + _p.trigger( 'saveParentId' ); + }); + + _p.on( 'updateTop', function( _evt, _data, _d ){ + _p._view.buildTop( _data ); + _p.trigger( 'saveParentId' ); + }); + + _p.on( 'updateChild', function( _evt, _id, _data, _d ){ + _p._view.buildChild( _id, _data ); + var _pCk = _p._model.getCkItem( _id ); + _p._view.topCk( _id, _pCk.prop( 'checked' ) ); + }); + + _panel.layout().delegate( '.' + _p._model.openClass(), 'click', function( _evt ){ + var _sp = $( this ), _id = _sp.data('id'); + _sp.addClass( _p._model.closeClass() ).removeClass( _p._model.openClass() ); + _p._view.showChild( _id ); + _p.trigger( 'initChildBox', [ _id ] ); + }); + + _p.on( 'initChildBox', function( _evt, _id ){ + if( !_p._model.getChildBox( _id ).data( 'inited' ) ){ + _p._model.getChildBox( _id ).data( 'inited', true ); + _p._model.initChild( _id ); + } + }); + + _panel.layout().delegate( '.' + _p._model.closeClass(), 'click', function( _evt ){ + var _sp = $( this ), _id = _sp.data('id'); + _sp.addClass( _p._model.openClass() ).removeClass( _p._model.closeClass() ); + _p._view.hideChild( _id ); + }); + + _panel.layout().delegate( 'input.js_bmspTopCk', 'change', function( _evt ){ + var _sp = $( this ), _id = _sp.val(); + _p._view.topCk( _id, _sp.prop( 'checked' ) ); + + _sp.prop( 'checked' ) && _p.trigger( 'initChildBox', [ _id ] ); + }); + + _panel.layout().delegate( 'input.js_bmspChildCk', 'change', function( _evt ){ + var _sp = $( this ), _id = _sp.val(), _parentid = _sp.data( 'parentid' ); + _p._view.childCk( _parentid, _id ); + }); + + _p.on( 'updateStatus', function( _evt ){ + var _cked = _panel.find( 'input.js_bmspChildCk:checked' ); + if( _cked.length ){ + _p.selector().val( JC.f.printf( _p._model.hasItemText(), _cked.length ) ); + }else{ + _p.selector().val( _p._model.noItemText() ); + } + + _p.trigger( 'saveParentId' ); + }); + + _p.on( 'saveParentId', function( _evt ){ + var _idSelector = _p._model.saveTopIdSelector(); + if( _idSelector && _idSelector.length ){ + var _pCk = _p._model.panelIns().find( 'input.js_bmspTopCk:checked' ) + , _cCk = _p._model.panelIns().find( 'input.js_bmspChildCk:checked' ) + , _tmp = {} + , _r = [] + ; + + _pCk.each( function(){ + var _id = $( this ).val(); + + if( !( _id in _tmp ) ){ + _r.push( _id ); + } + _tmp[ _id ] = ''; + }); + + _cCk.each( function(){ + var _id = $( this ).data( 'parentid' ); + if( !( _id in _tmp ) ){ + _r.push( _id ); + } + _tmp[ _id ] = ''; + }); + + _idSelector.val( _r.join(',') ); + } + + }); + + } + + , _inited: + function(){ + //JC.log( 'MultiselectPanel _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + MultiselectPanel.Model._instanceName = 'JCMultiselectPanel'; + JC.f.extendObject( MultiselectPanel.Model.prototype, { + init: + function(){ + //JC.log( 'MultiselectPanel.Model.init:', new Date().getTime() ); + } + + , url: function(){ return this.attrProp( 'bmspUrl' ); } + , childUrl: function(){ return this.attrProp( 'bmspChildUrl' ); } + , popupHideButton: function(){ return this.boolProp( 'bmspPopupHideButton'); } + , panel: function(){ return this.selectorProp( 'bmspPanel'); } + , panelIns: + function( _setter ){ + typeof _setter != 'undefined' && ( this._panelIns = _setter ); + return this._panelIns; + } + , panelBoxSelector: function(){ return this.panelIns().find( this.attrProp( 'bmspPanelBoxSelector' ) || 'js_bmspPanelBox' ); } + , topTpl: function(){ return this.scriptTplProp( 'bmspTopTpl' ) } + , childTpl: function(){ return this.scriptTplProp( 'bmspChildTpl' ) } + , childBox: function( _selector ){ return _selector.find( '.js_bmspChildBox' ); } + + , openClass: function(){ return this.attrProp( 'bmspOpenClass' ); } + , closeClass: function(){ return this.attrProp( 'bmspCloseClass' ); } + + , openSelector: function(){ return this.selectorProp( '.' + this.openClass() ); } + , closeSelector: function(){ return this.selectorProp( '.' + this.closeClass() ); } + + , saveTopIdSelector: function(){ return this.selectorProp( 'bmspSaveTopIdSelector'); } + + , initTop: + function(){ + var _p = this, _data; + $.get( _p.url() ).done( function( _d ){ + _data = $.parseJSON( _d ); + _data + && !_data.errorno + && _data.data + && _p.trigger( 'updateTop', [ _data.data, _d ] ); + }); + } + + , initChild: + function( _id ){ + var _p = this, _data; + $.get( JC.f.printf( _p.childUrl(), _id ) ).done( function( _d ){ + _data = $.parseJSON( _d ); + _data + && !_data.errorno + && _data.data + && _p.trigger( 'updateChild', [ _id, _data.data, _d ] ); + }); + } + + , getChildBox: function( _id ){ + return this.panelIns().find( JC.f.printf( '.js_bmspChildBox[data-id={0}]', _id ) ); + } + + , getIcon: function( _id ){ + return this.panelIns().find( JC.f.printf( '.js_bmspIcon[data-id={0}]', _id ) ); + } + + , getCkItem: function( _id ){ + return this.panelIns().find( JC.f.printf( 'input.js_bmspCkItem[value={0}]', _id ) ); + } + + , noItemText: function(){ return this.attrProp( 'bmspNoItemText' ); } + , hasItemText: function(){ return this.attrProp( 'bmspHasItemText' ); } + + }); + + JC.f.extendObject( MultiselectPanel.View.prototype, { + init: + function(){ + //JC.log( 'MultiselectPanel.View.init:', new Date().getTime() ); + } + + , buildTop: + function( _data ){ + var _p = this + , _box = _p._model.panelBoxSelector() + , _tpl = _p._model.topTpl() + , _r = [] + ; + + $.each( _data, function( _ix, _item ){ + _r.push( JC.f.printf( _tpl, _item[0], _item[1] ) ); + }); + + _box.html( _r.join('') ); + } + + , buildChild: + function( _id, _data ){ + var _p = this + , _box = _p._model.getChildBox( _id ) + , _tpl = _p._model.childTpl() + , _r = [] + ; + + $.each( _data, function( _ix, _item ){ + _r.push( JC.f.printf( _tpl, _item[0], _item[1], _id ) ); + }); + + _box.html( _r.join('') ); + } + + , showChild: + function( _id ){ + this._model.getChildBox( _id ).show(); + } + + , hideChild: + function( _id ){ + this._model.getChildBox( _id ).hide(); + } + + , topCk: + function( _id, _checked ){ + var _childBox = this._model.getChildBox( _id ); + _childBox.find( 'input.js_bmspChildCk' ).prop( 'checked', _checked ); + } + + , childCk: + function( _parentid, _id ){ + var _p = this + , _childBox = this._model.getChildBox( _parentid ) + , _allCk = _p._model.getCkItem( _parentid ) + ; + if( _childBox.find( 'input.js_bmspChildCk:not(:checked)' ).length ){ + _allCk.prop( 'checked', false ); + }else{ + _allCk.prop( 'checked', true ); + } + } + }); + + _jwin.on( 'BMSP_AUTO_FILL_DEFAULT_DATA', function( _evt, _sp ){ + var _topKey, _childKey, _data; + if( !( _sp && _sp.length + && _sp.attr( 'bmspDefaultFillData' ) + && ( _data = window[ _sp.attr( 'bmspDefaultFillData' ) ] ) ) + && _data.parents + ){ + return; + } + _jwin.trigger( 'BMSP_AUTO_FILL', [ _sp, _data.parents, _data.children ] ); + }); + + _jwin.on( 'BMSP_AUTO_FILL_URL_DATA', function( _evt, _sp ){ + var _topKey, _childKey; + + if( !( _sp.attr( 'bmspAutoFillTopKey' ) + && ( _topKey = JC.f.getUrlParams( _sp.attr( 'bmspAutoFillTopKey' ) ) ) && _topKey.length ) + ){ + return; + } + _topKey = decodeURIComponent( _topKey ).split( ',' ); + _childKey = JC.f.getUrlParams( _sp.attr( 'bmspAutoFillChildKey' ) ); + + _jwin.trigger( 'BMSP_AUTO_FILL', [ _sp, _topKey, _childKey ] ); + }); + + _jwin.on( 'BMSP_AUTO_FILL', function( _evt, _sp, _topKey, _childKey ){ + if( !( _sp && _sp.length && _topKey && _topKey.length ) ) return; + var _cTopKey, _ins; + _ins = JC.BaseMVC.getInstance( _sp, Bizs.MultiselectPanel ) || new Bizs.MultiselectPanel( _sp ); + _cTopKey = _topKey.slice(); + _ins.on( 'updateTop', function(){ + if( _topKey.length ){ + var _id = _topKey.shift(); + _ins.trigger( 'initChildBox', [ _id ] ) + _ins._model.getIcon( _id ).trigger( 'click' ); + + _ins.on( 'updateChild', function(){ + if( _topKey.length ){ + _id = _topKey.shift(); + _ins.trigger( 'initChildBox', [ _id ] ); + _ins._model.getIcon( _id ).trigger( 'click' ); + }else if( _cTopKey.length ){ + if( _childKey && _childKey.length ){ + _childKey && _childKey.length + && $.each( _childKey, function( _ix, _item ){ + _ins._model.getCkItem( _item ).prop( 'checked', true ); + }); + + $.each( _cTopKey, function( _ix, _item ){ + _ins._view.childCk( _item ); + }); + + _ins.trigger( 'updateStatus' ); + } + _cTopKey = []; + } + }); + } + }); + + }); + + _jdoc.ready( function(){ + + //Bizs.MultiselectPanel.autoInit && Bizs.MultiselectPanel.init(); + + _jdoc.delegate( 'input.js_bizMultiselectPanel', 'click', function( _evt ){ + var _sp = $( this ), _ins; + if( !JC.BaseMVC.getInstance( _sp, Bizs.MultiselectPanel ) ){ + _ins = new Bizs.MultiselectPanel( _sp ); + _ins._model.panelIns().show( _sp ); + } + }); + + //return; + + $( 'input.js_bizMultiselectPanel' ).each( function(){ + var _sp = $( this ) + + if( _sp.attr( 'bmspDefaultFillData' ) && window[ _sp.attr( 'bmspDefaultFillData' ) ] ){ + _jwin.trigger( 'BMSP_AUTO_FILL_DEFAULT_DATA', [ _sp ] ); + }else if( _sp.attr( 'bmspAutoFillTopKey' ) ){ + _jwin.trigger( 'BMSP_AUTO_FILL_URL_DATA', [ _sp ] ); + } + }); + + }); + + + return Bizs.MultiselectPanel; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/MultiselectPanel/res/default/style.css b/bizs/MultiselectPanel/res/default/style.css new file mode 100755 index 000000000..352f9ba77 --- /dev/null +++ b/bizs/MultiselectPanel/res/default/style.css @@ -0,0 +1,23 @@ + /*check-select*/ +.js_bmspPanelBox{ border:0px solid #ddd; width:100%; height:279px; left:-1px; top:22px; background:#fff; z-index:1000; overflow:auto; padding:5px 10px;} +.js_bmspPanelBox dl{ clear:both; padding:3px 0;} +.js_bmspPanelBox dt{ float:left;} +.js_bmspIconOpen,.js_bmspIconClose{ display:inline-block; width:9px; height:9px; cursor:pointer; vertical-align:middle; background:url(http://p7.qhimg.com/d/inn/7318fb3f/open.png);} +.js_bmspIconClose{ background:url(http://p4.qhimg.com/d/inn/fe78aa78/colos.png);} +.js_bmspPanelBox dd{overflow:hidden; zoom:1; padding:5px 0 0 8px;} +.js_bmspPanelBox ul{ border:1px solid #ccc; overflow:hidden; zoom:1; padding:5px 10px; display: none;} +.js_bmspPanelBox li{ float:left; padding-right:12px; white-space:nowrap; list-style-type: none; } + +.unselectable { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + + /* + Introduced in IE 10. + See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/ + */ + -ms-user-select: none; + user-select: none; +} + diff --git a/bizs/TaskViewer/TaskViewer.js b/bizs/TaskViewer/TaskViewer.js new file mode 100755 index 000000000..e066b791f --- /dev/null +++ b/bizs/TaskViewer/TaskViewer.js @@ -0,0 +1,395 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ + /** + * TaskViewer 日历任务展示面板 + * + *

    require: + * jQuery + * , JC.common + * , JC.BaseMVC + *

    + * + *

    JC Project Site + * | API docs + * | demo link

    + * + *

    页面只要引用本文件, 默认会自动初始化class="js_COMPTaskViewer"下的日期

    + * + * + *

    可用的 HTML attribute

    + *
    + *
    taskselecteddates = selector
    + *
    指定选定的日期标签
    + *
    taskdeleteddates = selector
    + *
    指定删除的日期标签
    + *
    tasknewaddeddates = selector
    + *
    指定新增的日期标签
    + *
    + * + * @namespace window.Bizs + * @class TaskViewer + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version 0.1 2014-04-17 + * @author zuojing | 75 Team + */ + window.Bizs.TaskViewer = TaskViewer; + JC.f.addAutoInit && JC.f.addAutoInit( TaskViewer ); + + function TaskViewer( _selector ){ + _selector && (_selector = $(_selector) ); + + if (TaskViewer.getInstance(_selector)) + return TaskViewer.getInstance(_selector); + + TaskViewer.getInstance(_selector, this); + + this._model = new TaskViewer.Model(_selector); + this._view = new TaskViewer.View(this._model); + this._init(); + } + + /** + * 获取或设置 TaskViewer 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {TaskViewerInstance} + */ + TaskViewer.getInstance = function ( _selector, _setter ) { + if( typeof _selector == 'string' && !/已选天数' + + '
    ' + + '星期' + + '日期' + + '
    ' + + '', + style = ''; + + for ( i = 0; i < l; i++ ) { + + if ( i % 7 === 0 || i % 7 === 6 ) { + style = 'weekend'; + } else { + style = ''; + } + + tpl += '' + cnWeek.charAt(i % 7) + ''; + } + + tpl += '' + return tpl; + }, + + buildMonthTpl: function () { + var p = this, + key, + d, + i, + month, + year, + tempD, + maxDay, + day, + placeholder = '', + tpl = ''; + + for ( key in p.allMonths ) { + d = JC.f.dateDetect(p.allMonths[key]); + year = d.getFullYear(); + month = d.getMonth(); + maxDay = JC.f.maxDayOfMonth(d); + placeholder = ''; + day = new Date(year, month, 1).getDay(); + while(day--) { + placeholder += ' ' + if( day <= 0 ) break; + } + tpl += ' ' + year + '年' + (month + 1) + '月' +'' + placeholder; + for ( i = 1; i <= maxDay; i++) { + tempD = new Date(year, month, i); + tpl += '' + i +'' + } + tpl += ''; + } + + return '' + tpl + '' + }, + + allDays: {}, + + allMonths: {} + + }); + + JC.f.extendObject( TaskViewer.View.prototype, { + init: function () { + return this; + }, + + layout: function () { + var p = this, + tpl = '', + l ; + + tpl = tpl + p._model.buildMonthTpl(); + p._model.selector().append(tpl); + l = p.fixLayout(); + p._model.selector().find('.COMP_task_view>thead').append(p._model.buildHeaderTpl(l)); + + p.setSelected(); + }, + + fixLayout: function () { + var p = this, + trs = p.selector().find('.COMP_task_view>tbody>tr'), + max = 0, + len = []; + + trs.each(function () { + len.push($(this).find('td').length); + }); + + + max = Math.max.apply(Math, len); + + trs.each( function (ix) { + var sp = $(this), + l = sp.find('td').length, + i = 0, + placeholder = ''; + + if ( max > l ) { + i = max - l; + while (i--) { + placeholder += ''; + } + sp.append(placeholder); + } + + }); + + return max - 2; + }, + + setSelected: function () { + var p = this, + allDays = p._model.allDays, + selector = p._model.selector(), + pnt = selector.find('.COMP_task_view>tbody'), + tds = pnt.find('.date'), + trs = pnt.find('tr'), + key; + + $.each(allDays, function (ix, item) { + var selected = 0, + added = 0, + deleted = 0, + update = 0, + defaut = 0, + text = '', + $tr = pnt.find('tr.' + ix); + + $.each(item, function (subix, subitem) { + var start = JC.f.dateDetect(subitem['start']).getTime(), + end = JC.f.dateDetect(subitem['end']).getTime(), + style = subitem['type']; + + $tr.find('.date').each ( function () { + var sp = $(this), + + d = JC.f.dateDetect(sp.data('date')).getTime(); + + if (d >= start && d <= end) { + sp.addClass(style); + } + + }); + + selected = $tr.find('.selected').length; + added = $tr.find('.added').length; + deleted = $tr.find('.deleted').length; + defaut = selected + deleted; + update = defaut + added - deleted; + + if (added || deleted) { + text = '' + update + '天' + + '' + defaut + '天'; + } else { + text = '' + selected + '天'; + } + + $tr.find('td').eq(0).html(text); + + }); + + }); + + } + } ); + + $(document).ready( function () { + var _insAr = 0; + + TaskViewer.autoInit && ( _insAr = TaskViewer.init() ); + + }); + + + return Bizs.TaskViewer; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/bizs/TaskViewer/res/default/style.css b/bizs/TaskViewer/res/default/style.css new file mode 100755 index 000000000..9aa6175e8 --- /dev/null +++ b/bizs/TaskViewer/res/default/style.css @@ -0,0 +1,132 @@ +.COMP_task_view{ + width: 100%; + border-spacing: 0; + border-collapse: collapse; + border: 0; + width: 100%; + background:#fff; +} +.COMP_task_view th, +.COMP_task_view td{ + font-size: 12px; + font-weight: normal; + text-align: center !important; + padding: 5px !important; + border: 1px solid #e4e4e4; + color: #999; + vertical-align:middle !important; + line-height:1 !important; +} +.COMP_task_view td{ + height: 29px; +} + +.COMP_task_view_slash{ + border-top:30px #FFF solid;/*上边框宽度等于表格第一行行高*/ + width:0px;/*让容器宽度为0*/ + height:0px;/*让容器高度为0*/ + border-left:80px #f2f2f2 solid;/*左边框宽度等于表格第一行第一格宽度*/ + position:relative;/*让里面的两个子容器绝对定位*/ +} +.COMP_task_view_counter{ + background: #e2eee2; + color: #333; +} +.COMP_task_view_date{ + background: #f2f2f2; +} +.COMP_task_view_slash b{ + font-weight: normal; + top: -25px; + left: -30px; +} + +.COMP_task_view_slash em{ + top:-17px; + left:-75px; + font-style: normal; +} +.COMP_task_view_slash b, +.COMP_task_view_slash em{ + position: absolute; +} +.COMP_task_view .selected{ + color: #fff; + background: #029502; + border-color: #7ab57a; +} +.COMP_task_view .added{ + color: #fff; + background: #fe7575; + border-color: #f0b0b0; +} +.COMP_task_view .deleted{ + color: #fff; + background: #84c884; + border-color: #b8d3b8; + text-decoration: line-through; +} +.COMP_task_view_counter span{ + display: block; +} +.COMP_task_view .defaultDays{ + + text-decoration: line-through; + +} +.COMP_task_view .updatedDays{ + color: #F00; +} +td.COMP_task_view_date, +td.COMP_task_view_counter, +.COMP_task_view .weekend{ + color: #333; +} + +.COMP_task_view_counter span{ + display: block; +} + +.TaskViewerLabel { + font-size: 12px; + margin: 8px auto; +} + +.TaskViewerLabel button{ + border: none; + background: transparent; + width: 16px; + margin-right: 4px; + height: 12px; + margin-bottom: 4px; + vertical-align: middle; +} + +.TaskViewerLabel .lselected { + color: #029502; +} + +.TaskViewerLabel .lselected button { + background: #029502; +} + +.TaskViewerLabel label { + margin-right: 5px; +} + +.TaskViewerLabel .ladded { + color: #fe7575; +} + +.TaskViewerLabel .ladded button { + background: #fe7575; +} + +.TaskViewerLabel .ldeleted{ + color: #84c884; + text-decoration: line-through; +} +.TaskViewerLabel .ldeleted button { + background: #84c884; +} + diff --git a/common.js b/common.js old mode 100644 new mode 100755 index 1a75258b0..3052a1b4c --- a/common.js +++ b/common.js @@ -1,831 +1,1673 @@ -; -/** - * 全局函数 - * @namespace - * @class window - * @static - */ -!String.prototype.trim && ( String.prototype.trim = function(){ return $.trim( this ); } ); -/** - * 如果 console 不可用, 则生成一个模拟的 console 对象 - */ -if( !window.console ) window.console = { log:function(){ - window.status = [].slice.apply( arguments ).join(' '); -}}; -/** - * 声明主要命名空间, 方便迁移 - */ -window.JC = window.JC || { - log: function(){ JC.debug && window.console && console.log( sliceArgs( arguments ).join(' ') ); } -}; -window.Bizs = window.Bizs || {}; -/** - * 全局 css z-index 控制属性 - * @property ZINDEX_COUNT - * @type int - * @default 50001 - * @static - */ -window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001; -/** - * 把函数的参数转为数组 - * @method sliceArgs - * @param {arguments} args - * @return Array - * @static - */ -function sliceArgs( _arg ){ - var _r = [], _i, _len; - for( _i = 0, _len = _arg.length; _i < _len; _i++){ - _r.push( _arg[_i] ); - } - return _r; -} - /** - * 按格式输出字符串 - * @method printf - * @static - * @param {string} _str - * @return string - * @example - * printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 ); - * //return asdfasdf000sdfasdf1111 - */ -function printf( _str ){ - for(var i = 1, _len = arguments.length; i < _len; i++){ - _str = _str.replace( new RegExp('\\{'+( i - 1 )+'\\}', 'g'), arguments[i] ); - } - return _str; -} -/** - * 判断URL中是否有某个get参数 - * @method hasUrlParam - * @static - * @param {string} _url - * @param {string} _key - * @return bool - * @example - * var bool = hasUrlParam( 'getkey' ); - */ -function hasUrlParam( _url, _key ){ - var _r = false; - if( !_key ){ _key = _url; _url = location.href; } - if( /\?/.test( _url ) ){ - _url = _url.split( '?' ); _url = _url[ _url.length - 1 ]; - _url = _url.split('&'); - for( var i = 0, j = _url.length; i < j; i++ ){ - if( _url[i].split('=')[0].toLowerCase() == _key.toLowerCase() ){ _r = true; break; }; - } - } - return _r; -} -//这个方法已经废弃, 请使用 hasUrlParam -function has_url_param(){ return hasUrlParam.apply( null, sliceArgs( arguments ) ); } -/** - * 添加URL参数 - *
    require: delUrlParam - * @method addUrlParams - * @static - * @param {string} _url - * @param {object} _params - * @return string - * @example - var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } ); - */ -function addUrlParams( _url, _params ){ - var sharp = ''; - !_params && ( _params = _url, _url = location.href ); - _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] ); - for( var k in _params ){ - _url = delUrlParam(_url, k); - _url.indexOf('?') > -1 - ? _url += '&' + k +'=' + _params[k] - : _url += '?' + k +'=' + _params[k]; - } - sharp && ( _url += '#' + sharp ); - _url = _url.replace(/\?\&/g, '?' ); - return _url; - -} -//这个方法已经废弃, 请使用 addUrlParams -function add_url_params(){ return addUrlParams.apply( null, sliceArgs( arguments ) ); } -/** - * 取URL参数的值 - * @method getUrlParam - * @static - * @param {string} _url - * @param {string} _key - * @return string - * @example - var defaultTag = getUrlParam(location.href, 'tag'); - */ -function getUrlParam( _url, _key ){ - var result = '', paramAr, i, items; - !_key && ( _key = _url, _url = location.href ); - _url.indexOf('#') > -1 && ( _url = _url.split('#')[0] ); - if( _url.indexOf('?') > -1 ){ - paramAr = _url.split('?')[1].split('&'); - for( i = 0; i < paramAr.length; i++ ){ - items = paramAr[i].split('='); - items[0] = items[0].replace(/^\s+|\s+$/g, ''); - if( items[0].toLowerCase() == _key.toLowerCase() ){ - result = items[1]; - break; - } - } - } - return result; -} -//这个方法已经废弃, 请使用 getUrlParam -function get_url_param(){ return getUrlParam.apply( null, sliceArgs( arguments ) ); } -/** - * 取URL参数的值, 这个方法返回数组 - *
    与 getUrlParam 的区别是可以获取 checkbox 的所有值 - * @method getUrlParams - * @static - * @param {string} _url - * @param {string} _key - * @return Array - * @example - var params = getUrlParams(location.href, 'tag'); - */ -function getUrlParams( _url, _key ){ - var _r = [], _params, i, j, _items; - !_key && ( _key = _url, _url = location.href ); - _url = _url.replace(/[\?]+/g, '?').split('?'); - if( _url.length > 1 ){ - _url = _url[1]; - _params = _url.split('&'); - if( _params.length ){ - for( i = 0, j = _params.length; i < j; i++ ){ - _items = _params[i].split('='); - if( _items[0].trim() == _key ){ - _r.push( _items[1] || '' ); +;(function(define, _win) { 'use strict'; define( 'JC.common', [], function(){ + window.JWIN = window.JWIN || $( window ); + window.JDOC = window.JDOC || $( document ); + /** + * 如果 console 不可用, 生成一个模拟的 console 对象 + */ + !window.console && ( window.console = { + log: function(){ window.status = sliceArgs( arguments ).join(' '); } + }); + !console.dir && ( + console.dir = function(){} + ); + !console.error && ( + console.error = function(){} + ); + /** + * 声明主要命名空间, 方便迁移 + */ + window.JC = window.JC || {}; + JC.log = function(){ JC.debug && console.log( sliceArgs( arguments ).join(' ') ); }; + JC.dir = function(){ + JC.debug && $.each( sliceArgs( arguments ), function( _ix, _item ){ console.dir( _item )} ); + }; + JC.error = function(){ + JC.debug && $.each( sliceArgs( arguments ), function( _ix, _item ){ console.error( _item )} ); + }; + JC.clear = function(){ + console.clear && console.clear(); + }; + + JC.PATH = JC.PATH || scriptPath(); + + window.Bizs = window.Bizs || {}; + /** + * JC.f 是 JC.common 的别名 + *
    具体使用请见 JC.common

    + * @class JC.f + * @static + */ + /** + * JC 组件通用静态方法和属性 ( JC.common, 别名: JC.f ) + *
    所有 JC 组件都会依赖这个静态类 + *

    require: jQuery

    + *

    JC Project Site + * | API docs + * @class JC.common + * @static + * @version dev 0.3 2014-12-09 + * @version dev 0.2 2013-11-06 + * @version dev 0.1 2013-07-04 + * @author qiushaowei | 360 75 Team + */ + JC.common = JC.f = { + "addUrlParams": addUrlParams + , "cloneDate": cloneDate + , "dateDetect": dateDetect + , "delUrlParam": delUrlParam + , "delUrlParams": delUrlParams + , "easyEffect": easyEffect + , "filterXSS": filterXSS + , "formatISODate": formatISODate + , "funcName": funcName + , "getJqParent": getJqParent + + , "getUrlParam": getUrlParam + , "getUrlParams": getUrlParams + , "hasUrlParam": hasUrlParam + , 'urlHostName': urlHostName + , "httpRequire": httpRequire + , "isSameDay": isSameDay + , "isSameWeek": isSameWeek + , "isSameMonth": isSameMonth + , "isSameSeason": isSameSeason + , "isSameYear": isSameYear + , "weekOfYear": weekOfYear + , "seasonOfYear": seasonOfYear + , "dayOfWeek": dayOfWeek + , "dayOfSeason": dayOfSeason + , "jcAutoInitComps": autoInit + + , "autoInit": autoInit + , "addAutoInit": addAutoInit + /** + * 保存需要自动识别的组件 + * @property _AUTO_INIT_DATA + * @type Object + * @protected + */ + , "_AUTO_INIT_DATA": {} + + , "maxDayOfMonth": maxDayOfMonth + , "mousewheelEvent": mousewheelEvent + , "padChar": padChar + , "parentSelector": parentSelector + , "parseBool": parseBool + , "parseFinance": parseFinance + , "parseISODate": parseISODate + , "parseDate": parseDate + , "printf": printf + , "printKey": printKey + , "cloneObject": cloneObject + + , "pureDate": pureDate + , "reloadPage": reloadPage + , "removeUrlSharp": removeUrlSharp + , "relativePath": relativePath + , "scriptContent": scriptContent + , "scriptPath": scriptPath + , "sliceArgs": sliceArgs + , "urlDetect": urlDetect + , "moneyFormat": moneyFormat + , "dateFormat": dateFormat + , "extendObject": extendObject + , "safeTimeout": safeTimeout + , "encoder": encoder + , "fixPath": fixPath + , "arrayId": arrayId + , "docSize": docSize + , "winSize": winSize + , "gid": gid + + /** + * 判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数 + */ + , "backward": + function( _setter ){ + if( window.JC_BACKWARD || _setter ){ + for( var k in JC.common ){ + if( k == 'backward' ) continue; + window[ k ] = window[ k ] || JC.common[ k ]; + } + } + } + , "has_url_param": hasUrlParam + , "add_url_params": addUrlParams + , "get_url_param": getUrlParam + , "del_url_param": delUrlParam + , "reload_page": reloadPage + , "parse_finance_num": parseFinance + , "pad_char_f": padChar + , "script_path_f": scriptPath + , "ts": function(){ return new Date().getTime(); } + }; + JC.f.backward(); + /** + * jquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法 + */ + !String.prototype.trim && ( String.prototype.trim = function(){ return $.trim( this ); } ); + /** + * 兼容 低版本 ie Array 的 indexOf 方法 + */ + !Array.prototype.indexOf + && ( Array.prototype.indexOf = + function( _v ){ + var _r = -1; + $.each( this, function( _ix, _item ){ + if( _item == _v ){ + _r = _ix; + return false; + } + }); + return _r; + }); + + !Array.prototype.first + && ( Array.prototype.first = + function(){ + var _r; + this.length && ( _r = this[0] ); + return _r; + }); + + !Array.prototype.last + && ( Array.prototype.last = + function(){ + var _r; + this.length && ( _r = this[ this.length - 1] ); + return _r; + }); + + /** + * 全局 css z-index 控制属性 + *
    注意: 这个变量是 window.ZINDEX_COUNT + * @property ZINDEX_COUNT + * @type int + * @default 50001 + * @static + */ + window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001; + + function fixPath( _url ){ + if( /\\/.test( _url ) ){ + _url = _url.replace( /[\\]+/g, '\\' ); + }else{ + _url = _url.replace( /[\/]+/g, '/' ); + } + return _url; + } + /** + * 一维数组去重 + * @method arrayId + * @param {Array} _ar + * @return Array + * @static + */ + function arrayId( _ar ){ + var _r = [], _k = {}; + + for( var i = 0, j = _ar.length; i < j; i++ ){ + if( !(_ar[i] in _k) ){ + _r.push( _ar[i] ); + _k[ _ar[i] ] = _ar[i]; + } + } + + return _r; + } + /** + * 生成全局唯一ID + * @method gid + * @return string + * @static + */ + function gid(){ + return 'jc_gid_' + JC.f.ts() + '_' + (JC.GID_COUNT++); + } + JC.GID_COUNT = 1; + + /** + * 把函数的参数转为数组 + * @method sliceArgs + * @param {arguments} args + * @return Array + * @static + */ + function sliceArgs( _arg ){ + var _r = [], _i, _len; + for( _i = 0, _len = _arg.length; _i < _len; _i++){ + _r.push( _arg[_i] ); + } + return _r; + } + /** + * 取 URL 的 host name + * @method urlHostName + * @param {string} _url + * @return string + * @static + */ + function urlHostName( _url ){ + var _r = '', _url = _url || location.href; + if( /\:\/\//.test( _url ) ){ + _url.replace( /^.*?\:\/\/([^\/]+)/, function( $0, $1 ){ + _r = $1; + }); + } + return _r; + } + /** + * 把 URL 相对路径 转换为 绝对路径 + * @method relativePath + * @param {string} _path + * @param {string} _url + * @return string + * @static + */ + function relativePath( _path, _url ){ + _url = _url || document.URL; + _url = _url.replace(/^.*?\:\/\/[^\/]+/, "").replace(/[^\/]+$/, ""); + if(!_path){return _url;} + if(!/\/$/.test(_url)){_url += "/";} + + if(/(^\.\.\/|^\.\/)/.test(_path)){ + var Re = new RegExp("^\\.\\.\\/"), iCount = 0; + while(Re.exec(_path)!=null){ + _path = _path.replace(Re, ""); + iCount++; + } + for(var i=0; i -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] ); + for( var k in _params ){ + _url = delUrlParam(_url, k); + _url.indexOf('?') > -1 + ? _url += '&' + k +'=' + _params[k] + : _url += '?' + k +'=' + _params[k]; + } + sharp && ( _url += '#' + sharp ); + _url = filterXSS( _url.replace(/\?\&/g, '?' ) ); + return _url; + + } + /** + * xss 过滤函数 + * @method filterXSS + * @param {string} _s + * @return string + * @static + */ + function filterXSS( _s ){ + _s && ( + _s = _s + .replace( //g, '>' ) + ); + return _s; + } + /** + * 取URL参数的值 + *
    require: filterXSS + * @method getUrlParam + * @param {string} _url + * @param {string} _key + * @return string + * @static + * @example + var defaultTag = getUrlParam(location.href, 'tag'); + */ + function getUrlParam( _url, _key ){ + var _r = '', _ar, i, _items; + !_key && ( _key = _url, _url = location.href ); + _url.indexOf('#') > -1 && ( _url = _url.split('#')[0] ); + if( _url.indexOf('?') > -1 ){ + _ar = _url.split('?')[1].split('&'); + for( i = 0; i < _ar.length; i++ ){ + _items = _ar[i].split('='); + _items[0] = decodeURIComponent( _items[0] || '' ).replace(/^\s+|\s+$/g, ''); + if( _items[0].toLowerCase() == _key.toLowerCase() ){ + _r = filterXSS( _items[1] || '' ); + break; + } + } + } + return _r; + } + /** + * 取URL参数的值, 这个方法返回数组 + *
    与 getUrlParam 的区别是可以获取 checkbox 的所有值 + *
    require: filterXSS + * @method getUrlParams + * @param {string} _url + * @param {string} _key + * @return Array + * @static + * @example + var params = getUrlParams(location.href, 'tag'); + */ + function getUrlParams( _url, _key ){ + var _r = [], _params, i, j, _items; + !_key && ( _key = _url, _url = location.href ); + _url = _url.replace(/[\?]+/g, '?').split('?'); + if( _url.length > 1 ){ + _url = _url[1]; + _params = _url.split('&'); + if( _params.length ){ + for( i = 0, j = _params.length; i < j; i++ ){ + _items = _params[i].split('='); + _items[0] = decodeURIComponent( _items[0] ) || ''; + if( _items[0].trim() == _key ){ + _r.push( filterXSS( _items[1] || '' ) ); + } } } } + return _r; + } + /** + * 删除URL参数 + *
    require: filterXSS + * @method delUrlParam + * @param {string} _url + * @param {string} _key + * @return string + * @static + * @example + var url = delUrlParam( location.href, 'tag' ); + */ + function delUrlParam( _url, _key ){ + var sharp = '', params, tmpParams = [], i, item; + !_key && ( _key = _url, _url = location.href ); + _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] ); + if( _url.indexOf('?') > -1 ){ + params = _url.split('?')[1].split('&'); + _url = _url.split('?')[0]; + for( i = 0; i < params.length; i++ ){ + var items = params[i].split('='); + items[0] = items[0].replace(/^\s+|\s+$/g, ''); + if( items[0].toLowerCase() == _key.toLowerCase() ) continue; + tmpParams.push( items.join('=') ) + } + _url += '?' + tmpParams.join('&'); + } + sharp && ( _url += '#' + sharp ); + _url = filterXSS( _url ); + return _url; + } + /** + * 批量删除URL参数 + *
    require: delUrlParam + * @method delUrlParams + * @param {string} _url + * @param {Array} _keys + * @return string + * @static + * @example + var url = delUrlParam( location.href, [ 'k1', 'k2' ] ); + */ + function delUrlParams( _url, _keys ){ + !_keys && ( _keys = _url, _url = location.href ); + for( var k in _keys ) _url = delUrlParam( _url, _keys[ k ] ); + return _url; } - return _r; -} -/** - * 删除URL参数 - * @method delUrlParam - * @static - * @param {string} _url - * @param {string} _key - * @return string - * @example - var url = delUrlParam( location.href, 'tag' ); - */ -function delUrlParam( _url, _key ){ - var sharp = '', params, tmpParams = [], i, item; - !_key && ( _key = _url, _url = location.href ); - _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] ); - if( _url.indexOf('?') > -1 ){ - params = _url.split('?')[1].split('&'); - _url = _url.split('?')[0]; - for( i = 0; i < params.length; i++ ){ - items = params[i].split('='); - items[0] = items[0].replace(/^\s+|\s+$/g, ''); - if( items[0].toLowerCase() == _key.toLowerCase() ) continue; - tmpParams.push( items.join('=') ) - } - _url += '?' + tmpParams.join('&'); - } - sharp && ( _url += '#' + sharp ); - return _url; -} -//这个方法已经废弃, 请使用 delUrlParam -function del_url_param(){ return delUrlParam.apply( null, sliceArgs( arguments ) ); } -/** - * 提示需要 HTTP 环境 - * @method httpRequire - * @static - * @param {string} _msg 要提示的文字, 默认 "本示例需要HTTP环境' - * @return bool 如果是HTTP环境返回true, 否则返回false - */ -function httpRequire( _msg ){ - _msg = _msg || '本示例需要HTTP环境'; - if( /file\:|\\/.test( location.href ) ){ - alert( _msg ); - return false; - } - return true; -} -/** - * 删除 URL 的锚点 - *
    require: addUrlParams - * @method removeUrlSharp - * @static - * @param {string} $url - * @param {bool} $nornd 是否不添加随机参数 - * @return string - */ -function removeUrlSharp($url, $nornd){ - var url = $url.replace(/\#[\s\S]*/, ''); - !$nornd && (url = addUrlParams( url, { "rnd": new Date().getTime() } ) ); - return url; -} -/** - * 重载页面 - *
    require: removeUrlSharp - *
    require: addUrlParams - * @method reloadPage - * @static - * @param {string} $url - * @param {bool} $nornd - * @param {int} $delayms - */ -function reloadPage( _url, _nornd, _delayMs ){ - _delayMs = _delayMs || 0; - setTimeout( function(){ + /** + * 提示需要 HTTP 环境 + * @method httpRequire + * @static + * @param {string} _msg 要提示的文字, 默认 "本示例需要HTTP环境' + * @return bool 如果是HTTP环境返回true, 否则返回false + */ + function httpRequire( _msg ){ + _msg = _msg || '本示例需要HTTP环境'; + if( /file\:|\\/.test( location.href ) ){ + alert( _msg ); + return false; + } + return true; + } + /** + * 删除 URL 的锚点 + *
    require: addUrlParams, filterXSS + * @method removeUrlSharp + * @static + * @param {string} _url + * @param {bool} _nornd 是否不添加随机参数 + * @param {string} _rndName + * @return string + */ + function removeUrlSharp( _url, _nornd, _rndName ){ + !_url && ( _url = location.href ); + _url = _url.replace(/\#[\s\S]*/, ''); + _rndName = _rndName || 'rnd'; + var _rndO; + !_nornd && ( _rndO = {} + , _rndO[ _rndName ] = new Date().getTime() + , _url = addUrlParams( _url, _rndO ) + ); + _url = filterXSS( _url ); + return _url; + } + /** + * 重载页面 + *
    require: removeUrlSharp, addUrlParams, filterXSS + * @method reloadPage + * @static + * @param {string} _url + * @param {bool} _nornd + * @param {int} _delayms + */ + function reloadPage( _url, _nornd, _delayMs ){ + _delayMs = _delayMs || 0; + _url = removeUrlSharp( _url || location.href, _nornd ); !_nornd && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - location.href = _url; - }, _delayMs); -} -//这个方法已经废弃, 请使用 reloadPage -function reload_page(){ return reloadPage.apply( null, sliceArgs( arguments ) ); } -/** - * 取小数点的N位 - *
    JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题 - * @method parseFinance - * @static - * @param {number} _i - * @param {int} _dot, default = 2 - * @return number - */ -function parseFinance( _i, _dot ){ - _i = parseFloat( _i ) || 0; - _dot = _dot || 2; - if( _i && _dot ) { - _i = parseFloat( _i.toFixed( _dot ) ); - } - return _i; -} -//这个方法已经废弃, 请使用 parseFinance -function parse_finance_num(){ return parseFinance.apply( null, sliceArgs( arguments ) ); } -/** - * js 附加字串函数 - * @method padChar - * @static - * @param {string} _str - * @param {intl} _len - * @param {string} _char - * @return string - */ -function padChar( _str, _len, _char ){ - _len = _len || 2; _char = _char || "0"; - _str += ''; - if( _str.length >_str ) return _str; - _str = new Array( _len + 1 ).join( _char ) + _str - return _str.slice( _str.length - _len ); -} -//这个方法已经废弃, 请使用 padChar -function pad_char_f( _str, _len, _char ){ return padChar.apply( null, sliceArgs( arguments ) ); } -/** - * 格式化日期为 YYYY-mm-dd 格式 - *
    require: pad\_char\_f - * @method formatISODate - * @static - * @param {date} _date 要格式化日期的日期对象 - * @param {string|undefined} _split 定义年月日的分隔符, 默认为 '-' - * @return string - * - */ -function formatISODate( _date, _split ){ - _date = _date || new Date(); typeof _split == 'undefined' && ( _split = '-' ); - return [ _date.getFullYear(), padChar( _date.getMonth() + 1 ), padChar( _date.getDate() ) ].join(_split); -} -/** - * 从 ISODate 字符串解析日期对象 - * @method parseISODate - * @static - * @param {string} _datestr - * @return date - */ -function parseISODate( _datestr ){ - if( !_datestr ) return; - _datestr = _datestr.replace( /[^\d]+/g, ''); - var _r; - if( _datestr.length === 8 ){ - _r = new Date( _datestr.slice( 0, 4 ) - , parseInt( _datestr.slice( 4, 6 ), 10 ) - 1 - , parseInt( _datestr.slice( 6 ), 10 ) ); - } - return _r; -} -/** - * 获取不带 时分秒的 日期对象 - * @method pureDate - * @param {Date} _d 可选参数, 如果为空 = new Date - * @return Date - */ -function pureDate( _d ){ - var _r; - _d = _d || new Date(); - _r = new Date( _d.getFullYear(), _d.getMonth(), _d.getDate() ); - return _r; -} -/** -* 克隆日期对象 -* @method cloneDate -* @static -* @param {Date} _date 需要克隆的日期 -* @return {Date} 需要克隆的日期对象 -*/ -function cloneDate( _date ){ var d = new Date(); d.setTime( _date.getTime() ); return d; } -/** - * 判断两个日期是否为同一天 - * @method isSameDay - * @static - * @param {Date} _d1 需要判断的日期1 - * @param {Date} _d2 需要判断的日期2 - * @return {bool} - */ -function isSameDay( _d1, _d2 ){ - return [_d1.getFullYear(), _d1.getMonth(), _d1.getDate()].join() === [ - _d2.getFullYear(), _d2.getMonth(), _d2.getDate()].join() -} -/** - * 判断两个日期是否为同一月份 - * @method isSameMonth - * @static - * @param {Date} _d1 需要判断的日期1 - * @param {Date} _d2 需要判断的日期2 - * @return {bool} - */ -function isSameMonth( _d1, _d2 ){ - return [_d1.getFullYear(), _d1.getMonth()].join() === [ - _d2.getFullYear(), _d2.getMonth()].join() -} -/** - * 取得一个月份中最大的一天 - * @method maxDayOfMonth - * @static - * @param {Date} _date - * @return {int} 月份中最大的一天 - */ -function maxDayOfMonth( _date ){ - var _r, _d = new Date( _date.getFullYear(), _date.getMonth() + 1 ); - _d.setDate( _d.getDate() - 1 ); - _r = _d.getDate(); - return _r; -} -/** - * 取当前脚本标签的 src路径 - * @method scriptPath - * @static - * @return {string} 脚本所在目录的完整路径 - */ -function scriptPath(){ - var _sc = document.getElementsByTagName('script'), _sc = _sc[ _sc.length - 1 ], _path = _sc.getAttribute('src'); - if( /\//.test( _path ) ){ _path = _path.split('/'); _path.pop(); _path = _path.join('/') + '/'; } - else if( /\\/.test( _path ) ){ _path = _path.split('\\'); _path.pop(); _path = _path.join('\\') + '/'; } - return _path; -} -//这个方法已经废弃, 请使用 scriptPath -function script_path_f(){ return scriptPath(); } -/** - * 缓动函数, 动画效果为按时间缓动 - *
    这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval - * @method easyEffect - * @static - * @param {function} _cb 缓动运动时的回调 - * @param {number} _maxVal 缓动的最大值, default = 200 - * @param {number} _startVal 缓动的起始值, default = 0 - * @param {number} _duration 缓动的总时间, 单位毫秒, default = 200 - * @param {number} _stepMs 缓动的间隔, 单位毫秒, default = 2 - * @return interval - * @example - $(document).ready(function(){ - window.js_output = $('span.js_output'); - window.ls = []; - window.EFF_INTERVAL = easyEffect( effectcallback, 100); - }); + _url = filterXSS( _url ); - function effectcallback( _stepval, _done ){ - js_output.html( _stepval ); - ls.push( _stepval ); - - !_done && js_output.html( _stepval ); - _done && js_output.html( _stepval + '
    ' + ls.join() ); - } - */ -function easyEffect( _cb, _maxVal, _startVal, _duration, _stepMs ){ - var _beginDate = new Date(), _timepass - , _maxVal = _maxVal || 200 - , _startVal = _startVal || 0 - , _maxVal = _maxVal - _startVal - , _tmp = 0 - , _done - , _duration = _duration || 200 - , _stepMs = _stepMs || 2 - ; - //JC.log( '_maxVal:', _maxVal, '_startVal:', _startVal, '_duration:', _duration, '_stepMs:', _stepMs ); - - var _interval = setInterval( - function(){ - _timepass = new Date() - _beginDate; - _tmp = _timepass / _duration * _maxVal; - _tmp; - if( _tmp >= _maxVal ){ - _tmp = _maxVal; - _done = true; - clearInterval( _interval ); - } - _cb && _cb( _tmp + _startVal, _done ); - }, _stepMs ); - - return _interval; -} -/** - * 把输入值转换为布尔值 - * @method parseBool - * @param {*} _input - * @return bool - * @static - */ -function parseBool( _input ){ - if( typeof _input == 'string' ){ - _input = _input.replace( /[\s]/g, '' ).toLowerCase(); - if( _input && ( _input == 'false' - || _input == '0' - || _input == 'null' - || _input == 'undefined' - )) _input = false; - else if( _input ) _input = true; - } - return !!_input; -} -/** - * 判断是否支持 CSS position: fixed - * @property $.support.isFixed - * @type bool - * @require jquery - * @static - */ -window.jQuery && jQuery.support && (jQuery.support.isFixed = (function ($){ - try{ - var r, contain = $( document.documentElement ), - el = $( "

    x
    " ).appendTo( contain ), - originalHeight = contain[ 0 ].style.height, - w = window; + setTimeout( function(){ + location.href = _url; + }, _delayMs); + return _url; + } + /** + * 取小数点的N位 + *
    JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题 + * @method parseFinance + * @static + * @param {number} _i + * @param {int} _dot default = 2 + * @return number + */ + function parseFinance( _i, _dot ){ + _i = parseFloat( _i ) || 0; + typeof _dot == 'undefined' && ( _dot = 2 ); + _i && ( _i = parseFloat( _i.toFixed( _dot ) ) ); + return _i; + } + /** + * js 附加字串函数 + * @method padChar + * @static + * @param {string} _str + * @param {intl} _len + * @param {string} _char + * @return string + */ + function padChar( _str, _len, _char ){ + _len = _len || 2; _char = _char || "0"; + _str += ''; + if( _str.length >= _len ) return _str; + _str = new Array( _len + 1 ).join( _char ) + _str + return _str.slice( _str.length - _len ); + } + /** + * 格式化日期为 YYYY-mm-dd 格式 + *
    require: pad\_char\_f + * @method formatISODate + * @static + * @param {date} _date 要格式化日期的日期对象 + * @param {string|undefined} _split 定义年月日的分隔符, 默认为 '-' + * @return string + * + */ + function formatISODate( _date, _split ){ + _date = _date || new Date(); typeof _split == 'undefined' && ( _split = '-' ); + return [ _date.getFullYear(), padChar( _date.getMonth() + 1 ), padChar( _date.getDate() ) ].join(_split); + } + /** + * 从 ISODate 字符串解析日期对象 + * @method parseISODate + * @static + * @param {string} _datestr + * @return date + */ + function parseISODate( _datestr ){ + if( !_datestr ) return; + _datestr = _datestr.replace( /[^\d]+/g, ''); + var _r; + if( _datestr.length === 8 ){ + _r = new Date( _datestr.slice( 0, 4 ) + , parseInt( _datestr.slice( 4, 6 ), 10 ) - 1 + , parseInt( _datestr.slice( 6 ), 10 ) ); + }else if( _datestr.length === 6 ){ + _r = new Date( _datestr.slice( 0, 4 ) + , parseInt( _datestr.slice( 4, 6 ), 10 ) - 1 + , 1 ); + } + + return _r; + } + /** + * 从日期字符串解析日期对象 + *
    兼容 JC.Calendar 日期格式 + * @method parseDate + * @param {date} _date + * @param {selector} _selector 如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化 + * @param {boolean} _forceISO 是否强制转换为ISO日期 + * @return {date|null} + * @static + */ + function parseDate( _date, _selector, _forceISO ){ + if( !_date ) return null; + var _parse = parseISODate; + + _selector && !_forceISO + && ( _selector = $( _selector ) ).length + && _selector.attr( 'dateParse' ) + && ( _parse = window[ _selector.attr( 'dateParse' ) ] || _parse ) + ; + _date = _parse( _date ); + _date && _date.start && ( _date = _date.start ); + return _date; + } + + /** + * 获取不带 时分秒的 日期对象 + * @method pureDate + * @param {Date} _d 可选参数, 如果为空 = new Date + * @return Date + * @static + */ + function pureDate( _d ){ + var _r; + _d = _d || new Date(); + _r = new Date( _d.getFullYear(), _d.getMonth(), _d.getDate() ); + return _r; + } + /** + * 克隆日期对象 + * @method cloneDate + * @static + * @param {Date} _date 需要克隆的日期 + * @return {Date} + */ + function cloneDate( _date ){ var d = new Date(); d.setTime( _date.getTime() ); return d; } + /** + * 判断两个日期是否为同一天 + * @method isSameDay + * @static + * @param {Date} _d1 需要判断的日期1 + * @param {Date} _d2 需要判断的日期2 + * @return {bool} + */ + function isSameDay( _d1, _d2 ){ + return [_d1.getFullYear(), _d1.getMonth(), _d1.getDate()].join() === [ + _d2.getFullYear(), _d2.getMonth(), _d2.getDate()].join() + } + /** + * 判断两个日期是否为同一月份 + * @method isSameMonth + * @static + * @param {Date} _d1 需要判断的日期1 + * @param {Date} _d2 需要判断的日期2 + * @return {bool} + */ + function isSameMonth( _d1, _d2 ){ + return [_d1.getFullYear(), _d1.getMonth()].join() === [ + _d2.getFullYear(), _d2.getMonth()].join() + } + + /** + * 判断两个日期是否为同一季度 + * @method isSameWeek + * @static + * @param {Date} _d1 需要判断的日期1 + * @param {Date} _d2 需要判断的日期2 + * @return {bool} + */ + function isSameWeek( _d1, _d2 ){ + var _weeks = [], + _r = false, + i = 0, + l; + + _weeks = weekOfYear(_d1.getFullYear()); + + _d1 = _d1.getTime(); + _d2 = _d2.getTime(); + + for ( i = 0, l = _weeks.length; i < l; i++ ) { + if ( (_d1 >= _weeks[i].start && _d1 <= _weeks[i].end) + && ( _d2 >= _weeks[i].start && _d2 <= _weeks[i].end ) + ) { + console.log(i, _d1, _weeks[i]); + return true; + } + } + + return _r; + } + + /** + * 判断两个日期是否为同一季度 + * @method isSameSeason + * @static + * @param {Date} _d1 需要判断的日期1 + * @param {Date} _d2 需要判断的日期2 + * @return {bool} + */ + function isSameSeason( _d1, _d2 ){ + var _seasons = [], + _r = false, + i = 0, + l ; + + if ( !isSameYear( _d1, _d2 ) ) { + return false; + } + + _seasons = seasonOfYear( _d1.getFullYear() ); + _d1 = _d1.getTime(); + _d2 = _d2.getTime(); - contain.height( screen.height * 2 + "px" ); - - w.scrollTo( 0, 100 ); - - r = el[ 0 ].getBoundingClientRect().top === 100; - - contain.height( originalHeight ); - - el.remove(); - - w.scrollTo( 0, 0 ); - - return r; - }catch(ex){} -})(jQuery)); -/** - * 绑定或清除 mousewheel 事件 - * @method mousewheelEvent - * @param {function} _cb - * @param {bool} _detach - * @static - */ -function mousewheelEvent( _cb, _detach ){ - var _evt = (/Firefox/i.test(navigator.userAgent)) - ? "DOMMouseScroll" - : "mousewheel" - ; - document.attachEvent && ( _evt = 'on' + _evt ); - - if( _detach ){ - document.detachEvent && document.detachEvent( _evt, _cb ) - document.removeEventListener && document.removeEventListener( _evt, _cb ); - }else{ - document.attachEvent && document.attachEvent( _evt, _cb ) - document.addEventListener && document.addEventListener( _evt, _cb ); - } -} -/** - * 获取 selector 的指定父级标签 - * @method getJqParent - * @param {selector} _selector - * @param {selector} _filter - * @return selector - * @require jquery - * @static - */ -function getJqParent( _selector, _filter ){ - _selector = $(_selector); - var _r; - - if( _filter ){ - while( (_selector = _selector.parent()).length ){ - if( _selector.is( _filter ) ){ - _r = _selector; - break; + for (i = 0, l = _seasons.length ; i < l; i++ ) { + if ( (_d1 >= _seasons[i].start && _d1 <= _seasons[i].end) + && ( _d2 >= _seasons[i].start && _d2 <= _seasons[i].end ) ) { + return true; + } + } + + return _r; + } + + /** + * 判断两个日期是否为同一年 + * @method isSameYear + * @static + * @param {Date} _d1 需要判断的日期1 + * @param {Date} _d2 需要判断的日期2 + * @return {bool} + */ + function isSameYear( _d1, _d2 ) { + return _d1.getFullYear() === _d2.getFullYear(); + } + + /** + * 取一年中所有的星期, 及其开始结束日期 + * @method weekOfYear + * @static + * @param {int} _year + * @param {int} _dayOffset 每周的默认开始为周几, 默认0(周一) + * @return Array + */ + function weekOfYear( _year, _dayOffset ){ + var _r = [], _tmp, _count = 1, _dayOffset = _dayOffset || 0 + , _year = parseInt( _year, 10 ) + , _d = new Date( _year, 0, 1 ); + /** + * 元旦开始的第一个星期一开始的一周为政治经济上的第一周 + */ + _d.getDay() > 1 && _d.setDate( _d.getDate() - _d.getDay() + 7 ); + + _d.getDay() === 0 && _d.setDate( _d.getDate() + 1 ); + + _dayOffset > 0 && ( _dayOffset = (new Date( 2000, 1, 2 ) - new Date( 2000, 1, 1 )) * _dayOffset ); + + while( _d.getFullYear() <= _year ){ + _tmp = { 'week': _count++, 'start': null, 'end': null }; + _tmp.start = _d.getTime() + _dayOffset; + //_tmp.start = formatISODate(_d); + _d.setDate( _d.getDate() + 6 ); + _tmp.end = _d.getTime() + _dayOffset; + //_tmp.end = formatISODate(_d); + _d.setDate( _d.getDate() + 1 ); + if( _d.getFullYear() > _year ) { + _d = new Date( _d.getFullYear(), 0, 1 ); + if( _d.getDay() < 2 ) break; + } + _r.push( _tmp ); + } + return _r; + } + /** + * 取一年中所有的季度, 及其开始结束日期 + * @method seasonOfYear + * @static + * @param {int} _year + * @return Array + */ + function seasonOfYear( _year ){ + var _r = [] + , _year = parseInt( _year, 10 ) + ; + + _r.push( + { + start: pureDate( new Date( _year, 0, 1 ) ) + , end: pureDate( new Date( _year, 2, 31 ) ) + , season: 1 + }, { + start: pureDate( new Date( _year, 3, 1 ) ) + , end: pureDate( new Date( _year, 5, 30 ) ) + , season: 2 + }, { + start: pureDate( new Date( _year, 6, 1 ) ) + , end: pureDate( new Date( _year, 8, 30 ) ) + , season: 3 + }, { + start: pureDate( new Date( _year, 9, 1 ) ) + , end: pureDate( new Date( _year, 11, 31 ) ) + , season: 4 + } + ); + + + return _r; + } + + /** + * 取某一天所在星期的开始结束日期,以及第几个星期 + * @method dayOfWeek + * @static + * @param {iso date} _date + * @param {int} _dayOffset + * @return Object + */ + function dayOfWeek( _date, _dayOffset ) { + var r = {}, + weeks = JC.f.weekOfYear(_date.getFullYear(), _dayOffset), + i = 0, + l = weeks.length, + t = _date.getTime(), + start = JC.f.pureDate( new Date() ), + end = JC.f.pureDate( new Date() ); + + for (i; i = weeks[i].start && t <= weeks[i].end) { + start.setTime(weeks[i].start); + end.setTime(weeks[i].end); + r.start = start; + r.end = end; + r.w = i + 1 + return r; } } - }else{ - _r = _selector.parent(); - } - - return _r; -} -/** - * 扩展 jquery 选择器 - *
    扩展起始字符的 '/' 符号为 jquery 父节点选择器 - *
    扩展起始字符的 '|' 符号为 jquery 子节点选择器 - *
    扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent ) - * @method parentSelector - * @param {selector} _item - * @param {String} _selector - * @param {selector} _finder - * @return selector - * @require jquery - * @static - */ -function parentSelector( _item, _selector, _finder ){ - _item && ( _item = $( _item ) ); - if( /\,/.test( _selector ) ){ - var _multiSelector = [], _tmp; - _selector = _selector.split(','); - $.each( _selector, function( _ix, _subSelector ){ - _subSelector = _subSelector.trim(); - _tmp = parentSelector( _item, _subSelector, _finder ); - _tmp && _tmp.length - && ( - ( _tmp.each( function(){ _multiSelector.push( $(this) ) } ) ) - ); - }); - return $( _multiSelector ); } - var _pntChildRe = /^([\/]+)/, _childRe = /^([\|]+)/, _pntRe = /^([<\(]+)/; - if( _pntChildRe.test( _selector ) ){ - _selector = _selector.replace( _pntChildRe, function( $0, $1 ){ - for( var i = 0, j = $1.length; i < j; i++ ){ - _item = _item.parent(); + + /** + * 取某一天所在季度的开始结束日期,以及第几个Q + * @method dayOfSeason + * @static + * @param {iso date} _date + * @return Object + */ + + function dayOfSeason(_date) { + var year = _date.getFullYear(), + q = JC.f.seasonOfYear(year), + i, + r = {}, + tmp, + d = _date.getTime(); + + for (i = 0; i < 4; i++) { + if (d >= q[i].start.getTime() && d <= q[i].end.getTime()) { + r.start = q[i].start; + r.end = q[i].end; + r.q = i + 1; + return r; } - _finder = _item; - return ''; - }); - _selector = _selector.trim(); - return _selector ? _finder.find( _selector ) : _finder; - }else if( _childRe.test( _selector ) ){ - _selector = _selector.replace( _childRe, function( $0, $1 ){ - for( var i = 1, j = $1.length; i < j; i++ ){ - _item = _item.parent(); + } + + } + + /** + * 取得一个月份中最大的一天 + * @method maxDayOfMonth + * @static + * @param {Date} _date + * @return {int} 月份中最大的一天 + */ + function maxDayOfMonth( _date ){ + var _r, _d = new Date( _date.getFullYear(), _date.getMonth() + 1 ); + _d.setDate( _d.getDate() - 1 ); + _r = _d.getDate(); + return _r; + } + /** + * 取当前脚本标签的 src路径 + * @method scriptPath + * @static + * @return {string} 脚本所在目录的完整路径 + */ + function scriptPath(){ + var _sc = document.getElementsByTagName('script'), _sc = _sc[ _sc.length - 1 ], _path = _sc.getAttribute('src'); + if( /\//.test( _path ) ){ _path = _path.split('/'); _path.pop(); _path = _path.join('/') + '/'; } + else if( /\\/.test( _path ) ){ _path = _path.split('\\'); _path.pop(); _path = _path.join('\\') + '/'; } + return _path; + } + /** + * 缓动函数, 动画效果为按时间缓动 + *
    这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval + * @method easyEffect + * @static + * @param {function} _cb 缓动运动时的回调 + * @param {number} _maxVal 缓动的最大值, default = 200 + * @param {number} _startVal 缓动的起始值, default = 0 + * @param {number} _duration 缓动的总时间, 单位毫秒, default = 200 + * @param {number} _stepMs 缓动的间隔, 单位毫秒, default = 2 + * @return interval + * @example + $(document).ready(function(){ + window.js_output = $('span.js_output'); + window.ls = []; + window.EFF_INTERVAL = easyEffect( effectcallback, 100); + }); + + function effectcallback( _stepval, _done ){ + js_output.html( _stepval ); + ls.push( _stepval ); + + !_done && js_output.html( _stepval ); + _done && js_output.html( _stepval + '
    ' + ls.join() ); } - _finder = _item; - return ''; - }); - _selector = _selector.trim(); - return _selector ? _finder.find( _selector ) : _finder; - }else if( _pntRe.test( _selector ) ){ - _selector = _selector.replace( _pntRe, '' ).trim(); - if( _selector ){ - if( /[\s]/.test( _selector ) ){ - var _r; - _selector.replace( /^([^\s]+)([\s\S]+)/, function( $0, $1, $2 ){ - _r = getJqParent( _item, $1 ).find( $2.trim() ); - }); - return _r || _selector; - }else{ - return getJqParent( _item, _selector ); + */ + function easyEffect( _cb, _maxVal, _startVal, _duration, _stepMs ){ + var _beginDate = new Date(), _timepass + , _maxVal = _maxVal || 200 + , _startVal = _startVal || 0 + , _maxVal = _maxVal - _startVal + , _tmp = 0 + , _done + , _duration = _duration || 200 + , _stepMs = _stepMs || 2 + ; + //JC.log( '_maxVal:', _maxVal, '_startVal:', _startVal, '_duration:', _duration, '_stepMs:', _stepMs ); + + var _interval = setInterval( + function(){ + _timepass = new Date() - _beginDate; + _tmp = _timepass / _duration * _maxVal; + _tmp; + if( _tmp >= _maxVal ){ + _tmp = _maxVal; + _done = true; + clearInterval( _interval ); + } + + _cb && _cb( _tmp + _startVal, _done, _timepass, _duration, _stepMs, _startVal, _maxVal ); + }, _stepMs ); + + return _interval; + } + /** + * 把输入值转换为布尔值 + * @method parseBool + * @param {*} _input + * @return bool + * @static + */ + function parseBool( _input ){ + if( typeof _input == 'string' ){ + _input = _input.replace( /[\s]/g, '' ).toLowerCase(); + if( _input && ( _input == 'false' + || _input == '0' + || _input == 'null' + || _input == 'undefined' + )) _input = false; + else if( _input ) _input = true; + } + return !!_input; + } + /** + * 绑定或清除 mousewheel 事件 + * @method mousewheelEvent + * @param {function} _cb + * @param {bool} _detach + * @param {selector} _selector default = document + * @static + */ + function mousewheelEvent( _cb, _detach, _selector ){ + _selector = _selector || document; + var _evt = (/Firefox/i.test(navigator.userAgent)) + ? "DOMMouseScroll" + : "mousewheel" + ; + _selector.attachEvent && ( _evt = 'on' + _evt ); + + if( _detach ){ + _selector.detachEvent && document.detachEvent( _evt, _cb ) + _selector.removeEventListener && document.removeEventListener( _evt, _cb ); + }else{ + _selector.attachEvent && document.attachEvent( _evt, _cb ) + _selector.addEventListener && document.addEventListener( _evt, _cb ); + } + } + /** + * 获取 selector 的指定父级标签 + * @method getJqParent + * @param {selector} _selector + * @param {selector} _filter + * @return selector + * @require jquery + * @static + */ + function getJqParent( _selector, _filter ){ + _selector = $(_selector); + var _r; + + if( _filter ){ + while( (_selector = _selector.parent()).length ){ + if( _selector.is( _filter ) ){ + _r = _selector; + break; + } } }else{ - return _item.parent(); - } - }else{ - return _finder ? _finder.find( _selector ) : jQuery( _selector ); - } -} -/** - * 获取脚本模板的内容 - * @method scriptContent - * @param {selector} _selector - * @return string - * @static - */ -function scriptContent( _selector ){ - var _r = ''; - _selector - && ( _selector = $( _selector ) ).length - && ( _r = _selector.html().trim().replace( /[\r\n]/g, '') ) - ; - return _r; -} -/** - * 取函数名 ( 匿名函数返回空 ) - * @method funcName - * @param {function} _func - * @return string - * @static - */ -function funcName(_func){ - var _re = /^function\s+([^()]+)[\s\S]*/ - , _r = '' - , _fStr = _func.toString(); - //JC.log( _fStr ); - _re.test( _fStr ) && ( _r = _fStr.replace( _re, '$1' ) ); - return _r.trim(); -} -/** - * 动态添加内容时, 初始化可识别的组件 - *
    - *
    目前会自动识别的组件,
    - *
    - * Bizs.CommonModify, JC.Panel, JC.Dialog - *
    自动识别的组件不用显式调用 jcAutoInitComps 去识别可识别的组件 - *
    - * - *
    - *
    可识别的组件
    - *
    - * JC.AutoSelect, JC.Calendar, JC.AutoChecked, JC.AjaxUpload - *
    Bizs.DisableLogic, Bizs.FormLogic - *
    - * - * @method jcAutoInitComps - * @param {selector} _selector - * @static - */ -function jcAutoInitComps( _selector ){ - _selector = $( _selector || document ); - - if( !( _selector && _selector.length && window.JC ) ) return; - /** - * 联动下拉框 - */ - JC.AutoSelect && JC.AutoSelect( _selector ); - /** - * 日历组件 - */ - JC.Calendar && JC.Calendar.initTrigger( _selector ); - /** - * 全选反选 - */ - JC.AutoChecked && JC.AutoChecked( _selector ); - /** - * Ajax 上传 - */ - JC.AjaxUpload && JC.AjaxUpload.init( _selector ); - /** - * Placeholder 占位符 - */ - JC.Placeholder && JC.Placeholder.init( _selector ); - - if( !window.Bizs ) return; - /** - * disable / enable - */ - Bizs.DisableLogic && Bizs.DisableLogic.init( _selector ); - /** - * 表单提交逻辑 - */ - Bizs.FormLogic && Bizs.FormLogic.init( _selector ); -} -/** - * URL 占位符识别功能 - * @method urlDetect - * @param {String} _url 如果 起始字符为 URL, 那么 URL 将祝为本页的URL - * @return string - * @static - * @example - * urlDetect( '?test' ); //output: ?test - * - * urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2 - * urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2 - * urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2 - */ -function urlDetect( _url ){ - _url = _url || ''; - var _r = _url, _tmp, i, j; - if( /^URL/.test( _url ) ){ - _tmp = _url.replace( /^URL/, '' ).replace( /[\s]*,[\s]*/g, ',' ).trim().split(','); - _url = location.href; - var _d = {}, _concat = []; - if( _tmp.length ){ - for( i = 0, j = _tmp.length; i < j; i ++ ){ - /\&/.test( _tmp[i] ) - ? ( _concat = _concat.concat( _tmp[i].split('&') ) ) - : ( _concat = _concat.concat( _tmp[i] ) ) - ; + _r = _selector.parent(); + } + + return _r; + } + /** + * 扩展 jquery 选择器 + *
    扩展起始字符的 '/' 符号为 jquery 父节点选择器 + *
    扩展起始字符的 '|' 符号为 jquery 子节点选择器 + *
    扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent ) + * @method parentSelector + * @param {selector} _item + * @param {String} _selector + * @param {selector} _finder + * @return selector + * @require jquery + * @static + */ + function parentSelector( _item, _selector, _finder ){ + _item && ( _item = $( _item ) ); + if( /\,/.test( _selector ) ){ + var _multiSelector = [], _tmp; + _selector = _selector.split(','); + $.each( _selector, function( _ix, _subSelector ){ + _subSelector = _subSelector.trim(); + _tmp = parentSelector( _item, _subSelector, _finder ); + _tmp && _tmp.length + && ( + ( _tmp.each( function(){ _multiSelector.push( $(this) ) } ) ) + ); + }); + return $( _multiSelector ); + } + var _pntChildRe = /^([\/]+)/, _childRe = /^([\|]+)/, _pntRe = /^([<\(]+)/; + if( _pntChildRe.test( _selector ) ){ + _selector = _selector.replace( _pntChildRe, function( $0, $1 ){ + for( var i = 0, j = $1.length; i < j; i++ ){ + _item = _item.parent(); + } + _finder = _item; + return ''; + }); + _selector = _selector.trim(); + return _selector ? _finder.find( _selector ) : _finder; + }else if( _childRe.test( _selector ) ){ + _selector = _selector.replace( _childRe, function( $0, $1 ){ + for( var i = 1, j = $1.length; i < j; i++ ){ + _item = _item.parent(); + } + _finder = _item; + return ''; + }); + _selector = _selector.trim(); + return _selector ? _finder.find( _selector ) : _finder; + }else if( _pntRe.test( _selector ) ){ + _selector = _selector.replace( _pntRe, '' ).trim(); + if( _selector ){ + if( /[\s]/.test( _selector ) ){ + var _r; + _selector.replace( /^([^\s]+)([\s\S]+)/, function( $0, $1, $2 ){ + _r = getJqParent( _item, $1 ).find( $2.trim() ); + }); + return _r || _selector; + }else{ + return getJqParent( _item, _selector ); + } + }else{ + return _item.parent(); } - _tmp = _concat; - } - for( i = 0, j = _tmp.length; i < j; i++ ){ - _items = _tmp[i].replace(/[\s]+/g, '').split( '=' ); - if( !_items[0] ) continue; - _d[ _items[0] ] = _items[1] || ''; - } - _url = addUrlParams( _url, _d ); - _r = _url; - } - return _r; -} -/** - * 日期占位符识别功能 - * @method dateDetect - * @param {String} _dateStr 如果 起始字符为 NOW, 那么将视为当前日期 - * @return {date|null} - * @static - * @example - * dateDetect( 'now' ); //2014-10-02 - * dateDetect( 'now,3d' ); //2013-10-05 - * dateDetect( 'now,-3d' ); //2013-09-29 - * dateDetect( 'now,2w' ); //2013-10-16 - * dateDetect( 'now,-2m' ); //2013-08-02 - * dateDetect( 'now,4y' ); //2017-10-02 - * - * dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10 - */ -function dateDetect( _dateStr ){ - var _r = null - , _re = /^now/i - , _d, _ar, _item - ; - if( _dateStr && typeof _dateStr == 'string' ){ - if( _re.test( _dateStr ) ){ - _d = new Date(); - _dateStr = _dateStr.replace( _re, '' ).replace(/[\s]+/g, ''); - _ar = _dateStr.split(','); - - var _red = /d$/i - , _rew = /w$/i - , _rem = /m$/i - , _rey = /y$/i + }else{ + return _finder ? _finder.find( _selector ) : jQuery( _selector ); + } + } + /** + * 获取脚本模板的内容 + * @method scriptContent + * @param {selector} _selector + * @return string + * @static + */ + function scriptContent( _selector ){ + var _r = ''; + _selector + && ( _selector = $( _selector ) ).length + && ( _r = _selector.html().trim().replace( /[\r\n]/g, '') ) + ; + return _r; + } + /** + * 取函数名 ( 匿名函数返回空 ) + * @method funcName + * @param {function} _func + * @return string + * @static + */ + function funcName(_func){ + var _re = /^function\s+([^()]+)[\s\S]*/ + , _r = '' + , _fStr = _func.toString(); + //JC.log( _fStr ); + _re.test( _fStr ) && ( _r = _fStr.replace( _re, '$1' ) ); + return _r.trim(); + } + /** + * 执行自动识别的组件 + * @method autoInit + * @param {selector} _selector + * @static + */ + function autoInit( _selector ){ + _selector = $( _selector || document ); + if( !( _selector && _selector.length && window.JC ) ) return; + if( !( JC.f && JC.f._AUTO_INIT_DATA ) ) return; + + $.each( JC.f._AUTO_INIT_DATA, function( _k, _class ){ + if( !_class ) return; + _class.init ? _class.init( _selector ) : _class( _selector ); + }); + return JC.f; + } + /** + * 添加需要自动识别的组件 + * @method addAutoInit + * @param {class} _class + * @static + * @example + * JC.f.addAutoInit( JC.Calendar ); + */ + function addAutoInit( _class ){ + _class + && JC.f._AUTO_INIT_DATA + && ( JC.f._AUTO_INIT_DATA[ + _class && _class.Model && _class.Model._instanceName + ? _class.Model._instanceName + : _class.toString() + ] = _class ) ; - for( var i = 0, j = _ar.length; i < j; i++ ){ - _item = _ar[i] || ''; - if( !_item ) continue; - _item = _item.replace( /[^\-\ddwmy]+/gi, '' ); - - if( _red.test( _item ) ){ - _item = parseInt( _item.replace( _red, '' ), 10 ); - _item && _d.setDate( _d.getDate() + _item ); - }else if( _rew.test( _item ) ){ - _item = parseInt( _item.replace( _rew, '' ), 10 ); - _item && _d.setDate( _d.getDate() + _item * 7 ); - }else if( _rem.test( _item ) ){ - _item = parseInt( _item.replace( _rem, '' ), 10 ); - _item && _d.setMonth( _d.getMonth() + _item ); - }else if( _rey.test( _item ) ){ - _item = parseInt( _item.replace( _rey, '' ), 10 ); - _item && _d.setFullYear( _d.getFullYear() + _item ); + return JC.f; + } + /** + * jcAutoInitComps 不久后将被清除 + * 请使用 JC.f.autoInit 和 JC.f.addAutoInit + */ + function jcAutoInitComps( _selector ){ + _selector = $( _selector || document ); + + if( !( _selector && _selector.length && window.JC ) ) return; + /** + * 联动下拉框 + */ + JC.AutoSelect && JC.AutoSelect( _selector ); + /** + * 日历组件 + */ + JC.Calendar && JC.Calendar.initTrigger( _selector ); + /** + * 双日历组件 + */ + JC.DCalendar && JC.DCalendar.init && JC.DCalendar.init( _selector ); + /** + * 全选反选 + */ + JC.AutoChecked && JC.AutoChecked( _selector ); + /** + * Ajax 上传 + */ + JC.AjaxUpload && JC.AjaxUpload.init( _selector ); + /** + * 占位符 + */ + JC.Placeholder && JC.Placeholder.init( _selector ); + /** + * 表格冻结 + */ + JC.TableFreeze && JC.TableFreeze.init( _selector ); + /** + * 拖曳 + */ + JC.Drag && JC.Drag.init( _selector ); + /** + * 图片裁切 + */ + JC.ImageCutter && JC.ImageCutter.init( _selector ); + + JC.Tab && JC.Tab.init && JC.Tab.init( _selector ); + + if( !window.Bizs ) return; + /** + * disable / enable + */ + Bizs.DisableLogic && Bizs.DisableLogic.init( _selector ); + /** + * 表单提交逻辑 + */ + Bizs.FormLogic && Bizs.FormLogic.init( _selector ); + /** + * 格式化金额 + */ + Bizs.MoneyTips && Bizs.MoneyTips.init( _selector ); + /** + * 自动完成 + */ + Bizs.AutoSelectComplete && Bizs.AutoSelectComplete.init( _selector ); + + Bizs.InputSelect && Bizs.InputSelect.init( _selector ); + + /** + *排期日期展示 + */ + Bizs.TaskViewer && Bizs.TaskViewer.init(_selector); + } + + /** + * URL 占位符识别功能 + *
    require: addUrlParams, filterXSS + * @method urlDetect + * @param {String} _url 如果 起始字符为 URL, 那么 URL 将祝为本页的URL + * @return string + * @static + * @example + * urlDetect( '?test' ); //output: ?test + * + * urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2 + * urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2 + * urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2 + */ + function urlDetect( _url ){ + _url = _url || ''; + var _r = _url, _tmp, i, j, _items; + if( /^URL/.test( _url ) ){ + _tmp = _url.replace( /^URL/, '' ).replace( /[\s]*,[\s]*/g, ',' ).trim().split(','); + _url = location.href; + var _d = {}, _concat = []; + if( _tmp.length ){ + for( i = 0, j = _tmp.length; i < j; i ++ ){ + /\&/.test( _tmp[i] ) + ? ( _concat = _concat.concat( _tmp[i].split('&') ) ) + : ( _concat = _concat.concat( _tmp[i] ) ) + ; } + _tmp = _concat; } - _r = _d; + for( i = 0, j = _tmp.length; i < j; i++ ){ + _items = _tmp[i].replace(/[\s]+/g, '').split( '=' ); + if( !_items[0] ) continue; + _d[ _items[0] ] = _items[1] || ''; + } + _url = addUrlParams( _url, _d ); + _r = _url; + } + _r = filterXSS( _url ); + return _r; + } + /** + * 日期占位符识别功能 + * @method dateDetect + * @param {String} _dateStr 如果起始字符为 NOW, 那么将视为当前日期 + * , 如果起始字符为 NOWFirst, 那么将视为当前月的1号 + * @return {date|null} + * @static + * @example + * dateDetect( 'now' ); //2014-10-02 + * dateDetect( 'now,3d' ); //2013-10-05 + * dateDetect( 'now,-3d' ); //2013-09-29 + * dateDetect( 'now,2w' ); //2013-10-16 + * dateDetect( 'now,-2m' ); //2013-08-02 + * dateDetect( 'now,4y' ); //2017-10-02 + * + * dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10 + */ + function dateDetect( _dateStr ){ + var _r = null + , _re = /^now/i + , _nowFirstRe = /^nowfirst/ + , _dateRe = /^([\d]{8}|[\d]{4}.[\d]{2}.[\d]{2})/ + , _d, _ar, _item + ; + if( _dateStr && typeof _dateStr == 'string' ){ + if( _re.test( _dateStr ) || _nowFirstRe.test( _dateStr ) || _dateRe.test( _dateStr ) ){ + _d = new Date(); + if( _nowFirstRe.test(_dateStr ) ){ + _d.setDate( 1 ); + } + if( _dateRe.test( _dateStr ) ){ + _d = JC.f.parseISODate( _dateStr.replace( /[^\d]/g, '' ).slice( 0, 8 ) ); + _dateStr = _dateStr.replace( _dateRe, '' ); + } + _dateStr = _dateStr.replace( _re, '' ).replace(/[\s]+/g, ''); + _ar = _dateStr.split(','); + + var _red = /d$/i + , _rew = /w$/i + , _rem = /m$/i + , _rey = /y$/i + ; + for( var i = 0, j = _ar.length; i < j; i++ ){ + _item = _ar[i] || ''; + if( !_item ) continue; + _item = _item.replace( /[^\-\ddwmy]+/gi, '' ); + + if( _red.test( _item ) ){ + _item = parseInt( _item.replace( _red, '' ), 10 ); + _item && _d.setDate( _d.getDate() + _item ); + }else if( _rew.test( _item ) ){ + _item = parseInt( _item.replace( _rew, '' ), 10 ); + _item && _d.setDate( _d.getDate() + _item * 7 ); + }else if( _rem.test( _item ) ){ + _item = parseInt( _item.replace( _rem, '' ), 10 ); + _item && _d.setMonth( _d.getMonth() + _item ); + }else if( _rey.test( _item ) ){ + _item = parseInt( _item.replace( _rey, '' ), 10 ); + _item && _d.setFullYear( _d.getFullYear() + _item ); + } + } + _r = _d; + }else{ + _r = parseISODate( _dateStr ); + } + } + return _r; + } + ;(function(){ + /** + * inject jquery val func, for hidden change event + */ + if( !window.jQuery ) return; + var _oldVal = $.fn.val; + $.fn.val = + function(){ + var _r = _oldVal.apply( this, arguments ), _p = this; + if( + arguments.length + && ( this.prop('nodeName') || '').toLowerCase() == 'input' + && ( this.attr('type') || '' ).toLowerCase() == 'hidden' + ){ + setTimeout( function(){ _p.trigger( 'change' ); }, 1 ); + } + return _r; + }; + }()); + /** + * 逗号格式化金额 + * @method moneyFormat + * @param {int|string} _number + * @param {int} _len + * @param {int} _floatLen + * @param {int} _splitSymbol + * @return string + * @static + */ + function moneyFormat(_number, _len, _floatLen, _splitSymbol){ + var _def = '0.00'; + !_len && ( _len = 3 ); + typeof _floatLen == 'undefined' && ( _floatLen = 2 ); + !_splitSymbol && ( _splitSymbol = ',' ); + var _isNegative = false, _r; + + typeof _number == 'number' && ( _number = parseFinance( _number, _floatLen ) ); + if( typeof _number == 'string' ){ + _number = _number.replace( /[,]/g, '' ); + if( !/^[\d\.]+$/.test( _number ) ) return _def; + if( _number.split('.').length > 2 ) return _def; + } + + _number = _number || 0; + _number += ''; + + /^\-/.test( _number ) && ( _isNegative = true ); + + _number = _number.replace( /[^\d\.]/g, '' ); + + var _parts = _number.split('.'), _sparts = []; + + while( _parts[0].length > _len ){ + var _tmp = _parts[0].slice( _parts[0].length - _len, _parts[0].length ); + //console.log( _tmp ); + _sparts.push( _tmp ); + _parts[0] = _parts[0].slice( 0, _parts[0].length - _len ); + } + _sparts.push( _parts[0] ); + + _parts[0] = _sparts.reverse().join( _splitSymbol ); + + if( _floatLen ){ + !_parts[1] && ( _parts[1] = '' ); + _parts[1] += new Array( _floatLen + 1 ).join('0'); + _parts[1] = _parts[1].slice( 0, _floatLen ); }else{ - _r = parseISODate( _dateStr ); - } - } - return _r; -} -/** - * 模块加载器自动识别函数 - *
    目前可识别 requirejs - *
    计划支持的加载器 seajs - * @method loaderDetect - * @param {array of dependency|class} _require - * @param {class|callback} _class - * @param {callback} _cb - * @static - * @example - * loaderDetect( JC.AutoSelect ); - * loaderDetect( [ 'JC.AutoSelect', 'JC.AutoChecked' ], JC.Form ); - */ -function loaderDetect( _require, _class, _cb ){ - if( !( typeof define === 'function' && define.amd ) ) return; - if( _require.constructor != Array ){ - _cb = _class; - _class = _require; - _require = []; - } - define( _require, function() { - _cb && _cb.apply( _class, sliceArgs( arguments ) ); - return _class; - }); -} -;(function(){ - /** - * inject jquery val func, for hidden change event - */ - if( !window.jQuery ) return; - var _oldVal = $.fn.val; - $.fn.val = - function(){ - var _r = _oldVal.apply( this, arguments ), _p = this; - if( - arguments.length - && ( this.prop('nodeName') || '').toLowerCase() == 'input' - && this.attr('type').toLowerCase() == 'hidden' - ){ - setTimeout( function(){ _p.trigger( 'change' ); }, 1 ); + _parts.length > 1 && _parts.pop(); + } + _r = _parts.join('.'); + _isNegative && ( _r = '-' + _r ); + + return _r; + } + /** + * 日期格式化 (具体格式请查看 PHP Date Formats) + * @method dateFormat + * @param {date} _date default = now + * @param {string} _format default = "YY-MM-DD" + * @return string + * @static + */ + function dateFormat( _date, _format ){ + typeof _date == 'string' && ( _format = _date, _date = new Date() ); + !_date && ( _date = new Date() ); + !_format && ( _format = 'YY-MM-DD' ); + var _r = _format, _tmp + , _monthName = [ 'january', 'february', 'march', 'april', 'may', 'june' + , 'july', 'august', 'september', 'october', 'november', 'december' ] + , _monthShortName = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec' ] + ; + + _r = _r + .replace( /YY/g, _date.getFullYear() ) + .replace( /WK/g, function(){ + var _r = 1, _offset = 0, _weeks; + + JC.Calendar && ( _offset = JC.Calendar.weekDayOffset ); + + _weeks = weekOfYear( _date.getFullYear(), JC.Calendar.weekDayOffset ); + + $( _weeks ).each( function( _ix, _item ){ + if( _date.getTime() >= _item.start && _date.getTime() <= _item.end ){ + _r = _item.week; + return false; + } + }); + + return _r; + }) + .replace( /YQ/g, function(){ + var _r = 1, _offset = 0, _seasons; + + _seasons = seasonOfYear( _date.getFullYear() ); + + $( _seasons ).each( function( _ix, _item ){ + if( _date.getTime() >= _item.start && _date.getTime() <= _item.end ){ + _r = _item.season; + return false; + } + }); + + return _r; + }) + .replace( /MM/g, padChar( _date.getMonth() + 1 ) ) + .replace( /DD/g, padChar( _date.getDate() ) ) + + .replace( /yy/g, function( $0 ){ + _tmp = padChar( _date.getYear() ); + //JC.log( _date.getYear(), _tmp.slice( _tmp.length - 2 ) ); + return _tmp.slice( _tmp.length - 2 ); + }) + .replace( /mm/g, _date.getMonth() + 1 ) + .replace( /dd/g, _date.getDate() ) + .replace( /d/g, _date.getDate() ) + + .replace( /y/g, _date.getFullYear() ) + + .replace( /m/g, function( $0 ){ + return _monthName[ _date.getMonth() ]; + }) + + .replace( /M/g, function( $0 ){ + return _monthShortName[ _date.getMonth() ]; + }) + .replace( /HH/g, padChar( _date.getHours() ) ) + .replace( /h/g, _date.getHours() ) + .replace( /NN/g, padChar( _date.getMinutes() ) ) + .replace( /n/g, _date.getMinutes() ) + .replace( /SS/g, padChar( _date.getSeconds() ) ) + .replace( /s/g, _date.getSeconds() ) + ; + + return _r; + } + /** + * 扩展对象属性 + * @method extendObject + * @param {object} _source + * @param {object} _new + * @param {bool} _overwrite 是否覆盖已有属性, default = true + * @return object + * @static + */ + function extendObject( _source, _new, _overwrite ){ + typeof _overwrite == 'undefined' && ( _overwrite = true ); + if( _source && _new ){ + for( var k in _new ){ + if( _overwrite ){ + _source[ k ] = _new[ k ]; + }else if( !( k in _source ) ){ + _source[ k ] = _new[ k ]; + } + } + } + return _source; + } + /** + * timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行 + * @method safeTimeout + * @param {timeout|function} _timeout + * @param {object} _obj default = window.TIMEOUT_HOST || {} + * @param {string} _name default = 'NORMAL' + * @param {int} _ms default = 50 + * @return object + * @static + */ + function safeTimeout( _timeout, _obj, _name, _ms ){ + if( typeof _timeout == 'undefined' ) return; + _obj = $( _obj || ( window.TIMEOUT_HOST = window.TIMEOUT_HOST || {} ) ); + _name = _name || 'NORMAL'; + + typeof _timeout == 'function' + && ( _timeout = setTimeout( _timeout, _ms || 50 ) ); + + _obj.data( _name ) && clearTimeout( _obj.data( _name ) ); + _obj.data( _name, _timeout ); + } + /** + * URL 请求时, 获取对URL参数进行编码的函数 + * @method encoder + * @param {selector} _selector + * @return {encode function} default encodeURIComponent + * @static + */ + function encoder( _selector ){ + _selector && ( _selector = $( _selector ) ); + var _r; + if( _selector && _selector.length ){ + _r =_selector.attr( 'validEncoder' ) || 'encodeURIComponent'; + _r = window[ _r ] || encodeURIComponent; + }else{ + _r = encodeURIComponent; + } + return _r; + } + /** + * 深度克隆对象 + * @method cloneObject + * @param {Object} _inObj + * @return Object + * @static + */ + function cloneObject( _inObj, _outObj ){ + _outObj = _outObj || {}; + var k, i, j; + + for( k in _inObj ){ + _outObj[ k ] = _inObj[ k ]; + switch( Object.prototype.toString.call( _outObj[ k ] ) ){ + + case '[object Object]': { + _outObj[ k ] = _outObj[ k ].constructor === Object + ? cloneObject( _outObj[ k ] ) + : _outObj[ k ] + ; + break; + } + + case '[object Array]': { + _outObj[ k ] = _inObj[ k ].slice(); + for( i = 0, j = _outObj[ k ].length; i < j; i++ ){ + if( Object.prototype.toString.call( _outObj[ k ][i] ) == '[object Object]' ) + _outObj[ k ][ i ] = cloneObject( _outObj[ k ][ i ] ); + } + break; + } + + case '[object Date]': { + _outObj[ k ] = new Date(); _outObj[ k ].setTime( _inObj[ k ].getTime() ); + break; + } + + default: _outObj[ k ] = _inObj[ k ]; } - return _r; + } + + return _outObj; + } + /** + * 获取 document 的 相关大小 + * @method docSize + * @param {document} _doc + * @return Object + * @static + */ + function docSize( _doc ){ + _doc = _doc || document; + var _r = { + width: 0, height: 0, docWidth: 0, docHeight: 0, bodyWidth: 0, bodyHeight: 0, scrollWidth: 0, scrollHeight: 0 }; -}()); + + _r.docWidth = _doc.documentElement.offsetWidth; + _r.docHeight = _doc.documentElement.offsetHeight; + + _doc.body && ( + _r.bodyWidth = _doc.body.offsetWidth + , _r.bodyHeight = _doc.body.offsetHeight + ); + + _r.scrollWidth = _doc.documentElement.scrollWidth + _r.scrollHeight = _doc.documentElement.scrollHeight + + _r.width = Math.max( _r.docWidth, _r.bodyWidth, _r.scrollHeight ); + _r.height = Math.max( _r.docHeight, _r.bodyHeight, _r.scrollHeight ); + + return _r; + } + /** + * 获取 window 的 相关大小 + * @method winSize + * @param {window} _win, default = window + * @return Object + * @static + */ + function winSize( _win ){ + _win = $( _win || window ); + var _r = { + width: _win.width() + , height: _win.height() + , scrollLeft: _win.scrollLeft() + , scrollTop: _win.scrollTop() + }; + _r.viewportX = _r.scrollLeft; + _r.maxViewportX = _r.scrollLeft + _r.width; + _r.viewportY = _r.scrollTop; + _r.maxViewportY = _r.scrollTop + _r.height; + return _r; + } + + return JC.f; + +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AjaxTree/AjaxTree.js b/comps/AjaxTree/AjaxTree.js new file mode 100755 index 000000000..590255aff --- /dev/null +++ b/comps/AjaxTree/AjaxTree.js @@ -0,0 +1,1029 @@ +;(function(define, _win) { 'use strict'; define( 'JC.AjaxTree', [ 'JC.BaseMVC', 'plugins.json2' ], function(){ + JC.use + && !window.JSON + && JC.use( 'plugins.json2' ) + ; + JC.AjaxTree = AjaxTree; + /** + * AJAX 树菜单类 JC.AjaxTree + *

    require: + * JC.BaseMVC + * , JSON2 + *

    + *

    JC Project Site + * | API docs + * | demo link

    + * + *

    页面只要引用本文件, 默认会自动初始化 div class="js_compAjaxTree" 的树组件

    + * + *

    可用的 html attribute

    + *
    + *
    data-defaultOpenRoot = bool, default = true
    + *
    如果没有默认选中节点, 是否展开根节点
    + * + *
    data-cajScriptData = script selector
    + *
    从脚本模板解释数据
    + * + *
    data-cajData = object name of window
    + *
    从window变量获取数据
    + * + *
    data-cajUrl = url
    + *
    从 url 加载数据
    + * + *
    data-rootId = node id, default = ''
    + *
    指定根节点ID
    + * + *
    data-urlArgName = string, default = 'tree_node'
    + *
    书节点的URL参数名
    + * + *
    data-typeIndex = int, default = 0
    + *
    数据节点中 节点类型 所在的索引位置
    + * + *
    data-idIndex = int, default = 1
    + *
    数据节点中 节点id 所在的索引位置
    + * + *
    data-nameIndex = int, default = 2
    + *
    数据节点中 节点name 所在的索引位置
    + *
    + * + * @namespace JC + * @class AjaxTree + * @extends JC.BaseMVC + * @constructor + * @param {selector} _selector 树要显示的选择器 + * @version dev 0.1 2014-11-13, qiushaowei , pjk | 75 Team + * + * @example + * +
    + +
    + */ + function AjaxTree( _selector ){ + + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, AjaxTree ) ) + return JC.BaseMVC.getInstance( _selector, AjaxTree ); + + JC.BaseMVC.getInstance( _selector, AjaxTree, this ); + + this._model = new AjaxTree.Model( _selector ); + this._view = new AjaxTree.View( this._model ); + + this._init(); + } + /** + * 初始化可识别的 AjaxTree 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of AjaxTreeInstance} + */ + AjaxTree.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compAjaxTree' ) ){ + _r.push( new AjaxTree( _selector ) ); + }else{ + _selector.find( 'div.js_compAjaxTree' ).each( function(){ + _r.push( new AjaxTree( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( AjaxTree ); + /** + * 树的数据过滤函数 + *
    如果树的初始数据格式不符合要求, 可通过该属性定义函数进行数据修正 + * @property dataFilter + * @type function + * @default undefined + * @static + * @example + JC.AjaxTree.dataFilter = + function( _data ){ + var _r = {}; + + if( _data ){ + if( _data.root.length > 2 ){ + _data.root.shift(); + _r.root = _data.root; + } + _r.data = {}; + for( var k in _data.data ){ + _r.data[ k ] = []; + for( var i = 0, j = _data.data[k].length; i < j; i++ ){ + if( _data.data[k][i].length < 3 ) continue; + _data.data[k][i].shift(); + _r.data[k].push( _data.data[k][i] ); + } + } + } + return _r; + }; + */ + AjaxTree.dataFilter; + + JC.f.extendObject( AjaxTree.prototype, { + _beforeInit: + function(){ + } + + , _initHanlderEvent: + function(){ + var _p = this, _data; + + _p.on( 'inited', function(){ + _data = _p._model.parseInitData(); + + if( !_data && _p._model.url() ){ + _data = { url: _p._model.url() }; + } + + if( _data ){ + _data.data = _data.data || {}; + + _p._model.data( _data ); + if( _data.root ){ + _p.trigger( 'update_init_data', [ _data ] ); + }else if( _data.url ){ + _p._model.ajaxData( _p._model.rootId(), function( _sdata ){ + if( _sdata && _sdata.data && _sdata.data[0] && _sdata.data[0].length ){ + _data.root = _sdata.data[0]; + _p.trigger( 'update_init_data', [ _data ] ); + } + }); + } + } + }); + + _p.on( 'update_init_data', function( _evt, _data ){ + if( !_data ) return; + _p._model.data( _data ); + if( !( _p._model.data() && _p._model.root() ) ) return; + + _p._view._process( _p._model.child( _p._model.root()[ _p._model.idIndex() ] ), _p._view._initRoot() ); + + _p.trigger( 'AT_OPEN_FOLDER' ); + }); + + _p.on( 'AT_OPEN_FOLDER', function(){ + var _arg = ( JC.f.getUrlParam( _p._model.urlArgName() ) || '' ).trim() + , _list + ; + if( !_arg ) { + if( _p._model.defaultOpenRoot() && _p._model.root() ){ + _p.open( _p._model.root()[ _p._model.idIndex ] ); + }; + return; + } + _list = _p.triggerHandler( 'AT_PROCESS_ID', [ _arg ] ); + if( !_list.length ) return; + + _p.trigger( 'AT_OPEN_ALL_FOLDER', [ _list, 0 ] ); + }); + + _p.on( 'AT_OPEN_ALL_FOLDER', function( _evt, _list, _ix ){ + if( _ix >= _list.length ) { + _p.openUI( _list.last() ); + return; + } + var _id = _list[ _ix ] + , _node = _p.selector().find( JC.f.printf( 'div.node_ctn[data-id={0}]', _id ) ) + , _nodeUl + ; + if( !( _node && _node.length ) ) return; + _p._view.openFolder( _id, function(){ + _p.trigger( 'AT_OPEN_ALL_FOLDER', [ _list, ++_ix ] ); + }); + }); + + _p.on( 'AT_PROCESS_ID', function( _evt, _ids ){ + var _r = []; + typeof _ids != 'string' && ( _ids = _ids.toString() ); + _ids = (_ids || '' ).replace( /[\s]+/g, '' ); + _ids && ( _r = _ids.split( ',' ) ); + return _r; + }); + + } + + , _inited: + function(){ + this.trigger( 'inited' ); + } + /** + * 展开树到某个具体节点, 或者展开树的所有节点 + * @method open + * @param {string|int} _nodeId 如果_nodeId='undefined', 将会展开树的所有节点 + *
    _nodeId 不为空, 将展开树到 _nodeId 所在的节点 + */ + , open: + function( _nodeId ){ + var _p = this; + if( typeof _nodeId == 'undefined' ){ + _p._view.openAll(); + return _p; + } + var _list = _p.triggerHandler( 'AT_PROCESS_ID', [ _nodeId ] ); + if( _list.length ){ + _p.trigger( 'AT_OPEN_ALL_FOLDER', [ _list, 0 ] ); + } + return _p; + } + /** + * 展开树到某个具体节点, 或者展开树的所有节点 + * @method openUI + * @param {string|int} _nodeId 如果_nodeId='undefined', 将会展开树的所有节点 + *
    _nodeId 不为空, 将展开树到 _nodeId 所在的节点 + */ + , openUI: + function( _nodeId ){ + if( typeof _nodeId == 'undefined' ){ + this._view.openAll(); + return this; + } + this._view.openUI( _nodeId ); + return this; + } + + /** + * 关闭某个节点, 或者关闭整个树 + * @method close + * @param {string|int} _nodeId 如果_nodeId='undefined', 将会关闭树的所有节点 + *
    _nodeId 不为空, 将关闭树 _nodeId 所在的节点 + */ + , close: + function( _nodeId ){ + if( typeof _nodeId == 'undefined' ){ + this._view.closeAll(); + return this; + } + this._view.close( _nodeId ); + return this; + } + + /** + * 新增节点方法 + * @method add + * @param {string} _parentId 父节点ID + * @param {object} _data 新增的数据对象( 对象会通过ajax请求传递,ajax的url读取dom属性“data-addUrl” ) + * @param {boolean} _needFresh 是否刷新父节点 + * @param {function} _cb 添加请求完毕后的回调函数,请求结果为第一个参数 + */ + , add: + function( _parentId, _data, _needFresh, _cb ) { + + if( !_parentId ) { + return; + } + + var _p = this; + + $.ajax( { + type: "POST" + , url: this._model.addUrl() || '' + , data: { + parentId: _parentId + , data: _data + } + , dataType: "json" + , success: function( _data ) { + if( _data ) { + _p._view.refreshNode( _parentId ); + + _cb && _cb( _data ); + } + } + } ); + } + + /** + * 刷新某个节点 + * @method refreshNode + * @param {string} _nodeId 节点ID + */ + , refreshNode: + function( _nodeId ) { + this._view.refreshNode( _nodeId ); + } + + /** + * 获取树的 ID 前缀 + *
    每个树都会有自己的随机ID前缀 + * @method idPrefix + * @return {string} 树的ID前缀 + */ + , idPrefix: function(){ return this._model.idPrefix(); } + /** + * 获取树的节点 label + * @method getItem + * @param {string|int} _nodeId + */ + , getItem: + function( _nodeId ){ + var _r; + _nodeId && ( _r = $('#' + this._model.id( _nodeId ) ) ); + return _r; + } + /** + * 获取或设置树的高亮节点 + * @method selectedItem + * @param {selector} _selector + * @return selector + */ + , selectedItem: + function( _selector ){ + return this._view.selectedItem( _selector ); + } + , highlight: + function(){ + return this.selectedItem.apply( this, JC.f.sliceArgs( arguments ) ); + } + + }); + + AjaxTree.Model._instanceName = 'JCAjaxTreeIns'; + + AjaxTree.Model._insCount = 1; + + JC.f.extendObject( AjaxTree.Model.prototype, { + init: + function(){ + /** + * 展现树需要的数据 + * @type object + */ + this._data + /** + * 树的随机ID前缀 + * @type string + */ + this._id = JC.f.printf( 'tree_{0}_{1}_', new Date().getTime(), AjaxTree.Model._insCount++ ); + /** + * 树当前的高亮节点 + * @type selector + */ + this._highlight; + /** + * 保存树的所有绑定事件 + * @type object + */ + this._events = {}; + + } + , parseInitData: + function(){ + var _p = this, _data; + if( _p.is( '[data-cajScriptData]' ) ){ + _data = _p.scriptDataProp( 'data-cajScriptData' ); + }else if( _p.is( '[data-cajData]' ) ){ + _data = _p.windowProp( 'data-cajData' ); + _data && ( _data = $.parseJSON( JSON.stringify( _data ) ) ); + } + _data && ( _data.data = _data.data || {} ); + return _data; + } + , idIndex: + function(){ + if( typeof this._idIndex == 'undefined' ){ + this._idIndex = this.attrProp( 'data-idIndex' ) || 1; + } + return this._idIndex; + } + , nameIndex: + function(){ + if( typeof this._nameIndex == 'undefined' ){ + this._nameIndex = this.attrProp( 'data-nameIndex' ) || 2; + } + return this._nameIndex; + } + , typeIndex: + function(){ + if( typeof this._typeIndex == 'undefined' ){ + this._typeIndex = this.attrProp( 'data-typeIndex' ) || 0; + } + return this._typeIndex; + } + /** + * 获取树所要展示的容器 + * @return selector + */ + , selector: function(){ return this._selector; } + /** + * 获取节点将要显示的ID + * @param {string} _id 节点的原始ID + * @return string 节点的最终ID + */ + , id: function( _id ){ return this._id + _id; } + /** + * 获取树的随机ID前缀 + * @return string + */ + , idPrefix: function(){ return this._id; } + /** + * 获取树的原始数据 + * @return object + */ + , data: + function( _setter ){ + if( typeof _setter != 'undefined' ){ + this._data = _setter; + AjaxTree.dataFilter && ( this._data = AjaxTree.dataFilter( this._data ) ); + } + return this._data; + } + /** + * 获取树生成后的根节点 + * @return selector + */ + , root: function(){ return this._data.root; } + /** + * 获取ID的具体节点 + * @param {string} _id + * @return selector + */ + , child: function( _id ){ + var _r = this._data.data[ _id ]; + !( _r && _r.length ) && ( _r = [] ); + return _r; + } + /** + * 判断原始数据的某个ID是否有子级节点 + * @param {string} _id + * @return bool + */ + , hasChild: function( _id ){ return _id in this._data.data; } + /** + * 获取或设置树的高亮节点 + *
    注意: 这个只是数据层面的设置, 不会影响视觉效果 + * @param {selector} _item + * @return selector + */ + , highlight: + function( _highlight ){ + _highlight && ( this._highlight = $( _highlight ) ); + return this._highlight; + } + + , urlArgName: + function(){ + var _r = this.attrProp( 'data-urlArgName' ) || 'tree_node'; + return _r; + } + + , getNodeById: + function( _nodeId ){ + var target = null; + if( _nodeId ){ + target = $( '#' + this.id( _nodeId ) ); + } + return target; + } + , defaultOpenRoot: + function(){ + var _r = true; + this.is( '[data-defaultOpenRoot]' ) && ( _r = this.boolProp( 'data-defaultOpenRoot' ) ); + return _r; + } + + , ajaxData: + function( _id, _cb ){ + _id = _id || ''; + var _url = JC.f.printf( this.data().url, _id ); + + $.ajax({ + type: "GET", + url: _url, + dataType: "json", + success: function( _data ){ + _cb && _cb( _data ); + } + }); + return this; + } + + , url: + function(){ + return this.attrProp( 'data-cajUrl' ) || ''; + } + + , rootId: + function(){ + return this.attrProp( 'data-rootId' ) || ''; + } + + , addUrl: + function(){ + return this.attrProp( 'data-addUrl' ) || ''; + } + }); + + JC.f.extendObject( AjaxTree.View.prototype, { + /** + * 初始化树的可视状态 + */ + init: + function() { + + return this; + } + /** + * 处理树的展现效果 + * @param {array} _data 节点数据 + * @param {selector} _parentNode + */ + , _process: + function( _data, _parentNode ){ + + var _p = this; + if( !( _data && _data.length ) ) return; + for( var i = 0, j = _data.length, _item, _isLast; i < j; i++ ){ + _item = _data[ i ]; + _isLast = i === j - 1; + + if( 'folder' == _item[ _p._model.typeIndex() ] ){ + this._initFolder( _parentNode, _item, _isLast ); + }else{ + this._initFile( _parentNode, _item, _isLast ); + } + } + } + /** + * 初始化树根节点 + */ + , _initRoot: + function(){ + var _p = this; + + if( !_p._model.data().root ) return; + + var _data, _parentNode, _label, _node, _span, _r; + + _data = _p._model.data().root; + _parentNode = $( '
      ' ); + + _label = this._initLabel( _data ); + + + if( !( _data[ _p._model.idIndex() ] in ( _p._model.data().data || {} ) ) ){ + _node = $( '
    • ' ); + _span = $( ' ' ); + }else{ + _node = $( '
    • ' ); + _span = $( ' ' ); + } + + //_node.html( ' ' ); + _span.appendTo( _node ); + _label.appendTo( _node ); + + _span.on( 'click', function( e ){ + _p.folderClick( _data[ _p._model.idIndex() ] ); + }); + + _node.appendTo( _parentNode ); + _parentNode.appendTo( _p._model.selector() ); + + this.selector( _parentNode ); + + _r = $( '
        ' ) + _r.appendTo( _node ); + + return _r; + } + /** + * 初始化树的文件夹节点 + * @param {selector} _parentNode + * @param {object} _data + * @param {bool} _isLast + */ + , _initFolder: + function( _parentNode, _data, _isLast ){ + + var _p = this, _last = '', _last1 = ''; + _isLast && ( _last = 'folder_span_lst ', _last1 = 'folder_last' ); + + var _label = this._initLabel( _data ); + + var _node = $( JC.f.printf( ' ', _data[ _p._model.nameIndex() ], _last ) ); + var _li = $('
      • '); + _li.addClass( JC.f.printf( 'folder_closed {0} folder', _last1 )); + _node.appendTo( _li ); + _label.appendTo( _li ); + + var _r = $( '' ); + + $( _node ).on( 'click', function( e ){ + _p.folderClick( _data[ _p._model.idIndex() ] ); + }); + _r.appendTo( _li ); + + _li.appendTo( _parentNode ); + this._process( this._model.child( _data[ _p._model.idIndex() ] ), _r ); + } + /** + * 初始化树的文件节点 + * @param {selector} _parentNode + * @param {object} _data + * @param {bool} _isLast + */ + , _initFile: + function( _parentNode, _data, _isLast ){ + var _p = this, _last = 'folder_img_bottom ', _last1 = ''; + _isLast && ( _last = 'folder_img_last ', _last1 = '' ); + + var _label = this._initLabel( _data ); + + var _node = $( JC.f.printf( '
      •  
      • ', _data[ _p._model.nameIndex() ], _last ) ); + _node.addClass( 'folder_closed file'); + _label.appendTo( _node ); + + _node.appendTo( _parentNode ); + } + /** + * 初始化树的节点标签 + * @param {object} _data + * @return selector + */ + , _initLabel: + function( _data ){ + var _p = this, _label = $('
        '); + _label.attr( 'id', this._model.id( _data[ _p._model.idIndex() ] ) ) + .attr( 'data-id', _data[ _p._model.idIndex() ] ) + .attr( 'data-name', _data[ _p._model.nameIndex() ] ) + .attr( 'data-type', _data[ _p._model.typeIndex() ] || '' ) + .data( 'nodeData', _data ); + + _label.html( _data[ _p._model.nameIndex() ] || '没有标签' ); + _p.notification( 'renderItem', [ _label, _data ] ); + return _label; + } + /** + * 展开树的所有节点 + */ + , openAll: + function(){ + if( !this.selector() ) return; + this.selector().find('span.folder_img_closed').each( function(){ + $(this).trigger('click'); + }); + } + /** + * 关闭树的所有节点 + */ + , closeAll: + function(){ + if( !this.selector() ) return; + this.selector().find('span.folder_img_open, span.folder_img_root').each( function(){ + if( $(this).hasClass( 'folder_img_closed' ) ) return; + $(this).trigger('click'); + }); + } + /** + * 展开树到具体节点 + * @param {string} _nodeId + */ + , openUI: + function( _nodeId ){ + var _p = this; + var _tgr = _p._model.getNodeById( _nodeId ); + + if( !_tgr.length ) return; + + var lis = _tgr.parents('li'); + this.selectedItem( _tgr ); + + lis.each( function(){ + var _sp = $(this), _child = _sp.find( '> span.folderRoot, > span.folder' ); + if( _child.length ){ + if( _child.hasClass( 'folder_img_open' ) ) return; + _child.trigger( 'click' ); + } + }); + } + , selectedItem: + function( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return this._model.highlight(); + + if( this._model.highlight() ) { + this._model.highlight().removeClass('highlight').removeClass( 'selectedAjaxTreeNode' ); + } + _selector.addClass( 'highlight' ).addClass( 'selectedAjaxTreeNode' ); + + this._model.highlight( _selector ); + return _selector; + } + /** + * 关闭树的具体节点 + * @param {string} _nodeId + */ + , close: + function( _nodeId ){ + var _p = this; + var _tgr = _p._model.getNodeById( _nodeId ); + + if( !_tgr.length ) return; + + var _child = _tgr.parent('li').find( '> span.folderRoot, > span.folder' ); + if( _child.length ){ + if( _child.hasClass( 'folder_img_closed' ) ) return; + _child.trigger( 'click' ); + } + + } + , nodeImgClick: + function( _nodeId ){ + var _p = this, + _node = _p._model.getNodeById( _nodeId ), + _nodeImg = _node.siblings('span'), + _pntLi = _node.parent('li'), + _childUl = _pntLi.find( '> ul'); + var _treeselector = JC.f.getJqParent( _node, 'div.js_compAjaxTree' ) + , _treeIns = _treeselector.data( AjaxTree.Model._instanceName ) + ; + if( !_treeIns ) return; + + if( _nodeImg.hasClass( 'folder_img_open' ) ){ + _nodeImg.removeClass( 'folder_img_open' ).addClass( 'folder_img_closed' ); + _childUl.hide(); + }else if( _nodeImg.hasClass( 'folder_img_closed' ) ){ + _nodeImg.addClass( 'folder_img_open' ).removeClass( 'folder_img_closed' ); + _childUl.show(); + } + + if( _pntLi.hasClass('folder_closed') ){ + _pntLi.addClass('folder_open').removeClass('folder_closed'); + }else if( _pntLi.hasClass('folder_open') ){ + _pntLi.removeClass('folder_open').addClass('folder_closed'); + } + } + , folderClick: + function( _nodeId ){ + + var _p = this, + _model = _p._model, + _node = _model.getNodeById( _nodeId ), + _pntLi = _node.parent('li'); + if( _pntLi.hasClass( 'folder_open' ) ){ + _p.nodeImgClick( _nodeId ); + } else { + _p.openFolder( _nodeId ); + } + } + , openFolder: + function( _nodeId, _callback ){ + var _p = this, + _model = _p._model, + _node = _model.getNodeById( _nodeId ), + _pntLi = _node.parent('li'), + _nodeImg = _node.siblings('span'), + _nodeUl = _node.siblings('ul'), + _type = ( _node.attr( 'data-type' ) || 'file' ) + ; + + if( _type == 'file' ){ + _callback && _callback(); + return; + } + + if( _nodeUl.data( 'inited' ) || _nodeUl.children('li').length > 0 ){/* 已经初始化子节点 展开 */ + _p.nodeImgClick( _nodeId ); + _callback && _callback(); + } else {/* 通过ajxa获取数据 */ + _nodeImg.removeClass('folder_img_closed'); + _p.showDataLoading( _node ); + _nodeUl.data( 'inited', true ); + + if( !_model.data().url ){ + _p.hideDataLoading( _node ); + return; + } + + _p._model.ajaxData( _nodeId, function( _data ){ + _pntLi.addClass('folder_open').removeClass('folder_closed'); + _p.hideDataLoading( _node ); + _p._process( _data.data, _nodeUl.show() ); + _callback && _callback(); + }); + } + } + + /** + * 更新树的具体节点 + * @param {string} _nodeId + */ + , refreshNode: function( _nodeId ) { + var _p = this + , _model = _p._model + , _node = _model.getNodeById( _nodeId ) + , _nodeUl = _node.siblings('ul') + , _pntLi = _node.parent('li'); + + _node.closest( 'li' ).children('ul').children().remove(); + + _p._model.ajaxData( _nodeId, function( _data ){ + _pntLi.addClass('folder_open').removeClass('folder_closed'); + _p.hideDataLoading( _node ); + _p._process( _data.data, _nodeUl.show() ); + }); + } + + , showDataLoading: function( _node ){ + _node.siblings('span').removeClass('folder_img_closed').addClass('folder_img_loading'); + } + + , hideDataLoading: function( _node ){ + _node.siblings('span').removeClass('folder_img_loading').addClass('folder_img_open'); + } + }); + /** + * 树节点的点击事件 + * @event click + * @param {event} _evt + * @example + $( document ).delegate( 'div.js_compAjaxTree', 'click', function( _evt, _item, _data, _box ){ + JC.dir( _item[0], _data, _box[0] ); + }); + */ + /** + * 树节点的change事件 + * @event change + * @param {event} _evt + * @example + $( document ).delegate( 'div.js_compAjaxTree', 'change', function( _evt, _item, _data, _box ){ + JC.dir( _item[0], _data, _box[0] ); + }); + */ + + /** + * 树节点的展现事件 + * @event RenderLabel + * @param {array} _data + * @param {selector} _item + * @example + _tree.on('RenderLabel', function( _data ){ + var _node = $(this); + _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) ); + }); + */ + + /** + * 树文件夹的点击事件 + * @event FolderClick + * @param {event} _evt + * @example + _tree.on('FolderClick', function( _evt ){ + var _p = $(this); + alert( 'folder click' ); + }); + */ + /** + * 树的最后的 hover 节点 + *
        树的 hover 是全局属性, 页面上的所有树只会有一个当前 hover + * @property lastHover + * @type selector + * @default null + */ + AjaxTree.lastHover = null; + + JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn', 'mouseenter', function(){ + if( AjaxTree.lastHover ) AjaxTree.lastHover.removeClass('ms_over'); + $(this).addClass('ms_over'); + AjaxTree.lastHover = $(this); + }); + JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn', 'mouseleave', function(){ + if( AjaxTree.lastHover ) AjaxTree.lastHover.removeClass('ms_over'); + }); + + JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn a[href]', 'click', function( _evt ){ + var _p = $( this ) + , _href = ( _p.attr( 'href' ) || '' ).trim().replace( /[\s]+/g, '' ) + , _idList + , _node + , _treeBox, _treeIns + , _args + ; + if( /^(javascript\:|#)/.test( _href ) ) return; + + _node = JC.f.getJqParent( _p, 'div.node_ctn' ); + if( !( _node && _node.length ) ) return; + + _treeBox = JC.f.getJqParent( _p, '.js_compAjaxTree' ); + if( !( _treeBox && _treeBox.length ) ) return; + + _treeIns = JC.BaseMVC.getInstance( _treeBox, JC.AjaxTree ); + if( !_treeIns ) return; + + _idList = JWIN.triggerHandler( 'AJAXTREE_GET_PARENT_LIST', [ _node ] ); + _args = {}; + _args[ _treeIns._model.urlArgName() ] = _idList.join(','); + _p.attr( 'href', JC.f.addUrlParams( _href, _args ) ); + }); + + JWIN.on( 'AJAXTREE_GET_PARENT_LIST', function( _evt, _node, _list ){ + _list = _list || []; + _node = $( _node ); + var _pntUl, _pntNode; + + _list.unshift( _node.attr( 'data-id' ) ); + + _pntUl = JC.f.getJqParent( _node, 'ul' ); + if( _pntUl + && _pntUl.length + && ( _pntUl.is( '.folder_ul_lst' ) || _pntUl.is( '.ajtree_wrap_inner' ) ) + ){ + _pntNode = _pntUl.prev( 'div.node_ctn' ); + if( _pntNode && _pntNode.length ){ + JWIN.trigger( 'AJAXTREE_GET_PARENT_LIST', [ _pntNode, _list ] ); + } + } + + return _list; + }); + + JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn', 'click', function( _evt ){ + var _p = $(this) + , _treeselector = JC.f.getJqParent( _p, '.js_compAjaxTree' ) + , _treeIns = _treeselector.data( AjaxTree.Model._instanceName ) + , _nodeData, _tmpData + , _isChange = true + ; + + if( !_treeIns ) return; + + _treeIns.open( _p.attr( 'data-id' ) ); + + if( _treeselector.data( 'AT_PRESELECTED_ID' ) == _p.attr( 'data-id' ) ){ + }else{ + _treeselector.data( 'AT_PRESELECTED_ID', _p.attr( 'data-id' ) ); + _treeselector.trigger( 'change', [ _p, _p.data( 'nodeData' ), _treeselector ] ); + } + }); + + JDOC.ready( function(){ + JC.f.safeTimeout( function(){ + AjaxTree.autoInit && AjaxTree.init(); + }, null, 'JCAjaxTreeInit', 1 ); + }); + + return JC.AjaxTree; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AjaxTree/_demo/data/crm.css b/comps/AjaxTree/_demo/data/crm.css new file mode 100755 index 000000000..2a86b7e6a --- /dev/null +++ b/comps/AjaxTree/_demo/data/crm.css @@ -0,0 +1,24 @@ +.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;} +.clearfix{zoom:1;} +.clear{clear:both;} + +.tree_container{ display: none; background: #fff; width: 100%; border: 1px solid #ccc; position: absolute; + overflow-x: auto; +} + +/* +*department select styles +*2013-05-17 +*/ +div.dpt-select{ float:left; width:260px; height:19px; overflow:hidden; border:1px solid #ccc; padding:1px 1px 0; margin:0; background:#fff; position:relative;} +div.dpt-select-active{ height: auto; overflow:visible; } +div.dpt-select span.label{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 0 0 3px; margin:0; line-height:18px; color:#444; margin-right:20px; cursor: pointer;} +div.dpt-select i{ position:absolute; display:block; right:1px; top:1px; width:17px; height:18px; background:url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat; overflow:hidden; padding:0; margin:0; font-size:0; line-height:0;} +div.dpt-select:hover i{ background-position: 0 -18px;} +div.dpt-select-disabled{ border:1px solid #ddd; background:#f0f0f0;} +div.dpt-select-disabled span.label{ color:#666; cursor:default;} +div.dpt-select-disabled:hover i{ background-position: 0 0;} +div.dpt-select-disabled i{ filter:alpha(opacity=70);opacity: 0.7; } + +div.dpt-treeCon{position:absolute; border:1px solid #ddd; width:262px; min-height:100px; _height:100px; top:200px; left:200px; background:#fff; display:none; margin:0;} +div.dpt-treeCon .tree-wrap{ padding-top:4px;} diff --git a/comps/AjaxTree/_demo/data/crm.data.js b/comps/AjaxTree/_demo/data/crm.data.js new file mode 100755 index 000000000..1bab149dd --- /dev/null +++ b/comps/AjaxTree/_demo/data/crm.data.js @@ -0,0 +1,11279 @@ +var CRM_TREE_DATA = { + data: + { + "1025": + [ + [ + "file", + "1047", + "战狼队" + ], + [ + "file", + "1661", + "火狼队" + ], + [ + "file", + "1662", + "失效部门" + ], + [ + "file", + "1960", + "威海" + ] + ], + "2": + [ + [ + "file", + "516", + "区域" + ], + [ + "folder", + "634", + "钓鱼岛区域(CRM测试)" + ], + [ + "file", + "650", + "增值运营中心" + ], + [ + "file", + "845", + "市场部" + ], + [ + "file", + "890", + "培训部" + ], + [ + "file", + "1327", + "客服部" + ], + [ + "folder", + "1436", + "华北大区" + ], + [ + "folder", + "1437", + "华东大区" + ], + [ + "folder", + "1438", + "华中大区" + ], + [ + "folder", + "1439", + "华南大区" + ], + [ + "folder", + "1441", + "西北大区" + ], + [ + "folder", + "1442", + "西南大区" + ] + ], + "3": + [ + [ + "folder", + "35", + "业务审核风险运营中心" + ], + [ + "folder", + "1293", + "销售助理组" + ], + [ + "file", + "1294", + "流程管理组" + ], + [ + "file", + "1296", + "业务分析组" + ], + [ + "file", + "1309", + "销售管理组" + ] + ], + "1030": + [ + [ + "file", + "1031", + "销售二部" + ], + [ + "file", + "1032", + "销售三部" + ], + [ + "file", + "1033", + "销售四部" + ], + [ + "file", + "1035", + "销售一部" + ], + [ + "file", + "1118", + "商务支持" + ], + [ + "file", + "1165", + "销售五部" + ], + [ + "file", + "1338", + "销售六部" + ], + [ + "file", + "1682", + "海南一部" + ], + [ + "file", + "1803", + "海南二部" + ], + [ + "file", + "1804", + "海南其他" + ] + ], + "1": + [ + [ + "folder", + "883", + "导航事业部" + ], + [ + "folder", + "884", + "总部财务部" + ], + [ + "folder", + "1269", + "法务部" + ] + ], + "1026": + [ + [ + "folder", + "1030", + "销售一区" + ], + [ + "file", + "1034", + "售前审核部" + ] + ], + "1036": + [ + [ + "file", + "1037", + "预审核组" + ], + [ + "file", + "1038", + "资质上传组" + ], + [ + "file", + "1039", + "开户组" + ] + ], + "1040": + [ + [ + "folder", + "1041", + "新开客户部" + ], + [ + "folder", + "1042", + "普通客户部" + ], + [ + "folder", + "1043", + "VIP客户部" + ] + ], + "1041": + [ + [ + "file", + "1044", + "新开客户部一组" + ] + ], + "1042": + [ + [ + "folder", + "1045", + "普通客户部一组" + ], + [ + "file", + "1344", + "普通客户部二组" + ], + [ + "file", + "1529", + "普通客户部三组" + ], + [ + "file", + "1602", + "普通客户部四组" + ] + ], + "1043": + [ + [ + "file", + "1046", + "VIP客户部一组" + ] + ], + "21": + [ + [ + "folder", + "22", + "北京天地在线广告有限公司" + ] + ], + "22": + [ + [ + "folder", + "23", + "客户发展部" + ], + [ + "folder", + "32", + "业务支持部" + ], + [ + "file", + "33", + "合同部" + ], + [ + "file", + "34", + "财务部" + ], + [ + "folder", + "652", + "增值服务部" + ], + [ + "folder", + "1084", + "代理商培训部" + ], + [ + "file", + "1238", + "市场部" + ], + [ + "file", + "1934", + "事业三部二十二组" + ] + ], + "23": + [ + [ + "folder", + "24", + "事业三部一组" + ], + [ + "file", + "28", + "售前审核组" + ], + [ + "folder", + "40", + "事业三部二组" + ], + [ + "folder", + "44", + "事业三部三组" + ], + [ + "file", + "46", + "事业三部六组" + ], + [ + "file", + "47", + "事业三部七组" + ], + [ + "file", + "48", + "事业三部八组" + ], + [ + "file", + "49", + "事业三部九组" + ], + [ + "file", + "50", + "事业三部十组" + ], + [ + "file", + "51", + "事业三部十一组" + ], + [ + "file", + "52", + "事业三部十二组" + ], + [ + "file", + "53", + "事业三部十三组" + ], + [ + "file", + "54", + "售前判单组" + ], + [ + "file", + "55", + "提交部提单" + ], + [ + "file", + "162", + "事业三部十四组" + ], + [ + "file", + "164", + "自动分配组" + ], + [ + "file", + "799", + "事业三部五组" + ], + [ + "file", + "1014", + "事业三部四组" + ], + [ + "file", + "1320", + "事业三部十七组" + ], + [ + "file", + "1321", + "事业三部十八组" + ], + [ + "file", + "1322", + "事业三部十九组" + ], + [ + "file", + "1447", + "事业三部二十组" + ], + [ + "file", + "1563", + "事业三部四组" + ], + [ + "file", + "1596", + "事业三部十五组" + ], + [ + "file", + "1597", + "事业三部十六组" + ], + [ + "file", + "1815", + "事业三部二十三组" + ], + [ + "file", + "1935", + "事业三部二十二组" + ], + [ + "file", + "1936", + "事业三部二十一组" + ] + ], + "24": + [ + [ + "file", + "25", + "一组(康明)" + ], + [ + "file", + "26", + "一组一队" + ], + [ + "file", + "27", + "一组二队" + ] + ], + "1051": + [ + [ + "file", + "1052", + "培训部" + ], + [ + "file", + "1053", + "代理商培训部" + ] + ], + "1045": + [ + [ + "file", + "1343", + "普通客户部二组" + ] + ], + "32": + [ + [ + "file", + "29", + "预审核组" + ], + [ + "file", + "30", + "资质上传组" + ], + [ + "file", + "31", + "开户组" + ], + [ + "file", + "1057", + "销售培训部" + ], + [ + "file", + "1628", + "客服培训部" + ] + ], + "1058": + [ + [ + "file", + "1059", + "销售培训" + ], + [ + "file", + "1060", + "客服培训" + ] + ], + "35": + [ + [ + "folder", + "36", + "资质信息审核组" + ], + [ + "file", + "1295", + "关键词审核组" + ], + [ + "file", + "1580", + "培训组" + ] + ], + "36": + [ + [ + "file", + "37", + "中小信息资质审核" + ], + [ + "file", + "38", + "KA信息资质审核" + ] + ], + "40": + [ + [ + "file", + "41", + "二组(张晴)" + ], + [ + "file", + "42", + "二组一队" + ], + [ + "file", + "43", + "二组二队" + ] + ], + "1065": + [ + [ + "file", + "1050", + "培训部" + ] + ], + "44": + [ + [ + "file", + "45", + "事业三部六组" + ] + ], + "1074": + [ + [ + "folder", + "1075", + "销售培训" + ], + [ + "file", + "1076", + "客服培训" + ] + ], + "1075": + [ + [ + "file", + "1180", + "销售培训一部" + ] + ], + "56": + [ + [ + "folder", + "128", + "上海奇搜网络科技有限公司" + ] + ], + "57": + [ + [ + "folder", + "58", + "广东叁六网络科技有限公司" + ] + ], + "58": + [ + [ + "folder", + "59", + "销售事业部" + ], + [ + "folder", + "87", + "业务支持部" + ], + [ + "file", + "91", + "合同部" + ], + [ + "file", + "92", + "财务部" + ], + [ + "folder", + "750", + "增值服务部" + ], + [ + "file", + "1067", + "代理商培训部" + ], + [ + "file", + "1247", + "市场部" + ] + ], + "59": + [ + [ + "folder", + "60", + "事业一部" + ], + [ + "folder", + "61", + "事业三部" + ], + [ + "folder", + "62", + "事业二部" + ], + [ + "file", + "86", + "售前审核部" + ], + [ + "folder", + "166", + "事业四部" + ], + [ + "folder", + "590", + "客服部" + ], + [ + "folder", + "997", + "中山外围组" + ], + [ + "folder", + "1091", + "珠海外围组" + ], + [ + "file", + "1139", + "事业五部(客服)" + ], + [ + "folder", + "1140", + "事业五部" + ], + [ + "folder", + "1144", + "事业六部" + ], + [ + "folder", + "1148", + "事业七部" + ], + [ + "folder", + "1149", + "事业八部" + ], + [ + "folder", + "1452", + "湛江外围组" + ], + [ + "folder", + "1666", + "佛山外围组" + ], + [ + "folder", + "1718", + "江门外围组" + ], + [ + "folder", + "1956", + "新珠海外围" + ] + ], + "1084": + [ + [ + "file", + "1629", + "销售培训部" + ], + [ + "file", + "1630", + "客服培训部" + ] + ], + "61": + [ + [ + "file", + "67", + "事业三部一组" + ], + [ + "file", + "68", + "事业三部三组" + ], + [ + "file", + "73", + "事业二部三1组" + ], + [ + "file", + "74", + "事业二部六组" + ], + [ + "file", + "75", + "事业二部五1组" + ], + [ + "file", + "82", + "事业三部五组" + ], + [ + "file", + "83", + "事业三部六组" + ], + [ + "file", + "84", + "事业三部七组" + ], + [ + "file", + "165", + "事业三部八组" + ], + [ + "file", + "1250", + "事业三部二组" + ], + [ + "file", + "1920", + "事业三部四组" + ] + ], + "62": + [ + [ + "file", + "71", + "事业二部一组" + ], + [ + "file", + "72", + "事业二部二组" + ], + [ + "file", + "76", + "事业二部六组" + ], + [ + "file", + "77", + "事业二部七1组" + ], + [ + "file", + "78", + "事业二部五组" + ], + [ + "file", + "79", + "事业二部B5组" + ], + [ + "file", + "80", + "事业二部B8组" + ], + [ + "file", + "81", + "事业二部B7组" + ], + [ + "file", + "430", + "事业二部三组" + ], + [ + "file", + "1866", + "事业二部七组" + ] + ], + "63": + [ + [ + "file", + "213", + "事业一部外围组" + ] + ], + "1088": + [ + [ + "file", + "1089", + "F1部" + ], + [ + "file", + "1090", + "F2部" + ] + ], + "1091": + [ + [ + "file", + "1092", + "珠海1部" + ] + ], + "60": + [ + [ + "folder", + "63", + "事业一部四组" + ], + [ + "file", + "64", + "事业一部2组" + ], + [ + "file", + "65", + "事业一部二组" + ], + [ + "file", + "66", + "事业一部4组" + ], + [ + "file", + "69", + "事业一部七组" + ], + [ + "file", + "70", + "事业一部一组" + ], + [ + "file", + "563", + "事业一部三组" + ], + [ + "file", + "1475", + "事业一部五组" + ] + ], + "1080": + [ + [ + "file", + "1071", + "培训组" + ] + ], + "85": + [ + [ + "folder", + "93", + "销售事业部" + ], + [ + "folder", + "94", + "业务支持部" + ], + [ + "file", + "95", + "合同部" + ], + [ + "file", + "96", + "财务部" + ], + [ + "folder", + "787", + "增值服务部" + ], + [ + "file", + "980", + "市场部" + ], + [ + "file", + "1055", + "深圳力玛培训部" + ], + [ + "file", + "1717", + "已离职" + ], + [ + "file", + "1801", + "400电话业务部" + ], + [ + "file", + "1924", + "二级代理商" + ] + ], + "87": + [ + [ + "file", + "88", + "预审核组" + ], + [ + "file", + "89", + "资质上传组" + ], + [ + "file", + "90", + "开户组" + ] + ], + "1113": + [ + [ + "file", + "1114", + "X1部" + ], + [ + "file", + "1253", + "G大组" + ] + ], + "93": + [ + [ + "folder", + "97", + "销售一大组" + ], + [ + "folder", + "98", + "大客户业务部" + ], + [ + "folder", + "99", + "梅州大组" + ], + [ + "folder", + "121", + "客服大部" + ], + [ + "folder", + "124", + "E大组" + ], + [ + "file", + "127", + "售前审核部" + ], + [ + "folder", + "1088", + "F大组" + ], + [ + "folder", + "1113", + "X大组" + ], + [ + "folder", + "1254", + "G大组" + ], + [ + "file", + "1339", + "事业一部" + ], + [ + "folder", + "1340", + "汕头大组" + ], + [ + "folder", + "1470", + "ccc部" + ], + [ + "file", + "1724", + "备用" + ], + [ + "file", + "1800", + "业务部" + ], + [ + "folder", + "1859", + "销售二大组" + ], + [ + "folder", + "1914", + "H大组" + ] + ], + "94": + [ + [ + "file", + "100", + "预审核组" + ], + [ + "file", + "101", + "资质上传组" + ], + [ + "file", + "102", + "开户组" + ], + [ + "file", + "1932", + "渠道部" + ] + ], + "97": + [ + [ + "file", + "103", + "销售五部" + ], + [ + "file", + "104", + "销售二部" + ], + [ + "file", + "107", + "销售六部" + ], + [ + "file", + "110", + "销售八部" + ], + [ + "file", + "111", + "销售七部" + ], + [ + "file", + "130", + "备用" + ], + [ + "folder", + "1791", + "备用1" + ], + [ + "file", + "1806", + "11" + ] + ], + "98": + [ + [ + "file", + "105", + "备用1部" + ], + [ + "file", + "106", + "备用2部" + ], + [ + "file", + "109", + "备用3部" + ], + [ + "file", + "113", + "备用4部" + ], + [ + "folder", + "115", + "备用5部" + ], + [ + "file", + "116", + "备用6部" + ], + [ + "file", + "117", + "备用7部" + ], + [ + "file", + "119", + "备用8部" + ], + [ + "file", + "120", + "备用9部" + ], + [ + "file", + "123", + "备用10部" + ], + [ + "file", + "564", + "备用11部" + ], + [ + "file", + "1797", + "大客户部" + ], + [ + "file", + "1798", + "咨询部" + ] + ], + "99": + [ + [ + "file", + "208", + "梅州销售1部" + ], + [ + "file", + "209", + "C2部" + ], + [ + "file", + "210", + "C3部" + ] + ], + "1127": + [ + [ + "file", + "1128", + "客户发展眉山组" + ], + [ + "file", + "1129", + "客户发展泸州组" + ], + [ + "file", + "1130", + "客户发展南充组" + ], + [ + "file", + "1131", + "客户发展绵阳组" + ], + [ + "file", + "1132", + "客户发展乐山组" + ], + [ + "file", + "1133", + "客户发展遂宁组" + ] + ], + "1123": + [ + [ + "file", + "300", + "客户发展1部邓海萍组" + ], + [ + "file", + "1109", + "客户发展1部黄亮组" + ], + [ + "folder", + "1324", + "客户发展1部张楚千组" + ], + [ + "file", + "1422", + "客户发展1部王文轩组" + ], + [ + "file", + "1524", + "客户发展1部龙雅倩组" + ] + ], + "1136": + [ + [ + "file", + "1137", + "VIP客户1组" + ], + [ + "file", + "1138", + "VIP客户2组" + ] + ], + "115": + [ + [ + "file", + "118", + "B7部" + ] + ], + "1140": + [ + [ + "file", + "1141", + "事业五部一组" + ], + [ + "file", + "1142", + "事业五部二组" + ], + [ + "file", + "1143", + "事业五部三组" + ], + [ + "file", + "1533", + "咨询部" + ], + [ + "file", + "1857", + "事业五部四组" + ] + ], + "1144": + [ + [ + "file", + "1145", + "事业六部一组" + ], + [ + "file", + "1146", + "事业六部二组" + ], + [ + "file", + "1147", + "事业六部三组" + ] + ], + "121": + [ + [ + "file", + "122", + "开发部" + ], + [ + "file", + "1794", + "维护部" + ] + ], + "1148": + [ + [ + "file", + "1150", + "事业七部一组" + ] + ], + "1149": + [ + [ + "file", + "1151", + "事业八部一组" + ] + ], + "128": + [ + [ + "folder", + "131", + "客户发展部" + ], + [ + "folder", + "138", + "业务支持部" + ], + [ + "file", + "142", + "合同部" + ], + [ + "file", + "143", + "财务部" + ], + [ + "folder", + "825", + "增值服务部" + ], + [ + "file", + "1223", + "市场部" + ], + [ + "file", + "1368", + "培训部" + ] + ], + "1155": + [ + [ + "folder", + "280", + "潍坊点睛网络科技有限公司" + ] + ], + "132": + [ + [ + "file", + "136", + "一部7组李松" + ], + [ + "file", + "145", + "一部3组刘军虎" + ], + [ + "file", + "146", + "一部5组郑松柏" + ], + [ + "file", + "149", + "一部4组宋贝贝" + ], + [ + "file", + "155", + "一部2组" + ], + [ + "file", + "894", + "一部9组安荣" + ], + [ + "file", + "1346", + "一部6组董兰兰" + ], + [ + "file", + "1727", + "一部8组王东" + ] + ], + "133": + [ + [ + "file", + "144", + "二部2组李娜" + ], + [ + "file", + "150", + "二部3组刘洪雪" + ], + [ + "file", + "1103", + "二部1组徐双喜" + ], + [ + "file", + "1921", + "二部4组杨海芹" + ] + ], + "134": + [ + [ + "file", + "156", + "三部1组陈锦云" + ], + [ + "file", + "1515", + "三部2组周平平" + ], + [ + "file", + "1748", + "三部3组韩艳" + ] + ], + "135": + [ + [ + "file", + "212", + "四部1组葛金霞" + ], + [ + "file", + "1858", + "四部2组李钏瑜" + ], + [ + "file", + "1959", + "四部3组侯亚军" + ], + [ + "file", + "1961", + "四部4组周亮亮" + ] + ], + "1152": + [ + [ + "file", + "1153", + "客户发展5部1组" + ], + [ + "file", + "1154", + "客户发展5部2组" + ], + [ + "file", + "1795", + "客户发展5部4组" + ] + ], + "138": + [ + [ + "file", + "139", + "预审组" + ], + [ + "file", + "140", + "资质组" + ], + [ + "file", + "141", + "开户组" + ] + ], + "131": + [ + [ + "folder", + "132", + "客户发展一部贾少魁" + ], + [ + "folder", + "133", + "客户发展二部谢秀丽" + ], + [ + "folder", + "134", + "客户发展三部陈锦云" + ], + [ + "folder", + "135", + "客户发展四部葛金霞" + ], + [ + "file", + "137", + "售前审核" + ], + [ + "folder", + "431", + "客户发展在线营销部" + ], + [ + "folder", + "492", + "客户发展六部" + ], + [ + "folder", + "600", + "客户发展五部" + ], + [ + "folder", + "990", + "客户发展VIP部" + ], + [ + "file", + "1315", + "海外华东客户部" + ] + ], + "1156": + [ + [ + "folder", + "1157", + "新开客户部" + ], + [ + "folder", + "1158", + "普通客户部" + ], + [ + "folder", + "1159", + "VIP客户部" + ] + ], + "124": + [ + [ + "file", + "125", + "E1部" + ], + [ + "file", + "126", + "客服八部" + ], + [ + "file", + "1814", + "客服九部" + ] + ], + "1158": + [ + [ + "file", + "1161", + "普通客户1组" + ], + [ + "file", + "1465", + "普通客户2组" + ], + [ + "file", + "1816", + "普通客户F组" + ] + ], + "1159": + [ + [ + "file", + "1162", + "VIP客户1组" + ] + ], + "1170": + [ + [ + "file", + "1171", + "事业三部一组" + ], + [ + "file", + "1172", + "事业三部二组" + ], + [ + "file", + "1173", + "事业三部三组" + ], + [ + "file", + "1263", + "事业三部五组" + ], + [ + "file", + "1314", + "事业三部四部" + ] + ], + "1157": + [ + [ + "file", + "1160", + "新开客户1组" + ] + ], + "1181": + [ + [ + "folder", + "1182", + "客户发展部" + ], + [ + "folder", + "1183", + "业务支持部" + ], + [ + "file", + "1184", + "合同部" + ], + [ + "file", + "1185", + "财务部" + ], + [ + "file", + "1199", + "代理商培训部" + ], + [ + "folder", + "1225", + "增值服务部" + ], + [ + "file", + "1264", + "市场部" + ] + ], + "1182": + [ + [ + "folder", + "1186", + "客户发展一部" + ], + [ + "folder", + "1187", + "客户发展二部" + ], + [ + "folder", + "1188", + "客户发展三部" + ], + [ + "folder", + "1189", + "客户发展四部" + ], + [ + "file", + "1204", + "售前审核部" + ] + ], + "1183": + [ + [ + "file", + "1190", + "预审核组" + ], + [ + "file", + "1191", + "资质上传组" + ], + [ + "file", + "1192", + "开户组" + ] + ], + "1186": + [ + [ + "file", + "1193", + "客户发展一部一组" + ] + ], + "1187": + [ + [ + "file", + "1194", + "客户发展二部一组" + ] + ], + "1188": + [ + [ + "file", + "1195", + "客户发展三部一组" + ] + ], + "1189": + [ + [ + "file", + "1196", + "客户发展四部一组" + ] + ], + "166": + [ + [ + "file", + "167", + "事业四部一组" + ] + ], + "168": + [ + [ + "folder", + "169", + "大连通鼎网络科技有限责任公司" + ], + [ + "folder", + "517", + "哈尔滨市添翼鸿图网络科技开发有限责任公司" + ], + [ + "folder", + "550", + "沈阳奇搜网络技术有限公司" + ], + [ + "folder", + "1565", + "吉林省千讯网络科技有限公司" + ] + ], + "169": + [ + [ + "folder", + "192", + "客户发展部" + ], + [ + "folder", + "195", + "业务支持部" + ], + [ + "file", + "199", + "合同部" + ], + [ + "file", + "200", + "财务部" + ], + [ + "folder", + "924", + "增值服务部" + ], + [ + "file", + "1064", + "培训部" + ], + [ + "file", + "1209", + "市场部" + ] + ], + "170": + [ + [ + "folder", + "171", + "河南三百六信息技术有限公司" + ], + [ + "folder", + "404", + "新乡点搜网络科技有限公司" + ] + ], + "171": + [ + [ + "folder", + "173", + "客户发展部" + ], + [ + "file", + "174", + "财务部" + ], + [ + "file", + "175", + "合同管理部" + ], + [ + "folder", + "176", + "业务支持部" + ], + [ + "folder", + "729", + "增值服务部" + ], + [ + "file", + "1056", + "代理商培训部" + ], + [ + "file", + "1219", + "市场部" + ] + ], + "172": + [ + [ + "file", + "178", + "蜀山一部" + ], + [ + "file", + "180", + "蜀山二部" + ], + [ + "file", + "181", + "蜀山三部" + ], + [ + "file", + "187", + "蜀山五部" + ], + [ + "file", + "664", + "蜀山六部" + ], + [ + "file", + "1310", + "蜀山四部" + ] + ], + "173": + [ + [ + "folder", + "172", + "蜀山派" + ], + [ + "folder", + "177", + "昆仑派" + ], + [ + "file", + "185", + "武当派" + ], + [ + "file", + "191", + "售前审核部" + ], + [ + "file", + "211", + "大客户部" + ], + [ + "file", + "1317", + "商务三部" + ] + ], + "176": + [ + [ + "file", + "188", + "预审核组" + ], + [ + "file", + "189", + "开户组" + ], + [ + "file", + "190", + "资质上传组" + ] + ], + "177": + [ + [ + "file", + "179", + "昆仑二部" + ], + [ + "file", + "182", + "昆仑四部" + ], + [ + "file", + "183", + "昆仑五部" + ], + [ + "file", + "184", + "昆仑六部" + ], + [ + "file", + "186", + "昆仑一部" + ], + [ + "file", + "802", + "昆仑三部" + ], + [ + "file", + "1675", + "昆仑七部" + ] + ], + "192": + [ + [ + "folder", + "193", + "客户发展1部" + ], + [ + "file", + "207", + "售前审核部" + ], + [ + "folder", + "1423", + "客户发展2部" + ] + ], + "193": + [ + [ + "file", + "194", + "客户发展1部6组" + ], + [ + "folder", + "201", + "客户发展1部2组" + ], + [ + "file", + "203", + "客户发展1部8组" + ], + [ + "file", + "204", + "客户发展1部1组" + ], + [ + "folder", + "206", + "客户发展1部3组" + ], + [ + "file", + "403", + "客户发展1部11组" + ], + [ + "file", + "428", + "客户发展1部9组" + ], + [ + "file", + "942", + "客户发展1部10组" + ], + [ + "file", + "1117", + "客户发展1部7组" + ] + ], + "195": + [ + [ + "file", + "196", + "预审核组" + ], + [ + "file", + "197", + "资质上传组" + ], + [ + "file", + "198", + "开户组" + ] + ], + "201": + [ + [ + "file", + "1424", + "客户发展2部" + ] + ], + "202": + [ + [ + "file", + "1116", + "客服发展2部6组" + ] + ], + "1227": + [ + [ + "file", + "1230", + "新开客户一组" + ] + ], + "1228": + [ + [ + "file", + "1231", + "普通客户一组" + ], + [ + "file", + "1686", + "普通客户二组" + ], + [ + "file", + "1965", + "普通客户三组" + ] + ], + "1229": + [ + [ + "file", + "1232", + "VIP客户一组" + ] + ], + "206": + [ + [ + "folder", + "1426", + "客户发展1部3组" + ] + ], + "1225": + [ + [ + "folder", + "1227", + "新开客户部" + ], + [ + "folder", + "1228", + "普通客户部" + ], + [ + "folder", + "1229", + "VIP客户部" + ] + ], + "1236": + [ + [ + "file", + "1237", + "市场部" + ] + ], + "214": + [ + [ + "folder", + "215", + "青岛搜讯传媒有限公司" + ], + [ + "folder", + "373", + "河北昱泰天成电子科技有限公司" + ], + [ + "folder", + "435", + "淄博新讯网络科技有限公司" + ], + [ + "folder", + "1155", + "潍坊" + ], + [ + "folder", + "1805", + "济南" + ] + ], + "215": + [ + [ + "file", + "217", + "商务一部" + ], + [ + "file", + "218", + "商务二部" + ], + [ + "file", + "219", + "商务三部" + ], + [ + "file", + "220", + "财务部" + ], + [ + "folder", + "221", + "客服部" + ], + [ + "folder", + "223", + "客户发展部" + ], + [ + "folder", + "224", + "业务支持部" + ], + [ + "file", + "225", + "合同部" + ], + [ + "folder", + "915", + "增值服务部" + ], + [ + "file", + "1066", + "培训部" + ], + [ + "file", + "1217", + "市场部" + ], + [ + "file", + "1507", + "商务四部" + ] + ], + "216": + [ + [ + "folder", + "497", + "三六零信息技术江苏有限公司" + ], + [ + "folder", + "1558", + "苏州区域" + ], + [ + "folder", + "1623", + "南京区域" + ] + ], + "221": + [ + [ + "file", + "222", + "商务部" + ] + ], + "223": + [ + [ + "folder", + "226", + "商务一部" + ], + [ + "folder", + "227", + "商务二部" + ], + [ + "file", + "229", + "售前审核部" + ], + [ + "folder", + "402", + "商务三部" + ], + [ + "folder", + "1025", + "烟台分公司" + ], + [ + "file", + "1503", + "商务部门" + ], + [ + "file", + "1504", + "李硕队" + ], + [ + "file", + "1505", + "商务3部" + ], + [ + "file", + "1508", + "商务4部" + ], + [ + "folder", + "1669", + "失效部门" + ] + ], + "224": + [ + [ + "file", + "230", + "预审核组" + ], + [ + "file", + "231", + "资质上传组" + ], + [ + "file", + "232", + "开户组" + ] + ], + "1249": + [ + [ + "folder", + "1181", + "云南酷虎科技有限公司" + ] + ], + "226": + [ + [ + "file", + "1097", + "贾自健" + ], + [ + "file", + "1098", + "史超" + ], + [ + "file", + "1502", + "杨超" + ] + ], + "227": + [ + [ + "file", + "1048", + "王炳凯" + ], + [ + "file", + "1099", + "张雯" + ], + [ + "file", + "1100", + "头狼队" + ], + [ + "file", + "1501", + "空白" + ] + ], + "228": + [ + [ + "file", + "1506", + "2部" + ] + ], + "1254": + [ + [ + "file", + "1534", + "G1部" + ], + [ + "file", + "1535", + "G2部" + ], + [ + "file", + "1536", + "G3部" + ], + [ + "file", + "1538", + "G咨询组" + ], + [ + "file", + "1609", + "G5部" + ], + [ + "file", + "1614", + "G4部" + ], + [ + "file", + "1716", + "G6部" + ], + [ + "file", + "1796", + "G销售新人部" + ], + [ + "file", + "1852", + "G销售7部" + ] + ], + "1255": + [ + [ + "folder", + "432", + "宁波市派格网络科技有限公司" + ] + ], + "1248": + [ + [ + "folder", + "1683", + "合肥区域" + ] + ], + "233": + [ + [ + "folder", + "234", + "客户发展部" + ], + [ + "folder", + "248", + "业务支持部" + ], + [ + "file", + "249", + "合同部" + ], + [ + "file", + "250", + "财务部" + ], + [ + "folder", + "801", + "增值服务部" + ], + [ + "file", + "1069", + "培训部" + ], + [ + "file", + "1215", + "市场部" + ] + ], + "234": + [ + [ + "file", + "247", + "售前审核部" + ], + [ + "folder", + "254", + "苏州销售部" + ], + [ + "folder", + "255", + "常熟销售部" + ], + [ + "folder", + "256", + "昆山销售部" + ], + [ + "folder", + "1252", + "南通销售部" + ], + [ + "folder", + "1381", + "张家港销售部" + ], + [ + "folder", + "1382", + "盐城销售部" + ], + [ + "folder", + "1676", + "创业园" + ], + [ + "file", + "1922", + "大客户部" + ] + ], + "1252": + [ + [ + "file", + "1262", + "南通销售一部" + ], + [ + "file", + "1498", + "南通销售二部" + ], + [ + "file", + "1499", + "南通销售三部" + ], + [ + "file", + "1615", + "南通销售四部" + ] + ], + "1256": + [ + [ + "file", + "1257", + "一部" + ] + ], + "1266": + [ + [ + "folder", + "1270", + "销售1组" + ], + [ + "file", + "1271", + "销售2组" + ], + [ + "file", + "1272", + "销售3组" + ], + [ + "file", + "1273", + "SEM" + ] + ], + "1267": + [ + [ + "folder", + "1274", + "电商组" + ], + [ + "folder", + "1275", + "非电商组" + ], + [ + "folder", + "1276", + "品牌组" + ] + ], + "1268": + [ + [ + "file", + "1277", + "4A" + ], + [ + "file", + "1278", + "local" + ], + [ + "file", + "1279", + "sem" + ] + ], + "1269": + [ + [ + "folder", + "1933", + "合同审核组" + ] + ], + "1270": + [ + [ + "file", + "1316", + "销售1组A" + ] + ], + "248": + [ + [ + "file", + "251", + "预审核组" + ], + [ + "file", + "252", + "资质上传组" + ], + [ + "file", + "253", + "开户组" + ] + ], + "1274": + [ + [ + "folder", + "1280", + "电商1组" + ], + [ + "folder", + "1281", + "电商2组" + ], + [ + "file", + "1668", + "电商3组" + ] + ], + "1275": + [ + [ + "file", + "1284", + "非电商1组" + ], + [ + "folder", + "1285", + "非电商2组" + ] + ], + "1276": + [ + [ + "file", + "1290", + "品牌1组" + ], + [ + "file", + "1291", + "品牌2组" + ], + [ + "file", + "1292", + "品牌3组" + ] + ], + "254": + [ + [ + "file", + "235", + "苏州销售1部" + ], + [ + "file", + "237", + "苏州销售3部" + ], + [ + "file", + "238", + "苏州销售4部" + ], + [ + "file", + "239", + "苏州销售5部" + ], + [ + "file", + "240", + "苏州销售6部" + ], + [ + "file", + "241", + "苏州销售8部" + ], + [ + "file", + "601", + "苏州销售9部" + ], + [ + "file", + "632", + "苏州销售10部" + ], + [ + "file", + "728", + "苏州销售11部" + ], + [ + "file", + "1383", + "苏州销售2部" + ] + ], + "255": + [ + [ + "file", + "242", + "常熟销售1部" + ], + [ + "file", + "1093", + "常熟销售2部" + ] + ], + "1280": + [ + [ + "file", + "1282", + "电商1组A" + ], + [ + "file", + "1283", + "电商1组B" + ] + ], + "1281": + [ + [ + "file", + "1329", + "电商2组A" + ], + [ + "file", + "1330", + "电商2组B" + ] + ], + "258": + [ + [ + "file", + "257", + "重庆区域" + ], + [ + "folder", + "279", + "成都龙擎网络科技有限公司" + ] + ], + "259": + [ + [ + "folder", + "260", + "客户发展部" + ], + [ + "folder", + "273", + "业务支持部" + ], + [ + "file", + "274", + "合同部" + ], + [ + "file", + "275", + "财务部" + ], + [ + "folder", + "651", + "增值服务部" + ], + [ + "folder", + "1080", + "代理商培训部" + ], + [ + "folder", + "1236", + "市场部" + ] + ], + "260": + [ + [ + "folder", + "261", + "客户发展1部" + ], + [ + "folder", + "262", + "客户发展2部" + ], + [ + "file", + "263", + "客户发展3部" + ], + [ + "file", + "272", + "售前审核部" + ] + ], + "1285": + [ + [ + "file", + "1286", + "非电商2组A" + ], + [ + "file", + "1287", + "非电商2组B" + ], + [ + "file", + "1288", + "非电商2组C" + ], + [ + "file", + "1289", + "非电商2组D" + ] + ], + "262": + [ + [ + "file", + "270", + "客户发展2部7组" + ], + [ + "file", + "271", + "客户发展2部3组" + ], + [ + "file", + "595", + "客户发展2部10组" + ], + [ + "file", + "1601", + "客户发展2部8组" + ] + ], + "256": + [ + [ + "file", + "243", + "昆太销售1部" + ], + [ + "file", + "244", + "昆太销售2部" + ], + [ + "file", + "245", + "昆太销售3部" + ], + [ + "file", + "246", + "昆太销售5部" + ] + ], + "1293": + [ + [ + "file", + "1297", + "渠道" + ], + [ + "folder", + "1298", + "直客" + ] + ], + "273": + [ + [ + "file", + "276", + "预审核组" + ], + [ + "file", + "277", + "资质上传组" + ], + [ + "file", + "278", + "开户组" + ] + ], + "1298": + [ + [ + "file", + "1302", + "导航组" + ], + [ + "file", + "1304", + "KA组" + ] + ], + "261": + [ + [ + "file", + "264", + "客户发展1部1组" + ], + [ + "file", + "265", + "客户发展1部2组" + ], + [ + "file", + "266", + "客户发展1部3组" + ], + [ + "file", + "267", + "客户发展1部4组" + ], + [ + "file", + "268", + "客户发展1部5组" + ], + [ + "file", + "269", + "客户发展1部6组" + ], + [ + "file", + "1622", + "客户发展1部新兵营" + ], + [ + "file", + "1671", + "客户发展1部9组" + ], + [ + "file", + "1672", + "客户发展1部其他" + ] + ], + "279": + [ + [ + "folder", + "296", + "客户发展部" + ], + [ + "file", + "307", + "售前审核部" + ], + [ + "folder", + "308", + "业务支持部" + ], + [ + "file", + "312", + "合同部" + ], + [ + "file", + "313", + "财务部" + ], + [ + "folder", + "963", + "增值服务部" + ], + [ + "file", + "1072", + "代理商培训部" + ], + [ + "file", + "1222", + "市场部" + ] + ], + "280": + [ + [ + "folder", + "281", + "客户发展部" + ], + [ + "folder", + "282", + "业务支持部" + ], + [ + "file", + "283", + "合同部" + ], + [ + "file", + "284", + "财务部" + ], + [ + "folder", + "902", + "增值服务部" + ], + [ + "file", + "1134", + "代理商培训部" + ], + [ + "file", + "1207", + "市场部" + ] + ], + "281": + [ + [ + "folder", + "285", + "潍坊商务部" + ], + [ + "folder", + "286", + "商务二部" + ], + [ + "file", + "287", + "客户转化部" + ], + [ + "file", + "288", + "售前审核部" + ], + [ + "folder", + "343", + "推广部" + ], + [ + "file", + "914", + "商务四部" + ], + [ + "file", + "940", + "商务三部" + ], + [ + "file", + "1347", + "商务七部" + ], + [ + "file", + "1348", + "商务八部" + ], + [ + "file", + "1454", + "商务五部" + ], + [ + "folder", + "1460", + "临沂商务部" + ] + ], + "282": + [ + [ + "file", + "289", + "预审核组" + ], + [ + "file", + "290", + "资质上传组" + ], + [ + "file", + "291", + "开户组" + ] + ], + "285": + [ + [ + "file", + "1544", + "新兵营" + ], + [ + "folder", + "1545", + "一区" + ], + [ + "folder", + "1546", + "二区" + ] + ], + "286": + [ + [ + "file", + "470", + "商务二部1组" + ], + [ + "file", + "607", + "商务二部2组" + ] + ], + "1306": + [ + [ + "file", + "1307", + "品牌直达&CPC组" + ], + [ + "file", + "1308", + "导航固定位置组" + ] + ], + "292": + [ + [ + "folder", + "1015", + "广西南宁一伙人网络科技有限公司" + ], + [ + "folder", + "1819", + "海南一伙人网络科技有限公司" + ] + ], + "293": + [ + [ + "folder", + "314", + "客户发展部" + ], + [ + "folder", + "329", + "业务支持部" + ], + [ + "file", + "334", + "合同部" + ], + [ + "file", + "335", + "财务部" + ], + [ + "folder", + "895", + "增值服务部" + ], + [ + "file", + "1070", + "武汉奇搜培训部" + ], + [ + "file", + "1214", + "市场部" + ] + ], + "1319": + [ + [ + "file", + "677", + "其他部门" + ], + [ + "file", + "1674", + "CSC部门" + ] + ], + "296": + [ + [ + "folder", + "297", + "客户发展唐滔部" + ], + [ + "folder", + "342", + "客户发展培训组" + ], + [ + "file", + "495", + "客户发展客服提单部" + ], + [ + "folder", + "1123", + "客户发展刘侵江部" + ], + [ + "folder", + "1127", + "客服发展二级城市部" + ], + [ + "folder", + "1431", + "客户发展颜强部" + ], + [ + "folder", + "1433", + "客户发展刘庆生部" + ], + [ + "file", + "1745", + "客户发展支持部门提单部" + ] + ], + "297": + [ + [ + "file", + "299", + "客户发展1部2组" + ], + [ + "file", + "301", + "客户发展1部4组" + ], + [ + "file", + "302", + "客户发展1部5组" + ], + [ + "file", + "304", + "客户发展1部7组" + ], + [ + "file", + "305", + "客户发展1部8组" + ], + [ + "file", + "306", + "客户发展1部9组" + ], + [ + "file", + "1115", + "客户发展1部15组" + ], + [ + "file", + "1126", + "客户发展1部3组" + ], + [ + "file", + "1325", + "客户发展1部14组" + ], + [ + "file", + "1326", + "客户发展1部16组" + ], + [ + "file", + "1788", + "客户发展2部郭振华组" + ] + ], + "1324": + [ + [ + "file", + "1421", + "客户发展1部王文轩组" + ] + ], + "1332": + [ + [ + "file", + "1497", + "渠道部" + ] + ], + "1333": + [ + [ + "file", + "477", + "事业一部四组" + ], + [ + "file", + "478", + "事业一部五组" + ], + [ + "file", + "480", + "事业一部七组" + ], + [ + "file", + "481", + "事业一部八组" + ], + [ + "file", + "606", + "事业一部十组" + ], + [ + "file", + "1378", + "事业一部七组" + ] + ], + "1334": + [ + [ + "file", + "475", + "事业一部二组" + ], + [ + "file", + "476", + "事业一部三组" + ], + [ + "file", + "479", + "事业一部六组" + ], + [ + "file", + "602", + "事业一部九组" + ], + [ + "file", + "628", + "事业一部一组" + ] + ], + "314": + [ + [ + "folder", + "315", + "客户发展1部" + ], + [ + "folder", + "317", + "客户发展2部" + ], + [ + "folder", + "318", + "客户发展4部" + ], + [ + "file", + "328", + "售前审核部" + ], + [ + "folder", + "1152", + "客户发展5部" + ] + ], + "315": + [ + [ + "file", + "316", + "客户发展1部1组" + ], + [ + "file", + "319", + "客户发展1部2组" + ], + [ + "file", + "320", + "客户发展1部3组" + ] + ], + "1340": + [ + [ + "file", + "1725", + "汕头销售1部" + ], + [ + "file", + "1726", + "汕头销售2部" + ] + ], + "317": + [ + [ + "file", + "321", + "客户发展2部1组" + ], + [ + "file", + "322", + "客户发展2部2组" + ], + [ + "file", + "323", + "客户发展2部3组" + ], + [ + "file", + "712", + "客户发展2部4组" + ] + ], + "318": + [ + [ + "file", + "324", + "客户发展4部1组" + ], + [ + "file", + "325", + "客户发展4部2组" + ], + [ + "file", + "326", + "客户发展4部3组" + ], + [ + "file", + "327", + "客户发展4部4组" + ] + ], + "1349": + [ + [ + "folder", + "1350", + "客户发展部" + ], + [ + "folder", + "1362", + "业务支持部" + ], + [ + "file", + "1366", + "合同部" + ], + [ + "file", + "1367", + "财务部" + ], + [ + "folder", + "1371", + "增值服务部" + ], + [ + "file", + "1384", + "市场部" + ], + [ + "folder", + "1514", + "培训部" + ] + ], + "1350": + [ + [ + "folder", + "1351", + "客户发展1部" + ], + [ + "folder", + "1353", + "客户发展2部" + ], + [ + "folder", + "1355", + "客户发展3部" + ], + [ + "folder", + "1357", + "客户发展4部" + ], + [ + "folder", + "1359", + "客户发展5部" + ], + [ + "file", + "1361", + "售前审核部" + ], + [ + "folder", + "1553", + "黄山事业部" + ], + [ + "folder", + "1590", + "马鞍山事业部" + ] + ], + "1351": + [ + [ + "file", + "1352", + "客户发展1部1组" + ] + ], + "1353": + [ + [ + "file", + "1354", + "客户发展2部1组" + ], + [ + "file", + "1543", + "客户发展2部2组" + ] + ], + "1355": + [ + [ + "file", + "1356", + "客户发展3部1组" + ] + ], + "332": + [ + [ + "file", + "339", + "开户组1组" + ], + [ + "file", + "340", + "开户组2组" + ], + [ + "file", + "341", + "开户组3组" + ] + ], + "1357": + [ + [ + "file", + "1358", + "客户发展4部1组" + ] + ], + "1359": + [ + [ + "file", + "1360", + "客户发展5部1组" + ] + ], + "329": + [ + [ + "file", + "330", + "预审核组" + ], + [ + "folder", + "331", + "资质上传组" + ], + [ + "folder", + "332", + "开户组" + ], + [ + "file", + "333", + "合同部" + ] + ], + "1362": + [ + [ + "file", + "1363", + "预审核组" + ], + [ + "file", + "1364", + "资质上传组" + ], + [ + "file", + "1365", + "开户组" + ] + ], + "331": + [ + [ + "file", + "336", + "资质上传1组" + ], + [ + "file", + "337", + "资质上传2组" + ], + [ + "file", + "338", + "资质上传3组" + ] + ], + "342": + [ + [ + "file", + "298", + "客户发展2部罗海月组" + ], + [ + "file", + "1110", + "客户发展1部赵颖凤组" + ] + ], + "343": + [ + [ + "file", + "344", + "禁用1组" + ], + [ + "file", + "345", + "商务六部2组" + ], + [ + "file", + "346", + "商务六部3组" + ], + [ + "file", + "347", + "推广2组" + ] + ], + "308": + [ + [ + "file", + "309", + "预审核组" + ], + [ + "file", + "310", + "资质上传组" + ], + [ + "file", + "311", + "开户组" + ] + ], + "1371": + [ + [ + "folder", + "1372", + "新开客户部" + ], + [ + "folder", + "1374", + "普通客户部" + ], + [ + "folder", + "1376", + "VIP客户部" + ] + ], + "348": + [ + [ + "folder", + "349", + "杭州广桥集客网络技术有限公司" + ], + [ + "folder", + "1255", + "宁波" + ] + ], + "349": + [ + [ + "folder", + "350", + "客户发展部" + ], + [ + "folder", + "367", + "业务支持部" + ], + [ + "file", + "371", + "合同部" + ], + [ + "file", + "372", + "财务部" + ], + [ + "folder", + "778", + "增值服务部" + ], + [ + "folder", + "1058", + "培训管理" + ], + [ + "file", + "1203", + "市场部" + ] + ], + "350": + [ + [ + "folder", + "351", + "客户发展一部" + ], + [ + "folder", + "357", + "客户发展二部" + ], + [ + "folder", + "361", + "客户发展三部" + ], + [ + "file", + "366", + "售前审核部" + ], + [ + "file", + "663", + "大客户部" + ] + ], + "351": + [ + [ + "file", + "352", + "客户发展一部一组" + ], + [ + "file", + "353", + "客户发展一部二组" + ], + [ + "file", + "354", + "客户发展一部三组" + ], + [ + "file", + "355", + "客户发展一部四组" + ], + [ + "file", + "356", + "客户发展一部五组" + ], + [ + "file", + "631", + "客户发展一部六组" + ] + ], + "1376": + [ + [ + "file", + "1377", + "VIP客户一组" + ] + ], + "1372": + [ + [ + "file", + "1373", + "新开客户一组" + ] + ], + "1381": + [ + [ + "file", + "1101", + "张家港销售部" + ] + ], + "1382": + [ + [ + "file", + "236", + "盐城销售一部" + ] + ], + "361": + [ + [ + "file", + "362", + "客户发展三部一组" + ], + [ + "file", + "363", + "客户发展三部二组" + ], + [ + "file", + "364", + "客户发展三部三组" + ], + [ + "file", + "365", + "客户发展三部四组" + ] + ], + "1387": + [ + [ + "file", + "1388", + "代理商总经理" + ], + [ + "folder", + "1389", + "客户发展部" + ], + [ + "folder", + "1390", + "业务支持部" + ], + [ + "file", + "1391", + "合同部" + ], + [ + "file", + "1392", + "财务部" + ], + [ + "folder", + "1404", + "增值服务部" + ], + [ + "file", + "1679", + "培训部" + ], + [ + "file", + "1927", + "市场部" + ] + ], + "357": + [ + [ + "file", + "358", + "客户发展二部一组" + ], + [ + "file", + "359", + "客户发展二部二组" + ], + [ + "file", + "360", + "客户发展二部三组" + ] + ], + "1390": + [ + [ + "file", + "1397", + "业务支持部" + ], + [ + "file", + "1416", + "预审核组" + ], + [ + "file", + "1417", + "资质上传组" + ], + [ + "file", + "1418", + "开户组" + ] + ], + "1374": + [ + [ + "file", + "1375", + "普通客户一组" + ] + ], + "1393": + [ + [ + "file", + "1398", + "客户发展2部1组" + ], + [ + "file", + "1399", + "客户发展2部2组" + ] + ], + "1394": + [ + [ + "file", + "1400", + "客户发展4部1组" + ], + [ + "file", + "1401", + "客户发展4部2组" + ] + ], + "1395": + [ + [ + "file", + "1402", + "客户发展1部1组" + ], + [ + "file", + "1403", + "客户发展1部2组" + ] + ], + "373": + [ + [ + "folder", + "374", + "客户发展部" + ], + [ + "folder", + "375", + "业务支持部" + ], + [ + "file", + "376", + "合同部" + ], + [ + "file", + "377", + "财务部" + ], + [ + "folder", + "739", + "增值服务部" + ], + [ + "file", + "1061", + "培训部" + ], + [ + "file", + "1218", + "市场部" + ] + ], + "374": + [ + [ + "folder", + "378", + "客户发展一部" + ], + [ + "folder", + "379", + "客户发展二部" + ], + [ + "folder", + "380", + "客户发展三部" + ], + [ + "folder", + "381", + "客户发展四部" + ], + [ + "file", + "401", + "售前审核部" + ], + [ + "folder", + "405", + "客户发展七部" + ], + [ + "folder", + "426", + "客户发展五部" + ] + ], + "375": + [ + [ + "file", + "382", + "预审核组" + ], + [ + "file", + "383", + "资质上传组" + ], + [ + "file", + "384", + "开户组" + ] + ], + "378": + [ + [ + "file", + "385", + "客户发展一部1组" + ], + [ + "file", + "386", + "客户发展一部2组" + ], + [ + "file", + "387", + "客户发展一部3组" + ], + [ + "file", + "633", + "客户发展一部4组" + ], + [ + "file", + "1260", + "客户发展一部5组" + ], + [ + "file", + "1265", + "客户发展一部6组" + ] + ], + "379": + [ + [ + "file", + "389", + "客户发展二部4组" + ], + [ + "file", + "390", + "客户发展二部5组" + ], + [ + "file", + "391", + "客户发展二部2组" + ], + [ + "file", + "392", + "客户发展二部1组" + ], + [ + "file", + "393", + "客户发展二部3组" + ] + ], + "380": + [ + [ + "file", + "394", + "客户发展三部4组" + ], + [ + "file", + "395", + "客户发展三部5组" + ], + [ + "file", + "396", + "客户发展三部1组" + ], + [ + "file", + "397", + "客户发展三部3组" + ], + [ + "file", + "398", + "客户发展三部2组" + ] + ], + "381": + [ + [ + "file", + "399", + "客户发展四部1组" + ], + [ + "file", + "1489", + "客户发展四部2组" + ], + [ + "file", + "1670", + "客户发展四部3组" + ], + [ + "file", + "1685", + "客户发展四部4组" + ] + ], + "1389": + [ + [ + "folder", + "1393", + "客户发展2部" + ], + [ + "folder", + "1394", + "客户发展4部" + ], + [ + "folder", + "1395", + "客户发展1部" + ], + [ + "file", + "1396", + "售前审核组" + ], + [ + "folder", + "1466", + "客户发展3部" + ], + [ + "folder", + "1539", + "客户发展6部" + ], + [ + "folder", + "1861", + "客户发展5部" + ] + ], + "1407": + [ + [ + "file", + "1408", + "普通客户1组" + ], + [ + "file", + "1409", + "普通客户2组" + ], + [ + "file", + "1410", + "普通客户3组" + ], + [ + "file", + "1411", + "普通客户4组" + ] + ], + "367": + [ + [ + "file", + "368", + "预审核组" + ], + [ + "file", + "369", + "资质上传组" + ], + [ + "file", + "370", + "开户组" + ] + ], + "1404": + [ + [ + "folder", + "1405", + "新开客户部" + ], + [ + "folder", + "1406", + "VIP客户部" + ], + [ + "folder", + "1407", + "普通客户部" + ] + ], + "1405": + [ + [ + "file", + "1412", + "新开客户部1组" + ], + [ + "file", + "1542", + "新开客户部2组" + ], + [ + "file", + "1549", + "新开客户部3组" + ] + ], + "1406": + [ + [ + "file", + "1413", + "VIP客户部1组" + ] + ], + "1423": + [ + [ + "folder", + "202", + "客户发展2部5组" + ], + [ + "file", + "205", + "客户发展2部4组" + ], + [ + "file", + "1425", + "客户发展2部2组" + ], + [ + "file", + "1428", + "客户发展2部3组" + ], + [ + "file", + "1429", + "客户发展2部1组" + ], + [ + "file", + "1430", + "客户发展0部" + ] + ], + "1426": + [ + [ + "file", + "1427", + "客户发展1部3组" + ] + ], + "404": + [ + [ + "folder", + "407", + "商务部" + ], + [ + "folder", + "408", + "业务支持部" + ], + [ + "folder", + "409", + "合同部" + ], + [ + "folder", + "410", + "财务部" + ], + [ + "folder", + "751", + "增值服务部" + ], + [ + "file", + "1083", + "培训部" + ], + [ + "file", + "1224", + "市场部" + ] + ], + "405": + [ + [ + "file", + "406", + "客户发展七部一组" + ], + [ + "file", + "596", + "客户发展七部二组" + ], + [ + "file", + "597", + "客户发展七部三组" + ], + [ + "file", + "629", + "客户发展七部五组" + ], + [ + "file", + "630", + "客户发展七部四组" + ] + ], + "407": + [ + [ + "folder", + "411", + "商务1部" + ], + [ + "folder", + "412", + "商务2部" + ], + [ + "file", + "425", + "售前审核部" + ] + ], + "408": + [ + [ + "file", + "420", + "预审核组" + ], + [ + "file", + "423", + "资质上传组" + ], + [ + "file", + "424", + "开户组" + ] + ], + "409": + [ + [ + "file", + "421", + "合同组" + ] + ], + "402": + [ + [ + "file", + "1509", + "狼牙队" + ], + [ + "file", + "1510", + "战狼队" + ], + [ + "file", + "1954", + "王寅勐" + ], + [ + "file", + "1955", + "周国亮" + ] + ], + "411": + [ + [ + "file", + "413", + "商务1部1组" + ], + [ + "file", + "414", + "商务1部2组" + ], + [ + "file", + "415", + "商务1部3组" + ] + ], + "1436": + [ + [ + "folder", + "21", + "北京区域" + ], + [ + "folder", + "168", + "东北区域" + ], + [ + "folder", + "214", + "山东&河北区域" + ] + ], + "1437": + [ + [ + "folder", + "56", + "上海区域" + ], + [ + "folder", + "216", + "江苏区域" + ] + ], + "1438": + [ + [ + "folder", + "348", + "浙江区域" + ], + [ + "folder", + "1248", + "安徽区域" + ], + [ + "folder", + "1684", + "芜湖&温州区域" + ] + ], + "1439": + [ + [ + "folder", + "57", + "广东区域" + ], + [ + "folder", + "665", + "湖南&江西区域" + ], + [ + "folder", + "1440", + "福建区域" + ], + [ + "folder", + "1867", + "深圳区域" + ] + ], + "1440": + [ + [ + "folder", + "1387", + "泛亚信息技术(福建)有限公司" + ], + [ + "folder", + "1476", + "福州快搜网络技术有限公司" + ], + [ + "folder", + "1632", + "泛亚信息技术(福建)有限公司泉州分公司" + ] + ], + "1441": + [ + [ + "folder", + "170", + "河南区域" + ], + [ + "folder", + "292", + "广西&海南区域" + ], + [ + "folder", + "608", + "山西&天津区域" + ] + ], + "1434": + [ + [ + "file", + "1517", + "新兵训练营一营" + ] + ], + "1443": + [ + [ + "folder", + "496", + "西安伯登信息科技有限公司" + ] + ], + "412": + [ + [ + "file", + "416", + "商务2部1组" + ], + [ + "file", + "417", + "商务2部2组" + ], + [ + "file", + "418", + "商务2部3组" + ], + [ + "file", + "419", + "商务2部4组" + ], + [ + "file", + "1749", + "商务2部5组" + ] + ], + "1445": + [ + [ + "folder", + "293", + "武汉奇搜科技有限公司" + ] + ], + "1431": + [ + [ + "file", + "303", + "客户发展3部谢梅组" + ], + [ + "file", + "1616", + "客户发展3部杨自豪组" + ], + [ + "file", + "1865", + "客户发展3部郭燕华组" + ] + ], + "426": + [ + [ + "file", + "427", + "客户发展五部一组" + ] + ], + "410": + [ + [ + "file", + "422", + "财务组" + ] + ], + "1452": + [ + [ + "file", + "1453", + "事业一部" + ], + [ + "file", + "1462", + "事业二部" + ], + [ + "file", + "1723", + "事业三部" + ], + [ + "file", + "1780", + "事业四部" + ] + ], + "431": + [ + [ + "file", + "152", + "在线营销部" + ], + [ + "file", + "996", + "在线营销部测试组" + ] + ], + "432": + [ + [ + "file", + "434", + "宁波派格网络科技有限公司" + ], + [ + "folder", + "436", + "客户发展部" + ], + [ + "folder", + "451", + "业务支持部" + ], + [ + "file", + "455", + "合同部" + ], + [ + "file", + "456", + "财务部" + ], + [ + "folder", + "819", + "增值服务部" + ], + [ + "folder", + "941", + "客户发展部1" + ], + [ + "folder", + "1074", + "培训部" + ], + [ + "file", + "1206", + "市场部" + ] + ], + "433": + [ + [ + "folder", + "534", + "客户发展部" + ], + [ + "folder", + "535", + "业务支持部" + ], + [ + "file", + "536", + "合同部" + ], + [ + "file", + "537", + "财务部" + ], + [ + "folder", + "810", + "增值服务部" + ], + [ + "file", + "887", + "培训部" + ], + [ + "file", + "1205", + "市场部" + ] + ], + "435": + [ + [ + "folder", + "457", + "客户发展部" + ], + [ + "folder", + "458", + "业务支持部" + ], + [ + "file", + "459", + "合同部" + ], + [ + "file", + "460", + "财务部" + ], + [ + "file", + "605", + "商务一部" + ], + [ + "folder", + "846", + "增值服务部" + ], + [ + "file", + "1081", + "新讯培训部" + ], + [ + "file", + "1213", + "市场部" + ] + ], + "1460": + [ + [ + "file", + "1561", + "临商一部" + ], + [ + "file", + "1562", + "临商二部" + ], + [ + "file", + "1564", + "新兵营" + ] + ], + "437": + [ + [ + "file", + "438", + "商务一部一组" + ] + ], + "439": + [ + [ + "file", + "440", + "商务五部一组" + ], + [ + "file", + "1746", + "商务五部二组" + ] + ], + "441": + [ + [ + "file", + "442", + "商务二部一组" + ] + ], + "1466": + [ + [ + "file", + "1467", + "客户发展3部1组" + ] + ], + "443": + [ + [ + "file", + "444", + "商务四部一组" + ], + [ + "file", + "445", + "商务四部二组" + ] + ], + "436": + [ + [ + "folder", + "437", + "商务一部" + ], + [ + "folder", + "439", + "商务五部" + ], + [ + "folder", + "441", + "商务二部" + ], + [ + "folder", + "443", + "商务四部" + ], + [ + "folder", + "448", + "商务六部" + ], + [ + "file", + "450", + "售前审核部" + ], + [ + "folder", + "603", + "新兵营" + ] + ], + "1442": + [ + [ + "folder", + "258", + "四川区域" + ], + [ + "folder", + "1443", + "陕西区域" + ], + [ + "folder", + "1444", + "云南区域" + ], + [ + "folder", + "1445", + "湖北区域" + ], + [ + "folder", + "1559", + "重庆区域" + ] + ], + "446": + [ + [ + "file", + "447", + "商务二部一组" + ] + ], + "1471": + [ + [ + "file", + "1472", + "1部" + ] + ], + "448": + [ + [ + "file", + "449", + "商务六部一组" + ] + ], + "1473": + [ + [ + "file", + "1474", + "废弃账户" + ] + ], + "451": + [ + [ + "file", + "452", + "资质上传组" + ], + [ + "file", + "453", + "预审核组" + ], + [ + "file", + "454", + "开户组" + ] + ], + "1476": + [ + [ + "folder", + "1477", + "客户发展部" + ], + [ + "folder", + "1478", + "业务支持部" + ], + [ + "file", + "1479", + "合同部" + ], + [ + "file", + "1480", + "财务部" + ], + [ + "folder", + "1490", + "增值服务部" + ], + [ + "file", + "1627", + "快搜培训部" + ], + [ + "file", + "1840", + "快搜市场部" + ] + ], + "1477": + [ + [ + "folder", + "1481", + "客户发展1部" + ], + [ + "file", + "1482", + "售前审核部" + ], + [ + "folder", + "1550", + "客户发展2部" + ], + [ + "folder", + "1620", + "客户发展3部" + ], + [ + "folder", + "1925", + "客户发展4部" + ] + ], + "1478": + [ + [ + "file", + "1485", + "预审核组" + ], + [ + "file", + "1486", + "资质上传组" + ], + [ + "file", + "1487", + "开户组" + ] + ], + "457": + [ + [ + "file", + "465", + "售前审核部" + ], + [ + "folder", + "1848", + "淄博商务部" + ], + [ + "folder", + "1851", + "德州商务部" + ] + ], + "458": + [ + [ + "file", + "466", + "预审核组" + ], + [ + "file", + "467", + "资质上传组" + ], + [ + "file", + "468", + "开户组" + ] + ], + "1433": + [ + [ + "file", + "1085", + "客户发展4部刘东升组" + ], + [ + "file", + "1680", + "客户发展4部冯孟杰组" + ], + [ + "file", + "1864", + "客户发展4部何其军组" + ] + ], + "1470": + [ + [ + "folder", + "1471", + "1部" + ] + ], + "1481": + [ + [ + "file", + "1483", + "客户发展1部1组" + ], + [ + "file", + "1484", + "客户发展1部2组" + ] + ], + "1490": + [ + [ + "folder", + "1491", + "新开客户部" + ], + [ + "folder", + "1492", + "普通客户部" + ], + [ + "folder", + "1493", + "VIP客户部" + ] + ], + "1491": + [ + [ + "file", + "1494", + "新开客户部一组" + ] + ], + "1492": + [ + [ + "file", + "1495", + "普通客户部一组" + ] + ], + "469": + [ + [ + "folder", + "472", + "客户发展部" + ], + [ + "folder", + "486", + "业务支持部" + ], + [ + "file", + "490", + "合同部" + ], + [ + "file", + "491", + "财务部" + ], + [ + "folder", + "954", + "增值服务部" + ], + [ + "file", + "1079", + "培训部" + ], + [ + "file", + "1220", + "市场部" + ] + ], + "1444": + [ + [ + "folder", + "1249", + "昆明" + ] + ], + "472": + [ + [ + "folder", + "473", + "事业一部" + ], + [ + "folder", + "482", + "事业二部" + ], + [ + "file", + "484", + "售前审核部" + ], + [ + "file", + "485", + "业务支持部" + ], + [ + "folder", + "1170", + "事业三部" + ], + [ + "folder", + "1332", + "事业四部" + ] + ], + "473": + [ + [ + "file", + "474", + "事业一部" + ], + [ + "file", + "598", + "事业一部十二组" + ], + [ + "folder", + "625", + "镇江" + ], + [ + "file", + "711", + "事业一部十三组" + ], + [ + "folder", + "1333", + "第一事业群" + ], + [ + "folder", + "1334", + "第二事业群" + ] + ], + "1493": + [ + [ + "file", + "1496", + "VIP客户部一组" + ] + ], + "482": + [ + [ + "file", + "483", + "事业二部大客户组" + ] + ], + "486": + [ + [ + "file", + "487", + "预审核组" + ], + [ + "file", + "488", + "资质上传组" + ], + [ + "file", + "489", + "开户组" + ] + ], + "1512": + [ + [ + "file", + "670", + "三部" + ], + [ + "file", + "680", + "十一部" + ], + [ + "file", + "1469", + "客户发展部2部" + ] + ], + "1514": + [ + [ + "file", + "1513", + "培训部" + ] + ], + "492": + [ + [ + "file", + "148", + "六部1组" + ], + [ + "file", + "493", + "六部2组" + ], + [ + "file", + "494", + "六部3组" + ], + [ + "file", + "1516", + "待分配账户" + ] + ], + "1519": + [ + [ + "file", + "1520", + "四部一组" + ] + ], + "496": + [ + [ + "folder", + "498", + "客户发展部" + ], + [ + "folder", + "510", + "业务支持部" + ], + [ + "file", + "514", + "合同部" + ], + [ + "file", + "515", + "财务部" + ], + [ + "folder", + "1016", + "增值服务部" + ], + [ + "folder", + "1065", + "培训部" + ], + [ + "file", + "1233", + "市场部" + ] + ], + "1521": + [ + [ + "folder", + "1266", + "KA销售部" + ], + [ + "folder", + "1267", + "导航直客销售" + ], + [ + "folder", + "1268", + "总部渠道部" + ] + ], + "498": + [ + [ + "folder", + "499", + "客户发展1部" + ], + [ + "folder", + "500", + "客户发展2部" + ], + [ + "file", + "509", + "售前审核部" + ], + [ + "folder", + "588", + "客户发展3部" + ] + ], + "499": + [ + [ + "file", + "501", + "客户发展部1部1组" + ], + [ + "file", + "503", + "客户发展部1部2组" + ], + [ + "file", + "504", + "客户发展部1部3组" + ], + [ + "file", + "505", + "客户发展部1部4组" + ], + [ + "file", + "589", + "客户发展部1部5组" + ] + ], + "500": + [ + [ + "file", + "502", + "客户发展部2部1组" + ], + [ + "file", + "506", + "客户发展部2部2组" + ], + [ + "file", + "507", + "客户发展部2部3组" + ], + [ + "file", + "508", + "客户发展部2部4组" + ], + [ + "file", + "1108", + "客户发展部2部5组" + ] + ], + "497": + [ + [ + "folder", + "565", + "客户发展部" + ], + [ + "folder", + "566", + "业务支持部" + ], + [ + "file", + "567", + "合同部" + ], + [ + "file", + "568", + "财务部" + ], + [ + "folder", + "768", + "增值服务部" + ], + [ + "file", + "1087", + "代理商培训部" + ], + [ + "file", + "1210", + "市场部" + ] + ], + "510": + [ + [ + "file", + "511", + "预审核组" + ], + [ + "file", + "512", + "资质上传组" + ], + [ + "file", + "513", + "开户组" + ] + ], + "1539": + [ + [ + "file", + "1540", + "客户发展6部1组" + ], + [ + "file", + "1541", + "客户发展6部2组" + ] + ], + "517": + [ + [ + "folder", + "518", + "客户发展部" + ], + [ + "folder", + "528", + "业务支持部" + ], + [ + "file", + "532", + "合同部" + ], + [ + "file", + "533", + "财务部" + ], + [ + "folder", + "822", + "增值服务部" + ], + [ + "file", + "1216", + "市场部" + ] + ], + "518": + [ + [ + "folder", + "519", + "中小客户部" + ], + [ + "file", + "523", + "客户发展二部" + ], + [ + "file", + "527", + "售前审核部" + ], + [ + "file", + "1073", + "代理商培训部" + ], + [ + "file", + "1841", + "大客户部" + ] + ], + "519": + [ + [ + "file", + "520", + "商务五部" + ], + [ + "file", + "521", + "商务六部" + ], + [ + "file", + "522", + "商务七部" + ], + [ + "file", + "524", + "商务一部" + ], + [ + "file", + "525", + "商务二部" + ], + [ + "file", + "526", + "商务三部" + ], + [ + "file", + "1011", + "商务四部" + ], + [ + "file", + "1086", + "商务N部" + ] + ], + "1545": + [ + [ + "file", + "294", + "商务一部" + ], + [ + "file", + "295", + "商务二部" + ], + [ + "file", + "1455", + "商务三部" + ], + [ + "file", + "1456", + "商务四部" + ] + ], + "1546": + [ + [ + "file", + "1457", + "商务五部" + ], + [ + "file", + "1458", + "商务六部" + ], + [ + "file", + "1459", + "商务七部" + ], + [ + "file", + "1461", + "商务八部" + ] + ], + "1550": + [ + [ + "file", + "1551", + "客户发展2部1组" + ] + ], + "528": + [ + [ + "file", + "529", + "预审核组" + ], + [ + "file", + "530", + "资质上传组" + ], + [ + "file", + "531", + "开户组" + ] + ], + "1553": + [ + [ + "file", + "1554", + "黄山事业部1组" + ] + ], + "534": + [ + [ + "file", + "538", + "商务一部" + ], + [ + "file", + "539", + "商务四部" + ], + [ + "file", + "540", + "商务二部" + ], + [ + "file", + "541", + "商务三部" + ], + [ + "file", + "542", + "商务五部" + ], + [ + "file", + "543", + "商务六部" + ], + [ + "file", + "544", + "商务七部" + ], + [ + "file", + "545", + "售前审核部" + ], + [ + "folder", + "549", + "济宁公司" + ], + [ + "file", + "857", + "渠道审核" + ], + [ + "file", + "1451", + "济宁公司2" + ], + [ + "file", + "1946", + "三部一组" + ], + [ + "file", + "1947", + "三部二组" + ] + ], + "535": + [ + [ + "file", + "546", + "预审核组" + ], + [ + "file", + "547", + "资质上传组" + ], + [ + "file", + "548", + "开户组" + ] + ], + "1565": + [ + [ + "folder", + "1566", + "客户发展部" + ], + [ + "folder", + "1581", + "增值服务部" + ], + [ + "file", + "1713", + "培训部" + ], + [ + "file", + "1782", + "市场部" + ] + ], + "1566": + [ + [ + "folder", + "1567", + "客户发展一部" + ], + [ + "folder", + "1568", + "客户发展二部" + ], + [ + "file", + "1569", + "售前审核部" + ], + [ + "folder", + "1574", + "业务支持部" + ], + [ + "file", + "1575", + "合同部" + ], + [ + "file", + "1576", + "财务部" + ] + ], + "1567": + [ + [ + "file", + "1570", + "客发一部1组" + ], + [ + "file", + "1571", + "客发一部2组" + ], + [ + "file", + "1572", + "客发一部3组" + ], + [ + "file", + "1589", + "客发一部4组" + ], + [ + "file", + "1665", + "客发一部5组" + ] + ], + "1568": + [ + [ + "file", + "1573", + "客发二部1组" + ], + [ + "file", + "1588", + "客发二部增值组" + ] + ], + "549": + [ + [ + "file", + "856", + "渠道审核" + ] + ], + "550": + [ + [ + "folder", + "551", + "客户发展部" + ], + [ + "folder", + "553", + "业务支持部" + ], + [ + "file", + "554", + "合同部" + ], + [ + "file", + "555", + "财务部" + ], + [ + "file", + "953", + "商务三部" + ], + [ + "folder", + "984", + "增值服务部" + ], + [ + "file", + "1208", + "市场部" + ] + ], + "551": + [ + [ + "folder", + "552", + "客户发展一部" + ], + [ + "folder", + "556", + "客户发展二部" + ], + [ + "file", + "557", + "售前审核组" + ], + [ + "folder", + "626", + "客户发展三部" + ], + [ + "file", + "952", + "商务三部" + ], + [ + "folder", + "1519", + "客户发展四部" + ] + ], + "552": + [ + [ + "file", + "561", + "一部一组" + ], + [ + "file", + "1163", + "一部二组" + ], + [ + "file", + "1200", + "一部三组" + ], + [ + "file", + "1603", + "一部四组" + ], + [ + "file", + "1604", + "一部五组" + ], + [ + "file", + "1605", + "一部六组" + ], + [ + "file", + "1606", + "一部七组" + ], + [ + "file", + "1607", + "一部八组" + ] + ], + "553": + [ + [ + "file", + "558", + "预审核组" + ], + [ + "file", + "559", + "资质上传组" + ], + [ + "file", + "560", + "开户组" + ] + ], + "556": + [ + [ + "file", + "562", + "二部一组" + ], + [ + "file", + "1164", + "二部二组" + ], + [ + "file", + "1201", + "二部三组" + ] + ], + "1581": + [ + [ + "folder", + "1582", + "新开户部" + ], + [ + "folder", + "1583", + "普通客户部" + ], + [ + "file", + "1584", + "VIP客户部" + ] + ], + "1574": + [ + [ + "file", + "1577", + "预审组" + ], + [ + "file", + "1578", + "资质上传组" + ], + [ + "file", + "1579", + "开户组" + ] + ], + "1583": + [ + [ + "file", + "1586", + "普通客户一组" + ], + [ + "file", + "1587", + "普通客户二组" + ] + ], + "1558": + [ + [ + "folder", + "233", + "江苏慕名网络科技有限公司" + ] + ], + "1559": + [ + [ + "folder", + "259", + "重庆智佳信息科技有限公司" + ] + ], + "565": + [ + [ + "folder", + "569", + "客户发展部1部" + ], + [ + "file", + "570", + "客户发展部2部" + ], + [ + "file", + "571", + "客户发展部3部" + ], + [ + "folder", + "572", + "客户发展部4部" + ], + [ + "file", + "587", + "售前审核部" + ], + [ + "file", + "1259", + "客户发展部5部" + ], + [ + "file", + "1342", + "客户发展部6部" + ], + [ + "file", + "1370", + "客户发展部7部" + ], + [ + "file", + "1555", + "大客户发展1部" + ], + [ + "file", + "1781", + "客户发展部8部" + ] + ], + "566": + [ + [ + "file", + "584", + "预审核组" + ], + [ + "file", + "585", + "资质上传组" + ], + [ + "file", + "586", + "开户组" + ] + ], + "569": + [ + [ + "file", + "573", + "事业一部一组" + ], + [ + "file", + "574", + "事业一部二组" + ], + [ + "file", + "575", + "事业一部三组" + ], + [ + "file", + "576", + "事业一部四组" + ], + [ + "file", + "577", + "事业一部五组" + ], + [ + "file", + "578", + "事业一部六组" + ], + [ + "file", + "579", + "事业一部七组" + ], + [ + "file", + "1318", + "事业一部八组" + ] + ], + "572": + [ + [ + "file", + "580", + "事业四部一组" + ], + [ + "file", + "581", + "事业四部二组" + ], + [ + "file", + "582", + "事业四部三组" + ], + [ + "file", + "583", + "事业四部四组" + ], + [ + "file", + "1777", + "事业四部五组" + ] + ], + "1590": + [ + [ + "file", + "1591", + "马鞍山事业部一组" + ] + ], + "1582": + [ + [ + "file", + "1585", + "新开户一组" + ] + ], + "588": + [ + [ + "file", + "1258", + "客户发展部3部1组" + ], + [ + "file", + "1313", + "客户发展部3部2组" + ], + [ + "file", + "1532", + "客户发展大客户部" + ] + ], + "590": + [ + [ + "file", + "591", + "客服一部" + ], + [ + "file", + "592", + "客服二部" + ], + [ + "file", + "593", + "客服三部" + ], + [ + "file", + "594", + "google事业部" + ], + [ + "file", + "599", + "培训部" + ], + [ + "file", + "796", + "客服四部" + ], + [ + "file", + "1931", + "VIP" + ] + ], + "1617": + [ + [ + "file", + "1624", + "专家一部" + ] + ], + "1620": + [ + [ + "file", + "1621", + "客户发展3部1组" + ] + ], + "1623": + [ + [ + "folder", + "469", + "南京麦火信息科技有限公司" + ] + ], + "600": + [ + [ + "file", + "147", + "五部10组" + ], + [ + "file", + "151", + "五部11组" + ], + [ + "file", + "153", + "五部4组" + ], + [ + "file", + "154", + "五部2组" + ], + [ + "file", + "157", + "五部3组" + ], + [ + "file", + "158", + "五部6组" + ], + [ + "file", + "159", + "五部12组" + ], + [ + "file", + "160", + "五部9组" + ], + [ + "file", + "161", + "五部13组" + ], + [ + "file", + "163", + "五部14组" + ], + [ + "file", + "429", + "五部15组" + ], + [ + "file", + "649", + "五部1组" + ], + [ + "file", + "893", + "五部18组" + ], + [ + "file", + "995", + "五部16组" + ], + [ + "file", + "1102", + "五部7组" + ], + [ + "file", + "1168", + "五部17组" + ], + [ + "file", + "1178", + "五部8组" + ] + ], + "603": + [ + [ + "file", + "604", + "新兵营一部" + ], + [ + "file", + "1179", + "商务一部二组" + ] + ], + "1632": + [ + [ + "folder", + "1633", + "客户发展部" + ], + [ + "folder", + "1634", + "业务支持部" + ], + [ + "file", + "1635", + "合同部" + ], + [ + "file", + "1636", + "财务部" + ], + [ + "folder", + "1637", + "增值服务部" + ] + ], + "1633": + [ + [ + "folder", + "1638", + "客户发展1部" + ], + [ + "folder", + "1641", + "客户发展2部" + ], + [ + "file", + "1647", + "售前审核组" + ], + [ + "folder", + "1658", + "客户发展3部" + ] + ], + "610": + [ + [ + "folder", + "228", + "商务三部" + ], + [ + "file", + "388", + "商务五部" + ], + [ + "file", + "400", + "商务六部" + ] + ], + "611": + [ + [ + "folder", + "612", + "客户发展部一部" + ], + [ + "folder", + "615", + "客户发展部二部" + ], + [ + "file", + "618", + "售前审核部" + ], + [ + "folder", + "797", + "客户发展部三部" + ] + ], + "612": + [ + [ + "folder", + "613", + "客户发展部一部七组" + ], + [ + "file", + "614", + "客户发展部一部二组" + ], + [ + "file", + "1094", + "客户发展部一部三组" + ], + [ + "file", + "1468", + "客户发展部一部六组" + ], + [ + "file", + "1526", + "客户发展部一部五组" + ], + [ + "file", + "1527", + "客户发展部一部四组" + ], + [ + "file", + "1528", + "客户发展部一部一组" + ] + ], + "1637": + [ + [ + "folder", + "1648", + "新开客户部" + ], + [ + "folder", + "1649", + "VIP客户部" + ], + [ + "folder", + "1650", + "普通客户部" + ] + ], + "1638": + [ + [ + "file", + "1639", + "客户发展1部1组" + ], + [ + "file", + "1640", + "客户发展1部2组" + ], + [ + "file", + "1863", + "客户发展1部3组" + ] + ], + "615": + [ + [ + "file", + "616", + "客户发展部二部一组" + ], + [ + "file", + "617", + "客户发展部二部二组" + ], + [ + "file", + "1002", + "客户发展部二部三组" + ] + ], + "608": + [ + [ + "folder", + "609", + "天津企悦在线科技有限公司" + ], + [ + "folder", + "858", + "山西云搜网络技术有限公司" + ] + ], + "1641": + [ + [ + "file", + "1642", + "客户发展2部1组" + ], + [ + "file", + "1643", + "客户发展2部2组" + ] + ], + "1634": + [ + [ + "file", + "1644", + "预审核组" + ], + [ + "file", + "1645", + "资质上传组" + ], + [ + "file", + "1646", + "开户组" + ] + ], + "619": + [ + [ + "file", + "620", + "预审核组" + ], + [ + "file", + "621", + "资质上传组" + ], + [ + "file", + "622", + "开户组" + ] + ], + "613": + [ + [ + "file", + "1525", + "客户发展一部五组" + ] + ], + "1648": + [ + [ + "file", + "1651", + "新开客户部1组" + ] + ], + "625": + [ + [ + "file", + "1948", + "镇江销售一部" + ] + ], + "626": + [ + [ + "file", + "627", + "三部一组" + ], + [ + "file", + "1167", + "三部二组" + ], + [ + "file", + "1312", + "三部三组" + ] + ], + "1649": + [ + [ + "file", + "1652", + "VIP客户部1组" + ] + ], + "634": + [ + [ + "folder", + "635", + "东亚总代(CRM测试代理商)" + ], + [ + "file", + "862", + "南沙总代(测试)" + ] + ], + "635": + [ + [ + "folder", + "636", + "增值业务部" + ], + [ + "folder", + "646", + "客户发展部" + ], + [ + "folder", + "1051", + "培训部" + ], + [ + "file", + "1054", + "代理商培训部" + ] + ], + "636": + [ + [ + "folder", + "637", + "新户部" + ], + [ + "folder", + "638", + "普户部" + ], + [ + "folder", + "639", + "VIP部" + ] + ], + "637": + [ + [ + "file", + "640", + "新户一组" + ], + [ + "file", + "641", + "新户二组" + ] + ], + "638": + [ + [ + "file", + "642", + "普户一组" + ], + [ + "file", + "643", + "普户二组" + ] + ], + "639": + [ + [ + "file", + "644", + "VIP一组" + ], + [ + "file", + "645", + "VIP二组" + ] + ], + "1666": + [ + [ + "file", + "1667", + "事业一部" + ], + [ + "file", + "1714", + "事业二部" + ], + [ + "file", + "1715", + "事业三部" + ], + [ + "file", + "1963", + "事业四部" + ] + ], + "1650": + [ + [ + "file", + "1653", + "普通客户1组" + ] + ], + "1669": + [ + [ + "folder", + "610", + "离职员工" + ] + ], + "646": + [ + [ + "folder", + "647", + "销售部" + ], + [ + "file", + "1049", + "售前审核部" + ] + ], + "647": + [ + [ + "file", + "648", + "销售一组" + ] + ], + "1658": + [ + [ + "file", + "1659", + "客户发展3部1组" + ], + [ + "file", + "1660", + "客户发展3部2组" + ] + ], + "652": + [ + [ + "folder", + "653", + "新开客户部" + ], + [ + "folder", + "657", + "普通客户部" + ], + [ + "folder", + "659", + "VIP客户部" + ] + ], + "653": + [ + [ + "file", + "654", + "新开客户一组" + ], + [ + "file", + "655", + "新开客户二组" + ], + [ + "file", + "656", + "新开客户三组" + ] + ], + "657": + [ + [ + "file", + "658", + "普通客户一组-王雪婷" + ], + [ + "file", + "661", + "普通客户二组-王小娜" + ], + [ + "file", + "662", + "普通客户三组-特维" + ], + [ + "file", + "889", + "普通客户四组" + ], + [ + "file", + "1135", + "普通客户五组-张亮" + ], + [ + "file", + "1240", + "普通客户六组-徐佳" + ], + [ + "file", + "1243", + "普通客户七组-渠道" + ], + [ + "file", + "1523", + "普通客户八组-连帅锋" + ], + [ + "file", + "1842", + "普通客户九组-史越" + ] + ], + "659": + [ + [ + "file", + "660", + "VIP客户一组" + ] + ], + "1676": + [ + [ + "file", + "1677", + "销售一部" + ] + ], + "665": + [ + [ + "folder", + "666", + "湖南好搜信息服务有限公司" + ], + [ + "folder", + "667", + "株洲振兴湘企信息技术有限公司" + ], + [ + "folder", + "1689", + "江西泛亚信息技术有限公司" + ], + [ + "file", + "1690", + "江西区域" + ] + ], + "666": + [ + [ + "folder", + "668", + "客户发展部" + ], + [ + "folder", + "682", + "业务支持部" + ], + [ + "file", + "686", + "合同部" + ], + [ + "file", + "687", + "财务部" + ], + [ + "folder", + "974", + "增值服务部" + ], + [ + "file", + "1063", + "代理商培训部" + ], + [ + "file", + "1221", + "市场部" + ] + ], + "1683": + [ + [ + "folder", + "688", + "安徽安搜信息技术有限公司" + ] + ], + "1684": + [ + [ + "folder", + "1349", + "安徽今点信息技术有限公司" + ], + [ + "folder", + "1750", + "温州广桥网络技术有限公司" + ] + ], + "1693": + [ + [ + "file", + "1696", + "普通客户部1组" + ] + ], + "1694": + [ + [ + "file", + "1697", + "VIP客户部1组" + ] + ], + "671": + [ + [ + "file", + "675", + "七部" + ] + ], + "672": + [ + [ + "file", + "1654", + "四部" + ], + [ + "file", + "1657", + "TOP团队" + ] + ], + "673": + [ + [ + "file", + "676", + "六部" + ], + [ + "file", + "678", + "八部" + ], + [ + "file", + "679", + "十部" + ], + [ + "file", + "1518", + "十二部" + ], + [ + "file", + "1626", + "二部" + ], + [ + "file", + "1655", + "五部" + ], + [ + "file", + "1656", + "九部" + ] + ], + "674": + [ + [ + "file", + "818", + "渠道" + ], + [ + "file", + "1369", + "zjj组" + ], + [ + "file", + "1552", + "zz组" + ], + [ + "file", + "1743", + "电销中心" + ] + ], + "667": + [ + [ + "folder", + "713", + "客户发展部" + ], + [ + "folder", + "722", + "业务支持部" + ], + [ + "file", + "726", + "合同部" + ], + [ + "file", + "727", + "财务部" + ], + [ + "folder", + "1003", + "增值服务部" + ], + [ + "file", + "1078", + "代理商培训部" + ], + [ + "file", + "1211", + "市场部" + ] + ], + "668": + [ + [ + "file", + "669", + "客户发展1部" + ], + [ + "folder", + "671", + "七部" + ], + [ + "folder", + "672", + "四部" + ], + [ + "folder", + "673", + "营销中心" + ], + [ + "folder", + "674", + "分公司渠道" + ], + [ + "file", + "681", + "售前审核部" + ], + [ + "folder", + "1256", + "一部" + ], + [ + "folder", + "1319", + "综合部门" + ], + [ + "folder", + "1434", + "新兵训练营" + ], + [ + "folder", + "1512", + "禁用账号" + ] + ], + "1701": + [ + [ + "file", + "1704", + "客户发展3部1组" + ] + ], + "651": + [ + [ + "folder", + "877", + "新开客户部" + ], + [ + "folder", + "878", + "普通客户部" + ], + [ + "folder", + "879", + "VIP客户部" + ] + ], + "682": + [ + [ + "file", + "683", + "预审核组" + ], + [ + "file", + "684", + "资质上传组" + ], + [ + "file", + "685", + "开户组" + ] + ], + "1699": + [ + [ + "file", + "1702", + "客户发展1部1组" + ] + ], + "1691": + [ + [ + "folder", + "1692", + "新开客户部" + ], + [ + "folder", + "1693", + "普通客户部" + ], + [ + "folder", + "1694", + "VIP客户部" + ] + ], + "1692": + [ + [ + "file", + "1695", + "新开客户部1组" + ] + ], + "609": + [ + [ + "folder", + "611", + "客户发展部" + ], + [ + "folder", + "619", + "业务支持部" + ], + [ + "file", + "623", + "合同部" + ], + [ + "file", + "624", + "财务部" + ], + [ + "folder", + "944", + "增值服务部" + ], + [ + "file", + "1062", + "代理商培训部" + ], + [ + "file", + "1202", + "市场部" + ] + ], + "688": + [ + [ + "folder", + "689", + "客户发展部" + ], + [ + "folder", + "694", + "业务支持部" + ], + [ + "file", + "698", + "合同部" + ], + [ + "file", + "699", + "财务部" + ], + [ + "folder", + "931", + "增值服务部" + ], + [ + "file", + "1068", + "代理商培训部" + ], + [ + "file", + "1234", + "市场部" + ] + ], + "689": + [ + [ + "folder", + "690", + "客户发展1部" + ], + [ + "folder", + "691", + "客户发展2部" + ], + [ + "folder", + "692", + "客户发展3部" + ], + [ + "file", + "693", + "售前审核部" + ], + [ + "file", + "767", + "客户发展部" + ] + ], + "690": + [ + [ + "file", + "700", + "客户发展1部1组" + ], + [ + "file", + "701", + "客户发展1部2组" + ], + [ + "file", + "702", + "客户发展1部3组" + ], + [ + "file", + "703", + "客户发展1部4组" + ], + [ + "file", + "704", + "客户发展1部5组" + ] + ], + "691": + [ + [ + "file", + "705", + "客户发展2部6组" + ], + [ + "file", + "706", + "客户发展2部7组" + ], + [ + "file", + "707", + "客户发展2部8组" + ], + [ + "file", + "708", + "客户发展2部9组" + ], + [ + "file", + "709", + "客户发展2部10组" + ] + ], + "692": + [ + [ + "file", + "710", + "客户发展3部11组" + ] + ], + "1700": + [ + [ + "file", + "1703", + "客户发展2部1组" + ] + ], + "694": + [ + [ + "file", + "695", + "预审核组" + ], + [ + "file", + "696", + "资质上传组" + ], + [ + "file", + "697", + "开户组" + ] + ], + "1706": + [ + [ + "file", + "1709", + "预审核组" + ], + [ + "file", + "1710", + "开户组" + ], + [ + "file", + "1711", + "资质上传组" + ] + ], + "1698": + [ + [ + "folder", + "1699", + "客户发展1部" + ], + [ + "folder", + "1700", + "客户发展2部" + ], + [ + "folder", + "1701", + "客户发展3部" + ], + [ + "file", + "1705", + "售前审核部" + ], + [ + "folder", + "1770", + "客户发展7部" + ], + [ + "folder", + "1778", + "客户发展4部" + ], + [ + "folder", + "1785", + "客户发展6部" + ], + [ + "folder", + "1807", + "客户发展8部" + ], + [ + "folder", + "1937", + "客户发展5部" + ] + ], + "1718": + [ + [ + "file", + "1719", + "事业一部" + ], + [ + "file", + "1720", + "事业二部" + ] + ], + "1689": + [ + [ + "folder", + "1691", + "增值服务部" + ], + [ + "folder", + "1698", + "客户发展部" + ], + [ + "folder", + "1706", + "业务支持部" + ], + [ + "file", + "1707", + "财务部" + ], + [ + "file", + "1708", + "合同部" + ], + [ + "file", + "1799", + "培训部" + ] + ], + "1730": + [ + [ + "folder", + "1731", + "华北区" + ], + [ + "folder", + "1732", + "华东区" + ], + [ + "folder", + "1733", + "华南区" + ] + ], + "1731": + [ + [ + "file", + "1734", + "华北区一组" + ], + [ + "file", + "1735", + "华北区二组" + ], + [ + "file", + "1736", + "华北区三组" + ], + [ + "file", + "1737", + "华北区四组" + ] + ], + "1732": + [ + [ + "file", + "1738", + "华东区一组" + ], + [ + "file", + "1739", + "华东区二组" + ], + [ + "file", + "1740", + "华东区三组" + ] + ], + "1733": + [ + [ + "file", + "1741", + "华南区一组" + ], + [ + "file", + "1802", + "华南区二组" + ] + ], + "713": + [ + [ + "folder", + "714", + "客户发展1部" + ], + [ + "folder", + "715", + "客户发展2部" + ], + [ + "file", + "716", + "售前审核部" + ] + ], + "714": + [ + [ + "file", + "717", + "客户发展1部1组" + ], + [ + "file", + "718", + "客户发展1部2组" + ], + [ + "file", + "719", + "客户发展1部3组" + ], + [ + "file", + "1341", + "客户发展1部4组" + ] + ], + "715": + [ + [ + "file", + "720", + "客户发展2部1组" + ], + [ + "folder", + "721", + "客户发展2部2组" + ], + [ + "file", + "1818", + "客户发展2部3组" + ] + ], + "721": + [ + [ + "file", + "1664", + "客户发展2部2组" + ] + ], + "722": + [ + [ + "file", + "723", + "预审核组" + ], + [ + "file", + "724", + "资质上传组" + ], + [ + "file", + "725", + "开户组" + ] + ], + "1750": + [ + [ + "folder", + "1751", + "客户发展部" + ], + [ + "file", + "1757", + "合同部" + ], + [ + "file", + "1758", + "财务部" + ], + [ + "folder", + "1759", + "业务支持部" + ], + [ + "folder", + "1763", + "增值服务部" + ], + [ + "file", + "1813", + "市场部" + ] + ], + "1751": + [ + [ + "folder", + "1752", + "客户发展一部" + ], + [ + "file", + "1754", + "售前审核部" + ], + [ + "folder", + "1772", + "客户发展二部" + ] + ], + "1752": + [ + [ + "file", + "1753", + "客户发展一部一组" + ], + [ + "file", + "1755", + "客户发展一部二组" + ], + [ + "file", + "1756", + "客户发展一部三组" + ] + ], + "729": + [ + [ + "file", + "730", + "客服" + ], + [ + "folder", + "731", + "普通客户部" + ], + [ + "file", + "732", + "VIP客户部" + ], + [ + "folder", + "737", + "新开客户部" + ] + ], + "731": + [ + [ + "file", + "733", + "普通客户一组" + ], + [ + "file", + "734", + "普通客户二组" + ], + [ + "file", + "735", + "普通客户三组" + ], + [ + "file", + "736", + "普通客户四组" + ], + [ + "file", + "875", + "普通客户五组" + ], + [ + "file", + "876", + "普通客户六组" + ], + [ + "file", + "939", + "普通客户七组" + ], + [ + "file", + "1446", + "普通客户八组" + ], + [ + "file", + "1511", + "普通客户九组" + ], + [ + "file", + "1556", + "项目组" + ], + [ + "file", + "1919", + "老户新开组" + ] + ], + "1759": + [ + [ + "file", + "1760", + "预审核组" + ], + [ + "file", + "1761", + "资质上传组" + ], + [ + "file", + "1762", + "开户组" + ] + ], + "737": + [ + [ + "file", + "738", + "新开客户一组" + ], + [ + "file", + "1593", + "新开客户二组" + ], + [ + "file", + "1594", + "新开客户三组" + ], + [ + "file", + "1595", + "新开客户四组" + ] + ], + "739": + [ + [ + "folder", + "740", + "新开客户部" + ], + [ + "folder", + "742", + "普通客户部" + ], + [ + "folder", + "748", + "VIP客户部" + ] + ], + "740": + [ + [ + "file", + "741", + "新开客户一组" + ] + ], + "1765": + [ + [ + "file", + "1768", + "普通客户部一部" + ] + ], + "742": + [ + [ + "file", + "743", + "普通客户一组" + ], + [ + "file", + "744", + "普通客户二组" + ], + [ + "file", + "745", + "普通客户三组" + ], + [ + "file", + "746", + "普通客户四组" + ], + [ + "file", + "747", + "普通客户五组" + ] + ], + "1770": + [ + [ + "file", + "1771", + "客户发展7部1组" + ] + ], + "1763": + [ + [ + "folder", + "1764", + "新开部" + ], + [ + "folder", + "1765", + "普通客户部" + ], + [ + "folder", + "1766", + "VIP部" + ] + ], + "748": + [ + [ + "file", + "749", + "VIP客户一组" + ] + ], + "1766": + [ + [ + "file", + "1769", + "VIP一部" + ] + ], + "751": + [ + [ + "folder", + "752", + "新开客户部" + ], + [ + "folder", + "753", + "普通客户部" + ], + [ + "file", + "754", + "VIP客户部" + ] + ], + "752": + [ + [ + "file", + "755", + "新开客户一组" + ] + ], + "753": + [ + [ + "file", + "756", + "普通客户一组" + ], + [ + "file", + "757", + "普通客户二组" + ], + [ + "file", + "766", + "普通客户三组" + ] + ], + "1778": + [ + [ + "file", + "1779", + "客户发展4部1组" + ] + ], + "1772": + [ + [ + "file", + "1773", + "客户发展二部一组" + ], + [ + "file", + "1774", + "客户发展二部二组" + ] + ], + "1764": + [ + [ + "file", + "1767", + "新开部一部" + ] + ], + "750": + [ + [ + "folder", + "758", + "新开客户部" + ], + [ + "folder", + "759", + "普通客户部" + ], + [ + "folder", + "760", + "VIP客户部" + ] + ], + "759": + [ + [ + "file", + "1610", + "普通客户一组" + ], + [ + "file", + "1611", + "普通客户二组" + ], + [ + "file", + "1612", + "普通客户三组" + ], + [ + "file", + "1613", + "普通客户四组" + ], + [ + "file", + "1678", + "转出账户组" + ], + [ + "file", + "1854", + "普通客户七组" + ] + ], + "760": + [ + [ + "file", + "1449", + "VIP客户一组" + ], + [ + "file", + "1450", + "VIP客户二组" + ], + [ + "file", + "1729", + "VIP客户三组" + ] + ], + "1785": + [ + [ + "file", + "1786", + "客户发展6部1组" + ] + ], + "758": + [ + [ + "file", + "761", + "新开客户一组" + ], + [ + "file", + "762", + "新开客户二组" + ], + [ + "file", + "763", + "新开客户三组" + ], + [ + "file", + "764", + "新开客户四组" + ], + [ + "file", + "765", + "新开客户五组" + ], + [ + "file", + "1124", + "新开客户六组" + ], + [ + "file", + "1125", + "新开客户七组" + ], + [ + "file", + "1246", + "废弃账户组" + ], + [ + "file", + "1345", + "新开客户八组" + ], + [ + "file", + "1548", + "新开客户九组" + ], + [ + "file", + "1557", + "新开客户十组" + ], + [ + "file", + "1681", + "新开客户十一组" + ], + [ + "file", + "1721", + "新开客户十二组" + ] + ], + "1791": + [ + [ + "file", + "1792", + "备用11" + ], + [ + "file", + "1793", + "备用22" + ] + ], + "768": + [ + [ + "folder", + "769", + "新开部" + ], + [ + "folder", + "770", + "维护一部" + ], + [ + "folder", + "771", + "U360" + ] + ], + "769": + [ + [ + "file", + "772", + "开户组(飞视)" + ], + [ + "file", + "773", + "开户组(无锡泛亚)" + ], + [ + "file", + "1335", + "开户组(常州泛亚)" + ] + ], + "770": + [ + [ + "file", + "774", + "黄文杰" + ], + [ + "file", + "775", + "张骏" + ], + [ + "file", + "1106", + "废弃户" + ], + [ + "file", + "1328", + "维护组(无锡泛亚)" + ], + [ + "file", + "1336", + "维护组(常州泛亚)" + ], + [ + "file", + "1337", + "维护组(无锡李烽)" + ] + ], + "771": + [ + [ + "file", + "776", + "U360一部" + ], + [ + "file", + "777", + "U360二部" + ], + [ + "file", + "1598", + "U360三部" + ], + [ + "file", + "1599", + "U360综合" + ], + [ + "file", + "1790", + "常州U360" + ] + ], + "778": + [ + [ + "folder", + "779", + "新开客户部" + ], + [ + "folder", + "780", + "普通客户部" + ], + [ + "folder", + "781", + "VIP客户部" + ], + [ + "file", + "1844", + "废弃" + ] + ], + "779": + [ + [ + "file", + "782", + "新开客户1组" + ] + ], + "780": + [ + [ + "file", + "783", + "普通客户1组" + ], + [ + "file", + "784", + "普通客户2组" + ], + [ + "file", + "785", + "普通客户3组" + ], + [ + "file", + "1251", + "普通客户4组" + ], + [ + "file", + "1845", + "无用账户" + ] + ], + "1805": + [ + [ + "folder", + "433", + "济南康健网络技术有限公司" + ] + ], + "1807": + [ + [ + "file", + "1808", + "客户发展部8部1组" + ], + [ + "file", + "1855", + "客户发展部8部2组" + ] + ], + "787": + [ + [ + "folder", + "788", + "新开客户部" + ], + [ + "folder", + "789", + "普通客户部" + ], + [ + "folder", + "790", + "VIP客户部" + ] + ], + "788": + [ + [ + "file", + "791", + "新开客户一组" + ], + [ + "file", + "792", + "新开客户二组" + ], + [ + "file", + "793", + "新开客户三组" + ], + [ + "file", + "794", + "新开客户四组" + ], + [ + "file", + "795", + "新开客户五组" + ], + [ + "file", + "800", + "新开客户六组" + ], + [ + "file", + "913", + "新开客户七组" + ], + [ + "file", + "1105", + "新开客户八组" + ], + [ + "file", + "1420", + "新开客户九组" + ], + [ + "file", + "1923", + "新开客户十组" + ] + ], + "781": + [ + [ + "file", + "786", + "VIP客户1组" + ], + [ + "file", + "1712", + "VIP客户2组" + ] + ], + "790": + [ + [ + "file", + "1488", + "VIP客户一组" + ], + [ + "file", + "1811", + "VIP客户二组" + ], + [ + "file", + "1812", + "VIP客户三组" + ], + [ + "file", + "1817", + "VIP客户四组" + ], + [ + "file", + "1843", + "VIP客户五组" + ], + [ + "file", + "1943", + "VIP客户六组" + ] + ], + "1819": + [ + [ + "folder", + "1820", + "客户发展部" + ], + [ + "file", + "1821", + "合同部" + ], + [ + "file", + "1822", + "财务部" + ], + [ + "folder", + "1823", + "业务支持部" + ], + [ + "folder", + "1824", + "增值服务部" + ], + [ + "file", + "1825", + "培训部" + ], + [ + "file", + "1826", + "市场部" + ] + ], + "1820": + [ + [ + "folder", + "1827", + "商务一区" + ], + [ + "file", + "1830", + "售前审核部" + ] + ], + "789": + [ + [ + "file", + "910", + "普通客户二部" + ], + [ + "file", + "911", + "普通客户三部" + ], + [ + "file", + "912", + "普通客户四部" + ], + [ + "file", + "1077", + "普通客户十一部" + ], + [ + "file", + "1380", + "普通客户十二组" + ], + [ + "file", + "1608", + "普通客户六部" + ], + [ + "file", + "1789", + "小客户部" + ], + [ + "file", + "1809", + "普通客户十组" + ], + [ + "file", + "1810", + "普通客户九组" + ] + ], + "1823": + [ + [ + "file", + "1837", + "预审核组" + ], + [ + "file", + "1838", + "资质上传组" + ], + [ + "file", + "1839", + "开户组" + ] + ], + "1824": + [ + [ + "folder", + "1831", + "新开客户部" + ], + [ + "folder", + "1832", + "普通客户部" + ], + [ + "folder", + "1833", + "VIP客户部" + ] + ], + "801": + [ + [ + "folder", + "803", + "新开客户部" + ], + [ + "folder", + "804", + "普通客户部" + ], + [ + "folder", + "805", + "VIP客户部" + ] + ], + "803": + [ + [ + "file", + "806", + "新开一组" + ], + [ + "file", + "1120", + "新开二组" + ] + ], + "804": + [ + [ + "file", + "807", + "普通客户部一组" + ], + [ + "file", + "809", + "普通客户部二组" + ], + [ + "file", + "817", + "普通客户部三组" + ], + [ + "file", + "1095", + "普通客户部四组" + ], + [ + "file", + "1261", + "普通客户部五组" + ], + [ + "file", + "1464", + "普通客户部六组" + ], + [ + "file", + "1531", + "普通客户部七组" + ] + ], + "805": + [ + [ + "file", + "808", + "VIP客户部一组" + ], + [ + "file", + "1096", + "VIP客户部二组" + ] + ], + "1831": + [ + [ + "file", + "1834", + "新开客户1组" + ] + ], + "1832": + [ + [ + "file", + "1835", + "普通客户1组" + ] + ], + "1833": + [ + [ + "file", + "1836", + "VIP客户1组" + ] + ], + "810": + [ + [ + "folder", + "811", + "新开客户部" + ], + [ + "folder", + "813", + "普通客户部" + ], + [ + "folder", + "815", + "VIP客户部" + ] + ], + "811": + [ + [ + "file", + "812", + "新开客户一组" + ] + ], + "813": + [ + [ + "file", + "814", + "普通A" + ], + [ + "file", + "1112", + "普通B" + ], + [ + "file", + "1860", + "普通C" + ] + ], + "797": + [ + [ + "file", + "798", + "客户发展部三部一组" + ] + ], + "815": + [ + [ + "file", + "816", + "VIP客户一组" + ], + [ + "file", + "1245", + "VIP客户二组" + ] + ], + "819": + [ + [ + "folder", + "820", + "新开客户部" + ], + [ + "folder", + "823", + "普通客户部" + ], + [ + "folder", + "836", + "VIP客户部" + ] + ], + "820": + [ + [ + "file", + "821", + "新开客户部一部" + ] + ], + "822": + [ + [ + "folder", + "824", + "新开客户部" + ], + [ + "folder", + "828", + "普通客户部" + ], + [ + "file", + "830", + "VIP客户部" + ] + ], + "823": + [ + [ + "file", + "826", + "普通客户一部" + ], + [ + "file", + "834", + "普通客户二部" + ], + [ + "file", + "1121", + "普通客户四部" + ], + [ + "file", + "1122", + "普通客户三部" + ], + [ + "file", + "1744", + "普通客户五部" + ] + ], + "824": + [ + [ + "file", + "832", + "新开客户一组" + ] + ], + "1849": + [ + [ + "file", + "461", + "商务一部" + ], + [ + "file", + "462", + "商务二部" + ], + [ + "file", + "1847", + "商务六部" + ] + ], + "1850": + [ + [ + "file", + "463", + "商务三部" + ], + [ + "file", + "464", + "商务四部" + ], + [ + "file", + "1846", + "商务五部" + ] + ], + "1851": + [ + [ + "file", + "1311", + "商务九部" + ] + ], + "828": + [ + [ + "file", + "833", + "普通客户一组" + ] + ], + "1853": + [ + [ + "file", + "471", + "商务十部" + ] + ], + "1827": + [ + [ + "file", + "1828", + "商务一部" + ], + [ + "file", + "1829", + "商务二部" + ] + ], + "831": + [ + [ + "file", + "842", + "VIP客户一组" + ], + [ + "file", + "843", + "VIP客户二组" + ], + [ + "file", + "844", + "VIP客户三组" + ], + [ + "file", + "973", + "VIP客户四组" + ], + [ + "file", + "1169", + "VIP客户五组" + ] + ], + "1848": + [ + [ + "folder", + "1849", + "淄博商务北区" + ], + [ + "folder", + "1850", + "淄博商务南区" + ], + [ + "folder", + "1853", + "淄博商务中区" + ] + ], + "825": + [ + [ + "folder", + "827", + "新开客户部" + ], + [ + "folder", + "829", + "普通客户部" + ], + [ + "folder", + "831", + "VIP客户部" + ] + ], + "827": + [ + [ + "file", + "835", + "新开客户一组" + ], + [ + "file", + "838", + "新开客户二组" + ], + [ + "file", + "839", + "新开客户三组" + ], + [ + "file", + "1001", + "新开客户四组" + ] + ], + "836": + [ + [ + "file", + "837", + "VIP客户部一组" + ] + ], + "829": + [ + [ + "file", + "840", + "普通客户一组" + ], + [ + "file", + "841", + "普通客户二组" + ], + [ + "file", + "872", + "普通客户三组" + ], + [ + "file", + "1176", + "普通客户四组" + ], + [ + "file", + "1177", + "普通客户五组" + ], + [ + "file", + "1197", + "普通客户六组" + ], + [ + "file", + "1235", + "普通客户七组" + ] + ], + "1859": + [ + [ + "file", + "108", + "销售一部" + ], + [ + "file", + "112", + "销售四部" + ], + [ + "file", + "114", + "销售九部" + ], + [ + "file", + "129", + "销售十部" + ], + [ + "file", + "1673", + "销售三部" + ] + ], + "1868": + [ + [ + "folder", + "1871", + "华北区域" + ], + [ + "folder", + "1872", + "华东区域" + ], + [ + "folder", + "1873", + "华南区域" + ] + ], + "1861": + [ + [ + "file", + "1862", + "客户发展5部1组" + ] + ], + "846": + [ + [ + "folder", + "847", + "新开客户部" + ], + [ + "folder", + "850", + "普通客户部" + ], + [ + "folder", + "854", + "VIP客户部" + ] + ], + "1871": + [ + [ + "folder", + "1879", + "行业A" + ], + [ + "folder", + "1880", + "行业B" + ], + [ + "folder", + "1881", + "行业C" + ], + [ + "folder", + "1882", + "行业D" + ], + [ + "folder", + "1883", + "行业E" + ], + [ + "folder", + "1884", + "行业F" + ] + ], + "1872": + [ + [ + "folder", + "1885", + "行业A" + ], + [ + "folder", + "1886", + "行业B" + ], + [ + "folder", + "1887", + "行业C" + ] + ], + "1873": + [ + [ + "folder", + "1888", + "行业A" + ] + ], + "850": + [ + [ + "file", + "851", + "普通客户一组" + ], + [ + "file", + "852", + "普通客户二组" + ], + [ + "file", + "853", + "普通客户三组" + ], + [ + "file", + "1419", + "普通客户四组" + ], + [ + "file", + "1448", + "普通客户五组" + ] + ], + "1867": + [ + [ + "folder", + "85", + "深圳市力玛网络科技有限公司" + ] + ], + "1869": + [ + [ + "folder", + "2", + "中小渠道部" + ], + [ + "folder", + "1870", + "大客渠道部" + ] + ], + "854": + [ + [ + "file", + "855", + "VIP客户一组" + ], + [ + "file", + "1463", + "vip客户二组" + ] + ], + "1879": + [ + [ + "file", + "1890", + "A-1" + ], + [ + "file", + "1891", + "A-2" + ], + [ + "file", + "1892", + "A-3" + ] + ], + "1880": + [ + [ + "file", + "1893", + "B-1" + ], + [ + "file", + "1894", + "B-2" + ] + ], + "1881": + [ + [ + "file", + "1895", + "C-1" + ], + [ + "file", + "1896", + "C-2" + ] + ], + "1882": + [ + [ + "file", + "1897", + "D-1" + ], + [ + "file", + "1898", + "D-2" + ] + ], + "1883": + [ + [ + "folder", + "1899", + "E-1" + ], + [ + "file", + "1900", + "E-2" + ], + [ + "file", + "1951", + "E-3" + ] + ], + "1884": + [ + [ + "file", + "1901", + "F-1" + ], + [ + "file", + "1902", + "F-2" + ] + ], + "1885": + [ + [ + "file", + "1903", + "A-1" + ], + [ + "file", + "1904", + "A-2" + ] + ], + "1886": + [ + [ + "file", + "1905", + "B-1" + ], + [ + "file", + "1906", + "B-2" + ] + ], + "1887": + [ + [ + "file", + "1907", + "C-1" + ], + [ + "file", + "1908", + "C-2" + ], + [ + "file", + "1909", + "C-3" + ] + ], + "1888": + [ + [ + "file", + "1910", + "A-1" + ], + [ + "file", + "1911", + "A-2" + ], + [ + "file", + "1912", + "A-3" + ] + ], + "858": + [ + [ + "folder", + "859", + "客户发展部" + ], + [ + "folder", + "868", + "业务支持部" + ], + [ + "file", + "873", + "合同部" + ], + [ + "file", + "874", + "财务部" + ], + [ + "folder", + "1040", + "增值服务部" + ], + [ + "file", + "1082", + "代理商培训部" + ], + [ + "file", + "1226", + "市场部" + ] + ], + "859": + [ + [ + "folder", + "860", + "客户发展1部" + ], + [ + "file", + "863", + "客户发展2部" + ], + [ + "file", + "867", + "售前审核部" + ] + ], + "860": + [ + [ + "file", + "861", + "客户发展1部1组" + ], + [ + "file", + "864", + "客户发展1部2组" + ], + [ + "file", + "865", + "客户发展1部3组" + ], + [ + "file", + "866", + "客户发展1部4组" + ], + [ + "file", + "1500", + "客户发展1部5组" + ] + ], + "1878": + [ + [ + "file", + "1928", + "华北虚拟渠道" + ], + [ + "file", + "1929", + "华东虚拟渠道" + ], + [ + "file", + "1930", + "华南虚拟渠道" + ] + ], + "1870": + [ + [ + "file", + "1874", + "华北渠道" + ], + [ + "file", + "1875", + "华东渠道" + ], + [ + "file", + "1876", + "华南渠道" + ], + [ + "file", + "1877", + "境外直客" + ], + [ + "folder", + "1878", + "虚拟渠道" + ] + ], + "847": + [ + [ + "file", + "848", + "新开客户一组" + ], + [ + "file", + "849", + "新开客户二组" + ] + ], + "1899": + [ + [ + "file", + "1952", + "e-1-1" + ], + [ + "file", + "1953", + "e-1-2" + ] + ], + "868": + [ + [ + "file", + "869", + "预审核组" + ], + [ + "file", + "870", + "资质上传组" + ], + [ + "file", + "871", + "开户组" + ] + ], + "877": + [ + [ + "file", + "880", + "新开客户一组" + ], + [ + "file", + "881", + "新开客户二组" + ], + [ + "file", + "882", + "新开客户三组" + ], + [ + "file", + "1104", + "新开客户四组" + ] + ], + "878": + [ + [ + "file", + "891", + "普通客户一组" + ], + [ + "file", + "1775", + "普通客户二组" + ], + [ + "file", + "1776", + "普通客户三组" + ] + ], + "879": + [ + [ + "file", + "892", + "VIP客户一组" + ] + ], + "883": + [ + [ + "folder", + "3", + "销售运营管理部" + ], + [ + "folder", + "1521", + "销售&销售支持大组" + ], + [ + "folder", + "1730", + "数字营销部" + ], + [ + "folder", + "1868", + "KA直客销售部" + ], + [ + "folder", + "1869", + "渠道部" + ], + [ + "file", + "1889", + "营销策略中心" + ], + [ + "file", + "1949", + "导航商业产品部" + ], + [ + "file", + "1950", + "电商产品部" + ], + [ + "file", + "1962", + "新闻产品部" + ] + ], + "884": + [ + [ + "folder", + "885", + "PRC组" + ], + [ + "folder", + "886", + "GAAP组" + ], + [ + "file", + "1300", + "税务组" + ], + [ + "file", + "1301", + "出纳组" + ] + ], + "885": + [ + [ + "file", + "1303", + "品牌直达&CPC组" + ], + [ + "file", + "1305", + "导航固定位置组" + ], + [ + "file", + "1379", + "AP组" + ] + ], + "886": + [ + [ + "folder", + "1306", + "US组" + ] + ], + "1914": + [ + [ + "file", + "1915", + "H1部" + ], + [ + "file", + "1916", + "H2部" + ], + [ + "file", + "1917", + "H3部" + ], + [ + "file", + "1918", + "H外勤部" + ] + ], + "895": + [ + [ + "folder", + "896", + "新开客户部" + ], + [ + "folder", + "897", + "普通客户部" + ], + [ + "folder", + "1136", + "VIP客户部" + ] + ], + "896": + [ + [ + "file", + "898", + "新开客户1组" + ], + [ + "file", + "899", + "新开客户2组" + ] + ], + "897": + [ + [ + "file", + "900", + "普通客户1组" + ], + [ + "file", + "901", + "普通客户2组" + ], + [ + "file", + "1175", + "普通客户3组" + ], + [ + "file", + "1198", + "普通客户4组" + ] + ], + "1925": + [ + [ + "file", + "1926", + "客户发展4部1组" + ] + ], + "902": + [ + [ + "folder", + "903", + "新开客户部" + ], + [ + "folder", + "904", + "常规客户部" + ], + [ + "folder", + "905", + "VIP客户部" + ] + ], + "903": + [ + [ + "file", + "906", + "新开客户一部" + ], + [ + "file", + "1600", + "新开客户二部" + ] + ], + "904": + [ + [ + "file", + "907", + "常规客户一部" + ], + [ + "file", + "908", + "常规客户二部" + ], + [ + "file", + "1522", + "公共池" + ], + [ + "file", + "1687", + "临沂常规客户一部" + ], + [ + "file", + "1939", + "常规客户三部" + ], + [ + "file", + "1940", + "常规客户四部" + ] + ], + "905": + [ + [ + "file", + "909", + "VIP客户部一组" + ], + [ + "file", + "1323", + "废弃户" + ], + [ + "file", + "1331", + "VIP客户部五组" + ] + ], + "1933": + [ + [ + "file", + "1299", + "合同审核部" + ] + ], + "1937": + [ + [ + "file", + "1938", + "客户发展5部1组" + ] + ], + "915": + [ + [ + "folder", + "916", + "新开客户部" + ], + [ + "folder", + "917", + "普通客户部" + ], + [ + "folder", + "918", + "VIP客户部" + ] + ], + "916": + [ + [ + "file", + "919", + "新开客户一组" + ] + ], + "917": + [ + [ + "file", + "920", + "普通客服一组" + ], + [ + "file", + "921", + "普通客户二组" + ], + [ + "file", + "922", + "普通客户三组" + ], + [ + "file", + "1856", + "普通客户四组" + ] + ], + "918": + [ + [ + "file", + "923", + "渠道一组" + ], + [ + "file", + "1663", + "失效" + ], + [ + "file", + "1964", + "渠道二组" + ] + ], + "924": + [ + [ + "folder", + "925", + "新开客户部" + ], + [ + "folder", + "926", + "普通客户部" + ], + [ + "folder", + "927", + "VIP客户部" + ] + ], + "925": + [ + [ + "file", + "928", + "新开客户一组" + ], + [ + "file", + "1432", + "新开客户二组(暂无)" + ] + ], + "926": + [ + [ + "file", + "929", + "普通客户一组" + ], + [ + "file", + "930", + "普通客户二组" + ], + [ + "file", + "1435", + "普通客户三组" + ] + ], + "927": + [ + [ + "file", + "943", + "VIP一组" + ], + [ + "file", + "1944", + "新开组" + ], + [ + "file", + "1945", + "失效组" + ] + ], + "931": + [ + [ + "folder", + "932", + "新开客户部" + ], + [ + "folder", + "933", + "普通客户部" + ], + [ + "folder", + "934", + "VIP客户部" + ] + ], + "932": + [ + [ + "file", + "935", + "新开客户一组" + ], + [ + "file", + "936", + "新开客户二组" + ] + ], + "933": + [ + [ + "file", + "937", + "普通客户一组" + ], + [ + "file", + "1537", + "普通客户二组" + ] + ], + "934": + [ + [ + "file", + "938", + "VIP客户一组" + ] + ], + "1956": + [ + [ + "file", + "1957", + "销售一部" + ], + [ + "file", + "1958", + "销售二部" + ] + ], + "941": + [ + [ + "folder", + "446", + "商务二部" + ] + ], + "944": + [ + [ + "folder", + "945", + "新开客户部" + ], + [ + "folder", + "946", + "普通客户部" + ], + [ + "folder", + "947", + "VIP客户部" + ] + ], + "945": + [ + [ + "file", + "948", + "新开客户一组" + ] + ], + "946": + [ + [ + "file", + "949", + "普通客户一组" + ], + [ + "file", + "950", + "普通客户二组" + ] + ], + "947": + [ + [ + "file", + "951", + "VIP客户一组" + ] + ], + "954": + [ + [ + "folder", + "955", + "新开客户部" + ], + [ + "folder", + "956", + "普通客户部" + ], + [ + "folder", + "957", + "VIP客户部" + ] + ], + "955": + [ + [ + "file", + "958", + "新开客户一组" + ] + ], + "956": + [ + [ + "file", + "959", + "普通客户一组" + ], + [ + "file", + "960", + "普通客户二组" + ], + [ + "file", + "961", + "普通客户三组" + ], + [ + "file", + "1000", + "普通客户四组" + ], + [ + "file", + "1012", + "普通客户六组" + ], + [ + "file", + "1013", + "普通客户五组" + ] + ], + "957": + [ + [ + "file", + "962", + "VIP客户一组" + ] + ], + "963": + [ + [ + "folder", + "964", + "新开客户部" + ], + [ + "folder", + "965", + "普通客户部" + ], + [ + "folder", + "966", + "VIP客户部" + ], + [ + "folder", + "1617", + "闲置" + ] + ], + "964": + [ + [ + "file", + "967", + "新开客户五组" + ], + [ + "file", + "968", + "闲置2" + ], + [ + "file", + "969", + "闲置3" + ], + [ + "file", + "970", + "开单组" + ], + [ + "file", + "1119", + "新开客户一组" + ], + [ + "file", + "1560", + "新开客户二组" + ], + [ + "file", + "1784", + "新开客户三组" + ], + [ + "file", + "1787", + "新开客户四组" + ] + ], + "965": + [ + [ + "file", + "971", + "普通客户一组" + ], + [ + "file", + "1414", + "普通客户二组" + ], + [ + "file", + "1415", + "普通客户三组" + ], + [ + "file", + "1942", + "普通客户四组" + ] + ], + "966": + [ + [ + "file", + "972", + "VIP客户一组" + ], + [ + "file", + "1625", + "专家组" + ] + ], + "974": + [ + [ + "folder", + "975", + "新单客户部" + ], + [ + "folder", + "976", + "普通客户部" + ], + [ + "folder", + "977", + "vip客户部" + ] + ], + "975": + [ + [ + "file", + "978", + "新开客户一组" + ], + [ + "file", + "983", + "客户体验二组" + ], + [ + "file", + "1913", + "客户体验三组" + ] + ], + "976": + [ + [ + "file", + "979", + "客户一组" + ], + [ + "file", + "981", + "客户二组" + ], + [ + "file", + "1747", + "CO-PI组" + ] + ], + "977": + [ + [ + "file", + "982", + "vip客户一组" + ] + ], + "984": + [ + [ + "folder", + "985", + "新开客户部" + ], + [ + "folder", + "986", + "普通客户部" + ], + [ + "folder", + "987", + "VIP客户部" + ] + ], + "985": + [ + [ + "file", + "988", + "新开客户一组" + ] + ], + "986": + [ + [ + "file", + "989", + "普通客户一组" + ], + [ + "file", + "991", + "普通客户二组" + ], + [ + "file", + "992", + "普通客户三组" + ] + ], + "987": + [ + [ + "file", + "993", + "VIP客户一组" + ] + ], + "990": + [ + [ + "file", + "994", + "大客户一部李钊" + ] + ], + "997": + [ + [ + "file", + "998", + "客发一部" + ], + [ + "file", + "999", + "客发二部" + ] + ], + "1003": + [ + [ + "folder", + "1004", + "新开客户部" + ], + [ + "folder", + "1005", + "普通客户部" + ], + [ + "folder", + "1006", + "VIP客户部" + ] + ], + "1004": + [ + [ + "file", + "1007", + "新开客户一组" + ] + ], + "1005": + [ + [ + "file", + "1008", + "普通客户一组" + ], + [ + "file", + "1009", + "普通客户二组" + ] + ], + "1006": + [ + [ + "file", + "1010", + "VIP客户一组" + ] + ], + "1015": + [ + [ + "folder", + "1026", + "客户发展部" + ], + [ + "file", + "1028", + "合同部" + ], + [ + "file", + "1029", + "财务部" + ], + [ + "folder", + "1036", + "业务支持部" + ], + [ + "folder", + "1156", + "增值服务部" + ], + [ + "file", + "1166", + "代理商培训部" + ], + [ + "file", + "1212", + "市场部" + ] + ], + "1016": + [ + [ + "folder", + "1017", + "新开客户部" + ], + [ + "folder", + "1018", + "普通客户部" + ], + [ + "folder", + "1019", + "VIP客户部" + ], + [ + "folder", + "1473", + "废弃账户" + ] + ], + "1017": + [ + [ + "file", + "1020", + "新开客户一组" + ], + [ + "file", + "1021", + "新开客户二组" + ], + [ + "file", + "1022", + "新开客户三组" + ] + ], + "1018": + [ + [ + "file", + "1023", + "普通客户一组" + ], + [ + "file", + "1592", + "普通客户三组" + ], + [ + "file", + "1941", + "普通客户四组" + ] + ], + "1019": + [ + [ + "file", + "1024", + "VIP客户一组" + ] + ] + } + , root: ["folderRoot","1",'总部'] +}; + diff --git a/comps/AjaxTree/_demo/data/crm.js b/comps/AjaxTree/_demo/data/crm.js new file mode 100755 index 000000000..2b33bc8d0 --- /dev/null +++ b/comps/AjaxTree/_demo/data/crm.js @@ -0,0 +1,79 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.AjaxTree' ], function(){ +;( function( $ ){ + window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001; + + JC.AjaxTree.dataFilter = JC.Tree.dataFilter || + function( _data ){ + var _r = {}; + + if( _data && _data.root && _data.root.length > 2 ){ + _data.root.shift(); + _r.root = _data.root; + _r.data = {}; + for( var k in _data.data ){ + _r.data[ k ] = []; + for( var i = 0, j = _data.data[k].length; i < j; i++ ){ + if( _data.data[k][i].length < 3 ) { + _r.data[k].push( _data.data[k][i] ); + continue; + } + _data.data[k][i].shift(); + _r.data[k].push( _data.data[k][i] ); + } + } + }else{ + _r = _data; + } + return _r; + }; + + $(document).delegate('div.tree_container', 'click', function( _evt ){ + _evt.stopPropagation(); + }); + + $(document).on('click', function(){ + $('div.dpt-select-active').trigger('click'); + }); + + $(document).delegate( 'div.dpt-select', 'click', function( _evt ){ + _evt.stopPropagation(); + var _p = $(this), _treeNode = $( _p.attr('treenode') ); + var _treeIns = _treeNode.data('TreeIns'); + if( !_p.hasClass( 'dpt-select-active') ){ + $('div.dpt-select-active').trigger('click'); + } + if( !_treeIns ){ + var _data = window[ _p.attr( 'treedata' ) ]; + + var _tree = new JC.AjaxTree( _treeNode, _data ); + _tree.on( 'click', function(){ + var _sp = $(this) + , _dataid = _sp.attr('dataid') + , _dataname = _sp.attr('dataname'); + + _p.find( '> span.label' ).html( _dataname ); + _p.find( '> input[type=hidden]' ).val( _dataid ); + _p.trigger( 'click' ); + }); + _tree.on( 'RenderLabel', function( _data ){ + var _node = $(this); + _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) ); + }); + _tree.init(); + _tree.open(); + + var _defSelected = _p.find( '> input[type=hidden]' ).val(); + _defSelected && _tree.open( _defSelected ); + } + _treeNode.css( { 'z-index': ZINDEX_COUNT++ } ); + if( _treeNode.css('display') != 'none' ){ + _p.removeClass( 'dpt-select-active' ); + _treeNode.hide(); + }else{ + _treeNode.show(); + _p.addClass( 'dpt-select-active' ); + _treeNode.css( { 'top': _p.prop( 'offsetHeight' ) -2 + 'px', 'left': '-1px' } ); + } + }); +}(jQuery)); +});}(typeof define === 'function' && define.amd ? define : function (_require, _cb) { _cb && _cb(); }, this)); diff --git a/comps/AjaxTree/_demo/data/crm.json.data.js b/comps/AjaxTree/_demo/data/crm.json.data.js new file mode 100755 index 000000000..09c1b686c --- /dev/null +++ b/comps/AjaxTree/_demo/data/crm.json.data.js @@ -0,0 +1 @@ + {"data":{"1":[["folder","883","导航事业部"],["folder","884","总部财务部"],["folder","1269","法务部"]],"2":[["file","516","区域"],["folder","634","钓鱼岛区域(CRM测试)"],["file","650","增值运营中心"],["file","845","市场部"],["file","890","培训部"],["file","1327","客服部"],["folder","1436","华北大区"],["folder","1437","华东大区"],["folder","1438","华中大区"],["folder","1439","华南大区"],["folder","1441","西北大区"],["folder","1442","西南大区"]],"3":[["folder","35","业务审核风险运营中心"],["folder","1293","销售助理组"],["file","1294","流程管理组"],["file","1296","业务分析组"],["file","1309","销售管理组"]],"21":[["folder","22","北京天地在线广告有限公司"]],"22":[["folder","23","客户发展部"],["folder","32","业务支持部"],["file","33","合同部"],["file","34","财务部"],["folder","652","增值服务部"],["folder","1084","代理商培训部"],["file","1238","市场部"],["file","1934","事业三部二十二组"]],"23":[["folder","24","事业三部一组"],["file","28","售前审核组"],["folder","40","事业三部二组"],["folder","44","事业三部三组"],["file","46","事业三部六组"],["file","47","事业三部七组"],["file","48","事业三部八组"],["file","49","事业三部九组"],["file","50","事业三部十组"],["file","51","事业三部十一组"],["file","52","事业三部十二组"],["file","53","事业三部十三组"],["file","54","售前判单组"],["file","55","提交部提单"],["file","162","事业三部十四组"],["file","164","自动分配组"],["file","799","事业三部五组"],["file","1014","事业三部四组"],["file","1320","事业三部十七组"],["file","1321","事业三部十八组"],["file","1322","事业三部十九组"],["file","1447","事业三部二十组"],["file","1563","事业三部四组"],["file","1596","事业三部十五组"],["file","1597","事业三部十六组"],["file","1815","事业三部二十三组"],["file","1935","事业三部二十二组"],["file","1936","事业三部二十一组"]],"24":[["file","25","一组(康明)"],["file","26","一组一队"],["file","27","一组二队"]],"32":[["file","29","预审核组"],["file","30","资质上传组"],["file","31","开户组"],["file","1057","销售培训部"],["file","1628","客服培训部"]],"35":[["folder","36","资质信息审核组"],["file","1295","关键词审核组"],["file","1580","培训组"]],"36":[["file","37","中小信息资质审核"],["file","38","KA信息资质审核"]],"40":[["file","41","二组(张晴)"],["file","42","二组一队"],["file","43","二组二队"]],"44":[["file","45","事业三部六组"]],"56":[["folder","128","上海奇搜网络科技有限公司"]],"57":[["folder","58","广东叁六网络科技有限公司"]],"58":[["folder","59","销售事业部"],["folder","87","业务支持部"],["file","91","合同部"],["file","92","财务部"],["folder","750","增值服务部"],["file","1067","代理商培训部"],["file","1247","市场部"]],"59":[["folder","60","事业一部"],["folder","61","事业三部"],["folder","62","事业二部"],["file","86","售前审核部"],["folder","166","事业四部"],["folder","590","客服部"],["folder","997","中山外围组"],["folder","1091","珠海外围组"],["file","1139","事业五部(客服)"],["folder","1140","事业五部"],["folder","1144","事业六部"],["folder","1148","事业七部"],["folder","1149","事业八部"],["folder","1452","湛江外围组"],["folder","1666","佛山外围组"],["folder","1718","江门外围组"],["folder","1956","新珠海外围"]],"60":[["folder","63","事业一部四组"],["file","64","事业一部2组"],["file","65","事业一部二组"],["file","66","事业一部4组"],["file","69","事业一部七组"],["file","70","事业一部一组"],["file","563","事业一部三组"],["file","1475","事业一部五组"]],"61":[["file","67","事业三部一组"],["file","68","事业三部三组"],["file","73","事业二部三1组"],["file","74","事业二部六组"],["file","75","事业二部五1组"],["file","82","事业三部五组"],["file","83","事业三部六组"],["file","84","事业三部七组"],["file","165","事业三部八组"],["file","1250","事业三部二组"],["file","1920","事业三部四组"]],"62":[["file","71","事业二部一组"],["file","72","事业二部二组"],["file","76","事业二部六组"],["file","77","事业二部七1组"],["file","78","事业二部五组"],["file","79","事业二部B5组"],["file","80","事业二部B8组"],["file","81","事业二部B7组"],["file","430","事业二部三组"],["file","1866","事业二部七组"]],"63":[["file","213","事业一部外围组"]],"85":[["folder","93","销售事业部"],["folder","94","业务支持部"],["file","95","合同部"],["file","96","财务部"],["folder","787","增值服务部"],["file","980","市场部"],["file","1055","深圳力玛培训部"],["file","1717","已离职"],["file","1801","400电话业务部"],["file","1924","二级代理商"]],"87":[["file","88","预审核组"],["file","89","资质上传组"],["file","90","开户组"]],"93":[["folder","97","销售一大组"],["folder","98","大客户业务部"],["folder","99","梅州大组"],["folder","121","客服大部"],["folder","124","E大组"],["file","127","售前审核部"],["folder","1088","F大组"],["folder","1113","X大组"],["folder","1254","G大组"],["file","1339","事业一部"],["folder","1340","汕头大组"],["folder","1470","ccc部"],["file","1724","备用"],["file","1800","业务部"],["folder","1859","销售二大组"],["folder","1914","H大组"]],"94":[["file","100","预审核组"],["file","101","资质上传组"],["file","102","开户组"],["file","1932","渠道部"]],"97":[["file","103","销售五部"],["file","104","销售二部"],["file","107","销售六部"],["file","110","销售八部"],["file","111","销售七部"],["file","130","备用"],["folder","1791","备用1"],["file","1806","11"]],"98":[["file","105","备用1部"],["file","106","备用2部"],["file","109","备用3部"],["file","113","备用4部"],["folder","115","备用5部"],["file","116","备用6部"],["file","117","备用7部"],["file","119","备用8部"],["file","120","备用9部"],["file","123","备用10部"],["file","564","备用11部"],["file","1797","大客户部"],["file","1798","咨询部"]],"99":[["file","208","梅州销售1部"],["file","209","C2部"],["file","210","C3部"]],"115":[["file","118","B7部"]],"121":[["file","122","开发部"],["file","1794","维护部"]],"124":[["file","125","E1部"],["file","126","客服八部"],["file","1814","客服九部"]],"128":[["folder","131","客户发展部"],["folder","138","业务支持部"],["file","142","合同部"],["file","143","财务部"],["folder","825","增值服务部"],["file","1223","市场部"],["file","1368","培训部"]],"131":[["folder","132","客户发展一部贾少魁"],["folder","133","客户发展二部谢秀丽"],["folder","134","客户发展三部陈锦云"],["folder","135","客户发展四部葛金霞"],["file","137","售前审核"],["folder","431","客户发展在线营销部"],["folder","492","客户发展六部"],["folder","600","客户发展五部"],["folder","990","客户发展VIP部"],["file","1315","海外华东客户部"]],"132":[["file","136","一部7组李松"],["file","145","一部3组刘军虎"],["file","146","一部5组郑松柏"],["file","149","一部4组宋贝贝"],["file","155","一部2组"],["file","894","一部9组安荣"],["file","1346","一部6组董兰兰"],["file","1727","一部8组王东"]],"133":[["file","144","二部2组李娜"],["file","150","二部3组刘洪雪"],["file","1103","二部1组徐双喜"],["file","1921","二部4组杨海芹"]],"134":[["file","156","三部1组陈锦云"],["file","1515","三部2组周平平"],["file","1748","三部3组韩艳"]],"135":[["file","212","四部1组葛金霞"],["file","1858","四部2组李钏瑜"],["file","1959","四部3组侯亚军"],["file","1961","四部4组周亮亮"]],"138":[["file","139","预审组"],["file","140","资质组"],["file","141","开户组"]],"166":[["file","167","事业四部一组"]],"168":[["folder","169","大连通鼎网络科技有限责任公司"],["folder","517","哈尔滨市添翼鸿图网络科技开发有限责任公司"],["folder","550","沈阳奇搜网络技术有限公司"],["folder","1565","吉林省千讯网络科技有限公司"]],"169":[["folder","192","客户发展部"],["folder","195","业务支持部"],["file","199","合同部"],["file","200","财务部"],["folder","924","增值服务部"],["file","1064","培训部"],["file","1209","市场部"]],"170":[["folder","171","河南三百六信息技术有限公司"],["folder","404","新乡点搜网络科技有限公司"]],"171":[["folder","173","客户发展部"],["file","174","财务部"],["file","175","合同管理部"],["folder","176","业务支持部"],["folder","729","增值服务部"],["file","1056","代理商培训部"],["file","1219","市场部"]],"172":[["file","178","蜀山一部"],["file","180","蜀山二部"],["file","181","蜀山三部"],["file","187","蜀山五部"],["file","664","蜀山六部"],["file","1310","蜀山四部"]],"173":[["folder","172","蜀山派"],["folder","177","昆仑派"],["file","185","武当派"],["file","191","售前审核部"],["file","211","大客户部"],["file","1317","商务三部"]],"176":[["file","188","预审核组"],["file","189","开户组"],["file","190","资质上传组"]],"177":[["file","179","昆仑二部"],["file","182","昆仑四部"],["file","183","昆仑五部"],["file","184","昆仑六部"],["file","186","昆仑一部"],["file","802","昆仑三部"],["file","1675","昆仑七部"]],"192":[["folder","193","客户发展1部"],["file","207","售前审核部"],["folder","1423","客户发展2部"]],"193":[["file","194","客户发展1部6组"],["folder","201","客户发展1部2组"],["file","203","客户发展1部8组"],["file","204","客户发展1部1组"],["folder","206","客户发展1部3组"],["file","403","客户发展1部11组"],["file","428","客户发展1部9组"],["file","942","客户发展1部10组"],["file","1117","客户发展1部7组"]],"195":[["file","196","预审核组"],["file","197","资质上传组"],["file","198","开户组"]],"201":[["file","1424","客户发展2部"]],"202":[["file","1116","客服发展2部6组"]],"206":[["folder","1426","客户发展1部3组"]],"214":[["folder","215","青岛搜讯传媒有限公司"],["folder","373","河北昱泰天成电子科技有限公司"],["folder","435","淄博新讯网络科技有限公司"],["folder","1155","潍坊"],["folder","1805","济南"]],"215":[["file","217","商务一部"],["file","218","商务二部"],["file","219","商务三部"],["file","220","财务部"],["folder","221","客服部"],["folder","223","客户发展部"],["folder","224","业务支持部"],["file","225","合同部"],["folder","915","增值服务部"],["file","1066","培训部"],["file","1217","市场部"],["file","1507","商务四部"]],"216":[["folder","497","三六零信息技术江苏有限公司"],["folder","1558","苏州区域"],["folder","1623","南京区域"]],"221":[["file","222","商务部"]],"223":[["folder","226","商务一部"],["folder","227","商务二部"],["file","229","售前审核部"],["folder","402","商务三部"],["folder","1025","烟台分公司"],["file","1503","商务部门"],["file","1504","李硕队"],["file","1505","商务3部"],["file","1508","商务4部"],["folder","1669","失效部门"]],"224":[["file","230","预审核组"],["file","231","资质上传组"],["file","232","开户组"]],"226":[["file","1097","贾自健"],["file","1098","史超"],["file","1502","杨超"]],"227":[["file","1048","王炳凯"],["file","1099","张雯"],["file","1100","头狼队"],["file","1501","空白"]],"228":[["file","1506","2部"]],"233":[["folder","234","客户发展部"],["folder","248","业务支持部"],["file","249","合同部"],["file","250","财务部"],["folder","801","增值服务部"],["file","1069","培训部"],["file","1215","市场部"]],"234":[["file","247","售前审核部"],["folder","254","苏州销售部"],["folder","255","常熟销售部"],["folder","256","昆山销售部"],["folder","1252","南通销售部"],["folder","1381","张家港销售部"],["folder","1382","盐城销售部"],["folder","1676","创业园"],["file","1922","大客户部"]],"248":[["file","251","预审核组"],["file","252","资质上传组"],["file","253","开户组"]],"254":[["file","235","苏州销售1部"],["file","237","苏州销售3部"],["file","238","苏州销售4部"],["file","239","苏州销售5部"],["file","240","苏州销售6部"],["file","241","苏州销售8部"],["file","601","苏州销售9部"],["file","632","苏州销售10部"],["file","728","苏州销售11部"],["file","1383","苏州销售2部"]],"255":[["file","242","常熟销售1部"],["file","1093","常熟销售2部"]],"256":[["file","243","昆太销售1部"],["file","244","昆太销售2部"],["file","245","昆太销售3部"],["file","246","昆太销售5部"]],"258":[["file","257","重庆区域"],["folder","279","成都龙擎网络科技有限公司"]],"259":[["folder","260","客户发展部"],["folder","273","业务支持部"],["file","274","合同部"],["file","275","财务部"],["folder","651","增值服务部"],["folder","1080","代理商培训部"],["folder","1236","市场部"]],"260":[["folder","261","客户发展1部"],["folder","262","客户发展2部"],["file","263","客户发展3部"],["file","272","售前审核部"]],"261":[["file","264","客户发展1部1组"],["file","265","客户发展1部2组"],["file","266","客户发展1部3组"],["file","267","客户发展1部4组"],["file","268","客户发展1部5组"],["file","269","客户发展1部6组"],["file","1622","客户发展1部新兵营"],["file","1671","客户发展1部9组"],["file","1672","客户发展1部其他"]],"262":[["file","270","客户发展2部7组"],["file","271","客户发展2部3组"],["file","595","客户发展2部10组"],["file","1601","客户发展2部8组"]],"273":[["file","276","预审核组"],["file","277","资质上传组"],["file","278","开户组"]],"279":[["folder","296","客户发展部"],["file","307","售前审核部"],["folder","308","业务支持部"],["file","312","合同部"],["file","313","财务部"],["folder","963","增值服务部"],["file","1072","代理商培训部"],["file","1222","市场部"]],"280":[["folder","281","客户发展部"],["folder","282","业务支持部"],["file","283","合同部"],["file","284","财务部"],["folder","902","增值服务部"],["file","1134","代理商培训部"],["file","1207","市场部"]],"281":[["folder","285","潍坊商务部"],["folder","286","商务二部"],["file","287","客户转化部"],["file","288","售前审核部"],["folder","343","推广部"],["file","914","商务四部"],["file","940","商务三部"],["file","1347","商务七部"],["file","1348","商务八部"],["file","1454","商务五部"],["folder","1460","临沂商务部"]],"282":[["file","289","预审核组"],["file","290","资质上传组"],["file","291","开户组"]],"285":[["file","1544","新兵营"],["folder","1545","一区"],["folder","1546","二区"]],"286":[["file","470","商务二部1组"],["file","607","商务二部2组"]],"292":[["folder","1015","广西南宁一伙人网络科技有限公司"],["folder","1819","海南一伙人网络科技有限公司"]],"293":[["folder","314","客户发展部"],["folder","329","业务支持部"],["file","334","合同部"],["file","335","财务部"],["folder","895","增值服务部"],["file","1070","武汉奇搜培训部"],["file","1214","市场部"]],"296":[["folder","297","客户发展唐滔部"],["folder","342","客户发展培训组"],["file","495","客户发展客服提单部"],["folder","1123","客户发展刘侵江部"],["folder","1127","客服发展二级城市部"],["folder","1431","客户发展颜强部"],["folder","1433","客户发展刘庆生部"],["file","1745","客户发展支持部门提单部"]],"297":[["file","299","客户发展1部2组"],["file","301","客户发展1部4组"],["file","302","客户发展1部5组"],["file","304","客户发展1部7组"],["file","305","客户发展1部8组"],["file","306","客户发展1部9组"],["file","1115","客户发展1部15组"],["file","1126","客户发展1部3组"],["file","1325","客户发展1部14组"],["file","1326","客户发展1部16组"],["file","1788","客户发展2部郭振华组"]],"308":[["file","309","预审核组"],["file","310","资质上传组"],["file","311","开户组"]],"314":[["folder","315","客户发展1部"],["folder","317","客户发展2部"],["folder","318","客户发展4部"],["file","328","售前审核部"],["folder","1152","客户发展5部"]],"315":[["file","316","客户发展1部1组"],["file","319","客户发展1部2组"],["file","320","客户发展1部3组"]],"317":[["file","321","客户发展2部1组"],["file","322","客户发展2部2组"],["file","323","客户发展2部3组"],["file","712","客户发展2部4组"]],"318":[["file","324","客户发展4部1组"],["file","325","客户发展4部2组"],["file","326","客户发展4部3组"],["file","327","客户发展4部4组"]],"329":[["file","330","预审核组"],["folder","331","资质上传组"],["folder","332","开户组"],["file","333","合同部"]],"331":[["file","336","资质上传1组"],["file","337","资质上传2组"],["file","338","资质上传3组"]],"332":[["file","339","开户组1组"],["file","340","开户组2组"],["file","341","开户组3组"]],"342":[["file","298","客户发展2部罗海月组"],["file","1110","客户发展1部赵颖凤组"]],"343":[["file","344","禁用1组"],["file","345","商务六部2组"],["file","346","商务六部3组"],["file","347","推广2组"]],"348":[["folder","349","杭州广桥集客网络技术有限公司"],["folder","1255","宁波"]],"349":[["folder","350","客户发展部"],["folder","367","业务支持部"],["file","371","合同部"],["file","372","财务部"],["folder","778","增值服务部"],["folder","1058","培训管理"],["file","1203","市场部"]],"350":[["folder","351","客户发展一部"],["folder","357","客户发展二部"],["folder","361","客户发展三部"],["file","366","售前审核部"],["file","663","大客户部"]],"351":[["file","352","客户发展一部一组"],["file","353","客户发展一部二组"],["file","354","客户发展一部三组"],["file","355","客户发展一部四组"],["file","356","客户发展一部五组"],["file","631","客户发展一部六组"]],"357":[["file","358","客户发展二部一组"],["file","359","客户发展二部二组"],["file","360","客户发展二部三组"]],"361":[["file","362","客户发展三部一组"],["file","363","客户发展三部二组"],["file","364","客户发展三部三组"],["file","365","客户发展三部四组"]],"367":[["file","368","预审核组"],["file","369","资质上传组"],["file","370","开户组"]],"373":[["folder","374","客户发展部"],["folder","375","业务支持部"],["file","376","合同部"],["file","377","财务部"],["folder","739","增值服务部"],["file","1061","培训部"],["file","1218","市场部"]],"374":[["folder","378","客户发展一部"],["folder","379","客户发展二部"],["folder","380","客户发展三部"],["folder","381","客户发展四部"],["file","401","售前审核部"],["folder","405","客户发展七部"],["folder","426","客户发展五部"]],"375":[["file","382","预审核组"],["file","383","资质上传组"],["file","384","开户组"]],"378":[["file","385","客户发展一部1组"],["file","386","客户发展一部2组"],["file","387","客户发展一部3组"],["file","633","客户发展一部4组"],["file","1260","客户发展一部5组"],["file","1265","客户发展一部6组"]],"379":[["file","389","客户发展二部4组"],["file","390","客户发展二部5组"],["file","391","客户发展二部2组"],["file","392","客户发展二部1组"],["file","393","客户发展二部3组"]],"380":[["file","394","客户发展三部4组"],["file","395","客户发展三部5组"],["file","396","客户发展三部1组"],["file","397","客户发展三部3组"],["file","398","客户发展三部2组"]],"381":[["file","399","客户发展四部1组"],["file","1489","客户发展四部2组"],["file","1670","客户发展四部3组"],["file","1685","客户发展四部4组"]],"402":[["file","1509","狼牙队"],["file","1510","战狼队"],["file","1954","王寅勐"],["file","1955","周国亮"]],"404":[["folder","407","商务部"],["folder","408","业务支持部"],["folder","409","合同部"],["folder","410","财务部"],["folder","751","增值服务部"],["file","1083","培训部"],["file","1224","市场部"]],"405":[["file","406","客户发展七部一组"],["file","596","客户发展七部二组"],["file","597","客户发展七部三组"],["file","629","客户发展七部五组"],["file","630","客户发展七部四组"]],"407":[["folder","411","商务1部"],["folder","412","商务2部"],["file","425","售前审核部"]],"408":[["file","420","预审核组"],["file","423","资质上传组"],["file","424","开户组"]],"409":[["file","421","合同组"]],"410":[["file","422","财务组"]],"411":[["file","413","商务1部1组"],["file","414","商务1部2组"],["file","415","商务1部3组"]],"412":[["file","416","商务2部1组"],["file","417","商务2部2组"],["file","418","商务2部3组"],["file","419","商务2部4组"],["file","1749","商务2部5组"]],"426":[["file","427","客户发展五部一组"]],"431":[["file","152","在线营销部"],["file","996","在线营销部测试组"]],"432":[["file","434","宁波派格网络科技有限公司"],["folder","436","客户发展部"],["folder","451","业务支持部"],["file","455","合同部"],["file","456","财务部"],["folder","819","增值服务部"],["folder","941","客户发展部1"],["folder","1074","培训部"],["file","1206","市场部"]],"433":[["folder","534","客户发展部"],["folder","535","业务支持部"],["file","536","合同部"],["file","537","财务部"],["folder","810","增值服务部"],["file","887","培训部"],["file","1205","市场部"]],"435":[["folder","457","客户发展部"],["folder","458","业务支持部"],["file","459","合同部"],["file","460","财务部"],["file","605","商务一部"],["folder","846","增值服务部"],["file","1081","新讯培训部"],["file","1213","市场部"]],"436":[["folder","437","商务一部"],["folder","439","商务五部"],["folder","441","商务二部"],["folder","443","商务四部"],["folder","448","商务六部"],["file","450","售前审核部"],["folder","603","新兵营"]],"437":[["file","438","商务一部一组"]],"439":[["file","440","商务五部一组"],["file","1746","商务五部二组"]],"441":[["file","442","商务二部一组"]],"443":[["file","444","商务四部一组"],["file","445","商务四部二组"]],"446":[["file","447","商务二部一组"]],"448":[["file","449","商务六部一组"]],"451":[["file","452","资质上传组"],["file","453","预审核组"],["file","454","开户组"]],"457":[["file","465","售前审核部"],["folder","1848","淄博商务部"],["folder","1851","德州商务部"]],"458":[["file","466","预审核组"],["file","467","资质上传组"],["file","468","开户组"]],"469":[["folder","472","客户发展部"],["folder","486","业务支持部"],["file","490","合同部"],["file","491","财务部"],["folder","954","增值服务部"],["file","1079","培训部"],["file","1220","市场部"]],"472":[["folder","473","事业一部"],["folder","482","事业二部"],["file","484","售前审核部"],["file","485","业务支持部"],["folder","1170","事业三部"],["folder","1332","事业四部"]],"473":[["file","474","事业一部"],["file","598","事业一部十二组"],["folder","625","镇江"],["file","711","事业一部十三组"],["folder","1333","第一事业群"],["folder","1334","第二事业群"]],"482":[["file","483","事业二部大客户组"]],"486":[["file","487","预审核组"],["file","488","资质上传组"],["file","489","开户组"]],"492":[["file","148","六部1组"],["file","493","六部2组"],["file","494","六部3组"],["file","1516","待分配账户"]],"496":[["folder","498","客户发展部"],["folder","510","业务支持部"],["file","514","合同部"],["file","515","财务部"],["folder","1016","增值服务部"],["folder","1065","培训部"],["file","1233","市场部"]],"497":[["folder","565","客户发展部"],["folder","566","业务支持部"],["file","567","合同部"],["file","568","财务部"],["folder","768","增值服务部"],["file","1087","代理商培训部"],["file","1210","市场部"]],"498":[["folder","499","客户发展1部"],["folder","500","客户发展2部"],["file","509","售前审核部"],["folder","588","客户发展3部"]],"499":[["file","501","客户发展部1部1组"],["file","503","客户发展部1部2组"],["file","504","客户发展部1部3组"],["file","505","客户发展部1部4组"],["file","589","客户发展部1部5组"]],"500":[["file","502","客户发展部2部1组"],["file","506","客户发展部2部2组"],["file","507","客户发展部2部3组"],["file","508","客户发展部2部4组"],["file","1108","客户发展部2部5组"]],"510":[["file","511","预审核组"],["file","512","资质上传组"],["file","513","开户组"]],"517":[["folder","518","客户发展部"],["folder","528","业务支持部"],["file","532","合同部"],["file","533","财务部"],["folder","822","增值服务部"],["file","1216","市场部"]],"518":[["folder","519","中小客户部"],["file","523","客户发展二部"],["file","527","售前审核部"],["file","1073","代理商培训部"],["file","1841","大客户部"]],"519":[["file","520","商务五部"],["file","521","商务六部"],["file","522","商务七部"],["file","524","商务一部"],["file","525","商务二部"],["file","526","商务三部"],["file","1011","商务四部"],["file","1086","商务N部"]],"528":[["file","529","预审核组"],["file","530","资质上传组"],["file","531","开户组"]],"534":[["file","538","商务一部"],["file","539","商务四部"],["file","540","商务二部"],["file","541","商务三部"],["file","542","商务五部"],["file","543","商务六部"],["file","544","商务七部"],["file","545","售前审核部"],["folder","549","济宁公司"],["file","857","渠道审核"],["file","1451","济宁公司2"],["file","1946","三部一组"],["file","1947","三部二组"]],"535":[["file","546","预审核组"],["file","547","资质上传组"],["file","548","开户组"]],"549":[["file","856","渠道审核"]],"550":[["folder","551","客户发展部"],["folder","553","业务支持部"],["file","554","合同部"],["file","555","财务部"],["file","953","商务三部"],["folder","984","增值服务部"],["file","1208","市场部"]],"551":[["folder","552","客户发展一部"],["folder","556","客户发展二部"],["file","557","售前审核组"],["folder","626","客户发展三部"],["file","952","商务三部"],["folder","1519","客户发展四部"]],"552":[["file","561","一部一组"],["file","1163","一部二组"],["file","1200","一部三组"],["file","1603","一部四组"],["file","1604","一部五组"],["file","1605","一部六组"],["file","1606","一部七组"],["file","1607","一部八组"]],"553":[["file","558","预审核组"],["file","559","资质上传组"],["file","560","开户组"]],"556":[["file","562","二部一组"],["file","1164","二部二组"],["file","1201","二部三组"]],"565":[["folder","569","客户发展部1部"],["file","570","客户发展部2部"],["file","571","客户发展部3部"],["folder","572","客户发展部4部"],["file","587","售前审核部"],["file","1259","客户发展部5部"],["file","1342","客户发展部6部"],["file","1370","客户发展部7部"],["file","1555","大客户发展1部"],["file","1781","客户发展部8部"]],"566":[["file","584","预审核组"],["file","585","资质上传组"],["file","586","开户组"]],"569":[["file","573","事业一部一组"],["file","574","事业一部二组"],["file","575","事业一部三组"],["file","576","事业一部四组"],["file","577","事业一部五组"],["file","578","事业一部六组"],["file","579","事业一部七组"],["file","1318","事业一部八组"]],"572":[["file","580","事业四部一组"],["file","581","事业四部二组"],["file","582","事业四部三组"],["file","583","事业四部四组"],["file","1777","事业四部五组"]],"588":[["file","1258","客户发展部3部1组"],["file","1313","客户发展部3部2组"],["file","1532","客户发展大客户部"]],"590":[["file","591","客服一部"],["file","592","客服二部"],["file","593","客服三部"],["file","594","google事业部"],["file","599","培训部"],["file","796","客服四部"],["file","1931","VIP"]],"600":[["file","147","五部10组"],["file","151","五部11组"],["file","153","五部4组"],["file","154","五部2组"],["file","157","五部3组"],["file","158","五部6组"],["file","159","五部12组"],["file","160","五部9组"],["file","161","五部13组"],["file","163","五部14组"],["file","429","五部15组"],["file","649","五部1组"],["file","893","五部18组"],["file","995","五部16组"],["file","1102","五部7组"],["file","1168","五部17组"],["file","1178","五部8组"]],"603":[["file","604","新兵营一部"],["file","1179","商务一部二组"]],"608":[["folder","609","天津企悦在线科技有限公司"],["folder","858","山西云搜网络技术有限公司"]],"609":[["folder","611","客户发展部"],["folder","619","业务支持部"],["file","623","合同部"],["file","624","财务部"],["folder","944","增值服务部"],["file","1062","代理商培训部"],["file","1202","市场部"]],"610":[["folder","228","商务三部"],["file","388","商务五部"],["file","400","商务六部"]],"611":[["folder","612","客户发展部一部"],["folder","615","客户发展部二部"],["file","618","售前审核部"],["folder","797","客户发展部三部"]],"612":[["folder","613","客户发展部一部七组"],["file","614","客户发展部一部二组"],["file","1094","客户发展部一部三组"],["file","1468","客户发展部一部六组"],["file","1526","客户发展部一部五组"],["file","1527","客户发展部一部四组"],["file","1528","客户发展部一部一组"]],"613":[["file","1525","客户发展一部五组"]],"615":[["file","616","客户发展部二部一组"],["file","617","客户发展部二部二组"],["file","1002","客户发展部二部三组"]],"619":[["file","620","预审核组"],["file","621","资质上传组"],["file","622","开户组"]],"625":[["file","1948","镇江销售一部"]],"626":[["file","627","三部一组"],["file","1167","三部二组"],["file","1312","三部三组"]],"634":[["folder","635","东亚总代(CRM测试代理商)"],["file","862","南沙总代(测试)"]],"635":[["folder","636","增值业务部"],["folder","646","客户发展部"],["folder","1051","培训部"],["file","1054","代理商培训部"]],"636":[["folder","637","新户部"],["folder","638","普户部"],["folder","639","VIP部"]],"637":[["file","640","新户一组"],["file","641","新户二组"]],"638":[["file","642","普户一组"],["file","643","普户二组"]],"639":[["file","644","VIP一组"],["file","645","VIP二组"]],"646":[["folder","647","销售部"],["file","1049","售前审核部"]],"647":[["file","648","销售一组"]],"651":[["folder","877","新开客户部"],["folder","878","普通客户部"],["folder","879","VIP客户部"]],"652":[["folder","653","新开客户部"],["folder","657","普通客户部"],["folder","659","VIP客户部"]],"653":[["file","654","新开客户一组"],["file","655","新开客户二组"],["file","656","新开客户三组"]],"657":[["file","658","普通客户一组-王雪婷"],["file","661","普通客户二组-王小娜"],["file","662","普通客户三组-特维"],["file","889","普通客户四组"],["file","1135","普通客户五组-张亮"],["file","1240","普通客户六组-徐佳"],["file","1243","普通客户七组-渠道"],["file","1523","普通客户八组-连帅锋"],["file","1842","普通客户九组-史越"]],"659":[["file","660","VIP客户一组"]],"665":[["folder","666","湖南好搜信息服务有限公司"],["folder","667","株洲振兴湘企信息技术有限公司"],["folder","1689","江西泛亚信息技术有限公司"],["file","1690","江西区域"]],"666":[["folder","668","客户发展部"],["folder","682","业务支持部"],["file","686","合同部"],["file","687","财务部"],["folder","974","增值服务部"],["file","1063","代理商培训部"],["file","1221","市场部"]],"667":[["folder","713","客户发展部"],["folder","722","业务支持部"],["file","726","合同部"],["file","727","财务部"],["folder","1003","增值服务部"],["file","1078","代理商培训部"],["file","1211","市场部"]],"668":[["file","669","客户发展1部"],["folder","671","七部"],["folder","672","四部"],["folder","673","营销中心"],["folder","674","分公司渠道"],["file","681","售前审核部"],["folder","1256","一部"],["folder","1319","综合部门"],["folder","1434","新兵训练营"],["folder","1512","禁用账号"]],"671":[["file","675","七部"]],"672":[["file","1654","四部"],["file","1657","TOP团队"]],"673":[["file","676","六部"],["file","678","八部"],["file","679","十部"],["file","1518","十二部"],["file","1626","二部"],["file","1655","五部"],["file","1656","九部"]],"674":[["file","818","渠道"],["file","1369","zjj组"],["file","1552","zz组"],["file","1743","电销中心"]],"682":[["file","683","预审核组"],["file","684","资质上传组"],["file","685","开户组"]],"688":[["folder","689","客户发展部"],["folder","694","业务支持部"],["file","698","合同部"],["file","699","财务部"],["folder","931","增值服务部"],["file","1068","代理商培训部"],["file","1234","市场部"]],"689":[["folder","690","客户发展1部"],["folder","691","客户发展2部"],["folder","692","客户发展3部"],["file","693","售前审核部"],["file","767","客户发展部"]],"690":[["file","700","客户发展1部1组"],["file","701","客户发展1部2组"],["file","702","客户发展1部3组"],["file","703","客户发展1部4组"],["file","704","客户发展1部5组"]],"691":[["file","705","客户发展2部6组"],["file","706","客户发展2部7组"],["file","707","客户发展2部8组"],["file","708","客户发展2部9组"],["file","709","客户发展2部10组"]],"692":[["file","710","客户发展3部11组"]],"694":[["file","695","预审核组"],["file","696","资质上传组"],["file","697","开户组"]],"713":[["folder","714","客户发展1部"],["folder","715","客户发展2部"],["file","716","售前审核部"]],"714":[["file","717","客户发展1部1组"],["file","718","客户发展1部2组"],["file","719","客户发展1部3组"],["file","1341","客户发展1部4组"]],"715":[["file","720","客户发展2部1组"],["folder","721","客户发展2部2组"],["file","1818","客户发展2部3组"]],"721":[["file","1664","客户发展2部2组"]],"722":[["file","723","预审核组"],["file","724","资质上传组"],["file","725","开户组"]],"729":[["file","730","客服"],["folder","731","普通客户部"],["file","732","VIP客户部"],["folder","737","新开客户部"]],"731":[["file","733","普通客户一组"],["file","734","普通客户二组"],["file","735","普通客户三组"],["file","736","普通客户四组"],["file","875","普通客户五组"],["file","876","普通客户六组"],["file","939","普通客户七组"],["file","1446","普通客户八组"],["file","1511","普通客户九组"],["file","1556","项目组"],["file","1919","老户新开组"]],"737":[["file","738","新开客户一组"],["file","1593","新开客户二组"],["file","1594","新开客户三组"],["file","1595","新开客户四组"]],"739":[["folder","740","新开客户部"],["folder","742","普通客户部"],["folder","748","VIP客户部"]],"740":[["file","741","新开客户一组"]],"742":[["file","743","普通客户一组"],["file","744","普通客户二组"],["file","745","普通客户三组"],["file","746","普通客户四组"],["file","747","普通客户五组"]],"748":[["file","749","VIP客户一组"]],"750":[["folder","758","新开客户部"],["folder","759","普通客户部"],["folder","760","VIP客户部"]],"751":[["folder","752","新开客户部"],["folder","753","普通客户部"],["file","754","VIP客户部"]],"752":[["file","755","新开客户一组"]],"753":[["file","756","普通客户一组"],["file","757","普通客户二组"],["file","766","普通客户三组"]],"758":[["file","761","新开客户一组"],["file","762","新开客户二组"],["file","763","新开客户三组"],["file","764","新开客户四组"],["file","765","新开客户五组"],["file","1124","新开客户六组"],["file","1125","新开客户七组"],["file","1246","废弃账户组"],["file","1345","新开客户八组"],["file","1548","新开客户九组"],["file","1557","新开客户十组"],["file","1681","新开客户十一组"],["file","1721","新开客户十二组"]],"759":[["file","1610","普通客户一组"],["file","1611","普通客户二组"],["file","1612","普通客户三组"],["file","1613","普通客户四组"],["file","1678","转出账户组"],["file","1854","普通客户七组"]],"760":[["file","1449","VIP客户一组"],["file","1450","VIP客户二组"],["file","1729","VIP客户三组"]],"768":[["folder","769","新开部"],["folder","770","维护一部"],["folder","771","U360"]],"769":[["file","772","开户组(飞视)"],["file","773","开户组(无锡泛亚)"],["file","1335","开户组(常州泛亚)"]],"770":[["file","774","黄文杰"],["file","775","张骏"],["file","1106","废弃户"],["file","1328","维护组(无锡泛亚)"],["file","1336","维护组(常州泛亚)"],["file","1337","维护组(无锡李烽)"]],"771":[["file","776","U360一部"],["file","777","U360二部"],["file","1598","U360三部"],["file","1599","U360综合"],["file","1790","常州U360"]],"778":[["folder","779","新开客户部"],["folder","780","普通客户部"],["folder","781","VIP客户部"],["file","1844","废弃"]],"779":[["file","782","新开客户1组"]],"780":[["file","783","普通客户1组"],["file","784","普通客户2组"],["file","785","普通客户3组"],["file","1251","普通客户4组"],["file","1845","无用账户"]],"781":[["file","786","VIP客户1组"],["file","1712","VIP客户2组"]],"787":[["folder","788","新开客户部"],["folder","789","普通客户部"],["folder","790","VIP客户部"]],"788":[["file","791","新开客户一组"],["file","792","新开客户二组"],["file","793","新开客户三组"],["file","794","新开客户四组"],["file","795","新开客户五组"],["file","800","新开客户六组"],["file","913","新开客户七组"],["file","1105","新开客户八组"],["file","1420","新开客户九组"],["file","1923","新开客户十组"]],"789":[["file","910","普通客户二部"],["file","911","普通客户三部"],["file","912","普通客户四部"],["file","1077","普通客户十一部"],["file","1380","普通客户十二组"],["file","1608","普通客户六部"],["file","1789","小客户部"],["file","1809","普通客户十组"],["file","1810","普通客户九组"]],"790":[["file","1488","VIP客户一组"],["file","1811","VIP客户二组"],["file","1812","VIP客户三组"],["file","1817","VIP客户四组"],["file","1843","VIP客户五组"],["file","1943","VIP客户六组"]],"797":[["file","798","客户发展部三部一组"]],"801":[["folder","803","新开客户部"],["folder","804","普通客户部"],["folder","805","VIP客户部"]],"803":[["file","806","新开一组"],["file","1120","新开二组"]],"804":[["file","807","普通客户部一组"],["file","809","普通客户部二组"],["file","817","普通客户部三组"],["file","1095","普通客户部四组"],["file","1261","普通客户部五组"],["file","1464","普通客户部六组"],["file","1531","普通客户部七组"]],"805":[["file","808","VIP客户部一组"],["file","1096","VIP客户部二组"]],"810":[["folder","811","新开客户部"],["folder","813","普通客户部"],["folder","815","VIP客户部"]],"811":[["file","812","新开客户一组"]],"813":[["file","814","普通A"],["file","1112","普通B"],["file","1860","普通C"]],"815":[["file","816","VIP客户一组"],["file","1245","VIP客户二组"]],"819":[["folder","820","新开客户部"],["folder","823","普通客户部"],["folder","836","VIP客户部"]],"820":[["file","821","新开客户部一部"]],"822":[["folder","824","新开客户部"],["folder","828","普通客户部"],["file","830","VIP客户部"]],"823":[["file","826","普通客户一部"],["file","834","普通客户二部"],["file","1121","普通客户四部"],["file","1122","普通客户三部"],["file","1744","普通客户五部"]],"824":[["file","832","新开客户一组"]],"825":[["folder","827","新开客户部"],["folder","829","普通客户部"],["folder","831","VIP客户部"]],"827":[["file","835","新开客户一组"],["file","838","新开客户二组"],["file","839","新开客户三组"],["file","1001","新开客户四组"]],"828":[["file","833","普通客户一组"]],"829":[["file","840","普通客户一组"],["file","841","普通客户二组"],["file","872","普通客户三组"],["file","1176","普通客户四组"],["file","1177","普通客户五组"],["file","1197","普通客户六组"],["file","1235","普通客户七组"]],"831":[["file","842","VIP客户一组"],["file","843","VIP客户二组"],["file","844","VIP客户三组"],["file","973","VIP客户四组"],["file","1169","VIP客户五组"]],"836":[["file","837","VIP客户部一组"]],"846":[["folder","847","新开客户部"],["folder","850","普通客户部"],["folder","854","VIP客户部"]],"847":[["file","848","新开客户一组"],["file","849","新开客户二组"]],"850":[["file","851","普通客户一组"],["file","852","普通客户二组"],["file","853","普通客户三组"],["file","1419","普通客户四组"],["file","1448","普通客户五组"]],"854":[["file","855","VIP客户一组"],["file","1463","vip客户二组"]],"858":[["folder","859","客户发展部"],["folder","868","业务支持部"],["file","873","合同部"],["file","874","财务部"],["folder","1040","增值服务部"],["file","1082","代理商培训部"],["file","1226","市场部"]],"859":[["folder","860","客户发展1部"],["file","863","客户发展2部"],["file","867","售前审核部"]],"860":[["file","861","客户发展1部1组"],["file","864","客户发展1部2组"],["file","865","客户发展1部3组"],["file","866","客户发展1部4组"],["file","1500","客户发展1部5组"]],"868":[["file","869","预审核组"],["file","870","资质上传组"],["file","871","开户组"]],"877":[["file","880","新开客户一组"],["file","881","新开客户二组"],["file","882","新开客户三组"],["file","1104","新开客户四组"]],"878":[["file","891","普通客户一组"],["file","1775","普通客户二组"],["file","1776","普通客户三组"]],"879":[["file","892","VIP客户一组"]],"883":[["folder","3","销售运营管理部"],["folder","1521","销售&销售支持大组"],["folder","1730","数字营销部"],["folder","1868","KA直客销售部"],["folder","1869","渠道部"],["file","1889","营销策略中心"],["file","1949","导航商业产品部"],["file","1950","电商产品部"],["file","1962","新闻产品部"]],"884":[["folder","885","PRC组"],["folder","886","GAAP组"],["file","1300","税务组"],["file","1301","出纳组"]],"885":[["file","1303","品牌直达&CPC组"],["file","1305","导航固定位置组"],["file","1379","AP组"]],"886":[["folder","1306","US组"]],"895":[["folder","896","新开客户部"],["folder","897","普通客户部"],["folder","1136","VIP客户部"]],"896":[["file","898","新开客户1组"],["file","899","新开客户2组"]],"897":[["file","900","普通客户1组"],["file","901","普通客户2组"],["file","1175","普通客户3组"],["file","1198","普通客户4组"]],"902":[["folder","903","新开客户部"],["folder","904","常规客户部"],["folder","905","VIP客户部"]],"903":[["file","906","新开客户一部"],["file","1600","新开客户二部"]],"904":[["file","907","常规客户一部"],["file","908","常规客户二部"],["file","1522","公共池"],["file","1687","临沂常规客户一部"],["file","1939","常规客户三部"],["file","1940","常规客户四部"]],"905":[["file","909","VIP客户部一组"],["file","1323","废弃户"],["file","1331","VIP客户部五组"]],"915":[["folder","916","新开客户部"],["folder","917","普通客户部"],["folder","918","VIP客户部"]],"916":[["file","919","新开客户一组"]],"917":[["file","920","普通客服一组"],["file","921","普通客户二组"],["file","922","普通客户三组"],["file","1856","普通客户四组"]],"918":[["file","923","渠道一组"],["file","1663","失效"],["file","1964","渠道二组"]],"924":[["folder","925","新开客户部"],["folder","926","普通客户部"],["folder","927","VIP客户部"]],"925":[["file","928","新开客户一组"],["file","1432","新开客户二组(暂无)"]],"926":[["file","929","普通客户一组"],["file","930","普通客户二组"],["file","1435","普通客户三组"]],"927":[["file","943","VIP一组"],["file","1944","新开组"],["file","1945","失效组"]],"931":[["folder","932","新开客户部"],["folder","933","普通客户部"],["folder","934","VIP客户部"]],"932":[["file","935","新开客户一组"],["file","936","新开客户二组"]],"933":[["file","937","普通客户一组"],["file","1537","普通客户二组"]],"934":[["file","938","VIP客户一组"]],"941":[["folder","446","商务二部"]],"944":[["folder","945","新开客户部"],["folder","946","普通客户部"],["folder","947","VIP客户部"]],"945":[["file","948","新开客户一组"]],"946":[["file","949","普通客户一组"],["file","950","普通客户二组"]],"947":[["file","951","VIP客户一组"]],"954":[["folder","955","新开客户部"],["folder","956","普通客户部"],["folder","957","VIP客户部"]],"955":[["file","958","新开客户一组"]],"956":[["file","959","普通客户一组"],["file","960","普通客户二组"],["file","961","普通客户三组"],["file","1000","普通客户四组"],["file","1012","普通客户六组"],["file","1013","普通客户五组"]],"957":[["file","962","VIP客户一组"]],"963":[["folder","964","新开客户部"],["folder","965","普通客户部"],["folder","966","VIP客户部"],["folder","1617","闲置"]],"964":[["file","967","新开客户五组"],["file","968","闲置2"],["file","969","闲置3"],["file","970","开单组"],["file","1119","新开客户一组"],["file","1560","新开客户二组"],["file","1784","新开客户三组"],["file","1787","新开客户四组"]],"965":[["file","971","普通客户一组"],["file","1414","普通客户二组"],["file","1415","普通客户三组"],["file","1942","普通客户四组"]],"966":[["file","972","VIP客户一组"],["file","1625","专家组"]],"974":[["folder","975","新单客户部"],["folder","976","普通客户部"],["folder","977","vip客户部"]],"975":[["file","978","新开客户一组"],["file","983","客户体验二组"],["file","1913","客户体验三组"]],"976":[["file","979","客户一组"],["file","981","客户二组"],["file","1747","CO-PI组"]],"977":[["file","982","vip客户一组"]],"984":[["folder","985","新开客户部"],["folder","986","普通客户部"],["folder","987","VIP客户部"]],"985":[["file","988","新开客户一组"]],"986":[["file","989","普通客户一组"],["file","991","普通客户二组"],["file","992","普通客户三组"]],"987":[["file","993","VIP客户一组"]],"990":[["file","994","大客户一部李钊"]],"997":[["file","998","客发一部"],["file","999","客发二部"]],"1003":[["folder","1004","新开客户部"],["folder","1005","普通客户部"],["folder","1006","VIP客户部"]],"1004":[["file","1007","新开客户一组"]],"1005":[["file","1008","普通客户一组"],["file","1009","普通客户二组"]],"1006":[["file","1010","VIP客户一组"]],"1015":[["folder","1026","客户发展部"],["file","1028","合同部"],["file","1029","财务部"],["folder","1036","业务支持部"],["folder","1156","增值服务部"],["file","1166","代理商培训部"],["file","1212","市场部"]],"1016":[["folder","1017","新开客户部"],["folder","1018","普通客户部"],["folder","1019","VIP客户部"],["folder","1473","废弃账户"]],"1017":[["file","1020","新开客户一组"],["file","1021","新开客户二组"],["file","1022","新开客户三组"]],"1018":[["file","1023","普通客户一组"],["file","1592","普通客户三组"],["file","1941","普通客户四组"]],"1019":[["file","1024","VIP客户一组"]],"1025":[["file","1047","战狼队"],["file","1661","火狼队"],["file","1662","失效部门"],["file","1960","威海"]],"1026":[["folder","1030","销售一区"],["file","1034","售前审核部"]],"1030":[["file","1031","销售二部"],["file","1032","销售三部"],["file","1033","销售四部"],["file","1035","销售一部"],["file","1118","商务支持"],["file","1165","销售五部"],["file","1338","销售六部"],["file","1682","海南一部"],["file","1803","海南二部"],["file","1804","海南其他"]],"1036":[["file","1037","预审核组"],["file","1038","资质上传组"],["file","1039","开户组"]],"1040":[["folder","1041","新开客户部"],["folder","1042","普通客户部"],["folder","1043","VIP客户部"]],"1041":[["file","1044","新开客户部一组"]],"1042":[["folder","1045","普通客户部一组"],["file","1344","普通客户部二组"],["file","1529","普通客户部三组"],["file","1602","普通客户部四组"]],"1043":[["file","1046","VIP客户部一组"]],"1045":[["file","1343","普通客户部二组"]],"1051":[["file","1052","培训部"],["file","1053","代理商培训部"]],"1058":[["file","1059","销售培训"],["file","1060","客服培训"]],"1065":[["file","1050","培训部"]],"1074":[["folder","1075","销售培训"],["file","1076","客服培训"]],"1075":[["file","1180","销售培训一部"]],"1080":[["file","1071","培训组"]],"1084":[["file","1629","销售培训部"],["file","1630","客服培训部"]],"1088":[["file","1089","F1部"],["file","1090","F2部"]],"1091":[["file","1092","珠海1部"]],"1113":[["file","1114","X1部"],["file","1253","G大组"]],"1123":[["file","300","客户发展1部邓海萍组"],["file","1109","客户发展1部黄亮组"],["folder","1324","客户发展1部张楚千组"],["file","1422","客户发展1部王文轩组"],["file","1524","客户发展1部龙雅倩组"]],"1127":[["file","1128","客户发展眉山组"],["file","1129","客户发展泸州组"],["file","1130","客户发展南充组"],["file","1131","客户发展绵阳组"],["file","1132","客户发展乐山组"],["file","1133","客户发展遂宁组"]],"1136":[["file","1137","VIP客户1组"],["file","1138","VIP客户2组"]],"1140":[["file","1141","事业五部一组"],["file","1142","事业五部二组"],["file","1143","事业五部三组"],["file","1533","咨询部"],["file","1857","事业五部四组"]],"1144":[["file","1145","事业六部一组"],["file","1146","事业六部二组"],["file","1147","事业六部三组"]],"1148":[["file","1150","事业七部一组"]],"1149":[["file","1151","事业八部一组"]],"1152":[["file","1153","客户发展5部1组"],["file","1154","客户发展5部2组"],["file","1795","客户发展5部4组"]],"1155":[["folder","280","潍坊点睛网络科技有限公司"]],"1156":[["folder","1157","新开客户部"],["folder","1158","普通客户部"],["folder","1159","VIP客户部"]],"1157":[["file","1160","新开客户1组"]],"1158":[["file","1161","普通客户1组"],["file","1465","普通客户2组"],["file","1816","普通客户F组"]],"1159":[["file","1162","VIP客户1组"]],"1170":[["file","1171","事业三部一组"],["file","1172","事业三部二组"],["file","1173","事业三部三组"],["file","1263","事业三部五组"],["file","1314","事业三部四部"]],"1181":[["folder","1182","客户发展部"],["folder","1183","业务支持部"],["file","1184","合同部"],["file","1185","财务部"],["file","1199","代理商培训部"],["folder","1225","增值服务部"],["file","1264","市场部"]],"1182":[["folder","1186","客户发展一部"],["folder","1187","客户发展二部"],["folder","1188","客户发展三部"],["folder","1189","客户发展四部"],["file","1204","售前审核部"]],"1183":[["file","1190","预审核组"],["file","1191","资质上传组"],["file","1192","开户组"]],"1186":[["file","1193","客户发展一部一组"]],"1187":[["file","1194","客户发展二部一组"]],"1188":[["file","1195","客户发展三部一组"]],"1189":[["file","1196","客户发展四部一组"]],"1225":[["folder","1227","新开客户部"],["folder","1228","普通客户部"],["folder","1229","VIP客户部"]],"1227":[["file","1230","新开客户一组"]],"1228":[["file","1231","普通客户一组"],["file","1686","普通客户二组"],["file","1965","普通客户三组"]],"1229":[["file","1232","VIP客户一组"]],"1236":[["file","1237","市场部"]],"1248":[["folder","1683","合肥区域"]],"1249":[["folder","1181","云南酷虎科技有限公司"]],"1252":[["file","1262","南通销售一部"],["file","1498","南通销售二部"],["file","1499","南通销售三部"],["file","1615","南通销售四部"]],"1254":[["file","1534","G1部"],["file","1535","G2部"],["file","1536","G3部"],["file","1538","G咨询组"],["file","1609","G5部"],["file","1614","G4部"],["file","1716","G6部"],["file","1796","G销售新人部"],["file","1852","G销售7部"]],"1255":[["folder","432","宁波市派格网络科技有限公司"]],"1256":[["file","1257","一部"]],"1266":[["folder","1270","销售1组"],["file","1271","销售2组"],["file","1272","销售3组"],["file","1273","SEM"]],"1267":[["folder","1274","电商组"],["folder","1275","非电商组"],["folder","1276","品牌组"]],"1268":[["file","1277","4A"],["file","1278","local"],["file","1279","sem"]],"1269":[["folder","1933","合同审核组"]],"1270":[["file","1316","销售1组A"]],"1274":[["folder","1280","电商1组"],["folder","1281","电商2组"],["file","1668","电商3组"]],"1275":[["file","1284","非电商1组"],["folder","1285","非电商2组"]],"1276":[["file","1290","品牌1组"],["file","1291","品牌2组"],["file","1292","品牌3组"]],"1280":[["file","1282","电商1组A"],["file","1283","电商1组B"]],"1281":[["file","1329","电商2组A"],["file","1330","电商2组B"]],"1285":[["file","1286","非电商2组A"],["file","1287","非电商2组B"],["file","1288","非电商2组C"],["file","1289","非电商2组D"]],"1293":[["file","1297","渠道"],["folder","1298","直客"]],"1298":[["file","1302","导航组"],["file","1304","KA组"]],"1306":[["file","1307","品牌直达&CPC组"],["file","1308","导航固定位置组"]],"1319":[["file","677","其他部门"],["file","1674","CSC部门"]],"1324":[["file","1421","客户发展1部王文轩组"]],"1332":[["file","1497","渠道部"]],"1333":[["file","477","事业一部四组"],["file","478","事业一部五组"],["file","480","事业一部七组"],["file","481","事业一部八组"],["file","606","事业一部十组"],["file","1378","事业一部七组"]],"1334":[["file","475","事业一部二组"],["file","476","事业一部三组"],["file","479","事业一部六组"],["file","602","事业一部九组"],["file","628","事业一部一组"]],"1340":[["file","1725","汕头销售1部"],["file","1726","汕头销售2部"]],"1349":[["folder","1350","客户发展部"],["folder","1362","业务支持部"],["file","1366","合同部"],["file","1367","财务部"],["folder","1371","增值服务部"],["file","1384","市场部"],["folder","1514","培训部"]],"1350":[["folder","1351","客户发展1部"],["folder","1353","客户发展2部"],["folder","1355","客户发展3部"],["folder","1357","客户发展4部"],["folder","1359","客户发展5部"],["file","1361","售前审核部"],["folder","1553","黄山事业部"],["folder","1590","马鞍山事业部"]],"1351":[["file","1352","客户发展1部1组"]],"1353":[["file","1354","客户发展2部1组"],["file","1543","客户发展2部2组"]],"1355":[["file","1356","客户发展3部1组"]],"1357":[["file","1358","客户发展4部1组"]],"1359":[["file","1360","客户发展5部1组"]],"1362":[["file","1363","预审核组"],["file","1364","资质上传组"],["file","1365","开户组"]],"1371":[["folder","1372","新开客户部"],["folder","1374","普通客户部"],["folder","1376","VIP客户部"]],"1372":[["file","1373","新开客户一组"]],"1374":[["file","1375","普通客户一组"]],"1376":[["file","1377","VIP客户一组"]],"1381":[["file","1101","张家港销售部"]],"1382":[["file","236","盐城销售一部"]],"1387":[["file","1388","代理商总经理"],["folder","1389","客户发展部"],["folder","1390","业务支持部"],["file","1391","合同部"],["file","1392","财务部"],["folder","1404","增值服务部"],["file","1679","培训部"],["file","1927","市场部"]],"1389":[["folder","1393","客户发展2部"],["folder","1394","客户发展4部"],["folder","1395","客户发展1部"],["file","1396","售前审核组"],["folder","1466","客户发展3部"],["folder","1539","客户发展6部"],["folder","1861","客户发展5部"]],"1390":[["file","1397","业务支持部"],["file","1416","预审核组"],["file","1417","资质上传组"],["file","1418","开户组"]],"1393":[["file","1398","客户发展2部1组"],["file","1399","客户发展2部2组"]],"1394":[["file","1400","客户发展4部1组"],["file","1401","客户发展4部2组"]],"1395":[["file","1402","客户发展1部1组"],["file","1403","客户发展1部2组"]],"1404":[["folder","1405","新开客户部"],["folder","1406","VIP客户部"],["folder","1407","普通客户部"]],"1405":[["file","1412","新开客户部1组"],["file","1542","新开客户部2组"],["file","1549","新开客户部3组"]],"1406":[["file","1413","VIP客户部1组"]],"1407":[["file","1408","普通客户1组"],["file","1409","普通客户2组"],["file","1410","普通客户3组"],["file","1411","普通客户4组"]],"1423":[["folder","202","客户发展2部5组"],["file","205","客户发展2部4组"],["file","1425","客户发展2部2组"],["file","1428","客户发展2部3组"],["file","1429","客户发展2部1组"],["file","1430","客户发展0部"]],"1426":[["file","1427","客户发展1部3组"]],"1431":[["file","303","客户发展3部谢梅组"],["file","1616","客户发展3部杨自豪组"],["file","1865","客户发展3部郭燕华组"]],"1433":[["file","1085","客户发展4部刘东升组"],["file","1680","客户发展4部冯孟杰组"],["file","1864","客户发展4部何其军组"]],"1434":[["file","1517","新兵训练营一营"]],"1436":[["folder","21","北京区域"],["folder","168","东北区域"],["folder","214","山东&河北区域"]],"1437":[["folder","56","上海区域"],["folder","216","江苏区域"]],"1438":[["folder","348","浙江区域"],["folder","1248","安徽区域"],["folder","1684","芜湖&温州区域"]],"1439":[["folder","57","广东区域"],["folder","665","湖南&江西区域"],["folder","1440","福建区域"],["folder","1867","深圳区域"]],"1440":[["folder","1387","泛亚信息技术(福建)有限公司"],["folder","1476","福州快搜网络技术有限公司"],["folder","1632","泛亚信息技术(福建)有限公司泉州分公司"]],"1441":[["folder","170","河南区域"],["folder","292","广西&海南区域"],["folder","608","山西&天津区域"]],"1442":[["folder","258","四川区域"],["folder","1443","陕西区域"],["folder","1444","云南区域"],["folder","1445","湖北区域"],["folder","1559","重庆区域"]],"1443":[["folder","496","西安伯登信息科技有限公司"]],"1444":[["folder","1249","昆明"]],"1445":[["folder","293","武汉奇搜科技有限公司"]],"1452":[["file","1453","事业一部"],["file","1462","事业二部"],["file","1723","事业三部"],["file","1780","事业四部"]],"1460":[["file","1561","临商一部"],["file","1562","临商二部"],["file","1564","新兵营"]],"1466":[["file","1467","客户发展3部1组"]],"1470":[["folder","1471","1部"]],"1471":[["file","1472","1部"]],"1473":[["file","1474","废弃账户"]],"1476":[["folder","1477","客户发展部"],["folder","1478","业务支持部"],["file","1479","合同部"],["file","1480","财务部"],["folder","1490","增值服务部"],["file","1627","快搜培训部"],["file","1840","快搜市场部"]],"1477":[["folder","1481","客户发展1部"],["file","1482","售前审核部"],["folder","1550","客户发展2部"],["folder","1620","客户发展3部"],["folder","1925","客户发展4部"]],"1478":[["file","1485","预审核组"],["file","1486","资质上传组"],["file","1487","开户组"]],"1481":[["file","1483","客户发展1部1组"],["file","1484","客户发展1部2组"]],"1490":[["folder","1491","新开客户部"],["folder","1492","普通客户部"],["folder","1493","VIP客户部"]],"1491":[["file","1494","新开客户部一组"]],"1492":[["file","1495","普通客户部一组"]],"1493":[["file","1496","VIP客户部一组"]],"1512":[["file","670","三部"],["file","680","十一部"],["file","1469","客户发展部2部"]],"1514":[["file","1513","培训部"]],"1519":[["file","1520","四部一组"]],"1521":[["folder","1266","KA销售部"],["folder","1267","导航直客销售"],["folder","1268","总部渠道部"]],"1539":[["file","1540","客户发展6部1组"],["file","1541","客户发展6部2组"]],"1545":[["file","294","商务一部"],["file","295","商务二部"],["file","1455","商务三部"],["file","1456","商务四部"]],"1546":[["file","1457","商务五部"],["file","1458","商务六部"],["file","1459","商务七部"],["file","1461","商务八部"]],"1550":[["file","1551","客户发展2部1组"]],"1553":[["file","1554","黄山事业部1组"]],"1558":[["folder","233","江苏慕名网络科技有限公司"]],"1559":[["folder","259","重庆智佳信息科技有限公司"]],"1565":[["folder","1566","客户发展部"],["folder","1581","增值服务部"],["file","1713","培训部"],["file","1782","市场部"]],"1566":[["folder","1567","客户发展一部"],["folder","1568","客户发展二部"],["file","1569","售前审核部"],["folder","1574","业务支持部"],["file","1575","合同部"],["file","1576","财务部"]],"1567":[["file","1570","客发一部1组"],["file","1571","客发一部2组"],["file","1572","客发一部3组"],["file","1589","客发一部4组"],["file","1665","客发一部5组"]],"1568":[["file","1573","客发二部1组"],["file","1588","客发二部增值组"]],"1574":[["file","1577","预审组"],["file","1578","资质上传组"],["file","1579","开户组"]],"1581":[["folder","1582","新开户部"],["folder","1583","普通客户部"],["file","1584","VIP客户部"]],"1582":[["file","1585","新开户一组"]],"1583":[["file","1586","普通客户一组"],["file","1587","普通客户二组"]],"1590":[["file","1591","马鞍山事业部一组"]],"1617":[["file","1624","专家一部"]],"1620":[["file","1621","客户发展3部1组"]],"1623":[["folder","469","南京麦火信息科技有限公司"]],"1632":[["folder","1633","客户发展部"],["folder","1634","业务支持部"],["file","1635","合同部"],["file","1636","财务部"],["folder","1637","增值服务部"]],"1633":[["folder","1638","客户发展1部"],["folder","1641","客户发展2部"],["file","1647","售前审核组"],["folder","1658","客户发展3部"]],"1634":[["file","1644","预审核组"],["file","1645","资质上传组"],["file","1646","开户组"]],"1637":[["folder","1648","新开客户部"],["folder","1649","VIP客户部"],["folder","1650","普通客户部"]],"1638":[["file","1639","客户发展1部1组"],["file","1640","客户发展1部2组"],["file","1863","客户发展1部3组"]],"1641":[["file","1642","客户发展2部1组"],["file","1643","客户发展2部2组"]],"1648":[["file","1651","新开客户部1组"]],"1649":[["file","1652","VIP客户部1组"]],"1650":[["file","1653","普通客户1组"]],"1658":[["file","1659","客户发展3部1组"],["file","1660","客户发展3部2组"]],"1666":[["file","1667","事业一部"],["file","1714","事业二部"],["file","1715","事业三部"],["file","1963","事业四部"]],"1669":[["folder","610","离职员工"]],"1676":[["file","1677","销售一部"]],"1683":[["folder","688","安徽安搜信息技术有限公司"]],"1684":[["folder","1349","安徽今点信息技术有限公司"],["folder","1750","温州广桥网络技术有限公司"]],"1689":[["folder","1691","增值服务部"],["folder","1698","客户发展部"],["folder","1706","业务支持部"],["file","1707","财务部"],["file","1708","合同部"],["file","1799","培训部"]],"1691":[["folder","1692","新开客户部"],["folder","1693","普通客户部"],["folder","1694","VIP客户部"]],"1692":[["file","1695","新开客户部1组"]],"1693":[["file","1696","普通客户部1组"]],"1694":[["file","1697","VIP客户部1组"]],"1698":[["folder","1699","客户发展1部"],["folder","1700","客户发展2部"],["folder","1701","客户发展3部"],["file","1705","售前审核部"],["folder","1770","客户发展7部"],["folder","1778","客户发展4部"],["folder","1785","客户发展6部"],["folder","1807","客户发展8部"],["folder","1937","客户发展5部"]],"1699":[["file","1702","客户发展1部1组"]],"1700":[["file","1703","客户发展2部1组"]],"1701":[["file","1704","客户发展3部1组"]],"1706":[["file","1709","预审核组"],["file","1710","开户组"],["file","1711","资质上传组"]],"1718":[["file","1719","事业一部"],["file","1720","事业二部"]],"1730":[["folder","1731","华北区"],["folder","1732","华东区"],["folder","1733","华南区"]],"1731":[["file","1734","华北区一组"],["file","1735","华北区二组"],["file","1736","华北区三组"],["file","1737","华北区四组"]],"1732":[["file","1738","华东区一组"],["file","1739","华东区二组"],["file","1740","华东区三组"]],"1733":[["file","1741","华南区一组"],["file","1802","华南区二组"]],"1750":[["folder","1751","客户发展部"],["file","1757","合同部"],["file","1758","财务部"],["folder","1759","业务支持部"],["folder","1763","增值服务部"],["file","1813","市场部"]],"1751":[["folder","1752","客户发展一部"],["file","1754","售前审核部"],["folder","1772","客户发展二部"]],"1752":[["file","1753","客户发展一部一组"],["file","1755","客户发展一部二组"],["file","1756","客户发展一部三组"]],"1759":[["file","1760","预审核组"],["file","1761","资质上传组"],["file","1762","开户组"]],"1763":[["folder","1764","新开部"],["folder","1765","普通客户部"],["folder","1766","VIP部"]],"1764":[["file","1767","新开部一部"]],"1765":[["file","1768","普通客户部一部"]],"1766":[["file","1769","VIP一部"]],"1770":[["file","1771","客户发展7部1组"]],"1772":[["file","1773","客户发展二部一组"],["file","1774","客户发展二部二组"]],"1778":[["file","1779","客户发展4部1组"]],"1785":[["file","1786","客户发展6部1组"]],"1791":[["file","1792","备用11"],["file","1793","备用22"]],"1805":[["folder","433","济南康健网络技术有限公司"]],"1807":[["file","1808","客户发展部8部1组"],["file","1855","客户发展部8部2组"]],"1819":[["folder","1820","客户发展部"],["file","1821","合同部"],["file","1822","财务部"],["folder","1823","业务支持部"],["folder","1824","增值服务部"],["file","1825","培训部"],["file","1826","市场部"]],"1820":[["folder","1827","商务一区"],["file","1830","售前审核部"]],"1823":[["file","1837","预审核组"],["file","1838","资质上传组"],["file","1839","开户组"]],"1824":[["folder","1831","新开客户部"],["folder","1832","普通客户部"],["folder","1833","VIP客户部"]],"1827":[["file","1828","商务一部"],["file","1829","商务二部"]],"1831":[["file","1834","新开客户1组"]],"1832":[["file","1835","普通客户1组"]],"1833":[["file","1836","VIP客户1组"]],"1848":[["folder","1849","淄博商务北区"],["folder","1850","淄博商务南区"],["folder","1853","淄博商务中区"]],"1849":[["file","461","商务一部"],["file","462","商务二部"],["file","1847","商务六部"]],"1850":[["file","463","商务三部"],["file","464","商务四部"],["file","1846","商务五部"]],"1851":[["file","1311","商务九部"]],"1853":[["file","471","商务十部"]],"1859":[["file","108","销售一部"],["file","112","销售四部"],["file","114","销售九部"],["file","129","销售十部"],["file","1673","销售三部"]],"1861":[["file","1862","客户发展5部1组"]],"1867":[["folder","85","深圳市力玛网络科技有限公司"]],"1868":[["folder","1871","华北区域"],["folder","1872","华东区域"],["folder","1873","华南区域"]],"1869":[["folder","2","中小渠道部"],["folder","1870","大客渠道部"]],"1870":[["file","1874","华北渠道"],["file","1875","华东渠道"],["file","1876","华南渠道"],["file","1877","境外直客"],["folder","1878","虚拟渠道"]],"1871":[["folder","1879","行业A"],["folder","1880","行业B"],["folder","1881","行业C"],["folder","1882","行业D"],["folder","1883","行业E"],["folder","1884","行业F"]],"1872":[["folder","1885","行业A"],["folder","1886","行业B"],["folder","1887","行业C"]],"1873":[["folder","1888","行业A"]],"1878":[["file","1928","华北虚拟渠道"],["file","1929","华东虚拟渠道"],["file","1930","华南虚拟渠道"]],"1879":[["file","1890","A-1"],["file","1891","A-2"],["file","1892","A-3"]],"1880":[["file","1893","B-1"],["file","1894","B-2"]],"1881":[["file","1895","C-1"],["file","1896","C-2"]],"1882":[["file","1897","D-1"],["file","1898","D-2"]],"1883":[["folder","1899","E-1"],["file","1900","E-2"],["file","1951","E-3"]],"1884":[["file","1901","F-1"],["file","1902","F-2"]],"1885":[["file","1903","A-1"],["file","1904","A-2"]],"1886":[["file","1905","B-1"],["file","1906","B-2"]],"1887":[["file","1907","C-1"],["file","1908","C-2"],["file","1909","C-3"]],"1888":[["file","1910","A-1"],["file","1911","A-2"],["file","1912","A-3"]],"1899":[["file","1952","e-1-1"],["file","1953","e-1-2"]],"1914":[["file","1915","H1部"],["file","1916","H2部"],["file","1917","H3部"],["file","1918","H外勤部"]],"1925":[["file","1926","客户发展4部1组"]],"1933":[["file","1299","合同审核部"]],"1937":[["file","1938","客户发展5部1组"]],"1956":[["file","1957","销售一部"],["file","1958","销售二部"]]},"root":["folderRoot","1","总部"]} diff --git a/comps/AjaxTree/_demo/data/data1.js b/comps/AjaxTree/_demo/data/data1.js new file mode 100755 index 000000000..04c6fef3e --- /dev/null +++ b/comps/AjaxTree/_demo/data/data1.js @@ -0,0 +1 @@ + {"data":{"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]},"root":["23","客户发展部"]} diff --git a/comps/AjaxTree/_demo/data/treedata.php b/comps/AjaxTree/_demo/data/treedata.php new file mode 100755 index 000000000..65c562584 --- /dev/null +++ b/comps/AjaxTree/_demo/data/treedata.php @@ -0,0 +1,18 @@ + 0, 'errmsg' => '', 'data' => array() ); + + $treeData = json_decode( file_get_contents( './crm.json.data.js' ) ); + + if( $id ){ + foreach ( $treeData->data as $key => $value) { + if( $key == $id ){ + $r['data'] = $value; + } + } + }else{ + $r['data'] = array( $treeData->root ); + } + + echo json_encode( $r ); +?> diff --git a/comps/AjaxTree/_demo/demo.crm.ajaxtree.html b/comps/AjaxTree/_demo/demo.crm.ajaxtree.html new file mode 100755 index 000000000..45943c4d8 --- /dev/null +++ b/comps/AjaxTree/_demo/demo.crm.ajaxtree.html @@ -0,0 +1,99 @@ + + + + +360 75 team + + + + + + +
        +
        +
        + back + + + + + +
        +
        +
        +
        +
        默认树 - Tree 示例
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/AjaxTree/_demo/demo.crm.tree.html b/comps/AjaxTree/_demo/demo.crm.tree.html new file mode 100755 index 000000000..10c9648b2 --- /dev/null +++ b/comps/AjaxTree/_demo/demo.crm.tree.html @@ -0,0 +1,88 @@ + + + + +360 75 team + + + + + + + +
        +
        +
        + back + + + + + +
        +
        +
        +
        +
        默认树 - Tree 示例
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/AjaxTree/_demo/demo.html b/comps/AjaxTree/_demo/demo.html new file mode 100755 index 000000000..84e945390 --- /dev/null +++ b/comps/AjaxTree/_demo/demo.html @@ -0,0 +1,215 @@ + + + + +360 75 team + + + + + + +
        +
        +
        + back + + + + + +
        +
        +
        +
        +
        默认树 - Tree 示例
        +
        +
        + +
        +
        +
        +
        +
        添加 a 链接 - Tree 示例
        +
        +
        + +
        +
        +
        +
        +
        添加 a 链接, evt.preventDefault - Tree 示例
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/AjaxTree/_demo/index.php b/comps/AjaxTree/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/AjaxTree/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AjaxTree/index.php b/comps/AjaxTree/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/AjaxTree/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AjaxTree/res/blue/images/closed.gif b/comps/AjaxTree/res/blue/images/closed.gif new file mode 100755 index 000000000..4641fa052 Binary files /dev/null and b/comps/AjaxTree/res/blue/images/closed.gif differ diff --git a/comps/AjaxTree/res/blue/images/closed_last.gif b/comps/AjaxTree/res/blue/images/closed_last.gif new file mode 100755 index 000000000..963afb6f1 Binary files /dev/null and b/comps/AjaxTree/res/blue/images/closed_last.gif differ diff --git a/comps/AjaxTree/res/blue/images/open.gif b/comps/AjaxTree/res/blue/images/open.gif new file mode 100755 index 000000000..77ce403b4 Binary files /dev/null and b/comps/AjaxTree/res/blue/images/open.gif differ diff --git a/comps/AjaxTree/res/blue/images/open_last.gif b/comps/AjaxTree/res/blue/images/open_last.gif new file mode 100755 index 000000000..1c79f4a4b Binary files /dev/null and b/comps/AjaxTree/res/blue/images/open_last.gif differ diff --git a/comps/AjaxTree/res/blue/images/root.gif b/comps/AjaxTree/res/blue/images/root.gif new file mode 100755 index 000000000..7393048b6 Binary files /dev/null and b/comps/AjaxTree/res/blue/images/root.gif differ diff --git a/comps/AjaxTree/res/blue/images/root_plus.gif b/comps/AjaxTree/res/blue/images/root_plus.gif new file mode 100755 index 000000000..51e1330de Binary files /dev/null and b/comps/AjaxTree/res/blue/images/root_plus.gif differ diff --git a/comps/AjaxTree/res/blue/images/treeline.gif b/comps/AjaxTree/res/blue/images/treeline.gif new file mode 100755 index 000000000..85b53954e Binary files /dev/null and b/comps/AjaxTree/res/blue/images/treeline.gif differ diff --git a/comps/AjaxTree/res/blue/images/treeline1.gif b/comps/AjaxTree/res/blue/images/treeline1.gif new file mode 100755 index 000000000..1787b394d Binary files /dev/null and b/comps/AjaxTree/res/blue/images/treeline1.gif differ diff --git a/comps/AjaxTree/res/blue/images/treeline2.gif b/comps/AjaxTree/res/blue/images/treeline2.gif new file mode 100755 index 000000000..72b3ae9c1 Binary files /dev/null and b/comps/AjaxTree/res/blue/images/treeline2.gif differ diff --git a/comps/AjaxTree/res/blue/style.css b/comps/AjaxTree/res/blue/style.css new file mode 100755 index 000000000..910a2da6f --- /dev/null +++ b/comps/AjaxTree/res/blue/style.css @@ -0,0 +1,28 @@ +.tree_wrap, .tree_wrap *{ + margin: 0; padding: 0; + } +.tree_wrap li{ list-style-type: none; } +.tree_wrap {text-align:left;line-height:24px; padding:8px 0; zoom:1;} + +.tree_wrap .highlight,.tree_wrap .ms_over a{background-color:#529dcb; color:#fff; line-height:18px; padding:0 4px 2px; border-radius:3px; display:inline-block;} +.tree_wrap .node_ctn a{ color:#999; } +.tree_wrap .highlight a{ color:#fff; } +.tree_wrap_inner ul { background:url(images/treeline.gif) repeat-y;} +.tree_wrap_inner li{ padding-left:24px; white-space:nowrap;} +.tree_wrap .node_ctn { display:inline;} +.tree_wrap .ms_over a,.tree_wrap .ms_over a:hover{ color:#fff;} + +.folder_open{} +.folder_img_open,.folder_img_root,.folder_img_root.folder_img_closed,.folder_img_loading,.folder_img_closed,.folder_img_bottom,.folder_img_last{ + width:24px; height:24px; display:-moz-inline-box;display:inline-block;cursor:pointer;} +.folder_img_open {background:url(images/open.gif) no-repeat center left;} +.folder_img_root {background:url(images/root.gif) no-repeat center left;} +.folder_img_root.folder_img_closed{ background:url(images/root_plus.gif) no-repeat;} +.folder_img_loading {background:url(images/loading.gif) no-repeat 3px 4px;} +.folder_img_closed {background:url(images/closed.gif) no-repeat center left;} +.folder_img_bottom{background:url(images/treeline1.gif) no-repeat center left;} +.folder_img_last{background:url(images/treeline2.gif) no-repeat center left;} +.folder_last .folder_img_open.folder_span_lst{background:url(images/open_last.gif) no-repeat center left;} +.folder_last .folder_img_closed.folder_span_lst{background:url(images/closed_last.gif) no-repeat center left;} +.tree_wrap_inner .folder_last .folder_ul_lst{ background:none;} +.tree_wrap span.file{ cursor: default; } diff --git a/comps/AjaxTree/res/blue/style.html b/comps/AjaxTree/res/blue/style.html new file mode 100755 index 000000000..2d8976761 --- /dev/null +++ b/comps/AjaxTree/res/blue/style.html @@ -0,0 +1,67 @@ + + + + + 360 75 team + + + +
        + +
        + + + diff --git a/comps/AjaxTree/res/default/images/closed.gif b/comps/AjaxTree/res/default/images/closed.gif new file mode 100755 index 000000000..07b89a21c Binary files /dev/null and b/comps/AjaxTree/res/default/images/closed.gif differ diff --git a/comps/AjaxTree/res/default/images/closed_last.gif b/comps/AjaxTree/res/default/images/closed_last.gif new file mode 100755 index 000000000..71adab60a Binary files /dev/null and b/comps/AjaxTree/res/default/images/closed_last.gif differ diff --git a/comps/AjaxTree/res/default/images/loading.gif b/comps/AjaxTree/res/default/images/loading.gif new file mode 100755 index 000000000..f9c2eee79 Binary files /dev/null and b/comps/AjaxTree/res/default/images/loading.gif differ diff --git a/comps/AjaxTree/res/default/images/open.gif b/comps/AjaxTree/res/default/images/open.gif new file mode 100755 index 000000000..319ccc9f4 Binary files /dev/null and b/comps/AjaxTree/res/default/images/open.gif differ diff --git a/comps/AjaxTree/res/default/images/open_last.gif b/comps/AjaxTree/res/default/images/open_last.gif new file mode 100755 index 000000000..cba44f082 Binary files /dev/null and b/comps/AjaxTree/res/default/images/open_last.gif differ diff --git a/comps/AjaxTree/res/default/images/root.gif b/comps/AjaxTree/res/default/images/root.gif new file mode 100755 index 000000000..14d302547 Binary files /dev/null and b/comps/AjaxTree/res/default/images/root.gif differ diff --git a/comps/AjaxTree/res/default/images/root_plus.gif b/comps/AjaxTree/res/default/images/root_plus.gif new file mode 100755 index 000000000..bb3ea2f44 Binary files /dev/null and b/comps/AjaxTree/res/default/images/root_plus.gif differ diff --git a/comps/AjaxTree/res/default/images/treeline.gif b/comps/AjaxTree/res/default/images/treeline.gif new file mode 100755 index 000000000..ce41c2ab3 Binary files /dev/null and b/comps/AjaxTree/res/default/images/treeline.gif differ diff --git a/comps/AjaxTree/res/default/images/treeline1.gif b/comps/AjaxTree/res/default/images/treeline1.gif new file mode 100755 index 000000000..cbf413392 Binary files /dev/null and b/comps/AjaxTree/res/default/images/treeline1.gif differ diff --git a/comps/AjaxTree/res/default/images/treeline2.gif b/comps/AjaxTree/res/default/images/treeline2.gif new file mode 100755 index 000000000..32bd0b78a Binary files /dev/null and b/comps/AjaxTree/res/default/images/treeline2.gif differ diff --git a/comps/AjaxTree/res/default/style.css b/comps/AjaxTree/res/default/style.css new file mode 100755 index 000000000..c02e4e052 --- /dev/null +++ b/comps/AjaxTree/res/default/style.css @@ -0,0 +1,28 @@ +.ajtree_wrap, .ajtree_wrap *{ + margin: 0; padding: 0; + } +.ajtree_wrap li{ list-style-type: none; } +.ajtree_wrap {text-align:left;line-height:24px; padding:8px 0; zoom:1;} + +.ajtree_wrap .highlight,.ajtree_wrap .ms_over a{background-color:#46b51d; color:#fff; line-height:18px; padding:0 4px 2px; border-radius:3px; display:inline-block;} +.ajtree_wrap .node_ctn a{ color:#999; } +.ajtree_wrap .highlight a{ color:#fff; } +.ajtree_wrap_inner ul { background:url(images/treeline.gif) repeat-y;} +.ajtree_wrap_inner li{ padding-left:24px; white-space:nowrap;} +.ajtree_wrap .node_ctn { display:inline;} +.ajtree_wrap .ms_over a,.ajtree_wrap .ms_over a:hover{ color:#fff;} + +.ajtree_wrap .folder_open{} +.folder_img_open,.folder_img_root,.folder_img_root.folder_img_closed,.folder_img_loading,.folder_img_closed,.folder_img_bottom,.folder_img_last{ + width:24px; height:24px; display:-moz-inline-box;display:inline-block;cursor:pointer;} +.folder_img_open {background:url(images/open.gif) no-repeat center left;} +.folder_img_root {background:url(images/root.gif) no-repeat center left;} +.folder_img_root.folder_img_closed{ background:url(images/root_plus.gif) no-repeat;} +.folder_img_loading {background:url(images/loading.gif) no-repeat 3px 4px;} +.folder_img_closed {background:url(images/closed.gif) no-repeat center left;} +.folder_img_bottom{background:url(images/treeline1.gif) no-repeat center left;} +.folder_img_last{background:url(images/treeline2.gif) no-repeat center left;} +.folder_last .folder_img_open.folder_span_lst{background:url(images/open_last.gif) no-repeat center left;} +.folder_last .folder_img_closed.folder_span_lst{background:url(images/closed_last.gif) no-repeat center left;} +.ajtree_wrap_inner .folder_last .folder_ul_lst{ background:none;} +.ajtree_wrap span.file{ cursor: default; } diff --git a/comps/AjaxTree/res/default/style.html b/comps/AjaxTree/res/default/style.html new file mode 100755 index 000000000..2d8976761 --- /dev/null +++ b/comps/AjaxTree/res/default/style.html @@ -0,0 +1,67 @@ + + + + + 360 75 team + + + +
        + +
        + + + diff --git a/comps/AjaxUpload/AjaxUpload.js b/comps/AjaxUpload/AjaxUpload.js old mode 100644 new mode 100755 index 213dd34d6..e57b27cb5 --- a/comps/AjaxUpload/AjaxUpload.js +++ b/comps/AjaxUpload/AjaxUpload.js @@ -1,15 +1,16 @@ -;(function(define, _win) { 'use strict'; define( [ 'JC.common', 'JC.BaseMVC' ], function(){ -;(function($){ +//TODO: 添加文件大小判断 +(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Panel' ], function(){ /** * Ajax 文件上传 + *

        require: + * JC.BaseMVC + * , JC.Panel + *

        *

        * JC Project Site * | API docs * | demo link *

        - *

        - * require: jQuery - *

        *

        可用的 html attribute

        *
        *
        cauStyle = string, default = g1
        @@ -32,12 +33,30 @@ * 上传完成后是否隐藏上传按钮 * * + *
        cauButtonAfter= bool
        + *
        是否把上传按钮放在后面
        + * *
        cauUrl = url, require
        - *
        上传文件的接口地址
        + *
        上传文件的接口地址 + *
        如果 url 带有参数 callback, 返回数据将以 jsonp 方式处理 + *
        + * + *
        cauJSONPName = function name
        + *
        显式声明上传后返回数据的 jsonp 回调名 + *

        jsonp 返回数据示例:

        +url: ?callback=callback +
        data: +<script> + window.parent && window.parent.callback && window.parent.callback( {"errorno":0,"errmsg":"","data":{"name":"test.jpg","url":".\/data\/images\/test.jpg"}} ); +</script> + *
        * *
        cauFileExt = file ext, optional
        *
        允许上传的文件扩展名, 例: ".jpg, .jpeg, .png, .gif"
        * + *
        cauFileSize = [ KB | MB | GB ], default = 1024 MB
        + *
        上传文件大小限制
        + * *
        cauFileName = string, default = file
        *
        上传文件的 name 属性
        * @@ -59,34 +78,40 @@ *
        cauUploadDoneCallback = function, optional
        *
        * 文件上传完毕时, 触发的回调 -function cauUploadDoneCallback( _json, _selector, _frame ){ +<pre>function cauUploadDoneCallback( _json, _selector, _frame ){ var _ins = this; //alert( _json ); //object object -} +} *
        * *
        cauUploadErrorCallback = function, optional
        *
        * 文件上传完毕时, 发生错误触发的回调 -function cauUploadErrorCallback( _json, _selector, _frame ){ +<pre>function cauUploadErrorCallback( _json, _selector, _frame ){ var _ins = this; //alert( _json ); //object object -} +} *
        * *
        cauDisplayLabelCallback = function, optional, return = string
        *
        * 自定义上传完毕后显示的内容 模板 -function cauDisplayLabelCallback( _json, _label, _value ){ +<pre>function cauDisplayLabelCallback( _json, _label, _value ){ var _selector = this - , _label = printf( '<a href="{0}" class="green js_auLink" target="_blank">{1}</a>{2}' + , _label = JC.f.printf( '&lt;a href="{0}" class="green js_auLink" target="_blank">{1}&lt;/a>{2}' , _value, _label - , '&nbsp;<a href="javascript:" class="btn btn-cls2 js_cleanCauData"></a>&nbsp;&nbsp;' + , '&nbsp;&lt;a href="javascript:" class="btn btn-cls2 js_cleanCauData">&lt;/a>&nbsp;&nbsp;' ) ; return _label; -} +} *
        + * + *
        cauViewFileBox = selector
        + *
        用于显示文件链接的容器
        + * + *
        cauViewFileBoxItemTpl = selector
        + *
        cauViewFileBox 的脚本模板
        *
        * @namespace JC * @class AjaxUpload @@ -130,6 +155,7 @@ } */ JC.AjaxUpload = AjaxUpload; + JC.f.addAutoInit && JC.f.addAutoInit( AjaxUpload ); function AjaxUpload( _selector ){ if( AjaxUpload.getInstance( _selector ) ) return AjaxUpload.getInstance( _selector ); @@ -204,7 +230,8 @@ * @static * @private */ - AjaxUpload._FRAME_DIR = "comps/AjaxUpload/frame/"; + AjaxUpload._FRAME_DIR = "modules/JC.AjaxUpload/0.1/frame/"; + define && !define.amd && ( AjaxUpload._FRAME_DIR = 'comps/AjaxUpload/frame/' ); /** * 初始化 frame 时递增的统计变量 * @property _INS_COUNT @@ -215,16 +242,23 @@ */ AjaxUpload._INS_COUNT = 1; - AjaxUpload.prototype = { + BaseMVC.build( AjaxUpload ); + + JC.f.extendObject( AjaxUpload.prototype, { _beforeInit: function(){ var _p = this; - JC.log( 'AjaxUpload _beforeInit', new Date().getTime() ); + //JC.log( 'AjaxUpload _beforeInit', new Date().getTime() ); } , _initHanlderEvent: function(){ - var _p = this; + var _p = this, _fileBox = _p._model.cauViewFileBox(); + if( _fileBox && _fileBox.length ){ + _fileBox.delegate( '.js_clearAjaxUpload', 'click', function(){ + _p.clear(); + }); + } /** * iframe 加载完毕后触发的事件, 执行初始化操作 */ @@ -242,23 +276,18 @@ }, 1); } - _p._model.selector().on( 'show', function( _evt ){ - JC.log( 'show'); - }); - - _p._model.selector().on( 'hide', function( _evt ){ - JC.log('hide'); - }); - - _p._model.frame().on( 'show', function( _evt ){ - JC.log( 'show'); - }); - - _p._model.frame().on( 'hide', function( _evt ){ - JC.log('hide'); - }); + _p._model.swfu( _w ); + _p._model.uploadReady( true ); + _p.trigger( 'UploadReady' ); }); + /** + * 文件大小错误 + */ + _p.on( 'ERR_FILE_SIZE', function( _evt, _flPath ){ + _p._view.errFileSize( _flPath ); + _p._view.updateChange(); + }); /** * 文件扩展名错误 */ @@ -271,12 +300,20 @@ */ _p.on( 'BeforeUpload', function( _d ){ _p._view.beforeUpload(); + _p._model.cauBeforeUploadCallback() + && _p._model.cauBeforeUploadCallback().call( + _p + , _d + , _p._model.selector() + , _p._model.frame() + ); }); /** * 上传完毕触发的事件 */ - _p.on( 'UploadDone', function( _evt, _d ){ - JC.log( _d ); + _p.on( 'UploadDone', function( _evt, _d, _ignore ){ + if( _ignore ) return; + //JC.log( _d ); var _err = false, _od = _d; try{ typeof _d == 'string' && ( _d = $.parseJSON( _d ) ); @@ -289,11 +326,12 @@ _p._view.updateChange(); _p._model.cauUploadErrorCallback() - && _p._model.cauUploadErrorCallback().call( _p - , _d - , _p._model.selector() - , _p._model.frame() - ); + && _p._model.cauUploadErrorCallback().call( + _p + , _d + , _p._model.selector() + , _p._model.frame() + ); }else{ if( _d.errorno ){ _p._view.errUpload( _d ); @@ -302,11 +340,12 @@ _p._view.updateChange( _d ); } _p._model.cauUploadDoneCallback() - && _p._model.cauUploadDoneCallback().call( _p - , _d - , _p._model.selector() - , _p._model.frame() - ); + && _p._model.cauUploadDoneCallback().call( + _p + , _d + , _p._model.selector() + , _p._model.frame() + ); } }); /** @@ -316,15 +355,43 @@ _p.on( 'AUUpdateLayout', function( _evt, _width, _height, _btn ){ _p._view.updateLayout( _width, _height, _btn ); }); + + _p.on( 'init', function(){ + _p._model.loadSWF( _p._model.getParams() ); + }); + + _p.on( 'disable', function(){ + if( !_p._model.uploadReady() ){ + _p._model.beforeReadyQueue( function(){ _p._view.disable(); } ); + } + _p._view.disable(); + }); + + _p.on( 'enable', function(){ + if( !_p._model.uploadReady() ){ + _p._model.beforeReadyQueue( function(){ _p._view.enable(); } ); + } + _p._view.enable(); + }); + + _p.on( 'UploadReady', function(){ + var _queue = _p._model.beforeReadyQueue(); + setTimeout( function(){ + $.each( _queue, function( _ix, _item ){ + _item(); + }); + }, 10 ); + }); + } , _inited: function(){ var _p = this; - JC.log( 'AjaxUpload _inited', new Date().getTime() ); + //JC.log( 'AjaxUpload _inited', new Date().getTime() ); _p._view.loadFrame(); AjaxUpload.getInstance( _p._model.frame(), _p ); - _p.trigger( 'AUInited' ); + _p.trigger( 'inited' ); } /** * 手动更新数据 @@ -342,6 +409,16 @@ "errmsg": "" }); */ + /** + * 禁用上传按钮 + * @method disable + */ + , disable: function(){ this.trigger( 'disable' ); return this; } + /** + * 启用上传按钮 + * @method enable + */ + , enable: function(){ this.trigger( 'enable' ); return this; } , update: function( _d ){ var _p = this; @@ -349,14 +426,20 @@ _d && _p.trigger('UploadDone', [ _d ] ); return this; } - }; - BaseMVC.buildModel( AjaxUpload ); + , clear: + function(){ + var _p = this; + $( _p._view ).trigger('UpdateDefaultStatus') + return this; + } + }); + AjaxUpload.Model._instanceName = 'AjaxUpload'; - AjaxUpload.Model.prototype = { + JC.f.extendObject( AjaxUpload.Model.prototype, { init: function(){ - JC.log( 'AjaxUpload.Model.init:', new Date().getTime() ); + //JC.log( 'AjaxUpload.Model.init:', new Date().getTime() ); } , cauStyle: function(){ return this.attrProp('cauStyle'); } @@ -366,6 +449,8 @@ , cauFileExt: function(){ return this.stringProp( 'cauFileExt' ); } + , cauFileSize: function(){ return this.stringProp( 'cauFileSize' ) || '1024 MB'; } + , cauFileName: function(){ return this.attrProp('cauFileName') || this.attrProp('name'); @@ -396,6 +481,11 @@ return this.boolProp( 'cauDefaultHide' ); } + , cauBeforeUploadCallback: + function(){ + return this.callbackProp( 'cauBeforeUploadCallback' ); + } + , cauUploadDoneCallback: function(){ return this.callbackProp( 'cauUploadDoneCallback' ); @@ -406,16 +496,27 @@ return this.callbackProp( 'cauUploadErrorCallback' ); } + , cauJSONPName: + function(){ + var _r = AjaxUpload.JSONPName; + + _r = JC.f.getUrlParam( this.cauUrl(), 'callback' ) || _r; + _r = this.attrProp( 'cauJSONPName' ) || _r; + + return _r; + } + , framePath: function(){ var _fl = this.attrProp('cauFrameFileName') || AjaxUpload.frameFileName - , _r = printf( '{0}{1}{2}', JC.PATH, AjaxUpload._FRAME_DIR, _fl ) + , _r = JC.f.printf( '{0}{1}{2}', JC.PATH, AjaxUpload._FRAME_DIR, _fl ) ; this.randomFrame() - && ( _r = addUrlParams( _r, { 'rnd': new Date().getTime() } ) ) + && ( _r = JC.f.addUrlParams( _r, { 'rnd': new Date().getTime() } ) ) ; return _r; } + , cauButtonAfter: function(){ return this.boolProp( 'cauButtonAfter' ); } , randomFrame: function(){ var _r = AjaxUpload.randomFrame; @@ -430,7 +531,7 @@ if( !this._iframe ){ var _tpl = AjaxUpload.frameTpl; if( this.selector().is('[cauFrameScriptTpl]') ){ - _tpl = scriptContent( parentSelector( + _tpl = JC.f.scriptContent( JC.f.parentSelector( this.selector() , this.selector().attr('cauFrameScriptTpl') ) @@ -440,14 +541,74 @@ } return this._iframe; } - }; - BaseMVC.buildView( AjaxUpload ); - AjaxUpload.View.prototype = { + , cauCancelCallback: function(){ return this.callbackProp( 'cauCancelCallback' ); } + + , uploadReady: + function( _setter ){ + typeof _setter != 'undefined' && ( this._uploadReady = _setter ); + return this._uploadReady; + } + + , beforeReadyQueue: + function( _item ){ + !this._beforeReadyQueue && ( this._beforeReadyQueue = [] ); + _item && this._beforeReadyQueue.push( _item ); + return this._beforeReadyQueue; + } + + , cauButtonAutoStatus: + function(){ + var _r = true; + this.is( '[cauButtonAutoStatus]' ) && ( _r = this.boolProp( 'cauButtonAutoStatus' ) ); + return _r; + } + + , swfu: + function( _setter ){ + typeof _setter != 'undefined' && ( this._swfu = _setter ); + return this._swfu; + } + + , cauViewFileBox: function(){ return this.selectorProp( 'cauViewFileBox' ); } + + , cauViewFileBoxItemTpl: + function(){ + var _r = [ '清除' + , ' 查看' ].join('') + , _tmp + ; + + this.is( '[cauViewFileBoxItemTpl]' ) + && ( _tmp = this.selectorProp( 'cauViewFileBoxItemTpl' ) ) + && _tmp.length + && ( _r = JC.f.scriptContent( _tmp ) ) + ; + + return _r; + } + }); + + JC.f.extendObject( AjaxUpload.View.prototype, { init: function(){ - JC.log( 'AjaxUpload.View.init:', new Date().getTime() ); + //JC.log( 'AjaxUpload.View.init:', new Date().getTime() ); var _p = this; + + $( _p ).on( 'update_viewFileBox', function( _evt, _name, _url ){ + var _box = _p._model.cauViewFileBox(), _itemTpl; + if( !( _box && _box.length ) ) return; + _itemTpl = _p._model.cauViewFileBoxItemTpl(); + _itemTpl = JC.f.printf( _itemTpl, _name, _url ); + _box.html( _itemTpl ); + }); + + $( _p ).on( 'clear_viewFileBox', function(){ + var _box = _p._model.cauViewFileBox(); + if( !( _box && _box.length ) ) return; + _box.html( '' ); + }); + /** * 恢复默认状态 */ @@ -465,6 +626,8 @@ ( _p._model.selector().attr('type') || '' ).toLowerCase() != 'hidden' && _p._model.selector().show() ; + $( _p ).trigger( 'clear_viewFileBox' ); + _p.trigger( 'UploadComplete' ); }); $( _p ).on( 'CAUUpdate', function( _evt, _d ){ @@ -484,7 +647,7 @@ if( _p._model.cauDisplayLabelCallback() ){ _label = _p._model.cauDisplayLabelCallback().call( _p._model.selector(), _d, _label, _value ); }else{ - _label = printf( '{1}', _value, _label); + _label = JC.f.printf( '{1}', _value, _label); } _displayLabel && _displayLabel.length @@ -499,22 +662,26 @@ , _frame = _p._model.frame() ; - JC.log( _path ); + //JC.log( _path ); _frame.attr( 'src', _path ); _frame.on( 'load', function(){ - $(_p).trigger( 'TriggerEvent', 'FrameLoad' ); + _p.trigger( 'FrameLoad' ); }); //_p._model.selector().hide(); + //return; - _p._model.selector().before( _frame ); + _p._model.cauButtonAfter() + ? _p.selector().after( _frame ) + : _p.selector().before( _frame ) + ; } , beforeUpload: function(){ var _p = this, _statusLabel = _p._model.cauStatusLabel(); - JC.log( 'AjaxUpload view#beforeUpload', new Date().getTime() ); + //JC.log( 'AjaxUpload view#beforeUpload', new Date().getTime() ); this.updateChange( null, true ); @@ -530,6 +697,7 @@ var _p = this , _statusLabel = _p._model.cauStatusLabel() , _displayLabel = _p._model.cauDisplayLabel() + , _name, _url ; //JC.log( 'AjaxUpload view#updateChange', new Date().getTime() ); @@ -550,11 +718,16 @@ if( _d && ( 'errorno' in _d ) && !_d.errorno ){ $(_p).trigger( 'CAUUpdate', [ _d ] ); + _name = _d.data[ _p._model.cauLabelKey() ]; + _url = _d.data[ _p._model.cauValueKey() ]; + _p._model.selector().val() && _p._model.selector().is(':visible') && _p._model.selector().prop('type').toLowerCase() == 'text' && _p._model.selector().trigger('blur') ; + + $( _p ).trigger( 'update_viewFileBox', [ _name, _url ] ); if( _displayLabel && _displayLabel.length ){ _p._model.selector().hide(); @@ -573,7 +746,7 @@ function( _width, _height, _btn ){ if( !( _width && _height ) ) return; var _p = this; - JC.log( 'AjaxUpload @event UpdateLayout', new Date().getTime(), _width, _height ); + //JC.log( 'AjaxUpload @event UpdateLayout', new Date().getTime(), _width, _height ); _p._model.frame().css({ 'width': _width + 'px' , 'height': _height + 'px' @@ -582,7 +755,12 @@ , errUpload: function( _d ){ - var _p = this, _cb = _p._model.callbackProp( 'cauUploadErrCallback' ); + var _p = this + , _beforeErrorCb = _p._model.callbackProp( 'cauBeforeUploadErrCallback' ) + , _cb = _p._model.callbackProp( 'cauUploadErrCallback' ) + ; + + _beforeErrorCb && _beforeErrorCb.call( _p._model.selector(), _d ); if( _cb ){ _cb.call( _p._model.selector(), _d, _p._model.frame() ); }else{ @@ -600,7 +778,7 @@ if( _cb ){ _cb.call( _p._model.selector(), _p._model.cauFileExt(), _flPath, _p._model.frame() ); }else{ - var _msg = printf( '类型错误, 允许上传的文件类型: {0}

        {1}

        ' + var _msg = JC.f.printf( '类型错误, 允许上传的文件类型: {0}

        {1}

        ' , _p._model.cauFileExt(), _flPath ); JC.Dialog ? JC.Dialog.alert( _msg, 1 ) @@ -608,6 +786,22 @@ ; } } + + , errFileSize: + function( _flPath ){ + var _p = this, _cb = _p._model.callbackProp( 'cauFileExtErrCallback' ); + if( _cb ){ + _cb.call( _p._model.selector(), _p._model.cauFileSize(), _flPath, _p._model.frame() ); + }else{ + var _msg = JC.f.printf( '文件大小错误, 允许上传的文件大小为: {0}

        {1}

        ' + , _p._model.cauFileSize(), _flPath ); + JC.Dialog + ? JC.Dialog.alert( _msg, 1 ) + : alert( _msg ) + ; + } + + } , errFatalError: function( _d ){ @@ -615,7 +809,7 @@ if( _cb ){ _cb.call( _p._model.selector(), _d, _p._model.frame() ); }else{ - var _msg = printf( '服务端错误, 无法解析返回数据:

        {0}

        ' + var _msg = JC.f.printf( '服务端错误, 无法解析返回数据:

        {0}

        ' , _d ); JC.Dialog ? JC.Dialog.alert( _msg, 1 ) @@ -623,10 +817,20 @@ ; } } + + , disable: + function(){ + var _p = this, _swfu = _p._model.swfu(); + _swfu && ( _swfu.setButtonDisabled( true ) ); + } + + , enable: + function(){ + var _p = this, _swfu = _p._model.swfu(); + _swfu && ( _swfu.setButtonDisabled( false ) ); + } - }; - - BaseMVC.build( AjaxUpload ); + }); $.event.special.AjaxUploadShowEvent = { show: @@ -638,7 +842,7 @@ }; AjaxUpload.frameTpl = - printf( + JC.f.printf( '' , 'width: 84px; height: 24px;cursor: pointer; vertical-align: middle;' ); @@ -648,5 +852,13 @@ AjaxUpload.autoInit && AjaxUpload.init(); }); -}(jQuery)); -});}(typeof define === 'function' && define.amd ? define : function (_require, _cb) { _cb && _cb(); }, this)); + return JC.AjaxUpload; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AjaxUpload/_demo/data/handler.jsonp.php b/comps/AjaxUpload/_demo/data/handler.jsonp.php new file mode 100755 index 000000000..893feb714 --- /dev/null +++ b/comps/AjaxUpload/_demo/data/handler.jsonp.php @@ -0,0 +1,32 @@ + 0, 'errmsg' => '', 'data' => array () ); + $callback = "callback"; + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + if( isset( $_REQUEST['errmsg'] ) ){ + $r['errmsg'] = $_REQUEST['errmsg']; + } + + if( isset( $_REQUEST['callback'] ) ){ + $callback = $_REQUEST['callback']; + } + + if( isset( $_REQUEST['callback_first'] ) ){ + $callback = $_REQUEST['callback_first']; + } + + $r['data']['name'] = 'test.jpg'; + $r['data']['url'] = './data/images/test.jpg'; + + $data = json_encode( $r ); + + echo << + window.parent && window.parent.$callback && window.parent.$callback( $data ); + +EOF; + +?> diff --git a/comps/AjaxUpload/_demo/data/handler.php b/comps/AjaxUpload/_demo/data/handler.php old mode 100644 new mode 100755 index 486647a23..1d163ccdc --- a/comps/AjaxUpload/_demo/data/handler.php +++ b/comps/AjaxUpload/_demo/data/handler.php @@ -1,12 +1,19 @@ 0, 'errmsg' => '', 'data' => array () ); + $callback = "callback"; if( isset( $_REQUEST['errorno'] ) ){ $r['errorno'] = (int)$_REQUEST['errorno']; } + if( isset( $_REQUEST['errmsg'] ) ){ + $r['errmsg'] = $_REQUEST['errmsg']; + } + $r['data']['name'] = 'test.jpg'; $r['data']['url'] = './data/images/test.jpg'; - echo json_encode( $r ); + $data = json_encode( $r ); + + echo $data; ?> diff --git a/comps/AjaxUpload/_demo/data/upload.php b/comps/AjaxUpload/_demo/data/upload.php old mode 100644 new mode 100755 diff --git a/comps/AjaxUpload/_demo/data/uploads/.gitignore b/comps/AjaxUpload/_demo/data/uploads/.gitignore new file mode 100755 index 000000000..ecba9b89c --- /dev/null +++ b/comps/AjaxUpload/_demo/data/uploads/.gitignore @@ -0,0 +1,4 @@ +*.jpg +*.jpeg +*.gif +*.png diff --git a/comps/AjaxUpload/_demo/demo.form_test.html b/comps/AjaxUpload/_demo/demo.form_test.html old mode 100644 new mode 100755 index a255369e0..581fc6b15 --- a/comps/AjaxUpload/_demo/demo.form_test.html +++ b/comps/AjaxUpload/_demo/demo.form_test.html @@ -64,22 +64,20 @@ .red{ color: red; } .gray{ color: gray; } - - + + + + with viewFileBox
        -
        JC.AjaxUpload 示例, with hidden && label
        +
        JC.AjaxUpload 示例, with textbox
        - + + + + + with viewFileBox, with clear +
        +
        + +
        +
        JC.AjaxUpload 示例, with textbox
        +
        + + + + + + with viewFileBox, with clear +
        +
        +
        +
        JC.AjaxUpload 示例, with hidden && label
        +
        文件上传中, 请稍候... + .txt
        JC.AjaxUpload 示例, with hidden && label
        - -
        JC.AjaxUpload 示例, with hidden && label, 真实上传实例, 仅对 host = git.me.btbtd.org 生效
        - - 文件上传中, 请稍候... + .jpg, .jpeg, .png, .gif
        diff --git a/comps/AjaxUpload/_demo/demo.style.blue.html b/comps/AjaxUpload/_demo/demo.style.blue.html new file mode 100755 index 000000000..4ac2e190d --- /dev/null +++ b/comps/AjaxUpload/_demo/demo.style.blue.html @@ -0,0 +1,208 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +
        +
        JC.AjaxUpload 示例, with hidden
        +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + diff --git a/comps/AjaxUpload/_demo/demo.style.html b/comps/AjaxUpload/_demo/demo.style.html new file mode 100755 index 000000000..533348008 --- /dev/null +++ b/comps/AjaxUpload/_demo/demo.style.html @@ -0,0 +1,206 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +
        +
        JC.AjaxUpload 示例, with hidden
        +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + + +
        + +
        + + + + diff --git a/comps/AjaxUpload/_demo/index.php b/comps/AjaxUpload/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/AjaxUpload/frame/default.bak.html b/comps/AjaxUpload/frame/blue.html old mode 100644 new mode 100755 similarity index 51% rename from comps/AjaxUpload/frame/default.bak.html rename to comps/AjaxUpload/frame/blue.html index c9d32cb88..891f3f767 --- a/comps/AjaxUpload/frame/default.bak.html +++ b/comps/AjaxUpload/frame/blue.html @@ -7,21 +7,23 @@ *{ margin: 0; padding: 0; } html{ - overflow: hidden; + overflow: hidden; } body{ - width 200px; + width 400px; } .file { top: 0; left: 0; position: absolute; z-index: 100; - margin-left:-155px; - height: 40px; + height: 24px; opacity: 0; + zoom: 1; filter: alpha( opacity = 0 ); + /* + */ } .btn { @@ -29,72 +31,78 @@ word-break: keep-all; } - + -
        + + diff --git a/comps/AjaxUpload/frame/default.html b/comps/AjaxUpload/frame/default.html old mode 100644 new mode 100755 index 6944d1bad..83aff2e8f --- a/comps/AjaxUpload/frame/default.html +++ b/comps/AjaxUpload/frame/default.html @@ -18,9 +18,9 @@ top: 0; left: 0; position: absolute; z-index: 100; - height: 40px; - zoom: 1; + height: 24px; opacity: 0; + zoom: 1; filter: alpha( opacity = 0 ); /* */ @@ -66,27 +66,34 @@ , _d = $.trim( _wb.innerHTML ) ; - _auIns.trigger( 'UploadDone', [ _d ] ); + _auIns.trigger( 'UploadDone', [ _d, _auIns._model.cauJSONPName() ] ); try{ _flBtn.val(''); }catch(ex){} _fm.trigger('reset'); }); _fm.on( 'submit', function( _evt ){ var _flPath = _flBtn.val().trim(); - JC.log( 's1', _flPath ); + //JC.log( 's1', _flPath ); if( !_flPath ) return prevent( _evt ); - JC.log( 's2' ); + //JC.log( 's2' ); if( !validFileExt( _flPath, _flBtn.attr('fileExt') ) ) { _auIns.trigger( 'ERR_FILE_EXT', [ _flPath ] ); try{ _flBtn.val(''); }catch(ex){} return prevent( _evt ); } - JC.log( 's3' ); + //JC.log( 's3' ); _auIns.trigger( 'BeforeUpload' ); - JC.log( 's4' ); + //JC.log( 's4' ); + + if( !validFileSize( _flBtn, _flBtn.attr('fileSize') ) ) { + _auIns.trigger( 'ERR_FILE_SIZE',[ _flPath ]); + try{ _flBtn.val(''); }catch(ex){} + return prevent( _evt ); + } + }); _disBtn.on('click', function( _evt ){ @@ -114,8 +121,10 @@ function initPage( _ins, _model ){ //alert( [ 'initPage', _model.cauUrl() ] ); _auIns = _ins; - _fm.attr( 'action', addUrlParams( _model.cauUrl(), { 'rnd': new Date().getTime() } ) ); + _fm.attr( 'action', JC.f.addUrlParams( _model.cauUrl(), { 'rnd': new Date().getTime() } ) ); _model.cauFileExt() && _flBtn.attr( 'fileExt', _model.cauFileExt() ); + + _model.cauFileSize() && _flBtn.attr( 'fileSize', _model.cauFileSize() ); _model.cauFileName() && _flBtn.attr( 'name', _model.cauFileName() ); @@ -134,6 +143,8 @@ var _defH = _disBtn.prop('offsetHeight') || 24; + _flBtn && _flBtn.css( { 'height': _defH + 'px' } ); + _updateLayout && _disBtn.css( 'line-height', _defH + 'px' ) && setTimeout( function(){ @@ -148,6 +159,9 @@ }, 1 ); //alert( _updateLayout + ', ' + _disBtn.html() ); + + _model.cauJSONPName() + && ( window[ _model.cauJSONPName() ] = callback ); } /** * 验证文件扩展名是否可用 @@ -173,6 +187,43 @@ return _r; } + + /** + * 验证文件大小 + */ + function validFileSize( _flBtn, _flSize ){ + var _r = true; + _flSize = _flSize || '1024 Mb'; + + _flBtn = _flBtn[0]; + isIE = /msie/i.test(navigator.userAgent) && !window.opera; + if (isIE && _flBtn) { + try{ + var fileSystem = new ActiveXObject("Scripting.FileSystemObject"); + }catch( ex ){ + return true; + } + _flPath = _flBtn.value; + var file = fileSystem.GetFile (_flPath); + fileSize = file.Size; + } else { + fileSize = _flBtn.files[0].size; + } + var size = 0; + + if( /k/i.test( _flSize ) ){ + size = fileSize / Math.pow( 1024, 1 ); + }else if( /g/i.test( _flSize ) ){ + size = fileSize / Math.pow( 1024, 3 ); + }else{ + size = fileSize / Math.pow( 1024, 2 ); + } + + if(size > parseFloat(_flSize) || size <= 0 ){ + _r = false ; + } + return _r; + } function updateBtnX(){ var _flw = _flBtn.prop('offsetWidth') @@ -204,6 +255,18 @@ else if(document.attachEvent) $ele.attachEvent('on' + $evtName, $func); } + function callback( _d ){ + if( !( _auIns && _fm ) ) return; + _auIns.trigger( 'UploadDone', [ _d ] ); + try{ _flBtn.val(''); }catch(ex){} + _fm.trigger('reset'); + } + + function setButtonDisabled( _disable ){ + var _btns = $( 'button, input' ); + _btns.prop( 'disabled', _disable ); + } + diff --git a/comps/AjaxUpload/index.php b/comps/AjaxUpload/index.php old mode 100644 new mode 100755 diff --git a/comps/AjaxUpload/res/blue/XPButtonUploadText_61x22.png b/comps/AjaxUpload/res/blue/XPButtonUploadText_61x22.png new file mode 100755 index 000000000..df7aa6eab Binary files /dev/null and b/comps/AjaxUpload/res/blue/XPButtonUploadText_61x22.png differ diff --git a/comps/AjaxUpload/res/blue/btn.png b/comps/AjaxUpload/res/blue/btn.png new file mode 100755 index 000000000..b08783d69 Binary files /dev/null and b/comps/AjaxUpload/res/blue/btn.png differ diff --git a/comps/AjaxUpload/res/blue/g_61x27.png b/comps/AjaxUpload/res/blue/g_61x27.png new file mode 100755 index 000000000..870abb496 Binary files /dev/null and b/comps/AjaxUpload/res/blue/g_61x27.png differ diff --git a/comps/AjaxUpload/res/blue/index.php b/comps/AjaxUpload/res/blue/index.php new file mode 100755 index 000000000..fae971333 --- /dev/null +++ b/comps/AjaxUpload/res/blue/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AjaxUpload/res/blue/style.css b/comps/AjaxUpload/res/blue/style.css new file mode 100755 index 000000000..40909d4e0 --- /dev/null +++ b/comps/AjaxUpload/res/blue/style.css @@ -0,0 +1,178 @@ + +.AUBtn{ + display: inline-block; + height: 30px; + border: none; + cursor: pointer; + border-radius: 3px; + overflow: hidden; + background: url(btn.png) no-repeat; + background-color: #529DCB; + box-shadow: 0 1px 2px #efefef; + vertical-align: middle; + color: #000; + + outline: none; +} + +.AUBtn:hover { + color: #000; +} + +.AUBtn-g3,.AUBtn-g1,.AUBtn-g2{ + border: 1px solid #529DCB; + border-top: 1px solid #529DCB; + border-bottom: 1px solid #529DCB; +} + +.AUBtn-w3,.AUBtn-w2,.AUBtn-w1{ + border: 1px solid #d2d2d2; + border-top: 1px solid #dfdfdf; +} + +.AUBtn-w3,.AUBtn-w2,.AUBtn-w1,.AUBtn-g1,.AUBtn-g2,.AUBtn-g3{ + padding: 0 15px; + *padding: 0; +} + + +.AUBtn-w1{ + height: 24px; + background-position: 0 -66px; + background-color: #f1f1f1; +} + +.AUBtn-w1:hover { + background-position: 0 -99px; +} + +.AUBtn-w2{ + height: 27px; + background-position: 0 -66px; + background-color: #f1f1f1; +} + +.AUBtn-w2:hover { + background-position: 0 -99px; +} + +.AUBtn-w3{ + background-position: 0 -66px; + background-color: #f1f1f1; +} + +.AUBtn-w3:hover { + background-position: 0 -99px; +} + +.AUBtn-g1{ + height: 24px; + color: #fff; +} + +.AUBtn-g1:hover { + height: 24px; + background-position: 0 -33px; + color: #fff; +} + +.AUBtn-g2{ + height: 27px; + color: #fff; +} + +.AUBtn-g2:hover { + background-position: 0 -33px; + color: #fff; +} + +.AUBtn-g3{ + color: #fff; + margin-right: 5px; +} + +.AUBtn-g3:hover { + background-position: 0 -33px; + color: #fff; +} + +.AUBtn-g3[disabled], .AUBtn-g1[disabled], .AUBtn-g2[disabled] { + background-position: 0 -158px!important; + color: #bbb!important; +} + +.AUBtn-w3[disabled], .AUBtn-w1[disabled], .AUBtn-w2[disabled] { + background-position: 0 -210px!important; + color: #888!important; +} + +.AUProgress { + border: 1px solid #CCCCCC; + background: transparent!important; + width: 85px; + vertical-align: middle; + padding: 0px!important; + margin: 0px!important; + outline: none; + + height: 10px; + overflow: hidden; +} + +.AUProgress .AUPercent { + display: block; + background: #74CC50; + width: 0%; + height: 8px; +} + +.AUCancelProgress, .AUClose { + display: inline-block; + height: 21px; + width: 21px; + border: none; + cursor: pointer; + overflow: hidden; + background: url(btn.png) no-repeat; + vertical-align: middle; + margin-top: 1px; + margin-left: 2px; + outline: none; + + background-position: 0 -260px; +} + +.AUCancelProgress:hover, .AUClose { + background-position: 0 -290px; +} + +.AUCancelProgress, .AUClose { +} + +.AURemove { + display: inline-block; + width: 15px; + height: 15px; + border: none; + cursor: pointer; + overflow: hidden; + background: url(btn.png) no-repeat; + background-color: #fff; + box-shadow: 0 1px 2px #efefef; + vertical-align: middle; + color: #000; + outline: none; + + background-position: -146px -380px!important; +} +.AURemove:hover { + background-position: -172px -380px!important; +} + +.AURemove1 { + background-position: -75px -429px!important; +} + +.AURemove1:hover { + background-position: -75px -404px!important; +} diff --git a/comps/AjaxUpload/res/blue/style.html b/comps/AjaxUpload/res/blue/style.html new file mode 100755 index 000000000..09bf8f6cd --- /dev/null +++ b/comps/AjaxUpload/res/blue/style.html @@ -0,0 +1,50 @@ + + + + +iframe upload - suches template + + + + +
        +
        input button 样式, green
        + +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        input button 样式, white
        + +
        + +
        + +
        + +
        +
        + +
        +
        + + + + + diff --git a/comps/AjaxUpload/res/blue/transparent.png b/comps/AjaxUpload/res/blue/transparent.png new file mode 100755 index 000000000..aeacb4ef1 Binary files /dev/null and b/comps/AjaxUpload/res/blue/transparent.png differ diff --git a/comps/AjaxUpload/res/blue/w_61x27.png b/comps/AjaxUpload/res/blue/w_61x27.png new file mode 100755 index 000000000..b998c2558 Binary files /dev/null and b/comps/AjaxUpload/res/blue/w_61x27.png differ diff --git a/comps/AjaxUpload/res/default/XPButtonUploadText_61x22.png b/comps/AjaxUpload/res/default/XPButtonUploadText_61x22.png new file mode 100755 index 000000000..df7aa6eab Binary files /dev/null and b/comps/AjaxUpload/res/default/XPButtonUploadText_61x22.png differ diff --git a/comps/AjaxUpload/res/default/btn.png b/comps/AjaxUpload/res/default/btn.png old mode 100644 new mode 100755 index 60a529973..a2240dca3 Binary files a/comps/AjaxUpload/res/default/btn.png and b/comps/AjaxUpload/res/default/btn.png differ diff --git a/comps/AjaxUpload/res/default/g_61x27.png b/comps/AjaxUpload/res/default/g_61x27.png new file mode 100755 index 000000000..870abb496 Binary files /dev/null and b/comps/AjaxUpload/res/default/g_61x27.png differ diff --git a/comps/AjaxUpload/res/default/index.php b/comps/AjaxUpload/res/default/index.php old mode 100644 new mode 100755 diff --git a/comps/AjaxUpload/res/default/style.css b/comps/AjaxUpload/res/default/style.css old mode 100644 new mode 100755 index 136df1847..9fb2c2151 --- a/comps/AjaxUpload/res/default/style.css +++ b/comps/AjaxUpload/res/default/style.css @@ -11,6 +11,8 @@ box-shadow: 0 1px 2px #efefef; vertical-align: middle; color: #000; + + outline: none; } .AUBtn:hover { @@ -33,6 +35,7 @@ *padding: 0; } + .AUBtn-w1{ height: 24px; background-position: 0 -66px; @@ -93,3 +96,83 @@ color: #fff; } +.AUBtn-g3[disabled], .AUBtn-g1[disabled], .AUBtn-g2[disabled] { + background-position: 0 -158px!important; + color: #bbb!important; +} + +.AUBtn-w3[disabled], .AUBtn-w1[disabled], .AUBtn-w2[disabled] { + background-position: 0 -210px!important; + color: #888!important; +} + +.AUProgress { + border: 1px solid #CCCCCC; + background: transparent!important; + width: 85px; + vertical-align: middle; + padding: 0px!important; + margin: 0px!important; + outline: none; + + height: 10px; + overflow: hidden; +} + +.AUProgress .AUPercent { + display: block; + background: #74CC50; + width: 0%; + height: 8px; +} + +.AUCancelProgress, .AUClose { + display: inline-block; + height: 21px; + width: 21px; + border: none; + cursor: pointer; + overflow: hidden; + background: url(btn.png) no-repeat; + vertical-align: middle; + margin-top: 1px; + margin-left: 2px; + outline: none; + + background-position: 0 -260px; +} + +.AUCancelProgress:hover, .AUClose { + background-position: 0 -290px; +} + +.AUCancelProgress, .AUClose { +} + +.AURemove { + display: inline-block; + width: 15px; + height: 15px; + border: none; + cursor: pointer; + overflow: hidden; + background: url(btn.png) no-repeat; + background-color: #fff; + box-shadow: 0 1px 2px #efefef; + vertical-align: middle; + color: #000; + outline: none; + + background-position: -146px -380px!important; +} +.AURemove:hover { + background-position: -172px -380px!important; +} + +.AURemove1 { + background-position: -75px -429px!important; +} + +.AURemove1:hover { + background-position: -75px -404px!important; +} diff --git a/comps/AjaxUpload/res/default/style.html b/comps/AjaxUpload/res/default/style.html old mode 100644 new mode 100755 diff --git a/comps/AjaxUpload/res/default/transparent.png b/comps/AjaxUpload/res/default/transparent.png new file mode 100755 index 000000000..aeacb4ef1 Binary files /dev/null and b/comps/AjaxUpload/res/default/transparent.png differ diff --git a/comps/AjaxUpload/res/default/w_61x27.png b/comps/AjaxUpload/res/default/w_61x27.png new file mode 100755 index 000000000..b998c2558 Binary files /dev/null and b/comps/AjaxUpload/res/default/w_61x27.png differ diff --git a/comps/AjaxUpload/res/green/XPButtonUploadText_61x22.png b/comps/AjaxUpload/res/green/XPButtonUploadText_61x22.png new file mode 100755 index 000000000..df7aa6eab Binary files /dev/null and b/comps/AjaxUpload/res/green/XPButtonUploadText_61x22.png differ diff --git a/comps/AjaxUpload/res/green/btn.png b/comps/AjaxUpload/res/green/btn.png new file mode 100755 index 000000000..a2240dca3 Binary files /dev/null and b/comps/AjaxUpload/res/green/btn.png differ diff --git a/comps/AjaxUpload/res/green/g_61x27.png b/comps/AjaxUpload/res/green/g_61x27.png new file mode 100755 index 000000000..870abb496 Binary files /dev/null and b/comps/AjaxUpload/res/green/g_61x27.png differ diff --git a/comps/AjaxUpload/res/green/index.php b/comps/AjaxUpload/res/green/index.php new file mode 100755 index 000000000..fae971333 --- /dev/null +++ b/comps/AjaxUpload/res/green/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AjaxUpload/res/green/style.css b/comps/AjaxUpload/res/green/style.css new file mode 100755 index 000000000..9fb2c2151 --- /dev/null +++ b/comps/AjaxUpload/res/green/style.css @@ -0,0 +1,178 @@ + +.AUBtn{ + display: inline-block; + height: 30px; + border: none; + cursor: pointer; + border-radius: 3px; + overflow: hidden; + background: url(btn.png) no-repeat; + background-color: #5dcb30; + box-shadow: 0 1px 2px #efefef; + vertical-align: middle; + color: #000; + + outline: none; +} + +.AUBtn:hover { + color: #000; +} + +.AUBtn-g3,.AUBtn-g1,.AUBtn-g2{ + border: 1px solid #50ad1d; + border-top: 1px solid #54bf1a; + border-bottom: 1px solid #4c9a20; +} + +.AUBtn-w3,.AUBtn-w2,.AUBtn-w1{ + border: 1px solid #d2d2d2; + border-top: 1px solid #dfdfdf; +} + +.AUBtn-w3,.AUBtn-w2,.AUBtn-w1,.AUBtn-g1,.AUBtn-g2,.AUBtn-g3{ + padding: 0 15px; + *padding: 0; +} + + +.AUBtn-w1{ + height: 24px; + background-position: 0 -66px; + background-color: #f1f1f1; +} + +.AUBtn-w1:hover { + background-position: 0 -99px; +} + +.AUBtn-w2{ + height: 27px; + background-position: 0 -66px; + background-color: #f1f1f1; +} + +.AUBtn-w2:hover { + background-position: 0 -99px; +} + +.AUBtn-w3{ + background-position: 0 -66px; + background-color: #f1f1f1; +} + +.AUBtn-w3:hover { + background-position: 0 -99px; +} + +.AUBtn-g1{ + height: 24px; + color: #fff; +} + +.AUBtn-g1:hover { + height: 24px; + background-position: 0 -33px; + color: #fff; +} + +.AUBtn-g2{ + height: 27px; + color: #fff; +} + +.AUBtn-g2:hover { + background-position: 0 -33px; + color: #fff; +} + +.AUBtn-g3{ + color: #fff; + margin-right: 5px; +} + +.AUBtn-g3:hover { + background-position: 0 -33px; + color: #fff; +} + +.AUBtn-g3[disabled], .AUBtn-g1[disabled], .AUBtn-g2[disabled] { + background-position: 0 -158px!important; + color: #bbb!important; +} + +.AUBtn-w3[disabled], .AUBtn-w1[disabled], .AUBtn-w2[disabled] { + background-position: 0 -210px!important; + color: #888!important; +} + +.AUProgress { + border: 1px solid #CCCCCC; + background: transparent!important; + width: 85px; + vertical-align: middle; + padding: 0px!important; + margin: 0px!important; + outline: none; + + height: 10px; + overflow: hidden; +} + +.AUProgress .AUPercent { + display: block; + background: #74CC50; + width: 0%; + height: 8px; +} + +.AUCancelProgress, .AUClose { + display: inline-block; + height: 21px; + width: 21px; + border: none; + cursor: pointer; + overflow: hidden; + background: url(btn.png) no-repeat; + vertical-align: middle; + margin-top: 1px; + margin-left: 2px; + outline: none; + + background-position: 0 -260px; +} + +.AUCancelProgress:hover, .AUClose { + background-position: 0 -290px; +} + +.AUCancelProgress, .AUClose { +} + +.AURemove { + display: inline-block; + width: 15px; + height: 15px; + border: none; + cursor: pointer; + overflow: hidden; + background: url(btn.png) no-repeat; + background-color: #fff; + box-shadow: 0 1px 2px #efefef; + vertical-align: middle; + color: #000; + outline: none; + + background-position: -146px -380px!important; +} +.AURemove:hover { + background-position: -172px -380px!important; +} + +.AURemove1 { + background-position: -75px -429px!important; +} + +.AURemove1:hover { + background-position: -75px -404px!important; +} diff --git a/comps/AjaxUpload/res/green/style.html b/comps/AjaxUpload/res/green/style.html new file mode 100755 index 000000000..09bf8f6cd --- /dev/null +++ b/comps/AjaxUpload/res/green/style.html @@ -0,0 +1,50 @@ + + + + +iframe upload - suches template + + + + +
        +
        input button 样式, green
        + +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        input button 样式, white
        + +
        + +
        + +
        + +
        +
        + +
        +
        + + + + + diff --git a/comps/AjaxUpload/res/green/transparent.png b/comps/AjaxUpload/res/green/transparent.png new file mode 100755 index 000000000..aeacb4ef1 Binary files /dev/null and b/comps/AjaxUpload/res/green/transparent.png differ diff --git a/comps/AjaxUpload/res/green/w_61x27.png b/comps/AjaxUpload/res/green/w_61x27.png new file mode 100755 index 000000000..b998c2558 Binary files /dev/null and b/comps/AjaxUpload/res/green/w_61x27.png differ diff --git a/comps/AjaxUpload/res/index.php b/comps/AjaxUpload/res/index.php old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/AutoChecked.js b/comps/AutoChecked/AutoChecked.js old mode 100644 new mode 100755 index e6aa4483b..3b4eb2f29 --- a/comps/AutoChecked/AutoChecked.js +++ b/comps/AutoChecked/AutoChecked.js @@ -1,10 +1,12 @@ - ;(function($){ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ /** * 全选/反选 + *

        require: + * JC.common + *

        *

        JC Project Site * | API docs * | demo link

        - *

        require: jQuery

        *

        input[type=checkbox] 可用的 HTML 属性

        *
        *
        checktype = string
        @@ -81,6 +83,7 @@ */ JC.Form && ( JC.Form.initCheckAll = AutoChecked ); JC.AutoChecked = AutoChecked; + JC.f.addAutoInit && JC.f.addAutoInit( AutoChecked ); function AutoChecked( _selector ){ _selector = $( _selector ); @@ -91,7 +94,7 @@ if( AutoChecked.getInstance( _selector ) ) return AutoChecked.getInstance( _selector ); AutoChecked.getInstance( _selector, this ); - JC.log( 'AutoChecked init', new Date().getTime() ); + //JC.log( 'AutoChecked init', new Date().getTime() ); this._model = new Model( _selector ); this._view = new View( this._model ); @@ -132,7 +135,7 @@ }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ); _data.shift(); _data.shift(); + var _data = JC.f.sliceArgs( arguments ); _data.shift(); _data.shift(); _p.trigger( _evtName, _data ); }); @@ -152,19 +155,19 @@ }); _p.on('all', function(){ - JC.log( 'AutoChecked all', new Date().getTime() ); + //JC.log( 'AutoChecked all', new Date().getTime() ); _p._view.allChange(); }); _p.on('inverse', function(){ - JC.log( 'AutoChecked inverse', new Date().getTime() ); + //JC.log( 'AutoChecked inverse', new Date().getTime() ); _p._view.inverseChange(); }); if( !( _p._model.checktype() == 'inverse' && _p._model.hasCheckAll() ) ){ $( _p._model.delegateElement() ).delegate( _p._model.delegateSelector(), 'click', function( _evt ){ if( AutoChecked.isAutoChecked( $(this) ) ) return; - JC.log( 'AutoChecked change', new Date().getTime() ); + //JC.log( 'AutoChecked change', new Date().getTime() ); _p._view.itemChange(); }); } @@ -293,11 +296,11 @@ if( this.isParentSelector() ){ if( Model.parentNodeRe.test( this.checkfor() ) ){ this.checkfor().replace( /^([^\s]+)/, function( $0, $1 ){ - _r = parentSelector( _p.selector(), $1 ); + _r = JC.f.parentSelector( _p.selector(), $1 ); }); }else{ _tmp = this.checkfor().replace( Model.parentSelectorRe, '' ); - _r = parentSelector( _p.selector(), _tmp ); + _r = JC.f.parentSelector( _p.selector(), _tmp ); } } return _r; @@ -316,7 +319,7 @@ var _r; if( this.checktype() == 'inverse' ){ this.checkall() - && ( _r = parentSelector( this.selector(), this.checkall() ) ) + && ( _r = JC.f.parentSelector( this.selector(), this.checkall() ) ) ; }else{ _r = this.selector(); @@ -375,7 +378,7 @@ if( !$(this).prop('checked') ) return _checkAll = false; }); - JC.log( '_fixAll:', _checkAll ); + //JC.log( '_fixAll:', _checkAll ); if( !_count ) _checkAll = false; @@ -394,5 +397,13 @@ AutoChecked.init( $(document) ); }); -}(jQuery)); - + return JC.AutoChecked; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AutoChecked/_demo/data/autoInitCheckAll.php b/comps/AutoChecked/_demo/data/autoInitCheckAll.php old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/_demo/data/initCheckAll.php b/comps/AutoChecked/_demo/data/initCheckAll.php old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/_demo/demo.dynamic.add.html b/comps/AutoChecked/_demo/demo.dynamic.add.html old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/_demo/demo.html b/comps/AutoChecked/_demo/demo.html old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/_demo/index.php b/comps/AutoChecked/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/index.php b/comps/AutoChecked/index.php old mode 100644 new mode 100755 diff --git a/comps/AutoChecked/res/default/style.css b/comps/AutoChecked/res/default/style.css old mode 100644 new mode 100755 diff --git a/comps/AutoComplete/AutoComplete.js b/comps/AutoComplete/AutoComplete.js new file mode 100755 index 000000000..d146f6bf6 --- /dev/null +++ b/comps/AutoComplete/AutoComplete.js @@ -0,0 +1,1368 @@ +//TODO: 添加 IE6 支持 +//TODO: 移动 左右 方向键时, 显示 首字符到光标的过滤条件 +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ + /** + * AutoComplete 文本框内容输入提示 + *
        响应式初始化, 当光标焦点 foucs 到 文本框时, 会检查是否需要自动初始化 AutoComplete 实例 + *

        require: + * jQuery + * , JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        可用的 HTML attribute

        + *
        + *
        cacPopup = selector, optional
        + *
        显式指定用于显示数据列表的弹框, 如不指定, 载入数据时会自己生成 popup node
        + * + *
        cacPreventEnter = bool, default = false
        + *
        文本框按回车键时, 是否阻止默认行为, 防止提交表单
        + * + *
        cacLabelKey = string, default = data-label
        + *
        用于显示 label 的HTML属性
        + * + *
        cacIdKey = string, default= data-id
        + *
        用于显示 ID 的HTML属性
        + * + *
        cacIdSelector = selector
        + *
        用于保存 ID 值的 node
        + * + *
        cacIdVal = string, optional
        + *
        用于初始化的默认ID, 如果 cacIdVal 为空将尝试读取 cacIdSelector 的值
        + * + *
        cacStrictData = bool, default = false
        + *
        是否验证已填内容的合法性
        仅在 cacIdSelector 和 cacIdKey 显式声明时有效
        + * + *
        cacAjaxDataUrl = url
        + *
        + * 获取 数据的 AJAX 接口 + *
        + *
        数据格式
        + *
        + * [ { "id": "id value", "label": "label value" }, ... ] + *
        + *
        + *
        + * + *
        cacDataFilter = callback
        + *
        + *
        + *
        如果 数据接口获取的数据不是默认格式, + * 可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式 + *
        + *
        +
        function cacDataFilter( _json ){
        +if( _json.data && _json.data.length ){
        +    _json = _json.data;
        +}
        +
        +$.each( _json, function( _ix, _item ){
        +    _item.length &&
        +        ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } )
        +        ;
        +});
        +return _json;
        +}
        + *
        + *
        + *
        + * + *
        cacBoxWidth = int
        + *
        定义 popup 的宽度, 如果没有显式定义, 将使用 selector 的宽度
        + * + *
        cacCasesensitive = bool, default = false
        + *
        是否区分英文大小写
        + * + *
        cacSubItemsSelector = selector string, default = "> li" + *
        popup 查找数据项的选择器语法
        + * + *
        cacNoDataText = string, default = "数据加载中, 请稍候..."
        + *
        加载数据时的默认提示文字
        + * + *
        cacValidCheckTimeout = int, default = 1
        + *
        定义 JC.Valid blur 时执行 check 的时间间隔, 主要为防止点击列表时已经 Valid.check 的问题
        + * + *
        cacFixHtmlEntity = bool
        + *
        是否将 HTML实体 转为 html
        + * + *
        cacMultiSelect = bool, default = false
        + *
        是否为多选模式
        + * + *
        cacListItemTpl= selector
        + *
        指定项内容的模板
        + * + *
        cacListAll = bool
        + *
        popup是否显示所有内容
        + * + *
        cacDisableSelectedBlur = bool
        + *
        在文本框里按方向键选择项内容并按回车键时, 是否禁止触发 blur事件
        + * + *
        cacNoCache = bool, default = false
        + *
        AJAX 获取数据式,是否缓存 AJAX 数据
        + *
        + * @namespace JC + * @class AutoComplete + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-11-01 + * @author zuojing, qiushaowei | 75 Team + * @example +
        + +
        + +
        + */ + JC.AutoComplete = AutoComplete; + + var _jdoc = $( document ), _jwin = $( window ); + + function AutoComplete( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( AutoComplete.getInstance( _selector ) ) return AutoComplete.getInstance( _selector ); + + AutoComplete.getInstance( _selector, this ); + + this._model = new AutoComplete.Model( _selector ); + this._view = new AutoComplete.View( this._model ); + this._init(); + + JC.log( 'AutoComplete inited', new Date().getTime() ); + } + /** + * 获取或设置 AutoComplete 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {AutoCompleteInstance} + */ + AutoComplete.getInstance = + function( _selector, _setter ){ + if( typeof _selector == 'string' && !/{1}' + ); + this.is( '[cacListItemTpl]' ) + && ( _tpl = JC.f.scriptContent( this.selectorProp( 'cacListItemTpl' ) ) ) + ; + //JC.log( _tpl ); + + return _tpl; + } + + , cacItemClickHanlder: function(){ return this.callbackProp( 'cacItemClickHanlder' ); } + + , cacBeforeShowHandler: function(){ return this.callbackProp( 'cacBeforeShowHandler' ); } + + , popup: + function() { + var _p = this, _r = _p.selector().data('AC_panel'); + !_r && ( _r = this.selectorProp('cacPopup') ); + + if( !( _r && _r.length ) ){ + _r = $( JC.f.printf( '
          {1}
        ' + , ' style="position:absolute;"' + , '
      • ' + _p.cacNoDataText() + '
      • ' + )); + //_p.selector().after( _r ); + _p.selector().data( 'AC_panel', _r ); + + + _p.cacMultiSelect() + ? _r.appendTo( _p.layoutPopup() ) + : _r.appendTo( document.body ); + ; + } + + if( !this._inited ){ + this._inited = true; + _r.css( { 'width': _p.cacBoxWidth() + 'px' } ); + } + + return _r; + } + + , layoutPopup: + function(){ + + if( !this._layoutPopup ){ + if( this.cacMultiSelect() ){ + this._layoutPopup = $( '
        ' ); + this._layoutPopup.appendTo( document.body ); + }else{ + this._layoutPopup = this.popup(); + } + } + + return this._layoutPopup; + } + + , initPopupData: + function( _json ){ + this.initData = _json; + } + /** + * 验证 key && id 是否正确 + * 仅在 cacStrictData 为真的时候进行验证 + */ + , verifyKey: + function(){ + if( !this.cacStrictData() ) return; + var _p = this + , _label = this.selector().val().trim() + , _findLs = [] + , _definedIdKey = _p.selector().is( '[cacIdKey]' ) + , _isCor + ; + + if( !_label ){ + _p.selector().val( '' ); + _p.setIdSelectorData(); + return; + } + + if( _label ){ + var _id = _p.cacIdVal(), _findId, _findLabel; + + $.each( _p.initData, function( _ix, _item ){ + //JC.log( _item.label, _item.id ); + if( _definedIdKey ){ + var _slabel = _item.label.trim(); + //var _slabel = $( '

        ' + _item.label.trim() + '

        ' ).text(); + + if( _slabel === _label ){ + _isCor = true; + !_findLabel && _p.setIdSelectorData( _item.id ); + _findLabel = true; + } + + if( _slabel === _label && !_id ){ + _p.setIdSelectorData( _id = _item.id ); + } + + if( _slabel === _label && _item.id === _id ){ + _findLs.push( _item ); + !_findId && ( _p.setIdSelectorData( _item.id ) ); + _findId = true; + _isCor = true; + return false; + } + }else{ + if( _item.label.trim() == _label ){ + _findLs.push( _item ); + _isCor = true; + } + } + }); + } + + if( !_isCor ){ + _p.selector().val( '' ); + _p.setIdSelectorData(); + } + } + + , cache: + function ( _key ) { + + //JC.log( '................cache', _key ); + + if( !( _key in this._cache ) ){ + this._cache[ _key ] = this.keyData( _key ) || this.initData; + } + + return this._cache[ _key ]; + } + + , clearCache: function(){ this._cache = {}; } + + , dataItems: + function() { + var _p = this + , _el = _p.listItems() + , _result = [] + ; + + _el.each(function( _ix, _item ) { + var _sp = $(this); + + _result.push({ + //'el': _item + 'id': _sp.attr( _p.cacIdKey() ) || '' + , 'label': _sp.attr( _p.cacLabelKey() ) + }); + + }); + return _result; + } + + , noCache: function(){ + var _r = AutoComplete.AJAX_NO_CACHE; + this.is( '[cacNoCache]' ) && ( _r = this.boolProp( 'cacNoCache' ) ); + return _r; + } + + , ajaxData: + function( _url, _cb ){ + var _p = this, _url = _url || _p.attrProp( 'cacAjaxDataUrl' ); + if( !_url ) return; + + if( !_p.noCache() &&( _url in AutoComplete.Model.AJAX_CACHE ) ){ + $( _p ).trigger( 'TriggerEvent' + , [ AutoComplete.Model.UPDATE, AutoComplete.Model.AJAX_CACHE[ _url ], _cb ] + ); + return; + } + + $.get( _url ).done( function( _d ){ + _d = $.parseJSON( _d ); + _d = _p.cacDataFilter( _d ); + AutoComplete.Model.AJAX_CACHE[ _url ] = _d; + $( _p ).trigger( 'TriggerEvent', [ AutoComplete.Model.UPDATE + , AutoComplete.Model.AJAX_CACHE[ _url ] + , _cb + ] ); + _p.clearCache(); + _p.trigger( AutoComplete.Model.UPDATE_LIST ); + }); + } + + , keyData: + function ( _key ) { + var _p = this + , _dataItems = _p.initData + , _i = 0 + , _caseSensitive = _p.cacCasesensitive() + , _lv = _key.toLowerCase() + , _sortData = [[], [], [], []] + , _finalData = []; + ; + + for (_i = 0; _i < _dataItems.length; _i++) { + var _slv = _dataItems[_i].label.toLowerCase(); + + if ( _dataItems[_i].label.indexOf( _key ) == 0 ) { + _sortData[ _dataItems[_i].tag = 0 ].push( _dataItems[_i] ); + } else if( !_caseSensitive && _slv.indexOf( _lv ) == 0 ) { + _sortData[ _dataItems[_i].tag = 1 ].push( _dataItems[_i] ); + } else if ( _dataItems[_i].label.indexOf( _key ) > 0 ) { + _sortData[ _dataItems[_i].tag = 2 ].push( _dataItems[_i] ); + } else if( !_caseSensitive && _slv.indexOf( _lv ) > 0 ) { + _sortData[ _dataItems[_i].tag = 3 ].push( _dataItems[_i] ); + } + } + + $.each( _sortData, function( _ix, _item ){ + _finalData = _finalData.concat( _item ); + }); + + return _finalData; + } + + , setSelectorData: + function( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + var _p = this + , _label = _selector.attr( _p.cacLabelKey() ).trim() + , _id = _selector.attr( _p.cacIdKey() ).trim() + ; + + _p.selector().val( _label ); + + _p.selector().attr( 'cacIdVal', _id ); + _p.setIdSelectorData( _id ); + } + + , setIdSelectorData: + function( _val ){ + var _p = this; + if( !( _p.cacIdSelector() && _p.cacIdSelector().length ) ) return; + if( typeof _val != 'undefined' ){ + _p.cacIdSelector().val( _val ); + _p.selector().attr( 'cacIdVal', _val ); + }else{ + _p.cacIdSelector().val( '' ); + _p.selector().attr( 'cacIdVal', '' ); + } + } + + , listItems: + function(){ + var _r; + + this.popup() + && this.popup().length + && ( _r = this.popup().find( this.cacSubItemsSelector() ) ) + ; + return _r; + } + + , selectedItem: + function(){ + var _r; + this.listItems().each( function(){ + var _sp = $(this); + if( _sp.hasClass( AutoComplete.Model.CLASS_ACTIVE ) ){ + _r = _sp; + return false; + } + }); + return _r; + } + + , keyupTimeout: + function( _tm ){ + this._keyupTimeout && clearTimeout( this._keyupTimeout ); + this._keyupTimeout = _tm; + } + + , keydownTimeout: + function( _tm ){ + this._keydownTimeout && clearTimeout( this._keydownTimeout ); + this._keydownTimeout = _tm; + } + + , blurTimeout: + function( _tm ){ + this._blurTimeout && clearTimeout( this._blurTimeout ); + this._blurTimeout = _tm; + } + + , cacDataFilter: + function( _d ){ + var _p = this, _filter = _p.callbackProp( 'cacDataFilter' ) || AutoComplete.dataFilter; + _filter && ( _d = _filter( _d ) ); + + if( _p.cacFixHtmlEntity() ){ + $.each( _d, function( _ix, _item ){ + _item.label && ( _item.label = $( '

        ' + _item.label + '

        ' ).text() ); + }); + } + return _d; + } + + , cacNoDataText: + function(){ + var _r = this.attrProp( 'cacNoDataText' ) || '数据加载中, 请稍候...'; + return _r; + } + + , cacValidCheckTimeout: + function(){ + var _r = this.intProp( 'cacValidCheckTimeout' ) || AutoComplete.validCheckTimeout || 1; + return _r; + } + + , cacStrictData: + function(){ + var _r = this.boolProp( 'cacStrictData' ); + return _r; + } + + , cacFixHtmlEntity: + function(){ + var _r = AutoComplete.fixHtmlEntity; + this.selector().is( '[cacFixHtmlEntity]' ) + && ( _r = this.boolProp( 'cacFixHtmlEntity' ) ); + return _r; + } + + , cacLabelKey: + function(){ + var _r = this.attrProp( 'cacLabelKey' ) || 'data-label'; + return _r; + } + + , cacIdKey: + function( _setter ){ + typeof _setter != 'undefined' && ( this.selector().attr( 'cacIdKey', _setter ) ); + var _r = this.attrProp( 'cacIdKey' ) || this.cacLabelKey(); + return _r; + } + + , cacIdVal: + function(){ + var _p = this, _r = _p.attrProp( 'cacIdVal' ); + + _p.cacIdSelector() + && _p.cacIdSelector().length + && ( _r = _p.cacIdSelector().val() ) + ; + _r = ( _r || '' ).trim(); + return _r; + } + + , cacIdSelector: + function(){ + var _r = this.selectorProp( 'cacIdSelector' ); + return _r; + } + + , cacPreventEnter: + function(){ + var _r; + _r = this.selector().is( '[cacPreventEnter]' ) + && JC.f.parseBool( this.selector().attr('cacPreventEnter') ); + return _r; + } + + , cacBoxWidth: + function(){ + var _r = 0 || this.intProp( 'cacBoxWidth' ); + + !_r && ( _r = this.selector().width() ); + + return _r; + } + + , cacCasesensitive: + function(){ + return this.boolProp( 'cacCasesensitive' ); + } + + , cacSubItemsSelector: + function(){ + var _r = this.attrProp( 'cacSubItemsSelector' ) || 'li'; + _r += '[' + this.cacLabelKey() + ']'; + return _r; + } + + , cacMultiSelect: function(){ return this.boolProp( 'cacMultiSelect' ); } + + , cacMultiSelectBarTpl: + function(){ + var _r = '', _tmp; + this.is( '[cacMultiSelectBarTpl]' ) + && ( _tmp = this.selectorProp( 'cacMultiSelectBarTpl' ) ) + && _tmp.length + && ( _r = JC.f.scriptContent( _tmp ) ); + return _r; + } + + }); + + JC.f.extendObject( AutoComplete.View.prototype, { + init: + function(){ + var _p = this; + + _p._model.listItems().each( function( _ix ){ + $(this).attr( 'data-index', _ix ); + }) + .removeClass( AutoComplete.Model.CLASS_ACTIVE ) + .first().addClass( AutoComplete.Model.CLASS_ACTIVE ) + ; + + // JC.log( 'AutoComplete.View.init:', new Date().getTime() ); + }, + + build: + function( _data ) { + var _p = this + , _i = 0 + , _view = [] + ; + + if ( _data.length == 0 ) { + _p.hide(); + _p._model.popup().html( JC.f.printf( '
      • {0}
      • ', _p._model.cacNoDataText() ) ); + } else { + var _tpl = _p._model.listItemTpl(); + for ( ; _i < _data.length; _i++ ) { + _view.push( JC.f.printf( _tpl + , _data[_i].id + , JC.f.filterXSS( _data[_i].label || '' ) + , _i + , _i === 0 ? AutoComplete.Model.CLASS_ACTIVE : '' + ) ); + } + + _p._model.popup().html( _view.join('') ); + + _p._model.trigger( 'build_data' ); + } + + _p._model.cacMultiSelect() + && !_p._model.layoutPopup().find( '.AC_addtionItem' ).length + && $( JC.f.printf( + '
        {0}
        ' + , _p._model.cacMultiSelectBarTpl() + )).appendTo( _p._model.layoutPopup() ) + ; + }, + + hide: + function() { + var _p = this; + + _p._model.layoutPopup().hide(); + }, + + show: + function() { + var _p = this + , _offset = _p._model.selector().offset() + , _h = _p._model.selector().prop( 'offsetHeight' ) + , _w = _p._model.selector().prop( 'offsetWidth' ) + ; + _p._model.layoutPopup().css( { + 'top': _offset.top + _h + 'px' + , 'left': _offset.left + 'px' + }); + + var _selectedItem + , _label = _p._model.selector().val().trim() + , _id = _p._model.cacIdVal() + , _idCompare = _p._model.cacLabelKey() != _p._model.cacIdKey() + ; + + _p._model.listItems().each( function(){ + var _sp = $(this) + , _slabel = _sp.attr( _p._model.cacLabelKey() ) + , _sid = _sp.attr( _p._model.cacIdKey() ) + ; + + //JC.log( _slabel, _sid, _label, _id ); + + _sp.removeClass( AutoComplete.Model.CLASS_ACTIVE ); + if( _label == _slabel ){ + if( _idCompare && _id ){ + _id == _sid && _sp.addClass( AutoComplete.Model.CLASS_ACTIVE ); + _selectedItem = _sp; + }else{ + _sp.addClass( AutoComplete.Model.CLASS_ACTIVE ); + _selectedItem = _sp; + } + } + }); + + if( !_selectedItem ){ + _p._model.listItems().first().addClass( AutoComplete.Model.CLASS_ACTIVE ); + } + + _p._model.layoutPopup().show(); + //!_p._model.key() && _p._model.list().show(); + _p.trigger( 'after_popup_show' ); + }, + + updateList: + function ( _listAll ) { + var _p = this + , _dataItems + , _view = [] + , _label = _p._model.selector().val().trim() + , _id = _p._model.cacIdVal() + , _data + ; + + if ( ( !_label ) || _listAll ) { + _data = _p._model.initData; + }else{ + _data = _p._model.cache( _label, _id ); + } + _data && _p.build( _data ); + }, + + currentIndex: + function( _isDown ){ + var _p = this + , _box = _p._model.popup() + , _listItems = _p._model.listItems() + , _ix = -1 + ; + if( !_listItems.length ) return; + + _listItems.each( function( _six ){ + var _sp = $(this); + if( _sp.hasClass( AutoComplete.Model.CLASS_ACTIVE ) ){ + _ix = _six; + return false; + } + }); + if( _ix < 0 ){ + _ix = _isDown ? 0 : _listItems.length - 1; + }else{ + _ix = _isDown ? _ix + 1 : _ix - 1; + if( _ix < 0 ){ + _ix = _listItems.length - 1; + }else if( _ix >= _listItems.length ){ + _ix = 0; + } + } + return _ix; + } + , updateListIndex: + function( _isDown ){ + var _p = this, _ix = _p.currentIndex( _isDown ); + _p.updateIndex( _ix ); + //JC.log( 'updateListIndex', _ix, new Date().getTime() ); + } + + , updateIndex: + function( _ix, _ignoreScroll ){ + var _p = this, _listItems = _p._model.listItems(); + _p.removeActiveClass(); + + $( _listItems[ _ix ] ).addClass( AutoComplete.Model.CLASS_ACTIVE ); + !_ignoreScroll && _p.setScroll( _ix ); + } + + , setScroll: + function( _keyIndex ) { + var _p = this + , _el = _p._model.listItems().eq(_keyIndex) + , _position = _el.position() + ; + + if( !_position ) return; + + var _h = _el.position().top + _el.height() + , _ph = _p._model.popup().innerHeight() + , _top = _p._model.popup().scrollTop() + ; + + _h = _h + _top; + + if ( _keyIndex == -1 ) { + _p._model.selector().focus(); + _p._model.listItems().removeClass( AutoComplete.Model.CLASS_ACTIVE ); + } else { + _p._model.listItems().removeClass( AutoComplete.Model.CLASS_ACTIVE ); + _el.addClass( AutoComplete.Model.CLASS_ACTIVE ); + if ( _h > _ph ) { + _p._model.popup().scrollTop( _h - _ph ); + } + if ( _el.position().top < 0 ) { + _p._model.popup().scrollTop( 0 ); + } + } + + AutoComplete.Model.SCROLL_TIMEOUT && clearTimeout( AutoComplete.Model.SCROLL_TIMEOUT ); + + AutoComplete.Model.SCROLL_TIMEOUT = + setTimeout( function(){ + AutoComplete.Model.isScroll = false; + }, 500 ); + + } + + , removeActiveClass: + function(){ + this._model.listItems().removeClass( AutoComplete.Model.CLASS_ACTIVE ); + } + }); + + $.event.special[ AutoComplete.Model.REMOVE ] = { + remove: + function(o) { + if (o.handler) { + o.handler() + } + } + }; + + $( window ).on( 'resize', function( _evt ){ + $( 'input.js_compAutoComplete' ).each( function(){ + var _ins = AutoComplete.getInstance( $( this ) ); + _ins && _ins.fixPosition(); + }); + }); + + $(document).on( 'click', function(){ + AutoComplete.hideAllPopup(); + }); + + $(document).delegate( 'input.js_compAutoComplete', 'focus', function( _evt ){ + !AutoComplete.getInstance( this ) + && new AutoComplete( this ) + ; + }); + + /* + $(document).ready( function(){ + var _insAr = 0; + AutoComplete.autoInit && ( _insAr = AutoComplete.init() ); + }); + */ + + return JC.AutoComplete; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AutoComplete/_demo/data/SHENGSHI.js b/comps/AutoComplete/_demo/data/SHENGSHI.js new file mode 100755 index 000000000..7c149c09d --- /dev/null +++ b/comps/AutoComplete/_demo/data/SHENGSHI.js @@ -0,0 +1 @@ +SHENGSHI = [["28","\u5317\u4eac ","0"],["3705","\u4e1c\u57ce\u533a ","28"],["3706","\u897f\u57ce\u533a ","28"],["3708","\u5d07\u6587\u533a ","28"],["3709","\u5ba3\u6b66\u533a ","28"],["3710","\u671d\u9633\u533a ","28"],["3711","\u4e30\u53f0\u533a ","28"],["3712","\u77f3\u666f\u5c71\u533a ","28"],["3713","\u6d77\u6dc0\u533a ","28"],["3714","\u95e8\u5934\u6c9f\u533a ","28"],["3715","\u623f\u5c71\u533a ","28"],["3716","\u901a\u5dde\u533a ","28"],["3718","\u987a\u4e49\u533a ","28"],["3719","\u660c\u5e73\u533a ","28"],["3720","\u5927\u5174\u533a ","28"],["3721","\u6000\u67d4\u533a ","28"],["3722","\u5e73\u8c37\u533a ","28"],["3723","\u5bc6\u4e91\u53bf ","28"],["3724","\u5ef6\u5e86\u53bf ","28"],["29","\u5929\u6d25 ","0"],["3726","\u548c\u5e73\u533a ","29"],["3727","\u6cb3\u4e1c\u533a ","29"],["3728","\u6cb3\u897f\u533a ","29"],["3729","\u5357\u5f00\u533a ","29"],["3730","\u6cb3\u5317\u533a ","29"],["3731","\u7ea2\u6865\u533a ","29"],["3732","\u5858\u6cbd\u533a ","29"],["3733","\u6c49\u6cbd\u533a ","29"],["3734","\u5927\u6e2f\u533a ","29"],["3735","\u4e1c\u4e3d\u533a ","29"],["3736","\u897f\u9752\u533a ","29"],["35","\u6d25\u5357\u533a ","29"],["36","\u5317\u8fb0\u533a ","29"],["37","\u6b66\u6e05\u533a ","29"],["38","\u5b9d\u577b\u533a ","29"],["39","\u5b81\u6cb3\u53bf ","29"],["40","\u9759\u6d77\u53bf ","29"],["41","\u84df\u53bf ","29"],["34","\u6cb3\u5317\u7701 ","0"],["44","\u77f3\u5bb6\u5e84\u5e02 ","34"],["45","\u957f\u5b89\u533a ","44"],["46","\u6865\u4e1c\u533a ","44"],["47","\u6865\u897f\u533a ","44"],["48","\u65b0\u534e\u533a ","44"],["49","\u4e95\u9649\u77ff\u533a ","44"],["50","\u88d5\u534e\u533a ","44"],["51","\u4e95\u9649\u53bf ","44"],["52","\u6b63\u5b9a\u53bf ","44"],["53","\u683e\u57ce\u53bf ","44"],["54","\u884c\u5510\u53bf ","44"],["55","\u7075\u5bff\u53bf ","44"],["56","\u9ad8\u9091\u53bf ","44"],["57","\u6df1\u6cfd\u53bf ","44"],["58","\u8d5e\u7687\u53bf ","44"],["59","\u65e0\u6781\u53bf ","44"],["60","\u5e73\u5c71\u53bf ","44"],["61","\u5143\u6c0f\u53bf ","44"],["62","\u8d75\u53bf ","44"],["63"," \u8f9b\u96c6\u5e02 ","44"],["64","\u85c1\u57ce\u5e02 ","44"],["65","\u664b\u5dde\u5e02 ","44"],["66","\u65b0\u4e50\u5e02 ","44"],["67","\u9e7f\u6cc9\u5e02 ","44"],["69","\u5510\u5c71\u5e02 ","34"],["70","\u8def\u5357\u533a ","69"],["270","\u77ff\u533a ","268"],["271","\u90ca\u533a ","268"],["272","\u5e73\u5b9a\u53bf ","268"],["273","\u76c2\u53bf ","268"],["275","\u957f\u6cbb\u5e02 ","1"],["276","\u957f\u6cbb\u53bf ","275"],["277","\u8944\u57a3\u53bf ","275"],["278","\u5c6f\u7559\u53bf ","275"],["279","\u5e73\u987a\u53bf ","275"],["280","\u9ece\u57ce\u53bf ","275"],["281","\u58f6\u5173\u53bf ","275"],["282","\u957f\u5b50\u53bf ","275"],["283","\u6b66\u4e61\u53bf ","275"],["284","\u6c81\u53bf ","275"],["285","\u6c81\u6e90\u53bf ","275"],["286","\u6f5e\u57ce\u5e02 ","275"],["287","\u57ce\u533a ","275"],["288","\u90ca\u533a ","275"],["289","\u9ad8\u65b0\u533a ","275"],["291","\u664b\u57ce\u5e02 ","1"],["292","\u57ce\u533a ","291"],["293","\u6c81\u6c34\u53bf ","291"],["294","\u9633\u57ce\u53bf ","291"],["295","\u9675\u5ddd\u53bf ","291"],["296","\u6cfd\u5dde\u53bf ","291"],["297","\u9ad8\u5e73\u5e02 ","291"],["299","\u6714\u5dde\u5e02 ","1"],["300","\u6714\u57ce\u533a ","299"],["301","\u5e73\u9c81\u533a ","299"],["302","\u5c71\u9634\u53bf ","299"],["303","\u5e94\u53bf ","299"],["304","\u53f3\u7389\u53bf ","299"],["305","\u6000\u4ec1\u53bf ","299"],["307","\u664b\u4e2d\u5e02 ","1"],["308","\u6986\u6b21\u533a ","307"],["309","\u6986\u793e\u53bf ","307"],["310","\u5de6\u6743\u53bf ","307"],["311","\u548c\u987a\u53bf ","307"],["312","\u6614\u9633\u53bf ","307"],["313","\u5bff\u9633\u53bf ","307"],["314","\u592a\u8c37\u53bf ","307"],["315","\u7941\u53bf ","307"],["316","\u5e73\u9065\u53bf ","307"],["317","\u7075\u77f3\u53bf ","307"],["318","\u4ecb\u4f11\u5e02 ","307"],["320","\u8fd0\u57ce\u5e02 ","1"],["321","\u76d0\u6e56\u533a ","320"],["322","\u4e34\u7317\u53bf ","320"],["323","\u4e07\u8363\u53bf ","320"],["324","\u95fb\u559c\u53bf ","320"],["325","\u7a37\u5c71\u53bf ","320"],["326","\u65b0\u7edb\u53bf ","320"],["327","\u7edb\u53bf ","320"],["328","\u57a3\u66f2\u53bf ","320"],["329","\u590f\u53bf ","320"],["330"," \u5e73\u9646\u53bf ","320"],["331","\u82ae\u57ce\u53bf ","320"],["332","\u6c38\u6d4e\u5e02 ","320"],["333","\u6cb3\u6d25\u5e02 ","320"],["71","\u8def\u5317\u533a ","69"],["72","\u53e4\u51b6\u533a ","69"],["73","\u5f00\u5e73\u533a ","69"],["74","\u4e30\u5357\u533a ","69"],["75","\u4e30\u6da6\u533a ","69"],["76","\u6ee6\u53bf ","69"],["77","\u6ee6\u5357\u53bf ","69"],["78","\u4e50\u4ead\u53bf ","69"],["79","\u8fc1\u897f\u53bf ","69"],["80","\u7389\u7530\u53bf ","69"],["81","\u5510\u6d77\u53bf ","69"],["82","\u9075\u5316\u5e02 ","69"],["83","\u8fc1\u5b89\u5e02 ","69"],["85","\u79e6\u7687\u5c9b\u5e02 ","34"],["86","\u6d77\u6e2f\u533a ","85"],["87","\u5c71\u6d77\u5173\u533a ","85"],["88","\u5317\u6234\u6cb3\u533a ","85"],["89","\u9752\u9f99\u6ee1\u65cf\u81ea\u6cbb\u53bf ","85"],["90","\u660c\u9ece\u53bf ","85"],["91","\u629a\u5b81\u53bf ","85"],["92","\u5362\u9f99\u53bf ","85"],["94","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","85"],["95","\u90af\u90f8\u5e02 ","34"],["96","\u90af\u5c71\u533a ","95"],["97","\u4e1b\u53f0\u533a ","95"],["98","\u590d\u5174\u533a ","95"],["99","\u5cf0\u5cf0\u77ff\u533a ","95"],["100","\u90af\u90f8\u53bf ","95"],["101","\u4e34\u6f33\u53bf ","95"],["102","\u6210\u5b89\u53bf ","95"],["103","\u5927\u540d\u53bf ","95"],["104","\u6d89\u53bf ","95"],["105"," \u78c1\u53bf ","95"],["106","\u80a5\u4e61\u53bf ","95"],["107","\u6c38\u5e74\u53bf ","95"],["108","\u90b1\u53bf ","95"],["109","\u9e21\u6cfd\u53bf ","95"],["110","\u5e7f\u5e73\u53bf ","95"],["111","\u9986\u9676\u53bf ","95"],["112","\u9b4f\u53bf ","95"],["113"," \u66f2\u5468\u53bf ","95"],["114","\u6b66\u5b89\u5e02 ","95"],["116","\u90a2\u53f0\u5e02 ","34"],["117","\u6865\u4e1c\u533a ","116"],["118","\u6865\u897f\u533a ","116"],["119","\u90a2\u53f0\u53bf ","116"],["120","\u4e34\u57ce\u53bf ","116"],["121","\u5185\u4e18\u53bf ","116"],["122","\u67cf\u4e61\u53bf ","116"],["123","\u9686\u5c27\u53bf ","116"],["124","\u4efb\u53bf ","116"],["125","\u5357\u548c\u53bf ","116"],["126","\u5b81\u664b\u53bf ","116"],["127","\u5de8\u9e7f\u53bf ","116"],["128","\u65b0\u6cb3\u53bf ","116"],["129","\u5e7f\u5b97\u53bf ","116"],["130","\u5e73\u4e61\u53bf ","116"],["131","\u5a01\u53bf ","116"],["132","\u6e05\u6cb3\u53bf ","116"],["133","\u4e34\u897f\u53bf ","116"],["134","\u5357\u5bab\u5e02 ","116"],["135","\u6c99\u6cb3\u5e02 ","116"],["137","\u4fdd\u5b9a\u5e02 ","34"],["138","\u65b0\u5e02\u533a ","137"],["139","\u5317\u5e02\u533a ","137"],["140","\u5357\u5e02\u533a ","137"],["141","\u6ee1\u57ce\u53bf ","137"],["142","\u6e05\u82d1\u53bf ","137"],["143","\u6d9e\u6c34\u53bf ","137"],["144","\u961c\u5e73\u53bf ","137"],["145","\u5f90\u6c34\u53bf ","137"],["146","\u5b9a\u5174\u53bf ","137"],["147","\u5510\u53bf ","137"],["148","\u9ad8\u9633\u53bf ","137"],["149","\u5bb9\u57ce\u53bf ","137"],["150","\u6d9e\u6e90\u53bf ","137"],["151","\u671b\u90fd\u53bf ","137"],["152","\u5b89\u65b0\u53bf ","137"],["153","\u6613\u53bf ","137"],["154","\u66f2\u9633\u53bf ","137"],["155","\u8821\u53bf ","137"],["156","\u987a\u5e73\u53bf ","137"],["157","\u535a\u91ce\u53bf ","137"],["158","\u96c4\u53bf ","137"],["159","\u6dbf\u5dde\u5e02 ","137"],["160","\u5b9a\u5dde\u5e02 ","137"],["161","\u5b89\u56fd\u5e02 ","137"],["162","\u9ad8\u7891\u5e97\u5e02 ","137"],["163","\u9ad8\u5f00\u533a ","137"],["165","\u5f20\u5bb6\u53e3\u5e02 ","34"],["166","\u6865\u4e1c\u533a ","165"],["167","\u6865\u897f\u533a ","165"],["168","\u5ba3\u5316\u533a ","165"],["169","\u4e0b\u82b1\u56ed\u533a ","165"],["170","\u5ba3\u5316\u53bf ","165"],["171","\u5f20\u5317\u53bf ","165"],["172","\u5eb7\u4fdd\u53bf ","165"],["173","\u6cbd\u6e90\u53bf ","165"],["174","\u5c1a\u4e49\u53bf ","165"],["175","\u851a\u53bf ","165"],["176","\u9633\u539f\u53bf ","165"],["177"," \u6000\u5b89\u53bf ","165"],["178","\u4e07\u5168\u53bf ","165"],["179","\u6000\u6765\u53bf ","165"],["180","\u6dbf\u9e7f\u53bf ","165"],["181","\u8d64\u57ce\u53bf ","165"],["182","\u5d07\u793c\u53bf ","165"],["184","\u627f\u5fb7\u5e02 ","34"],["185","\u53cc\u6865\u533a ","184"],["186","\u53cc\u6ee6\u533a ","184"],["187","\u9e70\u624b\u8425\u5b50\u77ff\u533a ","184"],["188","\u627f\u5fb7\u53bf ","184"],["189","\u5174\u9686\u53bf ","184"],["190","\u5e73\u6cc9\u53bf ","184"],["191","\u6ee6\u5e73\u53bf ","184"],["192","\u9686\u5316\u53bf ","184"],["193","\u4e30\u5b81\u6ee1\u65cf\u81ea\u6cbb\u53bf ","184"],["194","\u5bbd\u57ce\u6ee1\u65cf\u81ea\u6cbb\u53bf ","184"],["195","\u56f4\u573a\u6ee1\u65cf\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","184"],["197","\u6ca7\u5dde\u5e02 ","34"],["198","\u65b0\u534e\u533a ","197"],["199","\u8fd0\u6cb3\u533a ","197"],["200","\u6ca7\u53bf ","197"],["201","\u9752\u53bf ","197"],["202","\u4e1c\u5149\u53bf ","197"],["203"," \u6d77\u5174\u53bf ","197"],["204","\u76d0\u5c71\u53bf ","197"],["205","\u8083\u5b81\u53bf ","197"],["206","\u5357\u76ae\u53bf ","197"],["207","\u5434\u6865\u53bf ","197"],["208","\u732e\u53bf ","197"],["209","\u5b5f\u6751\u56de\u65cf\u81ea\u6cbb\u53bf ","197"],["210","\u6cca\u5934\u5e02 ","197"],["211","\u4efb\u4e18\u5e02 ","197"],["212","\u9ec4\u9a85\u5e02 ","197"],["213","\u6cb3\u95f4\u5e02 ","197"],["215","\u5eca\u574a\u5e02 ","34"],["216","\u5b89\u6b21\u533a ","215"],["217","\u5e7f\u9633\u533a ","215"],["218","\u56fa\u5b89\u53bf ","215"],["219","\u6c38\u6e05\u53bf ","215"],["220","\u9999\u6cb3\u53bf ","215"],["221","\u5927\u57ce\u53bf ","215"],["222","\u6587\u5b89\u53bf ","215"],["223","\u5927\u5382\u56de\u65cf\u81ea\u6cbb\u53bf ","215"],["224","\u5f00\u53d1\u533a ","215"],["225","\u71d5\u90ca\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","215"],["226","\u9738\u5dde\u5e02 ","215"],["227","\u4e09\u6cb3\u5e02 ","215"],["229","\u8861\u6c34\u5e02 ","34"],["230","\u6843\u57ce\u533a ","229"],["231","\u67a3\u5f3a\u53bf ","229"],["232","\u6b66\u9091\u53bf ","229"],["233","\u6b66\u5f3a\u53bf ","229"],["234","\u9976\u9633\u53bf ","229"],["235","\u5b89\u5e73\u53bf ","229"],["236","\u6545\u57ce\u53bf ","229"],["237","\u666f\u53bf ","229"],["238","\u961c\u57ce\u53bf ","229"],["239","\u5180\u5dde\u5e02 ","229"],["240","\u6df1\u5dde\u5e02 ","229"],["1","\u5c71\u897f\u7701 ","0"],["243","\u592a\u539f\u5e02 ","1"],["244","\u5c0f\u5e97\u533a ","243"],["245","\u8fce\u6cfd\u533a ","243"],["246","\u674f\u82b1\u5cad\u533a ","243"],["247","\u5c16\u8349\u576a\u533a ","243"],["248","\u4e07\u67cf\u6797\u533a ","243"],["249","\u664b\u6e90\u533a ","243"],["250","\u6e05\u5f90\u53bf ","243"],["251","\u9633\u66f2\u53bf ","243"],["252","\u5a04\u70e6\u53bf ","243"],["253","\u53e4\u4ea4\u5e02 ","243"],["255","\u5927\u540c\u5e02 ","1"],["256","\u57ce\u533a ","255"],["257","\u77ff\u533a ","255"],["258","\u5357\u90ca\u533a ","255"],["259","\u65b0\u8363\u533a ","255"],["260","\u9633\u9ad8\u53bf ","255"],["261","\u5929\u9547\u53bf ","255"],["262","\u5e7f\u7075\u53bf ","255"],["263","\u7075\u4e18\u53bf ","255"],["264","\u6d51\u6e90\u53bf ","255"],["265","\u5de6\u4e91\u53bf ","255"],["266","\u5927\u540c\u53bf ","255"],["268","\u9633\u6cc9\u5e02 ","1"],["269","\u57ce\u533a ","268"],["798","\u5b9d\u6e05\u53bf ","791"],["799","\u9976\u6cb3\u53bf ","791"],["801","\u5927\u5e86\u5e02 ","4"],["802","\u8428\u5c14\u56fe\u533a ","801"],["803","\u9f99\u51e4\u533a ","801"],["804","\u8ba9\u80e1\u8def\u533a ","801"],["805","\u7ea2\u5c97\u533a ","801"],["806","\u5927\u540c\u533a ","801"],["807","\u8087\u5dde\u53bf ","801"],["808","\u8087\u6e90\u53bf ","801"],["809","\u6797\u7538\u53bf ","801"],["810","\u675c\u5c14\u4f2f\u7279\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","801"],["812","\u4f0a\u6625\u5e02 ","4"],["813","\u4f0a\u6625\u533a ","812"],["814","\u5357\u5c94\u533a ","812"],["815","\u53cb\u597d\u533a ","812"],["816","\u897f\u6797\u533a ","812"],["817","\u7fe0\u5ce6\u533a ","812"],["818","\u65b0\u9752\u533a ","812"],["819","\u7f8e\u6eaa\u533a ","812"],["820","\u91d1\u5c71\u5c6f\u533a ","812"],["821","\u4e94\u8425\u533a ","812"],["822","\u4e4c\u9a6c\u6cb3\u533a ","812"],["823","\u6c64\u65fa\u6cb3\u533a ","812"],["824","\u5e26\u5cad\u533a ","812"],["825","\u4e4c\u4f0a\u5cad\u533a ","812"],["826","\u7ea2\u661f\u533a ","812"],["827","\u4e0a\u7518\u5cad\u533a ","812"],["828","\u5609\u836b\u53bf ","812"],["829","\u94c1\u529b\u5e02 ","812"],["831","\u4f73\u6728\u65af\u5e02 ","4"],["832","\u6c38\u7ea2\u533a ","831"],["833","\u5411\u9633\u533a ","831"],["834","\u524d\u8fdb\u533a ","831"],["835","\u4e1c\u98ce\u533a ","831"],["836","\u90ca\u533a ","831"],["837","\u6866\u5357\u53bf ","831"],["838"," \u6866\u5ddd\u53bf ","831"],["839","\u6c64\u539f\u53bf ","831"],["840","\u629a\u8fdc\u53bf ","831"],["841","\u540c\u6c5f\u5e02 ","831"],["842","\u5bcc\u9526\u5e02 ","831"],["844","\u4e03\u53f0\u6cb3\u5e02 ","4"],["845","\u65b0\u5174\u533a ","844"],["846","\u6843\u5c71\u533a ","844"],["847","\u8304\u5b50\u6cb3\u533a ","844"],["848","\u52c3\u5229\u53bf ","844"],["850","\u7261\u4e39\u6c5f\u5e02 ","4"],["851","\u4e1c\u5b89\u533a ","850"],["852","\u9633\u660e\u533a ","850"],["853","\u7231\u6c11\u533a ","850"],["854","\u897f\u5b89\u533a ","850"],["855","\u4e1c\u5b81\u53bf ","850"],["856","\u6797\u53e3\u53bf ","850"],["857","\u7ee5\u82ac\u6cb3\u5e02 ","850"],["858","\u6d77\u6797\u5e02 ","850"],["859","\u5b81\u5b89\u5e02 ","850"],["860","\u7a46\u68f1\u5e02 ","850"],["862","\u9ed1\u6cb3\u5e02 ","4"],["863","\u7231\u8f89\u533a ","862"],["335","\u5ffb\u5dde\u5e02 ","1"],["336","\u5ffb\u5e9c\u533a ","335"],["337","\u5b9a\u8944\u53bf ","335"],["338","\u4e94\u53f0\u53bf ","335"],["339","\u4ee3\u53bf ","335"],["340","\u7e41\u5cd9\u53bf ","335"],["341","\u5b81\u6b66\u53bf ","335"],["342","\u9759\u4e50\u53bf ","335"],["343","\u795e\u6c60\u53bf ","335"],["344","\u4e94\u5be8\u53bf ","335"],["345","\u5ca2\u5c9a\u53bf ","335"],["346","\u6cb3\u66f2\u53bf ","335"],["347","\u4fdd\u5fb7\u53bf ","335"],["348","\u504f\u5173\u53bf ","335"],["349","\u539f\u5e73\u5e02 ","335"],["351","\u4e34\u6c7e\u5e02 ","1"],["352","\u5c27\u90fd\u533a ","351"],["353","\u66f2\u6c83\u53bf ","351"],["354","\u7ffc\u57ce\u53bf ","351"],["355","\u8944\u6c7e\u53bf ","351"],["356","\u6d2a\u6d1e\u53bf ","351"],["357","\u53e4\u53bf ","351"],["358","\u5b89\u6cfd\u53bf ","351"],["359","\u6d6e\u5c71\u53bf ","351"],["360","\u5409\u53bf ","351"],["361","\u4e61\u5b81\u53bf ","351"],["362"," \u5927\u5b81\u53bf ","351"],["363","\u96b0\u53bf ","351"],["364","\u6c38\u548c\u53bf ","351"],["365","\u84b2\u53bf ","351"],["366","\u6c7e\u897f\u53bf ","351"],["367","\u4faf\u9a6c\u5e02 ","351"],["368","\u970d\u5dde\u5e02 ","351"],["370","\u5415\u6881\u5e02 ","1"],["371","\u79bb\u77f3\u533a ","370"],["372","\u6587\u6c34\u53bf ","370"],["373","\u4ea4\u57ce\u53bf ","370"],["374","\u5174\u53bf ","370"],["375","\u4e34\u53bf ","370"],["376","\u67f3\u6797\u53bf ","370"],["377","\u77f3\u697c\u53bf ","370"],["378","\u5c9a\u53bf ","370"],["379","\u65b9\u5c71\u53bf ","370"],["380","\u4e2d\u9633\u53bf ","370"],["381","\u4ea4\u53e3\u53bf ","370"],["382","\u5b5d\u4e49\u5e02 ","370"],["383","\u6c7e\u9633\u5e02 ","370"],["23","\u5185\u8499\u53e4\u81ea\u6cbb\u533a ","0"],["386","\u547c\u548c\u6d69\u7279\u5e02 ","23"],["387","\u65b0\u57ce\u533a ","386"],["388","\u56de\u6c11\u533a ","386"],["389","\u7389\u6cc9\u533a ","386"],["390","\u8d5b\u7f55\u533a ","386"],["391","\u571f\u9ed8\u7279\u5de6\u65d7 ","386"],["392","\u6258\u514b\u6258\u53bf ","386"],["393","\u548c\u6797\u683c\u5c14\u53bf ","386"],["394","\u6e05\u6c34\u6cb3\u53bf ","386"],["395","\u6b66\u5ddd\u53bf ","386"],["397","\u5305\u5934\u5e02 ","23"],["398","\u4e1c\u6cb3\u533a ","397"],["399","\u6606\u90fd\u4ed1\u533a ","397"],["400","\u9752\u5c71\u533a ","397"],["401","\u77f3\u62d0\u533a ","397"],["402","\u767d\u4e91\u77ff\u533a ","397"],["403","\u4e5d\u539f\u533a ","397"],["404","\u571f\u9ed8\u7279\u53f3\u65d7 ","397"],["405","\u56fa\u9633\u53bf ","397"],["406","\u8fbe\u5c14\u7f55\u8302\u660e\u5b89\u8054\u5408\u65d7 ","397"],["408","\u4e4c\u6d77\u5e02 ","23"],["409","\u6d77\u52c3\u6e7e\u533a ","408"],["410","\u6d77\u5357\u533a ","408"],["411","\u4e4c\u8fbe\u533a ","408"],["413","\u8d64\u5cf0\u5e02 ","23"],["414","\u7ea2\u5c71\u533a ","413"],["415","\u5143\u5b9d\u5c71\u533a ","413"],["416","\u677e\u5c71\u533a ","413"],["417","\u963f\u9c81\u79d1\u5c14\u6c81\u65d7 ","413"],["418","\u5df4\u6797\u5de6\u65d7 ","413"],["419","\u5df4\u6797\u53f3\u65d7 ","413"],["420","\u6797\u897f\u53bf ","413"],["421","\u514b\u4ec0\u514b\u817e\u65d7 ","413"],["422","\u7fc1\u725b\u7279\u65d7 ","413"],["423","\u5580\u5587\u6c81\u65d7 ","413"],["424","\u5b81\u57ce\u53bf ","413"],["425","\u6556\u6c49\u65d7 ","413"],["427","\u901a\u8fbd\u5e02 ","23"],["428","\u79d1\u5c14\u6c81\u533a ","427"],["429","\u79d1\u5c14\u6c81\u5de6\u7ffc\u4e2d\u65d7 ","427"],["430","\u79d1\u5c14\u6c81\u5de6\u7ffc\u540e\u65d7 ","427"],["431","\u5f00\u9c81\u53bf ","427"],["432","\u5e93\u4f26\u65d7 ","427"],["433","\u5948\u66fc\u65d7 ","427"],["434","\u624e\u9c81\u7279\u65d7 ","427"],["435","\u970d\u6797\u90ed\u52d2\u5e02 ","427"],["437","\u9102\u5c14\u591a\u65af\u5e02 ","23"],["438","\u4e1c\u80dc\u533a ","437"],["439","\u8fbe\u62c9\u7279\u65d7 ","437"],["440","\u51c6\u683c\u5c14\u65d7 ","437"],["441","\u9102\u6258\u514b\u524d\u65d7 ","437"],["442","\u9102\u6258\u514b\u65d7 ","437"],["443","\u676d\u9526\u65d7 ","437"],["444","\u4e4c\u5ba1\u65d7 ","437"],["445","\u4f0a\u91d1\u970d\u6d1b\u65d7 ","437"],["447","\u547c\u4f26\u8d1d\u5c14\u5e02 ","23"],["448","\u6d77\u62c9\u5c14\u533a ","447"],["449","\u963f\u8363\u65d7 ","447"],["450","\u83ab\u529b\u8fbe\u74e6\u8fbe\u65a1\u5c14\u65cf\u81ea\u6cbb\u65d7 ","447"],["451","\u9102\u4f26\u6625\u81ea\u6cbb\u65d7 ","447"],["452","\u9102\u6e29\u514b\u65cf\u81ea\u6cbb\u65d7 ","447"],["453","\u9648\u5df4\u5c14\u864e\u65d7 ","447"],["454","\u65b0\u5df4\u5c14\u864e\u5de6\u65d7 ","447"],["455","\u65b0\u5df4\u5c14\u864e\u53f3\u65d7 ","447"],["456","\u6ee1\u6d32\u91cc\u5e02 ","447"],["457","\u7259\u514b\u77f3\u5e02 ","447"],["458","\u624e\u5170\u5c6f\u5e02 ","447"],["459","\u989d\u5c14\u53e4\u7eb3\u5e02 ","447"],["460","\u6839\u6cb3\u5e02 ","447"],["462","\u5df4\u5f66\u6dd6\u5c14\u5e02 ","23"],["463","\u4e34\u6cb3\u533a ","462"],["464","\u4e94\u539f\u53bf ","462"],["465","\u78f4\u53e3\u53bf ","462"],["466","\u4e4c\u62c9\u7279\u524d\u65d7 ","462"],["467","\u4e4c\u62c9\u7279\u4e2d\u65d7 ","462"],["468","\u4e4c\u62c9\u7279\u540e\u65d7 ","462"],["469","\u676d\u9526\u540e\u65d7 ","462"],["471","\u4e4c\u5170\u5bdf\u5e03\u5e02 ","23"],["472","\u96c6\u5b81\u533a ","471"],["473","\u5353\u8d44\u53bf ","471"],["474","\u5316\u5fb7\u53bf ","471"],["475","\u5546\u90fd\u53bf ","471"],["476","\u5174\u548c\u53bf ","471"],["477","\u51c9\u57ce\u53bf ","471"],["478","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u524d\u65d7 ","471"],["479","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u4e2d\u65d7 ","471"],["480","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u540e\u65d7 ","471"],["481","\u56db\u5b50\u738b\u65d7 ","471"],["482","\u4e30\u9547\u5e02 ","471"],["484","\u5174\u5b89\u76df ","23"],["485","\u4e4c\u5170\u6d69\u7279\u5e02 ","484"],["486","\u963f\u5c14\u5c71\u5e02 ","484"],["487","\u79d1\u5c14\u6c81\u53f3\u7ffc\u524d\u65d7 ","484"],["488","\u79d1\u5c14\u6c81\u53f3\u7ffc\u4e2d\u65d7 ","484"],["489","\u624e\u8d49\u7279\u65d7 ","484"],["490","\u7a81\u6cc9\u53bf ","484"],["492","\u9521\u6797\u90ed\u52d2\u76df ","23"],["493","\u4e8c\u8fde\u6d69\u7279\u5e02 ","492"],["494","\u9521\u6797\u6d69\u7279\u5e02 ","492"],["495","\u963f\u5df4\u560e\u65d7 ","492"],["496","\u82cf\u5c3c\u7279\u5de6\u65d7 ","492"],["497","\u82cf\u5c3c\u7279\u53f3\u65d7 ","492"],["498","\u4e1c\u4e4c\u73e0\u7a46\u6c81\u65d7 ","492"],["499","\u897f\u4e4c\u73e0\u7a46\u6c81\u65d7 ","492"],["500","\u592a\u4ec6\u5bfa\u65d7 ","492"],["501","\u9576\u9ec4\u65d7 ","492"],["502","\u6b63\u9576\u767d\u65d7 ","492"],["503","\u6b63\u84dd\u65d7 ","492"],["504","\u591a\u4f26\u53bf ","492"],["506","\u963f\u62c9\u5584\u76df ","23"],["507","\u963f\u62c9\u5584\u5de6\u65d7 ","506"],["508","\u963f\u62c9\u5584\u53f3\u65d7 ","506"],["509","\u989d\u6d4e\u7eb3\u65d7 ","506"],["2","\u8fbd\u5b81\u7701 ","0"],["512","\u6c88\u9633\u5e02 ","2"],["513","\u548c\u5e73\u533a ","512"],["514","\u6c88\u6cb3\u533a ","512"],["515","\u5927\u4e1c\u533a ","512"],["516","\u7687\u59d1\u533a ","512"],["517","\u94c1\u897f\u533a ","512"],["518","\u82cf\u5bb6\u5c6f\u533a ","512"],["519","\u4e1c\u9675\u533a ","512"],["520","\u65b0\u57ce\u5b50\u533a ","512"],["521","\u4e8e\u6d2a\u533a ","512"],["522","\u8fbd\u4e2d\u53bf ","512"],["523","\u5eb7\u5e73\u53bf ","512"],["524","\u6cd5\u5e93\u53bf ","512"],["525","\u65b0\u6c11\u5e02 ","512"],["526","\u6d51\u5357\u65b0\u533a ","512"],["527","\u5f20\u58eb\u5f00\u53d1\u533a ","512"],["528","\u6c88\u5317\u65b0\u533a ","512"],["530","\u5927\u8fde\u5e02 ","2"],["531","\u4e2d\u5c71\u533a ","530"],["532","\u897f\u5c97\u533a ","530"],["533","\u6c99\u6cb3\u53e3\u533a ","530"],["534","\u7518\u4e95\u5b50\u533a ","530"],["535","\u65c5\u987a\u53e3\u533a ","530"],["536","\u91d1\u5dde\u533a ","530"],["537","\u957f\u6d77\u53bf ","530"],["538","\u5f00\u53d1\u533a ","530"],["539","\u74e6\u623f\u5e97\u5e02 ","530"],["540","\u666e\u5170\u5e97\u5e02 ","530"],["541","\u5e84\u6cb3\u5e02 ","530"],["542","\u5cad\u524d\u533a ","530"],["544","\u978d\u5c71\u5e02 ","2"],["545","\u94c1\u4e1c\u533a ","544"],["546","\u94c1\u897f\u533a ","544"],["547","\u7acb\u5c71\u533a ","544"],["548","\u5343\u5c71\u533a ","544"],["549","\u53f0\u5b89\u53bf ","544"],["550","\u5cab\u5ca9\u6ee1\u65cf\u81ea\u6cbb\u53bf ","544"],["551","\u9ad8\u65b0\u533a ","544"],["552","\u6d77\u57ce\u5e02 ","544"],["554","\u629a\u987a\u5e02 ","2"],["555","\u65b0\u629a\u533a ","554"],["556","\u4e1c\u6d32\u533a ","554"],["557","\u671b\u82b1\u533a ","554"],["558","\u987a\u57ce\u533a ","554"],["559","\u629a\u987a\u53bf ","554"],["560","\u65b0\u5bbe\u6ee1\u65cf\u81ea\u6cbb\u53bf ","554"],["561","\u6e05\u539f\u6ee1\u65cf\u81ea\u6cbb\u53bf ","554"],["563","\u672c\u6eaa\u5e02 ","2"],["564","\u5e73\u5c71\u533a ","563"],["565","\u6eaa\u6e56\u533a ","563"],["566","\u660e\u5c71\u533a ","563"],["567","\u5357\u82ac\u533a ","563"],["568","\u672c\u6eaa\u6ee1\u65cf\u81ea\u6cbb\u53bf ","563"],["569","\u6853\u4ec1\u6ee1\u65cf\u81ea\u6cbb\u53bf ","563"],["571","\u4e39\u4e1c\u5e02 ","2"],["572","\u5143\u5b9d\u533a ","571"],["573","\u632f\u5174\u533a ","571"],["574","\u632f\u5b89\u533a ","571"],["575","\u5bbd\u7538\u6ee1\u65cf\u81ea\u6cbb\u53bf ","571"],["576","\u4e1c\u6e2f\u5e02 ","571"],["577","\u51e4\u57ce\u5e02 ","571"],["579","\u9526\u5dde\u5e02 ","2"],["580","\u53e4\u5854\u533a ","579"],["581","\u51cc\u6cb3\u533a ","579"],["582","\u592a\u548c\u533a ","579"],["583","\u9ed1\u5c71\u53bf ","579"],["584","\u4e49\u53bf ","579"],["585","\u51cc\u6d77\u5e02 ","579"],["586"," \u5317\u9547\u5e02 ","579"],["588","\u8425\u53e3\u5e02 ","2"],["589","\u7ad9\u524d\u533a ","588"],["590","\u897f\u5e02\u533a ","588"],["591","\u9c85\u9c7c\u5708\u533a ","588"],["592","\u8001\u8fb9\u533a ","588"],["593","\u76d6\u5dde\u5e02 ","588"],["594","\u5927\u77f3\u6865\u5e02 ","588"],["596","\u961c\u65b0\u5e02 ","2"],["597","\u6d77\u5dde\u533a ","596"],["598","\u65b0\u90b1\u533a ","596"],["599","\u592a\u5e73\u533a ","596"],["600","\u6e05\u6cb3\u95e8\u533a ","596"],["601","\u7ec6\u6cb3\u533a ","596"],["602","\u961c\u65b0\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","596"],["603","\u5f70\u6b66\u53bf ","596"],["605","\u8fbd\u9633\u5e02 ","2"],["606","\u767d\u5854\u533a ","605"],["607","\u6587\u5723\u533a ","605"],["608","\u5b8f\u4f1f\u533a ","605"],["609","\u5f13\u957f\u5cad\u533a ","605"],["610","\u592a\u5b50\u6cb3\u533a ","605"],["611","\u8fbd\u9633\u53bf ","605"],["612","\u706f\u5854\u5e02 ","605"],["614","\u76d8\u9526\u5e02 ","2"],["615","\u53cc\u53f0\u5b50\u533a ","614"],["616","\u5174\u9686\u53f0\u533a ","614"],["617","\u5927\u6d3c\u53bf ","614"],["618","\u76d8\u5c71\u53bf ","614"],["620","\u94c1\u5cad\u5e02 ","2"],["621","\u94f6\u5dde\u533a ","620"],["622","\u6e05\u6cb3\u533a ","620"],["623","\u94c1\u5cad\u53bf ","620"],["624","\u897f\u4e30\u53bf ","620"],["625","\u660c\u56fe\u53bf ","620"],["626","\u8c03\u5175\u5c71\u5e02 ","620"],["627","\u5f00\u539f\u5e02 ","620"],["629","\u671d\u9633\u5e02 ","2"],["630","\u53cc\u5854\u533a ","629"],["631","\u9f99\u57ce\u533a ","629"],["632","\u671d\u9633\u53bf ","629"],["633","\u5efa\u5e73\u53bf ","629"],["634","\u5580\u5587\u6c81\u5de6\u7ffc\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","629"],["635","\u5317\u7968\u5e02 ","629"],["636","\u51cc\u6e90\u5e02 ","629"],["638","\u846b\u82a6\u5c9b\u5e02 ","2"],["639","\u8fde\u5c71\u533a ","638"],["640","\u9f99\u6e2f\u533a ","638"],["641","\u5357\u7968\u533a ","638"],["642","\u7ee5\u4e2d\u53bf ","638"],["643","\u5efa\u660c\u53bf ","638"],["644","\u5174\u57ce\u5e02 ","638"],["3","\u5409\u6797\u7701 ","0"],["647","\u957f\u6625\u5e02 ","3"],["648","\u5357\u5173\u533a ","647"],["649","\u5bbd\u57ce\u533a ","647"],["650","\u671d\u9633\u533a ","647"],["651","\u4e8c\u9053\u533a ","647"],["652","\u7eff\u56ed\u533a ","647"],["653","\u53cc\u9633\u533a ","647"],["654","\u519c\u5b89\u53bf ","647"],["655","\u4e5d\u53f0\u5e02 ","647"],["656","\u6986\u6811\u5e02 ","647"],["657","\u5fb7\u60e0\u5e02 ","647"],["658","\u9ad8\u65b0\u6280\u672f\u4ea7\u4e1a\u5f00\u53d1\u533a ","647"],["659","\u6c7d\u8f66\u4ea7\u4e1a\u5f00\u53d1\u533a ","647"],["660","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","647"],["661","\u51c0\u6708\u65c5\u6e38\u5f00\u53d1\u533a ","647"],["663","\u5409\u6797\u5e02 ","3"],["664","\u660c\u9091\u533a ","663"],["665","\u9f99\u6f6d\u533a ","663"],["666","\u8239\u8425\u533a ","663"],["667","\u4e30\u6ee1\u533a ","663"],["668","\u6c38\u5409\u53bf ","663"],["669","\u86df\u6cb3\u5e02 ","663"],["670","\u6866\u7538\u5e02 ","663"],["671","\u8212\u5170\u5e02 ","663"],["672","\u78d0\u77f3\u5e02 ","663"],["674","\u56db\u5e73\u5e02 ","3"],["675","\u94c1\u897f\u533a ","674"],["676","\u94c1\u4e1c\u533a ","674"],["677","\u68a8\u6811\u53bf ","674"],["678","\u4f0a\u901a\u6ee1\u65cf\u81ea\u6cbb\u53bf ","674"],["679","\u516c\u4e3b\u5cad\u5e02 ","674"],["680","\u53cc\u8fbd\u5e02 ","674"],["682","\u8fbd\u6e90\u5e02 ","3"],["683","\u9f99\u5c71\u533a ","682"],["684","\u897f\u5b89\u533a ","682"],["685","\u4e1c\u4e30\u53bf ","682"],["686","\u4e1c\u8fbd\u53bf ","682"],["688","\u901a\u5316\u5e02 ","3"],["689","\u4e1c\u660c\u533a ","688"],["690","\u4e8c\u9053\u6c5f\u533a ","688"],["691","\u901a\u5316\u53bf ","688"],["692","\u8f89\u5357\u53bf ","688"],["693","\u67f3\u6cb3\u53bf ","688"],["694","\u6885\u6cb3\u53e3\u5e02 ","688"],["695","\u96c6\u5b89\u5e02 ","688"],["697","\u767d\u5c71\u5e02 ","3"],["698","\u516b\u9053\u6c5f\u533a ","697"],["699","\u629a\u677e\u53bf ","697"],["700","\u9756\u5b87\u53bf ","697"],["701","\u957f\u767d\u671d\u9c9c\u65cf\u81ea\u6cbb\u53bf ","697"],["702","\u6c5f\u6e90\u53bf ","697"],["703","\u4e34\u6c5f\u5e02 ","697"],["705","\u677e\u539f\u5e02 ","3"],["706","\u5b81\u6c5f\u533a ","705"],["707","\u524d\u90ed\u5c14\u7f57\u65af\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","705"],["708","\u957f\u5cad\u53bf ","705"],["709","\u4e7e\u5b89\u53bf ","705"],["710","\u6276\u4f59\u53bf ","705"],["712","\u767d\u57ce\u5e02 ","3"],["713","\u6d2e\u5317\u533a ","712"],["714","\u9547\u8d49\u53bf ","712"],["715","\u901a\u6986\u53bf ","712"],["716","\u6d2e\u5357\u5e02 ","712"],["717","\u5927\u5b89\u5e02 ","712"],["719","\u5ef6\u8fb9\u671d\u9c9c\u65cf\u81ea\u6cbb\u5dde ","3"],["720","\u5ef6\u5409\u5e02 ","719"],["721","\u56fe\u4eec\u5e02 ","719"],["722","\u6566\u5316\u5e02 ","719"],["723","\u73f2\u6625\u5e02 ","719"],["724","\u9f99\u4e95\u5e02 ","719"],["725","\u548c\u9f99\u5e02 ","719"],["726","\u6c6a\u6e05\u53bf ","719"],["727","\u5b89\u56fe\u53bf ","719"],["4","\u9ed1\u9f99\u6c5f\u7701 ","0"],["730","\u54c8\u5c14\u6ee8\u5e02 ","4"],["731","\u9053\u91cc\u533a ","730"],["732","\u5357\u5c97\u533a ","730"],["733","\u9053\u5916\u533a ","730"],["734","\u9999\u574a\u533a ","730"],["735","\u52a8\u529b\u533a ","730"],["736","\u5e73\u623f\u533a ","730"],["737","\u677e\u5317\u533a ","730"],["738","\u547c\u5170\u533a ","730"],["739","\u4f9d\u5170\u53bf ","730"],["740","\u65b9\u6b63\u53bf ","730"],["741","\u5bbe\u53bf ","730"],["742","\u5df4\u5f66\u53bf ","730"],["743","\u6728\u5170\u53bf ","730"],["744","\u901a\u6cb3\u53bf ","730"],["745","\u5ef6\u5bff\u53bf ","730"],["746","\u963f\u57ce\u5e02 ","730"],["747","\u53cc\u57ce\u5e02 ","730"],["748","\u5c1a\u5fd7\u5e02 ","730"],["749","\u4e94\u5e38\u5e02 ","730"],["752","\u9f50\u9f50\u54c8\u5c14\u5e02 ","4"],["753","\u9f99\u6c99\u533a ","752"],["754","\u5efa\u534e\u533a ","752"],["755","\u94c1\u950b\u533a ","752"],["756","\u6602\u6602\u6eaa\u533a ","752"],["757","\u5bcc\u62c9\u5c14\u57fa\u533a ","752"],["758","\u78be\u5b50\u5c71\u533a ","752"],["759","\u6885\u91cc\u65af\u8fbe\u65a1\u5c14\u65cf\u533a ","752"],["760","\u9f99\u6c5f\u53bf ","752"],["761","\u4f9d\u5b89\u53bf ","752"],["762","\u6cf0\u6765\u53bf ","752"],["763","\u7518\u5357\u53bf ","752"],["764","\u5bcc\u88d5\u53bf ","752"],["765","\u514b\u5c71\u53bf ","752"],["766","\u514b\u4e1c\u53bf ","752"],["767","\u62dc\u6cc9\u53bf ","752"],["768","\u8bb7\u6cb3\u5e02 ","752"],["770","\u9e21\u897f\u5e02 ","4"],["771","\u9e21\u51a0\u533a ","770"],["772","\u6052\u5c71\u533a ","770"],["773","\u6ef4\u9053\u533a ","770"],["774","\u68a8\u6811\u533a ","770"],["775","\u57ce\u5b50\u6cb3\u533a ","770"],["776","\u9ebb\u5c71\u533a ","770"],["777","\u9e21\u4e1c\u53bf ","770"],["778","\u864e\u6797\u5e02 ","770"],["779","\u5bc6\u5c71\u5e02 ","770"],["781","\u9e64\u5c97\u5e02 ","4"],["782","\u5411\u9633\u533a ","781"],["783","\u5de5\u519c\u533a ","781"],["784","\u5357\u5c71\u533a ","781"],["785","\u5174\u5b89\u533a ","781"],["786","\u4e1c\u5c71\u533a ","781"],["787","\u5174\u5c71\u533a ","781"],["788","\u841d\u5317\u53bf ","781"],["789","\u7ee5\u6ee8\u53bf ","781"],["791","\u53cc\u9e2d\u5c71\u5e02 ","4"],["792","\u5c16\u5c71\u533a ","791"],["793","\u5cad\u4e1c\u533a ","791"],["794","\u56db\u65b9\u53f0\u533a ","791"],["795","\u5b9d\u5c71\u533a ","791"],["796","\u96c6\u8d24\u53bf ","791"],["797","\u53cb\u8c0a\u53bf ","791"],["1063","\u4e34\u5b89\u5e02 ","1050"],["1065","\u5b81\u6ce2\u5e02 ","6"],["1066","\u6d77\u66d9\u533a ","1065"],["1067","\u6c5f\u4e1c\u533a ","1065"],["1068","\u6c5f\u5317\u533a ","1065"],["1069","\u5317\u4ed1\u533a ","1065"],["1070","\u9547\u6d77\u533a ","1065"],["1071","\u911e\u5dde\u533a ","1065"],["1072","\u8c61\u5c71\u53bf ","1065"],["1073","\u5b81\u6d77\u53bf ","1065"],["1074","\u4f59\u59da\u5e02 ","1065"],["1075","\u6148\u6eaa\u5e02 ","1065"],["1076","\u5949\u5316\u5e02 ","1065"],["1078","\u6e29\u5dde\u5e02 ","6"],["1079","\u9e7f\u57ce\u533a ","1078"],["1080","\u9f99\u6e7e\u533a ","1078"],["1081","\u74ef\u6d77\u533a ","1078"],["1082","\u6d1e\u5934\u53bf ","1078"],["1083","\u6c38\u5609\u53bf ","1078"],["1084","\u5e73\u9633\u53bf ","1078"],["1085","\u82cd\u5357\u53bf ","1078"],["1086","\u6587\u6210\u53bf ","1078"],["1087","\u6cf0\u987a\u53bf ","1078"],["1088","\u745e\u5b89\u5e02 ","1078"],["1089","\u4e50\u6e05\u5e02 ","1078"],["1091","\u5609\u5174\u5e02 ","6"],["1092","\u5357\u6e56\u533a ","1091"],["1093","\u79c0\u6d32\u533a ","1091"],["1094","\u5609\u5584\u53bf ","1091"],["1095","\u6d77\u76d0\u53bf ","1091"],["1096","\u6d77\u5b81\u5e02 ","1091"],["1097","\u5e73\u6e56\u5e02 ","1091"],["1098","\u6850\u4e61\u5e02 ","1091"],["1100","\u6e56\u5dde\u5e02 ","6"],["1101","\u5434\u5174\u533a ","1100"],["1102","\u5357\u6d54\u533a ","1100"],["1103","\u5fb7\u6e05\u53bf ","1100"],["1104","\u957f\u5174\u53bf ","1100"],["1105","\u5b89\u5409\u53bf ","1100"],["1107","\u7ecd\u5174\u5e02 ","6"],["1108","\u8d8a\u57ce\u533a ","1107"],["1109","\u7ecd\u5174\u53bf ","1107"],["1110","\u65b0\u660c\u53bf ","1107"],["1111","\u8bf8\u66a8\u5e02 ","1107"],["1112","\u4e0a\u865e\u5e02 ","1107"],["1113","\u5d4a\u5dde\u5e02 ","1107"],["1115","\u91d1\u534e\u5e02 ","6"],["1116","\u5a7a\u57ce\u533a ","1115"],["1117","\u91d1\u4e1c\u533a ","1115"],["1118","\u6b66\u4e49\u53bf ","1115"],["1119","\u6d66\u6c5f\u53bf ","1115"],["1120","\u78d0\u5b89\u53bf ","1115"],["1121","\u5170\u6eaa\u5e02 ","1115"],["1122","\u4e49\u4e4c\u5e02 ","1115"],["1123","\u4e1c\u9633\u5e02 ","1115"],["1124","\u6c38\u5eb7\u5e02 ","1115"],["1126","\u8862\u5dde\u5e02 ","6"],["1127","\u67ef\u57ce\u533a ","1126"],["1128","\u8862\u6c5f\u533a ","1126"],["1129","\u5e38\u5c71\u53bf ","1126"],["1262","\u7800\u5c71\u53bf ","1260"],["1263","\u8427\u53bf ","1260"],["1264","\u7075\u74a7\u53bf ","1260"],["1265","\u6cd7\u53bf ","1260"],["1267","\u5de2\u6e56\u5e02 ","7"],["1268","\u5c45\u5de2\u533a ","1267"],["1269","\u5e90\u6c5f\u53bf ","1267"],["1270","\u65e0\u4e3a\u53bf ","1267"],["1271","\u542b\u5c71\u53bf ","1267"],["1272","\u548c\u53bf ","1267"],["1274","\u516d\u5b89\u5e02 ","7"],["1275","\u91d1\u5b89\u533a ","1274"],["1276","\u88d5\u5b89\u533a ","1274"],["1277","\u5bff\u53bf ","1274"],["1278","\u970d\u90b1\u53bf ","1274"],["1279","\u8212\u57ce\u53bf ","1274"],["1280","\u91d1\u5be8\u53bf ","1274"],["1281","\u970d\u5c71\u53bf ","1274"],["1283","\u4eb3\u5dde\u5e02 ","7"],["1284","\u8c2f\u57ce\u533a ","1283"],["1285","\u6da1\u9633\u53bf ","1283"],["1286","\u8499\u57ce\u53bf ","1283"],["1287","\u5229\u8f9b\u53bf ","1283"],["1289","\u6c60\u5dde\u5e02 ","7"],["1290","\u8d35\u6c60\u533a ","1289"],["1291","\u4e1c\u81f3\u53bf ","1289"],["1292","\u77f3\u53f0\u53bf ","1289"],["1293","\u9752\u9633\u53bf ","1289"],["1295","\u5ba3\u57ce\u5e02 ","7"],["1296","\u5ba3\u5dde\u533a ","1295"],["1297","\u90ce\u6eaa\u53bf ","1295"],["1298","\u5e7f\u5fb7\u53bf ","1295"],["1299","\u6cfe\u53bf ","1295"],["1300"," \u7ee9\u6eaa\u53bf ","1295"],["1301","\u65cc\u5fb7\u53bf ","1295"],["1302","\u5b81\u56fd\u5e02 ","1295"],["8","\u798f\u5efa\u7701 ","0"],["1305","\u798f\u5dde\u5e02 ","8"],["1306","\u9f13\u697c\u533a ","1305"],["1307","\u53f0\u6c5f\u533a ","1305"],["1308","\u4ed3\u5c71\u533a ","1305"],["1309","\u9a6c\u5c3e\u533a ","1305"],["1310","\u664b\u5b89\u533a ","1305"],["1311","\u95fd\u4faf\u53bf ","1305"],["1312","\u8fde\u6c5f\u53bf ","1305"],["1313","\u7f57\u6e90\u53bf ","1305"],["1314","\u95fd\u6e05\u53bf ","1305"],["1315","\u6c38\u6cf0\u53bf ","1305"],["1316","\u5e73\u6f6d\u53bf ","1305"],["1317","\u798f\u6e05\u5e02 ","1305"],["1318","\u957f\u4e50\u5e02 ","1305"],["1320","\u53a6\u95e8\u5e02 ","8"],["1321","\u601d\u660e\u533a ","1320"],["1322","\u6d77\u6ca7\u533a ","1320"],["1323","\u6e56\u91cc\u533a ","1320"],["1324","\u96c6\u7f8e\u533a ","1320"],["1325","\u540c\u5b89\u533a ","1320"],["1326","\u7fd4\u5b89\u533a ","1320"],["1130","\u5f00\u5316\u53bf ","1126"],["1131","\u9f99\u6e38\u53bf ","1126"],["1132","\u6c5f\u5c71\u5e02 ","1126"],["1134","\u821f\u5c71\u5e02 ","6"],["1135","\u5b9a\u6d77\u533a ","1134"],["1136","\u666e\u9640\u533a ","1134"],["1137","\u5cb1\u5c71\u53bf ","1134"],["1138","\u5d4a\u6cd7\u53bf ","1134"],["1140","\u53f0\u5dde\u5e02 ","6"],["1141","\u6912\u6c5f\u533a ","1140"],["1142","\u9ec4\u5ca9\u533a ","1140"],["1143","\u8def\u6865\u533a ","1140"],["1144","\u7389\u73af\u53bf ","1140"],["1145","\u4e09\u95e8\u53bf ","1140"],["1146","\u5929\u53f0\u53bf ","1140"],["1147","\u4ed9\u5c45\u53bf ","1140"],["1148","\u6e29\u5cad\u5e02 ","1140"],["1149","\u4e34\u6d77\u5e02 ","1140"],["1151","\u4e3d\u6c34\u5e02 ","6"],["1152","\u83b2\u90fd\u533a ","1151"],["1153","\u9752\u7530\u53bf ","1151"],["1154","\u7f19\u4e91\u53bf ","1151"],["1155","\u9042\u660c\u53bf ","1151"],["1156","\u677e\u9633\u53bf ","1151"],["1157","\u4e91\u548c\u53bf ","1151"],["1158","\u5e86\u5143\u53bf ","1151"],["1159","\u666f\u5b81\u7572\u65cf\u81ea\u6cbb\u53bf ","1151"],["1160","\u9f99\u6cc9\u5e02 ","1151"],["7","\u5b89\u5fbd\u7701 ","0"],["1163","\u5408\u80a5\u5e02 ","7"],["1164","\u7476\u6d77\u533a ","1163"],["1165","\u5e90\u9633\u533a ","1163"],["1166","\u8700\u5c71\u533a ","1163"],["1167","\u5305\u6cb3\u533a ","1163"],["1168","\u957f\u4e30\u53bf ","1163"],["1169","\u80a5\u4e1c\u53bf ","1163"],["1170","\u80a5\u897f\u53bf ","1163"],["1171","\u9ad8\u65b0\u533a ","1163"],["1172","\u4e2d\u533a ","1163"],["1174","\u829c\u6e56\u5e02 ","7"],["1175","\u955c\u6e56\u533a ","1174"],["1176","\u5f0b\u6c5f\u533a ","1174"],["1177","\u9e20\u6c5f\u533a ","1174"],["1178","\u4e09\u5c71\u533a ","1174"],["1179","\u829c\u6e56\u53bf ","1174"],["1180","\u7e41\u660c\u53bf ","1174"],["1181","\u5357\u9675\u53bf ","1174"],["1183","\u868c\u57e0\u5e02 ","7"],["1184","\u9f99\u5b50\u6e56\u533a ","1183"],["1185","\u868c\u5c71\u533a ","1183"],["1186","\u79b9\u4f1a\u533a ","1183"],["1187","\u6dee\u4e0a\u533a ","1183"],["1188","\u6000\u8fdc\u53bf ","1183"],["1189","\u4e94\u6cb3\u53bf ","1183"],["1190","\u56fa\u9547\u53bf ","1183"],["1192","\u6dee\u5357\u5e02 ","7"],["1193","\u5927\u901a\u533a ","1192"],["1194","\u7530\u5bb6\u5eb5\u533a ","1192"],["1195","\u8c22\u5bb6\u96c6\u533a ","1192"],["1196","\u516b\u516c\u5c71\u533a ","1192"],["1197","\u6f58\u96c6\u533a ","1192"],["1198","\u51e4\u53f0\u53bf ","1192"],["1200","\u9a6c\u978d\u5c71\u5e02 ","7"],["1201","\u91d1\u5bb6\u5e84\u533a ","1200"],["1202","\u82b1\u5c71\u533a ","1200"],["1203","\u96e8\u5c71\u533a ","1200"],["1204","\u5f53\u6d82\u53bf ","1200"],["1206","\u6dee\u5317\u5e02 ","7"],["1207","\u675c\u96c6\u533a ","1206"],["1208","\u76f8\u5c71\u533a ","1206"],["1209","\u70c8\u5c71\u533a ","1206"],["1210","\u6fc9\u6eaa\u53bf ","1206"],["1212","\u94dc\u9675\u5e02 ","7"],["1213","\u94dc\u5b98\u5c71\u533a ","1212"],["1214","\u72ee\u5b50\u5c71\u533a ","1212"],["1215","\u90ca\u533a ","1212"],["1216","\u94dc\u9675\u53bf ","1212"],["1218","\u5b89\u5e86\u5e02 ","7"],["1219","\u8fce\u6c5f\u533a ","1218"],["1220","\u5927\u89c2\u533a ","1218"],["1221","\u5b9c\u79c0\u533a ","1218"],["1222","\u6000\u5b81\u53bf ","1218"],["1223","\u679e\u9633\u53bf ","1218"],["1224","\u6f5c\u5c71\u53bf ","1218"],["1225","\u592a\u6e56\u53bf ","1218"],["1226","\u5bbf\u677e\u53bf ","1218"],["1227","\u671b\u6c5f\u53bf ","1218"],["1228","\u5cb3\u897f\u53bf ","1218"],["1229","\u6850\u57ce\u5e02 ","1218"],["1231","\u9ec4\u5c71\u5e02 ","7"],["1232","\u5c6f\u6eaa\u533a ","1231"],["1233","\u9ec4\u5c71\u533a ","1231"],["1234","\u5fbd\u5dde\u533a ","1231"],["1235","\u6b59\u53bf ","1231"],["1236"," \u4f11\u5b81\u53bf ","1231"],["1237","\u9edf\u53bf ","1231"],["1238","\u7941\u95e8\u53bf ","1231"],["1240","\u6ec1\u5dde\u5e02 ","7"],["1241","\u7405\u740a\u533a ","1240"],["1242","\u5357\u8c2f\u533a ","1240"],["1243","\u6765\u5b89\u53bf ","1240"],["1244","\u5168\u6912\u53bf ","1240"],["1245","\u5b9a\u8fdc\u53bf ","1240"],["1246","\u51e4\u9633\u53bf ","1240"],["1247","\u5929\u957f\u5e02 ","1240"],["1248","\u660e\u5149\u5e02 ","1240"],["1250","\u961c\u9633\u5e02 ","7"],["1251","\u988d\u5dde\u533a ","1250"],["1252"," \u988d\u4e1c\u533a ","1250"],["1253","\u988d\u6cc9\u533a ","1250"],["1254","\u4e34\u6cc9\u53bf ","1250"],["1255","\u592a\u548c\u53bf ","1250"],["1256","\u961c\u5357\u53bf ","1250"],["1257","\u988d\u4e0a\u53bf ","1250"],["1258","\u754c\u9996\u5e02 ","1250"],["1260","\u5bbf\u5dde\u5e02 ","7"],["1261","\u57c7\u6865\u533a ","1260"],["864","\u5ae9\u6c5f\u53bf ","862"],["865","\u900a\u514b\u53bf ","862"],["866","\u5b59\u5434\u53bf ","862"],["867","\u5317\u5b89\u5e02 ","862"],["868","\u4e94\u5927\u8fde\u6c60\u5e02 ","862"],["870","\u7ee5\u5316\u5e02 ","4"],["871","\u5317\u6797\u533a ","870"],["872","\u671b\u594e\u53bf ","870"],["873","\u5170\u897f\u53bf ","870"],["874","\u9752\u5188\u53bf ","870"],["875","\u5e86\u5b89\u53bf ","870"],["876","\u660e\u6c34\u53bf ","870"],["877","\u7ee5\u68f1\u53bf ","870"],["878","\u5b89\u8fbe\u5e02 ","870"],["879","\u8087\u4e1c\u5e02 ","870"],["880","\u6d77\u4f26\u5e02 ","870"],["882","\u5927\u5174\u5b89\u5cad\u5730\u533a ","4"],["883","\u547c\u739b\u53bf ","882"],["884","\u5854\u6cb3\u53bf ","882"],["885","\u6f20\u6cb3\u53bf ","882"],["886","\u52a0\u683c\u8fbe\u5947\u533a ","882"],["30","\u4e0a\u6d77 ","0"],["890","\u9ec4\u6d66\u533a ","30"],["891","\u5362\u6e7e\u533a ","30"],["892","\u5f90\u6c47\u533a ","30"],["893","\u957f\u5b81\u533a ","30"],["894","\u9759\u5b89\u533a ","30"],["895","\u666e\u9640\u533a ","30"],["896","\u95f8\u5317\u533a ","30"],["897","\u8679\u53e3\u533a ","30"],["898","\u6768\u6d66\u533a ","30"],["899","\u95f5\u884c\u533a ","30"],["900","\u5b9d\u5c71\u533a ","30"],["901","\u5609\u5b9a\u533a ","30"],["902","\u6d66\u4e1c\u65b0\u533a ","30"],["903","\u91d1\u5c71\u533a ","30"],["904","\u677e\u6c5f\u533a ","30"],["905","\u9752\u6d66\u533a ","30"],["906","\u5357\u6c47\u533a ","30"],["907","\u5949\u8d24\u533a ","30"],["908","\u5ddd\u6c99\u533a ","30"],["909","\u5d07\u660e\u53bf ","30"],["5","\u6c5f\u82cf\u7701 ","0"],["912","\u5357\u4eac\u5e02 ","5"],["913","\u7384\u6b66\u533a ","912"],["914","\u767d\u4e0b\u533a ","912"],["915","\u79e6\u6dee\u533a ","912"],["916","\u5efa\u90ba\u533a ","912"],["917","\u9f13\u697c\u533a ","912"],["918","\u4e0b\u5173\u533a ","912"],["919","\u6d66\u53e3\u533a ","912"],["920","\u6816\u971e\u533a ","912"],["921","\u96e8\u82b1\u53f0\u533a ","912"],["922","\u6c5f\u5b81\u533a ","912"],["923","\u516d\u5408\u533a ","912"],["924","\u6ea7\u6c34\u53bf ","912"],["925","\u9ad8\u6df3\u53bf ","912"],["927","\u65e0\u9521\u5e02 ","5"],["928","\u5d07\u5b89\u533a ","927"],["929","\u5357\u957f\u533a ","927"],["930","\u5317\u5858\u533a ","927"],["931","\u9521\u5c71\u533a ","927"],["932","\u60e0\u5c71\u533a ","927"],["933","\u6ee8\u6e56\u533a ","927"],["934","\u6c5f\u9634\u5e02 ","927"],["935","\u5b9c\u5174\u5e02 ","927"],["936","\u65b0\u533a ","927"],["938","\u5f90\u5dde\u5e02 ","5"],["939","\u9f13\u697c\u533a ","938"],["940","\u4e91\u9f99\u533a ","938"],["941","\u4e5d\u91cc\u533a ","938"],["942","\u8d3e\u6c6a\u533a ","938"],["943","\u6cc9\u5c71\u533a ","938"],["944","\u4e30\u53bf ","938"],["945","\u6c9b\u53bf ","938"],["946","\u94dc\u5c71\u53bf ","938"],["947","\u7762\u5b81\u53bf ","938"],["948","\u65b0\u6c82\u5e02 ","938"],["949","\u90b3\u5dde\u5e02 ","938"],["951","\u5e38\u5dde\u5e02 ","5"],["952","\u5929\u5b81\u533a ","951"],["953","\u949f\u697c\u533a ","951"],["954","\u621a\u5885\u5830\u533a ","951"],["955","\u65b0\u5317\u533a ","951"],["956","\u6b66\u8fdb\u533a ","951"],["957","\u6ea7\u9633\u5e02 ","951"],["958","\u91d1\u575b\u5e02 ","951"],["960","\u82cf\u5dde\u5e02 ","5"],["961","\u6ca7\u6d6a\u533a ","960"],["962","\u5e73\u6c5f\u533a ","960"],["963","\u91d1\u960a\u533a ","960"],["964","\u864e\u4e18\u533a ","960"],["965","\u5434\u4e2d\u533a ","960"],["966","\u76f8\u57ce\u533a ","960"],["967","\u5e38\u719f\u5e02 ","960"],["968","\u5f20\u5bb6\u6e2f\u5e02 ","960"],["969","\u6606\u5c71\u5e02 ","960"],["970","\u5434\u6c5f\u5e02 ","960"],["971","\u592a\u4ed3\u5e02 ","960"],["972","\u65b0\u533a ","960"],["973","\u56ed\u533a ","960"],["975","\u5357\u901a\u5e02 ","5"],["976","\u5d07\u5ddd\u533a ","975"],["977","\u6e2f\u95f8\u533a ","975"],["978","\u6d77\u5b89\u53bf ","975"],["979","\u5982\u4e1c\u53bf ","975"],["980","\u542f\u4e1c\u5e02 ","975"],["981","\u5982\u768b\u5e02 ","975"],["982","\u901a\u5dde\u5e02 ","975"],["983","\u6d77\u95e8\u5e02 ","975"],["984","\u5f00\u53d1\u533a ","975"],["986","\u8fde\u4e91\u6e2f\u5e02 ","5"],["987","\u8fde\u4e91\u533a ","986"],["988","\u65b0\u6d66\u533a ","986"],["989","\u6d77\u5dde\u533a ","986"],["990","\u8d63\u6986\u53bf ","986"],["991","\u4e1c\u6d77\u53bf ","986"],["992","\u704c\u4e91\u53bf ","986"],["993","\u704c\u5357\u53bf ","986"],["995","\u6dee\u5b89\u5e02 ","5"],["996","\u6e05\u6cb3\u533a ","995"],["997","\u695a\u5dde\u533a ","995"],["998","\u6dee\u9634\u533a ","995"],["999","\u6e05\u6d66\u533a ","995"],["1000","\u6d9f\u6c34\u53bf ","995"],["1001","\u6d2a\u6cfd\u53bf ","995"],["1002","\u76f1\u7719\u53bf ","995"],["1003","\u91d1\u6e56\u53bf ","995"],["1005","\u76d0\u57ce\u5e02 ","5"],["1006","\u4ead\u6e56\u533a ","1005"],["1007","\u76d0\u90fd\u533a ","1005"],["1008","\u54cd\u6c34\u53bf ","1005"],["1009","\u6ee8\u6d77\u53bf ","1005"],["1010","\u961c\u5b81\u53bf ","1005"],["1011","\u5c04\u9633\u53bf ","1005"],["1012","\u5efa\u6e56\u53bf ","1005"],["1013","\u4e1c\u53f0\u5e02 ","1005"],["1014","\u5927\u4e30\u5e02 ","1005"],["1016","\u626c\u5dde\u5e02 ","5"],["1017","\u5e7f\u9675\u533a ","1016"],["1018","\u9097\u6c5f\u533a ","1016"],["1019","\u7ef4\u626c\u533a ","1016"],["1020","\u5b9d\u5e94\u53bf ","1016"],["1021","\u4eea\u5f81\u5e02 ","1016"],["1022","\u9ad8\u90ae\u5e02 ","1016"],["1023","\u6c5f\u90fd\u5e02 ","1016"],["1024","\u7ecf\u6d4e\u5f00\u53d1\u533a ","1016"],["1026","\u9547\u6c5f\u5e02 ","5"],["1027","\u4eac\u53e3\u533a ","1026"],["1028","\u6da6\u5dde\u533a ","1026"],["1029","\u4e39\u5f92\u533a ","1026"],["1030","\u4e39\u9633\u5e02 ","1026"],["1031","\u626c\u4e2d\u5e02 ","1026"],["1032","\u53e5\u5bb9\u5e02 ","1026"],["1034","\u6cf0\u5dde\u5e02 ","5"],["1035","\u6d77\u9675\u533a ","1034"],["1036","\u9ad8\u6e2f\u533a ","1034"],["1037","\u5174\u5316\u5e02 ","1034"],["1038","\u9756\u6c5f\u5e02 ","1034"],["1039","\u6cf0\u5174\u5e02 ","1034"],["1040","\u59dc\u5830\u5e02 ","1034"],["1042","\u5bbf\u8fc1\u5e02 ","5"],["1043","\u5bbf\u57ce\u533a ","1042"],["1044","\u5bbf\u8c6b\u533a ","1042"],["1045","\u6cad\u9633\u53bf ","1042"],["1046","\u6cd7\u9633\u53bf ","1042"],["1047","\u6cd7\u6d2a\u53bf ","1042"],["6","\u6d59\u6c5f\u7701 ","0"],["1050","\u676d\u5dde\u5e02 ","6"],["1051","\u4e0a\u57ce\u533a ","1050"],["1052","\u4e0b\u57ce\u533a ","1050"],["1053","\u6c5f\u5e72\u533a ","1050"],["1054","\u62f1\u5885\u533a ","1050"],["1055","\u897f\u6e56\u533a ","1050"],["1056","\u6ee8\u6c5f\u533a ","1050"],["1057","\u8427\u5c71\u533a ","1050"],["1058","\u4f59\u676d\u533a ","1050"],["1059","\u6850\u5e90\u53bf ","1050"],["1060","\u6df3\u5b89\u53bf ","1050"],["1061","\u5efa\u5fb7\u5e02 ","1050"],["1062","\u5bcc\u9633\u5e02 ","1050"],["1791","\u65b0\u4e61\u5e02 ","11"],["1792","\u7ea2\u65d7\u533a ","1791"],["1793","\u536b\u6ee8\u533a ","1791"],["1794","\u51e4\u6cc9\u533a ","1791"],["1795","\u7267\u91ce\u533a ","1791"],["1796","\u65b0\u4e61\u53bf ","1791"],["1797","\u83b7\u5609\u53bf ","1791"],["1798","\u539f\u9633\u53bf ","1791"],["1799","\u5ef6\u6d25\u53bf ","1791"],["1800","\u5c01\u4e18\u53bf ","1791"],["1801","\u957f\u57a3\u53bf ","1791"],["1802","\u536b\u8f89\u5e02 ","1791"],["1803","\u8f89\u53bf\u5e02 ","1791"],["1805","\u7126\u4f5c\u5e02 ","11"],["1806","\u89e3\u653e\u533a ","1805"],["1807","\u4e2d\u7ad9\u533a ","1805"],["1808","\u9a6c\u6751\u533a ","1805"],["1809","\u5c71\u9633\u533a ","1805"],["1810","\u4fee\u6b66\u53bf ","1805"],["1811","\u535a\u7231\u53bf ","1805"],["1812","\u6b66\u965f\u53bf ","1805"],["1813","\u6e29\u53bf ","1805"],["1814","\u6c81\u9633\u5e02 ","1805"],["1815","\u5b5f\u5dde\u5e02 ","1805"],["1817","\u6d4e\u6e90\u5e02 ","11"],["1818","\u6fee\u9633\u5e02 ","11"],["1819","\u534e\u9f99\u533a ","1818"],["1820","\u6e05\u4e30\u53bf ","1818"],["1821","\u5357\u4e50\u53bf ","1818"],["1822","\u8303\u53bf ","1818"],["1823","\u53f0\u524d\u53bf ","1818"],["1824","\u6fee\u9633\u53bf ","1818"],["1826","\u8bb8\u660c\u5e02 ","11"],["1827","\u9b4f\u90fd\u533a ","1826"],["1828","\u8bb8\u660c\u53bf ","1826"],["1829","\u9122\u9675\u53bf ","1826"],["1830","\u8944\u57ce\u53bf ","1826"],["1831","\u79b9\u5dde\u5e02 ","1826"],["1832","\u957f\u845b\u5e02 ","1826"],["1834","\u6f2f\u6cb3\u5e02 ","11"],["1835","\u6e90\u6c47\u533a ","1834"],["1836","\u90fe\u57ce\u533a ","1834"],["1837","\u53ec\u9675\u533a ","1834"],["1838","\u821e\u9633\u53bf ","1834"],["1839","\u4e34\u988d\u53bf ","1834"],["1841","\u4e09\u95e8\u5ce1\u5e02 ","11"],["1842","\u6e56\u6ee8\u533a ","1841"],["1843","\u6e11\u6c60\u53bf ","1841"],["1844","\u9655\u53bf ","1841"],["1845","\u5362\u6c0f\u53bf ","1841"],["1846","\u4e49\u9a6c\u5e02 ","1841"],["1847","\u7075\u5b9d\u5e02 ","1841"],["1849","\u5357\u9633\u5e02 ","11"],["1850","\u5b9b\u57ce\u533a ","1849"],["1851","\u5367\u9f99\u533a ","1849"],["1852","\u5357\u53ec\u53bf ","1849"],["1853","\u65b9\u57ce\u53bf ","1849"],["1854","\u897f\u5ce1\u53bf ","1849"],["1855","\u9547\u5e73\u53bf ","1849"],["1328","\u8386\u7530\u5e02 ","8"],["1329","\u57ce\u53a2\u533a ","1328"],["1330","\u6db5\u6c5f\u533a ","1328"],["1331","\u8354\u57ce\u533a ","1328"],["1332","\u79c0\u5c7f\u533a ","1328"],["1333","\u4ed9\u6e38\u53bf ","1328"],["1335","\u4e09\u660e\u5e02 ","8"],["1336","\u6885\u5217\u533a ","1335"],["1337","\u4e09\u5143\u533a ","1335"],["1338","\u660e\u6eaa\u53bf ","1335"],["1339","\u6e05\u6d41\u53bf ","1335"],["1340","\u5b81\u5316\u53bf ","1335"],["1341","\u5927\u7530\u53bf ","1335"],["1342","\u5c24\u6eaa\u53bf ","1335"],["1343","\u6c99\u53bf ","1335"],["1344","\u5c06\u4e50\u53bf ","1335"],["1345","\u6cf0\u5b81\u53bf ","1335"],["1346","\u5efa\u5b81\u53bf ","1335"],["1347","\u6c38\u5b89\u5e02 ","1335"],["1349","\u6cc9\u5dde\u5e02 ","8"],["1350","\u9ca4\u57ce\u533a ","1349"],["1351","\u4e30\u6cfd\u533a ","1349"],["1352","\u6d1b\u6c5f\u533a ","1349"],["1353","\u6cc9\u6e2f\u533a ","1349"],["1354","\u60e0\u5b89\u53bf ","1349"],["1355","\u5b89\u6eaa\u53bf ","1349"],["1356","\u6c38\u6625\u53bf ","1349"],["1357","\u5fb7\u5316\u53bf ","1349"],["1358","\u91d1\u95e8\u53bf ","1349"],["1359","\u77f3\u72ee\u5e02 ","1349"],["1360","\u664b\u6c5f\u5e02 ","1349"],["1361","\u5357\u5b89\u5e02 ","1349"],["1363","\u6f33\u5dde\u5e02 ","8"],["1364","\u8297\u57ce\u533a ","1363"],["1365","\u9f99\u6587\u533a ","1363"],["1366","\u4e91\u9704\u53bf ","1363"],["1367","\u6f33\u6d66\u53bf ","1363"],["1368","\u8bcf\u5b89\u53bf ","1363"],["1369","\u957f\u6cf0\u53bf ","1363"],["1370","\u4e1c\u5c71\u53bf ","1363"],["1371","\u5357\u9756\u53bf ","1363"],["1372","\u5e73\u548c\u53bf ","1363"],["1373","\u534e\u5b89\u53bf ","1363"],["1374","\u9f99\u6d77\u5e02 ","1363"],["1376","\u5357\u5e73\u5e02 ","8"],["1377","\u5ef6\u5e73\u533a ","1376"],["1378","\u987a\u660c\u53bf ","1376"],["1379","\u6d66\u57ce\u53bf ","1376"],["1380","\u5149\u6cfd\u53bf ","1376"],["1381","\u677e\u6eaa\u53bf ","1376"],["1382","\u653f\u548c\u53bf ","1376"],["1383","\u90b5\u6b66\u5e02 ","1376"],["1384","\u6b66\u5937\u5c71\u5e02 ","1376"],["1385","\u5efa\u74ef\u5e02 ","1376"],["1386","\u5efa\u9633\u5e02 ","1376"],["1388","\u9f99\u5ca9\u5e02 ","8"],["1389","\u65b0\u7f57\u533a ","1388"],["1390","\u957f\u6c40\u53bf ","1388"],["1391","\u6c38\u5b9a\u53bf ","1388"],["1392","\u4e0a\u676d\u53bf ","1388"],["1393","\u6b66\u5e73\u53bf ","1388"],["1394","\u8fde\u57ce\u53bf ","1388"],["1395","\u6f33\u5e73\u5e02 ","1388"],["1397","\u5b81\u5fb7\u5e02 ","8"],["1398","\u8549\u57ce\u533a ","1397"],["1399","\u971e\u6d66\u53bf ","1397"],["1400","\u53e4\u7530\u53bf ","1397"],["1401","\u5c4f\u5357\u53bf ","1397"],["1402","\u5bff\u5b81\u53bf ","1397"],["1403","\u5468\u5b81\u53bf ","1397"],["1404","\u67d8\u8363\u53bf ","1397"],["1405","\u798f\u5b89\u5e02 ","1397"],["1406","\u798f\u9f0e\u5e02 ","1397"],["9","\u6c5f\u897f\u7701 ","0"],["1409","\u5357\u660c\u5e02 ","9"],["1410","\u4e1c\u6e56\u533a ","1409"],["1411","\u897f\u6e56\u533a ","1409"],["1412","\u9752\u4e91\u8c31\u533a ","1409"],["1413","\u6e7e\u91cc\u533a ","1409"],["1414","\u9752\u5c71\u6e56\u533a ","1409"],["1415","\u5357\u660c\u53bf ","1409"],["1416","\u65b0\u5efa\u53bf ","1409"],["1417","\u5b89\u4e49\u53bf ","1409"],["1418","\u8fdb\u8d24\u53bf ","1409"],["1419","\u7ea2\u8c37\u6ee9\u65b0\u533a ","1409"],["1420","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","1409"],["1421","\u660c\u5317\u533a ","1409"],["1423","\u666f\u5fb7\u9547\u5e02 ","9"],["1424","\u660c\u6c5f\u533a ","1423"],["1425","\u73e0\u5c71\u533a ","1423"],["1426","\u6d6e\u6881\u53bf ","1423"],["1427","\u4e50\u5e73\u5e02 ","1423"],["1429","\u840d\u4e61\u5e02 ","9"],["1430","\u5b89\u6e90\u533a ","1429"],["1431","\u6e58\u4e1c\u533a ","1429"],["1432","\u83b2\u82b1\u53bf ","1429"],["1433","\u4e0a\u6817\u53bf ","1429"],["1434","\u82a6\u6eaa\u53bf ","1429"],["1436","\u4e5d\u6c5f\u5e02 ","9"],["1437","\u5e90\u5c71\u533a ","1436"],["1438","\u6d54\u9633\u533a ","1436"],["1439","\u4e5d\u6c5f\u53bf ","1436"],["1440","\u6b66\u5b81\u53bf ","1436"],["1441","\u4fee\u6c34\u53bf ","1436"],["1442","\u6c38\u4fee\u53bf ","1436"],["1443","\u5fb7\u5b89\u53bf ","1436"],["1444","\u661f\u5b50\u53bf ","1436"],["1445","\u90fd\u660c\u53bf ","1436"],["1446","\u6e56\u53e3\u53bf ","1436"],["1447","\u5f6d\u6cfd\u53bf ","1436"],["1448","\u745e\u660c\u5e02 ","1436"],["1450","\u65b0\u4f59\u5e02 ","9"],["1451","\u6e1d\u6c34\u533a ","1450"],["1452","\u5206\u5b9c\u53bf ","1450"],["1454","\u9e70\u6f6d\u5e02 ","9"],["1455","\u6708\u6e56\u533a ","1454"],["1456","\u4f59\u6c5f\u53bf ","1454"],["1457","\u8d35\u6eaa\u5e02 ","1454"],["1459","\u8d63\u5dde\u5e02 ","9"],["1460","\u7ae0\u8d21\u533a ","1459"],["1461","\u8d63\u53bf ","1459"],["1462","\u4fe1\u4e30\u53bf ","1459"],["1463","\u5927\u4f59\u53bf ","1459"],["1464","\u4e0a\u72b9\u53bf ","1459"],["1465","\u5d07\u4e49\u53bf ","1459"],["1466","\u5b89\u8fdc\u53bf ","1459"],["1467","\u9f99\u5357\u53bf ","1459"],["1468","\u5b9a\u5357\u53bf ","1459"],["1469","\u5168\u5357\u53bf ","1459"],["1470","\u5b81\u90fd\u53bf ","1459"],["1471","\u4e8e\u90fd\u53bf ","1459"],["1472","\u5174\u56fd\u53bf ","1459"],["1473","\u4f1a\u660c\u53bf ","1459"],["1474","\u5bfb\u4e4c\u53bf ","1459"],["1475","\u77f3\u57ce\u53bf ","1459"],["1476","\u9ec4\u91d1\u533a ","1459"],["1477","\u745e\u91d1\u5e02 ","1459"],["1478","\u5357\u5eb7\u5e02 ","1459"],["1480","\u5409\u5b89\u5e02 ","9"],["1481","\u5409\u5dde\u533a ","1480"],["1482","\u9752\u539f\u533a ","1480"],["1483","\u5409\u5b89\u53bf ","1480"],["1484","\u5409\u6c34\u53bf ","1480"],["1485","\u5ce1\u6c5f\u53bf ","1480"],["1486","\u65b0\u5e72\u53bf ","1480"],["1487","\u6c38\u4e30\u53bf ","1480"],["1488","\u6cf0\u548c\u53bf ","1480"],["1489","\u9042\u5ddd\u53bf ","1480"],["1490","\u4e07\u5b89\u53bf ","1480"],["1491","\u5b89\u798f\u53bf ","1480"],["1492","\u6c38\u65b0\u53bf ","1480"],["1493","\u4e95\u5188\u5c71\u5e02 ","1480"],["1495","\u5b9c\u6625\u5e02 ","9"],["1496","\u8881\u5dde\u533a ","1495"],["1497","\u5949\u65b0\u53bf ","1495"],["1498","\u4e07\u8f7d\u53bf ","1495"],["1499","\u4e0a\u9ad8\u53bf ","1495"],["1500","\u5b9c\u4e30\u53bf ","1495"],["1501","\u9756\u5b89\u53bf ","1495"],["1502","\u94dc\u9f13\u53bf ","1495"],["1503","\u4e30\u57ce\u5e02 ","1495"],["1504","\u6a1f\u6811\u5e02 ","1495"],["1505","\u9ad8\u5b89\u5e02 ","1495"],["1507","\u629a\u5dde\u5e02 ","9"],["1508","\u4e34\u5ddd\u533a ","1507"],["1509","\u5357\u57ce\u53bf ","1507"],["1510","\u9ece\u5ddd\u53bf ","1507"],["1511","\u5357\u4e30\u53bf ","1507"],["1512","\u5d07\u4ec1\u53bf ","1507"],["1513","\u4e50\u5b89\u53bf ","1507"],["1514","\u5b9c\u9ec4\u53bf ","1507"],["1515","\u91d1\u6eaa\u53bf ","1507"],["1516","\u8d44\u6eaa\u53bf ","1507"],["1517","\u4e1c\u4e61\u53bf ","1507"],["1518","\u5e7f\u660c\u53bf ","1507"],["1520","\u4e0a\u9976\u5e02 ","9"],["1521","\u4fe1\u5dde\u533a ","1520"],["1522","\u4e0a\u9976\u53bf ","1520"],["1523","\u5e7f\u4e30\u53bf ","1520"],["1524","\u7389\u5c71\u53bf ","1520"],["1525","\u94c5\u5c71\u53bf ","1520"],["1526","\u6a2a\u5cf0\u53bf ","1520"],["1527","\u5f0b\u9633\u53bf ","1520"],["1528","\u4f59\u5e72\u53bf ","1520"],["1529","\u9131\u9633\u53bf ","1520"],["1530","\u4e07\u5e74\u53bf ","1520"],["1531","\u5a7a\u6e90\u53bf ","1520"],["1532","\u5fb7\u5174\u5e02 ","1520"],["10","\u5c71\u4e1c\u7701 ","0"],["1535","\u6d4e\u5357\u5e02 ","10"],["1536","\u5386\u4e0b\u533a ","1535"],["1537","\u5e02\u4e2d\u533a ","1535"],["1538","\u69d0\u836b\u533a ","1535"],["1539","\u5929\u6865\u533a ","1535"],["1540","\u5386\u57ce\u533a ","1535"],["1541","\u957f\u6e05\u533a ","1535"],["1542","\u5e73\u9634\u53bf ","1535"],["1543","\u6d4e\u9633\u53bf ","1535"],["1544","\u5546\u6cb3\u53bf ","1535"],["1545","\u7ae0\u4e18\u5e02 ","1535"],["1547","\u9752\u5c9b\u5e02 ","10"],["1548","\u5e02\u5357\u533a ","1547"],["1549","\u5e02\u5317\u533a ","1547"],["1550","\u56db\u65b9\u533a ","1547"],["1551","\u9ec4\u5c9b\u533a ","1547"],["1552","\u5d02\u5c71\u533a ","1547"],["1553","\u674e\u6ca7\u533a ","1547"],["1554","\u57ce\u9633\u533a ","1547"],["1555","\u5f00\u53d1\u533a ","1547"],["1556","\u80f6\u5dde\u5e02 ","1547"],["1557","\u5373\u58a8\u5e02 ","1547"],["1558","\u5e73\u5ea6\u5e02 ","1547"],["1559","\u80f6\u5357\u5e02 ","1547"],["1560","\u83b1\u897f\u5e02 ","1547"],["1562","\u6dc4\u535a\u5e02 ","10"],["1563","\u6dc4\u5ddd\u533a ","1562"],["1564","\u5f20\u5e97\u533a ","1562"],["1565","\u535a\u5c71\u533a ","1562"],["1566","\u4e34\u6dc4\u533a ","1562"],["1567","\u5468\u6751\u533a ","1562"],["1568","\u6853\u53f0\u53bf ","1562"],["1569","\u9ad8\u9752\u53bf ","1562"],["1570","\u6c82\u6e90\u53bf ","1562"],["1572","\u67a3\u5e84\u5e02 ","10"],["1573","\u5e02\u4e2d\u533a ","1572"],["1574","\u859b\u57ce\u533a ","1572"],["1575","\u5cc4\u57ce\u533a ","1572"],["1576","\u53f0\u513f\u5e84\u533a ","1572"],["1577","\u5c71\u4ead\u533a ","1572"],["1578","\u6ed5\u5dde\u5e02 ","1572"],["1580","\u4e1c\u8425\u5e02 ","10"],["1581","\u4e1c\u8425\u533a ","1580"],["1582","\u6cb3\u53e3\u533a ","1580"],["1583","\u57a6\u5229\u53bf ","1580"],["1584","\u5229\u6d25\u53bf ","1580"],["1585","\u5e7f\u9976\u53bf ","1580"],["1586","\u897f\u57ce\u533a ","1580"],["1587","\u4e1c\u57ce\u533a ","1580"],["1589","\u70df\u53f0\u5e02 ","10"],["1590","\u829d\u7f58\u533a ","1589"],["1591","\u798f\u5c71\u533a ","1589"],["1592","\u725f\u5e73\u533a ","1589"],["1593","\u83b1\u5c71\u533a ","1589"],["1594","\u957f\u5c9b\u53bf ","1589"],["1595","\u9f99\u53e3\u5e02 ","1589"],["1596","\u83b1\u9633\u5e02 ","1589"],["1597","\u83b1\u5dde\u5e02 ","1589"],["1598","\u84ec\u83b1\u5e02 ","1589"],["1599","\u62db\u8fdc\u5e02 ","1589"],["1600","\u6816\u971e\u5e02 ","1589"],["1601","\u6d77\u9633\u5e02 ","1589"],["1603","\u6f4d\u574a\u5e02 ","10"],["1604","\u6f4d\u57ce\u533a ","1603"],["1605","\u5bd2\u4ead\u533a ","1603"],["1606","\u574a\u5b50\u533a ","1603"],["1607","\u594e\u6587\u533a ","1603"],["1608","\u4e34\u6710\u53bf ","1603"],["1609","\u660c\u4e50\u53bf ","1603"],["1610","\u5f00\u53d1\u533a ","1603"],["1611","\u9752\u5dde\u5e02 ","1603"],["1612","\u8bf8\u57ce\u5e02 ","1603"],["1613","\u5bff\u5149\u5e02 ","1603"],["1614","\u5b89\u4e18\u5e02 ","1603"],["1615","\u9ad8\u5bc6\u5e02 ","1603"],["1616","\u660c\u9091\u5e02 ","1603"],["1618","\u6d4e\u5b81\u5e02 ","10"],["1619","\u5e02\u4e2d\u533a ","1618"],["1620","\u4efb\u57ce\u533a ","1618"],["1621","\u5fae\u5c71\u53bf ","1618"],["1622","\u9c7c\u53f0\u53bf ","1618"],["1623","\u91d1\u4e61\u53bf ","1618"],["1624","\u5609\u7965\u53bf ","1618"],["1625","\u6c76\u4e0a\u53bf ","1618"],["1626","\u6cd7\u6c34\u53bf ","1618"],["1627","\u6881\u5c71\u53bf ","1618"],["1628","\u66f2\u961c\u5e02 ","1618"],["1629","\u5156\u5dde\u5e02 ","1618"],["1630","\u90b9\u57ce\u5e02 ","1618"],["1632","\u6cf0\u5b89\u5e02 ","10"],["1633","\u6cf0\u5c71\u533a ","1632"],["1634","\u5cb1\u5cb3\u533a ","1632"],["1635","\u5b81\u9633\u53bf ","1632"],["1636","\u4e1c\u5e73\u53bf ","1632"],["1637","\u65b0\u6cf0\u5e02 ","1632"],["1638","\u80a5\u57ce\u5e02 ","1632"],["1640","\u5a01\u6d77\u5e02 ","10"],["1641","\u73af\u7fe0\u533a ","1640"],["1642","\u6587\u767b\u5e02 ","1640"],["1643","\u8363\u6210\u5e02 ","1640"],["1644","\u4e73\u5c71\u5e02 ","1640"],["1646","\u65e5\u7167\u5e02 ","10"],["1647","\u4e1c\u6e2f\u533a ","1646"],["1648","\u5c9a\u5c71\u533a ","1646"],["1649","\u4e94\u83b2\u53bf ","1646"],["1650","\u8392\u53bf ","1646"],["1652","\u83b1\u829c\u5e02 ","10"],["1653","\u83b1\u57ce\u533a ","1652"],["1654","\u94a2\u57ce\u533a ","1652"],["1656","\u4e34\u6c82\u5e02 ","10"],["1657","\u5170\u5c71\u533a ","1656"],["1658","\u7f57\u5e84\u533a ","1656"],["1659","\u6cb3\u4e1c\u533a ","1656"],["1660","\u6c82\u5357\u53bf ","1656"],["1661","\u90ef\u57ce\u53bf ","1656"],["1662","\u6c82\u6c34\u53bf ","1656"],["1663","\u82cd\u5c71\u53bf ","1656"],["1665"," \u5e73\u9091\u53bf ","1656"],["1666","\u8392\u5357\u53bf ","1656"],["1667","\u8499\u9634\u53bf ","1656"],["1668","\u4e34\u6cad\u53bf ","1656"],["1670","\u5fb7\u5dde\u5e02 ","10"],["1671","\u5fb7\u57ce\u533a ","1670"],["1672","\u9675\u53bf ","1670"],["1673"," \u5b81\u6d25\u53bf ","1670"],["1674","\u5e86\u4e91\u53bf ","1670"],["1675","\u4e34\u9091\u53bf ","1670"],["1676","\u9f50\u6cb3\u53bf ","1670"],["1677","\u5e73\u539f\u53bf ","1670"],["1678","\u590f\u6d25\u53bf ","1670"],["1679","\u6b66\u57ce\u53bf ","1670"],["1680","\u5f00\u53d1\u533a ","1670"],["1681","\u4e50\u9675\u5e02 ","1670"],["1682","\u79b9\u57ce\u5e02 ","1670"],["1684","\u804a\u57ce\u5e02 ","10"],["1685","\u4e1c\u660c\u5e9c\u533a ","1684"],["1686","\u9633\u8c37\u53bf ","1684"],["1687","\u8398\u53bf ","1684"],["1688","\u830c\u5e73\u53bf ","1684"],["1689"," \u4e1c\u963f\u53bf ","1684"],["1690","\u51a0\u53bf ","1684"],["1691","\u9ad8\u5510\u53bf ","1684"],["1692","\u4e34\u6e05\u5e02 ","1684"],["1694","\u6ee8\u5dde\u5e02 ","10"],["1695","\u6ee8\u57ce\u533a ","1694"],["1696","\u60e0\u6c11\u53bf ","1694"],["1697","\u9633\u4fe1\u53bf ","1694"],["1698","\u65e0\u68e3\u53bf ","1694"],["1699","\u6cbe\u5316\u53bf ","1694"],["1700","\u535a\u5174\u53bf ","1694"],["1701","\u90b9\u5e73\u53bf ","1694"],["1703","\u83cf\u6cfd\u5e02 ","10"],["1704","\u7261\u4e39\u533a ","1703"],["1705","\u66f9\u53bf ","1703"],["1706","\u5355\u53bf ","1703"],["1707","\u6210\u6b66\u53bf ","1703"],["1708","\u5de8\u91ce\u53bf ","1703"],["1709","\u90d3\u57ce\u53bf ","1703"],["1710","\u9104\u57ce\u53bf ","1703"],["1711","\u5b9a\u9676\u53bf ","1703"],["1712","\u4e1c\u660e\u53bf ","1703"],["11","\u6cb3\u5357\u7701 ","0"],["1715","\u90d1\u5dde\u5e02 ","11"],["1716","\u4e2d\u539f\u533a ","1715"],["1717","\u4e8c\u4e03\u533a ","1715"],["1718","\u7ba1\u57ce\u56de\u65cf\u533a ","1715"],["1719","\u91d1\u6c34\u533a ","1715"],["1720","\u4e0a\u8857\u533a ","1715"],["1721","\u60e0\u6d4e\u533a ","1715"],["1722","\u4e2d\u725f\u53bf ","1715"],["1723","\u5de9\u4e49\u5e02 ","1715"],["1724","\u8365\u9633\u5e02 ","1715"],["1725","\u65b0\u5bc6\u5e02 ","1715"],["1726","\u65b0\u90d1\u5e02 ","1715"],["1727","\u767b\u5c01\u5e02 ","1715"],["1728","\u90d1\u4e1c\u65b0\u533a ","1715"],["1729","\u9ad8\u65b0\u533a ","1715"],["1731","\u5f00\u5c01\u5e02 ","11"],["1732","\u9f99\u4ead\u533a ","1731"],["1733","\u987a\u6cb3\u56de\u65cf\u533a ","1731"],["1734","\u9f13\u697c\u533a ","1731"],["1735","\u79b9\u738b\u53f0\u533a ","1731"],["1736","\u91d1\u660e\u533a ","1731"],["1737","\u675e\u53bf ","1731"],["1738","\u901a\u8bb8\u53bf ","1731"],["1739","\u5c09\u6c0f\u53bf ","1731"],["1740","\u5f00\u5c01\u53bf ","1731"],["1741","\u5170\u8003\u53bf ","1731"],["1743","\u6d1b\u9633\u5e02 ","11"],["1744","\u8001\u57ce\u533a ","1743"],["1745","\u897f\u5de5\u533a ","1743"],["1746","\u5edb\u6cb3\u56de\u65cf\u533a ","1743"],["1747","\u6da7\u897f\u533a ","1743"],["1748","\u5409\u5229\u533a ","1743"],["1749","\u6d1b\u9f99\u533a ","1743"],["1750","\u5b5f\u6d25\u53bf ","1743"],["1751","\u65b0\u5b89\u53bf ","1743"],["1752","\u683e\u5ddd\u53bf ","1743"],["1753","\u5d69\u53bf ","1743"],["1754","\u6c5d\u9633\u53bf ","1743"],["1755","\u5b9c\u9633\u53bf ","1743"],["1756","\u6d1b\u5b81\u53bf ","1743"],["1757","\u4f0a\u5ddd\u53bf ","1743"],["1758","\u5043\u5e08\u5e02 ","1743"],["1759","\u9ad8\u65b0\u533a ","1743"],["1761","\u5e73\u9876\u5c71\u5e02 ","11"],["1762","\u65b0\u534e\u533a ","1761"],["1763","\u536b\u4e1c\u533a ","1761"],["1764","\u77f3\u9f99\u533a ","1761"],["1765","\u6e5b\u6cb3\u533a ","1761"],["1766","\u5b9d\u4e30\u53bf ","1761"],["1767","\u53f6\u53bf ","1761"],["1768","\u9c81\u5c71\u53bf ","1761"],["1769"," \u90cf\u53bf ","1761"],["1770","\u821e\u94a2\u5e02 ","1761"],["1771","\u6c5d\u5dde\u5e02 ","1761"],["1773","\u5b89\u9633\u5e02 ","11"],["1774","\u6587\u5cf0\u533a ","1773"],["1775","\u5317\u5173\u533a ","1773"],["1776","\u6bb7\u90fd\u533a ","1773"],["1777","\u9f99\u5b89\u533a ","1773"],["1778","\u5b89\u9633\u53bf ","1773"],["1779","\u6c64\u9634\u53bf ","1773"],["1780","\u6ed1\u53bf ","1773"],["1781","\u5185\u9ec4\u53bf ","1773"],["1782","\u6797\u5dde\u5e02 ","1773"],["1784","\u9e64\u58c1\u5e02 ","11"],["1785","\u9e64\u5c71\u533a ","1784"],["1786","\u5c71\u57ce\u533a ","1784"],["1787","\u6dc7\u6ee8\u533a ","1784"],["1788","\u6d5a\u53bf ","1784"],["1789","\u6dc7\u53bf ","1784"],["2054","\u6d4f\u9633\u5e02 ","2045"],["2056","\u682a\u6d32\u5e02 ","13"],["2057","\u8377\u5858\u533a ","2056"],["2058","\u82a6\u6dde\u533a ","2056"],["2059","\u77f3\u5cf0\u533a ","2056"],["2060","\u5929\u5143\u533a ","2056"],["2061","\u682a\u6d32\u53bf ","2056"],["2062","\u6538\u53bf ","2056"],["2063","\u8336\u9675\u53bf ","2056"],["2064"," \u708e\u9675\u53bf ","2056"],["2065","\u91b4\u9675\u5e02 ","2056"],["2067","\u6e58\u6f6d\u5e02 ","13"],["2068","\u96e8\u6e56\u533a ","2067"],["2069","\u5cb3\u5858\u533a ","2067"],["2070","\u6e58\u6f6d\u53bf ","2067"],["2071","\u6e58\u4e61\u5e02 ","2067"],["2072","\u97f6\u5c71\u5e02 ","2067"],["2074","\u8861\u9633\u5e02 ","13"],["2075","\u73e0\u6656\u533a ","2074"],["2076","\u96c1\u5cf0\u533a ","2074"],["2077","\u77f3\u9f13\u533a ","2074"],["2078","\u84b8\u6e58\u533a ","2074"],["2079","\u5357\u5cb3\u533a ","2074"],["2080","\u8861\u9633\u53bf ","2074"],["2081","\u8861\u5357\u53bf ","2074"],["2082","\u8861\u5c71\u53bf ","2074"],["2083","\u8861\u4e1c\u53bf ","2074"],["2084","\u7941\u4e1c\u53bf ","2074"],["2085","\u8012\u9633\u5e02 ","2074"],["2086","\u5e38\u5b81\u5e02 ","2074"],["2088","\u90b5\u9633\u5e02 ","13"],["2089","\u53cc\u6e05\u533a ","2088"],["2090","\u5927\u7965\u533a ","2088"],["2091","\u5317\u5854\u533a ","2088"],["2092","\u90b5\u4e1c\u53bf ","2088"],["2093","\u65b0\u90b5\u53bf ","2088"],["2094","\u90b5\u9633\u53bf ","2088"],["2095","\u9686\u56de\u53bf ","2088"],["2096","\u6d1e\u53e3\u53bf ","2088"],["2097","\u7ee5\u5b81\u53bf ","2088"],["2098","\u65b0\u5b81\u53bf ","2088"],["2099","\u57ce\u6b65\u82d7\u65cf\u81ea\u6cbb\u53bf ","2088"],["2100","\u6b66\u5188\u5e02 ","2088"],["2102","\u5cb3\u9633\u5e02 ","13"],["2103","\u5cb3\u9633\u697c\u533a ","2102"],["2104","\u4e91\u6eaa\u533a ","2102"],["2105","\u541b\u5c71\u533a ","2102"],["2106","\u5cb3\u9633\u53bf ","2102"],["2107","\u534e\u5bb9\u53bf ","2102"],["2108","\u6e58\u9634\u53bf ","2102"],["2109","\u5e73\u6c5f\u53bf ","2102"],["2110","\u6c68\u7f57\u5e02 ","2102"],["2111","\u4e34\u6e58\u5e02 ","2102"],["2113","\u5e38\u5fb7\u5e02 ","13"],["2114","\u6b66\u9675\u533a ","2113"],["2115","\u9f0e\u57ce\u533a ","2113"],["2116","\u5b89\u4e61\u53bf ","2113"],["2117","\u6c49\u5bff\u53bf ","2113"],["2118","\u6fa7\u53bf ","2113"],["2119","\u4e34\u6fa7\u53bf ","2113"],["2120"," \u6843\u6e90\u53bf ","2113"],["2254","\u6c5f\u95e8\u5e02 ","14"],["2255","\u84ec\u6c5f\u533a ","2254"],["2256","\u6c5f\u6d77\u533a ","2254"],["2257","\u65b0\u4f1a\u533a ","2254"],["2258","\u53f0\u5c71\u5e02 ","2254"],["2259","\u5f00\u5e73\u5e02 ","2254"],["2260","\u9e64\u5c71\u5e02 ","2254"],["2261","\u6069\u5e73\u5e02 ","2254"],["2263","\u6e5b\u6c5f\u5e02 ","14"],["2264","\u8d64\u574e\u533a ","2263"],["2265","\u971e\u5c71\u533a ","2263"],["2266","\u5761\u5934\u533a ","2263"],["2267","\u9ebb\u7ae0\u533a ","2263"],["2268","\u9042\u6eaa\u53bf ","2263"],["2269","\u5f90\u95fb\u53bf ","2263"],["2270","\u5ec9\u6c5f\u5e02 ","2263"],["2271","\u96f7\u5dde\u5e02 ","2263"],["2272","\u5434\u5ddd\u5e02 ","2263"],["2274","\u8302\u540d\u5e02 ","14"],["2275","\u8302\u5357\u533a ","2274"],["2276","\u8302\u6e2f\u533a ","2274"],["2277","\u7535\u767d\u53bf ","2274"],["2278","\u9ad8\u5dde\u5e02 ","2274"],["2279","\u5316\u5dde\u5e02 ","2274"],["2280","\u4fe1\u5b9c\u5e02 ","2274"],["2282","\u8087\u5e86\u5e02 ","14"],["2283","\u7aef\u5dde\u533a ","2282"],["2284","\u9f0e\u6e56\u533a ","2282"],["2285","\u5e7f\u5b81\u53bf ","2282"],["2286","\u6000\u96c6\u53bf ","2282"],["2287","\u5c01\u5f00\u53bf ","2282"],["2288","\u5fb7\u5e86\u53bf ","2282"],["2289","\u9ad8\u8981\u5e02 ","2282"],["2290","\u56db\u4f1a\u5e02 ","2282"],["2292","\u60e0\u5dde\u5e02 ","14"],["2293","\u60e0\u57ce\u533a ","2292"],["2294","\u60e0\u9633\u533a ","2292"],["2295","\u535a\u7f57\u53bf ","2292"],["2296","\u60e0\u4e1c\u53bf ","2292"],["2297","\u9f99\u95e8\u53bf ","2292"],["2299","\u6885\u5dde\u5e02 ","14"],["2300","\u6885\u6c5f\u533a ","2299"],["2301","\u6885\u53bf ","2299"],["2302"," \u5927\u57d4\u53bf ","2299"],["2303","\u4e30\u987a\u53bf ","2299"],["2304","\u4e94\u534e\u53bf ","2299"],["2305","\u5e73\u8fdc\u53bf ","2299"],["2306","\u8549\u5cad\u53bf ","2299"],["2307","\u5174\u5b81\u5e02 ","2299"],["2309","\u6c55\u5c3e\u5e02 ","14"],["2310","\u57ce\u533a ","2309"],["2311","\u6d77\u4e30\u53bf ","2309"],["2312","\u9646\u6cb3\u53bf ","2309"],["2313","\u9646\u4e30\u5e02 ","2309"],["2315","\u6cb3\u6e90\u5e02 ","14"],["2316","\u6e90\u57ce\u533a ","2315"],["2317","\u7d2b\u91d1\u53bf ","2315"],["2121","\u77f3\u95e8\u53bf ","2113"],["2122","\u6d25\u5e02\u5e02 ","2113"],["2124","\u5f20\u5bb6\u754c\u5e02 ","13"],["2125","\u6c38\u5b9a\u533a ","2124"],["2126","\u6b66\u9675\u6e90\u533a ","2124"],["2127","\u6148\u5229\u53bf ","2124"],["2128","\u6851\u690d\u53bf ","2124"],["2130","\u76ca\u9633\u5e02 ","13"],["2131","\u8d44\u9633\u533a ","2130"],["2132","\u8d6b\u5c71\u533a ","2130"],["2133","\u5357\u53bf ","2130"],["2134","\u6843\u6c5f\u53bf ","2130"],["2135","\u5b89\u5316\u53bf ","2130"],["2136","\u6c85\u6c5f\u5e02 ","2130"],["2138","\u90f4\u5dde\u5e02 ","13"],["2139","\u5317\u6e56\u533a ","2138"],["2140","\u82cf\u4ed9\u533a ","2138"],["2141","\u6842\u9633\u53bf ","2138"],["2142","\u5b9c\u7ae0\u53bf ","2138"],["2143","\u6c38\u5174\u53bf ","2138"],["2144","\u5609\u79be\u53bf ","2138"],["2145","\u4e34\u6b66\u53bf ","2138"],["2146","\u6c5d\u57ce\u53bf ","2138"],["2147","\u6842\u4e1c\u53bf ","2138"],["2148","\u5b89\u4ec1\u53bf ","2138"],["2149","\u8d44\u5174\u5e02 ","2138"],["2151","\u6c38\u5dde\u5e02 ","13"],["2152","\u96f6\u9675\u533a ","2151"],["2153","\u51b7\u6c34\u6ee9\u533a ","2151"],["2154","\u7941\u9633\u53bf ","2151"],["2155","\u4e1c\u5b89\u53bf ","2151"],["2156","\u53cc\u724c\u53bf ","2151"],["2157","\u9053\u53bf ","2151"],["2158","\u6c5f\u6c38\u53bf ","2151"],["2159","\u5b81\u8fdc\u53bf ","2151"],["2160","\u84dd\u5c71\u53bf ","2151"],["2161","\u65b0\u7530\u53bf ","2151"],["2162","\u6c5f\u534e\u7476\u65cf\u81ea\u6cbb\u53bf ","2151"],["2164","\u6000\u5316\u5e02 ","13"],["2165","\u9e64\u57ce\u533a ","2164"],["2166","\u4e2d\u65b9\u53bf ","2164"],["2167","\u6c85\u9675\u53bf ","2164"],["2168","\u8fb0\u6eaa\u53bf ","2164"],["2169","\u6e86\u6d66\u53bf ","2164"],["2170","\u4f1a\u540c\u53bf ","2164"],["2171","\u9ebb\u9633\u82d7\u65cf\u81ea\u6cbb\u53bf ","2164"],["2172","\u65b0\u6643\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2173","\u82b7\u6c5f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2174","\u9756\u5dde\u82d7\u65cf\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2175","\u901a\u9053\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2176","\u6d2a\u6c5f\u5e02 ","2164"],["2178","\u5a04\u5e95\u5e02 ","13"],["2179","\u5a04\u661f\u533a ","2178"],["2180","\u53cc\u5cf0\u53bf ","2178"],["2181","\u65b0\u5316\u53bf ","2178"],["2182","\u51b7\u6c34\u6c5f\u5e02 ","2178"],["2183","\u6d9f\u6e90\u5e02 ","2178"],["2185","\u6e58\u897f\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","13"],["2186","\u5409\u9996\u5e02 ","2185"],["2187","\u6cf8\u6eaa\u53bf ","2185"],["2188","\u51e4\u51f0\u53bf ","2185"],["2189","\u82b1\u57a3\u53bf ","2185"],["2190","\u4fdd\u9756\u53bf ","2185"],["2191","\u53e4\u4e08\u53bf ","2185"],["2192","\u6c38\u987a\u53bf ","2185"],["2193","\u9f99\u5c71\u53bf ","2185"],["14","\u5e7f\u4e1c\u7701 ","0"],["2196","\u5e7f\u5dde\u5e02 ","14"],["2197","\u8354\u6e7e\u533a ","2196"],["2198","\u8d8a\u79c0\u533a ","2196"],["2199","\u6d77\u73e0\u533a ","2196"],["2200","\u5929\u6cb3\u533a ","2196"],["2201","\u767d\u4e91\u533a ","2196"],["2202","\u9ec4\u57d4\u533a ","2196"],["2203","\u756a\u79ba\u533a ","2196"],["2204","\u82b1\u90fd\u533a ","2196"],["2205","\u5357\u6c99\u533a ","2196"],["2206","\u841d\u5c97\u533a ","2196"],["2207","\u589e\u57ce\u5e02 ","2196"],["2208","\u4ece\u5316\u5e02 ","2196"],["2209","\u4e1c\u5c71\u533a ","2196"],["2211","\u97f6\u5173\u5e02 ","14"],["2212","\u6b66\u6c5f\u533a ","2211"],["2213","\u6d48\u6c5f\u533a ","2211"],["2214","\u66f2\u6c5f\u533a ","2211"],["2215","\u59cb\u5174\u53bf ","2211"],["2216","\u4ec1\u5316\u53bf ","2211"],["2217","\u7fc1\u6e90\u53bf ","2211"],["2218","\u4e73\u6e90\u7476\u65cf\u81ea\u6cbb\u53bf ","2211"],["2219","\u65b0\u4e30\u53bf ","2211"],["2220","\u4e50\u660c\u5e02 ","2211"],["2221","\u5357\u96c4\u5e02 ","2211"],["2223","\u6df1\u5733\u5e02 ","14"],["2224","\u7f57\u6e56\u533a ","2223"],["2225","\u798f\u7530\u533a ","2223"],["2226","\u5357\u5c71\u533a ","2223"],["2227","\u5b9d\u5b89\u533a ","2223"],["2228","\u9f99\u5c97\u533a ","2223"],["2229","\u76d0\u7530\u533a ","2223"],["2231","\u73e0\u6d77\u5e02 ","14"],["2232","\u9999\u6d32\u533a ","2231"],["2233","\u6597\u95e8\u533a ","2231"],["2234","\u91d1\u6e7e\u533a ","2231"],["2235","\u91d1\u5510\u533a ","2231"],["2236","\u5357\u6e7e\u533a ","2231"],["2238","\u6c55\u5934\u5e02 ","14"],["2239","\u9f99\u6e56\u533a ","2238"],["2240","\u91d1\u5e73\u533a ","2238"],["2241","\u6fe0\u6c5f\u533a ","2238"],["2242","\u6f6e\u9633\u533a ","2238"],["2243","\u6f6e\u5357\u533a ","2238"],["2244","\u6f84\u6d77\u533a ","2238"],["2245","\u5357\u6fb3\u53bf ","2238"],["2247","\u4f5b\u5c71\u5e02 ","14"],["2248","\u7985\u57ce\u533a ","2247"],["2249","\u5357\u6d77\u533a ","2247"],["2250","\u987a\u5fb7\u533a ","2247"],["2251","\u4e09\u6c34\u533a ","2247"],["2252","\u9ad8\u660e\u533a ","2247"],["1856","\u5185\u4e61\u53bf ","1849"],["1857","\u6dc5\u5ddd\u53bf ","1849"],["1858","\u793e\u65d7\u53bf ","1849"],["1859","\u5510\u6cb3\u53bf ","1849"],["1860","\u65b0\u91ce\u53bf ","1849"],["1861","\u6850\u67cf\u53bf ","1849"],["1862","\u9093\u5dde\u5e02 ","1849"],["1864","\u5546\u4e18\u5e02 ","11"],["1865","\u6881\u56ed\u533a ","1864"],["1866","\u7762\u9633\u533a ","1864"],["1867","\u6c11\u6743\u53bf ","1864"],["1868","\u7762\u53bf ","1864"],["1869","\u5b81\u9675\u53bf ","1864"],["1870","\u67d8\u57ce\u53bf ","1864"],["1871","\u865e\u57ce\u53bf ","1864"],["1872","\u590f\u9091\u53bf ","1864"],["1873","\u6c38\u57ce\u5e02 ","1864"],["1875","\u4fe1\u9633\u5e02 ","11"],["1876","\u6d49\u6cb3\u533a ","1875"],["1877","\u5e73\u6865\u533a ","1875"],["1878","\u7f57\u5c71\u53bf ","1875"],["1879","\u5149\u5c71\u53bf ","1875"],["1880","\u65b0\u53bf ","1875"],["1881"," \u5546\u57ce\u53bf ","1875"],["1882","\u56fa\u59cb\u53bf ","1875"],["1883","\u6f62\u5ddd\u53bf ","1875"],["1884","\u6dee\u6ee8\u53bf ","1875"],["1885","\u606f\u53bf ","1875"],["1887","\u5468\u53e3\u5e02 ","11"],["1888","\u5ddd\u6c47\u533a ","1887"],["1889","\u6276\u6c9f\u53bf ","1887"],["1890","\u897f\u534e\u53bf ","1887"],["1891","\u5546\u6c34\u53bf ","1887"],["1892","\u6c88\u4e18\u53bf ","1887"],["1893","\u90f8\u57ce\u53bf ","1887"],["1894","\u6dee\u9633\u53bf ","1887"],["1895","\u592a\u5eb7\u53bf ","1887"],["1896","\u9e7f\u9091\u53bf ","1887"],["1897","\u9879\u57ce\u5e02 ","1887"],["1899","\u9a7b\u9a6c\u5e97\u5e02 ","11"],["1900","\u9a7f\u57ce\u533a ","1899"],["1901","\u897f\u5e73\u53bf ","1899"],["1902","\u4e0a\u8521\u53bf ","1899"],["1903","\u5e73\u8206\u53bf ","1899"],["1904","\u6b63\u9633\u53bf ","1899"],["1905","\u786e\u5c71\u53bf ","1899"],["1906","\u6ccc\u9633\u53bf ","1899"],["1907","\u6c5d\u5357\u53bf ","1899"],["1908","\u9042\u5e73\u53bf ","1899"],["1909","\u65b0\u8521\u53bf ","1899"],["12","\u6e56\u5317\u7701 ","0"],["1912","\u6b66\u6c49\u5e02 ","12"],["1913","\u6c5f\u5cb8\u533a ","1912"],["1914","\u6c5f\u6c49\u533a ","1912"],["1915","\u785a\u53e3\u533a ","1912"],["1916","\u6c49\u9633\u533a ","1912"],["1917","\u6b66\u660c\u533a ","1912"],["1918","\u9752\u5c71\u533a ","1912"],["1919","\u6d2a\u5c71\u533a ","1912"],["1920","\u4e1c\u897f\u6e56\u533a ","1912"],["1921","\u6c49\u5357\u533a ","1912"],["1922","\u8521\u7538\u533a ","1912"],["1923","\u6c5f\u590f\u533a ","1912"],["1924","\u9ec4\u9642\u533a ","1912"],["1925","\u65b0\u6d32\u533a ","1912"],["1927","\u9ec4\u77f3\u5e02 ","12"],["1928","\u9ec4\u77f3\u6e2f\u533a ","1927"],["1929","\u897f\u585e\u5c71\u533a ","1927"],["1930","\u4e0b\u9646\u533a ","1927"],["1931","\u94c1\u5c71\u533a ","1927"],["1932","\u9633\u65b0\u53bf ","1927"],["1933","\u5927\u51b6\u5e02 ","1927"],["1935","\u5341\u5830\u5e02 ","12"],["1936","\u8305\u7bad\u533a ","1935"],["1937","\u5f20\u6e7e\u533a ","1935"],["1938","\u90e7\u53bf ","1935"],["1939","\u90e7\u897f\u53bf ","1935"],["1940","\u7af9\u5c71\u53bf ","1935"],["1941","\u7af9\u6eaa\u53bf ","1935"],["1942","\u623f\u53bf ","1935"],["1943","\u4e39\u6c5f\u53e3\u5e02 ","1935"],["1944","\u57ce\u533a ","1935"],["1946","\u5b9c\u660c\u5e02 ","12"],["1947","\u897f\u9675\u533a ","1946"],["1948","\u4f0d\u5bb6\u5c97\u533a ","1946"],["1949","\u70b9\u519b\u533a ","1946"],["1950","\u7307\u4ead\u533a ","1946"],["1951","\u5937\u9675\u533a ","1946"],["1952","\u8fdc\u5b89\u53bf ","1946"],["1953","\u5174\u5c71\u53bf ","1946"],["1954","\u79ed\u5f52\u53bf ","1946"],["1955","\u957f\u9633\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","1946"],["1956","\u4e94\u5cf0\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","1946"],["1957","\u845b\u6d32\u575d\u533a ","1946"],["1958","\u5f00\u53d1\u533a ","1946"],["1959","\u5b9c\u90fd\u5e02 ","1946"],["1960","\u5f53\u9633\u5e02 ","1946"],["1961","\u679d\u6c5f\u5e02 ","1946"],["1963","\u8944\u6a0a\u5e02 ","12"],["1964","\u8944\u57ce\u533a ","1963"],["1965","\u6a0a\u57ce\u533a ","1963"],["1966","\u8944\u9633\u533a ","1963"],["1967","\u5357\u6f33\u53bf ","1963"],["1968","\u8c37\u57ce\u53bf ","1963"],["1969","\u4fdd\u5eb7\u53bf ","1963"],["1970","\u8001\u6cb3\u53e3\u5e02 ","1963"],["1971","\u67a3\u9633\u5e02 ","1963"],["1972","\u5b9c\u57ce\u5e02 ","1963"],["1974","\u9102\u5dde\u5e02 ","12"],["1975","\u6881\u5b50\u6e56\u533a ","1974"],["1976","\u534e\u5bb9\u533a ","1974"],["1977","\u9102\u57ce\u533a ","1974"],["1979","\u8346\u95e8\u5e02 ","12"],["1980","\u4e1c\u5b9d\u533a ","1979"],["1981","\u6387\u5200\u533a ","1979"],["1982","\u4eac\u5c71\u53bf ","1979"],["1983","\u6c99\u6d0b\u53bf ","1979"],["1984","\u949f\u7965\u5e02 ","1979"],["1986","\u5b5d\u611f\u5e02 ","12"],["1987","\u5b5d\u5357\u533a ","1986"],["1988","\u5b5d\u660c\u53bf ","1986"],["1989","\u5927\u609f\u53bf ","1986"],["1990","\u4e91\u68a6\u53bf ","1986"],["1991","\u5e94\u57ce\u5e02 ","1986"],["1992","\u5b89\u9646\u5e02 ","1986"],["1993","\u6c49\u5ddd\u5e02 ","1986"],["1995","\u8346\u5dde\u5e02 ","12"],["1996","\u6c99\u5e02\u533a ","1995"],["1997","\u8346\u5dde\u533a ","1995"],["1998","\u516c\u5b89\u53bf ","1995"],["1999","\u76d1\u5229\u53bf ","1995"],["2000","\u6c5f\u9675\u53bf ","1995"],["2001","\u77f3\u9996\u5e02 ","1995"],["2002","\u6d2a\u6e56\u5e02 ","1995"],["2003","\u677e\u6ecb\u5e02 ","1995"],["2005","\u9ec4\u5188\u5e02 ","12"],["2006","\u9ec4\u5dde\u533a ","2005"],["2007","\u56e2\u98ce\u53bf ","2005"],["2008","\u7ea2\u5b89\u53bf ","2005"],["2009","\u7f57\u7530\u53bf ","2005"],["2010","\u82f1\u5c71\u53bf ","2005"],["2011","\u6d60\u6c34\u53bf ","2005"],["2012","\u8572\u6625\u53bf ","2005"],["2013","\u9ec4\u6885\u53bf ","2005"],["2014","\u9ebb\u57ce\u5e02 ","2005"],["2015","\u6b66\u7a74\u5e02 ","2005"],["2017","\u54b8\u5b81\u5e02 ","12"],["2018","\u54b8\u5b89\u533a ","2017"],["2019","\u5609\u9c7c\u53bf ","2017"],["2020","\u901a\u57ce\u53bf ","2017"],["2021","\u5d07\u9633\u53bf ","2017"],["2022","\u901a\u5c71\u53bf ","2017"],["2023","\u8d64\u58c1\u5e02 ","2017"],["2024","\u6e29\u6cc9\u57ce\u533a ","2017"],["2026","\u968f\u5dde\u5e02 ","12"],["2027","\u66fe\u90fd\u533a ","2026"],["2028","\u5e7f\u6c34\u5e02 ","2026"],["2030","\u6069\u65bd\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","12"],["2031","\u6069\u65bd\u5e02 ","2030"],["2032","\u5229\u5ddd\u5e02 ","2030"],["2033","\u5efa\u59cb\u53bf ","2030"],["2034","\u5df4\u4e1c\u53bf ","2030"],["2035","\u5ba3\u6069\u53bf ","2030"],["2036","\u54b8\u4e30\u53bf ","2030"],["2037","\u6765\u51e4\u53bf ","2030"],["2038","\u9e64\u5cf0\u53bf ","2030"],["2040"," \u4ed9\u6843\u5e02 ","12"],["2041","\u6f5c\u6c5f\u5e02 ","12"],["2042","\u5929\u95e8\u5e02 ","12"],["2043","\u795e\u519c\u67b6\u6797\u533a ","12"],["13","\u6e56\u5357\u7701 ","0"],["2045","\u957f\u6c99\u5e02 ","13"],["2046","\u8299\u84c9\u533a ","2045"],["2047","\u5929\u5fc3\u533a ","2045"],["2048","\u5cb3\u9e93\u533a ","2045"],["2049","\u5f00\u798f\u533a ","2045"],["2050","\u96e8\u82b1\u533a ","2045"],["2051","\u957f\u6c99\u53bf ","2045"],["2052","\u671b\u57ce\u53bf ","2045"],["2053","\u5b81\u4e61\u53bf ","2045"],["2782","\u4f1a\u7406\u53bf ","2777"],["2783","\u4f1a\u4e1c\u53bf ","2777"],["2784","\u5b81\u5357\u53bf ","2777"],["2785","\u666e\u683c\u53bf ","2777"],["2786","\u5e03\u62d6\u53bf ","2777"],["2787","\u91d1\u9633\u53bf ","2777"],["2788","\u662d\u89c9\u53bf ","2777"],["2789","\u559c\u5fb7\u53bf ","2777"],["2790","\u5195\u5b81\u53bf ","2777"],["2791","\u8d8a\u897f\u53bf ","2777"],["2792","\u7518\u6d1b\u53bf ","2777"],["2793","\u7f8e\u59d1\u53bf ","2777"],["2794","\u96f7\u6ce2\u53bf ","2777"],["17","\u8d35\u5dde\u7701 ","0"],["2797","\u8d35\u9633\u5e02 ","17"],["2798","\u5357\u660e\u533a ","2797"],["2799","\u4e91\u5ca9\u533a ","2797"],["2800","\u82b1\u6eaa\u533a ","2797"],["2801","\u4e4c\u5f53\u533a ","2797"],["2802","\u767d\u4e91\u533a ","2797"],["2803","\u5c0f\u6cb3\u533a ","2797"],["2804","\u5f00\u9633\u53bf ","2797"],["2805","\u606f\u70fd\u53bf ","2797"],["2806","\u4fee\u6587\u53bf ","2797"],["2807","\u91d1\u9633\u5f00\u53d1\u533a ","2797"],["2808","\u6e05\u9547\u5e02 ","2797"],["2810","\u516d\u76d8\u6c34\u5e02 ","17"],["2811","\u949f\u5c71\u533a ","2810"],["2812","\u516d\u679d\u7279\u533a ","2810"],["2813","\u6c34\u57ce\u53bf ","2810"],["2814","\u76d8\u53bf ","2810"],["2816","\u9075\u4e49\u5e02 ","17"],["2817","\u7ea2\u82b1\u5c97\u533a ","2816"],["2818","\u6c47\u5ddd\u533a ","2816"],["2819","\u9075\u4e49\u53bf ","2816"],["2820","\u6850\u6893\u53bf ","2816"],["2821","\u7ee5\u9633\u53bf ","2816"],["2822","\u6b63\u5b89\u53bf ","2816"],["2823","\u9053\u771f\u4ee1\u4f6c\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2816"],["2824","\u52a1\u5ddd\u4ee1\u4f6c\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2816"],["2825","\u51e4\u5188\u53bf ","2816"],["2826","\u6e44\u6f6d\u53bf ","2816"],["2827","\u4f59\u5e86\u53bf ","2816"],["2828","\u4e60\u6c34\u53bf ","2816"],["2829","\u8d64\u6c34\u5e02 ","2816"],["2830","\u4ec1\u6000\u5e02 ","2816"],["2832","\u5b89\u987a\u5e02 ","17"],["2833","\u897f\u79c0\u533a ","2832"],["2834","\u5e73\u575d\u53bf ","2832"],["2835","\u666e\u5b9a\u53bf ","2832"],["2836","\u9547\u5b81\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2832"],["2837","\u5173\u5cad\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2832"],["2838","\u7d2b\u4e91\u82d7\u65cf\u5e03\u4f9d\u65cf\u81ea\u6cbb\u53bf ","2832"],["2840","\u94dc\u4ec1\u5730\u533a ","17"],["2841","\u94dc\u4ec1\u5e02 ","2840"],["2842","\u6c5f\u53e3\u53bf ","2840"],["2843","\u7389\u5c4f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2840"],["2844","\u77f3\u9621\u53bf ","2840"],["2845","\u601d\u5357\u53bf ","2840"],["2846","\u5370\u6c5f\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2840"],["2847","\u5fb7\u6c5f\u53bf ","2840"],["2318","\u9f99\u5ddd\u53bf ","2315"],["2319","\u8fde\u5e73\u53bf ","2315"],["2320","\u548c\u5e73\u53bf ","2315"],["2321","\u4e1c\u6e90\u53bf ","2315"],["2323","\u9633\u6c5f\u5e02 ","14"],["2324","\u6c5f\u57ce\u533a ","2323"],["2325","\u9633\u897f\u53bf ","2323"],["2326","\u9633\u4e1c\u53bf ","2323"],["2327","\u9633\u6625\u5e02 ","2323"],["2329","\u6e05\u8fdc\u5e02 ","14"],["2330","\u6e05\u57ce\u533a ","2329"],["2331","\u4f5b\u5188\u53bf ","2329"],["2332","\u9633\u5c71\u53bf ","2329"],["2333","\u8fde\u5c71\u58ee\u65cf\u7476\u65cf\u81ea\u6cbb\u53bf ","2329"],["2334","\u8fde\u5357\u7476\u65cf\u81ea\u6cbb\u53bf ","2329"],["2335","\u6e05\u65b0\u53bf ","2329"],["2336","\u82f1\u5fb7\u5e02 ","2329"],["2337","\u8fde\u5dde\u5e02 ","2329"],["2339","\u4e1c\u839e\u5e02 ","14"],["2340","\u4e2d\u5c71\u5e02 ","14"],["2341","\u6f6e\u5dde\u5e02 ","14"],["2342","\u6e58\u6865\u533a ","2341"],["2343","\u6f6e\u5b89\u53bf ","2341"],["2344","\u9976\u5e73\u53bf ","2341"],["2345","\u67ab\u6eaa\u533a ","2341"],["2347","\u63ed\u9633\u5e02 ","14"],["2348","\u6995\u57ce\u533a ","2347"],["2349","\u63ed\u4e1c\u53bf ","2347"],["2350","\u63ed\u897f\u53bf ","2347"],["2351","\u60e0\u6765\u53bf ","2347"],["2352","\u666e\u5b81\u5e02 ","2347"],["2353","\u4e1c\u5c71\u533a ","2347"],["2355","\u4e91\u6d6e\u5e02 ","14"],["2356","\u4e91\u57ce\u533a ","2355"],["2357","\u65b0\u5174\u53bf ","2355"],["2358","\u90c1\u5357\u53bf ","2355"],["2359","\u4e91\u5b89\u53bf ","2355"],["2360","\u7f57\u5b9a\u5e02 ","2355"],["24","\u5e7f\u897f\u58ee\u65cf\u81ea\u6cbb\u533a ","0"],["2363"," \u5357\u5b81\u5e02 ","24"],["2364","\u5174\u5b81\u533a ","2363"],["2365","\u9752\u79c0\u533a ","2363"],["2366","\u6c5f\u5357\u533a ","2363"],["2367","\u897f\u4e61\u5858\u533a ","2363"],["2368","\u826f\u5e86\u533a ","2363"],["2369","\u9095\u5b81\u533a ","2363"],["2370","\u6b66\u9e23\u53bf ","2363"],["2371","\u9686\u5b89\u53bf ","2363"],["2372","\u9a6c\u5c71\u53bf ","2363"],["2373","\u4e0a\u6797\u53bf ","2363"],["2374","\u5bbe\u9633\u53bf ","2363"],["2375","\u6a2a\u53bf ","2363"],["2377","\u67f3\u5dde\u5e02 ","24"],["2378","\u57ce\u4e2d\u533a ","2377"],["2379","\u9c7c\u5cf0\u533a ","2377"],["2380","\u67f3\u5357\u533a ","2377"],["2381","\u67f3\u5317\u533a ","2377"],["2382","\u67f3\u6c5f\u53bf ","2377"],["2383","\u67f3\u57ce\u53bf ","2377"],["2384","\u9e7f\u5be8\u53bf ","2377"],["2385","\u878d\u5b89\u53bf ","2377"],["2386","\u878d\u6c34\u82d7\u65cf\u81ea\u6cbb\u53bf ","2377"],["2387","\u4e09\u6c5f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2377"],["2389","\u6842\u6797\u5e02 ","24"],["2390","\u79c0\u5cf0\u533a ","2389"],["2391","\u53e0\u5f69\u533a ","2389"],["2392","\u8c61\u5c71\u533a ","2389"],["2393","\u4e03\u661f\u533a ","2389"],["2394","\u96c1\u5c71\u533a ","2389"],["2395","\u9633\u6714\u53bf ","2389"],["2396","\u4e34\u6842\u53bf ","2389"],["2397","\u7075\u5ddd\u53bf ","2389"],["2398","\u5168\u5dde\u53bf ","2389"],["2399","\u5174\u5b89\u53bf ","2389"],["2400","\u6c38\u798f\u53bf ","2389"],["2401","\u704c\u9633\u53bf ","2389"],["2402","\u9f99\u80dc\u5404\u65cf\u81ea\u6cbb\u53bf ","2389"],["2403","\u8d44\u6e90\u53bf ","2389"],["2404","\u5e73\u4e50\u53bf ","2389"],["2405","\u8354\u6d66\u53bf ","2389"],["2406","\u606d\u57ce\u7476\u65cf\u81ea\u6cbb\u53bf ","2389"],["2408","\u68a7\u5dde\u5e02 ","24"],["2409","\u4e07\u79c0\u533a ","2408"],["2410","\u8776\u5c71\u533a ","2408"],["2411","\u957f\u6d32\u533a ","2408"],["2412","\u82cd\u68a7\u53bf ","2408"],["2413","\u85e4\u53bf ","2408"],["2414","\u8499\u5c71\u53bf ","2408"],["2415","\u5c91\u6eaa\u5e02 ","2408"],["2417","\u5317\u6d77\u5e02 ","24"],["2418","\u6d77\u57ce\u533a ","2417"],["2419","\u94f6\u6d77\u533a ","2417"],["2420","\u94c1\u5c71\u6e2f\u533a ","2417"],["2421","\u5408\u6d66\u53bf ","2417"],["2423","\u9632\u57ce\u6e2f\u5e02 ","24"],["2424","\u6e2f\u53e3\u533a ","2423"],["2425","\u9632\u57ce\u533a ","2423"],["2426","\u4e0a\u601d\u53bf ","2423"],["2427","\u4e1c\u5174\u5e02 ","2423"],["2429","\u94a6\u5dde\u5e02 ","24"],["2430","\u94a6\u5357\u533a ","2429"],["2431","\u94a6\u5317\u533a ","2429"],["2432","\u7075\u5c71\u53bf ","2429"],["2433","\u6d66\u5317\u53bf ","2429"],["2435","\u8d35\u6e2f\u5e02 ","24"],["2436","\u6e2f\u5317\u533a ","2435"],["2437","\u6e2f\u5357\u533a ","2435"],["2438","\u8983\u5858\u533a ","2435"],["2439","\u5e73\u5357\u53bf ","2435"],["2440","\u6842\u5e73\u5e02 ","2435"],["2442","\u7389\u6797\u5e02 ","24"],["2443","\u7389\u5dde\u533a ","2442"],["2444","\u5bb9\u53bf ","2442"],["2445","\u9646\u5ddd\u53bf ","2442"],["2446","\u535a\u767d\u53bf ","2442"],["2447","\u5174\u4e1a\u53bf ","2442"],["2448","\u5317\u6d41\u5e02 ","2442"],["2450","\u767e\u8272\u5e02 ","24"],["2451","\u53f3\u6c5f\u533a ","2450"],["2452","\u7530\u9633\u53bf ","2450"],["2453","\u7530\u4e1c\u53bf ","2450"],["2454","\u5e73\u679c\u53bf ","2450"],["2455","\u5fb7\u4fdd\u53bf ","2450"],["2456","\u9756\u897f\u53bf ","2450"],["2457","\u90a3\u5761\u53bf ","2450"],["2458","\u51cc\u4e91\u53bf ","2450"],["2459","\u4e50\u4e1a\u53bf ","2450"],["2460","\u7530\u6797\u53bf ","2450"],["2461","\u897f\u6797\u53bf ","2450"],["2462","\u9686\u6797\u5404\u65cf\u81ea\u6cbb\u53bf ","2450"],["2464","\u8d3a\u5dde\u5e02 ","24"],["2465","\u516b\u6b65\u533a ","2464"],["2466","\u662d\u5e73\u53bf ","2464"],["2467","\u949f\u5c71\u53bf ","2464"],["2468","\u5bcc\u5ddd\u7476\u65cf\u81ea\u6cbb\u53bf ","2464"],["2470","\u6cb3\u6c60\u5e02 ","24"],["2471","\u91d1\u57ce\u6c5f\u533a ","2470"],["2472","\u5357\u4e39\u53bf ","2470"],["2473","\u5929\u5ce8\u53bf ","2470"],["2474","\u51e4\u5c71\u53bf ","2470"],["2475","\u4e1c\u5170\u53bf ","2470"],["2476","\u7f57\u57ce\u4eeb\u4f6c\u65cf\u81ea\u6cbb\u53bf ","2470"],["2477","\u73af\u6c5f\u6bdb\u5357\u65cf\u81ea\u6cbb\u53bf ","2470"],["2478","\u5df4\u9a6c\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2479","\u90fd\u5b89\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2480","\u5927\u5316\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2481","\u5b9c\u5dde\u5e02 ","2470"],["2483","\u6765\u5bbe\u5e02 ","24"],["2484","\u5174\u5bbe\u533a ","2483"],["2485","\u5ffb\u57ce\u53bf ","2483"],["2486","\u8c61\u5dde\u53bf ","2483"],["2487","\u6b66\u5ba3\u53bf ","2483"],["2488","\u91d1\u79c0\u7476\u65cf\u81ea\u6cbb\u53bf ","2483"],["2489","\u5408\u5c71\u5e02 ","2483"],["2491","\u5d07\u5de6\u5e02 ","24"],["2492","\u6c5f\u5dde\u533a ","2491"],["2493","\u6276\u7ee5\u53bf ","2491"],["2494","\u5b81\u660e\u53bf ","2491"],["2495","\u9f99\u5dde\u53bf ","2491"],["2496","\u5927\u65b0\u53bf ","2491"],["2497","\u5929\u7b49\u53bf ","2491"],["2498","\u51ed\u7965\u5e02 ","2491"],["15","\u6d77\u5357\u7701 ","0"],["2501","\u6d77\u53e3\u5e02 ","15"],["2502","\u79c0\u82f1\u533a ","2501"],["2503","\u9f99\u534e\u533a ","2501"],["2504","\u743c\u5c71\u533a ","2501"],["2505","\u7f8e\u5170\u533a ","2501"],["2507","\u4e09\u4e9a\u5e02 ","15"],["2508","\u4e94\u6307\u5c71\u5e02 ","15"],["2509","\u743c\u6d77\u5e02 ","15"],["2510","\u510b\u5dde\u5e02 ","15"],["2511","\u6587\u660c\u5e02 ","15"],["2512","\u4e07\u5b81\u5e02 ","15"],["2513","\u4e1c\u65b9\u5e02 ","15"],["2514","\u5b9a\u5b89\u53bf ","15"],["2515","\u5c6f\u660c\u53bf ","15"],["2516","\u6f84\u8fc8\u53bf ","15"],["2517","\u4e34\u9ad8\u53bf ","15"],["2518","\u767d\u6c99\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2519","\u660c\u6c5f\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2520","\u4e50\u4e1c\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2521","\u9675\u6c34\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2522","\u4fdd\u4ead\u9ece\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","15"],["2523","\u743c\u4e2d\u9ece\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","15"],["2524","\u897f\u6c99\u7fa4\u5c9b ","15"],["2525","\u5357\u6c99\u7fa4\u5c9b ","15"],["2526","\u4e2d\u6c99\u7fa4\u5c9b\u7684\u5c9b\u7901\u53ca\u5176\u6d77\u57df ","15"],["31","\u91cd\u5e86 ","0"],["2529","\u4e07\u5dde\u533a ","31"],["2530"," \u6daa\u9675\u533a ","31"],["2531","\u6e1d\u4e2d\u533a ","31"],["2532","\u5927\u6e21\u53e3\u533a ","31"],["2533","\u6c5f\u5317\u533a ","31"],["2534","\u6c99\u576a\u575d\u533a ","31"],["2535","\u4e5d\u9f99\u5761\u533a ","31"],["2536","\u5357\u5cb8\u533a ","31"],["2537","\u5317\u789a\u533a ","31"],["2538","\u4e07\u76db\u533a ","31"],["2539","\u53cc\u6865\u533a ","31"],["2540","\u6e1d\u5317\u533a ","31"],["2541","\u5df4\u5357\u533a ","31"],["2542","\u9ed4\u6c5f\u533a ","31"],["2543","\u957f\u5bff\u533a ","31"],["2544","\u7da6\u6c5f\u53bf ","31"],["2545","\u6f7c\u5357\u53bf ","31"],["2546","\u94dc\u6881\u53bf ","31"],["2547","\u5927\u8db3\u53bf ","31"],["2548","\u8363\u660c\u53bf ","31"],["2549","\u74a7\u5c71\u53bf ","31"],["2550","\u6881\u5e73\u53bf ","31"],["2551","\u57ce\u53e3\u53bf ","31"],["2552","\u4e30\u90fd\u53bf ","31"],["2553","\u57ab\u6c5f\u53bf ","31"],["2554","\u6b66\u9686\u53bf ","31"],["2555","\u5fe0\u53bf ","31"],["2556","\u5f00\u53bf ","31"],["2557","\u4e91\u9633\u53bf ","31"],["2558","\u5949\u8282\u53bf ","31"],["2559","\u5deb\u5c71\u53bf ","31"],["2560","\u5deb\u6eaa\u53bf ","31"],["2561","\u77f3\u67f1\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","31"],["2562","\u79c0\u5c71\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","31"],["2563","\u9149\u9633\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","31"],["2564","\u5f6d\u6c34\u82d7\u65cf\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","31"],["2565","\u6c5f\u6d25\u533a ","31"],["2566","\u5408\u5ddd\u533a ","31"],["2567","\u6c38\u5ddd\u533a ","31"],["2568","\u5357\u5ddd\u533a ","31"],["16","\u56db\u5ddd\u7701 ","0"],["2571","\u6210\u90fd\u5e02 ","16"],["2572","\u9526\u6c5f\u533a ","2571"],["2573","\u9752\u7f8a\u533a ","2571"],["2574","\u91d1\u725b\u533a ","2571"],["2575","\u6b66\u4faf\u533a ","2571"],["2576","\u6210\u534e\u533a ","2571"],["2577","\u9f99\u6cc9\u9a7f\u533a ","2571"],["2578","\u9752\u767d\u6c5f\u533a ","2571"],["2579","\u65b0\u90fd\u533a ","2571"],["2580","\u6e29\u6c5f\u533a ","2571"],["2581","\u91d1\u5802\u53bf ","2571"],["2582","\u53cc\u6d41\u53bf ","2571"],["2583","\u90eb\u53bf ","2571"],["2584","\u5927\u9091\u53bf ","2571"],["2585","\u84b2\u6c5f\u53bf ","2571"],["2586","\u65b0\u6d25\u53bf ","2571"],["2587","\u90fd\u6c5f\u5830\u5e02 ","2571"],["2588","\u5f6d\u5dde\u5e02 ","2571"],["2589","\u909b\u5d03\u5e02 ","2571"],["2590","\u5d07\u5dde\u5e02 ","2571"],["2592","\u81ea\u8d21\u5e02 ","16"],["2593","\u81ea\u6d41\u4e95\u533a ","2592"],["2594","\u8d21\u4e95\u533a ","2592"],["2595","\u5927\u5b89\u533a ","2592"],["2596","\u6cbf\u6ee9\u533a ","2592"],["2597","\u8363\u53bf ","2592"],["2598"," \u5bcc\u987a\u53bf ","2592"],["2600","\u6500\u679d\u82b1\u5e02 ","16"],["2601","\u4e1c\u533a ","2600"],["2602","\u897f\u533a ","2600"],["2603","\u4ec1\u548c\u533a ","2600"],["2604","\u7c73\u6613\u53bf ","2600"],["2605","\u76d0\u8fb9\u53bf ","2600"],["2607","\u6cf8\u5dde\u5e02 ","16"],["2608","\u6c5f\u9633\u533a ","2607"],["2609","\u7eb3\u6eaa\u533a ","2607"],["2610","\u9f99\u9a6c\u6f6d\u533a ","2607"],["2611","\u6cf8\u53bf ","2607"],["2612","\u5408\u6c5f\u53bf ","2607"],["2613","\u53d9\u6c38\u53bf ","2607"],["2614","\u53e4\u853a\u53bf ","2607"],["2616","\u5fb7\u9633\u5e02 ","16"],["2617","\u65cc\u9633\u533a ","2616"],["2618","\u4e2d\u6c5f\u53bf ","2616"],["2619","\u7f57\u6c5f\u53bf ","2616"],["2620","\u5e7f\u6c49\u5e02 ","2616"],["2621","\u4ec0\u90a1\u5e02 ","2616"],["2622","\u7ef5\u7af9\u5e02 ","2616"],["2624","\u7ef5\u9633\u5e02 ","16"],["2625","\u6daa\u57ce\u533a ","2624"],["2626","\u6e38\u4ed9\u533a ","2624"],["2627","\u4e09\u53f0\u53bf ","2624"],["2628","\u76d0\u4ead\u53bf ","2624"],["2629","\u5b89\u53bf ","2624"],["2630"," \u6893\u6f7c\u53bf ","2624"],["2631","\u5317\u5ddd\u7f8c\u65cf\u81ea\u6cbb\u53bf ","2624"],["2632","\u5e73\u6b66\u53bf ","2624"],["2633","\u9ad8\u65b0\u533a ","2624"],["2634","\u6c5f\u6cb9\u5e02 ","2624"],["2636","\u5e7f\u5143\u5e02 ","16"],["2637","\u5229\u5dde\u533a ","2636"],["2638","\u5143\u575d\u533a ","2636"],["2639","\u671d\u5929\u533a ","2636"],["2640","\u65fa\u82cd\u53bf ","2636"],["2641","\u9752\u5ddd\u53bf ","2636"],["2642","\u5251\u9601\u53bf ","2636"],["2643","\u82cd\u6eaa\u53bf ","2636"],["2645","\u9042\u5b81\u5e02 ","16"],["2646","\u8239\u5c71\u533a ","2645"],["2647","\u5b89\u5c45\u533a ","2645"],["2648","\u84ec\u6eaa\u53bf ","2645"],["2649","\u5c04\u6d2a\u53bf ","2645"],["2650","\u5927\u82f1\u53bf ","2645"],["2652","\u5185\u6c5f\u5e02 ","16"],["2653","\u5e02\u4e2d\u533a ","2652"],["2654","\u4e1c\u5174\u533a ","2652"],["2655","\u5a01\u8fdc\u53bf ","2652"],["2656","\u8d44\u4e2d\u53bf ","2652"],["2657","\u9686\u660c\u53bf ","2652"],["2659","\u4e50\u5c71\u5e02 ","16"],["2660","\u5e02\u4e2d\u533a ","2659"],["2661","\u6c99\u6e7e\u533a ","2659"],["2662","\u4e94\u901a\u6865\u533a ","2659"],["2663","\u91d1\u53e3\u6cb3\u533a ","2659"],["2664","\u728d\u4e3a\u53bf ","2659"],["2665","\u4e95\u7814\u53bf ","2659"],["2666","\u5939\u6c5f\u53bf ","2659"],["2667","\u6c90\u5ddd\u53bf ","2659"],["2668","\u5ce8\u8fb9\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2659"],["2669","\u9a6c\u8fb9\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2659"],["2670","\u5ce8\u7709\u5c71\u5e02 ","2659"],["2672","\u5357\u5145\u5e02 ","16"],["2673","\u987a\u5e86\u533a ","2672"],["2674","\u9ad8\u576a\u533a ","2672"],["2675","\u5609\u9675\u533a ","2672"],["2676","\u5357\u90e8\u53bf ","2672"],["2677","\u8425\u5c71\u53bf ","2672"],["2678","\u84ec\u5b89\u53bf ","2672"],["2679","\u4eea\u9647\u53bf ","2672"],["2680","\u897f\u5145\u53bf ","2672"],["2681","\u9606\u4e2d\u5e02 ","2672"],["2683","\u7709\u5c71\u5e02 ","16"],["2684","\u4e1c\u5761\u533a ","2683"],["2685","\u4ec1\u5bff\u53bf ","2683"],["2686","\u5f6d\u5c71\u53bf ","2683"],["2687","\u6d2a\u96c5\u53bf ","2683"],["2688","\u4e39\u68f1\u53bf ","2683"],["2689","\u9752\u795e\u53bf ","2683"],["2691","\u5b9c\u5bbe\u5e02 ","16"],["2692","\u7fe0\u5c4f\u533a ","2691"],["2693","\u5b9c\u5bbe\u53bf ","2691"],["2694","\u5357\u6eaa\u53bf ","2691"],["2695","\u6c5f\u5b89\u53bf ","2691"],["2696","\u957f\u5b81\u53bf ","2691"],["2697","\u9ad8\u53bf ","2691"],["2698","\u73d9\u53bf ","2691"],["2699","\u7b60\u8fde\u53bf ","2691"],["2700","\u5174\u6587\u53bf ","2691"],["2701","\u5c4f\u5c71\u53bf ","2691"],["2703","\u5e7f\u5b89\u5e02 ","16"],["2704","\u5e7f\u5b89\u533a ","2703"],["2705","\u5cb3\u6c60\u53bf ","2703"],["2706","\u6b66\u80dc\u53bf ","2703"],["2707","\u90bb\u6c34\u53bf ","2703"],["2708","\u534e\u84e5\u5e02 ","2703"],["2709","\u5e02\u8f96\u533a ","2703"],["2711","\u8fbe\u5dde\u5e02 ","16"],["2712","\u901a\u5ddd\u533a ","2711"],["2713","\u8fbe\u53bf ","2711"],["2714","\u5ba3\u6c49\u53bf ","2711"],["2715","\u5f00\u6c5f\u53bf ","2711"],["2716","\u5927\u7af9\u53bf ","2711"],["2717","\u6e20\u53bf ","2711"],["2718"," \u4e07\u6e90\u5e02 ","2711"],["2720","\u96c5\u5b89\u5e02 ","16"],["2721","\u96e8\u57ce\u533a ","2720"],["2722","\u540d\u5c71\u53bf ","2720"],["2723","\u8365\u7ecf\u53bf ","2720"],["2724","\u6c49\u6e90\u53bf ","2720"],["2725","\u77f3\u68c9\u53bf ","2720"],["2726","\u5929\u5168\u53bf ","2720"],["2727","\u82a6\u5c71\u53bf ","2720"],["2728","\u5b9d\u5174\u53bf ","2720"],["2730","\u5df4\u4e2d\u5e02 ","16"],["2731","\u5df4\u5dde\u533a ","2730"],["2732","\u901a\u6c5f\u53bf ","2730"],["2733","\u5357\u6c5f\u53bf ","2730"],["2734","\u5e73\u660c\u53bf ","2730"],["2736","\u8d44\u9633\u5e02 ","16"],["2737","\u96c1\u6c5f\u533a ","2736"],["2738","\u5b89\u5cb3\u53bf ","2736"],["2739","\u4e50\u81f3\u53bf ","2736"],["2740","\u7b80\u9633\u5e02 ","2736"],["2742","\u963f\u575d\u85cf\u65cf\u7f8c\u65cf\u81ea\u6cbb\u5dde ","16"],["2743","\u6c76\u5ddd\u53bf ","2742"],["2744","\u7406\u53bf ","2742"],["2745","\u8302\u53bf ","2742"],["2746","\u677e\u6f58\u53bf ","2742"],["2747"," \u4e5d\u5be8\u6c9f\u53bf ","2742"],["2748","\u91d1\u5ddd\u53bf ","2742"],["2749","\u5c0f\u91d1\u53bf ","2742"],["2750","\u9ed1\u6c34\u53bf ","2742"],["2751","\u9a6c\u5c14\u5eb7\u53bf ","2742"],["2752","\u58e4\u5858\u53bf ","2742"],["2753","\u963f\u575d\u53bf ","2742"],["2754","\u82e5\u5c14\u76d6\u53bf ","2742"],["2755","\u7ea2\u539f\u53bf ","2742"],["2757","\u7518\u5b5c\u85cf\u65cf\u81ea\u6cbb\u5dde ","16"],["2758","\u5eb7\u5b9a\u53bf ","2757"],["2759","\u6cf8\u5b9a\u53bf ","2757"],["2760","\u4e39\u5df4\u53bf ","2757"],["2761","\u4e5d\u9f99\u53bf ","2757"],["2762","\u96c5\u6c5f\u53bf ","2757"],["2763","\u9053\u5b5a\u53bf ","2757"],["2764","\u7089\u970d\u53bf ","2757"],["2765","\u7518\u5b5c\u53bf ","2757"],["2766","\u65b0\u9f99\u53bf ","2757"],["2767","\u5fb7\u683c\u53bf ","2757"],["2768","\u767d\u7389\u53bf ","2757"],["2769","\u77f3\u6e20\u53bf ","2757"],["2770","\u8272\u8fbe\u53bf ","2757"],["2771","\u7406\u5858\u53bf ","2757"],["2772","\u5df4\u5858\u53bf ","2757"],["2773","\u4e61\u57ce\u53bf ","2757"],["2774","\u7a3b\u57ce\u53bf ","2757"],["2775","\u5f97\u8363\u53bf ","2757"],["2777","\u51c9\u5c71\u5f5d\u65cf\u81ea\u6cbb\u5dde ","16"],["2778","\u897f\u660c\u5e02 ","2777"],["2779","\u6728\u91cc\u85cf\u65cf\u81ea\u6cbb\u53bf ","2777"],["2780","\u76d0\u6e90\u53bf ","2777"],["2781","\u5fb7\u660c\u53bf ","2777"],["3046","\u9e64\u5e86\u53bf ","3034"],["3048","\u5fb7\u5b8f\u50a3\u65cf\u666f\u9887\u65cf\u81ea\u6cbb\u5dde ","18"],["3049","\u745e\u4e3d\u5e02 ","3048"],["3050","\u6f5e\u897f\u5e02 ","3048"],["3051","\u6881\u6cb3\u53bf ","3048"],["3052","\u76c8\u6c5f\u53bf ","3048"],["3053","\u9647\u5ddd\u53bf ","3048"],["3055","\u6012\u6c5f\u5088\u50f3\u65cf\u81ea\u6cbb\u5dde ","18"],["3056","\u6cf8\u6c34\u53bf ","3055"],["3057","\u798f\u8d21\u53bf ","3055"],["3058","\u8d21\u5c71\u72ec\u9f99\u65cf\u6012\u65cf\u81ea\u6cbb\u53bf ","3055"],["3059","\u5170\u576a\u767d\u65cf\u666e\u7c73\u65cf\u81ea\u6cbb\u53bf ","3055"],["3061","\u8fea\u5e86\u85cf\u65cf\u81ea\u6cbb\u5dde ","18"],["3062","\u9999\u683c\u91cc\u62c9\u53bf ","3061"],["3063","\u5fb7\u94a6\u53bf ","3061"],["3064","\u7ef4\u897f\u5088\u50f3\u65cf\u81ea\u6cbb\u53bf ","3061"],["25","\u897f\u85cf\u81ea\u6cbb\u533a ","0"],["3067","\u62c9\u8428\u5e02 ","25"],["3068","\u57ce\u5173\u533a ","3067"],["3069","\u6797\u5468\u53bf ","3067"],["3070","\u5f53\u96c4\u53bf ","3067"],["3071","\u5c3c\u6728\u53bf ","3067"],["3072","\u66f2\u6c34\u53bf ","3067"],["3073","\u5806\u9f99\u5fb7\u5e86\u53bf ","3067"],["3074","\u8fbe\u5b5c\u53bf ","3067"],["3075","\u58a8\u7af9\u5de5\u5361\u53bf ","3067"],["3077","\u660c\u90fd\u5730\u533a ","25"],["3078","\u660c\u90fd\u53bf ","3077"],["3079","\u6c5f\u8fbe\u53bf ","3077"],["3080","\u8d21\u89c9\u53bf ","3077"],["3081","\u7c7b\u4e4c\u9f50\u53bf ","3077"],["3082","\u4e01\u9752\u53bf ","3077"],["3083","\u5bdf\u96c5\u53bf ","3077"],["3084","\u516b\u5bbf\u53bf ","3077"],["3085","\u5de6\u8d21\u53bf ","3077"],["3086","\u8292\u5eb7\u53bf ","3077"],["3087","\u6d1b\u9686\u53bf ","3077"],["3088","\u8fb9\u575d\u53bf ","3077"],["3090","\u5c71\u5357\u5730\u533a ","25"],["3091","\u4e43\u4e1c\u53bf ","3090"],["3092","\u624e\u56ca\u53bf ","3090"],["3093","\u8d21\u560e\u53bf ","3090"],["3094","\u6851\u65e5\u53bf ","3090"],["3095","\u743c\u7ed3\u53bf ","3090"],["3096","\u66f2\u677e\u53bf ","3090"],["3097","\u63aa\u7f8e\u53bf ","3090"],["3098","\u6d1b\u624e\u53bf ","3090"],["3099","\u52a0\u67e5\u53bf ","3090"],["3100","\u9686\u5b50\u53bf ","3090"],["3101","\u9519\u90a3\u53bf ","3090"],["3102","\u6d6a\u5361\u5b50\u53bf ","3090"],["3104","\u65e5\u5580\u5219\u5730\u533a ","25"],["3105","\u65e5\u5580\u5219\u5e02 ","3104"],["3106","\u5357\u6728\u6797\u53bf ","3104"],["3107","\u6c5f\u5b5c\u53bf ","3104"],["3108","\u5b9a\u65e5\u53bf ","3104"],["3109","\u8428\u8fe6\u53bf ","3104"],["3110","\u62c9\u5b5c\u53bf ","3104"],["3111","\u6602\u4ec1\u53bf ","3104"],["3112","\u8c22\u901a\u95e8\u53bf ","3104"],["3247","\u6986\u6797\u5e02 ","19"],["3248","\u6986\u9633\u533a ","3247"],["3249","\u795e\u6728\u53bf ","3247"],["3250","\u5e9c\u8c37\u53bf ","3247"],["3251","\u6a2a\u5c71\u53bf ","3247"],["3252","\u9756\u8fb9\u53bf ","3247"],["3253","\u5b9a\u8fb9\u53bf ","3247"],["3254","\u7ee5\u5fb7\u53bf ","3247"],["3255","\u7c73\u8102\u53bf ","3247"],["3256","\u4f73\u53bf ","3247"],["3257","\u5434\u5821\u53bf ","3247"],["3258","\u6e05\u6da7\u53bf ","3247"],["3259","\u5b50\u6d32\u53bf ","3247"],["3261","\u5b89\u5eb7\u5e02 ","19"],["3262","\u6c49\u6ee8\u533a ","3261"],["3263","\u6c49\u9634\u53bf ","3261"],["3264","\u77f3\u6cc9\u53bf ","3261"],["3265","\u5b81\u9655\u53bf ","3261"],["3266","\u7d2b\u9633\u53bf ","3261"],["3267","\u5c9a\u768b\u53bf ","3261"],["3268","\u5e73\u5229\u53bf ","3261"],["3269","\u9547\u576a\u53bf ","3261"],["3270","\u65ec\u9633\u53bf ","3261"],["3271","\u767d\u6cb3\u53bf ","3261"],["3273","\u5546\u6d1b\u5e02 ","19"],["3274","\u5546\u5dde\u533a ","3273"],["3275","\u6d1b\u5357\u53bf ","3273"],["3276","\u4e39\u51e4\u53bf ","3273"],["3277","\u5546\u5357\u53bf ","3273"],["3278","\u5c71\u9633\u53bf ","3273"],["3279","\u9547\u5b89\u53bf ","3273"],["3280","\u67de\u6c34\u53bf ","3273"],["20","\u7518\u8083\u7701 ","0"],["3283","\u5170\u5dde\u5e02 ","20"],["3284","\u57ce\u5173\u533a ","3283"],["3285","\u4e03\u91cc\u6cb3\u533a ","3283"],["3286","\u897f\u56fa\u533a ","3283"],["3287","\u5b89\u5b81\u533a ","3283"],["3288","\u7ea2\u53e4\u533a ","3283"],["3289","\u6c38\u767b\u53bf ","3283"],["3290","\u768b\u5170\u53bf ","3283"],["3291","\u6986\u4e2d\u53bf ","3283"],["3293","\u5609\u5cea\u5173\u5e02 ","20"],["3294","\u91d1\u660c\u5e02 ","20"],["3295","\u91d1\u5ddd\u533a ","3294"],["3296","\u6c38\u660c\u53bf ","3294"],["3298","\u767d\u94f6\u5e02 ","20"],["3299","\u767d\u94f6\u533a ","3298"],["3300","\u5e73\u5ddd\u533a ","3298"],["3301","\u9756\u8fdc\u53bf ","3298"],["3302","\u4f1a\u5b81\u53bf ","3298"],["3303","\u666f\u6cf0\u53bf ","3298"],["3305","\u5929\u6c34\u5e02 ","20"],["3306","\u79e6\u5dde\u533a ","3305"],["3307","\u9ea6\u79ef\u533a ","3305"],["3308","\u6e05\u6c34\u53bf ","3305"],["3309","\u79e6\u5b89\u53bf ","3305"],["3310","\u7518\u8c37\u53bf ","3305"],["3113","\u767d\u6717\u53bf ","3104"],["3114","\u4ec1\u5e03\u53bf ","3104"],["3115","\u5eb7\u9a6c\u53bf ","3104"],["3116","\u5b9a\u7ed3\u53bf ","3104"],["3117","\u4ef2\u5df4\u53bf ","3104"],["3118","\u4e9a\u4e1c\u53bf ","3104"],["3119","\u5409\u9686\u53bf ","3104"],["3120","\u8042\u62c9\u6728\u53bf ","3104"],["3121","\u8428\u560e\u53bf ","3104"],["3122","\u5c97\u5df4\u53bf ","3104"],["3124","\u90a3\u66f2\u5730\u533a ","25"],["3125","\u90a3\u66f2\u53bf ","3124"],["3126","\u5609\u9ece\u53bf ","3124"],["3127","\u6bd4\u5982\u53bf ","3124"],["3128","\u8042\u8363\u53bf ","3124"],["3129","\u5b89\u591a\u53bf ","3124"],["3130","\u7533\u624e\u53bf ","3124"],["3131","\u7d22\u53bf ","3124"],["3132","\u73ed\u6208\u53bf ","3124"],["3133","\u5df4\u9752\u53bf ","3124"],["3134","\u5c3c\u739b\u53bf ","3124"],["3136","\u963f\u91cc\u5730\u533a ","25"],["3137","\u666e\u5170\u53bf ","3136"],["3138","\u672d\u8fbe\u53bf ","3136"],["3139","\u5676\u5c14\u53bf ","3136"],["3140","\u65e5\u571f\u53bf ","3136"],["3141","\u9769\u5409\u53bf ","3136"],["3142","\u6539\u5219\u53bf ","3136"],["3143","\u63aa\u52e4\u53bf ","3136"],["3145","\u6797\u829d\u5730\u533a ","25"],["3146","\u6797\u829d\u53bf ","3145"],["3147","\u5de5\u5e03\u6c5f\u8fbe\u53bf ","3145"],["3148","\u7c73\u6797\u53bf ","3145"],["3149","\u58a8\u8131\u53bf ","3145"],["3150","\u6ce2\u5bc6\u53bf ","3145"],["3151","\u5bdf\u9685\u53bf ","3145"],["3152","\u6717\u53bf ","3145"],["19","\u9655\u897f\u7701 ","0"],["3155","\u897f\u5b89\u5e02 ","19"],["3156","\u65b0\u57ce\u533a ","3155"],["3157","\u7891\u6797\u533a ","3155"],["3158","\u83b2\u6e56\u533a ","3155"],["3159","\u705e\u6865\u533a ","3155"],["3160","\u672a\u592e\u533a ","3155"],["3161","\u96c1\u5854\u533a ","3155"],["3162","\u960e\u826f\u533a ","3155"],["3163","\u4e34\u6f7c\u533a ","3155"],["3164","\u957f\u5b89\u533a ","3155"],["3165","\u84dd\u7530\u53bf ","3155"],["3166","\u5468\u81f3\u53bf ","3155"],["3167","\u6237\u53bf ","3155"],["3168","\u9ad8\u9675\u53bf ","3155"],["3170","\u94dc\u5ddd\u5e02 ","19"],["3171","\u738b\u76ca\u533a ","3170"],["3172","\u5370\u53f0\u533a ","3170"],["3173","\u8000\u5dde\u533a ","3170"],["3174","\u5b9c\u541b\u53bf ","3170"],["3176","\u5b9d\u9e21\u5e02 ","19"],["3177","\u6e2d\u6ee8\u533a ","3176"],["3178","\u91d1\u53f0\u533a ","3176"],["3179","\u9648\u4ed3\u533a ","3176"],["3180","\u51e4\u7fd4\u53bf ","3176"],["3181","\u5c90\u5c71\u53bf ","3176"],["3182","\u6276\u98ce\u53bf ","3176"],["3183","\u7709\u53bf ","3176"],["3184","\u9647\u53bf ","3176"],["3185","\u5343\u9633\u53bf ","3176"],["3186","\u9e9f\u6e38\u53bf ","3176"],["3187","\u51e4\u53bf ","3176"],["3188","\u592a\u767d\u53bf ","3176"],["3190","\u54b8\u9633\u5e02 ","19"],["3191","\u79e6\u90fd\u533a ","3190"],["3192","\u6768\u51cc\u533a ","3190"],["3193","\u6e2d\u57ce\u533a ","3190"],["3194","\u4e09\u539f\u53bf ","3190"],["3195","\u6cfe\u9633\u53bf ","3190"],["3196","\u4e7e\u53bf ","3190"],["3197","\u793c\u6cc9\u53bf ","3190"],["3198","\u6c38\u5bff\u53bf ","3190"],["3199","\u5f6c\u53bf ","3190"],["3200","\u957f\u6b66\u53bf ","3190"],["3201","\u65ec\u9091\u53bf ","3190"],["3202","\u6df3\u5316\u53bf ","3190"],["3203","\u6b66\u529f\u53bf ","3190"],["3204","\u5174\u5e73\u5e02 ","3190"],["3206","\u6e2d\u5357\u5e02 ","19"],["3207","\u4e34\u6e2d\u533a ","3206"],["3208","\u534e\u53bf ","3206"],["3209","\u6f7c\u5173\u53bf ","3206"],["3210","\u5927\u8354\u53bf ","3206"],["3211","\u5408\u9633\u53bf ","3206"],["3212","\u6f84\u57ce\u53bf ","3206"],["3213","\u84b2\u57ce\u53bf ","3206"],["3214","\u767d\u6c34\u53bf ","3206"],["3215","\u5bcc\u5e73\u53bf ","3206"],["3216","\u97e9\u57ce\u5e02 ","3206"],["3217","\u534e\u9634\u5e02 ","3206"],["3219","\u5ef6\u5b89\u5e02 ","19"],["3220","\u5b9d\u5854\u533a ","3219"],["3221","\u5ef6\u957f\u53bf ","3219"],["3222","\u5ef6\u5ddd\u53bf ","3219"],["3223","\u5b50\u957f\u53bf ","3219"],["3224","\u5b89\u585e\u53bf ","3219"],["3225","\u5fd7\u4e39\u53bf ","3219"],["3226","\u5434\u8d77\u53bf ","3219"],["3227","\u7518\u6cc9\u53bf ","3219"],["3228","\u5bcc\u53bf ","3219"],["3229","\u6d1b\u5ddd\u53bf ","3219"],["3230","\u5b9c\u5ddd\u53bf ","3219"],["3231","\u9ec4\u9f99\u53bf ","3219"],["3232","\u9ec4\u9675\u53bf ","3219"],["3234","\u6c49\u4e2d\u5e02 ","19"],["3235","\u6c49\u53f0\u533a ","3234"],["3237","\u57ce\u56fa\u53bf ","3234"],["3238","\u6d0b\u53bf ","3234"],["3239"," \u897f\u4e61\u53bf ","3234"],["3240","\u52c9\u53bf ","3234"],["3241","\u5b81\u5f3a\u53bf ","3234"],["3242","\u7565\u9633\u53bf ","3234"],["3243","\u9547\u5df4\u53bf ","3234"],["3244","\u7559\u575d\u53bf ","3234"],["3245","\u4f5b\u576a\u53bf ","3234"],["2848","\u6cbf\u6cb3\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","2840"],["2849","\u677e\u6843\u82d7\u65cf\u81ea\u6cbb\u53bf ","2840"],["2850","\u4e07\u5c71\u7279\u533a ","2840"],["2852","\u9ed4\u897f\u5357\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","17"],["2853","\u5174\u4e49\u5e02 ","2852"],["2854","\u5174\u4ec1\u53bf ","2852"],["2855","\u666e\u5b89\u53bf ","2852"],["2856","\u6674\u9686\u53bf ","2852"],["2857","\u8d1e\u4e30\u53bf ","2852"],["2858","\u671b\u8c1f\u53bf ","2852"],["2859","\u518c\u4ea8\u53bf ","2852"],["2860","\u5b89\u9f99\u53bf ","2852"],["2862","\u6bd5\u8282\u5730\u533a ","17"],["2863","\u6bd5\u8282\u5e02 ","2862"],["2864","\u5927\u65b9\u53bf ","2862"],["2865","\u9ed4\u897f\u53bf ","2862"],["2866","\u91d1\u6c99\u53bf ","2862"],["2867","\u7ec7\u91d1\u53bf ","2862"],["2868","\u7eb3\u96cd\u53bf ","2862"],["2869","\u5a01\u5b81\u5f5d\u65cf\u56de\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2862"],["2870","\u8d6b\u7ae0\u53bf ","2862"],["2872","\u9ed4\u4e1c\u5357\u82d7\u65cf\u4f97\u65cf\u81ea\u6cbb\u5dde ","17"],["2873","\u51ef\u91cc\u5e02 ","2872"],["2874","\u9ec4\u5e73\u53bf ","2872"],["2875","\u65bd\u79c9\u53bf ","2872"],["2876","\u4e09\u7a57\u53bf ","2872"],["2877","\u9547\u8fdc\u53bf ","2872"],["2878","\u5c91\u5de9\u53bf ","2872"],["2879","\u5929\u67f1\u53bf ","2872"],["2880","\u9526\u5c4f\u53bf ","2872"],["2881","\u5251\u6cb3\u53bf ","2872"],["2882","\u53f0\u6c5f\u53bf ","2872"],["2883","\u9ece\u5e73\u53bf ","2872"],["2884","\u6995\u6c5f\u53bf ","2872"],["2885","\u4ece\u6c5f\u53bf ","2872"],["2886","\u96f7\u5c71\u53bf ","2872"],["2887","\u9ebb\u6c5f\u53bf ","2872"],["2888","\u4e39\u5be8\u53bf ","2872"],["2890","\u9ed4\u5357\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","17"],["2891","\u90fd\u5300\u5e02 ","2890"],["2892","\u798f\u6cc9\u5e02 ","2890"],["2893","\u8354\u6ce2\u53bf ","2890"],["2894","\u8d35\u5b9a\u53bf ","2890"],["2895","\u74ee\u5b89\u53bf ","2890"],["2896","\u72ec\u5c71\u53bf ","2890"],["2897","\u5e73\u5858\u53bf ","2890"],["2898","\u7f57\u7538\u53bf ","2890"],["2899","\u957f\u987a\u53bf ","2890"],["2900","\u9f99\u91cc\u53bf ","2890"],["2901","\u60e0\u6c34\u53bf ","2890"],["2902","\u4e09\u90fd\u6c34\u65cf\u81ea\u6cbb\u53bf ","2890"],["18","\u4e91\u5357\u7701 ","0"],["2905","\u6606\u660e\u5e02 ","18"],["2906","\u4e94\u534e\u533a ","2905"],["2907","\u76d8\u9f99\u533a ","2905"],["2908","\u5b98\u6e21\u533a ","2905"],["2909","\u897f\u5c71\u533a ","2905"],["2910","\u4e1c\u5ddd\u533a ","2905"],["2911","\u5448\u8d21\u53bf ","2905"],["2912","\u664b\u5b81\u53bf ","2905"],["2913","\u5bcc\u6c11\u53bf ","2905"],["2914","\u5b9c\u826f\u53bf ","2905"],["2915","\u77f3\u6797\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2905"],["2916","\u5d69\u660e\u53bf ","2905"],["2917","\u7984\u529d\u5f5d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2905"],["2918","\u5bfb\u7538\u56de\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2905"],["2919","\u5b89\u5b81\u5e02 ","2905"],["2921","\u66f2\u9756\u5e02 ","18"],["2922","\u9e92\u9e9f\u533a ","2921"],["2923","\u9a6c\u9f99\u53bf ","2921"],["2924","\u9646\u826f\u53bf ","2921"],["2925","\u5e08\u5b97\u53bf ","2921"],["2926","\u7f57\u5e73\u53bf ","2921"],["2927","\u5bcc\u6e90\u53bf ","2921"],["2928","\u4f1a\u6cfd\u53bf ","2921"],["2929","\u6cbe\u76ca\u53bf ","2921"],["2930","\u5ba3\u5a01\u5e02 ","2921"],["2932","\u7389\u6eaa\u5e02 ","18"],["2933","\u7ea2\u5854\u533a ","2932"],["2934","\u6c5f\u5ddd\u53bf ","2932"],["2935","\u6f84\u6c5f\u53bf ","2932"],["2936","\u901a\u6d77\u53bf ","2932"],["2937","\u534e\u5b81\u53bf ","2932"],["2938","\u6613\u95e8\u53bf ","2932"],["2939","\u5ce8\u5c71\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2932"],["2940","\u65b0\u5e73\u5f5d\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2932"],["2941","\u5143\u6c5f\u54c8\u5c3c\u65cf\u5f5d\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2932"],["2943","\u4fdd\u5c71\u5e02 ","18"],["2944","\u9686\u9633\u533a ","2943"],["2945","\u65bd\u7538\u53bf ","2943"],["2946","\u817e\u51b2\u53bf ","2943"],["2947","\u9f99\u9675\u53bf ","2943"],["2948","\u660c\u5b81\u53bf ","2943"],["2950","\u662d\u901a\u5e02 ","18"],["2951","\u662d\u9633\u533a ","2950"],["2952","\u9c81\u7538\u53bf ","2950"],["2953","\u5de7\u5bb6\u53bf ","2950"],["2954","\u76d0\u6d25\u53bf ","2950"],["2955","\u5927\u5173\u53bf ","2950"],["2956","\u6c38\u5584\u53bf ","2950"],["2957","\u7ee5\u6c5f\u53bf ","2950"],["2958","\u9547\u96c4\u53bf ","2950"],["2959","\u5f5d\u826f\u53bf ","2950"],["2960","\u5a01\u4fe1\u53bf ","2950"],["2961","\u6c34\u5bcc\u53bf ","2950"],["2963","\u4e3d\u6c5f\u5e02 ","18"],["2964","\u53e4\u57ce\u533a ","2963"],["2965","\u7389\u9f99\u7eb3\u897f\u65cf\u81ea\u6cbb\u53bf ","2963"],["2966","\u6c38\u80dc\u53bf ","2963"],["2967","\u534e\u576a\u53bf ","2963"],["2968","\u5b81\u8497\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2963"],["2970","\u666e\u6d31\u5e02 ","18"],["2971","\u601d\u8305\u533a ","2970"],["2972","\u5b81\u6d31\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2973","\u58a8\u6c5f\u54c8\u5c3c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2974","\u666f\u4e1c\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2975","\u666f\u8c37\u50a3\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2976","\u9547\u6c85\u5f5d\u65cf\u54c8\u5c3c\u65cf\u62c9\u795c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2977","\u6c5f\u57ce\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2978","\u5b5f\u8fde\u50a3\u65cf\u62c9\u795c\u65cf\u4f64\u65cf\u81ea\u6cbb\u53bf ","2970"],["2979","\u6f9c\u6ca7\u62c9\u795c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2980","\u897f\u76df\u4f64\u65cf\u81ea\u6cbb\u53bf ","2970"],["2982","\u4e34\u6ca7\u5e02 ","18"],["2983","\u4e34\u7fd4\u533a ","2982"],["2984","\u51e4\u5e86\u53bf ","2982"],["2985","\u4e91\u53bf ","2982"],["2986"," \u6c38\u5fb7\u53bf ","2982"],["2987","\u9547\u5eb7\u53bf ","2982"],["2988","\u53cc\u6c5f\u62c9\u795c\u65cf\u4f64\u65cf\u5e03\u6717\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2982"],["2989","\u803f\u9a6c\u50a3\u65cf\u4f64\u65cf\u81ea\u6cbb\u53bf ","2982"],["2990","\u6ca7\u6e90\u4f64\u65cf\u81ea\u6cbb\u53bf ","2982"],["2992","\u695a\u96c4\u5f5d\u65cf\u81ea\u6cbb\u5dde ","18"],["2993","\u695a\u96c4\u5e02 ","2992"],["2994","\u53cc\u67cf\u53bf ","2992"],["2995","\u725f\u5b9a\u53bf ","2992"],["2996","\u5357\u534e\u53bf ","2992"],["2997","\u59da\u5b89\u53bf ","2992"],["2998","\u5927\u59da\u53bf ","2992"],["2999","\u6c38\u4ec1\u53bf ","2992"],["3000","\u5143\u8c0b\u53bf ","2992"],["3001","\u6b66\u5b9a\u53bf ","2992"],["3002","\u7984\u4e30\u53bf ","2992"],["3004","\u7ea2\u6cb3\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u5dde ","18"],["3005","\u4e2a\u65e7\u5e02 ","3004"],["3006","\u5f00\u8fdc\u5e02 ","3004"],["3007","\u8499\u81ea\u53bf ","3004"],["3008","\u5c4f\u8fb9\u82d7\u65cf\u81ea\u6cbb\u53bf ","3004"],["3009","\u5efa\u6c34\u53bf ","3004"],["3010","\u77f3\u5c4f\u53bf ","3004"],["3011","\u5f25\u52d2\u53bf ","3004"],["3012","\u6cf8\u897f\u53bf ","3004"],["3013","\u5143\u9633\u53bf ","3004"],["3014","\u7ea2\u6cb3\u53bf ","3004"],["3015","\u91d1\u5e73\u82d7\u65cf\u7476\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","3004"],["3016","\u7eff\u6625\u53bf ","3004"],["3017","\u6cb3\u53e3\u7476\u65cf\u81ea\u6cbb\u53bf ","3004"],["3019","\u6587\u5c71\u58ee\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","18"],["3020","\u6587\u5c71\u53bf ","3019"],["3021","\u781a\u5c71\u53bf ","3019"],["3022","\u897f\u7574\u53bf ","3019"],["3023","\u9ebb\u6817\u5761\u53bf ","3019"],["3024","\u9a6c\u5173\u53bf ","3019"],["3025","\u4e18\u5317\u53bf ","3019"],["3026","\u5e7f\u5357\u53bf ","3019"],["3027","\u5bcc\u5b81\u53bf ","3019"],["3029","\u897f\u53cc\u7248\u7eb3\u50a3\u65cf\u81ea\u6cbb\u5dde ","18"],["3030","\u666f\u6d2a\u5e02 ","3029"],["3031","\u52d0\u6d77\u53bf ","3029"],["3032","\u52d0\u814a\u53bf ","3029"],["3034","\u5927\u7406\u767d\u65cf\u81ea\u6cbb\u5dde ","18"],["3035","\u5927\u7406\u5e02 ","3034"],["3036","\u6f3e\u6fde\u5f5d\u65cf\u81ea\u6cbb\u53bf ","3034"],["3037","\u7965\u4e91\u53bf ","3034"],["3038","\u5bbe\u5ddd\u53bf ","3034"],["3039","\u5f25\u6e21\u53bf ","3034"],["3040","\u5357\u6da7\u5f5d\u65cf\u81ea\u6cbb\u53bf ","3034"],["3041","\u5dcd\u5c71\u5f5d\u65cf\u56de\u65cf\u81ea\u6cbb\u53bf ","3034"],["3042","\u6c38\u5e73\u53bf ","3034"],["3043","\u4e91\u9f99\u53bf ","3034"],["3044","\u6d31\u6e90\u53bf ","3034"],["3045","\u5251\u5ddd\u53bf ","3034"],["3311","\u6b66\u5c71\u53bf ","3305"],["3312","\u5f20\u5bb6\u5ddd\u56de\u65cf\u81ea\u6cbb\u53bf ","3305"],["3314","\u6b66\u5a01\u5e02 ","20"],["3315","\u51c9\u5dde\u533a ","3314"],["3316","\u6c11\u52e4\u53bf ","3314"],["3317","\u53e4\u6d6a\u53bf ","3314"],["3318","\u5929\u795d\u85cf\u65cf\u81ea\u6cbb\u53bf ","3314"],["3320","\u5f20\u6396\u5e02 ","20"],["3321","\u7518\u5dde\u533a ","3320"],["3322","\u8083\u5357\u88d5\u56fa\u65cf\u81ea\u6cbb\u53bf ","3320"],["3323","\u6c11\u4e50\u53bf ","3320"],["3324","\u4e34\u6cfd\u53bf ","3320"],["3325","\u9ad8\u53f0\u53bf ","3320"],["3326","\u5c71\u4e39\u53bf ","3320"],["3328","\u5e73\u51c9\u5e02 ","20"],["3329","\u5d06\u5cd2\u533a ","3328"],["3330","\u6cfe\u5ddd\u53bf ","3328"],["3331","\u7075\u53f0\u53bf ","3328"],["3332","\u5d07\u4fe1\u53bf ","3328"],["3333","\u534e\u4ead\u53bf ","3328"],["3334","\u5e84\u6d6a\u53bf ","3328"],["3335","\u9759\u5b81\u53bf ","3328"],["3337","\u9152\u6cc9\u5e02 ","20"],["3338","\u8083\u5dde\u533a ","3337"],["3339","\u91d1\u5854\u53bf ","3337"],["3340","\u5b89\u897f\u53bf ","3337"],["3341","\u8083\u5317\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","3337"],["3342","\u963f\u514b\u585e\u54c8\u8428\u514b\u65cf\u81ea\u6cbb\u53bf ","3337"],["3343","\u7389\u95e8\u5e02 ","3337"],["3344","\u6566\u714c\u5e02 ","3337"],["3346","\u5e86\u9633\u5e02 ","20"],["3347","\u897f\u5cf0\u533a ","3346"],["3348","\u5e86\u57ce\u53bf ","3346"],["3349","\u73af\u53bf ","3346"],["3350","\u534e\u6c60\u53bf ","3346"],["3351","\u5408\u6c34\u53bf ","3346"],["3352","\u6b63\u5b81\u53bf ","3346"],["3353","\u5b81\u53bf ","3346"],["3354","\u9547\u539f\u53bf ","3346"],["3356","\u5b9a\u897f\u5e02 ","20"],["3357","\u5b89\u5b9a\u533a ","3356"],["3358","\u901a\u6e2d\u53bf ","3356"],["3359","\u9647\u897f\u53bf ","3356"],["3360","\u6e2d\u6e90\u53bf ","3356"],["3361","\u4e34\u6d2e\u53bf ","3356"],["3362","\u6f33\u53bf ","3356"],["3363","\u5cb7\u53bf ","3356"],["3365","\u9647\u5357\u5e02 ","20"],["3366","\u6b66\u90fd\u533a ","3365"],["3367","\u6210\u53bf ","3365"],["3368"," \u6587\u53bf ","3365"],["3369","\u5b95\u660c\u53bf ","3365"],["3370","\u5eb7\u53bf ","3365"],["3371","\u897f\u548c\u53bf ","3365"],["3372","\u793c\u53bf ","3365"],["3373","\u5fbd\u53bf ","3365"],["3374","\u4e24\u5f53\u53bf ","3365"],["3376","\u4e34\u590f\u56de\u65cf\u81ea\u6cbb\u5dde ","20"],["3377","\u4e34\u590f\u5e02 ","3376"],["3378","\u4e34\u590f\u53bf ","3376"],["3379","\u5eb7\u4e50\u53bf ","3376"],["3380","\u6c38\u9756\u53bf ","3376"],["3381","\u5e7f\u6cb3\u53bf ","3376"],["3382","\u548c\u653f\u53bf ","3376"],["3383","\u4e1c\u4e61\u65cf\u81ea\u6cbb\u53bf ","3376"],["3384","\u79ef\u77f3\u5c71\u4fdd\u5b89\u65cf\u4e1c\u4e61\u65cf\u6492\u62c9\u65cf\u81ea\u6cbb\u53bf ","3376"],["3386","\u7518\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","20"],["3387","\u5408\u4f5c\u5e02 ","3386"],["3388","\u4e34\u6f6d\u53bf ","3386"],["3389","\u5353\u5c3c\u53bf ","3386"],["3390","\u821f\u66f2\u53bf ","3386"],["3391","\u8fed\u90e8\u53bf ","3386"],["3392","\u739b\u66f2\u53bf ","3386"],["3393","\u788c\u66f2\u53bf ","3386"],["3394","\u590f\u6cb3\u53bf ","3386"],["21","\u9752\u6d77\u7701 ","0"],["3397","\u897f\u5b81\u5e02 ","21"],["3398","\u57ce\u4e1c\u533a ","3397"],["3399","\u57ce\u4e2d\u533a ","3397"],["3400","\u57ce\u897f\u533a ","3397"],["3401","\u57ce\u5317\u533a ","3397"],["3402","\u5927\u901a\u56de\u65cf\u571f\u65cf\u81ea\u6cbb\u53bf ","3397"],["3403","\u6e5f\u4e2d\u53bf ","3397"],["3404","\u6e5f\u6e90\u53bf ","3397"],["3406","\u6d77\u4e1c\u5730\u533a ","21"],["3407","\u5e73\u5b89\u53bf ","3406"],["3408","\u6c11\u548c\u56de\u65cf\u571f\u65cf\u81ea\u6cbb\u53bf ","3406"],["3409","\u4e50\u90fd\u53bf ","3406"],["3410","\u4e92\u52a9\u571f\u65cf\u81ea\u6cbb\u53bf ","3406"],["3411","\u5316\u9686\u56de\u65cf\u81ea\u6cbb\u53bf ","3406"],["3412","\u5faa\u5316\u6492\u62c9\u65cf\u81ea\u6cbb\u53bf ","3406"],["3414","\u6d77\u5317\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3415","\u95e8\u6e90\u56de\u65cf\u81ea\u6cbb\u53bf ","3414"],["3416","\u7941\u8fde\u53bf ","3414"],["3417","\u6d77\u664f\u53bf ","3414"],["3418","\u521a\u5bdf\u53bf ","3414"],["3420","\u9ec4\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3421","\u540c\u4ec1\u53bf ","3420"],["3422","\u5c16\u624e\u53bf ","3420"],["3423","\u6cfd\u5e93\u53bf ","3420"],["3424","\u6cb3\u5357\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","3420"],["3426","\u6d77\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3427","\u5171\u548c\u53bf ","3426"],["3428","\u540c\u5fb7\u53bf ","3426"],["3429","\u8d35\u5fb7\u53bf ","3426"],["3430","\u5174\u6d77\u53bf ","3426"],["3431","\u8d35\u5357\u53bf ","3426"],["3433","\u679c\u6d1b\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3434","\u739b\u6c81\u53bf ","3433"],["3435","\u73ed\u739b\u53bf ","3433"],["3436","\u7518\u5fb7\u53bf ","3433"],["3437"," \u8fbe\u65e5\u53bf ","3433"],["3438","\u4e45\u6cbb\u53bf ","3433"],["3439","\u739b\u591a\u53bf ","3433"],["3441","\u7389\u6811\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3442","\u7389\u6811\u53bf ","3441"],["3443","\u6742\u591a\u53bf ","3441"],["3444","\u79f0\u591a\u53bf ","3441"],["3445","\u6cbb\u591a\u53bf ","3441"],["3446","\u56ca\u8c26\u53bf ","3441"],["3447","\u66f2\u9ebb\u83b1\u53bf ","3441"],["3449","\u6d77\u897f\u8499\u53e4\u65cf\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3450","\u683c\u5c14\u6728\u5e02 ","3449"],["3451","\u5fb7\u4ee4\u54c8\u5e02 ","3449"],["3452","\u4e4c\u5170\u53bf ","3449"],["3453","\u90fd\u5170\u53bf ","3449"],["3454","\u5929\u5cfb\u53bf ","3449"],["26","\u5b81\u590f\u56de\u65cf\u81ea\u6cbb\u533a ","0"],["3457","\u94f6\u5ddd\u5e02 ","26"],["3458"," \u5174\u5e86\u533a ","3457"],["3459","\u897f\u590f\u533a ","3457"],["3460","\u91d1\u51e4\u533a ","3457"],["3461","\u6c38\u5b81\u53bf ","3457"],["3462","\u8d3a\u5170\u53bf ","3457"],["3463","\u7075\u6b66\u5e02 ","3457"],["3465","\u77f3\u5634\u5c71\u5e02 ","26"],["3466","\u5927\u6b66\u53e3\u533a ","3465"],["3467","\u60e0\u519c\u533a ","3465"],["3468","\u5e73\u7f57\u53bf ","3465"],["3470","\u5434\u5fe0\u5e02 ","26"],["3471","\u5229\u901a\u533a ","3470"],["3472","\u76d0\u6c60\u53bf ","3470"],["3473","\u540c\u5fc3\u53bf ","3470"],["3474","\u9752\u94dc\u5ce1\u5e02 ","3470"],["3476","\u56fa\u539f\u5e02 ","26"],["3477","\u539f\u5dde\u533a ","3476"],["3478","\u897f\u5409\u53bf ","3476"],["3479","\u9686\u5fb7\u53bf ","3476"],["3480","\u6cfe\u6e90\u53bf ","3476"],["3481","\u5f6d\u9633\u53bf ","3476"],["3483","\u4e2d\u536b\u5e02 ","26"],["3484","\u6c99\u5761\u5934\u533a ","3483"],["3485","\u4e2d\u5b81\u53bf ","3483"],["3486","\u6d77\u539f\u53bf ","3483"],["27","\u65b0\u7586\u7ef4\u543e\u5c14\u81ea\u6cbb\u533a ","0"],["3489","\u4e4c\u9c81\u6728\u9f50\u5e02 ","27"],["3490","\u5929\u5c71\u533a ","3489"],["3491","\u6c99\u4f9d\u5df4\u514b\u533a ","3489"],["3492","\u65b0\u5e02\u533a ","3489"],["3493","\u6c34\u78e8\u6c9f\u533a ","3489"],["3494","\u5934\u5c6f\u6cb3\u533a ","3489"],["3495","\u8fbe\u5742\u57ce\u533a ","3489"],["3496","\u4e1c\u5c71\u533a ","3489"],["3497","\u7c73\u4e1c\u533a ","3489"],["3498","\u4e4c\u9c81\u6728\u9f50\u53bf ","3489"],["3500","\u514b\u62c9\u739b\u4f9d\u5e02 ","27"],["3501","\u72ec\u5c71\u5b50\u533a ","3500"],["3502","\u514b\u62c9\u739b\u4f9d\u533a ","3500"],["3503","\u767d\u78b1\u6ee9\u533a ","3500"],["3504","\u4e4c\u5c14\u79be\u533a ","3500"],["3506","\u5410\u9c81\u756a\u5730\u533a ","27"],["3507","\u5410\u9c81\u756a\u5e02 ","3506"],["3508","\u912f\u5584\u53bf ","3506"],["3509","\u6258\u514b\u900a\u53bf ","3506"],["3511","\u54c8\u5bc6\u5730\u533a ","27"],["3512","\u54c8\u5bc6\u5e02 ","3511"],["3513","\u5df4\u91cc\u5764\u54c8\u8428\u514b\u81ea\u6cbb\u53bf ","3511"],["3514","\u4f0a\u543e\u53bf ","3511"],["3516","\u660c\u5409\u56de\u65cf\u81ea\u6cbb\u5dde ","27"],["3517","\u660c\u5409\u5e02 ","3516"],["3518","\u961c\u5eb7\u5e02 ","3516"],["3519","\u7c73\u6cc9\u5e02 ","3516"],["3520","\u547c\u56fe\u58c1\u53bf ","3516"],["3521","\u739b\u7eb3\u65af\u53bf ","3516"],["3522","\u5947\u53f0\u53bf ","3516"],["3523","\u5409\u6728\u8428\u5c14\u53bf ","3516"],["3524","\u6728\u5792\u54c8\u8428\u514b\u81ea\u6cbb\u53bf ","3516"],["3526","\u535a\u5c14\u5854\u62c9\u8499\u53e4\u81ea\u6cbb\u5dde ","27"],["3527","\u535a\u4e50\u5e02 ","3526"],["3528","\u7cbe\u6cb3\u53bf ","3526"],["3529","\u6e29\u6cc9\u53bf ","3526"],["3531","\u5df4\u97f3\u90ed\u695e\u8499\u53e4\u81ea\u6cbb\u5dde ","27"],["3532","\u5e93\u5c14\u52d2\u5e02 ","3531"],["3533","\u8f6e\u53f0\u53bf ","3531"],["3534","\u5c09\u7281\u53bf ","3531"],["3535","\u82e5\u7f8c\u53bf ","3531"],["3536","\u4e14\u672b\u53bf ","3531"],["3537","\u7109\u8006\u56de\u65cf\u81ea\u6cbb\u53bf ","3531"],["3538","\u548c\u9759\u53bf ","3531"],["3539","\u548c\u7855\u53bf ","3531"],["3540","\u535a\u6e56\u53bf ","3531"],["3542","\u963f\u514b\u82cf\u5730\u533a ","27"],["3543","\u963f\u514b\u82cf\u5e02 ","3542"],["3544","\u6e29\u5bbf\u53bf ","3542"],["3545","\u5e93\u8f66\u53bf ","3542"],["3546","\u6c99\u96c5\u53bf ","3542"],["3547","\u65b0\u548c\u53bf ","3542"],["3548","\u62dc\u57ce\u53bf ","3542"],["3549","\u4e4c\u4ec0\u53bf ","3542"],["3550","\u963f\u74e6\u63d0\u53bf ","3542"],["3551","\u67ef\u576a\u53bf ","3542"],["3553","\u514b\u5b5c\u52d2\u82cf\u67ef\u5c14\u514b\u5b5c\u81ea\u6cbb\u5dde ","27"],["3554","\u963f\u56fe\u4ec0\u5e02 ","3553"],["3555","\u963f\u514b\u9676\u53bf ","3553"],["3556","\u963f\u5408\u5947\u53bf ","3553"],["3557","\u4e4c\u6070\u53bf ","3553"],["3559","\u5580\u4ec0\u5730\u533a ","27"],["3560","\u5580\u4ec0\u5e02 ","3559"],["3561","\u758f\u9644\u53bf ","3559"],["3562","\u758f\u52d2\u53bf ","3559"],["3563","\u82f1\u5409\u6c99\u53bf ","3559"],["3564","\u6cfd\u666e\u53bf ","3559"],["3565","\u838e\u8f66\u53bf ","3559"],["3566","\u53f6\u57ce\u53bf ","3559"],["3567","\u9ea6\u76d6\u63d0\u53bf ","3559"],["3568","\u5cb3\u666e\u6e56\u53bf ","3559"],["3569","\u4f3d\u5e08\u53bf ","3559"],["3570","\u5df4\u695a\u53bf ","3559"],["3571","\u5854\u4ec0\u5e93\u5c14\u5e72\u5854\u5409\u514b\u81ea\u6cbb\u53bf ","3559"],["3573","\u548c\u7530\u5730\u533a ","27"],["3574","\u548c\u7530\u5e02 ","3573"],["3575","\u548c\u7530\u53bf ","3573"],["3576","\u58a8\u7389\u53bf ","3573"],["3577","\u76ae\u5c71\u53bf ","3573"],["3578","\u6d1b\u6d66\u53bf ","3573"],["3579","\u7b56\u52d2\u53bf ","3573"],["3580","\u4e8e\u7530\u53bf ","3573"],["3581","\u6c11\u4e30\u53bf ","3573"],["3583","\u4f0a\u7281\u54c8\u8428\u514b\u81ea\u6cbb\u5dde ","27"],["3584","\u4f0a\u5b81\u5e02 ","3583"],["3585","\u594e\u5c6f\u5e02 ","3583"],["3586","\u4f0a\u5b81\u53bf ","3583"],["3587","\u5bdf\u5e03\u67e5\u5c14\u9521\u4f2f\u81ea\u6cbb\u53bf ","3583"],["3588","\u970d\u57ce\u53bf ","3583"],["3589","\u5de9\u7559\u53bf ","3583"],["3590","\u65b0\u6e90\u53bf ","3583"],["3591","\u662d\u82cf\u53bf ","3583"],["3592","\u7279\u514b\u65af\u53bf ","3583"],["3593","\u5c3c\u52d2\u514b\u53bf ","3583"],["3595","\u5854\u57ce\u5730\u533a ","27"],["3596","\u5854\u57ce\u5e02 ","3595"],["3597","\u4e4c\u82cf\u5e02 ","3595"],["3598","\u989d\u654f\u53bf ","3595"],["3599","\u6c99\u6e7e\u53bf ","3595"],["3600","\u6258\u91cc\u53bf ","3595"],["3601","\u88d5\u6c11\u53bf ","3595"],["3602","\u548c\u5e03\u514b\u8d5b\u5c14\u8499\u53e4\u81ea\u6cbb\u53bf ","3595"],["3604","\u963f\u52d2\u6cf0\u5730\u533a ","27"],["3605","\u963f\u52d2\u6cf0\u5e02 ","3604"],["3606","\u5e03\u5c14\u6d25\u53bf ","3604"],["3607","\u5bcc\u8574\u53bf ","3604"],["3608","\u798f\u6d77\u53bf ","3604"],["3609","\u54c8\u5df4\u6cb3\u53bf ","3604"],["3610","\u9752\u6cb3\u53bf ","3604"],["3611","\u5409\u6728\u4e43\u53bf ","3604"],["3613","\u77f3\u6cb3\u5b50\u5e02 ","27"],["3614","\u963f\u62c9\u5c14\u5e02 ","27"],["3615","\u56fe\u6728\u8212\u514b\u5e02 ","27"],["3616","\u4e94\u5bb6\u6e20\u5e02 ","27"],["22","\u53f0\u6e7e\u7701 ","0"],["3618","\u53f0\u5317\u5e02 ","22"],["3619","\u4e2d\u6b63\u533a ","3618"],["3620","\u5927\u540c\u533a ","3618"],["3621","\u4e2d\u5c71\u533a ","3618"],["3622","\u677e\u5c71\u533a ","3618"],["3623","\u5927\u5b89\u533a ","3618"],["3624","\u4e07\u534e\u533a ","3618"],["3625","\u4fe1\u4e49\u533a ","3618"],["3626","\u58eb\u6797\u533a ","3618"],["3627","\u5317\u6295\u533a ","3618"],["3628","\u5185\u6e56\u533a ","3618"],["3629","\u5357\u6e2f\u533a ","3618"],["3630","\u6587\u5c71\u533a ","3618"],["3632","\u9ad8\u96c4\u5e02 ","22"],["3633","\u65b0\u5174\u533a ","3632"],["3634","\u524d\u91d1\u533a ","3632"],["3635","\u82a9\u96c5\u533a ","3632"],["3636","\u76d0\u57d5\u533a ","3632"],["3637","\u9f13\u5c71\u533a ","3632"],["3638","\u65d7\u6d25\u533a ","3632"],["3639","\u524d\u9547\u533a ","3632"],["3640","\u4e09\u6c11\u533a ","3632"],["3641","\u5de6\u8425\u533a ","3632"],["3642","\u6960\u6893\u533a ","3632"],["3643","\u5c0f\u6e2f\u533a ","3632"],["3645","\u53f0\u5357\u5e02 ","22"],["3646","\u4e2d\u897f\u533a ","3645"],["3647","\u4e1c\u533a ","3645"],["3648","\u5357\u533a ","3645"],["3649","\u5317\u533a ","3645"],["3650","\u5b89\u5e73\u533a ","3645"],["3651","\u5b89\u5357\u533a ","3645"],["3653","\u53f0\u4e2d\u5e02 ","22"],["3654","\u4e2d\u533a ","3653"],["3655","\u4e1c\u533a ","3653"],["3656","\u5357\u533a ","3653"],["3657","\u897f\u533a ","3653"],["3658","\u5317\u533a ","3653"],["3659","\u5317\u5c6f\u533a ","3653"],["3660","\u897f\u5c6f\u533a ","3653"],["3661","\u5357\u5c6f\u533a ","3653"],["3663","\u91d1\u95e8\u53bf ","22"],["3664","\u5357\u6295\u53bf ","22"],["3665","\u57fa\u9686\u5e02 ","22"],["3666","\u4ec1\u7231\u533a ","3665"],["3667","\u4fe1\u4e49\u533a ","3665"],["3668","\u4e2d\u6b63\u533a ","3665"],["3669","\u4e2d\u5c71\u533a ","3665"],["3670","\u5b89\u4e50\u533a ","3665"],["3671","\u6696\u6696\u533a ","3665"],["3672","\u4e03\u5835\u533a ","3665"],["3674","\u65b0\u7af9\u5e02 ","22"],["3675","\u4e1c\u533a ","3674"],["3676","\u5317\u533a ","3674"],["3677","\u9999\u5c71\u533a ","3674"],["3679","\u5609\u4e49\u5e02 ","22"],["3680","\u4e1c\u533a ","3679"],["3681","\u897f\u533a ","3679"],["3683","\u53f0\u5317\u53bf ","22"],["3684","\u5b9c\u5170\u53bf ","22"],["3685","\u65b0\u7af9\u53bf ","22"],["3686","\u6843\u56ed\u53bf ","22"],["3687","\u82d7\u6817\u53bf ","22"],["3688","\u53f0\u4e2d\u53bf ","22"],["3689","\u5f70\u5316\u53bf ","22"],["3690","\u5609\u4e49\u53bf ","22"],["3691","\u4e91\u6797\u53bf ","22"],["3692","\u53f0\u5357\u53bf ","22"],["3693","\u9ad8\u96c4\u53bf ","22"],["3694","\u5c4f\u4e1c\u53bf ","22"],["3695","\u53f0\u4e1c\u53bf ","22"],["3696","\u82b1\u83b2\u53bf ","22"],["3697","\u6f8e\u6e56\u53bf ","22"],["32","\u9999\u6e2f\u7279\u522b\u884c\u653f\u533a ","0"],["3699","\u9999\u6e2f\u5c9b ","32"],["3700","\u4e5d\u9f99 ","32"],["3701","\u65b0\u754c ","32"],["33","\u6fb3\u95e8\u7279\u522b\u884c\u653f\u533a ","0"],["3703","\u6fb3\u95e8\u534a\u5c9b ","33"],["3704","\u79bb\u5c9b ","33"],["274","d\u5e02\u573a ","36"]] diff --git a/comps/AutoComplete/_demo/data/shengshi.php b/comps/AutoComplete/_demo/data/shengshi.php new file mode 100755 index 000000000..e300811e2 --- /dev/null +++ b/comps/AutoComplete/_demo/data/shengshi.php @@ -0,0 +1,23 @@ += $max ){ + break; + } + if( !$id ){ + array_push( $r, $json[$i] ); + }else if( $json[$i][2] == $id ){ + array_push( $r, $json[$i] ); + } + } + + echo json_encode( $r ); +?> diff --git a/comps/AutoComplete/_demo/data/shengshi_with_error_code.php b/comps/AutoComplete/_demo/data/shengshi_with_error_code.php new file mode 100755 index 000000000..cd1e756f5 --- /dev/null +++ b/comps/AutoComplete/_demo/data/shengshi_with_error_code.php @@ -0,0 +1,23 @@ + 0, 'data' => $r ); + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + echo json_encode( $result ); +?> diff --git a/comps/AutoComplete/_demo/demo.html b/comps/AutoComplete/_demo/demo.html new file mode 100755 index 000000000..18aa56bc2 --- /dev/null +++ b/comps/AutoComplete/_demo/demo.html @@ -0,0 +1,64 @@ + + + + + AutoComplete + + + + + + + +

        JC.AutoComplete 示例

        +
        +
        + +
        + +
        + + + diff --git a/comps/AutoComplete/_demo/demo_autoLayout_ajaxData.html b/comps/AutoComplete/_demo/demo_autoLayout_ajaxData.html new file mode 100755 index 000000000..61122b854 --- /dev/null +++ b/comps/AutoComplete/_demo/demo_autoLayout_ajaxData.html @@ -0,0 +1,69 @@ + + + + + AutoComplete + + + + + + + +

        JC.AutoComplete 示例

        +

        自动生成列表弹框, Ajax 数据 [ cacAjaxDataUrl ]

        +
        +
        + +  cacIdSelector: +
        + + + diff --git a/comps/AutoComplete/_demo/demo_autoLayout_userUpdate.html b/comps/AutoComplete/_demo/demo_autoLayout_userUpdate.html new file mode 100755 index 000000000..7d844d387 --- /dev/null +++ b/comps/AutoComplete/_demo/demo_autoLayout_userUpdate.html @@ -0,0 +1,101 @@ + + + + + AutoComplete + + + + + + + +

        JC.AutoComplete 示例

        +

        自动生成列表弹框, JC.AutoComplete#update

        +
        +
        + +  cacIdSelector: +
        +
         
        + + + + + + + + + + +
        + 正确的数据 + + 需要 cacDataFilter 进行转换的数据 +
        + +
        +
        + +
        +
        + + + + diff --git a/comps/AutoComplete/_demo/demo_bindItem.html b/comps/AutoComplete/_demo/demo_bindItem.html new file mode 100755 index 000000000..86c2c95a6 --- /dev/null +++ b/comps/AutoComplete/_demo/demo_bindItem.html @@ -0,0 +1,66 @@ + + + + + AutoComplete + + + + + + + +

        JC.AutoComplete 示例

        +
        +
        + +  cacIdSelector: + +
        +
        + + diff --git a/comps/AutoComplete/_demo/demo_crm_example.html b/comps/AutoComplete/_demo/demo_crm_example.html new file mode 100755 index 000000000..36b1771ff --- /dev/null +++ b/comps/AutoComplete/_demo/demo_crm_example.html @@ -0,0 +1,253 @@ + + + + + AutoComplete + + + + + + + + +

        JC.AutoComplete 示例

        +

        自动生成列表弹框, JC.AutoComplete#update

        +
        +
        +
        + + + + + 添加 +
        + +  cacIdSelector: + +
        +
        +
        +
        + + + + + back +
        + + +
        + + diff --git a/comps/AutoComplete/_demo/index.php b/comps/AutoComplete/_demo/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/comps/AutoComplete/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AutoComplete/index.php b/comps/AutoComplete/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/comps/AutoComplete/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AutoComplete/res/default/index.php b/comps/AutoComplete/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/comps/AutoComplete/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AutoComplete/res/default/style.css b/comps/AutoComplete/res/default/style.css new file mode 100755 index 000000000..e7aa2183b --- /dev/null +++ b/comps/AutoComplete/res/default/style.css @@ -0,0 +1,68 @@ +.AC_layoutBox a, .AC_box a { text-decoration: none; color: #333; } +.AC_layoutBox, .AC_box{ + max-height: 300px; + overflow-y: auto; + border: 1px solid #ccc; padding: 0; + margin: -1px 0 0; + list-style: none; background: #fff; + display: none; + position: absolute; +} + +.AC_layoutBox { + max-height: 325px; + overflow-y: visible; + margin: -1px 0 0; + display: none; +} + +.AC_layoutBox .AC_box{ + max-height: 300px; + border: none!important; + padding: 0; + margin: 0px 0 0; + display: block!important; + position: static!important; +} + +.AC_box li{ line-height: 24px; text-indent: 3px; } + +.AC_box li.AC_active{ background: #eee; } +.AC_fakebox{ border-color: #4d90fe; } + +.AC_listItem { + clear: both; + cursor: pointer; +} + +.AC_addtionItem{ + font-size: 13px; + text-align: right; + border-top: 1px dashed #ccc; padding: 0; + margin: 2px 4px; + padding-right: 0!important; +} + +.AC_addtionItem div{ + margin-top: 4px; +} + +.AC_customAdd{ + font-size: 13px; + text-align: right; + padding-right: 5px; + float: right; +} + +.AC_control{ + color: #999!important; + cursor: pointer; +} + +.AC_noData { + padding-left: 5px; +} + +.AC_center { + text-align: center; +} diff --git a/comps/AutoComplete/res/index.php b/comps/AutoComplete/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/comps/AutoComplete/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AutoFixed/AutoFixed.js b/comps/AutoFixed/AutoFixed.js new file mode 100755 index 000000000..c95543d50 --- /dev/null +++ b/comps/AutoFixed/AutoFixed.js @@ -0,0 +1,518 @@ +//TODO: 兼容 不支持 css position = fixed 的浏览器 +;(function(define, _win) { 'use strict'; define( 'JC.AutoFixed', [ 'JC.BaseMVC' ], function(){ +/** + * 自动 Fixed ( JC.AutoFixed ) + * + *

        require: + * JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 div class="js_compAutoFixed"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        data-normalClass = css class name
        + *
        正常状态下附加的 css
        + * + *
        data-fixedClass = css class name
        + *
        fixed 状态下附加的 css
        + * + *
        data-cloneItemClass = css class name
        + *
        fixed源 克隆对象附加的 css( 仅对 position = static 的克隆源生效 )
        + * + *
        data-fixedTopPx = number, default = 0
        + *
        + * 滚动到多少像素式开始执行 fixed + *
        + * + *
        data-fixAnchor = bool
        + *
        + * 是否修正 html 锚点定位问题( 该问题通常出现在 position fixed top = 0 ) + *
        + * + *
        data-highlightTrigger = selector
        + *
        滚动时响应滚动条所在锚点的内容高亮显示
        + * + *
        data-highlightAnchorLayout = selector, default = data-highlightTrigger
        + *
        指定计算位置为锚点的某个父容器 y + height
        + * + *
        data-highlightClass = css class name, default = cur
        + *
        当前高亮的css class
        + *
        + * + * @namespace JC + * @class AutoFixed + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +

        JC.AutoFixed 示例

        + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.AutoFixed = AutoFixed; + + function AutoFixed( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, AutoFixed ) ) + return JC.BaseMVC.getInstance( _selector, AutoFixed ); + + JC.BaseMVC.getInstance( _selector, AutoFixed, this ); + + this._model = new AutoFixed.Model( _selector ); + this._view = new AutoFixed.View( this._model ); + + this._init(); + + //JC.log( AutoFixed.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 AutoFixed 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of AutoFixedInstance} + */ + AutoFixed.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compAutoFixed' ) ){ + _r.push( new AutoFixed( _selector ) ); + }else{ + _selector.find( 'div.js_compAutoFixed, ul.js_compAutoFixed, dl.js_compAutoFixed' ).each( function(){ + _r.push( new AutoFixed( this ) ); + }); + } + } + return _r; + }; + /** + * 初始化时是否添加延时 + * @property INIT_DELAY + * @default 0 + * @type int + * @static + */ + AutoFixed.INIT_DELAY = 0; + + JC.BaseMVC.build( AutoFixed ); + + JC.f.extendObject( AutoFixed.prototype, { + _beforeInit: + function(){ + //JC.log( 'AutoFixed _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + var _st = JDOC.scrollTop(), _cp = _p._model.defaultStyle().top; + + //JC.log( _p._model.fixedTopPx() ); + if( JDOC.scrollTop() > 0 ){ + //JC.dir( _p._model.defaultStyle() ); + _p.trigger( 'UPDATE_POSITION', [ _st, _cp ] ); + } + }); + + _p._model.saveDefault(); + + if( _p._model.fixAnchor() ){ + JDOC.delegate( 'a[href]', 'click', function( _evt ){ + var _sp = $( this ), _href = _sp.attr( 'href' ) || ''; + if( !/^[#]/.test( _href ) ) return; + JC.f.safeTimeout( function(){ + JDOC.scrollTop( JDOC.scrollTop() - _p.selector().height() ); + }, null, _p._model.gid(), 1 ); + }); + } + + JWIN.on( 'scroll', function( _evt ){ + var _st = JDOC.scrollTop(), _cp = _p._model.defaultStyle().gtop; + _p.trigger( 'UPDATE_POSITION', [ _st, _cp ] ); + }); + + JWIN.on( 'resize', function( _evt ){ + var _cloneItem = _p._model.cloneItem(), _realWidth, _height, _ds, _winSize, _x, _css; + if( !_cloneItem ) { + _p._model.normalClass() + && _p.selector().removeClass( _p._model.normalClass() ) + && _p.selector().addClass( _p._model.normalClass() ) + ; + _realWidth = _p.selector().width(); + }else{ + _ds = _p._model.defaultStyle(); + _winSize = JC.f.winSize(); + _height = _ds.height; + if( _height + _p._model.fixedTopPx() > _winSize.height ){ + _height = _winSize.height - _p._model.fixedTopPx(); + } + + if( _p._model.defaultStyle().right != 'auto' ) { + _p.selector().css( { + right: JC.f.winSize().width - ( _cloneItem.offset().left + _cloneItem.width() ) + , height: _height + }); + return; + } + _realWidth = _cloneItem.width(); + _css = { 'width': _realWidth, 'height': _height, left: _cloneItem.offset().left }; + if( _ds.right != 'auto' ){ + _css.right = _winSize.width - ( _cloneItem.offset().left + _cloneItem.width() ); + }else{ + _css.left = _cloneItem.offset().left; + } + + _p.selector().css( _css ); + } + _p._model.defaultStyle().width = _realWidth; + }); + + _p.on( 'UPDATE_POSITION', function( _evt, _st, _cp ){ + //JC.log( 'UPDATE_POSITION', _st, _cp ); + if( ( _st ) > ( _cp - _p._model.fixedTopPx() ) ){ + _p.trigger( 'FIXED', [ _st, _cp ] ); + }else{ + _p.trigger( 'UN_FIXED', [ _st, _cp ] ); + } + }); + + _p.on( 'FIXED', function( _evt, _st, _cp ){ + var _ds = _p._model.defaultStyle(), _left = 0, _css, _winSize = JC.f.winSize(), _height, _cloneItem; + if( _p._model.cloneItem() ) return; + if( _p._model.fixedLock() ) return; + _p._model.fixedLock( true ); + _p._model.unfixedLock( false ); + + //JC.log( 'FIXED', _st, _cp ); + + if( _ds.left != _ds.gleft ){ + _left = _ds.gleft; + }else{ + _left = _ds.left; + } + _height = _ds.height; + if( _height + _p._model.fixedTopPx() > _winSize.height ){ + _height = _winSize.height - _p._model.fixedTopPx(); + } + _p.trigger( 'CLONE_ITEM' ); + _cloneItem = _p._model.cloneItem(); + _css = { + 'position': 'fixed' + , 'top': _p._model.fixedTopPx() + , 'height': _height + , 'width': _ds.width + }; + if( _ds.right != 'auto' ){ + _css.right = _winSize.width - ( _cloneItem.offset().left + _cloneItem.width() ); + }else{ + _css.left = _left; + _css.left = _cloneItem.offset().left; + } + _p.selector().css( _css ); + + _p._model.normalClass() && _p.selector().removeClass( _p._model.normalClass() ); + _p._model.fixedClass() && _p.selector().addClass( _p._model.fixedClass() ); + }); + + _p.on( 'UN_FIXED', function( _evt, _st, _cp ){ + if( _p._model.unfixedLock() ) return; + _p._model.unfixedLock( true ); + _p._model.fixedLock( false ); + + var _ds = _p._model.defaultStyle(), _css; + //JC.log( 'UN_FIXED', _st, _cp ); + _p.trigger( 'UN_CLONE_ITEM' ); + _css = { + 'position': _ds.position + , 'top': _ds.top + , 'height': _ds.height + }; + if( _ds.right != 'auto' ){ + _css.right = _ds.right; + }else{ + _css.left = _ds.left; + } + + _p.selector().css( _css ); + _p._model.fixedClass() && _p.selector().removeClass( _p._model.fixedClass() ); + _p._model.normalClass() && _p.selector().addClass( _p._model.normalClass() ); + }); + + _p.on( 'CLONE_ITEM', function(){ + if( _p._model.cloneItem() ) return; + var _cloneItem = $( '
        ' ) + , _ds = _p._model.defaultStyle() + ; + _cloneItem.css( { + 'visibility': 'hidden' + , 'height': _ds.height + , 'overflow': 'hidden' + , 'position': _ds.position + , 'right': _ds.right + , 'width': _ds.width + }); + _p._model.cloneItemClass() && _cloneItem.addClass( _p._model.cloneItemClass() ); + _cloneItem.html(''); + _p._model.cloneItem( _cloneItem ); + _p.selector().after( _cloneItem ); + + }); + + _p.on( 'UN_CLONE_ITEM', function(){ + _p._model.cloneItem( null ); + }); + + if( _p._model.highlightTrigger() && _p._model.highlightTrigger().length ){ + var _clickTs = JC.f.ts(); + _p._model.highlightTrigger().on( 'click', function(){ + _clickTs = JC.f.ts(); + var _eles = _p._model.findTargetAnchorAndLayout( $( this )) || {}; + _p.trigger( 'setCurHighlight', [ this, _eles.layout ] ); + }); + + _p.on( 'setCurHighlight', function( _evt, _src, _layout ){ + _src = $( _src ); + if( !( _src && _src.length ) ) return; + _p._model.lastHighlightItem() && _p._model.lastHighlightItem().removeClass( _p._model.highlightClass() ); + _src.addClass( _p._model.highlightClass() ); + _p._model.lastHighlightItem( _src ); + + if( _layout && _layout.length ){ + _p._model.lastHighlightLayout() && _p._model.lastHighlightLayout().removeClass( _p._model.highlightLayoutClass() ); + _layout.addClass( _p._model.highlightLayoutClass() ); + _p._model.lastHighlightLayout( _layout ); + } + + }); + + JWIN.on( 'scroll', function( _evt ){ + if( JC.f.ts() - _clickTs < 200 ) return; + var _st = JDOC.scrollTop() + , _curItem + , _anchorOffset + ; + _p._model.highlightTrigger().each( function(){ + var _src = $( this ) + , _anchorName = _src.attr( 'href' ).replace( /^\#/, '' ) + , _anchor + ; + if( !_anchorName ) return; + _anchor = $( JC.f.printf( 'a[name={0}]', _anchorName ) ).first(); + if( !_anchor.length ) return; + _anchorOffset = _p._model.anchorOffset( _anchor ); + + if( _anchorOffset.top > _st ){ + _curItem = _src; + return false; + } + }); + _anchorOffset = _anchorOffset || {}; + if( _curItem ){ + //JC.log( '_curItem', _curItem.attr( 'name' ) ); + _p.trigger( 'setCurHighlight', [ _curItem, _anchorOffset.layout ] ); + } + }); + + } + } + + , _inited: + function(){ + //JC.log( 'AutoFixed _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + AutoFixed.Model._instanceName = 'JCAutoFixed'; + JC.f.extendObject( AutoFixed.Model.prototype, { + init: + function(){ + //JC.log( 'AutoFixed.Model.init:', new Date().getTime() ); + } + + , findTargetAnchorAndLayout: + function( _trigger ){ + var _src = $( _trigger ) + , _anchorName = _src.attr( 'href' ).replace( /^\#/, '' ) + , _anchor + , _anchorOffset + , _r = null + ; + if( !_anchorName ) return _r; + _anchor = $( JC.f.printf( 'a[name={0}]', _anchorName ) ).first(); + if( !_anchor.length ) return _r; + _r = { trigger: _src, target: _anchor, layout: this.highlightAnchorLayout( _anchor ) }; + + return _r; + } + + , gid: + function(){ + !this._gid && ( this._gid = JC.f.gid() ); + return this._gid; + } + + , lastHighlightLayout: + function( _setter ){ + _setter && ( this._lastHighlightLayout = _setter ); + return this._lastHighlightLayout; + } + + , highlightLayoutClass: + function(){ + return this.attrProp( 'data-highlightLayoutClass' ) || this.highlightClass() || 'cur'; + } + + , lastHighlightItem: + function( _setter ){ + _setter && ( this._lastHighlightItem = _setter ); + return this._lastHighlightItem; + } + + , highlightClass: + function(){ + return this.attrProp( 'data-highlightClass' ) || 'cur'; + } + + , highlightTrigger: + function(){ + return this.selectorProp( 'data-highlightTrigger' ); + } + + , anchorOffset: + function( _a ){ + var _r = _a.offset(), _layout = this.highlightAnchorLayout( _a ), _tmp; + + if( _layout && _layout.length ){ + _r = _layout.offset(); + _r.top += _layout.height(); + } + _r.layout = _layout; + + return _r; + } + , highlightAnchorLayout: + function( _a ){ + var _r; + if( this.is( '[data-highlightAnchorLayout]' ) ){ + _r = JC.f.parentSelector( _a, this.attrProp( 'data-highlightAnchorLayout' ) ); + } + return _r; + } + + , defaultStyle: + function(){ + var _r = { + position: 'static' + , left: 0, top: 0 + , right: 0, bottom: 0 + , width: 0, height: 0 + , gleft: 0, gtop: 0 + , winSize: JC.f.winSize() + }; + return this._defaultStyle || _r; + } + + , fixedLock: + function( _setter ){ + typeof _setter != 'undefined' && ( this._fixedLock = _setter ); + return this._fixedLock; + } + + , unfixedLock: + function( _setter ){ + typeof _setter != 'undefined' && ( this._unfixedLock= _setter ); + return this._unfixedLock; + } + + , saveDefault: + function(){ + var _p = this, _r = _p.defaultStyle() + , _offset = _p.selector().position() + , _goffset = _p.selector().offset() + ; + + _r.owidth = _p.selector().css( 'width' ); + _r.gleft = _goffset.left; + _r.gtop = _goffset.top; + _r.position = _p.selector().css( 'position' ); + _r.left = _offset.left; + _r.top = _offset.top; + _r.width = _p.selector().width(); + _r.height = _p.selector().height(); + _r.right = _p.selector().css( 'right' ); + _r.bottom = _p.selector().css( 'bottom' ); + + _p._defaultStyle = _r; + } + + , fixedTopPx: + function(){ + typeof this._fixedTopPx == 'undefined' && ( this._fixedTopPx = this.floatProp( 'data-fixedTopPx' ) ); + return this._fixedTopPx; + } + + , fixAnchor: + function(){ + return this.boolProp( 'data-fixAnchor' ); + } + + , fixedClass: function(){ return this.attrProp( 'data-fixedClass' ); } + , normalClass: function(){ return this.attrProp( 'data-normalClass' ); } + , cloneItemClass: function(){ return this.attrProp( 'data-cloneItemClass' ); } + + , cloneItem: + function( _setter ){ + if( typeof _setter != 'undefined' ){ + if( !_setter && this._cloneItem ){ + this._cloneItem.remove(); + } + this._cloneItem = _setter; + } + return this._cloneItem; + } + }); + + JC.f.extendObject( AutoFixed.View.prototype, { + init: + function(){ + //JC.log( 'AutoFixed.View.init:', new Date().getTime() ); + } + }); + + _jdoc.ready( function(){ + JC.f.safeTimeout( function(){ + if( JC.AutoFixed.INIT_DELAY ){ + JC.f.safeTimeout( function(){ + AutoFixed.autoInit && AutoFixed.init(); + }, null, 'AutoFixedasdfasefasedf', JC.AutoFixed.INIT_DELAY ); + }else{ + AutoFixed.autoInit && AutoFixed.init(); + } + }, null, 'AutoFixed23asdfa', 1 ); + }); + + return JC.AutoFixed; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AutoFixed/_demo/data/handler.php b/comps/AutoFixed/_demo/data/handler.php new file mode 100755 index 000000000..11ec3e84a --- /dev/null +++ b/comps/AutoFixed/_demo/data/handler.php @@ -0,0 +1,15 @@ + 0, 'errmsg' => '', 'data' => array () ); + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + if( isset( $_REQUEST['errmsg'] ) ){ + $r['errmsg'] = $_REQUEST['errmsg']; + } + + $r['data'] = $_REQUEST; + + echo json_encode( $r ); +?> diff --git a/comps/AutoFixed/_demo/demo.html b/comps/AutoFixed/_demo/demo.html new file mode 100755 index 000000000..ad193e5cc --- /dev/null +++ b/comps/AutoFixed/_demo/demo.html @@ -0,0 +1,80 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.position.absolute.html b/comps/AutoFixed/_demo/demo.position.absolute.html new file mode 100755 index 000000000..e343944a9 --- /dev/null +++ b/comps/AutoFixed/_demo/demo.position.absolute.html @@ -0,0 +1,83 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.position.absolute.in.relative.html b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.html new file mode 100755 index 000000000..0812f454c --- /dev/null +++ b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.html @@ -0,0 +1,82 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.position.absolute.in.relative.left.html b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.left.html new file mode 100755 index 000000000..45fc2a227 --- /dev/null +++ b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.left.html @@ -0,0 +1,82 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.position.absolute.in.relative.right.scroll.height.html b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.right.scroll.height.html new file mode 100755 index 000000000..37310a93b --- /dev/null +++ b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.right.scroll.height.html @@ -0,0 +1,128 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.position.absolute.in.relative.right.scroll.html b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.right.scroll.html new file mode 100755 index 000000000..63633888d --- /dev/null +++ b/comps/AutoFixed/_demo/demo.position.absolute.in.relative.right.scroll.html @@ -0,0 +1,127 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.top50.html b/comps/AutoFixed/_demo/demo.top50.html new file mode 100755 index 000000000..d2ae313be --- /dev/null +++ b/comps/AutoFixed/_demo/demo.top50.html @@ -0,0 +1,80 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/demo.top50.right50.html b/comps/AutoFixed/_demo/demo.top50.right50.html new file mode 100755 index 000000000..ae563aad9 --- /dev/null +++ b/comps/AutoFixed/_demo/demo.top50.right50.html @@ -0,0 +1,82 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.AutoFixed - 示例

        + +
        +
        +
        +
        +
          +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        • test
        • +
        +
        +
        +
        + after content +
        +
        +
        + + + + diff --git a/comps/AutoFixed/_demo/index.php b/comps/AutoFixed/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/AutoFixed/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AutoFixed/index.php b/comps/AutoFixed/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/AutoFixed/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/AutoFixed/res/default/style.css b/comps/AutoFixed/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/comps/AutoFixed/res/default/style.html b/comps/AutoFixed/res/default/style.html new file mode 100755 index 000000000..721dc5b03 --- /dev/null +++ b/comps/AutoFixed/res/default/style.html @@ -0,0 +1,11 @@ + + + + +suches template + + + + + + diff --git a/comps/AutoSelect/AutoSelect.js b/comps/AutoSelect/AutoSelect.js old mode 100644 new mode 100755 index ae84664c9..e14643af9 --- a/comps/AutoSelect/AutoSelect.js +++ b/comps/AutoSelect/AutoSelect.js @@ -1,14 +1,16 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ //TODO: 添加数据缓存逻辑 -;(function($){ /** *

        select 级联下拉框无限联动

        *
        只要引用本脚本, 页面加载完毕时就会自动初始化级联下拉框功能 *

        动态添加的 DOM 需要显式调用 JC.AutoSelect( domSelector ) 进行初始化 *

        要使页面上的级联下拉框功能能够自动初始化, 需要在select标签上加入一些HTML 属性 + *

        require: + * JC.common + *

        *

        JC Project Site * | API docs * | demo link

        - *

        requires: jQuery

        *

        select 标签可用的 HTML 属性

        *
        *
        defaultselect, 这个属性不需要赋值
        @@ -47,15 +49,43 @@ *
        selectbeforeinited = 初始化之前的回调
        * *
        selectinited = 初始化后的回调
        -
        function selectinited( _items ){ +<dd><pre>function selectinited( _items ){ var _ins = this; -} +}
        * *
        selectallchanged = 所有select请求完数据之后的回调, window 变量域
        - *
        function selectallchanged( _items ){ + * <dd><pre>function selectallchanged( _items ){ var _ins = this; -} +} + *
        + * + *
        selectCacheData = bool, default = true
        + *
        是否缓存ajax数据
        + * + *
        selectItemDataFilter = function
        + *
        每个select 显示option前,可自定义数据过滤函数 +
        function selectItemDataFilter2( _selector, _data, _pid){
        +    //alert( '_pid:' + _pid + '\n' + JSON.stringify( _data ) );
        +    var _r, i, j;
        +    if( _pid === '' ){//过滤北京id = 28
        +        _r = [];
        +        for( i = 0, j = _data.length; i < j; i++ ){
        +            if( _data[i][0] == 28 ) continue;
        +            _r.push( _data[i] );
        +        }
        +        _data = _r;
        +    }
        +    else if( _pid == 14 ){//过滤江门id=2254
        +        _r = [];
        +        for( i = 0, j = _data.length; i < j; i++ ){
        +            if( _data[i][0] == 2254 ) continue;
        +            _r.push( _data[i] );
        +        }
        +        _data = _r;
        +    }
        +    return _data;
        +}
        *
        *
        *

        option 标签可用的 HTML 属性

        @@ -111,6 +141,8 @@ JC.AutoSelect = AutoSelect; JC.Form && ( JC.Form.initAutoSelect = AutoSelect ); + JC.f.addAutoInit && JC.f.addAutoInit( AutoSelect ); + function AutoSelect( _selector ){ var _ins = []; _selector && ( _selector = $(_selector) ); @@ -444,7 +476,7 @@ if( _ignoreAction ) return; - JC.log( '_responeChange:', _sp.attr('name'), _v ); + //JC.log( '_responeChange:', _sp.attr('name'), _v ); if( !( _next && _next.length ) ){ _p.trigger( 'SelectChange' ); @@ -479,18 +511,18 @@ _url = _p._model.selecturl( _selector, _pid ); _token = _p._model.token( true ); - if( Model.ajaxCache( _url ) ){ + if( _p._model.selectCacheData() && Model.ajaxCache( _url ) ){ setTimeout( function(){ _data = Model.ajaxCache( _url ); - _p._view.update( _selector, _data ); + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data, _token ); }, 10 ); }else{ setTimeout( function(){ $.get( _url, function( _data ){ - _data = $.parseJSON( _data ); - Model.ajaxCache( _url, _data ); - _p._view.update( _selector, _data ); + _data = Model.ajaxCache( _url, $.parseJSON( _data ) ); + + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data, _token ); }); }, 10 ); @@ -502,12 +534,13 @@ } _url = _p._model.selecturl( _selector, _pid ); - if( Model.ajaxCache( _url ) ){ - _p._processData( _oldToken, _selector, _cb, Model.ajaxCache( _url ) ); + if( _p._model.selectCacheData() && Model.ajaxCache( _url ) ){ + _data = Model.ajaxCache( _url ); + _p._processData( _oldToken, _selector, _cb, _data, _pid ); }else{ $.get( _url, function( _data ){ _data = $.parseJSON( _data ); - _p._processData( _oldToken, _selector, _cb, Model.ajaxCache( _url, _data ) ); + _p._processData( _oldToken, _selector, _cb, Model.ajaxCache( _url, _data, _pid ) ); }); } } @@ -515,13 +548,13 @@ } , _processData: - function( _oldToken, _selector, _cb, _data ){ + function( _oldToken, _selector, _cb, _data, _pid ){ var _p = this; setTimeout( function(){ if( typeof _oldToken != 'undefined' && _oldToken != _p._model.token() ){ return; } - _p._view.update( _selector, _data ); + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data, _oldToken ); }, 10 ); } @@ -564,7 +597,7 @@ _p.trigger( 'SelectChange', [ _selector ] ); if( _next && _next.length ){ - JC.log( '_firstInitCb:', _selector.val(), _next.attr('name'), _selector.attr('name') ); + //JC.log( '_firstInitCb:', _selector.val(), _next.attr('name'), _selector.attr('name') ); _p._update( _next, _p._firstInitCb, _selector.val() ); } @@ -579,7 +612,7 @@ , _updateStatic: function( _selector, _cb, _pid ){ var _p = this, _data, _ignoreUpdate = false; - JC.log( 'static select' ); + //JC.log( 'static select' ); if( _p._model.isFirst( _selector ) ){ typeof _pid == 'undefined' && ( _pid = _p._model.selectparentid( _selector ) @@ -595,7 +628,7 @@ }else{ _data = _p._model.datacb( _selector )( _pid ); } - !_ignoreUpdate && _p._view.update( _selector, _data ); + !_ignoreUpdate && _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data ); return this; } @@ -603,7 +636,7 @@ , _updateNormal: function( _selector, _cb, _pid ){ var _p = this, _data; - JC.log( 'normal select' ); + //JC.log( 'normal select' ); if( _p._model.isFirst( _selector ) ){ var _next = _p._model.next( _selector ); typeof _pid == 'undefined' && ( _pid = _p._model.selectvalue( _selector ) || _selector.val() || '' ); @@ -617,7 +650,7 @@ }else{ _data = _p._model.datacb( _selector )( _pid ); } - _p._view.update( _selector, _data ); + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data ); return this; } @@ -642,7 +675,7 @@ _init: function(){ this._findAllItems( this._selector ); - JC.log( 'select items.length:', this._items.length ); + //JC.log( 'select items.length:', this._items.length ); this._initRelationship(); return this; } @@ -654,11 +687,18 @@ return this._token; } + , selectCacheData: + function(){ + var _r = true; + this.first().is( '[selectCacheData]' ) && ( _r = JC.f.parseBool( this.first().attr('selectCacheData') ) ); + return _r; + } + , _findAllItems: function( _selector ){ this._items.push( _selector ); _selector.is( '[selecttarget]' ) - && this._findAllItems( parentSelector( _selector, _selector.attr('selecttarget') ) ); + && this._findAllItems( JC.f.parentSelector( _selector, _selector.attr('selecttarget') ) ); } , _initRelationship: @@ -726,7 +766,7 @@ function( _selector ){ var _r = AutoSelect.randomurl; _selector.is('[selectrandomurl]') - && ( _r = parseBool( _selector.attr('selectrandomurl') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selectrandomurl') ) ) ; return _r; } @@ -736,12 +776,12 @@ var _r = AutoSelect.ignoreInitRequest; this.first().is('[selectignoreinitrequest]') - && ( _r = parseBool( this.first().attr('selectignoreinitrequest') ) ) + && ( _r = JC.f.parseBool( this.first().attr('selectignoreinitrequest') ) ) ; _selector && _selector.is('[selectignoreinitrequest]') - && ( _r = parseBool( _selector.attr('selectignoreinitrequest') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selectignoreinitrequest') ) ) ; return _r; } @@ -751,7 +791,7 @@ function(){ var _r = AutoSelect.triggerInitChange, _selector = this.first(); _selector.attr('selecttriggerinitchange') - && ( _r = parseBool( _selector.attr('selecttriggerinitchange') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selecttriggerinitchange') ) ) ; return _r; } @@ -763,13 +803,13 @@ _first && _first.length && _first.is('[selecthideempty]') - && ( _r = parseBool( _first.attr('selecthideempty') ) ) + && ( _r = JC.f.parseBool( _first.attr('selecthideempty') ) ) ; _selector && _selector.length && _selector.is('[selecthideempty]') - && ( _r = parseBool( _selector.attr('selecthideempty') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selecthideempty') ) ) ; return _r; } @@ -781,8 +821,8 @@ && window[ _selector.attr('selectprocessurl' ) ] && ( _cb = window[ _selector.attr('selectprocessurl' ) ] ) ; - _r = printf( _r, _pid ); - this.randomurl( _selector ) && ( _r = addUrlParams( _r, {'rnd': new Date().getTime() } ) ); + _r = JC.f.printf( _r, _pid ); + this.randomurl( _selector ) && ( _r = JC.f.addUrlParams( _r, {'rnd': new Date().getTime() } ) ); _cb && ( _r = _cb.call( _selector, _r, _pid ) ); return _r; } @@ -866,6 +906,15 @@ }); return _r; } + + , selectItemDataFilter: + function( _selector ){ + var _r; + _selector + && _selector.is( '[selectItemDataFilter]' ) + && ( _r = window[ _selector.attr( 'selectItemDataFilter' ) ] ); + return _r; + } }; function View( _model, _control ){ @@ -882,9 +931,13 @@ } , update: - function( _selector, _data ){ - var _default = this._model.selectvalue( _selector ); + function( _selector, _data, _pid ){ + var _p = this, _default = this._model.selectvalue( _selector ); _data = this._model.dataFilter( _selector, _data ); + + _p._model.selectItemDataFilter( _selector ) + && ( _data = _p._model.selectItemDataFilter( _selector )( _selector, _data, _pid ) ); + this._model.data( _selector, _data ); this._control.trigger( 'SelectItemBeforeUpdate', [ _selector, _data ] ); @@ -903,7 +956,7 @@ var _html = [], _tmp, _selected; for( var i = 0, j = _data.length; i < j; i++ ){ _tmp = _data[i]; - _html.push( printf( '', _tmp[0], _tmp[1], _selected ) ); + _html.push( JC.f.printf( '', _tmp[0], _tmp[1], _selected ) ); } $( _html.join('') ).appendTo( _selector ); @@ -953,5 +1006,13 @@ setTimeout( function(){ AutoSelect( document.body ); }, 200 ); }); -}(jQuery)); - + return JC.AutoSelect; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/AutoSelect/_demo/AutoSelect.crm.example.html b/comps/AutoSelect/_demo/AutoSelect.crm.example.html old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/AutoSelect.html b/comps/AutoSelect/_demo/AutoSelect.html old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/AutoSelect_static_data.html b/comps/AutoSelect/_demo/AutoSelect_static_data.html old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/ajax.ignore_init_request.html b/comps/AutoSelect/_demo/ajax.ignore_init_request.html old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/SHENGSHI.js b/comps/AutoSelect/_demo/data/SHENGSHI.js old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/autoInitCheckAll.php b/comps/AutoSelect/_demo/data/autoInitCheckAll.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/data1.js b/comps/AutoSelect/_demo/data/data1.js old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/infinity_cat.php b/comps/AutoSelect/_demo/data/infinity_cat.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/initCheckAll.php b/comps/AutoSelect/_demo/data/initCheckAll.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/shengshi.php b/comps/AutoSelect/_demo/data/shengshi.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/shengshi_html.php b/comps/AutoSelect/_demo/data/shengshi_html.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/data/shengshi_with_error_code.php b/comps/AutoSelect/_demo/data/shengshi_with_error_code.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/dynamic.settting.html b/comps/AutoSelect/_demo/dynamic.settting.html old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/_demo/index.php b/comps/AutoSelect/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/index.php b/comps/AutoSelect/index.php old mode 100644 new mode 100755 diff --git a/comps/AutoSelect/res/default/style.css b/comps/AutoSelect/res/default/style.css old mode 100644 new mode 100755 index 8d1c8b69c..8b1378917 --- a/comps/AutoSelect/res/default/style.css +++ b/comps/AutoSelect/res/default/style.css @@ -1 +1 @@ - + diff --git a/comps/BaseMVC/BaseMVC.js b/comps/BaseMVC/BaseMVC.js old mode 100644 new mode 100755 index 2b4f54e51..3e06357ee --- a/comps/BaseMVC/BaseMVC.js +++ b/comps/BaseMVC/BaseMVC.js @@ -1,9 +1,10 @@ -;(function($){ - window.JC && ( window.BaseMVC = JC.BaseMVC = BaseMVC ); +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ + window.BaseMVC = JC.BaseMVC = BaseMVC; /** - * MVC 抽象类 ( 仅供扩展用 ) - *

        这个类默认已经包含在lib.js里面, 不需要显式引用

        - *

        require: jQuery

        + * MVC 抽象类 ( 仅供扩展用, 这个类不能实例化) + *

        require: + * JC.common + *

        *

        JC Project Site * | API docs * | demo link

        @@ -37,18 +38,18 @@ function(){ var _p = this; - _p._beforeInit(); - _p._initHanlderEvent(); - $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ _p.on( _evtName, _cb ); }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ).slice( 2 ); - _p.trigger( _evtName, _data ); + var _data = JC.f.sliceArgs( arguments ).slice( 2 ); + return _p.triggerHandler( _evtName, _data ); }); + _p._beforeInit(); + _p._initHanlderEvent(); + _p._model.init(); _p._view && _p._view.init(); @@ -95,31 +96,73 @@ */ , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;} /** - * 使用 jquery trigger 绑定事件 + * 使用 jquery trigger 触发绑定事件 * @method {string} trigger * @param {string} _evtName + * @param {*|Array} _args * @return BaseMVCInstance */ , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;} + /** + * 使用 jquery triggerHandler 触发绑定事件 + * @method {string} triggerHandler + * @param {string} _evtName + * @param {*|Array} _args + * @return {*} + */ + , triggerHandler: function( _evtName, _data ){ return $(this).triggerHandler( _evtName, _data ); } + /** + * 通知选择器有新事件 + *
        JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件 + * @method notification + * @param {string} _evtName + * @param {*|Array} _args + */ + , notification: + function( _evtName, _args ){ + this._model.notification( _evtName, _args ); + } + /** + * 通知选择器有新事件, 有返回结果 + *
        JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件 + * @method notificationHandler + * @param {string} _evtName + * @param {*|Array} _args + * @return {*} + */ + , notificationHandler: + function( _evtName, _args ){ + return this._model.notificationHandler( _evtName, _args ); + } + } /** - * 获取或设置 BaseMVC 的实例 + * 获取或设置组件实例 * @method getInstance * @param {selector} _selector + * @param {Class} _staticClass + * @param {ClassInstance} _classInstance * @static - * @return {BaseMVCInstance} + * @return {ClassInstance | null} */ - /* BaseMVC.getInstance = - function( _selector, _setter ){ - if( typeof _selector == 'string' && !/仅供扩展用 ) - *

        这个类默认已经包含在lib.js里面, 不需要显式引用

        - *

        require: jQuery

        + *
        这个类默认已经包含在lib.js里面, 不需要显式引用 *

        JC Project Site - * | API docs - * | demo link

        + * | API docs + * | demo link

        + *

        see also: JC.BaseMVC

        * @namespace JC * @class BaseMVC.Model * @constructor @@ -220,7 +260,7 @@ * @version dev 0.1 2013-09-11 * @author qiushaowei | 75 Team */ - BaseMVC.buildModel( BaseMVC ); + //BaseMVC.buildModel( BaseMVC ); /** * 设置 selector 实例引用的 data 属性名 * @property _instanceName @@ -230,11 +270,77 @@ * @static */ BaseMVC.Model._instanceName = 'BaseMVCIns'; - BaseMVC.Model.prototype = { + JC.f.extendObject( BaseMVC.Model.prototype, { init: function(){ return this; } + /** + * 使用 jquery on 为 controler 绑定事件 + * @method {string} on + * @param {string} _evtName + * @param {function} _cb + */ + , on: + function(){ + $( this ).trigger( 'BindEvent', JC.f.sliceArgs( arguments ) ); + return this; + } + /** + * 使用 jquery trigger 触发 controler 绑定事件 + * @method {string} trigger + * @param {string} _evtName + * @param {*|Array} _args + */ + , trigger: + function( _evtName, _args ){ + _args = _args || []; + !jQuery.isArray( _args ) && ( _args = [ _args ] ); + _args.unshift( _evtName ); + $( this ).trigger( 'TriggerEvent', _args ); + return this; + } + /** + * 使用 jquery trigger 触发 controler 绑定事件( 有换回数据 ) + * @method {string} trigger + * @param {string} _evtName + * @param {*|Array} _args + * @return {*} + */ + , triggerHandler: + function( _evtName, _args ){ + _args = _args || []; + !jQuery.isArray( _args ) && ( _args = [ _args ] ); + _args.unshift( _evtName ); + return $( this ).trigger( 'TriggerEvent', _args ); + } + /** + * 通知选择器有新事件 + * @method notification + * @param {string} _evtName + * @param {*|Array} _args + */ + , notification: + function( _evtName, _args ){ + this.selector() + && this.selector().length + && this.selector().trigger( _evtName, _args ); + } + /** + * 通知选择器有新事件 + * @method notificationHandler + * @param {string} _evtName + * @param {*|Array} _args + * @return {*} + */ + , notificationHandler: + function( _evtName, _args ){ + var _r; + this.selector() + && this.selector().length + && ( _r = this.selector().triggerHandler( _evtName, _args ) ); + return _r; + } /** * 初始化的 jq 选择器 * @method selector @@ -325,7 +431,7 @@ var _r = ''; _selector && _selector.is( '[' + _key + ']' ) - && ( _r = _selector.attr( _key ).trim() ); + && ( ( _r = _selector.attr( _key ) || '' ).trim() ); return _r; } @@ -352,7 +458,7 @@ var _r = undefined; _selector && _selector.is( '[' + _key + ']' ) - && ( _r = parseBool( _selector.attr( _key ).trim() ) ); + && ( _r = JC.f.parseBool( _selector.attr( _key ).trim() ) ); return _r; } /** @@ -378,6 +484,17 @@ ; return _r; } + /** + * 获取与属性名匹配的 window 变量 + * @method windowProp + * @param {selector|string} _selector 如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector() + * @param {string} _key + * @return {window variable} + */ + , windowProp: + function(){ + return this.callbackProp.apply( this, JC.f.sliceArgs( arguments ) ); + } /** * 获取 selector 属性的 jquery 选择器 * @method selectorProp @@ -397,10 +514,81 @@ _selector && _selector.is( '[' + _key + ']' ) - && ( _r = parentSelector( _selector, _selector.attr( _key ) ) ); + && ( _r = JC.f.parentSelector( _selector, _selector.attr( _key ) ) ); return _r; } + /** + * 获取 脚本模板 jquery 选择器 + * @method scriptTplProp + * @param {selector|string} _selector 如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector() + * @param {string} _key + * @return string + */ + , scriptTplProp: + function( _selector, _key ){ + var _r = '', _tmp; + if( typeof _key == 'undefined' ){ + _key = _selector; + _selector = this.selector(); + }else{ + _selector && ( _selector = $( _selector ) ); + } + + _selector + && _selector.is( '[' + _key + ']' ) + && ( _tmp = JC.f.parentSelector( _selector, _selector.attr( _key ) ) ) + && _tmp.length + && ( _r = JC.f.scriptContent( _tmp ) ); + + return _r; + } + /** + * 获取 脚本数据 jquery 选择器 + * @method scriptDataProp + * @param {selector|string} _selector 如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector() + * @param {string} _key + * @return object + */ + , scriptDataProp: + function( _selector, _key ){ + var _r = null, _tmp; + _tmp = this.scriptTplProp( _selector, _key ); + + if( _tmp ){ + _tmp = _tmp.replace( /^[\s]*?\/\/[\s\S]*?[\r\n]/gm, '' ); + _tmp = _tmp.replace( /[\r\n]/g, '' ); + _tmp = _tmp.replace( /\}[\s]*?,[\s]*?\}$/g, '}}'); + _r = eval( '(' + _tmp + ')' ); + } + + return _r; + } + + /** + * 获取 selector 属性的 json 数据 + * @method jsonProp + * @param {selector|string} _selector 如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector() + * @param {string} _key + * @return {json | null} + */ + , jsonProp: + function( _selector, _key ){ + var _r; + if( typeof _key == 'undefined' ){ + _key = _selector; + _selector = this.selector(); + }else{ + _selector && ( _selector = $( _selector ) ); + } + + _selector + && _selector.is( '[' + _key + ']' ) + && ( _r = eval( '(' + _selector.attr( _key ) + ')' ) ); + + return _r; + } + /** * 判断 _selector 是否具体某种特征 * @method is @@ -419,19 +607,60 @@ return _selector && _selector.is( _key ); } - }; + }); - BaseMVC.buildView( BaseMVC ); - BaseMVC.View.prototype = { + JC.f.extendObject( BaseMVC.View.prototype, { init: function() { return this; } - }; - /* - $(document).ready( function(){ - setTimeout( function(){ - }, 1 ); + , selector: + function(){ + return this._model.selector(); + } + /** + * 使用 jquery on 为 controler 绑定事件 + */ + , on: + function(){ + $( this ).trigger( 'BindEvent', JC.f.sliceArgs( arguments ) ); + return this; + } + /** + * 使用 jquery trigger 触发 controler 绑定事件 + */ + , trigger: + function( _evtName, _args ){ + _args = _args || []; + !jQuery.isArray( _args ) && ( _args = [ _args ] ); + _args.unshift( _evtName ); + $( this ).trigger( 'TriggerEvent', _args ); + return this; + } + , triggerHandler: + function( _evtName, _args ){ + _args = _args || []; + !jQuery.isArray( _args ) && ( _args = [ _args ] ); + _args.unshift( _evtName ); + return $( this ).trigger( 'TriggerEvent', _args ); + } + , notification: + function( _evtName, _args ){ + this._model.notification( _evtName, _args ); + } + , notificationHandler: + function( _evtName, _args ){ + return this._model.notificationHandler( _evtName, _args ); + } }); - */ -}(jQuery)); + + return JC.BaseMVC; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/BaseMVC/_demo/build_bizClass.html b/comps/BaseMVC/_demo/build_bizClass.html old mode 100644 new mode 100755 index 0c3c2f934..cc6f1bbfc --- a/comps/BaseMVC/_demo/build_bizClass.html +++ b/comps/BaseMVC/_demo/build_bizClass.html @@ -13,53 +13,8 @@ diff --git a/comps/BaseMVC/_demo/build_bizClass_moreAdvance.html b/comps/BaseMVC/_demo/build_bizClass_moreAdvance.html old mode 100644 new mode 100755 index f3d6881b4..f0a42b26b --- a/comps/BaseMVC/_demo/build_bizClass_moreAdvance.html +++ b/comps/BaseMVC/_demo/build_bizClass_moreAdvance.html @@ -13,104 +13,8 @@ diff --git a/comps/BaseMVC/_demo/build_compClass.html b/comps/BaseMVC/_demo/build_compClass.html old mode 100644 new mode 100755 index e559e1518..b7d5959ab --- a/comps/BaseMVC/_demo/build_compClass.html +++ b/comps/BaseMVC/_demo/build_compClass.html @@ -13,54 +13,8 @@ diff --git a/comps/BaseMVC/_demo/build_compClass_moreAdvance.html b/comps/BaseMVC/_demo/build_compClass_moreAdvance.html old mode 100644 new mode 100755 index ca1db5836..39499ea75 --- a/comps/BaseMVC/_demo/build_compClass_moreAdvance.html +++ b/comps/BaseMVC/_demo/build_compClass_moreAdvance.html @@ -13,105 +13,8 @@ diff --git a/comps/BaseMVC/_demo/data/BizExample.js b/comps/BaseMVC/_demo/data/BizExample.js new file mode 100755 index 000000000..7e69a9be4 --- /dev/null +++ b/comps/BaseMVC/_demo/data/BizExample.js @@ -0,0 +1,67 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ + var _jdoc = $( document ), _jwin = $( window ); + + Bizs.BizExample = BizExample; + + function BizExample( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, BizExample ) ) + return JC.BaseMVC.getInstance( _selector, BizExample ); + + JC.BaseMVC.getInstance( _selector, BizExample, this ); + + this._model = new BizExample.Model( _selector ); + this._view = new BizExample.View( this._model ); + + this._init(); + + JC.log( BizExample.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 BizExample 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of BizExampleInstance} + */ + BizExample.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_bizBizExample' ) ){ + _r.push( new BizExample( _selector ) ); + }else{ + _selector.find( 'div.js_bizBizExample' ).each( function(){ + _r.push( new BizExample( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( BizExample ); + + BizExample.Model._instanceName = 'JCBizExample'; + + _jdoc.ready( function(){ + var _insAr = 0; + BizExample.autoInit + && ( _insAr = BizExample.init() ) + && $( '

        BizExample total ins: ' + + _insAr.length + '
        ' + new Date().getTime() + '

        ' ).appendTo( document.body ) + ; + }); + + return Bizs.BizExample; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/BaseMVC/_demo/data/BizExampleMoreAdvance.js b/comps/BaseMVC/_demo/data/BizExampleMoreAdvance.js new file mode 100755 index 000000000..e23a446a0 --- /dev/null +++ b/comps/BaseMVC/_demo/data/BizExampleMoreAdvance.js @@ -0,0 +1,132 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 组件用途简述 + * + *

        require: + * jQuery + * , JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会自动处理 div class="js_bizBizExampleMoreAdvance"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        + *
        + *
        + * + * @namespace window.Bizs + * @class BizExampleMoreAdvance + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +

        Bizs.BizExampleMoreAdvance 示例

        + */ + var _jdoc = $( document ), _jwin = $( window ); + + Bizs.BizExampleMoreAdvance = BizExampleMoreAdvance; + + function BizExampleMoreAdvance( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, BizExampleMoreAdvance ) ) + return JC.BaseMVC.getInstance( _selector, BizExampleMoreAdvance ); + + JC.BaseMVC.getInstance( _selector, BizExampleMoreAdvance, this ); + + this._model = new BizExampleMoreAdvance.Model( _selector ); + this._view = new BizExampleMoreAdvance.View( this._model ); + + this._init(); + + JC.log( BizExampleMoreAdvance.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 BizExampleMoreAdvance 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of BizExampleMoreAdvanceInstance} + */ + BizExampleMoreAdvance.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_bizBizExampleMoreAdvance' ) ){ + _r.push( new BizExampleMoreAdvance( _selector ) ); + }else{ + _selector.find( 'div.js_bizBizExampleMoreAdvance' ).each( function(){ + _r.push( new BizExampleMoreAdvance( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( BizExampleMoreAdvance ); + + JC.f.extendObject( BizExampleMoreAdvance.prototype, { + _beforeInit: + function(){ + JC.log( 'BizExampleMoreAdvance _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + }); + } + + , _inited: + function(){ + JC.log( 'BizExampleMoreAdvance _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + BizExampleMoreAdvance.Model._instanceName = 'JCBizExampleMoreAdvance'; + JC.f.extendObject( BizExampleMoreAdvance.Model.prototype, { + init: + function(){ + JC.log( 'BizExampleMoreAdvance.Model.init:', new Date().getTime() ); + } + }); + + JC.f.extendObject( BizExampleMoreAdvance.View.prototype, { + init: + function(){ + JC.log( 'BizExampleMoreAdvance.View.init:', new Date().getTime() ); + } + }); + + _jdoc.ready( function(){ + var _insAr = 0; + BizExampleMoreAdvance.autoInit + && ( _insAr = BizExampleMoreAdvance.init() ) + && $( '

        BizExampleMoreAdvance total ins: ' + + _insAr.length + '
        ' + new Date().getTime() + '

        ' ).appendTo( document.body ) + ; + }); + + return Bizs.BizExampleMoreAdvance; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/BaseMVC/_demo/data/CompExample.js b/comps/BaseMVC/_demo/data/CompExample.js new file mode 100755 index 000000000..51207073d --- /dev/null +++ b/comps/BaseMVC/_demo/data/CompExample.js @@ -0,0 +1,66 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ + var _jdoc = $( document ), _jwin = $( window ); + + JC.CompExample = CompExample; + + function CompExample( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, CompExample ) ) + return JC.BaseMVC.getInstance( _selector, CompExample ); + + JC.BaseMVC.getInstance( _selector, CompExample, this ); + + this._model = new CompExample.Model( _selector ); + this._view = new CompExample.View( this._model ); + + this._init(); + + JC.log( CompExample.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 CompExample 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of CompExampleInstance} + */ + CompExample.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compCompExample' ) ){ + _r.push( new CompExample( _selector ) ); + }else{ + _selector.find( 'div.js_compCompExample' ).each( function(){ + _r.push( new CompExample( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( CompExample ); + CompExample.Model._instanceName = 'JCCompExample'; + + _jdoc.ready( function(){ + var _insAr = 0; + CompExample.autoInit + && ( _insAr = CompExample.init() ) + && $( '

        CompExample total ins: ' + + _insAr.length + '
        ' + new Date().getTime() + '

        ' ).appendTo( document.body ) + ; + }); + + return JC.CompExample; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/BaseMVC/_demo/data/CompExampleMoreAdvance.js b/comps/BaseMVC/_demo/data/CompExampleMoreAdvance.js new file mode 100755 index 000000000..380fbfd1f --- /dev/null +++ b/comps/BaseMVC/_demo/data/CompExampleMoreAdvance.js @@ -0,0 +1,132 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 组件用途简述 + * + *

        require: + * jQuery + * , JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 div class="js_compCompExampleMoreAdvance"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        + *
        + *
        + * + * @namespace JC + * @class CompExampleMoreAdvance + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +

        JC.CompExampleMoreAdvance 示例

        + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.CompExampleMoreAdvance = CompExampleMoreAdvance; + + function CompExampleMoreAdvance( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, CompExampleMoreAdvance ) ) + return JC.BaseMVC.getInstance( _selector, CompExampleMoreAdvance ); + + JC.BaseMVC.getInstance( _selector, CompExampleMoreAdvance, this ); + + this._model = new CompExampleMoreAdvance.Model( _selector ); + this._view = new CompExampleMoreAdvance.View( this._model ); + + this._init(); + + JC.log( CompExampleMoreAdvance.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 CompExampleMoreAdvance 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of CompExampleMoreAdvanceInstance} + */ + CompExampleMoreAdvance.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compCompExampleMoreAdvance' ) ){ + _r.push( new CompExampleMoreAdvance( _selector ) ); + }else{ + _selector.find( 'div.js_compCompExampleMoreAdvance' ).each( function(){ + _r.push( new CompExampleMoreAdvance( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( CompExampleMoreAdvance ); + + JC.f.extendObject( CompExampleMoreAdvance.prototype, { + _beforeInit: + function(){ + JC.log( 'CompExampleMoreAdvance _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + }); + } + + , _inited: + function(){ + JC.log( 'CompExampleMoreAdvance _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + CompExampleMoreAdvance.Model._instanceName = 'JCCompExampleMoreAdvance'; + JC.f.extendObject( CompExampleMoreAdvance.Model.prototype, { + init: + function(){ + JC.log( 'CompExampleMoreAdvance.Model.init:', new Date().getTime() ); + } + }); + + JC.f.extendObject( CompExampleMoreAdvance.View.prototype, { + init: + function(){ + JC.log( 'CompExampleMoreAdvance.View.init:', new Date().getTime() ); + } + }); + + _jdoc.ready( function(){ + var _insAr = 0; + CompExampleMoreAdvance.autoInit + && ( _insAr = CompExampleMoreAdvance.init() ) + && $( '

        CompExampleMoreAdvance total ins: ' + + _insAr.length + '
        ' + new Date().getTime() + '

        ' ).appendTo( document.body ) + ; + }); + + return JC.CompExampleMoreAdvance; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/BaseMVC/_demo/index.php b/comps/BaseMVC/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/BaseMVC/index.php b/comps/BaseMVC/index.php old mode 100644 new mode 100755 diff --git a/comps/Calendar/Calendar.date.js b/comps/Calendar/Calendar.date.js new file mode 100755 index 000000000..fd1e2bf4d --- /dev/null +++ b/comps/Calendar/Calendar.date.js @@ -0,0 +1,2100 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ +//TODO: minvalue, maxvalue 添加默认日期属性识别属性 + /** + * 日期选择组件 + *
        全局访问请使用 JC.Calendar 或 Calendar + *
        DOM 加载完毕后 + * , Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签 + *
        Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector ) + *
        _selector 可以是 新加载的容器, 也可以是新加载的所有input + *

        require: + * JC.common + *

        + *

        JC Project Site + * | API docs + * | demo link

        + *

        可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season)

        + *
        + *
        defaultdate = ISO Date
        + *
        默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性
        + * + *
        datatype = string
        + *
        + * 声明日历控件的类型: + *
        date: 日期日历 + *
        week: 周日历 + *
        month: 月日历 + *
        season: 季日历 + *
        year: 年日历 + *
        monthday: 多选日期日历 + *
        + * + *
        multidate = string
        + *
        + * 与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突 + *
        + * + *
        calendarshow = function
        + *
        显示日历时的回调 +
        function calendarshow( _selector, _ins ){
        +    var _selector = $(this);
        +    UXC.log( 'calendarshow', _selector.val() );
        +}
        +
        + * + *
        calendarhide = function
        + *
        隐藏日历时的回调 +
        function calendarhide( _selector, _ins ){
        +    var _selector = $(this);
        +    UXC.log( 'calendarhide', _selector.val() );
        +}
        + * + *
        calendarlayoutchange = function
        + *
        用户点击日历控件操作按钮后, 外观产生变化时触发的回调 +
        function calendarlayoutchange( _selector, _ins ){
        +    var _selector = $(this);
        +    JC.log( 'calendarlayoutchange', _selector.val() );
        +}
        +
        + * + *
        calendarupdate = function
        + *
        + * 赋值后触发的回调 +
        function calendarupdate( _startDate, _endDate, _ins ){
        +    var _selector = $(this);
        +    JC.log( 'calendarupdate', _selector.val(), _startDate, _endDate );
        +}
        +
        + * + *
        calendarclear = function
        + *
        清空日期触发的回调 +
        function calendarclear( _selector, _ins ){
        +    var _selector = $(this);
        +}
        + * + *
        minvalue = ISO Date
        + *
        日期的最小时间, YYYY-MM-DD
        + * + *
        maxvalue = ISO Date
        + *
        日期的最大时间, YYYY-MM-DD
        + * + *
        currentcanselect = bool, default = true
        + *
        当前日期是否能选择
        + * + *
        multiselect = bool (目前支持 month: default=false, monthday: default = true)
        + *
        是否为多选日历
        + * + *
        calendarupdatemultiselect = function
        + *
        + * 多选日历赋值后触发的回调 + *
        + *
        参数: _data:
        + *
        + * [{"start": Date,"end": Date}[, {"start": Date,"end": Date}... ] ] + *
        + *
        +
        function calendarupdatemultiselect( _data, _ins ){
        +    var _selector = $(this);
        +    window.JSON && ( _data = JSON.stringify( _data ) );
        +    JC.log( 'calendarupdatemultiselect:'
        +        , JC.f.printf( 'val:{0}, data:{1}', _selector.val(), _data ) );
        +}
        + * + *
        dateFormat = string
        + *
        + * 自定义日期格式化显示, 使用 JC.f.dateFormat 函数进行格式化 + *
        如果日期去除非数字后不是 8/16 位数字的话, 需要 显式声明 dateParse 属性, 自定义日期解析函数 + *
        + * + *
        fullDateFormat = string
        + *
        + * 针对 日期类型: 月/季/年 定义显示格式, default: "{0} 至 {1}" + *
        {0}代表开始日期, {1}代表结束日期 + *
        + * + *
        ignoreInitCalendarDate = bool, default = false
        + *
        是否忽略初始化 控件的值
        + * + *
        dateParse = function
        + *
        + * 自定义日期格式函数, 针对日期不能解析为 8 位数字的特殊日期 + *
        例子: +
        //
        +/// 针对月份日期格式化 YY-MM
        +//
        +function parseYearMonthDate( _dateStr ){
        +    _dateStr = $.trim( _dateStr || '' );
        +    var _r = { start: null, end: null };
        +    if( !_dateStr ) return _r;
        +
        +    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
        +    var _year = _dateStr.slice( 0, 4 ), _month = parseInt( _dateStr.slice( 4 ), 10 ) - 1;
        +
        +    _r.start = new Date( _year, _month, 1 );
        +    return _r;
        +}
        +//
        +/// 针对季度日期格式化 YY-MM ~ YY-MM
        +//
        +function parseSeasonDate( _dateStr ){
        +    _dateStr = $.trim( _dateStr || '' );
        +    var _r = { start: null, end: null };
        +    if( !_dateStr ) return _r;
        +
        +    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
        +
        +    _r.start = JC.f.parseISODate( _dateStr.slice( 0, 6 ) + '01' );
        +    _r.end = JC.f.parseISODate( _dateStr.slice( 6 ) + '01' );
        +
        +    return _r;
        +}
        +//
        +/// 针对年份日期格式化 YY
        +//
        +function parseYearDate( _dateStr ){
        +    _dateStr = $.trim( _dateStr || '' );
        +    var _r = { start: null, end: null };
        +    if( !_dateStr ) return _r;
        +
        +    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
        +    var _year = _dateStr.slice( 0, 4 );
        +
        +    _r.start = new Date( _year, 0, 1 );
        +    return _r;
        +}
        + *
        + *
        + * @namespace JC + * @class Calendar + * @version dev 0.3, 2013-12-09 添加 年日历, 优化继承代码块 + * @version dev 0.2, 2013-09-01 过程式转单例模式 + * @version dev 0.1, 2013-06-04 + * @author qiushaowei | 75 team + */ + window.Calendar = JC.Calendar = Calendar; + JC.f.addAutoInit && JC.f.addAutoInit( Calendar ); + function Calendar( _selector ){ + if( Calendar.getInstance( _selector ) ) return Calendar.getInstance( _selector ); + Calendar.getInstance( _selector, this ); + + var _type = Calendar.type( _selector ); + + //JC.log( 'Calendar init:', _type, new Date().getTime() ); + + switch( _type ){ + case 'week': + { + this._model = new Calendar.WeekModel( _selector ); + this._view = new Calendar.WeekView( this._model ); + break; + } + case 'month': + { + this._model = new Calendar.MonthModel( _selector ); + this._view = new Calendar.MonthView( this._model ); + break; + } + case 'season': + { + this._model = new Calendar.SeasonModel( _selector ); + this._view = new Calendar.SeasonView( this._model ); + break; + } + case 'year': + { + this._model = new Calendar.YearModel( _selector ); + this._view = new Calendar.YearView( this._model ); + break; + } + case 'monthday': + { + + this._model = new Calendar.MonthDayModel( _selector ); + this._view = new Calendar.MonthDayView( this._model ); + break; + } + default: + { + this._model = new Calendar.Model( _selector ); + this._view = new Calendar.View( this._model ); + break; + } + } + + this._init(); + } + + Calendar.prototype = { + /** + * 内部初始化函数 + * @method _init + * @private + */ + _init: + function(){ + var _p = this; + + _p._initHanlderEvent(); + + $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ + _p.on( _evtName, _cb ); + }); + + $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ + var _data = JC.f.sliceArgs( arguments ).slice(2); + _p.trigger( _evtName, _data ); + }); + + _p._model.init(); + _p._view.init(); + + return _p; + } + /** + * 初始化相关操作事件 + * @method _initHanlderEvent + * @private + */ + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( Calendar.Model.INITED, function( _evt ){ + _p._model.calendarinited() + && _p._model.calendarinited().call( _p._model.selector(), _p._model.layout(), _p ); + }); + + _p.on( Calendar.Model.SHOW, function( _evt ){ + _p._model.calendarshow() + && _p._model.calendarshow().call( _p._model.selector(), _p._model.selector(), _p ); + }); + + _p.on( Calendar.Model.HIDE, function( _evt ){ + _p._model.calendarhide() + && _p._model.calendarhide().call( _p._model.selector(), _p._model.selector(), _p ); + }); + + _p.on( Calendar.Model.UPDATE, function( _evt ){ + if( !_p._model.selector() ) return; + + _p._model.selector().blur(); + _p._model.selector().trigger('change'); + + var _data = [] + , _v = _p._model.selector().val().trim() + , _startDate, _endDate + , _tmp, _item + , _tmpStart, _tmpEnd + ; + + if( _v ){ + _tmp = _v.split( ',' ); + for( var i = 0, j = _tmp.length; i < j; i++ ){ + + if( _p._model.dateParse( _p._model.selector() ) ){ + var _tmpDataObj = _p._model.dateParse( _p._model.selector() )( _tmp[i] ); + _startDate = _tmpDataObj.start; + _endDate = _tmpDataObj.end; + !_endDate && ( _endDate = _startDate ); + }else{ + _item = _tmp[i].replace( /[^\d]/g, '' ); + if( _item.length == 16 ){ + _tmpStart = JC.f.parseISODate( _item.slice( 0, 8 ) ); + _tmpEnd = JC.f.parseISODate( _item.slice( 8 ) ); + }else if( _item.length == 8 ){ + _tmpStart = JC.f.parseISODate( _item.slice( 0, 8 ) ); + _tmpEnd = JC.f.cloneDate( _tmpStart ); + } + if( i === 0 ){ + _startDate = JC.f.cloneDate( _tmpStart ); + _endDate = JC.f.cloneDate( _tmpEnd ); + } + } + _data.push( {'start': _tmpStart, 'end': _tmpEnd } ); + } + } + + _p._model.calendarupdate() + && _p._model.calendarupdate().apply( _p._model.selector(), [ _startDate, _endDate, _p ] ); + + _p._model.multiselect() + && _p._model.calendarupdatemultiselect() + && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _data, _p ); + }); + + _p.on( Calendar.Model.CLEAR, function( _evt ){ + _p._model.calendarclear() + && _p._model.calendarclear().call( _p._model.selector(), _p._model.selector(), _p ); + }); + + _p.on( Calendar.Model.CANCEL, function( _evt ){ + _p._model.calendarcancel() + && _p._model.calendarcancel().call( _p._model.selector(), _p._model.selector(), _p ); + }); + + _p.on( Calendar.Model.LAYOUT_CHANGE, function( _evt ){ + _p._model.calendarlayoutchange() + && _p._model.calendarlayoutchange().call( _p._model.selector(), _p._model.selector(), _p ); + }); + + _p.on( Calendar.Model.UPDATE_MULTISELECT, function( _evt ){ + _p._model.multiselect() + && _p._model.calendarupdatemultiselect() + && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _p._model.selector(), _p ); + }); + + return _p; + } + /** + * 显示 Calendar + * @method show + * @return CalendarInstance + */ + , show: + function(){ + Calendar.hide(); + Calendar.lastIpt = this._model.selector(); + this._view.show(); + this.trigger( Calendar.Model.SHOW ); + return this; + } + /** + * 隐藏 Calendar + * @method hide + * @return CalendarInstance + */ + , hide: function(){ + this._view.hide(); + this.trigger( Calendar.Model.HIDE ); + this.selector() && this.selector().blur(); + return this; + } + /** + * 获取 显示 Calendar 的触发源选择器, 比如 a 标签 + * @method selector + * @return selector + */ + , selector: function(){ return this._model.selector(); } + /** + * 获取 Calendar 外观的 选择器 + * @method layout + * @return selector + */ + , layout: function(){ return this._model.layout(); } + /** + * 使用 jquery on 绑定事件 + * @method {string} on + * @param {string} _evtName + * @param {function} _cb + * @return CalendarInstance + */ + , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;} + /** + * 使用 jquery trigger 绑定事件 + * @method {string} trigger + * @param {string} _evtName + * @return CalendarInstance + */ + , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;} + /** + * 用户操作日期控件时响应改变 + * @method updateLayout + */ + , updateLayout: + function(){ + this._view.updateLayout(); + return this; + } + /** + * 切换到不同日期控件源时, 更新对应的控件源 + * @method updateSelector + * @param {selector} _selector + */ + , updateSelector: + function( _selector ){ + Calendar.lastIpt = _selector; + this._model && this._model.selector( _selector ); + return this; + } + /** + * 用户改变年份时, 更新到对应的年份 + * @method updateYear + * @param {int} _offset + */ + , updateYear: + function( _offset ){ + this._view && this._view.updateYear( _offset ); + this.trigger( Calendar.Model.LAYOUT_CHANGE ); + return this; + } + /** + * 用户改变月份时, 更新到对应的月份 + * @method updateMonth + * @param {int} _offset + */ + , updateMonth: + function( _offset ){ + this._view && this._view.updateMonth( _offset ); + this.trigger( Calendar.Model.LAYOUT_CHANGE ); + return this; + } + /** + * 把选中的值赋给控件源 + *
        用户点击日期/确定按钮 + * @method updateSelected + * @param {selector} _userSelectedItem + */ + , updateSelected: + function( _userSelectedItem ){ + //JC.log( 'JC.Calendar: updateSelector', new Date().getTime() ); + this._view && this._view.updateSelected( _userSelectedItem ); + return this; + } + /** + * 显示日历外观到对应的控件源 + * @method updatePosition + */ + , updatePosition: + function(){ + this._view && this._view.updatePosition(); + return this; + } + /** + * 清除控件源内容 + * @method clear + */ + , clear: + function(){ + var _isEmpty = !this._model.selector().val().trim(); + this._model && this._model.selector().val(''); + !_isEmpty && this.trigger( Calendar.Model.CLEAR ); + return this; + } + /** + * 用户点击取消按钮时隐藏日历外观 + * @method cancel + */ + , cancel: + function(){ + this.trigger( Calendar.Model.CANCEL ); + this._view && this._view.hide(); + return this; + } + /*** + * 返回日历外观是否可见 + * @method visible + * @return bool + */ + , visible: + function(){ + var _r, _tmp; + this._model + && ( _tmp = this._model.layout() ) + && ( _r = _tmp.is(':visible') ) + ; + return _r; + } + /** + * 获取控件源的初始日期对象 + * @method defaultDate + * @param {selector} _selector + */ + , defaultDate: + function( _selector ){ + return this._model.defaultDate( _selector ); + } + + , updateFormat: function( _selector ){ this._model.updateFormat( _selector ); } + } + /** + * 获取或设置 Calendar 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {Calendar instance} + */ + Calendar.getInstance = + function( _selector, _setter ){ + typeof _selector == 'string' && !/目前有 date, week, month, season 四种类型的实例 + *
        每种类型都是单例模式 + * @prototype _ins + * @type object + * @default empty + * @private + * @static + */ + Calendar._ins = {}; + /** + * 获取控件源的实例类型 + *
        目前有 date, week, month, season 四种类型的实例 + * @method type + * @param {selector} _selector + * @return string + * @static + */ + Calendar.type = + function( _selector ){ + _selector = $(_selector); + var _r, _type = $.trim(_selector.attr('multidate') || '').toLowerCase() + || $.trim(_selector.attr('datatype') || '').toLowerCase(); + switch( _type ){ + case 'week': + case 'month': + case 'season': + case 'year': + case 'monthday': + { + _r = _type; + break; + } + default: _r = 'date'; break; + } + return _r; + }; + /** + * 判断选择器是否为日历组件的对象 + * @method isCalendar + * @static + * @param {selector} _selector + * return bool + */ + Calendar.isCalendar = + function( _selector ){ + _selector = $(_selector); + var _r = 0; + + if( _selector.length ){ + if( _selector.hasClass('UXCCalendar_btn') ) _r = 1; + if( _selector.prop('nodeName') + && _selector.attr('datatype') + && ( _selector.prop('nodeName').toLowerCase()=='input' || _selector.prop('nodeName').toLowerCase()=='button' ) + && ( _selector.attr('datatype').toLowerCase()=='date' + || _selector.attr('datatype').toLowerCase()=='week' + || _selector.attr('datatype').toLowerCase()=='month' + || _selector.attr('datatype').toLowerCase()=='season' + || _selector.attr('datatype').toLowerCase()=='year' + || _selector.attr('datatype').toLowerCase()=='daterange' + || _selector.attr('datatype').toLowerCase() == 'monthday' + )) _r = 1; + if( _selector.prop('nodeName') + && _selector.attr('multidate') + && ( _selector.prop('nodeName').toLowerCase()=='input' + || _selector.prop('nodeName').toLowerCase()=='button' ) + ) _r = 1; + } + + return _r; + }; + /** + * 请使用 isCalendar, 这个方法是为了向后兼容 + */ + Calendar.isCalendarElement = function( _selector ){ return Calendar.isCalendar( _selector ); }; + /** + * 弹出日期选择框 + * @method pickDate + * @static + * @param {selector} _selector 需要显示日期选择框的input[text] + * @example +
        +
        + + manual JC.Calendar.pickDate +
        +
        + + manual JC.Calendar.pickDate +
        +
        + + */ + Calendar.pickDate = + function( _selector ){ + _selector = $( _selector ); + if( !(_selector && _selector.length) ) return; + + var _ins, _isIgnore = _selector.is('[ignoreprocess]'); + + _selector.attr('ignoreprocess', true); + _selector.blur(); + !_isIgnore && _selector.removeAttr('ignoreprocess'); + + _ins = Calendar.getInstance( _selector ); + !_ins && ( _ins = new Calendar( _selector ) ); + _ins.show(); + return; + }; + /** + * 设置是否在 DOM 加载完毕后, 自动初始化所有日期控件 + * @property autoInit + * @default true + * @type {bool} + * @static + + */ + Calendar.autoInit = true; + /** + * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年 + * @property defaultDateSpan + * @type {int} + * @default 20 + * @static + + */ + Calendar.defaultDateSpan = 20; + /** + * 最后一个显示日历组件的文本框 + * @property lastIpt + * @type selector + * @static + */ + Calendar.lastIpt = null; + /** + * 自定义日历组件模板 + *

        默认模板为_logic.tpl

        + *

        如果用户显示定义JC.Calendar.tpl的话, 将采用用户的模板

        + * @property tpl + * @type {string} + * @default empty + * @static + */ + Calendar.tpl = ''; + /** + * 初始化外观后的回调函数 + * @property layoutInitedCallback + * @type function + * @static + * @default null + */ + Calendar.layoutInitedCallback = null; + /** + * 显示为可见时的回调 + * @property layoutShowCallback + * @type function + * @static + * @default null + */ + Calendar.layoutShowCallback = null; + /** + * 日历隐藏后的回调函数 + * @property layoutHideCallback + * @type function + * @static + * @default null + */ + Calendar.layoutHideCallback = null; + /** + * DOM 点击的过滤函数 + *
        默认 dom 点击时, 判断事件源不为 input[datatype=date|daterange] 会隐藏 Calendar + *
        通过该回调可自定义过滤, 返回 false 不执行隐藏操作 + * @property domClickFilter + * @type function + * @static + * @default null + */ + Calendar.domClickFilter = null; + /** + * 隐藏日历组件 + * @method hide + * @static + * @example + + */ + Calendar.hide = + function(){ + + for( var k in Calendar._ins ){ + Calendar._ins[ k] + && Calendar._ins[ k].visible() + && Calendar._ins[ k].hide() + ; + } + }; + /** + * 获取初始日期对象 + *

        这个方法将要废除, 请使用 instance.defaultDate()

        + * @method getDate + * @static + * @param {selector} _selector 显示日历组件的input + * return { date: date, minvalue: date|null, maxvalue: date|null, enddate: date|null } + */ + Calendar.getDate = + function( _selector ){ + return Calendar.getInstance( _selector ).defaultDate(); + }; + /** + * 每周的中文对应数字 + * @property cnWeek + * @type string + * @static + * @default 日一二三四五六 + */ + Calendar.cnWeek = "日一二三四五六"; + /** + * 100以内的中文对应数字 + * @property cnUnit + * @type string + * @static + * @default 十一二三四五六七八九 + */ + Calendar.cnUnit = "十一二三四五六七八九"; + /** + * 转换 100 以内的数字为中文数字 + * @method getCnNum + * @static + * @param {int} _num + * @return string + */ + Calendar.getCnNum = + function ( _num ){ + var _r = Calendar.cnUnit.charAt( _num % 10 ); + _num > 10 && ( _r = (_num % 10 !== 0 ? Calendar.cnUnit.charAt(0) : '') + _r ); + _num > 19 && ( _r = Calendar.cnUnit.charAt( Math.floor( _num / 10 ) ) + _r ); + return _r; + }; + /** + * 设置日历组件的显示位置 + * @method position + * @static + * @param {selector} _ipt 需要显示日历组件的文本框 + */ + Calendar.position = + function( _ipt ){ + Calendar.getInstance( _ipt ) + && Calendar.getInstance( _ipt ).updatePosition(); + }; + /** + * 这个方法后续版本不再使用, 请使用 Calendar.position + */ + Calendar.setPosition = Calendar.position; + /** + * 初始化日历组件的触发按钮 + * @method init + * @param {selector} _selector + * @private + */ + Calendar.init = Calendar.initTrigger = + function( _selector ){ + _selector.each( function(){ + var _p = $(this) + , _nodeName = (_p.prop('nodeName')||'').toLowerCase() + , _tmp, _dt + ; + + if( _nodeName != 'input' && _nodeName != 'textarea' ){ + Calendar.initTrigger( _selector.find( 'input[type=text], textarea' ) ); + return; + } + _dt = $.trim( _p.attr('datatype') || '').toLowerCase() + + if( !( + _dt == 'date' + || _dt == 'week' + || _dt == 'month' + || _dt == 'season' + || _dt == 'year' + || _dt == 'daterange' + || _dt == 'monthday' + || $.trim( _p.attr('multidate') || '') + ) ) return; + + + var _btn = _p.find( '+ input.UXCCalendar_btn' ); + if( !_btn.length ){ + _p.after( _btn = $('') ); + } + + ( _tmp = ( _p.attr('minvalue') || '' ) ) + && ( _tmp = JC.f.dateDetect( _tmp ) ) + && _p.attr( 'minvalue', JC.f.formatISODate( _tmp ) ) + ; + + ( _tmp = ( _p.attr('maxvalue') || '' ) ) + && ( _tmp = JC.f.dateDetect( _tmp ) ) + && _p.attr( 'maxvalue', JC.f.formatISODate( _tmp ) ) + ; + + //Calendar.fixDefaultDate( _p ); + if( !( JC.f.parseBool( _p.attr( 'ignoreInitCalendarDate' ) ) || JC.f.parseBool( _p.data( 'ignoreInitCalendarDate' ) ) ) ){ + + ( _tmp = _p.val().trim() ) + && ( _tmp = JC.f.dateDetect( _tmp ) ) + && _p.val( JC.f.formatISODate( _tmp ) ) + ; + + if( _p.is( '[dateFormat]' ) || _p.is( '[fullDateFormat]' ) ){ + var _ins = Calendar.getInstance( _selector ); + !_ins && ( _ins = new Calendar( _selector ) ); + _ins.updateSelector( _selector ); + _ins.updateFormat( _p ); + } + + if( ( _p.attr('datatype') || '' ).toLowerCase() == 'monthday' + || ( _p.attr('multidate') || '' ).toLowerCase() == 'monthday' ){ + if( !_p.is('[placeholder]') ){ + var _tmpDate = new Date(); + _p.attr('defaultdate') && ( _tmpDate = JC.f.parseISODate( _p.attr('defaultdate') ) || _tmpDate ); + _p.val().trim() && ( _tmpDate = JC.f.parseISODate( _p.val().replace( /[^d]/g, '').slice( 0, 8 ) ) || _tmpDate ); + _tmpDate && _p.attr( 'placeholder', JC.f.printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) ); + } + } + } + + _btn.data( Calendar.Model.INPUT, _p ); + }); + }; + + Calendar.fixDefaultDate = + function( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + var _tmp; + + _tmp = _selector.val().trim(); + if( _tmp ){ + _tmp = _tmp + .replace( Calendar.Model.REG_REMOVE_NOT_DIGITAL, '' ) + .replace( Calendar.Model.REG_REMOVE_ALL_ZERO, '' ) + ; + !_tmp && _selector.val( '' ); + } + + _tmp = ( _selector.attr( 'minvalue') || '' ).trim(); + if( _tmp ){ + _tmp = _tmp + .replace( Calendar.Model.REG_REMOVE_NOT_DIGITAL, '' ) + .replace( Calendar.Model.REG_REMOVE_ALL_ZERO, '' ) + ; + !_tmp && _selector.removeAttr( 'minvalue' ); + } + + _tmp = ( _selector.attr( 'maxvalue') || '' ).trim(); + if( _tmp ){ + _tmp = _tmp + .replace( Calendar.Model.REG_REMOVE_NOT_DIGITAL, '' ) + .replace( Calendar.Model.REG_REMOVE_ALL_ZERO, '' ) + ; + !_tmp && _selector.removeAttr( 'maxvalue' ); + } + }; + + Calendar.updateMultiYear = + function ( _date, _offset ){ + var _day, _max; + _day = _date.getDate(); + _date.setDate( 1 ); + _date.setFullYear( _date.getFullYear() + _offset ); + _max = JC.f.maxDayOfMonth( _date ); + _day > _max && ( _day = _max ); + _date.setDate( _day ); + return _date; + }; + + Calendar.updateMultiMonth = + function ( _date, _offset ){ + var _day, _max; + _day = _date.getDate(); + _date.setDate( 1 ); + _date.setMonth( _date.getMonth() + _offset ); + _max = JC.f.maxDayOfMonth( _date ); + _day > _max && ( _day = _max ); + _date.setDate( _day ); + return _date; + }; + + + /** + * 克隆 Calendar 默认 Model, View 的原型属性 + * @method clone + * @param {NewModel} _model + * @param {NewView} _view + */ + Calendar.clone = + function( _model, _view ){ + var _k; + if( _model ) + for( _k in Model.prototype ) _model.prototype[_k] = Model.prototype[_k]; + if( _view ) + for( _k in View.prototype ) _view.prototype[_k] = View.prototype[_k]; + }; + + function Model( _selector ){ + this._selector = _selector; + } + + Calendar.Model = Model; + Calendar.Model.INPUT = 'CalendarInput'; + + Calendar.Model.INITED = 'CalendarInited'; + Calendar.Model.SHOW = 'CalendarShow'; + Calendar.Model.HIDE = 'CalendarHide'; + Calendar.Model.UPDATE = 'CalendarUpdate'; + Calendar.Model.CLEAR = 'CalendarClear'; + Calendar.Model.CANCEL = 'CalendarCancel'; + Calendar.Model.LAYOUT_CHANGE = 'CalendarLayoutChange'; + Calendar.Model.UPDATE_MULTISELECT = 'CalendarUpdateMultiSelect'; + + Calendar.Model.REG_REMOVE_ALL_ZERO = /^[0]+$/; + Calendar.Model.REG_REMOVE_NOT_DIGITAL = /[^\d]+/g; + + Model.prototype = { + init: + function(){ + return this; + } + + , selector: + function( _setter ){ + typeof _setter != 'undefined' && ( this._selector = _setter ); + return this._selector; + } + , layout: + function(){ + var _r = $('#UXCCalendar'); + + if( !_r.length ){ + _r = $( Calendar.tpl || this.tpl ).hide(); + _r.attr('id', 'UXCCalendar').hide().appendTo( document.body ); + var _month = $( [ + '' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + ].join('') ).appendTo( _r.find('select.UMonth' ) ); + } + return _r; + } + , startYear: + function( _dateo ){ + var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear(); + this.selector().is('[calendardatespan]') + && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) ); + return _r - _span; + } + , endYear: + function( _dateo ){ + var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear(); + this.selector().is('[calendardatespan]') + && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) ); + return _r + _span; + } + , currentcanselect: + function(){ + var _r = true; + this.selector().is('[currentcanselect]') + && ( _r = JC.f.parseBool( this.selector().attr('currentcanselect') ) ); + return _r; + } + , year: + function(){ + return parseInt( this.layout().find('select.UYear').val(), 10 ) || 1; + } + , month: + function(){ + return parseInt( this.layout().find('select.UMonth').val(), 10 ) || 0; + } + , day: + function(){ + var _tmp, _date = new Date(); + _tmp = this.layout().find('td.cur > a[date], td.cur > a[dstart]'); + if( _tmp.length ){ + _date.setTime( _tmp.attr('date') || _tmp.attr('dstart') ); + } + return _date.getDate(); + } + , defaultDate: + function(){ + var _p = this, _r = { + date: null + , minvalue: null + , maxvalue: null + , enddate: null + , multidate: null + } + ; + _p.selector() && + ( + _r = _p.multiselect() + ? _p.defaultMultiselectDate( _r ) + : _p.defaultSingleSelectDate( _r ) + ); + + + if( _p.dateParse( _p.selector() ) ){ + //var _d = _p.dateParse(); + _p.selector().is('[minvalue]') + && ( _r.minvalue = ( _p.dateParse( _p.selector() )( _p.selector().attr('minvalue') ) ).start ); + + _p.selector().is('[maxvalue]') + && ( _r.maxvalue = ( _p.dateParse( _p.selector() )( _p.selector().attr('maxvalue') ) ).start ); + }else{ + _p.selector().is('[minvalue]') + && ( _r.minvalue = JC.f.parseISODate( _p.selector().attr('minvalue') ) ); + + _p.selector().is('[maxvalue]') + && ( _r.maxvalue = JC.f.parseISODate( _p.selector().attr('maxvalue') ) ); + } + + _r.minvalue && ( _r.minvalue = JC.f.pureDate( _r.minvalue ) ); + _r.maxvalue && ( _r.maxvalue = JC.f.pureDate( _r.maxvalue ) ); + + _r.date && _r.minvalue + && _r.minvalue.getTime() > _r.date.getTime() + && ( _r.date = JC.f.cloneDate( _r.minvalue ) ); + + _r.date && _r.maxvalue + && _r.maxvalue.getTime() < _r.date.getTime() + && ( _r.date = JC.f.cloneDate( _r.maxvalue) ); + + return _r; + } + , defaultSingleSelectDate: + function( _r ){ + var _p = this + , _selector = _p.selector() + , _tmp + , _v = _selector.val().trim() + ; + + if( !_v ){ + _r.date = new Date(); + + if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){ + _tmp = JC.f.parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp; + } + _tmp && ( _r.date = JC.f.pureDate( _tmp ) ); + + _r.enddate = JC.f.cloneDate( _r.date ); + return _r; + } + + if( _p.dateParse( _p.selector() ) ){ + var _tmpDataObj = _p.dateParse( _p.selector() )( _p.selector().val().trim() ); + _r.date = _tmpDataObj.start; + _r.enddate = _tmpDataObj.end; + !_r.enddate && ( _r.enddate = _r.date ); + }else{ + if( _tmp = JC.f.parseISODate( _selector.val() ) ) _r.date = _tmp; + else{ + if( _selector.val() && (_tmp = _selector.val().replace( /[^\d]/g, '' ) ).length == 16 ){ + _r.date = JC.f.parseISODate( _tmp.slice( 0, 8 ) ); + _r.enddate = JC.f.parseISODate( _tmp.slice( 8 ) ); + }else{ + _tmp = new Date(); + if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){ + _tmp = JC.f.parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp; + } + _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() ); + } + } + + } + + + return _r; + } + , defaultMultiselectDate: + function( _r ){ + var _p = this + , _selector = Calendar.lastIpt + , _tmp + , _multidatear + , _dstart, _dend + ; + + if( _selector.val() ){ + //JC.log( 'defaultMultiselectDate:', _p.selector().val(), ', ', _tmp ); + _tmp = _selector.val().trim().replace(/[^\d,]/g, '').split(','); + _multidatear = []; + + + $.each( _tmp, function( _ix, _item ){ + + if( _p.dateParse( _selector ) ){ + var _tmpDataObj = _p.dateParse( _selector )( _item ); + _dstart = _tmpDataObj.start; + _dend = _tmpDataObj.end; + !_dend && ( _dend = _dstart ); + _multidatear.push( { 'start': _dstart, 'end': _dend } ); + }else{ + + if( _item.length == 16 ){ + _dstart = JC.f.parseISODate( _item.slice( 0, 8 ) ); + _dend = JC.f.parseISODate( _item.slice( 8 ) ); + + if( !_ix ){ + _r.date = JC.f.cloneDate( _dstart ); + _r.enddate = JC.f.cloneDate( _dend ); + } + _multidatear.push( { 'start': _dstart, 'end': _dend } ); + }else if( _item.length == 8 ){ + _dstart = JC.f.parseISODate( _item.slice( 0, 8 ) ); + _dend = JC.f.cloneDate( _dstart ); + + if( !_ix ){ + _r.date = JC.f.cloneDate( _dstart ); + _r.enddate = JC.f.cloneDate( _dend ); + } + _multidatear.push( { 'start': _dstart, 'end': _dend } ); + } + } + }); + + _r.multidate = _multidatear; + + }else{ + _tmp = new Date(); + if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){ + _tmp = JC.f.parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp; + } + _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() ); + _r.enddate = JC.f.cloneDate( _r.date ); + _r.enddate.setDate( JC.f.maxDayOfMonth( _r.enddate ) ); + _r.multidate = []; + _r.multidate.push( {'start': JC.f.cloneDate( _r.date ), 'end': JC.f.cloneDate( _r.enddate ) } ); + } + return _r; + } + , layoutDate: + function(){ + return this.multiselect() ? this.multiLayoutDate() : this.singleLayoutDate(); + } + , singleLayoutDate: + function(){ + var _p = this + , _dateo = _p.defaultDate() + , _day = this.day() + , _max; + _dateo.date.setDate( 1 ); + _dateo.date.setFullYear( this.year() ); + _dateo.date.setMonth( this.month() ); + _max = JC.f.maxDayOfMonth( _dateo.date ); + _day > _max && ( _day = _max ); + _dateo.date.setDate( _day ); + return _dateo; + } + , multiLayoutDate: + function(){ + //JC.log( 'Calendar.Model multiLayoutDate', new Date().getTime() ); + var _p = this + , _dateo = _p.defaultDate() + , _year = _p.year() + , _month = _p.month() + , _day = _p.day() + , _newDate = new Date( _year, _month, 1 ) + , _max = JC.f.maxDayOfMonth( _newDate ) + , _monthSel = _p.layout().find('select.UMonth') + ; + + //JC.log( 'eeeeeeeeeee', _month ); + + _dateo.multidate = []; + + _p.layout().find('td.cur').each(function(){ + var _sp = $(this); + var _item = _sp.find('> a[dstart]'), _dstart = new Date(), _dend = new Date(); + _dstart.setTime( _item.attr('dstart') ); + _dend.setTime( _item.attr('dend') ); + _dateo.multidate.push( { 'start': _dstart, 'end': _dend } ); + }); + + /* + _dateo.date.setFullYear( _year ); + _dateo.enddate.setFullYear( _year ); + */ + _dateo.date = new Date( _year, _month, 1 ); + _dateo.date.enddate = new Date( _year, _month, _max ); + + if( _monthSel.length ){ + _dateo.date.setMonth( _month ); + _dateo.enddate.setMonth( _month ); + } + + + $.each( _dateo.multidate, function( _ix, _item ){ + _item.start.setFullYear( _year ); + _item.end.setFullYear( _year ); + if( _monthSel.length ){ + _item.start.setMonth( _month ); + _item.end.setMonth( _month ); + } + }); + + return _dateo; + + } + , selectedDate: + function(){ + var _r, _tmp, _item; + _tmp = this.layout().find('td.cur'); + _tmp.length + && !_tmp.hasClass( 'unable' ) + && ( _item = _tmp.find('a[date]') ) + && ( _r = new Date(), _r.setTime( _item.attr('date') ) ) + ; + return _r; + } + , multiselectDate: + function(){ + var _r = []; + return _r; + } + , calendarinited: + function(){ + var _ipt = this.selector(), _cb = Calendar.layoutInitedCallback, _tmp; + _ipt && _ipt.attr('calendarinited') + && ( _tmp = window[ _ipt.attr('calendarinited') ] ) + && ( _cb = _tmp ); + return _cb; + } + , calendarshow: + function(){ + var _ipt = this.selector(), _cb = Calendar.layoutShowCallback, _tmp; + _ipt && _ipt.attr('calendarshow') + && ( _tmp = window[ _ipt.attr('calendarshow') ] ) + && ( _cb = _tmp ); + return _cb; + } + , calendarhide: + function(){ + var _ipt = this.selector(), _cb = Calendar.layoutHideCallback, _tmp; + _ipt && _ipt.attr('calendarhide') + && ( _tmp = window[ _ipt.attr('calendarhide') ] ) + && ( _cb = _tmp ); + return _cb; + } + , calendarupdate: + function( _data ){ + var _ipt = this.selector(), _cb, _tmp; + _ipt && _ipt.attr('calendarupdate') + && ( _tmp = window[ _ipt.attr('calendarupdate') ] ) + && ( _cb = _tmp ); + return _cb; + } + , calendarclear: + function(){ + var _ipt = this.selector(), _cb, _tmp; + _ipt && _ipt.attr('calendarclear') + && ( _tmp = window[ _ipt.attr('calendarclear') ] ) + && ( _cb = _tmp ); + return _cb; + } + , calendarcancel: + function(){ + var _ipt = this.selector(), _cb, _tmp; + _ipt && _ipt.attr('calendarcancel') + && ( _tmp = window[ _ipt.attr('calendarcancel') ] ) + && ( _cb = _tmp ); + return _cb; + } + , calendarlayoutchange: + function(){ + var _ipt = this.selector(), _cb, _tmp; + _ipt && _ipt.attr('calendarlayoutchange') + && ( _tmp = window[ _ipt.attr('calendarlayoutchange') ] ) + && ( _cb = _tmp ); + return _cb; + } + , multiselect: + function(){ + var _r; + this.selector().is('[multiselect]') + && ( _r = JC.f.parseBool( this.selector().attr('multiselect') ) ); + return _r; + } + , calendarupdatemultiselect: + function( _data ){ + var _ipt = this.selector(), _cb, _tmp; + _ipt && _ipt.attr('calendarupdatemultiselect') + && ( _tmp = window[ _ipt.attr('calendarupdatemultiselect') ] ) + && ( _cb = _tmp ); + return _cb; + } + + , updateFormat: + function( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + var _p = this + , _type = ( _selector.attr('datetype') || _selector.attr('multidate') || '' ).toLowerCase().trim() + , _v = _selector.val().trim() + , _dp = _p.dateParse( _selector ) + , _dstart, _dend + , _do + ; + if( !_v ) return; + + if( _type == 'date' && !_selector.attr( 'fullDateFormat' ) ){ + _selector.attr( 'fullDateFormat', '{0}' ); + } + + if( _dp ){ + switch( _type ){ + case 'date': + { + break; + } + case 'week': + case 'month': + case 'season': + case 'year': + { + _do = _dp( _v ); + _selector.val( _p.fullFormat( _p.dateFormat( _do.start, _selector ) + , _p.dateFormat( _do.end, _selector ) + , _selector + ) ); + + break; + } + } + }else{ + switch( _type ){ + case 'date': + { + _dstart = JC.f.parseISODate( _v ); + _selector.val( _p.dateFormat( _dstart, _selector ) || _v ); + break; + } + } + } + } + + , dateFormat: + function( _date, _selector ){ + _selector = _selector || this.selector(); + var _r = '', _format = _selector.attr( 'dateFormat' ) || 'YY-MM-DD'; + _date && ( _r = JC.f.dateFormat( _date, _format ) ); + return _r; + } + + , fullFormat: + function( _date, _endDate, _selector ){ + _selector = _selector || this.selector(); + var _r = '', _fullFormat = _selector.attr( 'fullDateFormat' ) || '{0} 至 {1}'; + if( _date && _endDate ){ + _r = JC.f.printf( _fullFormat, this.dateFormat( _date, _selector ), this.dateFormat( _endDate, _selector ) ); + }else if( _date ){ + _r = JC.f.printf( _fullFormat, this.dateFormat( _date, _selector ) ); + }else if( _endDate ){ + _r = JC.f.printf( _fullFormat, this.dateFormat( _endDate, _selector ) ); + } + return _r; + } + + , dateParse: + function( _selector ){ + var _r; + + _selector + && _selector.attr( 'dateParse' ) + && ( _r = window[ _selector.attr( 'dateParse' ) ] ) + ; + + return _r; + } + + , tpl: + [ + '
        ' + ,'
        ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,'
        ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,' ' + ,'
        ' + ,' ' + ,' ' + ,' ' + ,' ' + ,'
        ' + ,'
        ' + ,' ' + ,' ' + ,' ' + ,'
        ' + ,'
        ' + ].join('') + }; + + function View( _model ){ + this._model = _model; + } + Calendar.View = View; + + View.prototype = { + init: + function() { + return this; + } + + , hide: + function(){ + this._model.layout().hide(); + } + + , show: + function(){ + var _dateo = this._model.defaultDate(); + //JC.log( 'Calendar.View: show', new Date().getTime(), JC.f.formatISODate( _dateo.date ) ); + + this._buildLayout( _dateo ); + this._buildDone(); + } + , updateLayout: + function( _dateo ){ + typeof _dateo == 'undefined' && ( _dateo = this._model.layoutDate() ); + /* + JC.log( + JC.f.formatISODate( _dateo.date ) + , JC.f.formatISODate( _dateo.minvalue) + , JC.f.formatISODate( _dateo.maxvalue) + ); + */ + + if( _dateo.minvalue || _dateo.maxvalue ){ + if( _dateo.minvalue && _dateo.date.getTime() < _dateo.minvalue.getTime() ){ + _dateo.date = JC.f.cloneDate( _dateo.minvalue ); + } + if( _dateo.maxvalue && _dateo.date.getTime() > _dateo.maxvalue.getTime() ){ + _dateo.date = JC.f.cloneDate( _dateo.maxvalue ); + } + } + + this._buildLayout( _dateo ); + this._buildDone(); + } + , updateYear: + function( _offset ){ + if( typeof _offset == 'undefined' || _offset == 0 ) return; + + var _dateo = this._model.layoutDate(), _date; + if( _dateo.minvalue || _dateo.maxvalue ){ + + var _fixYear; + _date = JC.f.cloneDate( _dateo.date ); + _date.setFullYear( _date.getFullYear() + _offset ); + if( _dateo.minvalue ){ + if( _date.getFullYear() < _dateo.minvalue.getFullYear() ){ + _date = JC.f.cloneDate( _dateo.minvalue ); + _offset = 0; + _fixYear = true; + }else if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() < + new Date( _dateo.minvalue.getFullYear(), _dateo.minvalue.getMonth(), 1 ).getTime() ){ + _offset = 0; + _date = JC.f.cloneDate( _dateo.minvalue ); + _fixYear = true; + } + } + if( _dateo.maxvalue ){ + if( _date.getFullYear() > _dateo.maxvalue.getFullYear() ){ + _offset = 0; + _date = JC.f.cloneDate( _dateo.maxvalue ); + _fixYear = true; + }else if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() > + new Date( _dateo.maxvalue.getFullYear(), _dateo.maxvalue.getMonth(), 1 ).getTime() ){ + _offset = 0; + _date = JC.f.cloneDate( _dateo.maxvalue ); + _fixYear = true; + } + } + + if( !_fixYear ) _date = null; + else { + } + } + + this._model.multiselect() + ? this.updateMultiYear( _offset, _date ) + : this.updateSingleYear( _offset, _date ) + ; + } + , updateSingleYear: + function( _offset, _date ){ + var _dateo = this._model.layoutDate(); + + if( _date ){ + _dateo.date = _date; + }else{ + var _day = _dateo.date.getDate(), _max; + _dateo.date.setDate( 1 ); + _dateo.date.setFullYear( _dateo.date.getFullYear() + _offset ); + _max = JC.f.maxDayOfMonth( _dateo.date ); + _day > _max && ( _day = _max ); + _dateo.date.setDate( _day ); + } + this._buildLayout( _dateo ); + this._buildDone(); + } + , updateMultiYear: + function( _offset, _date ){ + var _dateo = this._model.layoutDate(); + _dateo.date = _date || _dateo.date; + var _day, _max; + + JC.Calendar.updateMultiYear( _dateo.date, _offset ); + JC.Calendar.updateMultiYear( _dateo.enddate, _offset ); + + if( _dateo.multidate ){ + $.each( _dateo.multidate, function( _ix, _item ){ + JC.Calendar.updateMultiYear( _item.start, _offset ); + JC.Calendar.updateMultiYear( _item.end, _offset ); + }); + } + this._buildLayout( _dateo ); + this._buildDone(); + } + , updateMonth: + function( _offset ){ + if( typeof _offset == 'undefined' || _offset == 0 ) return; + + var _dateo = this._model.layoutDate(), _date; + if( _dateo.minvalue || _dateo.maxvalue ){ + _date = JC.f.cloneDate( _dateo.date ); + _date.setDate( 1 ); + _date.setMonth( _date.getMonth() + _offset ); + var _minvalue = _dateo.minvalue ? JC.f.cloneDate( _dateo.minvalue ) : null + , _maxvalue = _dateo.maxvalue ? JC.f.cloneDate( _dateo.maxvalue ) : null + , _fixDate + ; + _minvalue && _minvalue.setDate( 1 ); + _maxvalue && _maxvalue.setDate( 1 ); + if( _minvalue ){ + if( _date.getTime() < _minvalue.getTime() ) { + _offset = 0; + _date = JC.f.cloneDate( _dateo.minvalue ); + _fixDate = true; + } + if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() < + new Date( _dateo.minvalue.getFullYear(), _dateo.minvalue.getMonth(), 1 ).getTime() ){ + _offset = 0; + _date = JC.f.cloneDate( _dateo.minvalue ); + _fixDate = true; + } + + } + if( _maxvalue ){ + if( _date.getTime() > _maxvalue.getTime() ) { + _offset = 0; + _date = JC.f.cloneDate( _dateo.maxvalue ); + _fixDate = true; + } + if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() > + new Date( _dateo.maxvalue.getFullYear(), _dateo.maxvalue.getMonth(), 1 ).getTime() ){ + _offset = 0; + _date = JC.f.cloneDate( _dateo.maxvalue ); + _fixDate = true; + } + } + if( !_fixDate ) { + _date = null; + }else{ + var _md = JC.f.maxDayOfMonth( _date ), _newD = _dateo.date.getDate(); + _newD > _md && ( _newD = _md ); + _date.setDate( _newD ); + } + } + + this._model.multiselect() + ? this.updateMultiMonth( _offset, _date ) + : this.updateSingleMonth( _offset, _date ) + ; + } + , updateMultiMonth: + function( _offset, _date ){ + var _dateo = this._model.layoutDate(), _day, _max; + if( _date ){ + _dateo.date = _date; + _offset = 0; + }else{ + JC.Calendar.updateMultiMonth( _dateo.date, _offset ); + JC.Calendar.updateMultiMonth( _dateo.enddate, _offset ); + + if( _dateo.multidate ){ + $.each( _dateo.multidate, function( _ix, _item ){ + JC.Calendar.updateMultiMonth( _item.start, _offset ); + JC.Calendar.updateMultiMonth( _item.end, _offset ); + }); + } + } + + this._buildLayout( _dateo ); + this._buildDone(); + } + , updateSingleMonth: + function( _offset, _date ){ + var _dateo = this._model.layoutDate() + + if( _date ){ + _dateo.date = _date; + }else{ + var _day = _dateo.date.getDate(), _max; + + _dateo.date.setDate( 1 ); + _dateo.date.setMonth( _dateo.date.getMonth() + _offset ); + _max = JC.f.maxDayOfMonth( _dateo.date ); + _day > _max && ( _day = _max ); + _dateo.date.setDate( _day ); + } + this._buildLayout( _dateo ); + this._buildDone(); + } + , updateSelected: + function( _userSelectedItem ){ + var _p = this, _date, _tmp; + if( !_userSelectedItem ){ + _date = this._model.selectedDate(); + }else{ + _userSelectedItem = $( _userSelectedItem ); + _tmp = JC.f.getJqParent( _userSelectedItem, 'td' ); + if( _tmp && _tmp.hasClass('unable') ) return; + _date = new Date(); + _date.setTime( _userSelectedItem.attr('date') ); + } + if( !_date ) return; + + _p._model.selector().val( _p._model.dateFormat( _date ) ); + + $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'date', _date, _date ] ); + Calendar.hide(); + } + , updatePosition: + function(){ + var _p = this, _ipt = _p._model.selector(), _layout = _p._model.layout(); + if( !( _ipt && _layout && _ipt.length && _layout.length ) ) return; + _layout.css( {'left': '-9999px', 'top': '-9999px', 'z-index': ZINDEX_COUNT++ } ).show(); + var _lw = _layout.width(), _lh = _layout.height() + , _iw = _ipt.width(), _ih = _ipt.height(), _ioset = _ipt.offset() + , _x, _y, _winw = $(window).width(), _winh = $(window).height() + , _scrleft = $(document).scrollLeft() + , _scrtop = $(document).scrollTop() + ; + + _x = _ioset.left; _y = _ioset.top + _ih + 5; + + if( ( _y + _lh - _scrtop ) > _winh ){ + _y = _ioset.top - _lh - 3; + _y < _scrtop && ( _y = _scrtop ); + } + + if( ( _x + _lw -_scrleft ) > _winw ){ + _x = _winw - _lw + _scrleft - 5; + } + _x < _scrleft && ( _x = _scrleft + 0 ); + + _layout.css( {left: _x+'px', top: _y+'px'} ); + + /* + JC.log( _lw, _lh, _iw, _ih, _ioset.left, _ioset.top, _winw, _winh ); + JC.log( _scrtop, _x, _y ); + */ + } + , _buildDone: + function(){ + this.updatePosition(); + //this._model.selector().blur(); + $(this).trigger( 'TriggerEvent', [ Calendar.Model.INITED ] ); + } + , _buildLayout: + function( _dateo ){ + this._model.layout(); + + //JC.log( '_buildBody: \n', JSON.stringify( _dateo ) ); + + if( !( _dateo && _dateo.date ) ) return; + + this._buildHeader( _dateo ); + this._buildBody( _dateo ); + this._buildFooter( _dateo ); + } + , _buildHeader: + function( _dateo ){ + var _p = this + , _layout = _p._model.layout() + , _ls = [] + , _tmp + , _selected = _dateo.date.getFullYear() + , _selectedMonth = _dateo.date.getMonth() + , _startYear = _p._model.startYear( _dateo ) + , _endYear = _p._model.endYear( _dateo ) + , _curYear = _dateo.date.getFullYear() + , _curDateMonth = new Date( _dateo.date.getFullYear(), _dateo.date.getMonth(), 1 ) + , _minYear = _dateo.minvalue ? _dateo.minvalue.getFullYear() : 0 + , _maxYear = _dateo.maxvalue ? _dateo.maxvalue.getFullYear() : 0 + , _minMonthDate = _dateo.minvalue ? new Date( _dateo.minvalue.getFullYear(), _dateo.minvalue.getMonth(), 1 ) : 0 + , _maxMonthDate = _dateo.maxvalue ? new Date( _dateo.maxvalue.getFullYear(), _dateo.maxvalue.getMonth(), 1 ) : 0 + , i, j, _mname, _tdate, _addDateYear + , _addCurYear + ; + for( i = _startYear; i <= _endYear; i++ ){ + + if( _maxYear && _curYear > _maxYear ){ + _addCurYear = true; + } + if( _maxYear && i > _maxYear ) break; + + if( _minYear && i < _minYear ) continue; + if( _minYear && _curYear < _minYear ) { + _addCurYear = true; + } + + _ls.push( JC.f.printf( '', i, i === _selected ? ' selected' : '' ) ); + } + + if( _addCurYear ){ + _ls.unshift( JC.f.printf( '', _curYear, ' selected' ) ); + } + $( _ls.join('') ).appendTo( _layout.find('select.UYear').html('') ); + + _ls = []; + for( i = 0; i < 12; i++ ){ + _mname = Calendar.getCnNum( i + 1 ); + _tdate = new Date( _curYear, i, 1 ); + + /* + JC.log( _dateo.date.getFullYear(), i + , JC.f.formatISODate( _tdate ) + , JC.f.formatISODate( _minMonthDate ) + , JC.f.formatISODate( _maxMonthDate ) + ); + */ + + if( _maxMonthDate && _tdate.getTime() > _maxMonthDate.getTime() ) break; + if( _minMonthDate && _tdate.getTime() < _minMonthDate.getTime() ){ + /* + JC.log( + 'xxxxxxxx' + , JC.f.formatISODate( _dateo.date ) + , JC.f.formatISODate( _tdate ) + , i + ); + */ + continue; + } + + _ls.push( JC.f.printf( '' + , i + , i === _selectedMonth ? ' selected' : '' + , _mname + ) + ); + } + if( !_ls.length ){ + _mname = Calendar.getCnNum( _dateo.date.getMonth() + 1 ); + + _ls.push( JC.f.printf( '' + , _dateo.date.getMonth() + , ' selected' + , _mname + ) + ); + } + $( _ls.join('') ).appendTo( _layout.find( 'select.UMonth' ).html( '' ) ); + //$( _layout.find('select.UMonth').val( _dateo.date.getMonth() ) ); + } + , _buildBody: + function( _dateo ){ + var _p = this, _layout = _p._model.layout(); + var _maxday = JC.f.maxDayOfMonth( _dateo.date ), _weekday = _dateo.date.getDay() || 7 + , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin + , _tmp, i, _class; + + var _beginDate = new Date( _dateo.date.getFullYear(), _dateo.date.getMonth(), 1 ); + var _beginWeekday = _beginDate.getDay() || 7; + if( _beginWeekday < 2 ){ + _beginDate.setDate( -( _beginWeekday - 1 + 6 ) ); + }else{ + _beginDate.setDate( -( _beginWeekday - 2 ) ); + } + var today = new Date(); + + if( _dateo.maxvalue && !_p._model.currentcanselect() ){ + _dateo.maxvalue.setDate( _dateo.maxvalue.getDate() - 1 ); + } + + _ls.push(''); + for( i = 1; i <= 42; i++ ){ + _class = []; + if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend'); + if( !JC.f.isSameMonth( _dateo.date, _beginDate ) ) _class.push( 'other' ); + if( _dateo.minvalue && _beginDate.getTime() < _dateo.minvalue.getTime() ) + _class.push( 'unable' ); + if( _dateo.maxvalue && _beginDate.getTime() > _dateo.maxvalue.getTime() ) + _class.push( 'unable' ); + + if( JC.f.isSameDay( _beginDate, today ) ) _class.push( 'today' ); + if( JC.f.isSameDay( _dateo.date, _beginDate ) ) _class.push( 'cur' ); + + _ls.push( '' + ,'' + , _beginDate.getDate(), '' ); + _beginDate.setDate( _beginDate.getDate() + 1 ); + if( i % 7 === 0 && i != 42 ) _ls.push( '' ); + } + _ls.push(''); + _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ); + } + , _buildFooter: + function( _dateo ){ + } + }; + /** + * 捕获用户更改年份 + *

        监听 年份下拉框

        + * @event year change + * @private + */ + $(document).delegate( 'body > div.UXCCalendar select.UYear, body > div.UXCCalendar select.UMonth', 'change', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateLayout(); + }); + /** + * 捕获用户更改年份 + *

        监听 下一年按钮

        + * @event next year + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UNextYear', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateYear( 1 ); + }); + /** + * 捕获用户更改年份 + *

        监听 上一年按钮

        + * @event previous year + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UPreYear', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateYear( -1 ); + }); + /** + * 增加或者减少一年 + *

        监听 年份map

        + * @event year map click + * @private + */ + $(document).delegate( "map[name=UXCCalendar_Year] area" , 'click', function( $evt ){ + $evt.preventDefault(); + var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt ); + _p.attr("action") && _ins + && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateYear( 1 ) + , _p.attr("action").toLowerCase() == 'down' && _ins.updateYear( -1 ) + ); + }); + /** + * 增加或者减少一个月 + *

        监听 月份map

        + * @event month map click + * @private + */ + $(document).delegate( "map[name=UXCCalendar_Month] area" , 'click', function( $evt ){ + $evt.preventDefault(); + var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt ); + _p.attr("action") && _ins + && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateMonth( 1 ) + , _p.attr("action").toLowerCase() == 'down' && _ins.updateMonth( -1 ) + ); + }); + /** + * 捕获用户更改月份 + *

        监听 下一月按钮

        + * @event next year + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UNextMonth', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateMonth( 1 ); + }); + /** + * 捕获用户更改月份 + *

        监听 上一月按钮

        + * @event previous year + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UPreMonth', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateMonth( -1 ); + }); + + /** + * 日期点击事件 + * @event date click + * @private + */ + $(document).delegate( 'div.UXCCalendar table a[date], div.UXCCalendar table a[dstart]', 'click', function( $evt ){ + $evt.preventDefault(); + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateSelected( $( this ) ); + /* + Calendar._triggerUpdate( [ 'date', _d, _d ] ); + */ + }); + /** + * 选择当前日期 + *

        监听确定按钮

        + * @event confirm click + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UConfirm', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).updateSelected(); + }); + /** + * 清除文本框内容 + *

        监听 清空按钮

        + * @event clear click + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UClear', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).clear(); + }); + /** + * 取消日历组件, 相当于隐藏 + *

        监听 取消按钮

        + * @event cancel click + * @private + */ + $(document).delegate( 'body > div.UXCCalendar button.UCancel', 'click', function( $evt ){ + Calendar.getInstance( Calendar.lastIpt ) + && Calendar.getInstance( Calendar.lastIpt ).cancel(); + }); + /** + * 日历组件按钮点击事件 + * @event calendar button click + * @private + */ + $(document).delegate( 'input.UXCCalendar_btn', 'click', function($evt){ + var _p = $(this), _tmp; + if( !_p.data( Calendar.Model.INPUT ) ){ + _tmp = _p.prev( 'input[type=text], textarea' ); + _tmp.length && _p.data( Calendar.Model.INPUT, _tmp ); + } + _p.data( Calendar.Model.INPUT ) + && !_p.data( Calendar.Model.INPUT ).is('[disabled]') + && Calendar.pickDate( _p.data( Calendar.Model.INPUT ) ); + }); + /** + * 日历组件点击事件, 阻止冒泡, 防止被 document click事件隐藏 + * @event UXCCalendar click + * @private + */ + $(document).delegate( 'body > div.UXCCalendar', 'click', function( $evt ){ + $evt.stopPropagation(); + }); + + /** + * DOM 加载完毕后, 初始化日历组件相关事件 + * @event dom ready + * @private + */ + $(document).ready( function($evt){ + /** + * 延迟200毫秒初始化页面的所有日历控件 + * 之所以要延迟是可以让用户自己设置是否需要自动初始化 + */ + JC.f.safeTimeout( function( $evt ){ + if( !Calendar.autoInit ) return; + Calendar.initTrigger( $(document) ); + }, null, 'CalendarInitTrigger', 200 ); + /** + * 监听窗口滚动和改变大小, 实时变更日历组件显示位置 + * @event window scroll, window resize + * @private + */ + $(window).on('scroll resize', function($evt){ + var _ins = Calendar.getInstance( Calendar.lastIpt ); + _ins && _ins.visible() && _ins.updatePosition(); + }); + /** + * dom 点击时, 检查事件源是否为日历组件对象, 如果不是则会隐藏日历组件 + * @event dom click + * @private + */ + $(document).on('click', function($evt){ + var _src = $evt.target || $evt.srcElement; + + if( Calendar.domClickFilter ) if( Calendar.domClickFilter( $(_src) ) === false ) return; + + if( Calendar.isCalendar($evt.target||$evt.targetElement) ) return; + + if( _src && ( _src.nodeName.toLowerCase() != 'input' + && _src.nodeName.toLowerCase() != 'button' + && _src.nodeName.toLowerCase() != 'textarea' + ) ){ + Calendar.hide(); return; + } + + JC.f.safeTimeout( function(){ + if( Calendar.lastIpt && Calendar.lastIpt.length && _src == Calendar.lastIpt[0] ) return; + Calendar.hide(); + }, null, 'CalendarClickHide', 100 ); + }); + }); + $(document).delegate( [ 'input[datatype=date]', 'input[datatype=daterange]' + , 'input[multidate=date]', 'input[multidate=daterange]' ].join(), 'focus' + , function($evt){ + Calendar.pickDate( this ); + }); + $(document).delegate( [ 'button[datatype=date]', 'button[datatype=daterange]' + , 'button[multidate=date]', 'button[multidate=daterange]' ].join(), 'click' , function($evt){ + Calendar.pickDate( this ); + }); + $(document).delegate( [ 'textarea[datatype=date]', 'textarea[datatype=daterange]' + , 'textarea[multidate=date]', 'textarea[multidate=daterange]' ].join(), 'click' , function($evt){ + Calendar.pickDate( this ); + }); + + return JC.Calendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Calendar/Calendar.js b/comps/Calendar/Calendar.js old mode 100644 new mode 100755 index 9c2120cf2..7ecdf3d7a --- a/comps/Calendar/Calendar.js +++ b/comps/Calendar/Calendar.js @@ -1,2636 +1,30 @@ -//TODO: minvalue, maxvalue 添加默认日期属性识别属性 -;(function($){ - /** - * 日期选择组件 - *
        全局访问请使用 JC.Calendar 或 Calendar - *
        DOM 加载完毕后 - * , Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签 - *
        Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector ) - *
        _selector 可以是 新加载的容器, 也可以是新加载的所有input - *

        require: jQuery - *
        require: window.cloneDate - *
        require: window.parseISODate - *
        require: window.formatISODate - *
        require: window.maxDayOfMonth - *
        require: window.isSameDay - *
        require: window.isSameMonth - *

        - *

        JC Project Site - * | API docs - * | demo link

        - *

        可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season)

        - *
        - *
        defaultdate = ISO Date
        - *
        默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性
        - * - *
        datatype = string
        - *
        - * 声明日历控件的类型: - *

        date: 日期日历

        - *

        week: 周日历

        - *

        month: 月日历

        - *

        season: 季日历

        - *

        monthday: 多选日期日历

        - *
        - * - *
        multidate = string
        - *
        - * 与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突 - *
        - * - *
        calendarshow = function
        - *
        显示日历时的回调
        - * - *
        calendarhide = function
        - *
        隐藏日历时的回调
        - * - *
        calendarlayoutchange = function
        - *
        用户点击日历控件操作按钮后, 外观产生变化时触发的回调
        - * - *
        calendarupdate = function
        - *
        - * 赋值后触发的回调 - *
        - *
        参数:
        - *
        _startDate: 开始日期
        - *
        _endDate: 结束日期
        - *
        - *
        - * - *
        calendarclear = function
        - *
        清空日期触发的回调
        - * - *
        minvalue = ISO Date
        - *
        日期的最小时间, YYYY-MM-DD
        - * - *
        maxvalue = ISO Date
        - *
        日期的最大时间, YYYY-MM-DD
        - * - *
        currentcanselect = bool, default = true
        - *
        当前日期是否能选择
        - * - *
        multiselect = bool (目前支持 month: default=false, monthday: default = treu)
        - *
        是否为多选日历
        - * - *
        calendarupdatemultiselect = function
        - *
        - * 多选日历赋值后触发的回调 - *
        - *
        参数: _data:
        - *
        - * [{"start": Date,"end": Date}[, {"start": Date,"end": Date}... ] ] - *
        - *
        - *
        - *
        - * @namespace JC - * @class Calendar - * @version dev 0.2, 2013-09-01 过程式转单例模式 - * @version dev 0.1, 2013-06-04 - * @author qiushaowei | 75 team - */ - window.Calendar = JC.Calendar = Calendar; - function Calendar( _selector ){ - if( Calendar.getInstance( _selector ) ) return Calendar.getInstance( _selector ); - Calendar.getInstance( _selector, this ); - - var _type = Calendar.type( _selector ); - - JC.log( 'Calendar init:', _type, new Date().getTime() ); - - switch( _type ){ - case 'week': - { - this._model = new Calendar.WeekModel( _selector ); - this._view = new Calendar.WeekView( this._model ); - break; - } - case 'month': - { - this._model = new Calendar.MonthModel( _selector ); - this._view = new Calendar.MonthView( this._model ); - break; - } - case 'season': - { - this._model = new Calendar.SeasonModel( _selector ); - this._view = new Calendar.SeasonView( this._model ); - break; - } - case 'monthday': - { - - this._model = new Calendar.MonthDayModel( _selector ); - this._view = new Calendar.MonthDayView( this._model ); - break; - } - default: - { - this._model = new Calendar.Model( _selector ); - this._view = new Calendar.View( this._model ); - break; - } +;(function(define, _win) { 'use strict'; + define( [ 'JC.Calendar.date', 'JC.Calendar.week', 'JC.Calendar.month' + , 'JC.Calendar.season', 'JC.Calendar.year', 'JC.Calendar.monthday' + ], function(){ + /** + * жΪ JC 0.1 + * ʹ requirejs ĿƳжϴ + */ + JC.use + && JC.PATH + && JC.use([ + JC.PATH + 'comps/Calendar/Calendar.date.js' + , JC.PATH + 'comps/Calendar/Calendar.week.js' + , JC.PATH + 'comps/Calendar/Calendar.month.js' + , JC.PATH + 'comps/Calendar/Calendar.season.js' + , JC.PATH + 'comps/Calendar/Calendar.year.js' + , JC.PATH + 'comps/Calendar/Calendar.monthday.js' + ].join()) + ; + + return JC.Calendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); } - - this._init(); - } - - Calendar.prototype = { - /** - * 内部初始化函数 - * @method _init - * @private - */ - _init: - function(){ - var _p = this; - - _p._initHanlderEvent(); - - $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ - _p.on( _evtName, _cb ); - }); - - $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ).slice(2); - _p.trigger( _evtName, _data ); - }); - - _p._model.init(); - _p._view.init(); - - return _p; - } - /** - * 初始化相关操作事件 - * @method _initHanlderEvent - * @private - */ - , _initHanlderEvent: - function(){ - var _p = this; - - _p.on( Calendar.Model.INITED, function( _evt ){ - _p._model.calendarinited() - && _p._model.calendarinited().call( _p._model.selector(), _p._model.layout(), _p ); - }); - - _p.on( Calendar.Model.SHOW, function( _evt ){ - _p._model.calendarshow() - && _p._model.calendarshow().call( _p._model.selector(), _p._model.selector(), _p ); - }); - - _p.on( Calendar.Model.HIDE, function( _evt ){ - _p._model.calendarhide() - && _p._model.calendarhide().call( _p._model.selector(), _p._model.selector(), _p ); - }); - - _p.on( Calendar.Model.UPDATE, function( _evt ){ - if( !_p._model.selector() ) return; - - _p._model.selector().blur(); - _p._model.selector().trigger('change'); - - var _data = [], _v = _p._model.selector().val().trim(), _startDate, _endDate, _tmp, _item, _tmpStart, _tmpEnd; - - if( _v ){ - _tmp = _v.split( ',' ); - for( var i = 0, j = _tmp.length; i < j; i++ ){ - _item = _tmp[i].replace( /[^\d]/g, '' ); - if( _item.length == 16 ){ - _tmpStart = parseISODate( _item.slice( 0, 8 ) ); - _tmpEnd = parseISODate( _item.slice( 8 ) ); - }else if( _item.length == 8 ){ - _tmpStart = parseISODate( _item.slice( 0, 8 ) ); - _tmpEnd = cloneDate( _tmpStart ); - } - if( i === 0 ){ - _startDate = cloneDate( _tmpStart ); - _endDate = cloneDate( _tmpEnd ); - } - _data.push( {'start': _tmpStart, 'end': _tmpEnd } ); - } - } - - _p._model.calendarupdate() - && _p._model.calendarupdate().apply( _p._model.selector(), [ _startDate, _endDate ] ); - - _p._model.multiselect() - && _p._model.calendarupdatemultiselect() - && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _data, _p ); - }); - - _p.on( Calendar.Model.CLEAR, function( _evt ){ - _p._model.calendarclear() - && _p._model.calendarclear().call( _p._model.selector(), _p._model.selector(), _p ); - }); - - _p.on( Calendar.Model.CANCEL, function( _evt ){ - _p._model.calendarcancel() - && _p._model.calendarcancel().call( _p._model.selector(), _p._model.selector(), _p ); - }); - - _p.on( Calendar.Model.LAYOUT_CHANGE, function( _evt ){ - _p._model.calendarlayoutchange() - && _p._model.calendarlayoutchange().call( _p._model.selector(), _p._model.selector(), _p ); - }); - - _p.on( Calendar.Model.UPDATE_MULTISELECT, function( _evt ){ - _p._model.multiselect() - && _p._model.calendarupdatemultiselect() - && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _p._model.selector(), _p ); - }); - - return _p; - } - /** - * 显示 Calendar - * @method show - * @return CalendarInstance - */ - , show: - function(){ - Calendar.hide(); - Calendar.lastIpt = this._model.selector(); - this._view.show(); - this.trigger( Calendar.Model.SHOW ); - return this; - } - /** - * 隐藏 Calendar - * @method hide - * @return CalendarInstance - */ - , hide: function(){ - this._view.hide(); - this.trigger( Calendar.Model.HIDE ); - this.selector() && this.selector().blur(); - return this; - } - /** - * 获取 显示 Calendar 的触发源选择器, 比如 a 标签 - * @method selector - * @return selector - */ - , selector: function(){ return this._model.selector(); } - /** - * 获取 Calendar 外观的 选择器 - * @method layout - * @return selector - */ - , layout: function(){ return this._model.layout(); } - /** - * 使用 jquery on 绑定事件 - * @method {string} on - * @param {string} _evtName - * @param {function} _cb - * @return CalendarInstance - */ - , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;} - /** - * 使用 jquery trigger 绑定事件 - * @method {string} trigger - * @param {string} _evtName - * @return CalendarInstance - */ - , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;} - /** - * 用户操作日期控件时响应改变 - * @method updateLayout - */ - , updateLayout: - function(){ - this._view.updateLayout(); - return this; - } - /** - * 切换到不同日期控件源时, 更新对应的控件源 - * @method updateSelector - * @param {selector} _selector - */ - , updateSelector: - function( _selector ){ - Calendar.lastIpt = _selector; - this._model && this._model.selector( _selector ); - return this; - } - /** - * 用户改变年份时, 更新到对应的年份 - * @method updateYear - * @param {int} _offset - */ - , updateYear: - function( _offset ){ - this._view && this._view.updateYear( _offset ); - this.trigger( Calendar.Model.LAYOUT_CHANGE ); - return this; - } - /** - * 用户改变月份时, 更新到对应的月份 - * @method updateMonth - * @param {int} _offset - */ - , updateMonth: - function( _offset ){ - this._view && this._view.updateMonth( _offset ); - this.trigger( Calendar.Model.LAYOUT_CHANGE ); - return this; - } - /** - * 把选中的值赋给控件源 - *
        用户点击日期/确定按钮 - * @method updateSelected - * @param {selector} _userSelectedItem - */ - , updateSelected: - function( _userSelectedItem ){ - JC.log( 'JC.Calendar: updateSelector', new Date().getTime() ); - this._view && this._view.updateSelected( _userSelectedItem ); - return this; - } - /** - * 显示日历外观到对应的控件源 - * @method updatePosition - */ - , updatePosition: - function(){ - this._view && this._view.updatePosition(); - return this; - } - /** - * 清除控件源内容 - * @method clear - */ - , clear: - function(){ - var _isEmpty = !this._model.selector().val().trim(); - this._model && this._model.selector().val(''); - !_isEmpty && this.trigger( Calendar.Model.CLEAR ); - return this; - } - /** - * 用户点击取消按钮时隐藏日历外观 - * @method cancel - */ - , cancel: - function(){ - this.trigger( Calendar.Model.CANCEL ); - this._view && this._view.hide(); - return this; - } - /*** - * 返回日历外观是否可见 - * @method visible - * @return bool - */ - , visible: - function(){ - var _r, _tmp; - this._model - && ( _tmp = this._model.layout() ) - && ( _r = _tmp.is(':visible') ) - ; - return _r; - } - /** - * 获取控件源的初始日期对象 - * @method defaultDate - * @param {selector} _selector - */ - , defaultDate: - function( _selector ){ - return this._model.defaultDate( _selector ); - } - } - /** - * 获取或设置 Calendar 的实例 - * @method getInstance - * @param {selector} _selector - * @static - * @return {Calendar instance} - */ - Calendar.getInstance = - function( _selector, _setter ){ - typeof _selector == 'string' && !/目前有 date, week, month, season 四种类型的实例 - *
        每种类型都是单例模式 - * @prototype _ins - * @type object - * @default empty - * @private - * @static - */ - Calendar._ins = {}; - /** - * 获取控件源的实例类型 - *
        目前有 date, week, month, season 四种类型的实例 - * @method type - * @param {selector} _selector - * @return string - * @static - */ - Calendar.type = - function( _selector ){ - _selector = $(_selector); - var _r, _type = $.trim(_selector.attr('multidate') || '').toLowerCase() - || $.trim(_selector.attr('datatype') || '').toLowerCase(); - switch( _type ){ - case 'week': - case 'month': - case 'season': - case 'monthday': - { - _r = _type; - break; - } - default: _r = 'date'; break; - } - return _r; - }; - /** - * 判断选择器是否为日历组件的对象 - * @method isCalendar - * @static - * @param {selector} _selector - * return bool - */ - Calendar.isCalendar = - function( _selector ){ - _selector = $(_selector); - var _r = 0; - - if( _selector.length ){ - if( _selector.hasClass('UXCCalendar_btn') ) _r = 1; - if( _selector.prop('nodeName') - && _selector.attr('datatype') - && ( _selector.prop('nodeName').toLowerCase()=='input' || _selector.prop('nodeName').toLowerCase()=='button' ) - && ( _selector.attr('datatype').toLowerCase()=='date' - || _selector.attr('datatype').toLowerCase()=='week' - || _selector.attr('datatype').toLowerCase()=='month' - || _selector.attr('datatype').toLowerCase()=='season' - || _selector.attr('datatype').toLowerCase()=='year' - || _selector.attr('datatype').toLowerCase()=='daterange' - || _selector.attr('datatype').toLowerCase() == 'monthday' - )) _r = 1; - if( _selector.prop('nodeName') - && _selector.attr('multidate') - && ( _selector.prop('nodeName').toLowerCase()=='input' - || _selector.prop('nodeName').toLowerCase()=='button' ) - ) _r = 1; - } - - return _r; - }; - /** - * 请使用 isCalendar, 这个方法是为了向后兼容 - */ - Calendar.isCalendarElement = function( _selector ){ return Calendar.isCalendar( _selector ); }; - /** - * 弹出日期选择框 - * @method pickDate - * @static - * @param {selector} _selector 需要显示日期选择框的input[text] - * @example -
        -
        - - manual JC.Calendar.pickDate -
        -
        - - manual JC.Calendar.pickDate -
        -
        - - */ - Calendar.pickDate = - function( _selector ){ - _selector = $( _selector ); - if( !(_selector && _selector.length) ) return; - - var _ins, _isIgnore = _selector.is('[ignoreprocess]'); - - _selector.attr('ignoreprocess', true); - _selector.blur(); - !_isIgnore && _selector.removeAttr('ignoreprocess'); - - _ins = Calendar.getInstance( _selector ); - !_ins && ( _ins = new Calendar( _selector ) ); - _ins.show(); - return; - }; - /** - * 设置是否在 DOM 加载完毕后, 自动初始化所有日期控件 - * @property autoInit - * @default true - * @type {bool} - * @static - - */ - Calendar.autoInit = true; - /** - * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年 - * @property defaultDateSpan - * @type {int} - * @default 20 - * @static - - */ - Calendar.defaultDateSpan = 20; - /** - * 最后一个显示日历组件的文本框 - * @property lastIpt - * @type selector - * @static - */ - Calendar.lastIpt = null; - /** - * 自定义日历组件模板 - *

        默认模板为_logic.tpl

        - *

        如果用户显示定义JC.Calendar.tpl的话, 将采用用户的模板

        - * @property tpl - * @type {string} - * @default empty - * @static - */ - Calendar.tpl = ''; - /** - * 初始化外观后的回调函数 - * @property layoutInitedCallback - * @type function - * @static - * @default null - */ - Calendar.layoutInitedCallback = null; - /** - * 显示为可见时的回调 - * @property layoutShowCallback - * @type function - * @static - * @default null - */ - Calendar.layoutShowCallback = null; - /** - * 日历隐藏后的回调函数 - * @property layoutHideCallback - * @type function - * @static - * @default null - */ - Calendar.layoutHideCallback = null; - /** - * DOM 点击的过滤函数 - *
        默认 dom 点击时, 判断事件源不为 input[datatype=date|daterange] 会隐藏 Calendar - *
        通过该回调可自定义过滤, 返回 false 不执行隐藏操作 - * @property domClickFilter - * @type function - * @static - * @default null - */ - Calendar.domClickFilter = null; - /** - * 隐藏日历组件 - * @method hide - * @static - * @example - - */ - Calendar.hide = - function(){ - - for( var k in Calendar._ins ){ - Calendar._ins[ k] - && Calendar._ins[ k].visible() - && Calendar._ins[ k].hide() - ; - } - }; - /** - * 获取初始日期对象 - *

        这个方法将要废除, 请使用 instance.defaultDate()

        - * @method getDate - * @static - * @param {selector} _selector 显示日历组件的input - * return { date: date, minvalue: date|null, maxvalue: date|null, enddate: date|null } - */ - Calendar.getDate = - function( _selector ){ - return Calendar.getInstance( _selector ).defaultDate(); - }; - /** - * 每周的中文对应数字 - * @property cnWeek - * @type string - * @static - * @default 日一二三四五六 - */ - Calendar.cnWeek = "日一二三四五六"; - /** - * 100以内的中文对应数字 - * @property cnUnit - * @type string - * @static - * @default 十一二三四五六七八九 - */ - Calendar.cnUnit = "十一二三四五六七八九"; - /** - * 转换 100 以内的数字为中文数字 - * @method getCnNum - * @static - * @param {int} _num - * @return string - */ - Calendar.getCnNum = - function ( _num ){ - var _r = Calendar.cnUnit.charAt( _num % 10 ); - _num > 10 && ( _r = (_num % 10 !== 0 ? Calendar.cnUnit.charAt(0) : '') + _r ); - _num > 19 && ( _r = Calendar.cnUnit.charAt( Math.floor( _num / 10 ) ) + _r ); - return _r; - }; - /** - * 设置日历组件的显示位置 - * @method position - * @static - * @param {selector} _ipt 需要显示日历组件的文本框 - */ - Calendar.position = - function( _ipt ){ - Calendar.getInstance( _ipt ) - && Calendar.getInstance( _ipt ).updatePosition(); - }; - /** - * 这个方法后续版本不再使用, 请使用 Calendar.position - */ - Calendar.setPosition = Calendar.position; - /** - * 初始化日历组件的触发按钮 - * @method _logic.initTrigger - * @param {selector} _selector - * @private - */ - Calendar.initTrigger = - function( _selector ){ - _selector.each( function(){ - var _p = $(this), _nodeName = (_p.prop('nodeName')||'').toLowerCase(), _tmp; - - if( _nodeName != 'input' && _nodeName != 'textarea' ){ - Calendar.initTrigger( _selector.find( 'input[type=text], textarea' ) ); - return; - } - - if( !( - $.trim( _p.attr('datatype') || '').toLowerCase() == 'date' - || $.trim( _p.attr('multidate') || '') - || $.trim( _p.attr('datatype') || '').toLowerCase() == 'daterange' - || $.trim( _p.attr('datatype') || '').toLowerCase() == 'monthday' - ) ) return; - - var _btn = _p.find( '+ input.UXCCalendar_btn' ); - if( !_btn.length ){ - _p.after( _btn = $('') ); - } - - ( _tmp = _p.val().trim() ) - && ( _tmp = dateDetect( _tmp ) ) - && _p.val( formatISODate( _tmp ) ) - ; - - ( _tmp = ( _p.attr('minvalue') || '' ) ) - && ( _tmp = dateDetect( _tmp ) ) - && _p.attr( 'minvalue', formatISODate( _tmp ) ) - ; - - ( _tmp = ( _p.attr('maxvalue') || '' ) ) - && ( _tmp = dateDetect( _tmp ) ) - && _p.attr( 'maxvalue', formatISODate( _tmp ) ) - ; - - if( ( _p.attr('datatype') || '' ).toLowerCase() == 'monthday' - || ( _p.attr('multidate') || '' ).toLowerCase() == 'monthday' ){ - if( !_p.is('[placeholder]') ){ - var _tmpDate = new Date(); - _p.attr('defaultdate') && ( _tmpDate = parseISODate( _p.attr('defaultdate') ) || _tmpDate ); - _p.val().trim() && ( _tmpDate = parseISODate( _p.val().replace( /[^d]/g, '').slice( 0, 8 ) ) || _tmpDate ); - _tmpDate && _p.attr( 'placeholder', printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) ); - } - } - - _btn.data( Calendar.Model.INPUT, _p ); - }); - }; - - Calendar.updateMultiYear = - function ( _date, _offset ){ - var _day, _max; - _day = _date.getDate(); - _date.setDate( 1 ); - _date.setFullYear( _date.getFullYear() + _offset ); - _max = maxDayOfMonth( _date ); - _day > _max && ( _day = _max ); - _date.setDate( _day ); - return _date; - }; - - Calendar.updateMultiMonth = - function ( _date, _offset ){ - var _day, _max; - _day = _date.getDate(); - _date.setDate( 1 ); - _date.setMonth( _date.getMonth() + _offset ); - _max = maxDayOfMonth( _date ); - _day > _max && ( _day = _max ); - _date.setDate( _day ); - return _date; - }; - - - /** - * 克隆 Calendar 默认 Model, View 的原型属性 - * @method clone - * @param {NewModel} _model - * @param {NewView} _view - */ - Calendar.clone = - function( _model, _view ){ - var _k; - if( _model ) - for( _k in Model.prototype ) _model.prototype[_k] = Model.prototype[_k]; - if( _view ) - for( _k in View.prototype ) _view.prototype[_k] = View.prototype[_k]; - }; - - function Model( _selector ){ - this._selector = _selector; - } - - Calendar.Model = Model; - Calendar.Model.INPUT = 'CalendarInput'; - - Calendar.Model.INITED = 'CalendarInited'; - Calendar.Model.SHOW = 'CalendarShow'; - Calendar.Model.HIDE = 'CalendarHide'; - Calendar.Model.UPDATE = 'CalendarUpdate'; - Calendar.Model.CLEAR = 'CalendarClear'; - Calendar.Model.CANCEL = 'CalendarCancel'; - Calendar.Model.LAYOUT_CHANGE = 'CalendarLayoutChange'; - Calendar.Model.UPDATE_MULTISELECT = 'CalendarUpdateMultiSelect'; - - Model.prototype = { - init: - function(){ - return this; - } - - , selector: - function( _setter ){ - typeof _setter != 'undefined' && ( this._selector = _setter ); - return this._selector; - } - , layout: - function(){ - var _r = $('#UXCCalendar'); - - if( !_r.length ){ - _r = $( Calendar.tpl || this.tpl ).hide(); - _r.attr('id', 'UXCCalendar').hide().appendTo( document.body ); - var _month = $( [ - '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - ].join('') ).appendTo( _r.find('select.UMonth' ) ); - } - return _r; - } - , startYear: - function( _dateo ){ - var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear(); - this.selector().is('[calendardatespan]') - && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) ); - return _r - _span; - } - , endYear: - function( _dateo ){ - var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear(); - this.selector().is('[calendardatespan]') - && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) ); - return _r + _span; - } - , currentcanselect: - function(){ - var _r = true; - this.selector().is('[currentcanselect]') - && ( currentcanselect = parseBool( this.selector().attr('currentcanselect') ) ); - return _r; - } - , year: - function(){ - return parseInt( this.layout().find('select.UYear').val(), 10 ) || 1; - } - , month: - function(){ - return parseInt( this.layout().find('select.UMonth').val(), 10 ) || 0; - } - , day: - function(){ - var _tmp, _date = new Date(); - _tmp = this.layout().find('td.cur > a[date], td.cur > a[dstart]'); - if( _tmp.length ){ - _date.setTime( _tmp.attr('date') || _tmp.attr('dstart') ); - } - JC.log( 'dddddd', _date.getDate() ); - return _date.getDate(); - } - , defaultDate: - function(){ - var _p = this, _r = { - date: null - , minvalue: null - , maxvalue: null - , enddate: null - , multidate: null - } - ; - _p.selector() && - ( - _r = _p.multiselect() - ? _p.defaultMultiselectDate( _r ) - : _p.defaultSingleSelectDate( _r ) - ); - - _r.minvalue = parseISODate( _p.selector().attr('minvalue') ); - _r.maxvalue = parseISODate( _p.selector().attr('maxvalue') ); - - return _r; - } - , defaultSingleSelectDate: - function( _r ){ - var _p = this - , _selector = _p.selector() - , _tmp - ; - - if( _tmp = parseISODate( _selector.val() ) ) _r.date = _tmp; - else{ - if( _selector.val() && (_tmp = _selector.val().replace( /[^\d]/g, '' ) ).length == 16 ){ - _r.date = parseISODate( _tmp.slice( 0, 8 ) ); - _r.enddate = parseISODate( _tmp.slice( 8 ) ); - }else{ - _tmp = new Date(); - if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){ - _tmp = parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp; - } - _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() ); - } - } - return _r; - } - , defaultMultiselectDate: - function( _r ){ - var _p = this - , _selector = Calendar.lastIpt - , _tmp - , _multidatear - , _dstart, _dend - ; - - if( _selector.val() ){ - //JC.log( 'defaultMultiselectDate:', _p.selector().val(), ', ', _tmp ); - _tmp = _selector.val().trim().replace(/[^\d,]/g, '').split(','); - _multidatear = []; - - $.each( _tmp, function( _ix, _item ){ - if( _item.length == 16 ){ - _dstart = parseISODate( _item.slice( 0, 8 ) ); - _dend = parseISODate( _item.slice( 8 ) ); - - if( !_ix ){ - _r.date = cloneDate( _dstart ); - _r.enddate = cloneDate( _dend ); - } - _multidatear.push( { 'start': _dstart, 'end': _dend } ); - }else if( _item.length == 8 ){ - _dstart = parseISODate( _item.slice( 0, 8 ) ); - _dend = cloneDate( _dstart ); - - if( !_ix ){ - _r.date = cloneDate( _dstart ); - _r.enddate = cloneDate( _dend ); - } - _multidatear.push( { 'start': _dstart, 'end': _dend } ); - } - }); - //alert( _multidatear + ', ' + _selector.val() ); - - _r.multidate = _multidatear; - - }else{ - _tmp = new Date(); - if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){ - _tmp = parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp; - } - _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() ); - _r.enddate = cloneDate( _r.date ); - _r.enddate.setDate( maxDayOfMonth( _r.enddate ) ); - _r.multidate = []; - _r.multidate.push( {'start': cloneDate( _r.date ), 'end': cloneDate( _r.enddate ) } ); - } - return _r; - } - , layoutDate: - function(){ - return this.multiselect() ? this.multiLayoutDate() : this.singleLayoutDate(); - } - , singleLayoutDate: - function(){ - var _p = this - , _dateo = _p.defaultDate() - , _day = this.day() - , _max; - _dateo.date.setDate( 1 ); - _dateo.date.setFullYear( this.year() ); - _dateo.date.setMonth( this.month() ); - _max = maxDayOfMonth( _dateo.date ); - _day > _max && ( _day = _max ); - _dateo.date.setDate( _day ); - return _dateo; - } - , multiLayoutDate: - function(){ - JC.log( 'Calendar.Model multiLayoutDate', new Date().getTime() ); - var _p = this - , _dateo = _p.defaultDate() - , _year = _p.year() - , _month = _p.month() - , _monthSel = _p.layout().find('select.UMonth') - ; - - _dateo.multidate = []; - - _p.layout().find('td.cur').each(function(){ - var _sp = $(this); - var _item = _sp.find('> a[dstart]'), _dstart = new Date(), _dend = new Date(); - _dstart.setTime( _item.attr('dstart') ); - _dend.setTime( _item.attr('dend') ); - _dateo.multidate.push( { 'start': _dstart, 'end': _dend } ); - }); - - _dateo.date.setFullYear( _year ); - _dateo.enddate.setFullYear( _year ); - - if( _monthSel.length ){ - _dateo.date.setMonth( _month ); - _dateo.enddate.setMonth( _month ); - } - - - $.each( _dateo.multidate, function( _ix, _item ){ - _item.start.setFullYear( _year ); - _item.end.setFullYear( _year ); - if( _monthSel.length ){ - _item.start.setMonth( _month ); - _item.end.setMonth( _month ); - } - }); - - return _dateo; - - } - , selectedDate: - function(){ - var _r, _tmp, _item; - _tmp = this.layout().find('td.cur'); - _tmp.length - && !_tmp.hasClass( 'unable' ) - && ( _item = _tmp.find('a[date]') ) - && ( _r = new Date(), _r.setTime( _item.attr('date') ) ) - ; - return _r; - } - , multiselectDate: - function(){ - var _r = []; - return _r; - } - , calendarinited: - function(){ - var _ipt = this.selector(), _cb = Calendar.layoutInitedCallback, _tmp; - _ipt && _ipt.attr('calendarinited') - && ( _tmp = window[ _ipt.attr('calendarinited') ] ) - && ( _cb = _tmp ); - return _cb; - } - , calendarshow: - function(){ - var _ipt = this.selector(), _cb = Calendar.layoutShowCallback, _tmp; - _ipt && _ipt.attr('calendarshow') - && ( _tmp = window[ _ipt.attr('calendarshow') ] ) - && ( _cb = _tmp ); - return _cb; - } - , calendarhide: - function(){ - var _ipt = this.selector(), _cb = Calendar.layoutHideCallback, _tmp; - _ipt && _ipt.attr('calendarhide') - && ( _tmp = window[ _ipt.attr('calendarhide') ] ) - && ( _cb = _tmp ); - return _cb; - } - , calendarupdate: - function( _data ){ - var _ipt = this.selector(), _cb, _tmp; - _ipt && _ipt.attr('calendarupdate') - && ( _tmp = window[ _ipt.attr('calendarupdate') ] ) - && ( _cb = _tmp ); - return _cb; - } - , calendarclear: - function(){ - var _ipt = this.selector(), _cb, _tmp; - _ipt && _ipt.attr('calendarclear') - && ( _tmp = window[ _ipt.attr('calendarclear') ] ) - && ( _cb = _tmp ); - return _cb; - } - , calendarcancel: - function(){ - var _ipt = this.selector(), _cb, _tmp; - _ipt && _ipt.attr('calendarcancel') - && ( _tmp = window[ _ipt.attr('calendarcancel') ] ) - && ( _cb = _tmp ); - return _cb; - } - , calendarlayoutchange: - function(){ - var _ipt = this.selector(), _cb, _tmp; - _ipt && _ipt.attr('calendarlayoutchange') - && ( _tmp = window[ _ipt.attr('calendarlayoutchange') ] ) - && ( _cb = _tmp ); - return _cb; - } - , multiselect: - function(){ - var _r; - this.selector().is('[multiselect]') - && ( _r = parseBool( this.selector().attr('multiselect') ) ); - return _r; - } - , calendarupdatemultiselect: - function( _data ){ - var _ipt = this.selector(), _cb, _tmp; - _ipt && _ipt.attr('calendarupdatemultiselect') - && ( _tmp = window[ _ipt.attr('calendarupdatemultiselect') ] ) - && ( _cb = _tmp ); - return _cb; - } - - , tpl: - [ - '
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ].join('') - }; - - function View( _model ){ - this._model = _model; - } - Calendar.View = View; - - - View.prototype = { - init: - function() { - return this; - } - - , hide: - function(){ - this._model.layout().hide(); - } - - , show: - function(){ - var _dateo = this._model.defaultDate(); - JC.log( 'Calendar.View: show', new Date().getTime(), formatISODate( _dateo.date ) ); - - this._buildLayout( _dateo ); - this._buildDone(); - } - , updateLayout: - function( _dateo ){ - typeof _dateo == 'undefined' && ( _dateo = this._model.layoutDate() ); - this._buildLayout( _dateo ); - this._buildDone(); - } - , updateYear: - function( _offset ){ - if( typeof _offset == 'undefined' || _offset == 0 ) return; - - this._model.multiselect() - ? this.updateMultiYear( _offset ) - : this.updateSingleYear( _offset ) - ; - } - , updateSingleYear: - function( _offset ){ - var _dateo = this._model.layoutDate(), _day = _dateo.date.getDate(), _max; - _dateo.date.setDate( 1 ); - _dateo.date.setFullYear( _dateo.date.getFullYear() + _offset ); - _max = maxDayOfMonth( _dateo.date ); - _day > _max && ( _day = _max ); - _dateo.date.setDate( _day ); - this._buildLayout( _dateo ); - this._buildDone(); - } - , updateMultiYear: - function( _offset ){ - var _dateo = this._model.layoutDate(), _day, _max; - - JC.Calendar.updateMultiYear( _dateo.date, _offset ); - JC.Calendar.updateMultiYear( _dateo.enddate, _offset ); - - if( _dateo.multidate ){ - $.each( _dateo.multidate, function( _ix, _item ){ - JC.Calendar.updateMultiYear( _item.start, _offset ); - JC.Calendar.updateMultiYear( _item.end, _offset ); - }); - } - this._buildLayout( _dateo ); - this._buildDone(); - } - , updateMonth: - function( _offset ){ - if( typeof _offset == 'undefined' || _offset == 0 ) return; - - this._model.multiselect() - ? this.updateMultiMonth( _offset ) - : this.updateSingleMonth( _offset ) - ; - } - , updateMultiMonth: - function( _offset ){ - var _dateo = this._model.layoutDate(), _day, _max; - - JC.Calendar.updateMultiMonth( _dateo.date, _offset ); - JC.Calendar.updateMultiMonth( _dateo.enddate, _offset ); - - if( _dateo.multidate ){ - $.each( _dateo.multidate, function( _ix, _item ){ - JC.Calendar.updateMultiMonth( _item.start, _offset ); - JC.Calendar.updateMultiMonth( _item.end, _offset ); - }); - } - this._buildLayout( _dateo ); - this._buildDone(); - } - , updateSingleMonth: - function( _offset ){ - var _dateo = this._model.layoutDate(), _day = _dateo.date.getDate(), _max; - _dateo.date.setDate( 1 ); - _dateo.date.setMonth( _dateo.date.getMonth() + _offset ); - _max = maxDayOfMonth( _dateo.date ); - _day > _max && ( _day = _max ); - _dateo.date.setDate( _day ); - this._buildLayout( _dateo ); - this._buildDone(); - } - , updateSelected: - function( _userSelectedItem ){ - var _p = this, _date, _tmp; - if( !_userSelectedItem ){ - _date = this._model.selectedDate(); - }else{ - _userSelectedItem = $( _userSelectedItem ); - _tmp = getJqParent( _userSelectedItem, 'td' ); - if( _tmp && _tmp.hasClass('unable') ) return; - _date = new Date(); - _date.setTime( _userSelectedItem.attr('date') ); - } - if( !_date ) return; - - _p._model.selector().val( formatISODate( _date ) ); - - $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'date', _date, _date ] ); - Calendar.hide(); - } - , updatePosition: - function(){ - var _p = this, _ipt = _p._model.selector(), _layout = _p._model.layout(); - if( !( _ipt && _layout && _ipt.length && _layout.length ) ) return; - _layout.css( {'left': '-9999px', 'top': '-9999px', 'z-index': ZINDEX_COUNT++ } ).show(); - var _lw = _layout.width(), _lh = _layout.height() - , _iw = _ipt.width(), _ih = _ipt.height(), _ioset = _ipt.offset() - , _x, _y, _winw = $(window).width(), _winh = $(window).height() - , _scrtop = $(document).scrollTop() - ; - - _x = _ioset.left; _y = _ioset.top + _ih + 5; - - if( ( _y + _lh - _scrtop ) > _winh ){ - JC.log('y overflow'); - _y = _ioset.top - _lh - 3; - - if( _y < _scrtop ) _y = _scrtop; - } - - _layout.css( {left: _x+'px', top: _y+'px'} ); - - JC.log( _lw, _lh, _iw, _ih, _ioset.left, _ioset.top, _winw, _winh ); - JC.log( _scrtop, _x, _y ); - } - , _buildDone: - function(){ - this.updatePosition(); - //this._model.selector().blur(); - $(this).trigger( 'TriggerEvent', [ Calendar.Model.INITED ] ); - } - , _buildLayout: - function( _dateo ){ - this._model.layout(); - - - //JC.log( '_buildBody: \n', JSON.stringify( _dateo ) ); - - if( !( _dateo && _dateo.date ) ) return; - - this._buildHeader( _dateo ); - this._buildBody( _dateo ); - this._buildFooter( _dateo ); - } - , _buildHeader: - function( _dateo ){ - var _p = this - , _layout = _p._model.layout() - , _ls = [] - , _tmp - , _selected = _selected = _dateo.date.getFullYear() - , _startYear = _p._model.startYear( _dateo ) - , _endYear = _p._model.endYear( _dateo ) - ; - JC.log( _startYear, _endYear ); - for( var i = _startYear; i <= _endYear; i++ ){ - _ls.push( printf( '', i, i === _selected ? ' selected' : '' ) ); - } - $( _ls.join('') ).appendTo( _layout.find('select.UYear').html('') ); - - $( _layout.find('select.UMonth').val( _dateo.date.getMonth() ) ); - } - , _buildBody: - function( _dateo ){ - var _p = this, _layout = _p._model.layout(); - var _maxday = maxDayOfMonth( _dateo.date ), _weekday = _dateo.date.getDay() || 7 - , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin - , _tmp, i, _class; - - var _beginDate = new Date( _dateo.date.getFullYear(), _dateo.date.getMonth(), 1 ); - var _beginWeekday = _beginDate.getDay() || 7; - if( _beginWeekday < 2 ){ - _beginDate.setDate( -( _beginWeekday - 1 + 6 ) ); - }else{ - _beginDate.setDate( -( _beginWeekday - 2 ) ); - } - var today = new Date(); - - if( _dateo.maxvalue && !_p._model.currentcanselect() ){ - _dateo.maxvalue.setDate( _dateo.maxvalue.getDate() - 1 ); - } - - _ls.push(''); - for( i = 1; i <= 42; i++ ){ - _class = []; - if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend'); - if( !isSameMonth( _dateo.date, _beginDate ) ) _class.push( 'other' ); - if( _dateo.minvalue && _beginDate.getTime() < _dateo.minvalue.getTime() ) - _class.push( 'unable' ); - if( _dateo.maxvalue && _beginDate.getTime() > _dateo.maxvalue.getTime() ) - _class.push( 'unable' ); - - if( isSameDay( _beginDate, today ) ) _class.push( 'today' ); - if( isSameDay( _dateo.date, _beginDate ) ) _class.push( 'cur' ); - - _ls.push( '' - ,'' - , _beginDate.getDate(), '' ); - _beginDate.setDate( _beginDate.getDate() + 1 ); - if( i % 7 === 0 && i != 42 ) _ls.push( '' ); - } - _ls.push(''); - _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ); - } - , _buildFooter: - function( _dateo ){ - } - }; - /** - * 捕获用户更改年份 - *

        监听 年份下拉框

        - * @event year change - * @private - */ - $(document).delegate( 'body > div.UXCCalendar select.UYear, body > div.UXCCalendar select.UMonth', 'change', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateLayout(); - }); - /** - * 捕获用户更改年份 - *

        监听 下一年按钮

        - * @event next year - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UNextYear', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateYear( 1 ); - }); - /** - * 捕获用户更改年份 - *

        监听 上一年按钮

        - * @event previous year - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UPreYear', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateYear( -1 ); - }); - /** - * 增加或者减少一年 - *

        监听 年份map

        - * @event year map click - * @private - */ - $(document).delegate( "map[name=UXCCalendar_Year] area" , 'click', function( $evt ){ - $evt.preventDefault(); - var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt ); - _p.attr("action") && _ins - && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateYear( 1 ) - , _p.attr("action").toLowerCase() == 'down' && _ins.updateYear( -1 ) - ); - }); - /** - * 增加或者减少一个月 - *

        监听 月份map

        - * @event month map click - * @private - */ - $(document).delegate( "map[name=UXCCalendar_Month] area" , 'click', function( $evt ){ - $evt.preventDefault(); - var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt ); - _p.attr("action") && _ins - && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateMonth( 1 ) - , _p.attr("action").toLowerCase() == 'down' && _ins.updateMonth( -1 ) - ); - }); - /** - * 捕获用户更改月份 - *

        监听 下一月按钮

        - * @event next year - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UNextMonth', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateMonth( 1 ); - }); - /** - * 捕获用户更改月份 - *

        监听 上一月按钮

        - * @event previous year - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UPreMonth', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateMonth( -1 ); - }); - - /** - * 日期点击事件 - * @event date click - * @private - */ - $(document).delegate( 'div.UXCCalendar table a[date], div.UXCCalendar table a[dstart]', 'click', function( $evt ){ - $evt.preventDefault(); - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateSelected( $( this ) ); - /* - Calendar._triggerUpdate( [ 'date', _d, _d ] ); - */ - }); - /** - * 选择当前日期 - *

        监听确定按钮

        - * @event confirm click - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UConfirm', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).updateSelected(); - }); - /** - * 清除文本框内容 - *

        监听 清空按钮

        - * @event clear click - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UClear', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).clear(); - }); - /** - * 取消日历组件, 相当于隐藏 - *

        监听 取消按钮

        - * @event cancel click - * @private - */ - $(document).delegate( 'body > div.UXCCalendar button.UCancel', 'click', function( $evt ){ - Calendar.getInstance( Calendar.lastIpt ) - && Calendar.getInstance( Calendar.lastIpt ).cancel(); - }); - /** - * 日历组件按钮点击事件 - * @event calendar button click - * @private - */ - $(document).delegate( 'input.UXCCalendar_btn', 'click', function($evt){ - var _p = $(this), _tmp; - if( !_p.data( Calendar.Model.INPUT ) ){ - _tmp = _p.prev( 'input[type=text], textarea' ); - _tmp.length && _p.data( Calendar.Model.INPUT, _tmp ); - } - _p.data( Calendar.Model.INPUT ) - && !_p.data( Calendar.Model.INPUT ).is('[disabled]') - && Calendar.pickDate( _p.data( Calendar.Model.INPUT ) ); - }); - /** - * 日历组件点击事件, 阻止冒泡, 防止被 document click事件隐藏 - * @event UXCCalendar click - * @private - */ - $(document).delegate( 'body > div.UXCCalendar', 'click', function( $evt ){ - $evt.stopPropagation(); - }); - - /** - * DOM 加载完毕后, 初始化日历组件相关事件 - * @event dom ready - * @private - */ - $(document).ready( function($evt){ - /** - * 延迟200毫秒初始化页面的所有日历控件 - * 之所以要延迟是可以让用户自己设置是否需要自动初始化 - */ - setTimeout( function( $evt ){ - if( !Calendar.autoInit ) return; - Calendar.initTrigger( $(document) ); - }, 200 ); - /** - * 监听窗口滚动和改变大小, 实时变更日历组件显示位置 - * @event window scroll, window resize - * @private - */ - $(window).on('scroll resize', function($evt){ - var _ins = Calendar.getInstance( Calendar.lastIpt ); - _ins && _ins.visible() && _ins.updatePosition(); - }); - /** - * dom 点击时, 检查事件源是否为日历组件对象, 如果不是则会隐藏日历组件 - * @event dom click - * @private - */ - var CLICK_HIDE_TIMEOUT = null; - $(document).on('click', function($evt){ - var _src = $evt.target || $evt.srcElement; - - if( Calendar.domClickFilter ) if( Calendar.domClickFilter( $(_src) ) === false ) return; - - if( Calendar.isCalendar($evt.target||$evt.targetElement) ) return; - - if( _src && ( _src.nodeName.toLowerCase() != 'input' - && _src.nodeName.toLowerCase() != 'button' - && _src.nodeName.toLowerCase() != 'textarea' - ) ){ - Calendar.hide(); return; - } - - CLICK_HIDE_TIMEOUT && clearTimeout( CLICK_HIDE_TIMEOUT ); - - CLICK_HIDE_TIMEOUT = - setTimeout( function(){ - if( Calendar.lastIpt && Calendar.lastIpt.length && _src == Calendar.lastIpt[0] ) return; - Calendar.hide(); - }, 100); - }); - }); - /** - * 日历组件文本框获得焦点 - * @event input focus - * @private - */ - $(document).delegate( [ 'input[datatype=season]', 'input[datatype=month]', 'input[datatype=week]' - , 'input[datatype=date]', 'input[datatype=daterange]', 'input[multidate], input[datatype=monthday]' ].join(), 'focus' , function($evt){ - Calendar.pickDate( this ); - }); - $(document).delegate( [ 'button[datatype=season]', 'button[datatype=month]', 'button[datatype=week]' - , 'button[datatype=date]', 'button[datatype=daterange]', 'button[multidate], button[datatype=monthday]' ].join(), 'click' , function($evt){ - Calendar.pickDate( this ); - }); - $(document).delegate( [ 'textarea[datatype=season]', 'textarea[datatype=month]', 'textarea[datatype=week]' - , 'textarea[datatype=date]', 'textarea[datatype=daterange]', 'textarea[multidate], textarea[datatype=monthday]' ].join(), 'click' , function($evt){ - Calendar.pickDate( this ); - }); -}(jQuery)); -; - -;(function($){ - /** - * 自定义周弹框的模板HTML - * @for JC.Calendar - * @property weekTpl - * @type string - * @default empty - * @static - */ - JC.Calendar.weekTpl = ''; - /** - * 自定义周日历每周的起始日期 - *
        0 - 6, 0=周日, 1=周一 - * @for JC.Calendar - * @property weekDayOffset - * @static - * @type int - * @default 1 - */ - JC.Calendar.weekDayOffset = 0; - - function WeekModel( _selector ){ - this._selector = _selector; - } - JC.Calendar.WeekModel = WeekModel; - - function WeekView( _model ){ - this._model = _model; - } - JC.Calendar.WeekView = WeekView; - - JC.Calendar.clone( WeekModel, WeekView ); - - WeekModel.prototype.layout = - function(){ - var _r = $('#UXCCalendar_week'); - - if( !_r.length ){ - _r = $( JC.Calendar.weekTpl || this.tpl ).hide(); - _r.attr('id', 'UXCCalendar_week').hide().appendTo( document.body ); - } - return _r; - }; - - WeekModel.prototype.tpl = - [ - '
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ].join(''); - - WeekModel.prototype.month = - function(){ - var _r = 0, _tmp, _date = new Date(); - ( _tmp = this.layout().find('td.cur a[dstart]') ).length - && ( _date = new Date() ) - && ( - _date.setTime( _tmp.attr('dstart') ) - ) - ; - _r = _date.getMonth(); - return _r; - }; - - WeekModel.prototype.selectedDate = - function(){ - var _r, _tmp, _item; - _tmp = this.layout().find('td.cur'); - _tmp.length - && !_tmp.hasClass( 'unable' ) - && ( _item = _tmp.find('a[dstart]') ) - && ( - _r = { 'start': new Date(), 'end': new Date() } - , _r.start.setTime( _item.attr('dstart') ) - , _r.end.setTime( _item.attr('dend') ) - ) - ; - return _r; - }; - - WeekModel.prototype.singleLayoutDate = - function(){ - var _p = this - , _dateo = _p.defaultDate() - , _day = this.day() - , _max - , _curWeek = _p.layout().find('td.cur > a[week]') - ; - _dateo.date.setDate( 1 ); - _dateo.date.setFullYear( this.year() ); - _dateo.date.setMonth( this.month() ); - _max = maxDayOfMonth( _dateo.date ); - _day > _max && ( _day = _max ); - _dateo.date.setDate( _day ); - - _curWeek.length && ( _dateo.curweek = parseInt( _curWeek.attr('week'), 10 ) ); - JC.log( 'WeekModel.singleLayoutDate:', _curWeek.length, _dateo.curweek ); - - return _dateo; - }; - - WeekView.prototype._buildBody = - function( _dateo ){ - var _p = this - , _date = _dateo.date - , _layout = _p._model.layout() - , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime() - , weeks = weekOfYear( _date.getFullYear(), JC.Calendar.weekDayOffset ) - , nextYearWeeks = weekOfYear( _date.getFullYear() + 1, JC.Calendar.weekDayOffset ) - , nextCount = 0 - , _ls = [], _class, _data, _title, _sdate, _edate, _year = _date.getFullYear() - , _rows = Math.ceil( weeks.length / 8 ) - , ipt = JC.Calendar.lastIpt - , currentcanselect = parseBool( ipt.attr('currentcanselect') ) - ; - - if( _dateo.maxvalue && currentcanselect ){ - var _wd = _dateo.maxvalue.getDay(); - if( _wd > 0 ) { - _dateo.maxvalue.setDate( _dateo.maxvalue.getDate() + ( 7 - _wd ) ); - } - } - - _ls.push(''); - for( i = 1, j = _rows * 8; i <= j; i++ ){ - _data = weeks[ i - 1]; - if( !_data ) { - _data = nextYearWeeks[ nextCount++ ]; - _year = _date.getFullYear() + 1; - } - _sdate = new Date(); _edate = new Date(); - _sdate.setTime( _data.start ); _edate.setTime( _data.end ); - - _title = printf( "{0}年 第{1}周\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})" - , _year - , JC.Calendar.getCnNum( _data.week ) - , formatISODate( _sdate ) - , formatISODate( _edate ) - , JC.Calendar.cnWeek.charAt( _sdate.getDay() % 7 ) - , JC.Calendar.cnWeek.charAt( _edate.getDay() % 7 ) - ); - - _class = []; - - if( _dateo.minvalue && _sdate.getTime() < _dateo.minvalue.getTime() ) - _class.push( 'unable' ); - if( _dateo.maxvalue && _edate.getTime() > _dateo.maxvalue.getTime() ){ - _class.push( 'unable' ); - } - - if( _dateo.curweek ){ - if( _data.week == _dateo.curweek - && _date.getFullYear() == _sdate.getFullYear() - ) _class.push( 'cur' ); - }else{ - if( _date.getTime() >= _sdate.getTime() && _date.getTime() <= _edate.getTime() ) _class.push( 'cur' ); - } - - if( today >= _sdate.getTime() && today <= _edate.getTime() ) _class.push( 'today' ); - - _ls.push( printf( '{1}' - , _class.join(' ') - , _data.week - , _title - , _sdate.getTime() - , _edate.getTime() - , _dateo.date.getTime() - )); - if( i % 8 === 0 && i != j ) _ls.push( '' ); - } - _ls.push(''); - - _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ); - }; - - WeekView.prototype.updateSelected = - function( _userSelectedItem ){ - var _p = this, _dstart, _dend, _tmp; - if( !_userSelectedItem ){ - _tmp = this._model.selectedDate(); - _tmp && ( _dstart = _tmp.start, _dend = _tmp.end ); - }else{ - _userSelectedItem = $( _userSelectedItem ); - _tmp = getJqParent( _userSelectedItem, 'td' ); - if( _tmp && _tmp.hasClass('unable') ) return; - _dstart = new Date(); _dend = new Date(); - _dstart.setTime( _userSelectedItem.attr('dstart') ); - _dend.setTime( _userSelectedItem.attr('dend') ); - } - if( !( _dstart && _dend ) ) return; - - _p._model.selector().val( printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ) ); - $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'week', _dstart, _dend ] ); - - JC.Calendar.hide(); - }; - /** - * 取一年中所有的星期, 及其开始结束日期 - * @method weekOfYear - * @static - * @param {int} _year - * @param {int} _dayOffset 每周的默认开始为周几, 默认0(周一) - * @return Array - */ - function weekOfYear( _year, _dayOffset ){ - var _r = [], _tmp, _count = 1, _dayOffset = _dayOffset || 0 - , _year = parseInt( _year, 10 ) - , _d = new Date( _year, 0, 1 ); - /** - * 元旦开始的第一个星期一开始的一周为政治经济上的第一周 - */ - _d.getDay() > 1 && _d.setDate( _d.getDate() - _d.getDay() + 7 ); - - _d.getDay() === 0 && _d.setDate( _d.getDate() + 1 ); - - _dayOffset > 0 && ( _dayOffset = (new Date( 2000, 1, 2 ) - new Date( 2000, 1, 1 )) * _dayOffset ); - - while( _d.getFullYear() <= _year ){ - _tmp = { 'week': _count++, 'start': null, 'end': null }; - _tmp.start = _d.getTime() + _dayOffset; - _d.setDate( _d.getDate() + 6 ); - _tmp.end = _d.getTime() + _dayOffset; - _d.setDate( _d.getDate() + 1 ); - if( _d.getFullYear() > _year ) { - _d = new Date( _d.getFullYear(), 0, 1 ); - if( _d.getDay() < 2 ) break; - } - _r.push( _tmp ); - } - return _r; - } -}(jQuery)); -; - -;(function($){ - /** - * 自定义月份弹框的模板HTML - * @for JC.Calendar - * @property monthTpl - * @type string - * @default empty - * @static - */ - JC.Calendar.monthTpl = ''; - - function MonthModel( _selector ){ - this._selector = _selector; - } - JC.Calendar.MonthModel = MonthModel; - - function MonthView( _model ){ - this._model = _model; - } - JC.Calendar.MonthView = MonthView; - - JC.Calendar.clone( MonthModel, MonthView ); - - MonthModel.prototype.layout = - function(){ - var _r = $('#UXCCalendar_month'); - - if( !_r.length ){ - _r = $( JC.Calendar.monthTpl || this.tpl ).hide(); - _r.attr('id', 'UXCCalendar_month').hide().appendTo( document.body ); - } - return _r; - }; - - MonthModel.prototype.tpl = - [ - '
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ].join(''); - - MonthModel.prototype.month = - function(){ - var _r = 0, _tmp, _date; - ( _tmp = this.layout().find('td.cur a[dstart]') ).length - && ( _date = new Date() ) - && ( - _date.setTime( _tmp.attr('dstart') ) - , _r = _date.getMonth() - ) - ; - return _r; - }; - - MonthModel.prototype.selectedDate = - function(){ - var _r, _tmp, _item; - _tmp = this.layout().find('td.cur'); - _tmp.length - && !_tmp.hasClass( 'unable' ) - && ( _item = _tmp.find('a[dstart]') ) - && ( - _r = { 'start': new Date(), 'end': new Date() } - , _r.start.setTime( _item.attr('dstart') ) - , _r.end.setTime( _item.attr('dend') ) - ) - ; - return _r; - }; - - MonthView.prototype._buildBody = - function( _dateo ){ - var _p = this - , _date = _dateo.date - , _layout = _p._model.layout() - , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime() - , nextCount = 0 - , _ls = [], _class, _data, _title, _dstart, _dend, _year = _date.getFullYear() - , _rows = 4 - , ipt = JC.Calendar.lastIpt - , currentcanselect = parseBool( ipt.attr('currentcanselect') ) - , _tmpMultidate = _dateo.multidate ? _dateo.multidate.slice() : null - ; - - if( _dateo.maxvalue && currentcanselect ){ - _dateo.maxvalue.setDate( maxDayOfMonth( _dateo.maxvalue ) ); - } - - _ls.push(''); - for( i = 1, j = 12; i <= j; i++ ){ - _dstart = new Date( _year, i - 1, 1 ); - _dend = new Date( _year, i - 1, maxDayOfMonth( _dstart ) ); - - _title = printf( "{0}年 {1}月
        开始日期: {2} (周{4})
        结束日期: {3} (周{5})" - , _year - , JC.Calendar.getCnNum( i ) - , formatISODate( _dstart ) - , formatISODate( _dend ) - , JC.Calendar.cnWeek.charAt( _dstart.getDay() % 7 ) - , JC.Calendar.cnWeek.charAt( _dend.getDay() % 7 ) - ); - - _class = []; - - if( _dateo.minvalue && _dstart.getTime() < _dateo.minvalue.getTime() ) - _class.push( 'unable' ); - if( _dateo.maxvalue && _dend.getTime() > _dateo.maxvalue.getTime() ){ - _class.push( 'unable' ); - } - - if( _tmpMultidate ){ - //JC.log( '_tmpMultidate.length:', _tmpMultidate.length ); - $.each( _tmpMultidate, function( _ix, _item ){ - //JC.log( _dstart.getTime(), _item.start.getTime(), _item.end.getTime() ); - if( _dstart.getTime() >= _item.start.getTime() - && _dstart.getTime() <= _item.end.getTime() ){ - _class.push( 'cur' ); - _tmpMultidate.splice( _ix, 1 ); - //JC.log( _tmpMultidate.length ); - return false; - } - }); - }else{ - if( _date.getTime() >= _dstart.getTime() - && _date.getTime() <= _dend.getTime() ) _class.push( 'cur' ); - } - if( today >= _dstart.getTime() && today <= _dend.getTime() ) _class.push( 'today' ); - - _cnUnit = JC.Calendar.cnUnit.charAt( i % 10 ); - i > 10 && ( _cnUnit = "十" + _cnUnit ); - - _ls.push( printf( '{2}月' - , _class.join(' ') - , _title - , _cnUnit - , _dstart.getTime() - , _dend.getTime() - , i - )); - if( i % 3 === 0 && i != j ) _ls.push( '' ); - } - _ls.push(''); - - _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ); - }; - - MonthModel.prototype.multiselectDate = - function(){ - var _p = this, _r = [], _sp, _item, _dstart, _dend; - _p.layout().find('td.cur').each( function(){ - _sp = $(this); _item = _sp.find( '> a[dstart]' ); - if( _sp.hasClass( 'unable' ) ) return; - _dstart = new Date(); _dend = new Date(); - _dstart.setTime( _item.attr('dstart') ); - _dend.setTime( _item.attr('dend') ); - _r.push( { 'start': _dstart, 'end': _dend } ); - }); - return _r; - }; - - MonthView.prototype.updateSelected = - function( _userSelectedItem ){ - var _p = this, _dstart, _dend, _tmp, _text, _ar; - if( !_userSelectedItem ){ - if( _p._model.multiselect() ){ - _tmp = this._model.multiselectDate(); - if( !_tmp.length ) return; - _ar = []; - $.each( _tmp, function( _ix, _item ){ - _ar.push( printf( '{0} 至 {1}', formatISODate( _item.start ), formatISODate( _item.end ) ) ); - }); - _text = _ar.join(','); - }else{ - _tmp = this._model.selectedDate(); - _tmp && ( _dstart = _tmp.start, _dend = _tmp.end ); - - _dstart && _dend - && ( _text = printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ) ); - } - }else{ - _userSelectedItem = $( _userSelectedItem ); - _tmp = getJqParent( _userSelectedItem, 'td' ); - if( _tmp && _tmp.hasClass('unable') ) return; - - if( _p._model.multiselect() ){ - _tmp.toggleClass('cur'); - return; - } - _dstart = new Date(); _dend = new Date(); - _dstart.setTime( _userSelectedItem.attr('dstart') ); - _dend.setTime( _userSelectedItem.attr('dend') ); - - _text = printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ); - } - - if( !_text ) return; - - _p._model.selector().val( _text ); - $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'month', _dstart, _dend ] ); - - JC.Calendar.hide(); - }; - -}(jQuery)); -; - -;(function($){ - /** - * 自定义周弹框的模板HTML - * @for JC.Calendar - * @property seasonTpl - * @type string - * @default empty - * @static - */ - JC.Calendar.seasonTpl = ''; - - function SeasonModel( _selector ){ - this._selector = _selector; - } - JC.Calendar.SeasonModel = SeasonModel; - - function SeasonView( _model ){ - this._model = _model; - } - JC.Calendar.SeasonView = SeasonView; - - JC.Calendar.clone( SeasonModel, SeasonView ); - - SeasonModel.prototype.layout = - function(){ - var _r = $('#UXCCalendar_season'); - - if( !_r.length ){ - _r = $( JC.Calendar.seasonTpl || this.tpl ).hide(); - _r.attr('id', 'UXCCalendar_season').hide().appendTo( document.body ); - } - return _r; - }; - - SeasonModel.prototype.tpl = - [ - '
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ].join(''); - - SeasonModel.prototype.month = - function(){ - var _r = 0, _tmp, _date; - ( _tmp = this.layout().find('td.cur a[dstart]') ).length - && ( _date = new Date() ) - && ( - _date.setTime( _tmp.attr('dstart') ) - , _r = _date.getMonth() - ) - ; - return _r; - }; - - SeasonModel.prototype.selectedDate = - function(){ - var _r, _tmp, _item; - _tmp = this.layout().find('td.cur'); - _tmp.length - && !_tmp.hasClass( 'unable' ) - && ( _item = _tmp.find('a[dstart]') ) - && ( - _r = { 'start': new Date(), 'end': new Date() } - , _r.start.setTime( _item.attr('dstart') ) - , _r.end.setTime( _item.attr('dend') ) - ) - ; - return _r; - }; - - SeasonView.prototype._buildBody = - function( _dateo ){ - var _p = this - , _date = _dateo.date - , _layout = _p._model.layout() - , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime() - , nextCount = 0 - , _ls = [], _class, _data, _title, _sdate, _edate, _year = _date.getFullYear() - , _rows = 4 - , ipt = JC.Calendar.lastIpt - , currentcanselect = parseBool( ipt.attr('currentcanselect') ) - ; - - if( _dateo.maxvalue && currentcanselect ){ - var _m = _dateo.maxvalue.getMonth() + 1, _md; - - if( _m % 3 !== 0 ){ - _dateo.maxvalue.setDate( 1 ); - _dateo.maxvalue.setMonth( _m + ( 3 - ( _m % 3 ) - 1 ) ); - } - _dateo.maxvalue.setDate( maxDayOfMonth( _dateo.maxvalue ) ); - } - - _ls.push(''); - for( i = 1, j = 4; i <= j; i++ ){ - _sdate = new Date( _year, i * 3 - 3, 1 ); - _edate = new Date( _year, i * 3 - 1, 1 ); - _edate.setDate( maxDayOfMonth( _edate ) ); - - _cnUnit = JC.Calendar.cnUnit.charAt( i % 10 ); - i > 10 && ( _cnUnit = "十" + _cnUnit ); - - _title = printf( "{0}年 第{1}季度
        开始日期: {2} (周{4})
        结束日期: {3} (周{5})" - , _year - , JC.Calendar.getCnNum( i ) - , formatISODate( _sdate ) - , formatISODate( _edate ) - , JC.Calendar.cnWeek.charAt( _sdate.getDay() % 7 ) - , JC.Calendar.cnWeek.charAt( _edate.getDay() % 7 ) - ); - - _class = []; - - if( _dateo.minvalue && _sdate.getTime() < _dateo.minvalue.getTime() ) - _class.push( 'unable' ); - if( _dateo.maxvalue && _edate.getTime() > _dateo.maxvalue.getTime() ){ - _class.push( 'unable' ); - } - - if( _date.getTime() >= _sdate.getTime() && _date.getTime() <= _edate.getTime() ) _class.push( 'cur' ); - if( today >= _sdate.getTime() && today <= _edate.getTime() ) _class.push( 'today' ); - - - _ls.push( printf( '{2}季度' - , _class.join(' ') - , _title - , _cnUnit - , _sdate.getTime() - , _edate.getTime() - , i - )); - if( i % 2 === 0 && i != j ) _ls.push( '' ); - } - _ls.push(''); - - _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ); - }; - - SeasonView.prototype.updateSelected = - function( _userSelectedItem ){ - var _p = this, _dstart, _dend, _tmp; - if( !_userSelectedItem ){ - _tmp = this._model.selectedDate(); - _tmp && ( _dstart = _tmp.start, _dend = _tmp.end ); - }else{ - _userSelectedItem = $( _userSelectedItem ); - _tmp = getJqParent( _userSelectedItem, 'td' ); - if( _tmp && _tmp.hasClass('unable') ) return; - _dstart = new Date(); _dend = new Date(); - _dstart.setTime( _userSelectedItem.attr('dstart') ); - _dend.setTime( _userSelectedItem.attr('dend') ); - } - if( !( _dstart && _dend ) ) return; - - _p._model.selector().val( printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ) ); - $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'season', _dstart, _dend ] ); - - JC.Calendar.hide(); - }; - -}(jQuery)); -; - -;(function($){ - /** - * 多选日期弹框的模板HTML - * @for JC.Calendar - * @property monthdayTpl - * @type string - * @default empty - * @static - */ - JC.Calendar.monthdayTpl = ''; - /** - * 多先日期弹框标题末尾的附加字样 - * @for JC.Calendar - * @property monthdayHeadAppendText - * @type string - * @default empty - * @static - */ - JC.Calendar.monthdayHeadAppendText = ''; - - function MonthDayModel( _selector ){ - this._selector = _selector; - - } - JC.Calendar.MonthDayModel = MonthDayModel; - - function MonthDayView( _model ){ - this._model = _model; - - } - JC.Calendar.MonthDayView = MonthDayView; - - JC.Calendar.clone( MonthDayModel, MonthDayView ); - - MonthDayView.prototype.init = - function(){ - var _p = this; - - $(_p).on('MonthDayToggle', function( _evt, _item ){ - var _data = _p._model.findItemByTimestamp( _item.attr('dstart') ); - if( _data.atd.hasClass('unable') ) return; - //JC.log( 'MonthDayView: MonthDayToggle', _item.attr('dstart'), _data.atd.hasClass( 'cur' ) ); - _data.input.prop( 'checked', _data.atd.hasClass( 'cur' ) ); - _p._model.fixCheckall(); - }); - - $(_p).on('MonthDayInputToggle', function( _evt, _item ){ - var _data = _p._model.findItemByTimestamp( _item.attr('dstart') ); - /** - * 如果 atd 为空, 那么是 全选按钮触发的事件 - */ - if( !_data.atd ){ - //alert( _item.attr('action') ); - $(_p).trigger( 'MonthDayToggleAll', [ _item ] ); - return; - } - - if( _data.atd.hasClass('unable') ) return; - //JC.log( 'MonthDayView: MonthDayInputToggle', _item.attr('dstart'), _data.input.prop('checked') ); - _data.atd[ _data.input.prop('checked') ? 'addClass' : 'removeClass' ]( 'cur' ); - _p._model.fixCheckall(); - }); - - $(_p).on('MonthDayToggleAll', function( _evt, _input ){ - var _all = _p._model.layout().find( 'a[dstart]' ), _checked = _input.prop('checked'); - //JC.log( 'MonthDayView: MonthDayToggleAll', _input.attr('action'), _input.prop('checked'), _all.length ); - if( !_all.length ) return; - _all.each( function(){ - var _sp = $(this), _td = getJqParent( _sp, 'td' ); - if( _td.hasClass('unable') ) return; - _td[ _checked ? 'addClass' : 'removeClass' ]( 'cur' ); - $( _p ).trigger( 'MonthDayToggle', [ _sp ] ); - }); - }); - - return this; - }; - - MonthDayModel.prototype.fixCheckall = - function(){ - var _p = this, _cks, _ckAll, _isAll = true, _sp; - _p._fixCheckAllTm && clearTimeout( _p._fixCheckAllTm ); - _p._fixCheckAllTm = - setTimeout( function(){ - _ckAll = _p.layout().find('input.js_JCCalendarCheckbox[action=all]'); - _cks = _p.layout().find('input.js_JCCalendarCheckbox[dstart]'); - - _cks.each( function(){ - _sp = $(this); - var _data = _p.findItemByTimestamp( _sp.attr('dstart') ); - if( _data.atd.hasClass( 'unable' ) ) return; - if( !_sp.prop('checked') ) return _isAll = false; - }); - _ckAll.prop('checked', _isAll ); - }, 100); - }; - - MonthDayModel.prototype.findItemByTimestamp = - function( _tm ){ - var _p = this, _r = { - 'a': null - , 'atd': null - , 'atr': null - , 'input': null - , 'inputtr': null - , 'tm': _tm - }; - - if( _tm ){ - _r.a = _p.layout().find( printf( 'a[dstart={0}]', _tm ) ); - _r.atd = getJqParent( _r.a, 'td' ); - _r.atr = getJqParent( _r.a, 'tr' ); - - _r.input = _p.layout().find( printf( 'input[dstart={0}]', _tm ) ); - _r.inputtr = getJqParent( _r.input, 'tr' ); - } - - return _r; - }; - - MonthDayModel.prototype.layout = - function(){ - var _r = $('#UXCCalendar_monthday'); - - if( !_r.length ){ - _r = $( printf( JC.Calendar.monthdayTpl || this.tpl, JC.Calendar.monthdayHeadAppendText ) ).hide(); - _r.attr('id', 'UXCCalendar_monthday').hide().appendTo( document.body ); - - var _month = $( [ - '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - , '' - ].join('') ).appendTo( _r.find('select.UMonth' ) ); - - } - return _r; - }; - - MonthDayModel.prototype.tpl = - [ - '
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,' ' - ,' {0}' - ,' ' - ,' ' - /* - ,' ' - ,' 年' - ,' ' - ,' 月{0}' - */ - ,'
        ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ].join(''); - - MonthDayModel.prototype.multiselect = function(){ return true; }; - - MonthDayModel.prototype.multiselectDate = - function(){ - var _p = this - , _r = [] - , _sp - , _item - , _date - ; - - _p.layout().find('input.js_JCCalendarCheckbox[dstart]').each( function () { - _sp = $(this); - if( !_sp.prop('checked') ) return; - _date = new Date(); - _date.setTime( _sp.attr("dstart") ); - _r.push( _date ); - }); - - return _r; - }; - - MonthDayView.prototype.updateSelected = - function( _userSelectedItem ){ - var _p = this - , _dstart - , _dend - , _tmp - , _text - , _ar - ; - - if( !_userSelectedItem ) { - _tmp = this._model.multiselectDate(); - if( !_tmp.length ) return; - _ar = []; - - for (var i = 0; i < _tmp.length; i++) { - _ar.push(formatISODate(_tmp[i])); - } - _text = _ar.join(','); - } else { - _userSelectedItem = $( _userSelectedItem ); - _tmp = getJqParent( _userSelectedItem, 'td' ); - if( _tmp && _tmp.hasClass('unable') ) return; - - if( _p._model.multiselect() ){ - _tmp.toggleClass('cur'); - //$(_p).trigger( 'MonthDayToggle', [ _tmp ] ); - return; - } - _date = new Date(); - _date.setTime( _userSelectedItem.attr('date') ); - _text = _userSelectedItem.attr("date"); - _text = printf( '{0}', formatISODate( _date ) ); - } - - if( !_text ) return; - if( _tmp.length ){ - _p._model.selector().attr('placeholder', printf( '{0}年 {1}', _tmp[0].getFullYear(), _tmp[0].getMonth() + 1 ) ); - _p._model.selector().attr('defaultdate', formatISODate( _tmp[0] ) ); - } - - _p._model.selector().val( _text ); - $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'monthday', _tmp ] ); - - JC.Calendar.hide(); - }; - - /* - MonthDayView.prototype._buildHeader = - function( _dateo ){ - var _p = this, - _layout = _p._model.layout(); - - var year = _dateo.date.getFullYear(), - month = _dateo.date.getMonth() + 1; - - //_layout.find('div.UHeader span.UYear').html(year); - //_layout.find('div.UHeader span.UMonth').html(month); - - }; - */ - - MonthDayModel.prototype.fixedDate = - function( _dateo ){ - var _p = this, _lastIpt = JC.Calendar.lastIpt, _tmpDate; - _lastIpt - && !_lastIpt.is('[defaultdate]') - && ( - _tmpDate = cloneDate( _dateo.multidate[0].start ) - //, _tmpDate.setDate( 1 ) - , _lastIpt.attr('defaultdate', formatISODate( _tmpDate ) ) - /* - , !_lastIpt.is( '[placeholder]' ) - && _lastIpt.attr('placeholder', printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) ) - */ - ) - ; - }; - - MonthDayView.prototype._buildBody = - function( _dateo ){ - var _p = this, _layout = _p._model.layout(); - var _maxday = maxDayOfMonth( _dateo.date ), - _ls = [], - i, - _class, - _tempDate, - _tempDay, - _today = new Date(); - - _p._model.fixedDate( _dateo ); - - _tempDate = new Date(_dateo.date.getFullYear(), _dateo.date.getMonth(), 1); - _tempDay = _tempDate.getDay(); - - var _headLs = [], _dayLs = [], _ckLs = []; - var _headClass = [], _dayClass = []; - - _headLs.push('星期'); - _dayLs.push('日期'); - _ckLs.push('
        @@ -68,99 +68,99 @@
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -198,129 +198,129 @@
        1 + 1 2 + 2 33 + 33 44 + 44 5 + 5 6 + 6 7 + 7
        8 + 8 9 + 9 10 + 10 11 + 11 12 + 12 13 + 13 14 + 14
        15 + 15 16 + 16 17 + 17 18 + 18 19 + 19 20 + 20 21 + 21
        22 + 22 23 + 23 24 + 24 25 + 25 26 + 26 27 + 27 28 + 28
        29 + 29 30 + 30 31 + 31 32 + 32 33 + 33 34 + 34 35 + 35
        36 + 36 37 + 37 38 + 38 39 + 39 40 + 40 41 + 41 42 + 42
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -351,35 +351,35 @@
        1 + 1 2 + 2 33 + 33 44 + 44 5 + 5 6 + 6 7 + 7 8 + 8
        9 + 9 10 + 10 11 + 11 12 + 12 13 + 13 14 + 14 15 + 15 16 + 16
        17 + 17 18 + 18 19 + 19 20 + 20 21 + 21 22 + 22 23 + 23 24 + 24
        25 + 25 26 + 26 27 + 27 28 + 28 29 + 29 30 + 30 31 + 31 32 + 32
        33 + 33 34 + 34 35 + 35 36 + 36 37 + 37 38 + 38 39 + 39 40 + 40
        41 + 41 42 + 42 43 + 43 44 + 44 45 + 45 46 + 46 47 + 47 48 + 48
        49 + 49 50 + 50 51 + 51 52 + 52 53 + 53 54 + 54 55 + 55 56 + 56
        - - - - - - - - - - - - @@ -395,6 +395,78 @@ +
        +
        JC Calendar pickYear 模板 1234567890
        +
        +
        +
        一月 + 一月 二月 + 二月 三月 + 三月
        四月 + 四月 五月 + 五月 六月 + 六月
        七月 + 七月 八月 + 八月 九月 + 九月
        十月 + 十月 十一月 + 十一月 十二月 + 十二月
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + 1996199719981999
        20002001200220032004
        20002001200220032004
        20002001200220032004
        20002001200220032004
        20002001200220032004
        2000200120022003 + +
        +
        + + + +
        + + +
        + + +
        JC Calendar pickSeason 模板 1234567890
        @@ -411,15 +483,15 @@ - - - - @@ -580,15 +652,14 @@ + $("map[name=UXCCalendar_Month] area").click(function($evt) { + var p = $(this); + alert(p.attr("action")); + }); + - diff --git a/comps/DCalendar/DCalendar.date.js b/comps/DCalendar/DCalendar.date.js new file mode 100755 index 000000000..b80d43569 --- /dev/null +++ b/comps/DCalendar/DCalendar.date.js @@ -0,0 +1,1523 @@ +;(function(define, _win) { 'use strict'; define( ['JC.BaseMVC'], function () { +/** + * 双日历日期选择组件 + *

        + * require: + * JC.BaseMVC + *

        + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        datatype = string 必填项
        + *
        声明日历控件的类型: + *
        ddate: 日期日历 + *
        drange: 日期范围日历( 成对出现 ) + *
        + * + *
        minvalue = ISO Date
        + *
        日期的最小时间, YYYY-MM-DD
        + * + *
        maxvalue = ISO Date
        + *
        日期的最大时间, YYYY-MM-DD
        + * + *
        currentcanselect = bool, default = true
        + *
        当前日期是否能选择
        + * + *
        monthmum = int
        + *
        + * 声明显示月份日历面板的个数(一次性可显示2到12个月份),默认为2(双日历) + *
        + * + *
        showtype = block || float
        + *
        + * 声明月份日历面板的显示方式,默认为float
        + * float(比如两个月份并排显示) 查看
        + * block (月份日历面板竖排显示)查看
        + *
        + * + *
        calendarshow = function
        + *
        显示日历显示后的回调 +
        function calendarShow( selector ) {
        +    var ins = this;
        +    JC.log( "calendarshow", new Date().getTime(), selector.val() );
        +}
        + * + *
        calendarhide = function
        + *
        隐藏日历后的回调 +
        function calendarhide( selector ) {
        +    JC.log( "calendarhide", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        calendarclear = function
        + *
        清空选中日期后的回调 +
        function calendarclear( selector ) {
        +    JC.log( "calendarclear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updatedate = function
        + *
        选中日期后回调 +
        function updatedate( selector ) {
        +    JC.log( "updatedate", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updatemonth = function
        + *
        选中月份后回调 +
        function updatemonth( selector ) {
        +    JC.log( "updatedatemonth", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updateyear = function
        + *
        选中年份后回调 +
        function updateyear( selector ) {
        +    JC.log( "updatedateyear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        beforeupdateyear = function
        + *
        更新年份前的回调,即年份日历面板出来时 +
        function beforeupdateyear( selector ) {
        +    JC.log( "beforeupdateyear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        beforeupdatemonth = function
        + *
        更新月份前的回调,即月份日历面板出来时 +
        function beforeupdateymonth( selector ) {
        +    JC.log( "beforeupdateymonth", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        beforeupdatemont = function
        + *
        更新月份前的回调,即月份日历面板出来时 +
        function beforeupdateymonth( selector ) {
        +    JC.log( "beforeupdateymonth", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updateprevpageyear = function
        + *
        点击上一页年份时的回调 +
        function updatprevtpageyear( selector ) {
        +    JC.log( "updateprevpageyear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updatenextpageyear = function
        + *
        点击下一页年份时的回调 +
        function updatenextpageyear( selector ) {
        +    JC.log( "updatenextpageyear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updateprevyear = function
        + *
        点击上一年时的回调,月份日历面板点击上一页 +
        function updatprevyear( selector ) {
        +    JC.log( "updateprevyear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updatenextyear = function
        + *
        点击下一年时的回调,月份日历面板点击下一页 +
        function updatenextyear( selector ) {
        +    JC.log( "updatenextyear", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updateprevmonth = function
        + *
        点击上一月时的回调,日期日历面板点击上一页 +
        function updatprevmonth( selector ) {
        +    JC.log( "updateprevmonth", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        updatenextmonth = function
        + *
        点击下一月时的回调,日期日历面板点击下一页 +
        function updatenextmonth( selector ) {
        +    JC.log( "updatenextmonth", $(selector).val(), new Date().getTime() );
        +}
        + * + *
        + * + * @namespace JC + * @class DCalendar + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-20 + * @author zuojing | 75 Team +*/ + JC.DCalendar = DCalendar; + JC.f.addAutoInit && JC.f.addAutoInit( DCalendar ); + + function DCalendar(_selector) { + _selector && (_selector = $(_selector)); + if ( DCalendar.getInstance(_selector) ) return DCalendar.getInstance(_selector); + DCalendar.getInstance(_selector, this); + this._model = new DCalendar.Model(_selector); + this._view = new DCalendar.View(this._model); + this._init(); + + //JC.log( 'DCalendar inited', new Date().getTime() ); + } + + /** + * 获取或设置 DCalendar 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {DCalendarInstance} + */ + DCalendar.getInstance = function (_selector, _setter) { + var _type = DCalendar._type( _selector ); + + if ( typeof _selector === 'string' && !/div', DCalendar.Model._boxId )); + + if( !_items.length ) return; + + _items.each( function() { + var _p = $(this), + _ins = _p.data( 'CDCalendarIns' ); + + if( !_ins ) return; + + if ( _ins._model.layout().is(':visible') ) { + _ins.update(); + } + + }); + }, + + /** + * 弹出日期选择框 + * @method pickDate + * @static + * @param {selector} _selector 需要显示日期选择框的标签 + * @example +
        +
        + + manual JC.DCalendar.pickDate +
        +
        + + manual JC.DCalendar.pickDate +
        +
        + + */ + DCalendar.pickDate = function (_selector) { + var _selector = $(_selector), + _ins, + _isIgnore = _selector.is('[ignoreprocess]'); + + if ( !(_selector && _selector.length) ) return; + + if ( ( $(DCalendar.lastSrc)[0] === _selector[0]) && DCalendar.visible ) { + _selector.attr('cdc_ignore', true); + } else { + _selector.attr('cdc_ignore', false); + } + + if ( JC.f.parseBool( _selector.attr('cdc_ignore') ) ) { + return; + } + + DCalendar.lastSrc = _selector; + DCalendar.visible = false; + + _selector.attr('ignoreprocess', true) + .addClass('js_compDCalendar') + .blur(); + + !_isIgnore && _selector.removeAttr('ignoreprocess'); + + _ins = DCalendar.getInstance( _selector ); + !_ins && ( _ins = new DCalendar( _selector ) ); + + _ins.trigger(DCalendar.Model.SHOW); + + return this; + }, + + DCalendar.lastSrc = null, + + BaseMVC.build(DCalendar); + + JC.f.extendObject(DCalendar.prototype, { + _beforeInit: function () { + //this.trigger(DCalendar.Model.CDC_INITED ); + }, + + _initHanlderEvent: function () { + var _p = this; + + _p.on('CDC_INITED', function () { + _p._model.selector().addClass('CDCalendar_icon'); + }); + + _p._model.selector().on('keydown', function ( _evt ) { + _evt.preventDefault(); + }); + + _p.on(DCalendar.Model.SHOW, function () { + _p._model.selector(DCalendar.lastSrc); + _p._view.show(); + DCalendar.visible = true; + _p._model.calendarshow() + && _p._model.calendarshow().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.HIDDEN, function () { + _p._model.selector().addClass('cdc_ignore', false); + _p._view.hide(); + DCalendar.visible = false; + _p.selector().blur(); + _p._model.calendarhide() + && _p._model.calendarhide().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.CHANGE, function (_evt, _srcSelector) { + _p._view.change(_srcSelector); + }); + + _p.on(DCalendar.Model.SETDATE, function (_evt, _srcSelector) { + _p._model.setSelected(_srcSelector); + _p._model.updatedate() + && _p._model.updatedate().call(_p, _p.selector()); + + }); + + // _p.on(DCalendar.Model.UPDATESELECTOR, function (_evt, _srcSelector) { + + // }); + + _p.on(DCalendar.Model.CLEAR, function () { + _p._model.clear(); + _p._model.calendarclear() + && _p._model.calendarclear().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.DATEVIEW, function (_evt, _srcSelector) { + _p._view.dateView(_srcSelector); + _p._model.updatemonth() + && _p._model.updatemonth().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.MONTHVIEW, function (_evt, _srcSelector) { + _p._view.monthView(_srcSelector); + + if ( $(_srcSelector).attr('data-year') ) { + _p._model.updateyear() + && _p._model.updateyear().call(_p, _p.selector()); + } else { + _p._model.beforeupdatemonth() + && _p._model.beforeupdatemonth().call(_p, _p.selector()); + } + + }); + + _p.on(DCalendar.Model.YEARVIEW, function (_evt, _srcSelector) { + _p._view.yearView(_srcSelector); + _p._model.beforeupdateyear() + && _p._model.beforeupdateyear().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.UPDATENEXTPAGEYEAR, function () { + _p._model.updatenextpageyear() + && _p._model.updatenextpageyear().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.UPDATEPREVPAGEYEAR, function () { + _p._model.updateprevpageyear() + && _p._model.updateprevpageyear().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.UPDATEPREVMONTH, function () { + _p._model.updateprevmonth() + && _p._model.updateprevmonth().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.UPDATENEXTMONTH, function () { + _p._model.updatenextmonth() + && _p._model.updatenextmonth().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.UPDATEPREVYEAR, function () { + _p._model.updateprevyear() + && _p._model.updateprevyear().call(_p, _p.selector()); + }); + + _p.on(DCalendar.Model.UPDATENEXTYEAR, function () { + _p._model.updatenextyear() + && _p._model.updatenextyear().call(_p, _p.selector()); + }); + + }, + + _inited: function () { + + } + + }); + + DCalendar.Model._instanceName = "DCalendar"; + DCalendar.Model.CDC_INITED = "CDC_INITED"; + DCalendar.Model._boxId = "CompDCalendar"; + DCalendar.Model.SHOW = "CDC_SHOW"; + DCalendar.Model.HIDDEN = "CDC_HIDDEN"; + DCalendar.Model.CHANGE = "CDC_CHANGE"; + DCalendar.Model.SETDATE = "CDC_SETDATE"; + DCalendar.Model.DATEVIEW = "CDC_DATEVIEW"; + DCalendar.Model.MONTHVIEW = "CDC_MONTHVIEW"; + DCalendar.Model.YEARVIEW = "CDC_YEARVIEW"; + DCalendar.Model.CLEAR = "CDC_CLEAR"; + //DCalendar.Model.UPDATESELECTOR = "CDC_UPDATESELECTOR"; + DCalendar.Model.UPDATENEXTPAGEYEAR = "CDC_UPDATENEXTPAGEYEAR"; + DCalendar.Model.UPDATEPREVPAGEYEAR = "CDC_UPDATEPREVPAGEYEAR"; + DCalendar.Model.UPDATEPREVMONTH = "CDC_UPDATEPREVMONTH"; + DCalendar.Model.UPDATENEXTMONTH = "CDC_UPDATENEXTMONTH"; + DCalendar.Model.UPDATEPREVYEAR = "CDC_UPDATEPREVYEAR"; + DCalendar.Model.UPDATENEXTYEAR = "CDC_UPDATENEXTYEAR"; + + JC.f.extendObject(DCalendar.Model.prototype, { + init: function () { + var _p = this; + }, + + isDCalendar: function ( _selector ) { + var _selector = $(_selector), + _r = 0; + + if ( _selector.length ) { + + if ( _selector.prop('nodeName') + && _selector.attr('datatype') + && ( _selector.prop('nodeName').toLowerCase() === 'input' + || _selector.prop('nodeName').toLowerCase() === 'button' ) + && ( (_selector.attr('datatype') || '').toLowerCase() === 'ddate' + || ( _selector.attr('multidate') || '' ).toLowerCase() === 'ddate' ) + ) { + _r = 1; + } + + _selector.hasClass('js_compDCalendar') && ( _r = 1 ); + } + + return _r; + + }, + + curSelectedDate: function () { + var _p = this, + _r = _p.selector().val().trim(); + + _r = ( JC.f.dateDetect(_r) || new Date() ); + + return _r; + + }, + + curYear: function () { + return this.curSelectedDate().getFullYear(); + }, + + curMonth: function () { + return this.curSelectedDate().getMonth(); + }, + + minValue: function () { + var _r = this.attrProp('minValue') || ''; + + _r && ( _r = JC.f.dateDetect(_r) ); + + return _r; + }, + + maxValue: function () { + var _r = this.attrProp('maxValue') || ''; + + _r && ( _r = JC.f.dateDetect(_r) ); + + return _r; + }, + + minYear: function () { + var _p = this, + _r; + + _p.minValue() && ( _r = _p.minValue().getFullYear() ); + + return _r; + }, + + maxYear: function () { + var _p = this, + _r; + + _p.maxValue() && ( _r = _p.maxValue().getFullYear() ); + + return _r; + }, + + currentCanSelect: function () { + var _r = this.boolProp('currentCanSelect'); + + ( typeof _r === 'undefined' ) && ( _r = true ); + + return _r; + }, + + weekendCanSelect: function () { + var _r = this.boolProp('weekendCanSelect'); + + ( typeof _r === 'undefined' ) && ( _r = true ); + + return _r; + }, + + /** + * 显示的月份面板为2到12个 + */ + monthNum: function () { + var _r = this.intProp('monthNum'); + + (!_r || _r < 2 || _r > 12) && ( _r = 2 ); + + return _r; + }, + + showtype: function () { + var _r = this.attrProp('showtype'); + + if ( _r === 'block' ) { + _r = 'block'; + } else { + _r = "float"; + } + + return _r; + }, + + // multiselect: function () { + // var _r = this.boolProp('multiselect'); + + // ( typeof _r === 'undefined' ) && ( _r = false ); + + // return _r; + // }, + + allYearsTpl: function (_startYear, _endYear) { + //前14年后13年 + var _p = this, + _r = '
        ', + i, + j; + + for ( i = _startYear, j = 1; i <= _endYear; i++ ) { + _r += '' + + if ( j % 7 === 0 ) { + if ( j === 28 ) { + _r += '' + return _r; + } else { + _r += '' + } + } + + j++ + } + + return _r; + + }, + + datesOfMonthTpl: function (_date) { + + var _p = this, + _r = '', + _t, + _d, + _today = new Date(), + _formatDate, + _day, + _maxDayOfMonth = JC.f.maxDayOfMonth(_date), + _placeholder = '', + i, + j, + _todayClass, + _weekendClass; + + for ( i = 1; i <= _maxDayOfMonth; i++ ) { + _d = new Date(_date.getFullYear(), _date.getMonth(), i); + _formatDate = JC.f.formatISODate(_d); + _day = (_d.getDay() + 6) % 7; + _todayClass = ''; + _weekendClass = ''; + + ( JC.f.isSameDay(_today, _d) ) && ( _todayClass = "today" ); + ( _day === 5 || _day === 6 ) && ( _weekendClass = "weekend" ); + + _t = ''; + + if ( i === 1 && _day > 0) { + + j = _day; + + while ( j-- ) { + _placeholder += ''; + } + + _r = _r + _placeholder; + _placeholder = ''; + + } + + _r += _t; + + if ( i === _maxDayOfMonth && _day < 6) { + + j = 6 - _day; + + while ( j-- ) { + _placeholder += ''; + } + + _r = _r + _placeholder; + _placeholder = ''; + + } + + if ( _day === 6 ) { + if ( i === _maxDayOfMonth ) { + _r = _r + ''; + } else { + _r = _r + ''; + } + } + + } + + return _r; + + }, + + monthTpl: '
        ' + + '
        ' + + '
        ' + + '返回今天' + + '返回选中日期' + + '
        ' + + '

        ' + + '{0}' + + '

        ' + + '
        ' + + '
        ' + + '
        一季度 + 一季度 二季度 + 二季度
        三季度 + 三季度 四季度 + 四季度
        ' + i + '
        ' + + '' + i + + '
        ' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
        一月二月三月四月五月六月
        七月八月九月十月十一月十二月
        ' + + '' + +'', + + yearTpl: '
        ' + + '
        ' + + '
        ' + + '返回今天' + + '返回选中日期' + + '
        ' + + '

        {2}

        ' + + '
        ' + + '
        ' + + '' + + '' + + '{1}' + + '' + + '
        ' + + '
        ' + + '
        ', + + dateTpl: '
        ' + + '
        ' + + '

        ' + + '{1}' + + '{2}' + + '

        ' + + '
        ' + + '
        ' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '{3}' + + '' + + '
        ' + + '
        ' + + '
        ', + + baseTpl: '', + + buildYearTpl: function (_date, _startYear, _endYear) { + var _p = this, + _r = _p.yearTpl; + + _p.layoutBox().find('.CDC_date_box').html( + JC.f.printf( + _r, + JC.f.formatISODate(_date), + _p.allYearsTpl(_startYear, _endYear), + _startYear + ' ~ ' + _endYear, + JC.f.formatISODate(_p.curSelectedDate()) + ) + ) + .find('.CDC_year_body>tbody>tr>td>a').each( function () { + var _sp = $(this), + _year = _sp.data('year'), + _d = new Date(_year, 0, 1); + + ( _year === new Date().getFullYear() ) && ( _sp.addClass('today') ); + + ( _year === _p.curYear() ) && ( _sp.parent('td').addClass('selected_date') ); + + ( ( _p.maxYear() && ( _year > _p.maxYear() ) ) + || ( _p.minYear() && ( _year < _p.minYear() ) ) + ) && ( _sp.addClass('disabled') ); + + _sp.attr('data-date', JC.f.formatISODate( _d )); + + } ); + _p.layoutBox() + .find('.CDC_prev_btn') + .attr('data-type', 'year') + .attr('data-date', JC.f.formatISODate (new Date(_startYear - 1, 0, 1) )) + .end() + .find('.CDC_next_btn') + .attr('data-type', 'year') + .attr('data-date', JC.f.formatISODate (new Date(_endYear + 1, 0, 1) )); + + _p.layoutBox().css('width', 466); + _p.disablePageBtn(); + _p.position(); + }, + + buildMonthTpl: function ( _date ) { + var _p = this, + _r = _p.monthTpl, + _prevT = new Date(_date.getFullYear() - 1, 11, 1); + + _p.layoutBox().find('.CDC_date_box').html( + JC.f.printf( + _r, + _date.getFullYear() + '年', + JC.f.formatISODate(_date), + JC.f.formatISODate(new Date()), + JC.f.formatISODate(_p.curSelectedDate()) + ) + ) + .find('.CDC_month_body>tbody>tr>td>a').each( function ( _ix ) { + var _sp = $(this), + _month = _sp.data('month'), + _d = new Date(_date.getFullYear(), _month , 1), + _tempD = new Date(_d.getFullYear(), _month, JC.f.maxDayOfMonth(_d)); + + ( JC.f.isSameMonth(_d, new Date()) ) && ( _sp.addClass('today') ); + + ( JC.f.isSameMonth(_p.curSelectedDate(), _d )) && ( _sp.parent('td').addClass('selected_date') ); + + ( ( _p.minValue() && ( _p.minValue().getTime() > _tempD.getTime() ) ) + || ( _p.maxValue() && ( _p.maxValue().getTime() < _d.getTime() ) ) + ) && ( _sp.addClass('disabled') ); + + _sp.attr('data-date', JC.f.formatISODate( _d )); + + } ) + .end() + .end() + .find('.CDC_prev_btn') + .attr('data-date', JC.f.formatISODate(new Date(_date.getFullYear() - 1, 11, JC.f.maxDayOfMonth(_prevT)))) + .attr('data-type', 'month') + .end() + .find('.CDC_next_btn') + .attr('data-date', JC.f.formatISODate(new Date(_date.getFullYear() + 1, 0, 1))) + .attr('data-type', 'month') + + _p.disablePageBtn(); + _p.position(); + _p.layoutBox().css('width', 466); + + }, + + buildDateTpl: function (_date) { + + var _p = this, + _tpl = '', + _curDate = _date || _p.curSelectedDate(), + _curYear = _curDate.getFullYear(), + _curMonth = _curDate.getMonth(), + _monthNum = _p.monthNum(), + _prevDate = new Date(_curYear, _curMonth, 1), + _nextDate, + _tempDate; + + while ( _monthNum-- ) { + + _tpl += JC.f.printf( + _p.dateTpl, + JC.f.formatISODate(_curDate), + _curYear + '年', + (_curMonth + 1) + '月', + _p.datesOfMonthTpl(_curDate) + ); + + _curDate = new Date(_curYear, _curMonth + 1, 1); + _curYear = _curDate.getFullYear(); + _curMonth = _curDate.getMonth(); + + } + + _tempDate = new Date(_curYear, _curMonth - 1, 1); + _nextDate = new Date(_curYear, _curMonth - 1, JC.f.maxDayOfMonth(_tempDate)); + + _p.layoutBox().find('.CDC_date_box') + .html( _tpl ) + .find('.CDC_date_body>tbody>tr>td>a[data-date]').each( function ( _ix ) { + var _sp = $(this), + _d = JC.f.dateDetect(_sp.data('date')); + + ( JC.f.isSameDay(_d, _p.curSelectedDate()) ) + && ( _sp.parent('td').addClass('selected_date') ); + + + (_p.minValue() && _d.getTime() < _p.minValue().getTime() ) + && ( _sp.addClass('disabled') ); + + + ( _p.maxValue() && _d.getTime() > _p.maxValue().getTime() ) + && ( _sp.addClass('disabled') ); + + ( !_p.currentCanSelect() && JC.f.isSameDay( _d, new Date() ) ) + && ( _sp.addClass('disabled') ); + + } ) + .end() + .end() + .find('.CDC_next_btn') + .attr('data-date', JC.f.formatISODate(_nextDate)) + .attr('data-type', 'date') + .end() + .find('.CDC_prev_btn') + .attr('data-date', JC.f.formatISODate(_prevDate)) + .attr('data-type', 'date'); + + _p.disablePageBtn(); + _p.fixTable(); + + }, + + disablePageBtn: function () { + var _p = this, + _prevBtn = _p.layoutBox().find('.CDC_prev_btn'), + _nextBtn = _p.layoutBox().find('.CDC_next_btn'), + _prevDate = JC.f.dateDetect(_prevBtn.attr('data-date')), + _nextDate = JC.f.dateDetect(_nextBtn.attr('data-date')); + + if ( _p.minValue() && ( _p.minValue().getTime() > _prevDate.getTime() ) ) { + _prevBtn.addClass('CDC_prev_btn_disabled') + .prop('disabled', true); + } else { + _prevBtn.removeClass('CDC_prev_btn_disabled') + .prop('disabled', false); + } + + if ( _p.maxValue() && ( _p.maxValue().getTime() < _nextDate.getTime() ) ) { + _nextBtn.addClass('CDC_next_btn_disabled') + .prop('disabled', true); + } else { + _nextBtn.removeClass('CDC_next_btn_disabled') + .prop('disabled', false); + } + + }, + + layout: function () { + var _p = this; + + !this._layout && ( this._layout = _p.layoutBox().find('div.CDCalendar_bounding_box') ) ; + + return this._layout; + }, + + layoutBox: function () { + var _p = this, + _r = $('#' + DCalendar.Model._boxId ); + + if ( !(_r && _r.length) ) { + _r = $(JC.f.printf( '
        ' + _p.baseTpl + '
        ', DCalendar.Model._boxId )) + .appendTo( document.body ); + } + + return _r; + }, + + position: function () { + var _p = this, + _x = _p.selector().offset().left, + _y = _p.selector().offset().top + _p.selector().prop('offsetHeight'), + _tempX, + _tempY, + _win = $(window); + + //上下溢出 + if ( ( _win.outerHeight() + _win.scrollTop() ) < ( _y + _p.layout().height() ) ) { + _tempY = _p.selector().offset().top - _p.layout().height(); + ( _tempY >= 0 ) && ( _y = _tempY ); + } else { + _y = _p.selector().offset().top + _p.selector().prop('offsetHeight'); + } + + //左右溢出 + + if ( ( _win.outerWidth() + _win.scrollLeft() ) < ( _x + _p.layoutBox().outerWidth(true) ) ) { + _tempX = _p.selector().offset().left + _p.selector().outerWidth() - _p.layoutBox().outerWidth(true); + ( _tempX >= 0 ) && ( _x = _tempX ); + } else { + _x = _p.selector().offset().left; + } + + _p.layoutBox().css({ + left: _x, + top: _y + }); + + }, + + setSelected: function (_srcSelector) { + var _p = this, + _el = $(_srcSelector), + _td = JC.f.getJqParent(_el, 'td'), + _d = _el.data('date'); + + _p.layoutBox().find('.CDC_date_body>tbody>tr>td').removeClass('selected_date'); + + _td.addClass('selected_date').data('date'); + + _p.selector().val(_d); + + }, + + clear: function () { + var _p = this; + + _p.layoutBox().find('.CDC_date_body>tbody>tr>td').removeClass('selected_date'); + _p.selector().val(''); + }, + + fixTable: function () { + var _p = this, + _tables = _p.layoutBox().find('.CDC_date_body'), + _t = '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '', + _max = 0; + + _tables.each( function ( _ix ) { + var _sp = $(this), + _len = _sp.find('tbody>tr').length; + + ( _len > _max ) && ( _max = _len ); + + } ); + + _tables.each( function () { + var _sp = $(this), + _len = _sp.find('tbody>tr').length; + + ( _len < _max ) && ( _sp.find('tbody').append(_t) ); + + }); + + if ( _p.showtype() === 'float' ) { + if ( _p.monthNum() === 2 || _p.monthNum() === 4 ) { + _p.layoutBox().css('width', 466); + } else { + _p.layoutBox().css('width', 678); + } + } else { + _p.layoutBox().css('width', 267); + } + + }, + + /** + * DCalendar显示时的回调 + */ + calendarshow: function () { + var _p = this, + _selector = _p.selector(), + _key = "calendarshow"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * DCalendar隐藏时的回调 + */ + calendarhide: function () { + var _p = this, + _selector = _p.selector(), + _key = "calendarhide"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 清除选中的日期后的回调 + */ + calendarclear: function () { + var _p = this, + _selector = _p.selector(), + _key = "calendarclear"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 选择日期赋值后的回调 + */ + updatedate: function () { + var _p = this, + _selector = _p.selector(), + _key = "updatedate"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 更改月份之前的回调,月历面板显示后 + */ + beforeupdatemonth: function () { + var _p = this, + _selector = _p.selector(), + _key = "beforeupdatemonth"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 更改月份后的回调 + */ + updatemonth: function () { + var _p = this, + _selector = _p.selector(), + _key = "updatemonth"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 更改年份之前的回调,年份面板显示后 + */ + beforeupdateyear: function () { + var _p = this, + _selector = _p.selector(), + _key = "beforeupdateyear"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 更改年份后的回调 + */ + updateyear: function () { + var _p = this, + _selector = _p.selector(), + _key = "updateyear"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 点击下一月的回调 + */ + updatenextmonth: function () { + var _p = this, + _selector = _p.selector(), + _key = "updatenextmonth"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 点击上一月的回调 + */ + updateprevmonth: function () { + var _p = this, + _selector = _p.selector(), + _key = "updateprevmonth"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 点击下一年的回调 + */ + updatenextyear: function () { + var _p = this, + _selector = _p.selector(), + _key = "updatenextyear"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 点击上一年的回调 + */ + updateprevyear: function () { + var _p = this, + _selector = _p.selector(), + _key = "updateprevyear"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 点击下一页年份的回调 + */ + updatenextpageyear: function () { + var _p = this, + _selector = _p.selector(), + _key = "updatenextpageyear"; + + return _p.callbackProp(_selector, _key); + }, + + /** + * 点击上一页年份的回调 + */ + updateprevpageyear: function () { + var _p = this, + _selector = _p.selector(), + _key = "updateprevpageyear"; + + return _p.callbackProp(_selector, _key); + } + + }); + + JC.f.extendObject(DCalendar.View.prototype, { + init: function () { + var _p = this; + }, + + update: function () { + var _p = this; + + _p._model.position(); + + _p._model.layout().data('CDCalendarIns', _p); + + }, + + yearView: function (_srcSelector) { + var _p = this, + _el = $( _srcSelector ), + _date = new Date(), + _startYear = _date.getFullYear() - 14, + _endYear = _date.getFullYear() + 13; + + _p._model.buildYearTpl(_date, _startYear, _endYear); + + }, + + monthView: function (_srcSelector) { + var _p = this, + _el = $(_srcSelector), + _date = JC.f.dateDetect(_el.data('date')); + + _p._model.buildMonthTpl(_date); + + }, + + dateView: function (_srcSelector) { + var _p = this, + _el = $( _srcSelector ), + _curDate = JC.f.dateDetect(_el.data('date')); + + _p._model.buildDateTpl(_curDate); + + }, + + change: function (_srcSelector) { + var _p = this, + _el = $(_srcSelector), + _action = _el.data('action'), + _type = _el.attr('data-type'), + _curDate , + _nextMonthDate, + _nextYear, + _startYear, + _endYear; + + switch ( _type ) { + case 'year': + { + _curDate = JC.f.dateDetect(_el.attr('data-date')); + + if ( _action == 'prev' ) { + _endYear = _curDate.getFullYear(); + _startYear = _endYear - 27; + + _p.trigger(DCalendar.Model.UPDATEPREVPAGEYEAR); + + } else { + _startYear = _curDate.getFullYear(); + _endYear = _startYear + 27; + + _p.trigger(DCalendar.Model.UPDATENEXTPAGEYEAR); + + } + + _p._model.buildYearTpl(new Date(), _startYear, _endYear); + + break; + } + + case 'month': + { + _curDate = JC.f.dateDetect(_el.attr('data-date')); + + if ( _action === 'prev' ) { + _p.trigger(DCalendar.Model.UPDATEPREVYEAR); + } else { + _p.trigger(DCalendar.Model.UPDATENEXTYEAR); + } + + _p._model.buildMonthTpl(_curDate); + + break; + } + + case 'date': + default: + if ( _action === 'prev' ) { + _nextMonthDate = JC.f.dateDetect(_el.attr('data-date')); + _curDate = new Date(_nextMonthDate.getFullYear(), _nextMonthDate.getMonth() - _p._model.monthNum() + 1, 1); + _p.trigger(DCalendar.Model.UPDATEPREVMONTH); + + } else { + _curDate = JC.f.dateDetect(_el.attr('data-date')); + _p.trigger(DCalendar.Model.UPDATENEXTMONTH); + + } + _p._model.buildDateTpl(_curDate); + _p._model.position(); + + } + + }, + + show: function () { + var _p = this; + + //var _s = new Date().getTime(), + // _e ; + + _p._model.buildDateTpl(); + //_e = new Date().getTime(); + //console.log( "_s", "_e", _e - _s ); + _p.update(); + _p._model.layout().show(); + + _p._model.layout().data('CDCalendarShow', _p); + + }, + + hide: function () { + var _p = this; + + _p._model.layout().hide(); + + } + + }); + + var _doc = $(document) + , _selector = 'input[datatype=ddate], button[datatype=ddate], input[datatype=drange]' + ; + + _doc.delegate(_selector, 'focus', function (_evt) { + + $(this).addClass('cdc_ignore', true); + JC.f.safeTimeout( function(){ + DCalendar.pickDate( _evt.target || _evt.srcElement); + }, null, 'DCalendarClick', 50 ); + + }); + + _doc.delegate(_selector, 'click', function (_evt) { + + $(this).addClass('cdc_ignore', true); + JC.f.safeTimeout( function(){ + DCalendar.pickDate(_evt.target || _evt.srcElement); + }, null, 'DCalendarClick', 50 ); + + }); + + _doc.on('click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc), + _srcSelector = _evt.target || _evt.srcElement; + + if ( _ins && _ins._model.isDCalendar(_srcSelector) ) return; + + _ins && _ins.trigger(DCalendar.Model.HIDDEN); + + }); + + _doc.delegate('#CompDCalendar .CDC_close_btn', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.HIDDEN); + + }); + + _doc.delegate('#CompDCalendar .CDC_next_btn, #CompDCalendar .CDC_prev_btn', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.CHANGE, [$(this)]); + + }); + + _doc.delegate('#CompDCalendar .CDC_Month', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.MONTHVIEW, [$(this)]); + + }); + + _doc.delegate('#CompDCalendar .CDC_Year', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.YEARVIEW, [$(this)]); + + }); + + _doc.delegate('#CompDCalendar .CDC_Date', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.DATEVIEW, [$(this)]); + + }); + + _doc.delegate('#CompDCalendar', 'click', function (_evt) { + _evt.stopPropagation(); + }); + + _doc.delegate('#CompDCalendar .CDC_date_body>tbody>tr>td>a:not(".disabled")', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.SETDATE, [$(this)]); + _ins && _ins.trigger(DCalendar.Model.HIDDEN ); + + }); + + _doc.delegate('#CompDCalendar .CDC_month_body>tbody>tr>td>a:not(".disabled")', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.DATEVIEW, [$(this)]); + + } ); + + _doc.delegate('#CompDCalendar .CDC_year_body>tbody>tr>td>a:not(".disabled")', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.MONTHVIEW, [$(this)]); + + }); + + _doc.delegate('#CompDCalendar .CDC_clear', 'click', function (_evt) { + + var _ins = DCalendar.getInstance(DCalendar.lastSrc); + _ins && _ins.trigger(DCalendar.Model.CLEAR, [$(this)]); + + }); + + $(window).on('resize scroll', function () { + + JC.f.safeTimeout( function(){ + DCalendar.update(); + }, null, 'DCalendarResize', 20 ); + + }); + + _doc.ready(function () { + DCalendar.init(true); + }); + + return JC.DCalendar; + +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/DCalendar/DCalendar.js b/comps/DCalendar/DCalendar.js new file mode 100755 index 000000000..d30b754f2 --- /dev/null +++ b/comps/DCalendar/DCalendar.js @@ -0,0 +1,24 @@ +;(function(define, _win) { 'use strict'; + define( [ 'JC.DCalendar.date' + ], function(){ + /** + * жΪ JC 0.1 + * ʹ requirejs ĿƳжϴ + */ + JC.use + && JC.PATH + && JC.use([ + JC.PATH + 'comps/DCalendar/DCalendar.date.js' + ].join()) + ; + + return JC.DCalendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/DCalendar/_demo/demo.Valid.html b/comps/DCalendar/_demo/demo.Valid.html new file mode 100755 index 000000000..21572e1f5 --- /dev/null +++ b/comps/DCalendar/_demo/demo.Valid.html @@ -0,0 +1,82 @@ + + + + + DCalendar Demo + + + + + + +
        +
        + +
        + +
        + +
        + +
        + +
        + +
        + + + +
        +
        + + + + + diff --git a/comps/DCalendar/_demo/demo.html b/comps/DCalendar/_demo/demo.html new file mode 100755 index 000000000..656728a74 --- /dev/null +++ b/comps/DCalendar/_demo/demo.html @@ -0,0 +1,230 @@ + + + + + DCalendar Demo + + + + + + + + + +
        + +
        + +
        +
        + + 今天不可选 +
        +
        + not date +
        +
        + + minvalue="2013-12-10" maxvalue="2014-01-30" +
        +
        + + minvalue="2013-01-10" maxvalue="2014-12-30" +
        +
        + + minvalue="2013-12-10" +
        +
        + + maxvalue="2014-01-30" +
        +
        + + manual 各种回调 +
        +
        + + manual JC.DCalendar.pickDate +
        +
        + + manual JC.DCalendar.pickDate +
        +
        + +
        +
        + + showtype="block" +
        +
        + 三个月 +
        +
        + 四个月 +
        +
        + 五个月 +
        +
        + 六个月 +
        +
        + 七个月 +
        +
        + 八个月 +
        +
        + 九个月 +
        +
        + 十个月 +
        +
        + 十一个月 +
        +
        + 十二个月 +
        + +
        + + + + + diff --git a/comps/DCalendar/_demo/demo.viewport.runout.html b/comps/DCalendar/_demo/demo.viewport.runout.html new file mode 100755 index 000000000..2fb496d44 --- /dev/null +++ b/comps/DCalendar/_demo/demo.viewport.runout.html @@ -0,0 +1,197 @@ + + + + + DCalendar Demo + + + + + +
        + +
        + +
        + +
        +
        + + 今天不可选 +
        +
        + not date +
        +
        + + minvalue="2013-12-10" maxvalue="2014-01-30" +
        +
        + + minvalue="2013-01-10" maxvalue="2014-12-30" +
        +
        + + minvalue="2013-12-10" +
        +
        + + maxvalue="2014-01-30" +
        +
        + + manual 各种回调 +
        +
        + + manual JC.DCalendar.pickDate +
        +
        + + manual JC.DCalendar.pickDate +
        +
        + + +
        +
        + +
         
        +
        + + + + + diff --git a/comps/DCalendar/_demo/index.php b/comps/DCalendar/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/DCalendar/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/DCalendar/index.php b/comps/DCalendar/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/DCalendar/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/DCalendar/res/default/style.css b/comps/DCalendar/res/default/style.css new file mode 100755 index 000000000..5549c337e --- /dev/null +++ b/comps/DCalendar/res/default/style.css @@ -0,0 +1,189 @@ +input.CDCalendar_icon { + background:#fff url(http://p15.qhimg.com/t01e94709749feffaa0.png) 98% -84px no-repeat; + padding-right: 30px; +} +.CDCalendar_bounding_box { + position: relative; + color: #404040; + font: 12px/1.5 Arial; + z-index: 10000; +} +.CDCalendar_bounding_box .CDC_container { + background-color: #FFF; + zoom: 1; + box-shadow: 2px 2px 3px rgba(0,0,0,0.3); + filter: progid:DXImageTransform.Microsoft.Shadow(color=#808080,direction=135,strength=2)\9; +} + +.CDCalendar_bounding_box .CDC_content_box { + position: relative; + zoom: 1; + padding: 5px 30px 15px 30px; + border: 1px solid #bec2c4; + letter-spacing: -0.31em; + *letter-spacing: normal; + word-spacing: -0.43em; +} +.CDCalendar_bounding_box .CDC_arrow a { + position: absolute; + top: 50%; + width: 20px; + height: 38px; + cursor: pointer; + margin-top: -19px; + text-indent: -99999px; + background: #FFF url(http://p16.qhimg.com/t01868ddffc722b2d90.png) 0 0 no-repeat; +} +.CDCalendar_bounding_box .CDC_arrow a.CDC_close_btn { + top: 10px; + right: 10px; + width: 17px; + height: 17px; + margin: 0; + background-position: -40px 0; +} +.CDCalendar_bounding_box .CDC_arrow a.CDC_prev_btn { + left: 10px; + background-position: 0 0; +} +.CDCalendar_bounding_box .CDC_arrow a.CDC_next_btn { + right: 10px; + background-position: -20px 0; +} +.CDCalendar_bounding_box .CDC_arrow a.CDC_prev_btn_disabled { + left: 10px; + cursor: default; + background-position: 0 -38px; +} +.CDCalendar_bounding_box .CDC_arrow a.CDC_next_btn_disabled { + right: 10px; + cursor: default; + background-position: -20px -38px; +} +.CDCalendar_bounding_box .CDC_arrow .CDC_clear{ + left: 2.5%; + top: 10px; + z-index: 5; + margin-top: 0; + background: url(http://p17.qhimg.com/t01eaf1c7e4bef9bbff.gif) no-repeat; + width: 16px; + height: 16px; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner { + position: relative; + background-color: #FFF; + display: inline-block; + padding: 0 10px; + zoom: 1; + *display: inline; + letter-spacing: normal; + word-spacing: normal; + vertical-align: top; + _vertical-align: baseline; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner h4 { + margin: 0; + padding: 0; + font-size: 12px; + line-height: 25px; + text-align: center; + border-bottom: 1px solid #E4E4E4; + font-weight: 700; + +} + +.CDCalendar_bounding_box .CDC_content_box .CDC_inner h4 a { + text-decoration: none; + color: #333; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_header_tools a +{ + margin-right: 15px; + display: inline-block; + *display: inline; + *zoom:1; + margin-top: 3px; + color: #5792dc; + text-decoration: none; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner h4 a:hover, +.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_header_tools a:hover +{ + color: #5792dc; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner table { + border-spacing: 0; + border-collapse: collapse; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner table.CDC_date_body{ + width: 182px; + height: 165px; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner table th { + height: 22px; + font-weight: 400; + border-bottom: 1px solid #E4E4E4; +} + +.CDCalendar_bounding_box .CDC_content_box .CDC_inner table td { + padding: 0; + width: 25px; + /*height: 22px;*/ + vertical-align: middle; + font-weight: 700; + text-align: center; + border: 1px solid #E5E5E5; +} +.CDCalendar_bounding_box td a { + width: 25px; + /*height: 22px;*/ + display: block; + color: #404040; + /*line-height: 22px;*/ + text-decoration: none; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_month_body td, +.CDCalendar_bounding_box .CDC_content_box .CDC_month_body a{ + width: 62px; + height: 62px; + line-height: 62px; +} +.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_year_body td, +.CDCalendar_bounding_box .CDC_content_box .CDC_year_body a{ + /*width: 45px;*/ + width: 53px; + height: 40px; + line-height: 40px; +} + +.CDCalendar_bounding_box td a.weekend{ + color: #6fae6c; +} +.CDCalendar_bounding_box td a.weekend:hover, +.CDCalendar_bounding_box td a:hover, +.CDCalendar_bounding_box td.selected_date a, +.CDCalendar_bounding_box td.selected_range a:hover { + color: #FFF; + background-color: #5792DC; +} +.CDCalendar_bounding_box td.end_date a, + +.CDCalendar_bounding_box td a.disabled { + color: #DCDCDC!important; + background-color: transparent; +} +.CDCalendar_bounding_box td a.disabled:hover { + color: #DCDCDC; + cursor: default; + background-color: transparent !important; +} + +.CDCalendar_bounding_box td .today { + color: #f00; +} + +.CDCalendar_bounding_box td.selected_date .today, +.CDCalendar_bounding_box td .today:hover { + background-position: -31px -270px; +} + diff --git a/comps/DCalendar/res/default/style.html b/comps/DCalendar/res/default/style.html new file mode 100755 index 000000000..cba94eb35 --- /dev/null +++ b/comps/DCalendar/res/default/style.html @@ -0,0 +1,884 @@ + + + + + Document + + + + + +

        showtype = float

        +
        +
        +
        +
        +
        + close + prev + next + clear +
        +
        +
        +
        +

        2014年3月

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + + + + + + + + + 1 +
        + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 +
        + 9 + + 10 + + 11 + + 12 + + 13 + + 14 + + 15 +
        + 16 + + 17 + + 18 + + 19 + + 20 + + 21 + + 22 +
        + 23 + + 24 + + 25 + + 26 + + 27 + + 28 + + 29 +
        + 30 + + 31 + + + + + + + + + + +
        +
        +
        +
        +

        2014年4月

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + 1 + + 2 + + 3 + + 4 + + 5 +
        + 6 + + 7 + + 8 + + 9 + + 10 + + 11 + + 12 +
        + 13 + + 14 + + 15 + + 16 + + 17 + + 18 + + 19 +
        + 20 + + 21 + + 22 + + 23 + + 24 + + 25 + + 26 +
        + 27 + + 28 + + 29 + + 30 + + + + + + +
        + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +

        showtype = block

        +
        +
        +
        +
        +
        + close + prev + next + clear +
        +
        +
        +
        +

        2014年3月

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + + + + + + + + + 1 +
        + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 +
        + 9 + + 10 + + 11 + + 12 + + 13 + + 14 + + 15 +
        + 16 + + 17 + + 18 + + 19 + + 20 + + 21 + + 22 +
        + 23 + + 24 + + 25 + + 26 + + 27 + + 28 + + 29 +
        + 30 + + 31 + + + + + + + + + + +
        +
        +
        +
        +

        2014年4月

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + 1 + + 2 + + 3 + + 4 + + 5 +
        + 6 + + 7 + + 8 + + 9 + + 10 + + 11 + + 12 +
        + 13 + + 14 + + 15 + + 16 + + 17 + + 18 + + 19 +
        + 20 + + 21 + + 22 + + 23 + + 24 + + 25 + + 26 +
        + 27 + + 28 + + 29 + + 30 + + + + + + +
        + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        + +

        +
        +
        +
        +
        + close + prev + next + clear +
        +
        + +
        +
        +

        2013年

        +
        + + +
        +
        +
        +
        +
        +

        +
        +
        +
        +
        + close + prev + next + clear +
        +
        + +
        +
        +

        2013年12月24日

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        2012201220122012201320132013
        2013201320132013201320132013
        2012201220122013201320132013
        2013201320132013201320132013
        +
        + +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/comps/Drag/Drag.js b/comps/Drag/Drag.js new file mode 100755 index 000000000..5d6744d62 --- /dev/null +++ b/comps/Drag/Drag.js @@ -0,0 +1,1103 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 响应式 Drag and Drop 功能 + *
        对 [ div | button ].js_compDrag 生效 + * + *

        require: + * JC.common + * , JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        通用 HTML attribute

        + *
        + *
        dragTarget = selector, default = self
        + *
        要拖动的 selector, 可以通过该属性指定拖动的父节点
        + * + *
        dragIn = selector, default = window
        + *
        可拖动的范围
        + * + *
        disableDrag = bool, default = false
        + *
        是否禁止拖动, 会执行实例初始化
        + * + *
        ignoreDrog = bool, default = false
        + *
        是否忽略拖动, 不会执行实例初始化
        + * + *
        dragInitedCb = function, window 变量域
        + *
        实例初始化后调用的回调 +
        function dragInitedCb( _selector, _dragTarget ){
        +    var _ins = this;
        +    JC.log( 'dragInitedCb', new Date().getTime() );
        +}
        + *
        + * + *
        dragBeforeCb = function, window 变量域
        + *
        拖动之前调用的回调, 如果返回 false, 将停止拖动操作 +
        function dragBeforeCb( _dragTarget, _selector ){
        +    var _ins = this;
        +    JC.log( 'dragBeforeCb', new Date().getTime() );
        +    //return false;
        +}
        + *
        + * + *
        dragAfterCb = function, window 变量域
        + *
        拖动完成之后的回调 +
        function dragAfterCb( _dragTarget, _selector ){
        +    var _ins = this;
        +    JC.log( 'dragAfterCb', new Date().getTime() );
        +}
        + *
        + * + *
        dragBeginCb = function, window 变量域
        + *
        拖动开始时的回调 +
        function dragBeginCb( _selector, _dragTarget, _movingSelector ){
        +    var _ins = this;
        +    JC.log( 'dragBeginCb', new Date().getTime() );
        +}
        + *
        + * + *
        dragMovingCb = function, window 变量域
        + *
        拖动移动时的回 +
        function dragMovingCb( _selector, _dragTarget, _movingSelector, _x, _y, _evt ){
        +    var _ins = this;
        +    JC.log( 'dragMovingCb', new Date().getTime() );
        +}
        + *
        + * + *
        dragDoneCb = function, window 变量域
        + *
        拖动完成时的回调 +
        function dragDoneCb( _selector, _dragTarget ){
        +    var _ins = this;
        +    JC.log( 'dragDoneCb', new Date().getTime() );
        +}
        + *
        + * + *
        + * + *

        drop HTML attribute

        + *
        + *
        dropFor = selector
        + *
        指定可拖放的 selector
        + * + *
        dropSwap = bool, default = false
        + *
        + * 是否交换拖曳的位置 + *
        为真, 交换 selector 的位置 + *
        不为真, 将 append 到目标 selector + *
        + * + *
        disableDrop = bool, default = false
        + *
        是否禁止 拖放功能, 这个属性应当写在 dropFor 的 selector 里
        + * + *
        dropDoneCb = function, window 变量域
        + *
        拖放完成时的回调, 如果返回 false, 将停止拖放操 +
        function dropDoneCb( _dragTarget, _dropTarget ){
        +    var _initSelector = this;
        +    JC.log( 'dropDoneCb', new Date().getTime() );
        +    //return false;
        +}
        + *
        + * + *
        dropDoneAfterCb = function, window 变量域
        + *
        拖放完成后的回调 +
        function dropDoneAfterCb( _dragTarget, _dropTarget ){
        +    var _initSelector = this;
        +    JC.log( 'dropDoneAfterCb', new Date().getTime() );
        +}
        + *
        + *
        + * + * @namespace JC + * @class Drag + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-26 + * @author qiushaowei | 75 Team + * @example +

        拖动示例

        +
        + normal drag + , dragBeginCb="dragBeginCb" +
        + +

        拖放示例

        + + + + + +
        +
        + dropDoneCb="dropDoneCbAllow" +
        +
        +
        + dropDoneCb="dropDoneCbBan" +
        +
        + */ + JC.Drag = Drag; + JC.f.addAutoInit && JC.f.addAutoInit( Drag ); + var _jdoc = $( document ), _jwin = $( window ); + + function Drag( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, Drag ) ) + return JC.BaseMVC.getInstance( _selector, Drag ); + + JC.BaseMVC.getInstance( _selector, Drag, this ); + + this._model = new Drag.Model( _selector ); + this._view = new Drag.View( this._model ); + + this._init(); + + //JC.log( Drag.Model._instanceName, 'inited', new Date().getTime() ); + } + + JC.BaseMVC.build( Drag ); + + JC.f.extendObject( Drag.prototype, { + _beforeInit: + function(){ + //JC.log( 'Drag _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( Drag.Model.DRAG_INITED, function( _evt ){ + + _p._model.defaultCSSPosition( _p._model.dragTarget().css( 'position' ) ); + _p._model.defaultCSSZIndex( _p._model.dragTarget().css( 'z-index' ) ); + _p._model.defaultCSSCursor( _p._model.dragTarget().css( 'cursor' ) ); + + _p._model.selector().css( { 'cursor': 'move' } ); + + _p._model.dragInitedCb() + && _p._model.dragInitedCb().call( _p, _p.selector(), _p.dragTarget() ); + + _p.notification( 'DRAG_INITED', [ + _p, _p.selector(), _p.dragTarget() + ]); + /* + JC.log( 'Drag _inited', new Date().getTime() + , _p._model.defaultCSSPosition() + , _p._model.defaultCSSZIndex() + ); + */ + }); + + _p.on( 'INIT_INDEX', function(){ + if( !_p._model.dropPush() ) return; + var _items = _p._model.dropFor( true ); + if( !( _items && _items.length ) ) return; + JC.log( _items.length ); + _items.each( function( _ix, _item ){ + $( _item ).data( 'dragIndex', _ix ); + }); + }); + + _p.selector().on( 'mousedown', function( _evt, _srcEvt ){ + _evt = _srcEvt || _evt; + _p._model._selectedDropBox = null; + + if( _p._model.boolProp( Drag.Model.DISABLE_DRAG ) ) return; + if( _p._model.boolProp( Drag.Model.IGNORE_DRAG ) ) return; + + if( _p._model.dropPush() ){ + } + + Drag.cleanDragData(); + + if( _p._model.dragBeforeCb() + && _p._model.dragBeforeCb().call( _p, _p._model.dragTarget(), _p.selector() ) === false + ){ + return; + } + + if( _p.notificationHandler( 'DRAG_BEFORE', [ + _p + , _p.selector() + , _p._model.dragTarget() + , _p._model.dragMovingTarget() + ]) === false ){ + return; + } + + _p.notification( 'DRAG_DOWN' ); + + _p.trigger( Drag.Model.DRAG_BEFORE ); + + _p._model.relativeParent( true ); + + _p._model.isDropFor() + && ( + _p._model.dragMovingTarget( true ) + , _p._model.dropFor( true ) + ); + + Drag.dragInfo( _p, _evt ); + _p.trigger( Drag.Model.DRAG_BEGIN, [ _evt, Drag.dragInfo() ] ); + + _jdoc.off( 'mouseup', Drag.defaultMouseUp ); + _jdoc.off( 'mousemove', Drag.defaultMouseMove ); + _jwin.off( 'scroll', Drag.defaultScroll ); + + _jdoc.on( 'mouseup', Drag.defaultMouseUp ); + _jdoc.on( 'mousemove', Drag.defaultMouseMove ); + _jwin.on( 'scroll', Drag.defaultScroll ); + + return false; + }); + + //低版本 IE 拖曳时不选中文字 + _p.selector()[0].onselectstart = function(){ return false; }; + + _p.on( Drag.Model.DRAG_BEFORE, function( _evt ){ + //JC.log( 'drag before', new Date().getTime() ); + }); + + _p.on( Drag.Model.DRAG_BEGIN, function( _evt, _dragInfo ){ + //JC.log( 'drag begin', new Date().getTime() ); + + _p._model.dragTarget().css( 'z-index', window.ZINDEX_COUNT++ ); + + Drag.draggingItem( _p._model.dragTarget() ); + + _p._model.dragBeginCb() + && _p._model.dragBeginCb().call( + _p + , _p.selector() + , _p._model.dragTarget() + , _p._model.dragMovingTarget() + ); + + _p.notification( 'DRAG_BEGIN', [ + _p + , _p.selector() + , _p._model.dragTarget() + , _p._model.dragMovingTarget() + ]); + + }); + + _p.on( Drag.Model.DRAG_DONE, function( _evt, _dragInfo ){ + //JC.log( 'drag done', new Date().getTime() ); + + _p._view.dropDone( _dragInfo ); + _p._view.clean( _dragInfo ); + _p._model.clean( _dragInfo ); + + Drag.draggingItem( null ); + + _p._model.dragDoneCb() + && _p._model.dragDoneCb().call( + _p + , _p.selector() + , _p._model.dragTarget() + ); + + _p.notification( 'DRAG_DONE', [ + _p + , _p.selector() + , _p._model.dragTarget() + ]); + + _p._model.dragTarget().removeClass( Drag.Model.CLASS_CURRENT_DRAG_ITEM ); + + _p.trigger( Drag.Model.DRAG_AFTER ); + + Drag.cleanDragData(); + }); + + _p.on( Drag.Model.DRAGGING_MOVING, function( _evt, _x, _y, _srcEvt, _offset ){ + //JC.log( 'Drag.Model.DRAGGING_MOVING', new Date().getTime() );DRAG_MOVING + _p._model.dragMovingCb() + && _p._model.dragMovingCb().call( + _p + , _p.selector() + , _p.dragTarget() + , _p.dragMovingTarget() + , _x + , _y + , _srcEvt + ); + + _p.notification( 'DRAG_MOVING', [ + _p + , _p.selector() + , _p.dragTarget() + , _p.dragMovingTarget() + , _x + , _y + , _srcEvt + ]); + }); + + _p.on( Drag.Model.DRAG_AFTER, function( _evt ){ + //JC.log( 'drag after', new Date().getTime() ); + + _p._model.dragAfterCb() + && _p._model.dragAfterCb().call( + _p + , _p._model.dragTarget() + , _p.selector() + ); + + _p.notification( 'DRAG_AFTER', [ + _p + , _p._model.dragTarget() + , _p.selector() + ]); + }); + + _p.on( Drag.Model.TRIGGER_DRAG, function( _evt, _srcEvt ){ + _p.selector().trigger( 'mousedown', [ _srcEvt || _evt ] ); + }); + } + + , _inited: + function(){ + this.trigger( Drag.Model.DRAG_INITED ); + } + /** + * 获取拖动的源节点 + * @method dragTarget + * @return selector + */ + , dragTarget: function(){ return this._model.dragTarget(); } + /** + * 获取拖动时移动的节点, drag 使用 dragTarget, drop clone dragTarget + * @method dragMovingTarget + * @return selector + */ + , dragMovingTarget: function(){ return this._model.dragMovingTarget(); } + /** + * 获取可拖动范围的 [ 节点 | window ] + * @method dragIn + * @return {selector|window} + */ + , dragIn: function(){ return this._model.dragIn(); } + /** + * 更新 dragMovingTarget 的位置 + * @method _updatePosition + * @protected + */ + , _updatePosition: + function(){ + this._view.updatePosition.apply( this._view, JC.f.sliceArgs( arguments ) ); + return this; + } + }); + /** + * 初始化可识别的 Drag 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of DragInstance} + */ + Drag.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector && _selector.length ){ + if( _selector.hasClass( 'js_compDrag' ) ){ + !_selector.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) && _r.push( new Drag( _selector ) ); + }else{ + _selector.find( 'div.js_compDrag, button.js_compDrag' ).each( function(){ + !_selector.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) && _r.push( new Drag( this ) ); + }); + } + } + return _r; + }; + /** + * 设置/获取 拖动时所需的数据 + * @method dragInfo + * @param {DragInstance} _ins + * @param {event} _evt + * @return {json|null} + * @static + */ + Drag.dragInfo = + function( _ins, _evt ){ + if( _ins && _evt ){ + Drag._dragInfo = { + 'ins': _ins + , 'evt': _evt + , 'offset': _ins._model.position( _evt ) + }; + } + return Drag._dragInfo; + }; + /** + * 设置当前的拖动 selector + * @method draggingItem + * @param {selector|null} _setter + * @return {selector|null} + * @static + */ + Drag.draggingItem = + function( _setter ){ + if( typeof _setter != 'undefined' ){ + Drag._draggingItem && Drag._draggingItem.data( Drag.Model.DRAGGING_ITEM, false ); + _setter && _setter.data( Drag.Model.DRAGGING_ITEM, true ); + + Drag._draggingItem = _setter; + } + return Drag._draggingItem; + }; + /** + * 清除拖动的相关数据 + * @method cleanDragData + * @static + */ + Drag.cleanDragData = + function(){ + _jdoc.off( 'mousemove', Drag.defaultMouseMove ); + _jdoc.off( 'mouseup', Drag.defaultMouseUp ); + _jwin.off( 'scroll', Drag.defaultScroll ); + + Drag._dragInfo = null; + Drag.draggingItem( null ); + }; + /** + * 拖动时, 默认的 mousemove 函数 + * @method defaultMouseMove + * @param {evt} _evt + * @static + */ + Drag.defaultMouseMove = + function( _evt ){ + if( !Drag.dragInfo() ) return; + //JC.log( 'JC.Drag mousemove', new Date().getTime() ); + var _di = Drag.dragInfo() + , _p = _di.ins + , _offset = _di.offset + , _newX, _newY + ; + if( !_p ) return; + _newX = _evt.pageX - _offset.x; + _newY = _evt.pageY - _offset.y; + + _newX <= _offset.minX && ( _newX = _offset.minX ); + _newY <= _offset.minY && ( _newY = _offset.minY ); + + _newX >= _offset.maxX && ( _newX = _offset.maxX ); + _newY >= _offset.maxY && ( _newY = _offset.maxY ); + + _newX -= _di.offset.relativeFixX; + _newY -= _di.offset.relativeFixY; + + //JC.log( _newX, _newY, _offset.maxX, _offset.maxY ); + _p._updatePosition( _newX, _newY, _offset ); + _p.trigger( Drag.Model.DRAGGING_MOVING, [ _newX, _newY, _evt, _offset ] ); + }; + /** + * 拖动时, 默认的 mouseup 函数 + * @method defaultMouseUp + * @param {evt} _evt + * @static + */ + Drag.defaultMouseUp = + function( _evt ){ + var _di = Drag.dragInfo(); + + if( _di && _di.ins ){ + _di.ins.notification( 'DRAG_UP' ); + _di.ins.trigger( Drag.Model.DRAG_DONE, _di ); + } + + Drag.cleanDragData(); + }; + /** + * 拖动时, 默认的 scroll 函数 + * @method defaultScroll + * @param {evt} _evt + * @static + */ + Drag.defaultScroll = + function( _evt ){ + // + /// 如果 dragIn 不是 window的时候, scrollTop 计算有问题 + // + var _di = Drag.dragInfo(); + if( !( _di && _di.ins ) ) return; + var _scrollX = _di.ins.dragIn().scrollLeft() + , _scrollY = _di.ins.dragIn().scrollTop() + , _offset = _di.ins.dragMovingTarget().position() + , _newX, _newY + , _fixScrollX = _scrollX - _di.offset.scrollX + , _fixScrollY = _scrollY - _di.offset.scrollY + ; + + _newX = _offset.left + _fixScrollX; + _newY = _offset.top + _fixScrollY; + + //JC.log( _di.offset.scrollY, _scrollY, _offset.left, _newX, _offset.top, _newY ); + /* + _di.ins.dragMovingTarget().css({ + 'left': _newX + 'px' + , 'top': _newY + 'px' + }); + */ + _newX -= _di.offset.relativeFixX; + _newY -= _di.offset.relativeFixY; + + _di.ins._updatePosition( _newX, _newY, _offset ); + + _di.offset.scrollX = _scrollX; + _di.offset.scrollY = _scrollY; + _di.offset.maxX += _fixScrollX; + _di.offset.maxY += _fixScrollY; + }; + + Drag.Model._instanceName = 'JCDragIns'; + + Drag.Model.DRAG_INITED = 'JCDragInited'; + Drag.Model.DRAG_BEFORE = 'JCDragBefore'; + Drag.Model.DRAG_BEGIN = 'JCDragBegin'; + Drag.Model.DRAG_DONE = 'JCDragDone'; + Drag.Model.DRAG_AFTER = 'JCDragAfter'; + Drag.Model.DRAGGING_ITEM = 'JCDraggingItem'; + Drag.Model.DRAGGING_MOVING= 'JCDraggingMoving'; + Drag.Model.DROP_DONE = 'JCDropDone'; + Drag.Model.DROP_DONE_AFTER = 'JCDropDoneAfter'; + + Drag.Model.DISABLE_DRAG = 'disableDrag'; + Drag.Model.DISABLE_DROP = 'disableDrop'; + Drag.Model.IGNORE_DRAG = 'ignoreDrog'; + + Drag.Model.TRIGGER_DRAG = 'JCTriggerDrag'; + + Drag.Model.CLASS_CURRENT = 'JCCurrentDropBox'; + Drag.Model.CLASS_MOVING = 'JCMovingDropBox'; + Drag.Model.CLASS_CURRENT_DRAG_ITEM = 'JCCurrentDragItem'; + + JC.f.extendObject( Drag.Model.prototype, { + init: + function(){ + //JC.log( 'Drag.Model.init:', new Date().getTime() ); + } + + , defaultCSSPosition: + function( _setter ){ + typeof _setter != 'undefined' && ( this._defaultCSSPosition = _setter ); + return this._defaultCSSPosition; + } + + , defaultCSSZIndex: + function( _setter ){ + typeof _setter != 'undefined' && ( this._defaultCSSZIndex = _setter ); + return this._defaultCSSZIndex; + } + + , defaultCSSCursor: + function( _setter ){ + typeof _setter != 'undefined' && ( this._defaultCSSCursor = _setter ); + return this._defaultCSSCursor; + } + + , dragTarget: + function(){ + var _p = this; + if( !_p._dragTarget ){ + _p._dragTarget = _p.selectorProp( 'dragTarget' ); + + !( _p._dragTarget && _p._dragTarget.length ) + && ( _p._dragTarget = _p.selector() ) + ; + } + return _p._dragTarget; + } + + , dragMovingTarget: + function( _cleanCache ){ + var _p = this, _isDropFor = _p.isDropFor(); + + if( _isDropFor && _cleanCache ){ + _p._dragMovingTarget && _p._dragMovingTarget.remove(); + _p._dragMovingTarget = null; + } + + if( !_p._dragMovingTarget ){ + _p._dragMovingTarget = _p.dragTarget(); + + if( _isDropFor ){ + var _offset = _p.dragTarget().position(), _gid = JC.f.gid(); + + _p._dragMovingTarget = _p.dragTarget().clone(); + _p._dragMovingTarget.css( { + 'position': 'absolute' + , 'left': _offset.left + 'px' + , 'top': _offset.top + 'px' + , 'z-index': window.ZINDEX_COUNT++ + } ); + + _p.dragTarget().data( 'gid', _gid ); + _p._dragMovingTarget.data( 'gid', _gid ); + + _p.dragTarget().addClass( Drag.Model.CLASS_CURRENT_DRAG_ITEM ); + + /* + JC.f.safeTimeout( function(){ + _p._dragMovingTarget.css( { 'z-index': window.ZINDEX_COUNT++ } ); + }, _p._dragMovingTarget, 'sdfaswesfasd', 1 ); + */ + + _p._dragMovingTarget.attr( Drag.Model.DISABLE_DROP, true ) + .attr( Drag.Model.IGNORE_DRAG, true ) + .addClass( Drag.Model.CLASS_MOVING ) + ; + } + } + + _isDropFor + && _cleanCache + && _p.dragTarget().after( _p._dragMovingTarget ) + ; + + return _p._dragMovingTarget; + } + + , isDropFor: + function(){ + typeof this._isDropFor == 'undefined' + && ( this._isDropFor = this.is( '[dropFor]' ) && JC.f.parseBool( this.attrProp( 'dropFor' ) ) ); + return this._isDropFor; + } + + , dropFor: + function( _cleanCache ){ + ( !this._dropFor == 'undefined' || _cleanCache ) + && ( this._dropFor = this.selectorProp( 'dropFor' ) ); + return this._dropFor; + } + + , relativeParent: + function( _cleanCache ){ + if( !this._relativeParent == 'undefined' || _cleanCache ){ + this._relativeParent = null; + var _tmp = this.dragTarget(); + while( (_tmp = $( _tmp.parent() ) ).length ){ + if( /body|html/i.test( _tmp.prop( 'nodeName' ) ) ) break; + if( ( _tmp.css( 'position' ) || '' ).toLowerCase() == 'relative' ){ + this._relativeParent = _tmp; + break; + } + } + } + return this._relativeParent; + } + + , dropSwap: + function(){ + return this.boolProp( 'dropSwap' ); + } + + , dropPush: + function(){ + return this.boolProp( 'dropPush' ); + } + + , selectedDropBox: + function( _x, _y ){ + var _p = this, _dropFor = _p.dropFor(), _di = Drag.dragInfo(); + + if( !_di ){ return null; } + + if( typeof _x != 'undefined' && typeof _y != 'undefined' && _dropFor && _dropFor.length ){ + _p._selectedDropBox = null; + + if( _dropFor && _dropFor.length ){ + var _ls = [] + , _srcRect = locationToRect( _x, _y, _di.offset.width, _di.offset.height ) + ; + + _dropFor.each( function(){ + var _sp = $(this); + + if( _sp.is( '[' + Drag.Model.DISABLE_DROP + ']' ) ) { return; } + + var _offset = _sp.position() + , _rect = locationToRect( _offset.left + , _offset.top + , _sp.prop( 'offsetWidth' ) + , _sp.prop( 'offsetHeight' ) + ); + + if( intersectRect( _srcRect, _rect ) ){ + _rect.selector = _sp; + _ls.push( _rect ); + } + }); + + if( _ls.length ){ + var _findItem; + $.each( _ls, function( _ix, _rect ){ + _rect.dist = pointDistance( rectToPoint( _srcRect ), rectToPoint( _rect ) ); + + //_rect.selector.html( JC.f.moneyFormat( _dist ) ); + + if( !_ix ){ + _findItem = _rect; + return; + } + _rect.dist < _findItem.dist && ( _findItem = _rect ); + }); + this._selectedDropBox = _findItem.selector; + }else{ + this._selectedDropBox = null; + } + } + } + return this._selectedDropBox; + } + + , dragIn: + function(){ + if( ! ( this._dragIn && this._dragIn.length ) ){ + this._dragIn = this.selectorProp( 'dragIn' ); + !( this._dragIn && this._dragIn.length ) + && ( this._dragIn = $( document.documentElement ) ) + ; + } + return this._dragIn; + } + + , position: + function( _evt ){ + var _p = this + , _toffset = _p.dragTarget().position() + , _inoffset = _p.dragIn().position() + , _roffset = _p.relativeParent() ? _p.relativeParent().position() : { 'left': 0, 'top': 0 } + , _r = { + 'mouseX': _evt.pageX + , 'mouseY': _evt.pageY + , 'targetX': _toffset.left + , 'targetY': _toffset.top + , 'scrollX': _p.dragIn().scrollLeft() + , 'scrollY': _p.dragIn().scrollTop() + , 'maxXFix': -1 + , 'maxYFix': -1 + , 'width': _p.dragTarget().prop( 'offsetWidth' ) + , 'height': _p.dragTarget().prop( 'offsetHeight' ) + , 'relativeFixX': _roffset.left + , 'relativeFixY': _roffset.top + }; + + _r.x = _r.mouseX - _r.targetX; + _r.y = _r.mouseY - _r.targetY; + + !_inoffset && ( _inoffset = { 'left': 0, 'top': 0 } , _r.maxXFix = 0, _r.maxYFix = 0 ); + _r.minX = _inoffset.left; + _r.minY = _inoffset.top; + + _r.maxX = _r.minX + + _p.dragIn().scrollLeft() + + _p.dragIn().width() + - _r.width + - _r.maxXFix + ; + + _r.maxY = _r.minY + + _p.dragIn().scrollTop() + + _p.dragIn().height() + - _r.height + - _r.maxYFix + ; + + //JC.log( [ _r.maxX, _r.maxY, _p.dragTarget().width(), _p.dragTarget().prop( 'offsetWidth' ) ] ); + + return _r; + } + + , dragInitedCb: function(){ return this.callbackProp( 'dragInitedCb' ) || Drag.dragInitedCb; } + , dragBeforeCb: function(){ return this.callbackProp( 'dragBeforeCb' ) || Drag.dragBeforeCb; } + , dragAfterCb: function(){ return this.callbackProp( 'dragAfterCb' ) || Drag.dragAfterCb; } + , dragBeginCb: function(){ return this.callbackProp( 'dragBeginCb' ) || Drag.dragBeginCb; } + , dragMovingCb: function(){ return this.callbackProp( 'dragMovingCb' ) || Drag.dragMovingCb; } + , dragDoneCb: function(){ return this.callbackProp( 'dragDoneCb' ) || Drag.dragDoneCb; } + , dropDoneCb: function(){ return this.callbackProp( 'dropDoneCb' ) || Drag.dropDoneCb; } + , dropDoneAfterCb: function(){ return this.callbackProp( 'dropDoneAfterCb' ) || Drag.dropDoneAfterCb; } + + , clean: + function( _dragInfo ){ + var _p = this; + } + }); + + JC.f.extendObject( Drag.View.prototype, { + init: + function(){ + //JC.log( 'Drag.View.init:', new Date().getTime() ); + } + + , updatePosition: + function( _x, _y ){ + var _p = this + , _dt = _p._model.dragMovingTarget() + , _selectedDropBox + ; + + _dt.css({ + 'left': _x + 'px' + , 'top': _y + 'px' + }); + + if( _p._model.isDropFor() ){ + _selectedDropBox = _p._model.selectedDropBox(); + _selectedDropBox && _selectedDropBox.removeClass( Drag.Model.CLASS_CURRENT ); + + /* + _selectedDropBox = _p._model.selectedDropBox( _x, _y ); + if( _selectedDropBox ){ + _selectedDropBox.addClass( Drag.Model.CLASS_CURRENT ); + } + */ + _selectedDropBox = _p._model.selectedDropBox( _x, _y ); + if( _selectedDropBox ){ + if( _dt.data( 'gid' ) == _selectedDropBox.data( 'gid' ) && _p._model.dropSwap() ){ + } else if( _dt.data( 'gid' ) == _selectedDropBox.data( 'gid' ) && _p._model.dropSwap() ){ + }else{ + _selectedDropBox.addClass( Drag.Model.CLASS_CURRENT ); + } + } + + } + } + + , dropDone: + function( _dragInfo ){ + var _p = this; + + if( _p._model.isDropFor() ){ + var _selectedDropBox = _p._model.selectedDropBox(); + if( !( _selectedDropBox && _selectedDropBox.length ) ) return; + + if( _selectedDropBox.data( Drag.Model.DRAGGING_ITEM ) ) return; + + if( _p._model.dropDoneCb() + && _p._model.dropDoneCb().call( + _p._model.selector() + , _p._model.dragTarget() + , _selectedDropBox + ) === false + ){ + return; + } + + if( _p.notificationHandler( 'DROP_DONE', [ + _p._model.selector() + , _p._model.dragTarget() + , _selectedDropBox + ] ) === false + ){ + return; + } + + _p.trigger( Drag.Model.DROP_DONE ); + + if( _p._model.dropSwap() ){ + var _srcIpt = $( '' ) + , _targetIpt = _srcIpt.clone() + ; + _p._model.dragTarget().after( _srcIpt ); + _selectedDropBox.after( _targetIpt ); + + _targetIpt.after( _p._model.dragTarget() ); + _srcIpt.after( _selectedDropBox ); + + _srcIpt.remove(); + _targetIpt.remove(); + } else if( _p._model.dropPush ){ + _p.trigger( 'INIT_INDEX' ); + var _srcIpt = $( '' ) + , _targetIpt = _srcIpt.clone() + ; + /* + _p._model.dragTarget().after( _srcIpt ); + _selectedDropBox.after( _targetIpt ); + + _targetIpt.after( _p._model.dragTarget() ); + _srcIpt.after( _selectedDropBox ); + + _srcIpt.remove(); + _targetIpt.remove(); + + JC.log( _selectedDropBox.data( 'dragIndex' ), _p._model.dragTarget().data( 'dragIndex' ) ); + */ + + if( _p._model.dragTarget().data( 'dragIndex' ) > _selectedDropBox.data( 'dragIndex' ) ){ + _selectedDropBox.before( _p._model.dragTarget() ); + }else{ + _selectedDropBox.after( _p._model.dragTarget() ); + } + + }else{ + _p._model.dragTarget().appendTo( _selectedDropBox ); + } + + _p._model.dropDoneAfterCb() + && _p._model.dropDoneAfterCb().call( + _p._model.selector() + , _p._model.dragTarget() + , _selectedDropBox + ); + + _p.notification( 'DROP_DONE_AFTER', [ + _p._model.selector() + , _p._model.dragTarget() + , _selectedDropBox + ]); + + _p.trigger( Drag.Model.DROP_DONE_AFTER ); + } + } + + , clean: + function( _dragInfo ){ + var _p = this; + + if( _p._model.isDropFor() ){ + _p._model.dragMovingTarget() + && _p._model.dragMovingTarget().remove() + ; + + _p._model.selectedDropBox() + && _p._model.selectedDropBox().removeClass( Drag.Model.CLASS_CURRENT ) + ; + } + } + }); + /** + * 判断两个矩形是否有交集 + */ + function intersectRect( r1, r2 ) { + return !( + r2.left > r1.right || + r2.right < r1.left || + r2.top > r1.bottom || + r2.bottom < r1.top + ); + } + /** + * 把坐标和宽高生成一个 rectangle 数据 + */ + function locationToRect( _x, _y, _width, _height ){ + var _offset, _r = { + 'left': _x + , 'top': _y + , 'right': _x + _width + , 'bottom': _y + _height + }; + return _r; + } + /** + * 把 rectangle 数据 转换为 坐标数据 + */ + function rectToPoint( _rect ){ + var _r = { + 'x': _rect.left + ( _rect.right - _rect.left ) / 2 + , 'y': _rect.top + ( _rect.bottom - _rect.top ) / 2 + }; + return _r; + } + /** + * 计算两个坐标点之间的距离 + */ + function pointDistance( _p1, _p2 ){ + var _dx = _p2.x - _p1.x + , _dy = _p2.y - _p1.y + , _dist = Math.sqrt( _dx * _dx + _dy * _dy ); + ; + return _dist; + } + /** + * 实例初始化后触发的事件 + * @event JCDragInited + */ + /** + * 拖动开始前触发的事件 + * @event JCDragBefore + */ + /** + * 拖动开始时触发的事件 + * @event JCDragBegin + */ + /** + * 拖动完成时触发的事件 + * @event JCDragDone + */ + /** + * 拖动完成之后触发的事件 + * @event JCDragAfter + */ + /** + * 拖动移动时触发的事件 + * @event JCDraggingMoving + */ + /** + * 拖放完成时触发的事件 + * @event JCDropDone + */ + /** + * 拖放完成后触发的事件 + * @event JCDropDoneAfter + */ + /** + * 手动触发拖动事件 + * @event JCTriggerDrag + */ + /* + $(document).ready( function(){ + var _insAr = 0; + Drag.autoInit + && ( _insAr = Drag.init() ) + ; + }); + */ + + _jdoc.delegate( 'div.js_compDrag, button.js_compDrag', 'mouseenter', function( _evt ){ + var _p = $( this ), _ins = JC.BaseMVC.getInstance( $(this), JC.Drag ); + if( _p.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) ) return + !_ins && ( _ins = new JC.Drag( _p ) ) && JC.BaseMVC.getInstance( _p, JC.Drag, _ins ); + }); + + _jdoc.delegate( 'div.js_compDrag, button.js_compDrag', 'mousedown', function( _evt ){ + var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, Drag ); + if( _p.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) ) return + !_ins && ( _ins = new Drag( _p ) ) && _ins.trigger( Drag.Model.TRIGGER_DRAG, [ _evt ] ); + return false; + }); + + _jwin.on( 'resize', function( _evt ){ + Drag.cleanDragData(); + }); + + return JC.Drag; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Drag/_demo/demo.drag.html b/comps/Drag/_demo/demo.drag.html new file mode 100755 index 000000000..523f9d08b --- /dev/null +++ b/comps/Drag/_demo/demo.drag.html @@ -0,0 +1,155 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.Drag 示例

        + +
        +
        +
        +
        + dragBeginCb="dragBeginCb" +
        +
        + +
        +
        + dragDoneCb="dragDoneCb" +
        +
        + +
        +
        + disableDrag="true" +
        +
        + +
        +
        + ignoreDrog="true" +
        +
        + +
        +
        + dragMovingCb="dragMovingCb" +
        +
        + +
        +
        +
        drag parent, dragTarget="(div"
        + content... +
        content... +
        content... +
        content... +
        +
        + +
        +
        +
        + drag in div, dragIn="(div" +
        + +
        +
        drag parent, dragIn="//", dragTarget="(div"
        + content... +
        content... +
        content... +
        content... +
        + +
        +
        + +
        +
        +
        + drag in div, dragIn="(div" +
        + +
        +
        drag parent, dragIn="//", dragTarget="(div"
        + content... +
        content... +
        content... +
        content... +
        + +
        +
        + +
        +
        + normal drag +
        +
        + +
        + + + + diff --git a/comps/Drag/_demo/demo.dropFor.html b/comps/Drag/_demo/demo.dropFor.html new file mode 100755 index 000000000..e47794dab --- /dev/null +++ b/comps/Drag/_demo/demo.dropFor.html @@ -0,0 +1,169 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.Drag 示例 - dropFor

        + +
        + +
        +
        dropFor="(table td"
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        + dropDoneCb="dropDoneCbAllow" +
        +
        +
        + dropDoneCb="dropDoneCbBan" +
        +
        +
        + dragInitedCb="dragInitedCb" +
        +
        +
        drop 4
        +
        +
        disableDrag="true"
        +
        + td disableDrop="true" +
        drop 6
        +
        +
        drop 7
        +
        +
        drop 8
        +
        +
        drop 9
        +
        +
        drop 10
        +
        +
        drop 11
        +
        +
        drop 12
        +
        +
        drop 13
        +
        +
        drop 14
        +
        +
        drop 15
        +
        +
        drop 16
        +
        +
        +
        +
        + +
        + + + + diff --git a/comps/Drag/_demo/demo.dropSwap.html b/comps/Drag/_demo/demo.dropSwap.html new file mode 100755 index 000000000..65fb2f67e --- /dev/null +++ b/comps/Drag/_demo/demo.dropSwap.html @@ -0,0 +1,250 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.Drag 示例 - dropSwap

        + +
        + +
        +
        dropFor="(table div.js_compDrag" dropSwap="true"
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        + dropDoneCb="dropDoneCbAllow" +
        +
        +
        + dropDoneCb="dropDoneCbBan" +
        +
        +
        + dragInitedCb="dragInitedCb" +
        +
        +
        drop 4
        +
        +
        disableDrag="true"
        +
        +
        disableDrop="true"
        +
        +
        dropDoneAfterCb="dropDoneAfterCb"
        +
        +
        + disableDrag="true" + , disableDrop="true" +
        +
        +
        + dragBeforeCb="dragBeforeCb" +
        +
        +
        + dragAfterCb="dragAfterCb" +
        +
        +
        drop 11
        +
        +
        dragMovingCb="dragMovingCb"
        +
        +
        drop 13
        +
        +
        drop 14
        +
        +
        drop 15
        +
        +
        drop 16
        +
        +
        +
        +
        + +
        + + + + diff --git a/comps/Drag/_demo/index.php b/comps/Drag/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/Drag/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/Drag/index.php b/comps/Drag/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/Drag/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/Drag/res/default/index.php b/comps/Drag/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/comps/Drag/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/Drag/res/default/style.css b/comps/Drag/res/default/style.css new file mode 100755 index 000000000..ec3e765fb --- /dev/null +++ b/comps/Drag/res/default/style.css @@ -0,0 +1,18 @@ +.JCDrag { + position: absolute; +} + +.JCCurrentDropBox, .JCCurrentDropBox * { + color: #000!important; + background: #F0DC82!important; +} + +.JCMovingDropBox, .JCMovingDropBox * { + color: #000!important; + background: #fff!important; +} + +.JCMovingDropBox { + opacity: .35; + filter: alpha( opacity = 35 ); +} diff --git a/comps/Drag/res/index.php b/comps/Drag/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/Drag/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/DragSelect/DragSelect.js b/comps/DragSelect/DragSelect.js new file mode 100755 index 000000000..d7fb3e1eb --- /dev/null +++ b/comps/DragSelect/DragSelect.js @@ -0,0 +1,624 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * DOM标签拖动选择 + * + *

        require: + * JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 div class="js_compDragSelect"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        cdsConfig = script selector
        + *
        拖动内容的配置 +<script type="text/template" class="js_cdsConfig">
        +    {
        +        "items": {                                      //响应选择动作的选择器列表
        +            "td.js_pos_canSelect": {                        //响应选择动作的选择器
        +                "addClass": "js_pos_selected"               //选取到的内容 添加的 class
        +                , "removeClass": "js_pos_canSelect"         //选取到的内容 清除的 class
        +                , "callback":                               //选中内容后的回调
        +                    function( _items, _type, _ins ){
        +                        var _selector = this;
        +                        JC.log( 'callback, td.js_pos_canSelect:', _type, _items.length );
        +                    }
        +            }
        +            , "td.js_pos_selected": {
        +                "addClass": "js_pos_canSelect"
        +                , "removeClass": "js_pos_selected"
        +                , "callback": 
        +                    function( _items, _type, _ins ){
        +                        var _selector = this;
        +                        JC.log( 'callback, td.js_pos_selected:', _type, _items.length );
        +                    }
        +            }
        +        }
        +        , "realtimeClass": "js_cdsRealtimeEffect"   //实时显示选取内容的 CSS 样式名
        +        , "callback":                         //选中内容的全局回调
        +            function( _items, _type, _ins ){
        +                var _selector = this;
        +                JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );
        +            }
        +    }
        +
        </script> + *
        + * + *
        cdsRealtimeEffect = bool, default = false
        + *
        是否实时显示选中内容的状态
        + * + *
        cdsRealtimeClass = CSS class name
        + *
        显示选中内容的 CSS 样式名
        + * + *
        cdsCallback = function
        + *
        选中内容的全局回调 +
        function cdsCallback( _items, _type, _ins ){
        +    var _selector = this;
        +    JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );
        +}
        + *
        + * + *
        cdsItemFilter = function
        + *
        选取内容时的过滤函数, 返回 false 将忽略 _item +
        function cdsItemFilter( _item, _type, _itemData, _configData ){
        +    var _selector = this
        +        , _r = true
        +        //, _minDate = JC.f.pureDate( JC.f.dateDetect( 'now,1d' ) )
        +        //, _itemDate = JC.f.parseISODate( _item.data( 'date' ) )
        +        ;
        +    //_itemDate.getTime() < _minDate.getTime() && ( _r = false );
        +    return _r;
        +}
        + *
        + * + *
        cdsRectMinWidth = int, default = 20
        + *
        响应选取时,最小拖动宽度
        + * + *
        cdsRectMinHeight= int, default = 20
        + *
        响应选取时,最小拖动高度
        + * + *
        cdsEnableTextSelectable = bool, default = false
        + *
        选取内容式,是否启用文本选取
        + *
        + * + * @namespace JC + * @class DragSelect + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-05-29 + * @author qiushaowei | 75 Team + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.DragSelect = DragSelect; + + function DragSelect( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, DragSelect ) ) + return JC.BaseMVC.getInstance( _selector, DragSelect ); + + JC.BaseMVC.getInstance( _selector, DragSelect, this ); + + this._model = new DragSelect.Model( _selector ); + this._view = new DragSelect.View( this._model ); + + this._init(); + + JC.log( DragSelect.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 DragSelect 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of DragSelectInstance} + */ + DragSelect.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compDragSelect' ) ){ + _r.push( new DragSelect( _selector ) ); + }else{ + _selector.find( 'div.js_compDragSelect' ).each( function(){ + _r.push( new DragSelect( this ) ); + }); + } + } + return _r; + }; + /** + * 用于显示选取范围的矩形 + * @method RECT + * @static + * @return selector + */ + DragSelect.RECT = + function(){ + if( !( DragSelect._RECT && DragSelect._RECT.length ) ){ + DragSelect._RECT = $( DragSelect.RECT_TPL ); + DragSelect._RECT.appendTo( document.body ); + } + return DragSelect._RECT; + } + /** + * 用于显示选取范围的矩形模板 + * @property RECT_TPL + * @type string + * @default + * @static + */ + DragSelect.RECT_TPL = '' ; + /** + * 默认 mouseup 事件 + * @method DEFAULT_MOUSEUP + * @static + */ + DragSelect.DEFAULT_MOUSEUP = + function( _evt ){ + var _d = DragSelect.DRAG_DATA(); + if( !_d ) return; + var _p = _d.ins; + //JC.log( 'up', JC.f.ts() ); + _p.trigger( 'SELECT_DONE', [ _p._model.offset( _evt ) ] ); + }; + /** + * 默认 mousemove 事件 + * @method DEFAULT_MOUSEMOVE + * @static + */ + DragSelect.DEFAULT_MOUSEMOVE = + function( _evt ){ + var _d = DragSelect.DRAG_DATA(); + if( !_d ) return; + var _p = _d.ins + , _newPoint = _p._model.offset( _evt ) + ; + //JC.log( 'move', JC.f.ts() ); + _p._view.updateRect( _newPoint ); + _p.trigger( 'SELECT_MOVE', [ _newPoint ] ); + }; + /** + * 默认 selectstart 事件 + * @method DEFAULT_SELECT_EVENT + * @static + */ + DragSelect.DEFAULT_SELECT_EVENT = + function(){ + return false; + }; + /** + * 获取当前拖动的相关数据 + * @method DRAG_DATA + * @static + * @return object + */ + DragSelect.DRAG_DATA = + function( _setter ){ + typeof _setter != 'undefined' && ( DragSelect._DRAG_DATA = _setter ); + return DragSelect._DRAG_DATA; + }; + /** + * 最小拖动范围, 小于这个范围将不予处理 + * @property MIN_RECT + * @type object + * @default width: 20, height: 20 + * @static + */ + DragSelect.MIN_RECT = { width: 20, height: 20 }; + + JC.BaseMVC.build( DragSelect ); + + JC.f.extendObject( DragSelect.prototype, { + _beforeInit: + function(){ + //JC.log( 'DragSelect _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this, _ditems; + + if( !_p._model.config() ) { + JC.log( 'JC.DragSelect config data not found!' ); + return; + } + + _p.on( 'inited', function(){ + _ditems = _p._model.delegateItems(); + if( !_ditems.length ) return; + + _p.selector().delegate( _ditems.join(','), 'click', function( _evt ){ + //JC.log( 'click', JC.f.ts() ); + }); + + $.each( _ditems, function( _k, _item ){ + _p.selector().delegate( _item, 'mousedown', function( _evt ){ + var _sp = $( this ); + _p.trigger( 'SELECT_START', [ _sp, _evt, _item ] ); + }); + }); + }); + + _p.on( 'SELECT_START', function( _evt, _sp, _srcEvt, _type ){ + var _d; + _p.trigger( 'CLEAR_EVENT' ); + _p.trigger( 'REMOVE_ALL_REALTIME_EFFECT' ); + _d = _p._model.initDragData( _sp, _type ); + if( !_d ) return; + _d.ins = _p; + _d.downPoint = _p._model.offset( _srcEvt ); + _p._view.showRect(); + _p.trigger( 'BIND_EVENT' ); + }); + + _p.on( 'BIND_EVENT', function( _evt ){ + _jdoc.on( 'mousemove', DragSelect.DEFAULT_MOUSEMOVE ); + _jdoc.on( 'mouseup', DragSelect.DEFAULT_MOUSEUP ); + + !_p._model.enableTextSelectable() + && _jdoc.on( 'selectstart', DragSelect.DEFAULT_SELECT_EVENT ); + }); + + _p.on( 'CLEAR_EVENT', function( _evt ){ + _jdoc.off( 'mousemove', DragSelect.DEFAULT_MOUSEMOVE ); + _jdoc.off( 'mouseup', DragSelect.DEFAULT_MOUSEUP ); + _jdoc.off( 'selectstart', DragSelect.DEFAULT_SELECT_EVENT ); + + _p._model.realtimeEffect() && _p.trigger( 'REMOVE_ALL_REALTIME_EFFECT' ); + _p.trigger( 'CLEAR_DATA' ); + }); + + _p.on( 'SELECT_DONE', function( _evt, _newPoint ){ + _p._view.updateRect( _newPoint ); + var _rectSize = selectorToRectangle( DragSelect.RECT() ); + + if( _p._model.rectIsOutsize( _rectSize ) ){ + }else{ + _p.trigger( 'PROCESSS_SELECT', [ _rectSize, DragSelect.DRAG_DATA() ] ); + } + _p._view.hideRect(); + _p.trigger( 'CLEAR_EVENT' ); + }); + + _p.on( 'PROCESSS_SELECT', function( _evt,_rectSize, _params ){ + if( !DragSelect.RECT().is( ':visible' ) ) return; + var _selectedItems = _p._model.getSelectItems( _rectSize, _params.type ); + if( !_selectedItems.length ) return; + if( _params.data ){ + $.each( _selectedItems, function( _k, _item ){ + _params.data.addClass && _item.addClass( _params.data.addClass ); + _params.data.removeClass && _item.removeClass( _params.data.removeClass ); + }); + _params.data.callback && _params.data.callback.call( _p.selector(), _selectedItems, _params.type, _p ); + } + _p._model.callback() && _p._model.callback().call( _p.selector(), _selectedItems, _params.type, _p ); + //JC.log( 'PROCESSS_SELECT', _selectedItems.length ); + }); + + _p.on( 'SELECT_MOVE', function( _evt, _newPoint ){ + if( _p._model.realtimeEffect() ){ + _p.trigger( 'REALTIME_EFFECT', [ _newPoint ] ); + } + }); + + _p.on( 'REALTIME_EFFECT', function( _evt, _newPoint ){ + if( !DragSelect.RECT().is( ':visible' ) ) return; + if( !_p._model.realtimeClass( DragSelect.DRAG_DATA().data ) ) return; + + var _rectSize = selectorToRectangle( DragSelect.RECT() ) + , _params = DragSelect.DRAG_DATA() + , _realtimeClass= _p._model.realtimeClass( DragSelect.DRAG_DATA().data ) + ; + + _p.trigger( 'REMOVE_REALTIME_EFFECT', _realtimeClass ); + + if( _p._model.rectIsOutsize( _rectSize ) ){ + _p._model.preRealtimeItems( [] ); + return; + } + + var _selectedItems = _p._model.getSelectItems( _rectSize, _params.type ); + $.each( _selectedItems, function( _k, _item ){ + _item.addClass( _realtimeClass ); + }); + _p._model.preRealtimeItems( _selectedItems ); + }); + + _p.on( 'REMOVE_REALTIME_EFFECT', function( _evt, _class, _items ){ + _items = _items || _p._model.preRealtimeItems(); + _items && _class + && $.each( _items, function( _ix, _item ){ _item.removeClass( _class ); } ); + }); + + _p.on( 'REMOVE_ALL_REALTIME_EFFECT', function(){ + _p._model.realtimeClass() && _p._model.allItems().removeClass( _p._model.realtimeClass() ); + $.each( _p._model.config(), function( _k, _item ){ + _item.data + && _item.data.realtimeClass + && _p._model.items( _k ).removeClass( _items.data.realtimeClass ); + }); + }); + + _p.on( 'CLEAR_DATA', function( _evt ){ + DragSelect.DRAG_DATA( null ); + }); + } + + , clearCache: + function(){ + this.trigger( 'CLEAR_DATA' ); + } + + , _inited: + function(){ + //JC.log( 'DragSelect _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + DragSelect.Model._instanceName = 'JCDragSelect'; + DragSelect.Model.UNI_COUNT = 1; + DragSelect.Model.BEFORE_FIND_PREFIX = 'beforeSelected'; + + JC.f.extendObject( DragSelect.Model.prototype, { + init: + function(){ + //JC.log( 'DragSelect.Model.init:', new Date().getTime() ); + this._itemsCache = {}; + } + + , enableTextSelectable: + function(){ + return this.boolProp( 'cdsEnableTextSelectable' ); + } + + , realtimeClass: + function( _data ){ + var _r = this.config().realtimeClass || this.attrProp( 'cdsRealtimeClass' ); + _data && _data.realtimeClass && ( _r = _data.realtimeClass ); + return _r || ''; + } + + , items: + function( _type ){ + var _r; + /* + if( this.enableCache() ){ + !this._itemsCache[ _type ] && ( this._itemsCache[ _type ] = this.selector().find( _type ) ); + _r = this._itemsCache[ _type ]; + } + */ + !_r && ( _r = this.selector().find( _type ) ); + + return _r; + } + + , allItems: + function(){ + var _r; + /* + if( this.enableCache() ){ + !this._allItems && ( this._allItems = this.selector().find( this.delegateItems().join(',') ) ); + _r = this._allItems; + } + */ + !_r && ( _r = this.selector().find( this.delegateItems().join(',') ) ); + return _r; + } + + , enableCache: function(){ return this.boolProp( 'cdsEnableCache' ); } + + , preRealtimeItems: + function( _setter ){ + typeof _setter != 'undefined' && ( this._preRealtimeItems = _setter ); + return this._preRealtimeItems; + } + + , realtimeEffect: function(){ return this.boolProp( 'cdsRealtimeEffect' ); } + + , getSelectItems: + function( _rect, _type ){ + var _p = this, _r = [], _items = _p.items( _type ), _filter; + $.each( _items, function( _k, _item ){ + _item = $( _item ); + var _itemRect = selectorToRectangle( _item ); + if( intersectRect( _rect, _itemRect ) ){ + if( _filter = _p.itemFilter( _type ) ){ + if( _filter.call( _p.selector(), _item, _type, _p.config().items[ _type ], _p.config() ) === false ) return; + } + _r.push( _item ); + } + }); + + return _r; + } + + , itemFilter: + function( _type ){ + var _r = this.callbackProp( 'cdsItemFilter' ); + + this.config().itemFilter && ( _r = this.config().itemFilter ); + + this.config().items + && this.config().items[ _type ] + && this.config().items[ _type ].itemFilter + && ( _r = ( this.config().items[ _type ].itemFilter ) ) + ; + return _r; + } + + , callback: + function(){ + var _r = this.config().callback || this.callbackProp( 'cdsCallback' ); + return _r; + } + + , initDragData: + function( _selector, _k ){ + var _p = this + , _itemData = _p.config().items[ _k ] + ; + if( !_itemData ) return; + return DragSelect.DRAG_DATA( { type: _k, data: _itemData } ); + } + + , config: + function(){ + if( !this._config ){ + this._config = eval( '(' + ( JC.f.scriptContent( this.selectorProp( 'cdsConfig' ) ) ) + ')' ); + } + return this._config; + } + + , delegateItems: + function(){ + var _r = []; + $.each( this.config().items, function( _k, _item ){ + _r.push ( _k ); + }); + return _r; + } + + , offset: + function( _evt ){ + var _r = { + 'x': _evt.pageX + , 'y': _evt.pageY + }; + return _r; + } + + , rectMinWidth: function(){ return this.intProp( 'cdsRectMinWidth' ); } + , rectMinHeight: function(){ return this.intProp( 'cdsRectMinHeight' ); } + + , rectMinSize: + function(){ + var _p = this; + return { + width: _p.rectMinWidth() || DragSelect.MIN_RECT.width + , height: _p.rectMinHeight() || DragSelect.MIN_RECT.height + }; + } + + , rectIsOutsize: + function( _rectSize ){ + var _p = this, _r, _minSize = _p.rectMinSize(); + _minSize.width > _rectSize.width + && _minSize.height > _rectSize.height + && ( _r = true ) + ; + return _r; + } + }); + + JC.f.extendObject( DragSelect.View.prototype, { + init: + function(){ + //JC.log( 'DragSelect.View.init:', new Date().getTime() ); + } + + , showRect: + function(){ + DragSelect.RECT().css( { 'left': '-9999px' } ).show(); + } + + , updateRect: + function( _newPoint ){ + if( !( DragSelect.DRAG_DATA() && DragSelect.RECT().is( ':visible' ) ) ) return; + var _p = this + , _downPoint = DragSelect.DRAG_DATA().downPoint + , _rect = DragSelect.RECT() + , _size + ; + if( !_downPoint ) return; + _size = pointToRect( _downPoint, _newPoint ); + _rect.css( _size ); + } + + , hideRect: + function(){ + var _p = this + ; + DragSelect.RECT().hide(); + } + }); + /** + * 判断两个矩形是否有交集 + */ + function intersectRect( r1, r2 ) { + return !( + r2.x > ( r1.x + r1.width ) || + ( r2.x + r2.width ) < r1.x || + r2.y > ( r1.y + r1.height ) || + ( r2.y + r2.height ) < r1.y + ); + } + + function pointToRect( _p1, _p2 ){ + var _r = { 'x': 0, 'y': 0, 'width': 0, 'height': 0 }; + + if( _p1 && _p2 ){ + if( _p1.x < _p2.x ){ + _r.x = _p1.x; + _r.width = _p2.x - _p1.x; + }else{ + _r.x = _p2.x; + _r.width = _p1.x - _p2.x; + } + + if( _p1.y < _p2.y ){ + _r.y = _p1.y; + _r.height = _p2.y - _p1.y; + }else{ + _r.y = _p2.y; + _r.height = _p1.y - _p2.y; + } + _r.left = _r.x; + _r.top = _r.y; + } + + return _r; + } +    /** +     * 返回选择器的 矩形 位置 +     */ +    function selectorToRectangle( _selector ){ +        _selector = $( _selector ); +        var _offset = _selector.offset() +            , _w = _selector.prop('offsetWidth') +            , _h = _selector.prop('offsetHeight'); + +        return { +            x: _offset.left +            , y: _offset.top +            , width: _w +            , height: _h +        } +    } + _jdoc.ready( function(){ + JC.f.safeTimeout( function(){ + DragSelect.autoInit && DragSelect.init(); + }, null, 'INIT_DRAG_SELECT', 200 ); + }); + + return JC.DragSelect; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); + diff --git a/comps/DragSelect/_demo/demo.html b/comps/DragSelect/_demo/demo.html new file mode 100755 index 000000000..5927bf652 --- /dev/null +++ b/comps/DragSelect/_demo/demo.html @@ -0,0 +1,337 @@ + + + + +JC.DragSelect - Open JQuery Components Library - suches + + + + + + + + +

        JC.DragSelect - 示例

        + +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        col 1col 2col 3col 4col 5col 6col 7col 8col 9col 10
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        +
        +
        +
        + + + + diff --git a/comps/DragSelect/_demo/demo.multi_type.html b/comps/DragSelect/_demo/demo.multi_type.html new file mode 100755 index 000000000..c95482a97 --- /dev/null +++ b/comps/DragSelect/_demo/demo.multi_type.html @@ -0,0 +1,374 @@ + + + + +JC.DragSelect - Open JQuery Components Library - suches + + + + + + + + +

        JC.DragSelect - 示例

        + +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        col 1col 2col 3col 4col 5col 6col 7col 8col 9col 10
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        +
        +
        +
        + + + + diff --git a/comps/DragSelect/_demo/demo.realtimeEffect.html b/comps/DragSelect/_demo/demo.realtimeEffect.html new file mode 100755 index 000000000..24538550b --- /dev/null +++ b/comps/DragSelect/_demo/demo.realtimeEffect.html @@ -0,0 +1,321 @@ + + + + +JC.DragSelect - Open JQuery Components Library - suches + + + + + + + + +

        JC.DragSelect - 示例

        + +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        col 1col 2col 3col 4col 5col 6col 7col 8col 9col 10
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        12345678910
        +
        +
        +
        + + + + diff --git a/comps/DragSelect/_demo/index.php b/comps/DragSelect/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/DragSelect/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/DragSelect/index.php b/comps/DragSelect/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/DragSelect/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/DragSelect/res/default/style.css b/comps/DragSelect/res/default/style.css new file mode 100755 index 000000000..d44c551a8 --- /dev/null +++ b/comps/DragSelect/res/default/style.css @@ -0,0 +1,26 @@ +.unselectable { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + + /* + Introduced in IE 10. + See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/ + */ + -ms-user-select: none; + user-select: none; +} + +.js_compDragSelect_rect { + position: absolute; + border: 1px solid #aac4db; + background: #0A246A; + opacity: .5; + filter: alpha( opacity = 50 ); +} + +.js_compDragSelect .js_cdsRealtimeEffect, .js_compDragSelect td.js_cdsRealtimeEffect { + background: #f0dc82!important; + color: #000!important; +} + diff --git a/comps/DragSelect/res/default/test.css b/comps/DragSelect/res/default/test.css new file mode 100755 index 000000000..265fba49a --- /dev/null +++ b/comps/DragSelect/res/default/test.css @@ -0,0 +1,27 @@ +.js_compDragSelect .js_cdsSelecteClass, .js_compDragSelect .js_cdsSelecteClass * { + background: #F0DC82!important; + color: #000!important; +} + +.js_compDragSelect .js_cdsUnselectClass, .js_compDragSelect .js_cdsUnselectClass * { +} + +.js_compDragSelect .js_pos_canSelect { + background: #c1e0fe!important; + color: #61b0ff!important; +} + +.js_compDragSelect .js_pos_selected { + background: #008000!important; + color: #f2f2f2!important; +} + +.js_compDragSelect .js_pos_locked { + background: #ccc!important; + color: #000!important; +} + +.js_compDragSelect .js_pos_unlocked { + background: #eee!important; + color: #000!important; +} diff --git a/comps/DragSelect/res/index.php b/comps/DragSelect/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/DragSelect/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/FChart.js b/comps/FChart/FChart.js new file mode 100755 index 000000000..5a2535de9 --- /dev/null +++ b/comps/FChart/FChart.js @@ -0,0 +1,623 @@ +;(function(define, _win) { 'use strict'; define( 'JC.FChart', [ 'JC.BaseMVC', 'swfobject', 'plugins.json2', 'jquery.mousewheel' ], function(){ + +JC.use && !window.swfobject && JC.use( 'plugins.swfobject' ); +JC.use && !window.JSON && JC.use( 'plugins.jsons' ); +JC.use && !jQuery.event.special.mousewheel && JC.use( 'plugins.jquery.mousewheel' ); + +/** + * JC.FChart - flash 图表组件 + * + *

        require: + * JC.BaseMVC + * , SWFObject + * , JSON2 + * , jQuery.mousewheel + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 div class="js_compFChart"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        chartScriptData = script tpl selector
        + *
        图表的脚本模板数据
        + * + *
        chartDataVar = json object name
        + *
        图表的json数据名, window变量域
        + * + *
        chartWidth = number, default = 100%
        + *
        图表的宽度
        + * + *
        chartHeight = number, default = 400
        + *
        图表的高度
        + * + *
        chartScroll = bool, default = true
        + *
        图表是否响应鼠标滚动
        + *
        + * + * @namespace JC + * @class FChart + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-09-09 + * @author qiushaowei | 75 Team + * @example +
        +    <div class="js_compFChart"
        +        chartScriptData="|script"
        +        chartWidth="600"
        +        chartHeight="400"
        +        >
        +        <script type="text/template">
        +            {
        +                chart: {
        +                    type: 'bar' 
        +                }, 
        +                title: {
        +                    text:'Chart Title'
        +                },
        +                subtitle: {
        +                    text: 'sub title'
        +                }, 
        +                xAxis: {
        +                    categories: [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12' ]
        +                }, 
        +                yAxis: {
        +                    title: {
        +                        text: '(Vertical Title - 中文)'
        +                    }
        +                },
        +                series:[{
        +                    name: 'Temperature'
        +                    , data: [-50, 0, 3, -20, -20, 27, 28, 32, 30, 25, 15, -58]
        +                    , style: { 'stroke': '#ff7100' } 
        +                    , pointStyle: {}
        +                }, {
        +                    name: 'Rainfall',
        +                    data: [20, 21, 20, 100, 200, 210, 220, 100, 20, 10, 20, 10]
        +                }],
        +                credits: {
        +                    enabled: true
        +                    , text: 'fchart.openjavascript.org'
        +                    , href: 'http://fchart.openjavascript.org/'
        +                },
        +                displayAllLabel: true,
        +                legend: {
        +                    enabled: false
        +                }
        +            }
        +        </script>
        +    </div>
        +
        + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.FChart = FChart; + + function FChart( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, FChart ) ) + return JC.BaseMVC.getInstance( _selector, FChart ); + + JC.BaseMVC.getInstance( _selector, FChart, this ); + + this._model = new FChart.Model( _selector ); + this._view = new FChart.View( this._model ); + + this._init(); + + //JC.log( FChart.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 FChart 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of FChartInstance} + */ + FChart.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compFChart' ) ){ + _r.push( new FChart( _selector ) ); + }else{ + _selector.find( 'div.js_compFChart' ).each( function(){ + _r.push( new FChart( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( FChart ); + + JC.f.extendObject( FChart.prototype, { + _beforeInit: + function(){ + //JC.log( 'FChart _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + var _data = _p._model.parseInitData(); + + if( _data ){ + _p.trigger( FChart.Model.UPDATE_CHART_DATA, [ _data ] ); + } + _p._model.height() && _p.selector().css( { 'height': _p._model.height() } ); + + if( !_p._model.chartScroll() || _p._model.type().toLowerCase() == 'map' ){ + _p.selector().on( 'mousewheel', function( _evt ){ + var _swf = $( '#' + _p.gid() ); + if( _evt.deltaY && _swf && _swf.prop( 'apiReady' ) && _swf.prop( 'updateMouseWheel' ) ){ + _swf[0].updateMouseWheel( _evt.deltaY ); + } + return false; + }); + } + + }); + + _p.on( FChart.Model.UPDATE_CHART_DATA, function( _evt, _data ){ + _p.trigger( FChart.Model.CLEAR ); + _p._view.update( _data ); + _p._model.chartSize( { width: _p._model.width(), height: _p._model.height() } ); + }); + + _p.on( FChart.Model.CLEAR, function( _evt ){ + _p.trigger( FChart.Model.CLEAR_STATUS ); + _p._view && _p._view.clear(); + //_p._model.clear && _p._model.clear(); + }); + + + _p._model.chartSize( { width: _p._model.width(), height: _p._model.height() } ); + + } + + , _inited: + function(){ + //JC.log( 'FChart _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + /** + * 更新数据 + * @method update + * @param object _data + */ + , update: + function( _data ){ + this.trigger( FChart.Model.UPDATE_CHART_DATA, _data ); + return this; + } + /** + * + */ + , gid: function(){ return this._model.gid(); } + + }); + + FChart.Model._instanceName = 'JCFChart'; + + FChart.Model.INS_COUNT = 1; + FChart.Model.CLEAR = 'clear'; + FChart.Model.CLEAR_STATUS = 'clear_status'; + FChart.Model.UPDATE_CHART_DATA = 'update_data'; + + /** + * flash swf 路径映射 + *
        你还可以使用其他属性进行定义路径映射 + * 1. window.FCHART_SWF_FILE_MAP + * 2. JC.FCHART_SWF_FILE_MAP + * @property Model.SWF_FILE_MAP + * @type {object} + * @default null + * @static + * @example + requirejs( [ 'JC.FChart' ], function( FChart ){ + FChart['Model'].SWF_FILE_MAP = { + 'bar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Histogram.swf' + , 'vbar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VHistogram.swf' + , 'line': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/CurveGram.swf' + , 'stack': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Stack.swf' + , 'mix': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/MixChart.swf' + + , 'column': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/ZHistogram.swf' + , 'hcolumn': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VZHistogram.swf' + }; + }); + */ + FChart.Model.SWF_FILE_MAP = null; + + /** + * flash swf 路径 + *
        {0} = JC.PATH + *
        {1} = chart file name + * @property Model.FLASH_PATH + * @type {string} + * @default {0}/flash/pub/charts/{1}.swf + * @static + */ + FChart.Model.FLASH_PATH = '{0}/swf/{1}.swf?{2}'; + + /** + * flash swf 缓存版本控制 + * @property Model.VERSION + * @type {string} + * @default requirejs.s.contexts._.config.urlArgs || 'v=' + JC.pathPostfix || 'v=fchart' + * @static + */ + FChart.Model.VERSION = 'fchart'; + JC.pathPostfix && ( FChart.Model.VERSION = 'v=' + JC.pathPostfix ); + window.requirejs + && window.requirejs.s + && window.requirejs.s.contexts + && window.requirejs.s.contexts._ + && window.requirejs.s.contexts._.config + && window.requirejs.s.contexts._.config.urlArgs + && ( FChart.Model.VERSION = window.requirejs.s.contexts._.config.urlArgs ); + + /** + * 图表类型映射 + *
        曲线图: line, curvegram + *
        柱状图: bar, histogram + *
        垂直柱状图: var, vhistogram + *
        饼状图: pie, piegraph + *
        圆环图: dount + *
        评分球: rate + * @property Model.TYPE_MAP + * @type {object} + * @static + */ + FChart.Model.TYPE_MAP = { + 'line': 'CurveGram' + , 'curvegram': 'CurveGram' + + , 'bar': 'Histogram' + , 'histogram': 'Histogram' + + , 'vbar': 'VHistogram' + , 'hbar': 'VHistogram' + , 'vhistogram': 'VHistogram' + + , 'column': 'ZHistogram' + , 'zbar': 'ZHistogram' + , 'zhistogram': 'ZHistogram' + + + , 'hcolumn': 'VZHistogram' + + , 'mix': 'MixChart' + + , 'map': 'Map' + + , 'trend': 'Trend' + , 'Trend': 'Trend' + + , 'pie': 'PieGraph' + , 'piegraph': 'PieGraph' + + , 'dount': 'Dount' + + , 'ddount': 'DDount' + , 'ndount': 'NDount' + + , 'stack': 'Stack' + , 'hstack': 'HStack' + + , 'rate': 'Rate' + }; + + + JC.f.extendObject( FChart.Model.prototype, { + init: + function(){ + //JC.log( 'FChart.Model.init:', new Date().getTime() ); + this._gid = 'jchart_gid_' + ( FChart.Model.INS_COUNT++ ); + this.afterInit && this.afterInit(); + } + , chartScroll: + function(){ + var _r = true; + this.is( '[chartScroll]' ) && ( _r = this.boolProp( 'chartScroll' ) ); + return _r; + } + /** + * 解析图表默认数据 + */ + , parseInitData: + function(){ + var _p = this, _data; + if( _p.selector().attr( 'chartScriptData' ) ){ + _data = _p.selectorProp( 'chartScriptData' ).html(); + }else if( _p.selector().is( '[chartDataVar]' ) ){ + _data = _p.windowProp( 'chartDataVar' ); + _data && ( _data = JSON.stringify( _data ) ); + } + + if( _data ){ + _data = _data.replace( /^[\s]*?\/\/[\s\S]*?[\r\n]/gm, '' ); + _data = _data.replace( /[\r\n]/g, '' ); + _data = _data.replace( /\}[\s]*?,[\s]*?\}$/g, '}}'); + _data = eval( '(' + _data + ')' ); + } + + return _data; + } + /** + * 保存图表数据 + */ + , data: + function( _data ){ + typeof _data != 'undefined' && ( this._data = _data ); + return this._data; + } + + , gid: function(){ return this._gid; } + + /** + * 图表宽度 + */ + , width: + function(){ + if( typeof this._width == 'undefined' ){ + this._width = this.selector().prop( 'offsetWidth' ); + this.is( '[chartWidth]' ) && ( this._width = this.intProp( 'chartWidth' ) || this._width ); + } + return this._width + } + /** + * 图表高度 + */ + , height: + function(){ + if( typeof this._height == 'undefined' ){ + this._height = this.selector().prop( 'offsetHeight' ) || 400; + this.is( '[chartHeight]' ) && ( this._height = this.intProp( 'chartHeight' ) || this._height ); + } + return this._height; + } + /** + * 图表宽度 + */ + , sourceWidth: + function(){ + if( typeof this._sourceWidth== 'undefined' ){ + this.is( '[chartWidth]' ) && ( this._sourceWidth = this.intProp( 'chartWidth' ) || this._sourceWidth ); + } + return this._sourceWidth || '100%'; + } + + /** + * 设置或保存图表的宽高 + */ + , chartSize: + function( _setter ){ + typeof _setter != 'undefined' && ( this._chartSize = _setter ); + return this._chartSize; + } + /** + * 图表画布 + */ + , stage: + function(){ + } + /** + * 画布圆角弧度 + */ + , stageCorner: function(){ return 18; } + /** + * 清除图表数据 + */ + , clear: + function(){ + var _p = this, _k; + for( _k in _p ){ + //JC.log( _k, JC.f.ts() ); + if( /^\_/.test( _k ) ){ + if( _k == '_selector' ) continue; + if( _k == '_gid' ) continue; + _p[ _k ] = undefined; + } + } + //JC.log( 'JChart.Base clear', JC.f.ts() ); + _p.afterClear && _p.afterClear(); + } + /** + * 清除图表状态 + */ + , clearStatus: + function(){ + } + + , chartType: + function(){ + var _r = ''; + this.data() + && this.data().chart + && this.data().chart.type + && ( _r = this.data().chart.type ) + return (_r||'').toString().toLowerCase(); + } + , typeMap: function( _type ){ return FChart.Model.TYPE_MAP[ _type ]; } + , type: function(){ return this.typeMap( this.chartType() ) || ''; } + , path: + function(){ + var _path = JC.FCHART_PATH; + if( !_path ){ + if( JC.use ){ + _path = JC.PATH + '/comps/FChart/'; + }else{ + _path = JC.PATH + '/modules/JC.FChart/0.1/'; + } + } + var _p = this + , _r = JC.f.printf( _p.attrProp( 'chartPath' ) || FChart.Model.FLASH_PATH + , _path + , _p.type() + , FChart.Model.VERSION + ); + + _r = this.checkFileMap() || _r; + + + return _r; + } + + , checkFileMap: + function(){ + var _r = ''; + if( window.FCHART_SWF_FILE_MAP ){ + this.chartType() in window.FCHART_SWF_FILE_MAP + && ( _r = window.FCHART_SWF_FILE_MAP[ this.chartType() ] ); + + this.type() in window.FCHART_SWF_FILE_MAP + && ( _r = window.FCHART_SWF_FILE_MAP[ this.type() ] ); + } + + + if( JC.FCHART_SWF_FILE_MAP ){ + this.chartType() in JC.FCHART_SWF_FILE_MAP + && ( _r = JC.FCHART_SWF_FILE_MAP[ this.chartType() ] ); + + this.type() in JC.FCHART_SWF_FILE_MAP + && ( _r = JC.FCHART_SWF_FILE_MAP[ this.type() ] ); + } + + if( FChart.Model.SWF_FILE_MAP ){ + this.chartType() in FChart.Model.SWF_FILE_MAP + && ( _r = FChart.Model.SWF_FILE_MAP[ this.chartType() ] ); + + this.type() in FChart.Model.SWF_FILE_MAP + && ( _r = FChart.Model.SWF_FILE_MAP[ this.type() ] ); + } + + _r && ( _r = JC.f.printf( '{0}?v={1}', _r, FChart.Model.VERSION ) ); + + return _r; + } + }); + + JC.f.extendObject( FChart.View.prototype, { + init: + function(){ + //JC.log( 'FChart.View.init:', new Date().getTime() ); + var _p = this; + } + /** + * 渲染图表外观 + */ + , draw: + function( _data ){ + if( !this._model.type() ) return; + var _p = this + , _path = _p._model.path() + , _fpath = _path.replace( /([^\:]|)[\/]+/g, '$1/' ) + , _element = $( '#' + _p._model.gid() ) + , _dataStr = JSON.stringify( _data ) + ; + + if( !$( '#' + _p._model.gid() ).length ){ + _element = $( JC.f.printf( '', _p._model.gid() ) ); + _element.appendTo( _p.selector() ); + } + + var _flashVar = { 'chart': encodeURIComponent( _dataStr ) } + , _flashParams = { + 'wmode': 'transparent' + , 'allowScriptAccess' : 'always' + } + , _flashAttrs = { 'id': _p._model.gid(), 'name': _p._model.gid() } + ; + + swfobject.embedSWF( + _fpath + , _p._model.gid() + , _p._model.sourceWidth() + , _p._model.height() + , '10' + , '' + , _flashVar + , _flashParams + , _flashAttrs + ); + + } + + /** + * 图表高度 + */ + , width: function(){ return this._model.width(); } + /** + * 图表高度 + */ + , height: function(){ return this._model.height(); } + /** + * 图表画布 + */ + , stage: function(){ return this._model.stage(); } + /** + * 初始化的选择器 + */ + , selector: + function(){ + return this._model.selector(); + } + /** + * 清除图表数据 + */ + , clear: + function(){ + var _p = this; + if( !_p._model._stage ) return; + $( _p._model._stage.canvas ).remove(); + _p._model._stage = undefined; + } + /** + * 清除图表状态 + */ + , clearStatus: + function(){ + } + /** + * 更新图表数据 + */ + , update: + function( _data ){ + var _p = this; + _p.clear(); + _p._model.clear(); + _p._model.data( _data ); + _p.draw( _data ); + } + }); + + _jdoc.ready( function(){ + JC.f.safeTimeout( function(){ + FChart.autoInit && FChart.init(); + }, null, 'winFCHARTInit', 1 ); + }); + + return JC.FChart; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); + diff --git a/comps/FChart/_demo/bar/demo.Histogram.double.line.html b/comps/FChart/_demo/bar/demo.Histogram.double.line.html new file mode 100755 index 000000000..6b20b2b28 --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.double.line.html @@ -0,0 +1,128 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.Histogram.double.line.percent.html b/comps/FChart/_demo/bar/demo.Histogram.double.line.percent.html new file mode 100755 index 000000000..63a74a81c --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.double.line.percent.html @@ -0,0 +1,128 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.Histogram.html b/comps/FChart/_demo/bar/demo.Histogram.html new file mode 100755 index 000000000..ac1d68d2e --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.html @@ -0,0 +1,98 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.Histogram.itemBg.html b/comps/FChart/_demo/bar/demo.Histogram.itemBg.html new file mode 100755 index 000000000..ca09c00bb --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.itemBg.html @@ -0,0 +1,119 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.Histogram.no_rate.html b/comps/FChart/_demo/bar/demo.Histogram.no_rate.html new file mode 100755 index 000000000..9cb929ba3 --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.no_rate.html @@ -0,0 +1,98 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.Histogram.no_vline.html b/comps/FChart/_demo/bar/demo.Histogram.no_vline.html new file mode 100755 index 000000000..6c92a976d --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.no_vline.html @@ -0,0 +1,103 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/bar/demo.Histogram.no_vline_hline.html b/comps/FChart/_demo/bar/demo.Histogram.no_vline_hline.html new file mode 100755 index 000000000..64253816e --- /dev/null +++ b/comps/FChart/_demo/bar/demo.Histogram.no_vline_hline.html @@ -0,0 +1,90 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/bar/demo.chartDataVar.html b/comps/FChart/_demo/bar/demo.chartDataVar.html new file mode 100755 index 000000000..4e76fc335 --- /dev/null +++ b/comps/FChart/_demo/bar/demo.chartDataVar.html @@ -0,0 +1,83 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.custom.tooltip.html b/comps/FChart/_demo/bar/demo.custom.tooltip.html new file mode 100755 index 000000000..d2b55872a --- /dev/null +++ b/comps/FChart/_demo/bar/demo.custom.tooltip.html @@ -0,0 +1,144 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        + +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.dataLabel.html b/comps/FChart/_demo/bar/demo.dataLabel.html new file mode 100755 index 000000000..63448e54e --- /dev/null +++ b/comps/FChart/_demo/bar/demo.dataLabel.html @@ -0,0 +1,143 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/demo.html b/comps/FChart/_demo/bar/demo.html new file mode 100755 index 000000000..45fe2491f --- /dev/null +++ b/comps/FChart/_demo/bar/demo.html @@ -0,0 +1,310 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/bar/index.php b/comps/FChart/_demo/bar/index.php new file mode 100755 index 000000000..f3882b656 --- /dev/null +++ b/comps/FChart/_demo/bar/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/_demo/index.php b/comps/FChart/_demo/index.php new file mode 100755 index 000000000..5829e184f --- /dev/null +++ b/comps/FChart/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/_demo/line/demo.CurveGram.double.line.html b/comps/FChart/_demo/line/demo.CurveGram.double.line.html new file mode 100755 index 000000000..f16b8dcf6 --- /dev/null +++ b/comps/FChart/_demo/line/demo.CurveGram.double.line.html @@ -0,0 +1,114 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/line/demo.CurveGram.html b/comps/FChart/_demo/line/demo.CurveGram.html new file mode 100755 index 000000000..4bb8467fc --- /dev/null +++ b/comps/FChart/_demo/line/demo.CurveGram.html @@ -0,0 +1,96 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/line/demo.CurveGram.no_rate.html b/comps/FChart/_demo/line/demo.CurveGram.no_rate.html new file mode 100755 index 000000000..8cf30f987 --- /dev/null +++ b/comps/FChart/_demo/line/demo.CurveGram.no_rate.html @@ -0,0 +1,98 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/line/demo.CurveGram.no_vline.html b/comps/FChart/_demo/line/demo.CurveGram.no_vline.html new file mode 100755 index 000000000..abe65d374 --- /dev/null +++ b/comps/FChart/_demo/line/demo.CurveGram.no_vline.html @@ -0,0 +1,103 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/line/demo.CurveGram.no_vline_hline.html b/comps/FChart/_demo/line/demo.CurveGram.no_vline_hline.html new file mode 100755 index 000000000..3f9bd0ec3 --- /dev/null +++ b/comps/FChart/_demo/line/demo.CurveGram.no_vline_hline.html @@ -0,0 +1,91 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/line/demo.CurveGram.pv_uv..html b/comps/FChart/_demo/line/demo.CurveGram.pv_uv..html new file mode 100755 index 000000000..bda1fddc7 --- /dev/null +++ b/comps/FChart/_demo/line/demo.CurveGram.pv_uv..html @@ -0,0 +1,118 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/line/demo.chartDataVar.html b/comps/FChart/_demo/line/demo.chartDataVar.html new file mode 100755 index 000000000..af78302c7 --- /dev/null +++ b/comps/FChart/_demo/line/demo.chartDataVar.html @@ -0,0 +1,83 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/line/demo.custom.tooltip.html b/comps/FChart/_demo/line/demo.custom.tooltip.html new file mode 100755 index 000000000..732db6965 --- /dev/null +++ b/comps/FChart/_demo/line/demo.custom.tooltip.html @@ -0,0 +1,141 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        + +
        + + + + diff --git a/comps/FChart/_demo/line/demo.dataLabel.html b/comps/FChart/_demo/line/demo.dataLabel.html new file mode 100755 index 000000000..2e79e5beb --- /dev/null +++ b/comps/FChart/_demo/line/demo.dataLabel.html @@ -0,0 +1,142 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/line/demo.html b/comps/FChart/_demo/line/demo.html new file mode 100755 index 000000000..f6662e71c --- /dev/null +++ b/comps/FChart/_demo/line/demo.html @@ -0,0 +1,311 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - line chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/line/index.php b/comps/FChart/_demo/line/index.php new file mode 100755 index 000000000..f3882b656 --- /dev/null +++ b/comps/FChart/_demo/line/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/_demo/map/demo.ChinaMap.html b/comps/FChart/_demo/map/demo.ChinaMap.html new file mode 100755 index 000000000..cd4f6e971 --- /dev/null +++ b/comps/FChart/_demo/map/demo.ChinaMap.html @@ -0,0 +1,239 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + + +
        +
        +
        +
        + +
        +
        +
        +
        + + + + + diff --git a/comps/FChart/_demo/map/demo.WorldMap.html b/comps/FChart/_demo/map/demo.WorldMap.html new file mode 100755 index 000000000..48d1dc4b9 --- /dev/null +++ b/comps/FChart/_demo/map/demo.WorldMap.html @@ -0,0 +1,94 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/map/demo.callback.ChinaMap.html b/comps/FChart/_demo/map/demo.callback.ChinaMap.html new file mode 100755 index 000000000..5e47085ba --- /dev/null +++ b/comps/FChart/_demo/map/demo.callback.ChinaMap.html @@ -0,0 +1,248 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + + + + + diff --git a/comps/FChart/_demo/map/demo.callback.WorldMap.html b/comps/FChart/_demo/map/demo.callback.WorldMap.html new file mode 100755 index 000000000..9b5793a82 --- /dev/null +++ b/comps/FChart/_demo/map/demo.callback.WorldMap.html @@ -0,0 +1,111 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + + + + + diff --git a/comps/FChart/_demo/map/demo.no_title_and_change_color.html b/comps/FChart/_demo/map/demo.no_title_and_change_color.html new file mode 100755 index 000000000..f7acce522 --- /dev/null +++ b/comps/FChart/_demo/map/demo.no_title_and_change_color.html @@ -0,0 +1,231 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + + + + + diff --git a/comps/FChart/_demo/map/demo.scroll.html b/comps/FChart/_demo/map/demo.scroll.html new file mode 100755 index 000000000..48d1dc4b9 --- /dev/null +++ b/comps/FChart/_demo/map/demo.scroll.html @@ -0,0 +1,94 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/map/demo.tips.html b/comps/FChart/_demo/map/demo.tips.html new file mode 100755 index 000000000..b84d2be9e --- /dev/null +++ b/comps/FChart/_demo/map/demo.tips.html @@ -0,0 +1,498 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - map chart 示例

        + +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + + + + + diff --git a/comps/FChart/_demo/map/index.php b/comps/FChart/_demo/map/index.php new file mode 100755 index 000000000..f3882b656 --- /dev/null +++ b/comps/FChart/_demo/map/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/_demo/pie/demo.chartDataVar.html b/comps/FChart/_demo/pie/demo.chartDataVar.html new file mode 100755 index 000000000..b05852cb0 --- /dev/null +++ b/comps/FChart/_demo/pie/demo.chartDataVar.html @@ -0,0 +1,77 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - pie chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/pie/demo.html b/comps/FChart/_demo/pie/demo.html new file mode 100755 index 000000000..08fae921a --- /dev/null +++ b/comps/FChart/_demo/pie/demo.html @@ -0,0 +1,287 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - pie chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        + + + + diff --git a/comps/FChart/_demo/pie/index.php b/comps/FChart/_demo/pie/index.php new file mode 100755 index 000000000..f3882b656 --- /dev/null +++ b/comps/FChart/_demo/pie/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.double.line.html b/comps/FChart/_demo/vbar/demo.VHistogram.double.line.html new file mode 100755 index 000000000..951d08aff --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.double.line.html @@ -0,0 +1,128 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.double.line.percent.html b/comps/FChart/_demo/vbar/demo.VHistogram.double.line.percent.html new file mode 100755 index 000000000..c25281b16 --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.double.line.percent.html @@ -0,0 +1,128 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.html b/comps/FChart/_demo/vbar/demo.VHistogram.html new file mode 100755 index 000000000..931d5b13a --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.html @@ -0,0 +1,98 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.itemBg.html b/comps/FChart/_demo/vbar/demo.VHistogram.itemBg.html new file mode 100755 index 000000000..68878ba8c --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.itemBg.html @@ -0,0 +1,119 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.no_rate.html b/comps/FChart/_demo/vbar/demo.VHistogram.no_rate.html new file mode 100755 index 000000000..8fd94b7f3 --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.no_rate.html @@ -0,0 +1,98 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.no_vline.html b/comps/FChart/_demo/vbar/demo.VHistogram.no_vline.html new file mode 100755 index 000000000..6feaaf918 --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.no_vline.html @@ -0,0 +1,103 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/vbar/demo.VHistogram.no_vline_hline.html b/comps/FChart/_demo/vbar/demo.VHistogram.no_vline_hline.html new file mode 100755 index 000000000..4233c06a1 --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.VHistogram.no_vline_hline.html @@ -0,0 +1,90 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/comps/FChart/_demo/vbar/demo.chartDataVar.html b/comps/FChart/_demo/vbar/demo.chartDataVar.html new file mode 100755 index 000000000..d99740baa --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.chartDataVar.html @@ -0,0 +1,83 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/demo.html b/comps/FChart/_demo/vbar/demo.html new file mode 100755 index 000000000..309ce26ee --- /dev/null +++ b/comps/FChart/_demo/vbar/demo.html @@ -0,0 +1,310 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FChart - bar chart 示例

        + +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + + + + diff --git a/comps/FChart/_demo/vbar/index.php b/comps/FChart/_demo/vbar/index.php new file mode 100755 index 000000000..f3882b656 --- /dev/null +++ b/comps/FChart/_demo/vbar/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FChart/res/default/default_color.html b/comps/FChart/res/default/default_color.html new file mode 100755 index 000000000..152ee5955 --- /dev/null +++ b/comps/FChart/res/default/default_color.html @@ -0,0 +1,59 @@ + + + + +suches template + + +

        default

        +
          +
        1.           
        2. +
        3.           
        4. +
        5.           
        6. +
        7.           
        8. +
        9.           
        10. +
        11.           
        12. +
        13.           
        14. +
        15.           
        16. +
        17.           
        18. +
        19.           
        20. +
        + +

        mix

        +
          +
        1.           
        2. +
        3.           
        4. +
        5.           
        6. +
        7.           
        8. +
        9.           
        10. +
        11.           
        12. +
        13.           
        14. +
        15.           
        16. +
        17.           
        18. +
        19.           
        20. +
        21.           
        22. +
        + +

        ext

        +
          +
        1.           
        2. +
        3.           
        4. +
        5.           
        6. + +
        7.           
        8. +
        9.           
        10. + +
        11.           
        12. +
        13.           
        14. + +
        15.           
        16. +
        17.           
        18. +
        19.           
        20. + +
        21.           
        22. + +
        + + + + diff --git a/comps/FChart/res/default/style.css b/comps/FChart/res/default/style.css new file mode 100755 index 000000000..064136668 --- /dev/null +++ b/comps/FChart/res/default/style.css @@ -0,0 +1,30 @@ +.js_jchart { + position: relative; +} + +.js_jchart svg { + position: absolute; + top: 0; + left: 0; +} + +.js_jchart .jcc_pointer { + cursor: pointer!important; +} + +.js_jchart .jcc_title { + font-weight: bold!important; + font-size: 14px!important; +} + +.js_jchart .jcc_subtitle { + font-size: 12px!important; +} + +.js_jchart .jcc_vtitle { + font-size: 14px!important; +} + +.js_jchart .jcc_credit { + color: #909090!important; +} diff --git a/comps/FChart/swf/CurveGram.swf b/comps/FChart/swf/CurveGram.swf new file mode 100755 index 000000000..f2ec6e46a Binary files /dev/null and b/comps/FChart/swf/CurveGram.swf differ diff --git a/comps/FChart/swf/DDount.swf b/comps/FChart/swf/DDount.swf new file mode 100755 index 000000000..8d9a500f8 Binary files /dev/null and b/comps/FChart/swf/DDount.swf differ diff --git a/comps/FChart/swf/Dount.swf b/comps/FChart/swf/Dount.swf new file mode 100755 index 000000000..e9bcf8b86 Binary files /dev/null and b/comps/FChart/swf/Dount.swf differ diff --git a/comps/FChart/swf/HStack.swf b/comps/FChart/swf/HStack.swf new file mode 100755 index 000000000..682ccc326 Binary files /dev/null and b/comps/FChart/swf/HStack.swf differ diff --git a/comps/FChart/swf/Histogram.swf b/comps/FChart/swf/Histogram.swf new file mode 100755 index 000000000..2a8f0c8de Binary files /dev/null and b/comps/FChart/swf/Histogram.swf differ diff --git a/comps/FChart/swf/Map.swf b/comps/FChart/swf/Map.swf new file mode 100755 index 000000000..b96986ac4 Binary files /dev/null and b/comps/FChart/swf/Map.swf differ diff --git a/comps/FChart/swf/MixChart.swf b/comps/FChart/swf/MixChart.swf new file mode 100755 index 000000000..a6255fa76 Binary files /dev/null and b/comps/FChart/swf/MixChart.swf differ diff --git a/comps/FChart/swf/NDount.swf b/comps/FChart/swf/NDount.swf new file mode 100755 index 000000000..344e86486 Binary files /dev/null and b/comps/FChart/swf/NDount.swf differ diff --git a/comps/FChart/swf/PieGraph.swf b/comps/FChart/swf/PieGraph.swf new file mode 100755 index 000000000..0aa3c5a1f Binary files /dev/null and b/comps/FChart/swf/PieGraph.swf differ diff --git a/comps/FChart/swf/Rate.swf b/comps/FChart/swf/Rate.swf new file mode 100755 index 000000000..6043c96ab Binary files /dev/null and b/comps/FChart/swf/Rate.swf differ diff --git a/comps/FChart/swf/Stack.swf b/comps/FChart/swf/Stack.swf new file mode 100755 index 000000000..35d92a533 Binary files /dev/null and b/comps/FChart/swf/Stack.swf differ diff --git a/comps/FChart/swf/Trend.swf b/comps/FChart/swf/Trend.swf new file mode 100755 index 000000000..a20cd8ef2 Binary files /dev/null and b/comps/FChart/swf/Trend.swf differ diff --git a/comps/FChart/swf/VHistogram.swf b/comps/FChart/swf/VHistogram.swf new file mode 100755 index 000000000..818ba6952 Binary files /dev/null and b/comps/FChart/swf/VHistogram.swf differ diff --git a/comps/FChart/swf/VZHistogram.swf b/comps/FChart/swf/VZHistogram.swf new file mode 100755 index 000000000..76b44084b Binary files /dev/null and b/comps/FChart/swf/VZHistogram.swf differ diff --git a/comps/FChart/swf/ZHistogram.swf b/comps/FChart/swf/ZHistogram.swf new file mode 100755 index 000000000..1a9fa3743 Binary files /dev/null and b/comps/FChart/swf/ZHistogram.swf differ diff --git a/comps/FChart/swf/expressInstall.swf b/comps/FChart/swf/expressInstall.swf new file mode 100755 index 000000000..0fbf8fca9 Binary files /dev/null and b/comps/FChart/swf/expressInstall.swf differ diff --git a/comps/Fixed/Fixed.js b/comps/Fixed/Fixed.js old mode 100644 new mode 100755 index ea306d93b..b9f5effa0 --- a/comps/Fixed/Fixed.js +++ b/comps/Fixed/Fixed.js @@ -1,14 +1,14 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ //TODO: 添加回调处理 //TODO: 添加值运动 //TODO: 完善注释 -;(function($){ window.Fixed = JC.Fixed = Fixed; /** * 内容固定于屏幕某个位置显示 - *
        - *
        require: jQuery
        - *
        require: $.support.isFixed
        - *
        + *

        require: + * jQuery + * , JC.common + *

        *

        JC Project Site * | API docs * | demo link

        @@ -39,7 +39,7 @@ }); $([ this._view, this._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ); _data.shift(); _data.shift(); + var _data = JC.f.sliceArgs( arguments ); _data.shift(); _data.shift(); _p.trigger( _evtName, _data ); }); @@ -116,7 +116,7 @@ * @default 300 * @static */ - Fixed.durationms = 300; + Fixed.durationms = 200; /** * 每次滚动的时间间隔( 时间运动 ) * @property stepms @@ -160,6 +160,11 @@ , fixedbottom: function(){ return parseInt( this._layout.attr('fixedbottom'), 10 ); } , fixedleft: function(){ return parseInt( this._layout.attr('fixedleft'), 10 ); } + , fixedAutoHide: + function(){ + return JC.f.parseBool( this._layout.attr( 'fixedAutoHide' ) ); + } + , fixedcenter: function(){ var _r = (this._layout.attr('fixedcenter') || '').replace(/[^\d.,\-]/g, '').split(','); @@ -224,8 +229,8 @@ , fixedeffect: function( _item ){ var _r = true, _p = this; - _p.layout().is('[fixedeffect]') && ( _r = parseBool( _p.layout().attr( 'fixedeffect' ) ) ); - _item && _item.is('[fixedeffect]') && ( _r = parseBool( _item.attr( 'fixedeffect' ) ) ); + _p.layout().is('[fixedeffect]') && ( _r = JC.f.parseBool( _p.layout().attr( 'fixedeffect' ) ) ); + _item && _item.is('[fixedeffect]') && ( _r = JC.f.parseBool( _item.attr( 'fixedeffect' ) ) ); return _r; } }; @@ -243,7 +248,31 @@ : this._initFixedUnsupport(); this._initMoveTo(); - this._model.layout().show(); + + $( _p ).on( 'hide_layout', function(){ + _p._model.layout().hide(); + }); + + $( _p ).on( 'show_layout', function(){ + _p._model.layout().show(); + }); + + + if( _p._model.fixedAutoHide() ){ + if( JDOC.scrollTop() <= 20 ){ + $( _p ).trigger( 'hide_layout' ); + } + + JDOC.on( 'scroll', function(){ + if( JDOC.scrollTop() <= 20 ){ + $( _p ).trigger( 'hide_layout' ); + }else{ + $( _p ).trigger( 'show_layout' ); + } + }); + }else{ + $( _p ).trigger( 'show_layout' ); + } return this; } @@ -263,7 +292,7 @@ Fixed.interval(); }); - mousewheelEvent( function mousewheel( _evt ){ Fixed.interval(); }); + JC.f.mousewheelEvent( function mousewheel( _evt ){ Fixed.interval(); }); } , _processMoveto: @@ -327,7 +356,7 @@ */ Fixed.interval( - easyEffect( + JC.f.easyEffect( function( _cur, _done ){ _isUp && ( _cur = _endVal - _cur + _beginVal ); //console.log( 'Fixed scrollTo:', _cur, _tmpCount++ ); @@ -435,6 +464,39 @@ } }; + /** + * 判断是否支持 CSS position: fixed + * @property $.support.isFixed + * @type bool + * @require jquery + * @static + */ + window.jQuery && jQuery.support && (jQuery.support.isFixed = (function ($){ + try{ + var r, contain = $( document.documentElement ), + el = $( "
        x
        " ).appendTo( contain ), + originalHeight = contain[ 0 ].style.height, + w = window, jw = $( w ), + sleft = jw.scrollLeft(), stop = jw.scrollTop() + ; + + contain.height( screen.height * 2 + "px" ); + + w.scrollTo( 0, 100 ); + + r = el[ 0 ].getBoundingClientRect().top === 100; + + contain.height( originalHeight ); + + el.remove(); + + //w.scrollTo( 0, 0); + w.scrollTo( sleft, stop ); + + return r; + }catch(ex){ alert( ex.message ); } + })(jQuery)); + $(document).ready( function(){ if( !Fixed.autoInit ) return; $([ @@ -443,7 +505,17 @@ , 'ul.js_autoFixed' , 'ol.js_autoFixed' , 'button.js_autoFixed' + , 'a.js_autoFixed' ].join() ).each( function(){ new Fixed( $(this) ); }); }); -}(jQuery)); + return JC.Fixed; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Fixed/_demo/index.php b/comps/Fixed/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/Fixed/_demo/simple_demo.html b/comps/Fixed/_demo/simple_demo.html old mode 100644 new mode 100755 index 1312bb9e0..b65f7d9f7 --- a/comps/Fixed/_demo/simple_demo.html +++ b/comps/Fixed/_demo/simple_demo.html @@ -82,6 +82,8 @@ fixedright="60" fixedbottom="40" fixedmoveto="0" + fixedAutoHide="true" + fixeddurationms="100" >
        diff --git a/comps/Fixed/index.php b/comps/Fixed/index.php old mode 100644 new mode 100755 diff --git a/comps/Fixed/res/default/images/top.gif b/comps/Fixed/res/default/images/top.gif old mode 100644 new mode 100755 diff --git a/comps/Fixed/res/default/style.css b/comps/Fixed/res/default/style.css old mode 100644 new mode 100755 diff --git a/comps/Fixed/res/default/style.html b/comps/Fixed/res/default/style.html old mode 100644 new mode 100755 diff --git a/comps/FlowChart/FlowChart.js b/comps/FlowChart/FlowChart.js new file mode 100755 index 000000000..60902c3ef --- /dev/null +++ b/comps/FlowChart/FlowChart.js @@ -0,0 +1,1283 @@ +/** + * 支持 多对多 关系( 目前只支持 一对多 和 多对一 ) + */ + ;(function(define, _win) { 'use strict'; define( [ 'Raphael', 'JC.BaseMVC', 'JC.PopTips' ], function(){ +/** + *
        + *
        JC 流程图
        + *
        一对多关系
        + *
        多对一关系
        + *
        多对多关系
        + *
        + *

        require: + * RaphaelJS + * , JC.BaseMVC + * , JC.PopTips + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 div class="js_compFlowChart"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        data-FlowChart = script json data
        + *
        流程图数据 + *
        + *
        数据说明
        + *
        数据按节点关系分为两大类: 一对多, 多对一
        + *
        + *
        + *
        一对多数据
        + *
        一对多数据存放于字段: nodes, nodes 数据类型为数组
        + *
        nodes 字段位于数据节点里
        + *
        + *
        + *
        多对一数据
        + *
        多对一数据存放于字段: targetNodes, targetNodes 数据类型为对象
        + *
        targetNodes 字段为全局节点
        + *
        + *
        + *
        + *
        + *
        数据字段说明
        + *
        + *

        图表数据 - chart 字段

        + *
        + *
        name = string
        + *
        节点名
        + * + *
        id = string
        + *
        节点唯一标识符
        + * + *
        nodes = array
        + *
        一对多数据的子节点, 该字段位于父节点里面
        + * + *
        targetNodes = object
        + *
        多对一数据的子节点, 该字段为全局字段, 节点位置 chart.targetNodes
        + * + *
        status = string, default = 0
        + *
        + * 节点状态 + *
        根据 status 显示为不同的样式 + *
        默认有0 ~ 10, 共11 种状态 + *
        由status 产生的 css class: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status ) + *
        + * + *
        tipsHtml = string
        + *
        鼠标划过节点时, 显示的tips内容, 支持html内容
        + *
        + *

        线条与图标颜色 - colors 字段

        + *
        + *
        line = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2 }
        + *
        背景线颜色
        + * + *
        icon = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2, 'fill': '#F2F2F2' }
        + *
        图标颜色
        + * + *
        如果要自定义节点颜色 或者 tips 颜色, 请使用 css 定义: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status )
        + *
        + *
        + *
        + *
        + *
        + * + * @namespace JC + * @class FlowChart + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-09-03 + * @author qiushaowei | 75 Team + * @example +
        +    <div class="js_compFlowChart" data-FlowChart="|script">
        +        <script type="text/template">
        +            {
        +                chart: {
        +                    name: '提交'
        +                    , id: 1
        +                    , nodes: [
        +                            {
        +                                name: '资质审核'
        +                                , id: 2
        +                                , status: 1
        +                                , tipsHtml: 'username 1'
        +                                , nodes: [
        +                                    {
        +                                        name: '服务审核'
        +                                        , id: 3
        +                                        , targetNode: 5
        +                                        , status: 2
        +                                        , tipsHtml: 'username 2'
        +                                    }
        +                                    , {
        +                                        name: '渠道管理层'
        +                                        , id: 4
        +                                        , status: 3
        +                                        , tipsHtml: 'username 3'
        +                                    }
        +                                ]
        +                            }
        +                            , {
        +                                name: '资质审核1'
        +                                , id: 6
        +                                , status: 4
        +                                , tipsHtml: 'username 4'
        +                                , nodes: [
        +                                    {
        +                                        name: '服务审核1'
        +                                        , id: 7
        +                                        , targetNode: 9
        +                                        , status: 5
        +                                        , tipsHtml: 'username 5'
        +                                    }
        +                                    , {
        +                                        name: '渠道管理层1'
        +                                        , id: 8
        +                                        , targetNode: 9
        +                                        , status: 6
        +                                        , tipsHtml: 'username 6'
        +                                    }
        +                                ]
        +                            }
        +                            , {
        +                                name: '资质审核2'
        +                                , id: 10
        +                                , status: 7
        +                                , tipsHtml: 'username 7'
        +                                , nodes: [
        +                                    {
        +                                        name: '服务审核2'
        +                                        , id: 11
        +                                        , status: 8
        +                                        , tipsHtml: 'username 8'
        +                                        , nodes: [
        +                                            {
        +                                                name: '管理层2'
        +                                                , id: 12
        +                                                , targetNode: 5
        +                                                , status: 9
        +                                                , tipsHtml: 'username 9'
        +                                            }
        +                                        ]
        +                                    }
        +                                ]
        +                            }
        +                            , {
        +                                name: '资质审核3'
        +                                , id: 15
        +                                , status: 10
        +                                , tipsHtml: 'username 10'
        +                            }
        +                    ]
        +                    , targetNodes: {
        +                        '5': {
        +                            name: '管理层'
        +                        }
        +                        , '9': {
        +                            name: '管理层1'
        +                            , targetNode: 5
        +                        }
        +                    }
        +                }
        +            }
        +        </script>
        +    </div>
        +
        + + */ + var _jdoc = $( document ), _jwin = $( window ); + var isIE = !!window.ActiveXObject; + + JC.FlowChart = FlowChart; + + if( JC.use ){ + !window.Raphael && ( JC.use( 'plugins.raphael' ) ); + !JC.PopTips && ( JC.use( 'JC.PopTips' ) ); + } + + function FlowChart( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, FlowChart ) ) + return JC.BaseMVC.getInstance( _selector, FlowChart ); + + JC.BaseMVC.getInstance( _selector, FlowChart, this ); + + this._model = new FlowChart.Model( _selector ); + this._view = new FlowChart.View( this._model ); + + this._init(); + + //JC.log( FlowChart.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 FlowChart 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of FlowChartInstance} + */ + FlowChart.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compFlowChart' ) ){ + _r.push( new FlowChart( _selector ) ); + }else{ + _selector.find( 'div.js_compFlowChart' ).each( function(){ + _r.push( new FlowChart( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( FlowChart ); + + JC.f.extendObject( FlowChart.prototype, { + _beforeInit: + function(){ + //JC.log( 'FlowChart _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + + if( !_p._model.chartData() ) return; + _p._view.draw(); + + _p.notification( JC.FlowChart.Model.INITED, [ _p, _p._model.data() ] ); + }); + + //JC.dir( _p._model.chartData() ); + } + + , _inited: + function(){ + //JC.log( 'FlowChart _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + FlowChart.Model._instanceName = 'JCFlowChart'; + + /** + * 初始化后 selector 触发的事件 + * @event cfc_inited + * @example +
        +$( document ).delegate( 
        +    'div.js_compFlowChart'
        +    , JC.FlowChart.Model.INITED
        +    , function( _evt, _ins, _chartData ){
        +        JC.log( 'js_compFlowChart inited' );
        +    }
        +);
        +
        + */ + FlowChart.Model.INITED = 'cfc_inited' + /** + * dom 节点初始化后 触发的事件 + * @event cfc_nodeInited + * @example +
        +$( document ).delegate( 
        +    'div.js_compFlowChart'
        +    , JC.FlowChart.Model.ITEM_INITED
        +    , function( _evt, _domNode, _itemData, _listData, _chartData ){
        +        JC.log( _domNode.prop( 'nodeName' ) );
        +    }
        +);
        +
        + */ + FlowChart.Model.ITEM_INITED = 'cfc_nodeInited' + /** + * dom节点初始化前的事件 + *
        节点如果有特殊显示需求的话, 可以从这个事件进行相关操作 + * @event cfc_beforeInitItem + * @example +
        +$( document ).delegate( 
        +    'div.js_compFlowChart'
        +    , JC.FlowChart.Model.BEFORE_INIT_ITEM
        +    , function( _evt, _itemData, _listData, _chartData ){
        +        if( _itemData.tipsHtml ){
        +            _itemData.tipsHtml += '   test';
        +        }
        +        _itemData.name = JC.f.printf( '~{0}~', _itemData.name );
        +    }
        +);
        +
        + */ + FlowChart.Model.BEFORE_INIT_ITEM = 'cfc_beforeInitItem' + + JC.f.extendObject( FlowChart.Model.prototype, { + init: + function(){ + //JC.log( 'FlowChart.Model.init:', new Date().getTime() ); + } + + , data: + function(){ + if( typeof this._data == 'undefined' && this.is( '[data-FlowChart]' ) ){ + //JC.log( this.scriptTplProp( 'data-FlowChart' ) ); + this._data = eval( '(' + this.scriptTplProp( 'data-FlowChart' ) + ')' ); + } + return this._data; + } + + , chartData: + function(){ + return this.data().chart; + } + + , colorsData: + function(){ + return this.data().colors; + } + + , initGrid: + function(){ + var _p = this; + _p._grid = { + data: [] + , idColumnIndex: {} + , idColumnIndexList: [] + , row: {} + , idMap: {} + , columnIndexMap: {} + , maxColumn: 0 + , rowIndexPad: 0 + , offsetRowIndex: 10000 + }; + + _p.initIdColumnIndex( _p.chartData(), _p.chartData().id, 0, 0, 0 ); + _p.initColumnIndexMap(); + + _p.initColumnRelationship(); + _p.fixLastColumn(); + _p.initColumnRelationship(); + + _p.initRowIndex(); + + _p.fixNodesRowIndex(); + _p.fixTargetNodesRowIndex(); + /* + */ + _p.fixRealRowIndex(); + _p.fixFirstLastRowIndex(); + + _p.createItems(); + _p.calcRealPosition(); + + //JC.dir( _p.gridIdColumnIndex() ); + JC.dir( _p.gridIdColumnIndexMap() ); + //JC.log( _p.gridMaxColumn() ); + } + + , fixLastColumn: + function(){ + var _p = this + , _max = _p.gridMaxColumn() + , _list + ; + if( _max < 1 ) return; + _list = _p.gridIdColumnIndexMap()[ _max ]; + if( _list.length < 2 ) return; + for( var i = _list.length - 1; i >= 0; i-- ){ + var _item = _list[i]; + if( !( _item.nodes && _item.nodes.length ) && ( _item.pid && _item.pid.length > 1 ) ){ + _list.splice( i, 1 ); + _item.columnIndex = _max + 1; + _p.gridMaxColumn( _item.columnIndex ); + _p.gridIdColumnIndexMap()[ _p.gridMaxColumn() ] = [ _item ]; + break; + } + } + } + + , grid: function(){ return this._grid; } + + , gridIdColumnIndex: function(){ return this.grid().idColumnIndex; } + , gridIdColumnIndexList: function(){ return this.grid().idColumnIndexList; } + , gridIdColumnIndexMap: function(){ return this.grid().columnIndexMap; } + , gridRow: function(){ return this.grid().row; } + , gridIdMap: + function( _id ){ + if( typeof _id != 'undefined' ){ + return this.grid().idMap[ _id ]; + } + return this.grid().idMap; + } + , gridOffsetRowIndex: function(){ return this.grid().offsetRowIndex; } + , gridHeight: function(){ return 40; } + , gridWidth: function(){ return 120; } + , lineWidth: function(){ return 75; } + , childLineWidth: function(){ return 40; } + , parentLineWidth: function(){ return 25; } + + , itemHtmlPattern: + function( _item ){ + var _r = '{0}'; + ( 'tipsHtml' in _item ) + && _item.tipsHtml + && ( _r = this.tipsTpl() ); + return _r; + } + + , tipsTpl: + function(){ + + if( !this._tipsTpl ){ + this._tipsTpl = FlowChart.TIPS_TPL; + this._tipsTpl = this.scriptTplProp( 'cfcTipsTpl' ) || this._tipsTpl; + } + + return this._tipsTpl; + } + + , createItems: + function(){ + var _p = this, _sx = 0, _sy = 0; + _p._items = {}; + _p._columnWidth = []; + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ] + , _maxWidth = _p.gridWidth() + ; + $.each( _rowList, function( _k, _item ){ + var _html, _itemHtmlPatter + ; + + _p.notification( JC.FlowChart.Model.BEFORE_INIT_ITEM, [ _item, _rowList, _p.data() ] ); + + _html = JC.f.printf( + '
        {0}
        ' + , _item.name + , _p.getStatus( _item ) + ); + + _itemHtmlPatter = JC.f.printf( _p.itemHtmlPattern( _item ), _html, _item.tipsHtml, _p.getStatus( _item ) ); + + var _node = $( _itemHtmlPatter ) + , _tmpWidth + ; + _node.addClass( JC.f.printf( 'js_cfcItem js_cfcItemStatus_{0}', _p.getStatus( _item ) ) ); + _node.css( { 'position': 'absolute' } ); + _node.appendTo( _p.box() ); + _node.data( 'nodeData', _item ); + _p._items[ _item.id ] = _node; + _tmpWidth = _node.width(); + _tmpWidth > _maxWidth && ( _maxWidth = _tmpWidth ); + }); + if( i === 0 ){ + _maxWidth = Math.ceil( _p._items[ _p.chartData().id ].width() + 30 ); + } + _p._columnWidth.push( _maxWidth ); + } + } + + , getStatus: + function( _itemData ){ + var _r = 0; + ( 'status' in _itemData ) && ( _r = _itemData.status ); + return _r; + } + + , calcRealPosition: + function(){ + var _p = this, _sx = 0, _sy = 0, _countX = 0; + _p._columnX = []; + _p._minX = _sx; + _p._maxX = 0; + _p._minY = 0; + _p._maxY = 0; + + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ] + ; + + $.each( _rowList, function( _k, _item ){ + var _x = _sx, _y = _sy + ; + _x += _countX; + _y += _item.rowIndex * _p.gridHeight(); + + _y < _p._minY && ( _p._minY = _y ); + ( _y + _p.gridHeight() / 2 ) > _p._maxY && ( _p._maxY = ( _y + _p.gridHeight() / 2 ) ); + + _item.x = _x; + _item.y = _y; + //JC.log( i, _item.name, _x, _y, _item.rowIndex ); + }); + + _p._maxX = _sx + _countX + _p.columnWidth( i ); + + _p._columnX.push( _sx + _countX ); + _countX += Math.max( _p.gridWidth(), _p.columnWidth( i ) ) + _p.lineWidth(); + if( _p.listHasChildline( _rowList ) ){ + _countX += _p.childLineWidth(); + } + + if( _p.listHasParentline( _rowList ) ){ + _countX += _p.parentLineWidth(); + } + } + + //JC.log( _p._minX, _p._maxX, _p._minY, _p._maxY ); + //JC.log( _p._minY, _p._maxY ) + + } + + , minX: function(){ return this._minX; } + , minY: function(){ return this._minY; } + , maxX: function(){ return this._maxX; } + , maxY: function(){ return this._maxY; } + + , items: function(){ return this._items; } + , item: + function( _id ){ + return this._items[ _id ]; + } + , columnWidth: + function( _ix ){ + if( typeof _ix != undefined ){ + return this._columnWidth[ _ix ] || 0; + } + return this._columnWidth; + } + , columnX: + function( _ix ){ + if( typeof _ix != undefined ){ + return this._columnX[ _ix ] || 0; + } + return this._columnX; + } + + , fixFirstLastRowIndex: + function(){ + var _p = this; + + _p._maxRowY = 0; + if( _p.gridMaxColumn() < 2 ) return; + + for( var i = 0; i < _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ]; + $.each( _rowList, function( _k, _item ){ + _item.rowIndex > _p._maxRowY && ( _p._maxRowY = _item.rowIndex ); + }); + } + + var _fcol = _p.gridIdColumnIndexMap()[0] + , _first, _last + , _lcol = _p.gridIdColumnIndexMap()[ _p.gridMaxColumn() - 1] + ; + if( _fcol && _fcol.length ){ + var _fdata = _fcol[0]; + if( _fdata.nodes && _fdata.nodes.length ){ + _first = _fdata.nodes.first(); + _last = _fdata.nodes.last(); + _fdata.rowIndex = _first.rowIndex + ( _last.rowIndex - _first.rowIndex ) / 2; + } + } + + + } + + , fixNodesRowIndex: + function(){ + var _p = this; + + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ] + , _nextList = _p.gridIdColumnIndexMap()[ i + 1 ] + ; + $.each( _rowList, function( _k, _item ){ + var _preItem = _rowList[ _k - 1 ] + , _nextItem = _rowList[ _k + 1 ] + , _oldIx = _item.rowIndex + , _nodes = _item.nodes + , _pid = _item.pid + , _pitem = _p.gridIdMap( _pid ) || {} + , _fdata, _ldata + , _fitem, _litem + , _midY + , _spaceY + , _minY, _maxY + ; + + if( _nodes && _nodes.length ){ + if( _nodes.length > 1 ){ + _fdata = _nodes.first(); + _ldata = _nodes.last(); + _midY = _fdata.rowIndex + ( _ldata.rowIndex - _fdata.rowIndex ) / 2; + _spaceY = _oldIx - _midY; + _minY = _fdata.rowIndex + _spaceY; + _maxY = _ldata.rowIndex + _spaceY; + if( _spaceY === 0 ) { + return; + } + if( _fdata.prev && _minY <= _fdata.prev.rowIndex ){ + _spaceY = _fdata.prev.rowIndex + 1 - _minY; + _minY += _spaceY; + _maxY += _spaceY; + _p.fixItemDataAndNext( _fdata, _minY - _fdata.rowIndex ); + _p.fixItemDataAndNext( _item, _spaceY ); + _p.fixItemParentDataAndNext( _item, _spaceY ); + }else if( _ldata.next && _maxY >= _ldata.next.rowIndex ){ + _p.fixItemDataAndNext( _fdata, _maxY - _ldata.rowIndex ); + }else{ + //_p.fixItemDataAndNext( _fdata, _maxY - _ldata.rowIndex ); + //JC.log( _item.name, _fdata.name, _ldata.name, _spaceY ); + _p.fixItemDataAndNext( _fdata, _spaceY ); + } + }else{ + _fdata = _nodes.first(); + //JC.log( _item.name, _item.id, JC.f.ts(), _item.rowIndex, _fdata.rowIndex, _fdata.name ); + if( _item.rowIndex === _fdata.rowIndex ) return; + //JC.log( 1 ); + _maxY = Math.max( _item.rowIndex, _fdata.rowIndex ); + if( _item.rowIndex > _fdata.rowIndex ){ + //JC.log( 2 ); + _p.fixItemDataAndNext( _fdata, _item.rowIndex - _fdata.rowIndex ); + }else if( _item.rowIndex < _fdata.rowIndex ){ + //JC.log( 3 ); + _p.fixItemDataAndNext( _item, _fdata.rowIndex - _item.rowIndex ); + var _newIx = _item.rowIndex; + _p.fixItemParentDataAndNext( _item, _newIx - _oldIx ); + //JC.log( _item.name, _item.id, JC.f.ts(), _pitem.name, _pitem.id ); + }else{ + //JC.log( 4 ); + } + } + } + }); + + } + } + + , fixTargetNodesRowIndex: + function(){ + var _p = this; + + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ] + , _nextList = _p.gridIdColumnIndexMap()[ i + 1 ] + ; + $.each( _rowList, function( _k, _item ){ + var _preItem = _rowList[ _k - 1 ] + , _nextItem = _rowList[ _k + 1 ] + , _oldIx = _item.rowIndex + , _nodes = _item.nodes + , _pid = _item.pid + , _fdata, _ldata + , _fitem, _litem + , _midY + , _spaceY + , _minY, _maxY + ; + + if( _pid && _pid.length ){ + if( _pid.length > 1 ){ + _fdata = _p.gridIdMap( _pid.first() ); + _ldata = _p.gridIdMap( _pid.last() ); + + _midY = _fdata.rowIndex + ( _ldata.rowIndex - _fdata.rowIndex ) / 2 + + if( _item.prev && _item.prev.rowIndex >= _midY ){ + }else if( _item.next && _item.next.rowIndex <= _midY ){ + //JC.log( _item.name, _item.id, _item.next.name, _item.next.id ); + _p.fixItemDataAndNext( _item, _midY - _item.rowIndex ); + }else{ + _spaceY = _midY - _item.rowIndex; + _item.rowIndex = _midY; + _p.fixItemChildDataAndNext( _item, _spaceY ); + } + }else{ + _fdata = _p.gridIdMap( _pid.first() ); + if( _fdata.targetNode ){ + if( _item.next && _fdata.rowIndex >= _item.next.rowIndex ){ + _spaceY = _fdata.rowIndex - _item.rowIndex; + _p.fixItemDataAndNext( _item, _spaceY ); + }else{ + _spaceY = _fdata.rowIndex - _item.rowIndex; + _item.rowIndex = _fdata.rowIndex; + _p.fixItemChildDataAndNext( _item, _spaceY ); + } + } + } + } + }); + + } + } + + , fixItemChildDataAndNext: + function( _item, _spaceY ){ + var _p = this, _nextSpaceY, _newIx; + if( !( _item && _item.nodes && _item.nodes.length ) ) return; + $.each( _item.nodes, function( _k, _sitem ){ + _sitem.rowIndex += _spaceY; + _p.fixItemChildDataAndNext( _sitem, _spaceY ); + }); + } + + , fixItemParentDataAndNext: + function( _item, _spaceY, _isRealY ){ + var _p = this, _nextSpaceY, _newIx; + if( !( _item && _item.pid && _item.pid.length ) ) return; + var _pitem = _p.gridIdMap( _item.pid.first() ) + , _fdata, _ldata, _midY + ; + if( !( _pitem ) ) return; + _p.fixItemDataAndNext( _pitem, _spaceY ); + _p.fixItemParentDataAndNext( _pitem, _spaceY, _isRealY ); + } + + , fixItemDataAndNext: + function( _node, _spaceY ){ + while( _node ){ + _node.rowIndex += _spaceY; + _node = _node.next; + } + } + + , fixRealRowIndex: + function(){ + var _p = this, _sx = 0, _sy = 0, _minY = 0; + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ] + ; + $.each( _rowList, function( _k, _item ){ + var _rowIx = _item.rowIndex - _p.gridOffsetRowIndex() + ; + _item.rowIndex = _rowIx; + _rowIx < _minY && ( _minY = _rowIx ); + }); + } + if( _minY < 0 ){ + _minY = Math.abs( _minY ); + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + var _rowList = _p.gridIdColumnIndexMap()[ i ] + ; + $.each( _rowList, function( _k, _item ){ + _item.rowIndex += _minY; + }); + } + } + + } + + , initRowIndex: + function(){ + var _p = this; + + for( var i = 0; i <= _p.gridMaxColumn(); i++ ){ + //JC.log( i, JC.f.ts() ); + var _rowList = _p.gridIdColumnIndexMap()[ i ] + , _preList = _p.gridIdColumnIndexMap()[ i - 1 ] + , _len = _rowList.length + , _preLen = _preList ? _preList.length : 0 + ; + //JC.dir( _rowList ); + // + _preList && ( _preList = _preList.slice().reverse() ); + + /** + * 这里的逻辑认为 起始节点 和 结束节点都只有一个 + */ + if( i === 0 ){ + $.each( _rowList, function( _k, _item ){ + _item.rowIndex = _p.gridOffsetRowIndex(); + }); + continue; + } + + var _minRowIndex = _p.gridOffsetRowIndex() + , _maxRowIndex = _p.gridOffsetRowIndex() + , _itemIndexLen = 1 + , _startIndex = _p.gridOffsetRowIndex() + ; + if( _rowList.length > 1 ){ + _itemIndexLen = _rowList.length * 2; + } + _startIndex = _startIndex - ( _itemIndexLen / 2 ); + _startIndex += 1; + + $.each( _rowList, function( _k, _item ){ + _item.rowIndex = _startIndex + _k * 2; + //JC.log( i, _k, _item.rowIndex ); + }); + //JC.log( i, _startIndex ); + } + } + + , gridMaxColumn: + function( _setter ){ + typeof _setter != 'undefined' && ( this.grid().maxColumn = _setter ); + return this.grid().maxColumn; + } + + , gridRowIndexPad: + function( _setter ){ + typeof _setter != 'undefined' && ( this.grid().rowIndexPad = _setter ); + return this.grid().rowIndexPad; + } + + , initColumnIndexMap: + function(){ + var _p = this; + $.each( _p.gridIdColumnIndexList(), function( _k, _item ){ + if( _item.columnIndex in _p.gridIdColumnIndexMap() ){ + _p.gridIdColumnIndexMap()[ _item.columnIndex ].push( _item ); + }else{ + _p.gridIdColumnIndexMap()[ _item.columnIndex ] = [ _item ]; + } + }); + } + + , initColumnRelationship: + function(){ + var _p = this; + $.each( _p.gridIdColumnIndexMap(), function( _ix, _list ){ + $.each( _list, function( _k, _item ){ + var _prev = _list[ _k - 1 ] + ; + _item.prev = _prev; + _prev && ( _prev.next = _item ); + _item.next = null; + }); + }); + } + + + , initIdColumnIndex: + function( _data, _id, _ix, _processSelf, _count ){ + var _p = this, _childIx = _ix + 1, _targetNodeIx = _childIx + 1; + //JC.log( _ix, _data.name, _id, JC.f.ts() ); + if( ( 'columnIndex' in _data ) && _ix < _data.columnIndex ){ + _ix = _data.columnIndex; + } + + if( !( _id in _p.gridIdMap() ) ){ + _p.gridIdColumnIndexList().push( _data ); + } + + _data.id = _id; + _data.pid = _data.pid || []; + _data.columnIndex = _ix; + _p.gridIdColumnIndex()[ _id ] = _data; + _p.gridIdMap()[ _id ] = _data; + _data.zindex = _count++; + + + _ix > _p.gridMaxColumn() && _p.gridMaxColumn( _ix ); + + if( _data.nodes && _data.nodes.length ){ + var _targetNodes = {}; + $.each( _data.nodes, function( _k, _item ){ + _item.pid = _item.pid || []; + _item.pid.push( _id ); + + if( ( 'targetNode' in _item ) && _p.chartData().targetNodes && ( _item.targetNode in _p.chartData().targetNodes ) ){ + _targetNodes[ _item.targetNode ] = _item.targetNode; + + _p.chartData().targetNodes[ _item.targetNode ].pid = _p.chartData().targetNodes[ _item.targetNode ].pid || []; + _p.chartData().targetNodes[ _item.targetNode ].pid.push( _item.id ); + } + _p.initIdColumnIndex( _item, _item.id, _childIx, false, _count ); + }); + + $.each( _targetNodes, function( _k, _item ){ + _p.initIdColumnIndex( _p.chartData().targetNodes[ _k ], _k, _targetNodeIx, true, _count ); + }); + } + + if( _processSelf && ( 'targetNode' in _data ) && _p.chartData().targetNodes && ( _data.targetNode in _p.chartData().targetNodes ) ){ + _p.chartData().targetNodes[ _data.targetNode ].pid = _p.chartData().targetNodes[ _data.targetNode ].pid || []; + _p.chartData().targetNodes[ _data.targetNode ].pid.push( _id ); + _p.initIdColumnIndex( _p.chartData().targetNodes[ _data.targetNode ], _data.targetNode, _childIx, true, _count ); + } + } + + , buildLayout: + function(){ + var _p = this; + _p._container = $( '
        ' ); + _p._layout = $( '
        ' ); + _p._raphaelPlaceholder = $( '
        ' ); + _p._box = $( '
        ' ); + _p._raphaelPlaceholder.appendTo( _p._layout ); + _p._box.appendTo( _p._layout ); + _p._layout.appendTo( _p._container ); + _p._container.appendTo( _p.selector() ); + } + , layout: function(){ return this._layout; } + , box: function(){ return this._box; } + , raphaelPlaceholder: function(){ return this._raphaelPlaceholder; } + , width: function(){ return Math.abs( this._maxX - this._minX ); } + , height: function(){ return Math.abs( this._maxY - this._minY + 5 ); } + + , listHasChildline: + function( _list ){ + var _r = false; + $.each( _list, function( _k, _item ){ + if( ( _item.nodes && _item.nodes.length > 1 ) ){ + _r = true; + return false; + } + }); + return _r; + } + + , listHasParentline: + function( _list ){ + var _r = false, _tmp = {}; + $.each( _list, function( _k, _item ){ + if( _item.targetNode in _tmp ){ + _r = true; + return false; + } + if( _item.targetNode && !( _item.targetNode in _tmp ) ){ + _tmp[ _item.targetNode ] = 1; + } + }); + return _r; + } + + , colors: + function(){ + var _p = this; + + if( !_p._colors ){ + _p._colors = _p._buildInColors; + + if( _p.colorsData() ){ + $.each( _p.colorsData(), function( _k, _item ){ + if( _k in _p._colors ){ + if( $.isPlainObject( _item ) ){ + JC.f.extendObject( _p._colors[ _k ], _item ); + } + }else{ + _p._colors[ _k ] = _item; + } + }); + } + //JC.dir( _p._colors ); + } + + return _p._colors; + } + + , _buildInColors: { + line: { + 'stroke': '#E1E1E1', 'stroke-width': 2 + } + , icon: { + 'stroke': '#E1E1E1', 'stroke-width': 2, 'fill': '#F2F2F2' + } + } + + }); + + JC.f.extendObject( FlowChart.View.prototype, { + init: + function(){ + //JC.log( 'FlowChart.View.init:', new Date().getTime() ); + } + + , draw: + function(){ + var _p = this, _st, _et; + if( !( _p._model.chartData() && _p._model.chartData().name ) ) return; + + _st = JC.f.ts(); + + _p._model.buildLayout(); + _p._model.initGrid(); + _p._model.layout().css( { + 'height': Math.abs( _p._model.maxY() ) + 'px' + } ); + + _p.showGrid(); + _p.showLine(); + + JC.PopTips.init( _p.selector() ); + + _et = JC.f.ts(); + + //JC.log( 'time span:', _et - _st ); + } + + , showLine: + function(){ + var _p = this, _rh, _raphael, _y = Math.abs( _p._model.minY() ), _ypad = 0; + _rh = _raphael = Raphael( _p._model.raphaelPlaceholder()[0], _p._model.width(), _p._model.height() ); + !isIE && ( _ypad = 1 ); + + for( var i = 0; i <= _p._model.gridMaxColumn(); i++ ){ + var _rowList = _p._model.gridIdColumnIndexMap()[ i ] + , _hasChildline = _p._model.listHasChildline( _rowList ) + , _hasParentline = _p._model.listHasParentline( _rowList ) + , _columnX = _p._model.columnX( i ) + , _preColumnX = _p._model.columnX( i - 1 ) + , _columnWidth = _p._model.columnWidth( i ) + , _preColumnWidth = _p._model.columnWidth( i - 1 ) + , _startX = _columnX + _columnWidth + , _realStartX + , _lineWidth = _p._model.lineWidth() + , _xpad = 0 + ; + + if( _hasParentline ){ + _lineWidth += _p._model.childLineWidth(); + } + + if( _hasChildline ){ + _lineWidth += _p._model.parentLineWidth(); + } + + //JC.log( i, _columnX, _columnWidth, _startX ); + + $.each( _rowList, function( _k, _item ){ + var _node = _p._model.item( _item.id ) + , _pid = _item.pid + , _nodes = _item.nodes + , _subitem + , _realStartX + , _realY + , _fitem, _litem + , _fnode, _lnode + , _ex, _sx, _sy, _ey + , _tmpX + , _midY + , _tmpY, _tmpY1, _tmpY2 + , _endX + , _sdata, _snode + , _path + ; + + if( !( _pid || _nodes ) ) return; + + if( _pid && _pid.length ){ + _fitem = _p._model.gridIdMap( _pid.first() ); + _fnode = _p._model.item( _fitem.id ); + + if( _pid.length > 1 ){ + _realStartX = _preColumnX + _preColumnWidth + _p._model.parentLineWidth(); + _litem = _p._model.gridIdMap( _pid.last() ); + _lnode = _p._model.item( _litem.id ); + + _midY = _item.y + Math.abs( _p._model.minY() ) + _node.outerHeight() / 2 + _ypad; + _tmpY1 = _fitem.y + Math.abs( _p._model.minY() ) + _fnode.outerHeight() / 2 + _ypad; + _tmpY2 = _litem.y + Math.abs( _p._model.minY() ) + _lnode.outerHeight() / 2 + _ypad; + + _endX = _item.x - 18; + + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}M{5} {6}L{7} {8}' + , '' + , _realStartX, _tmpY1 + , _realStartX, _tmpY2 + , _realStartX, _midY + , _endX, _midY + )).attr( _p._model.colors().line ); + + $.each( _pid, function( _sk, _sitem ){ + _sdata = _p._model.gridIdMap( _sitem ); + _snode = _p._model.item( _sdata.id ); + _tmpY = _sdata.y + Math.abs( _p._model.minY() ) + _snode.outerHeight() / 2 + _ypad; + + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}' + , '' + , _sdata.x, _tmpY + , _realStartX, _tmpY + )).attr( _p._model.colors().line ); + }); + + _rh.JCTriangle( 16, _endX, _midY, _p._model.colors().icon ); + }else if( _fitem && _pid.length === 1 && ( 'targetNode' in _fitem ) ){ + _realStartX = _preColumnX + _fnode.outerWidth(); + _realY = _fitem.y + _fnode.outerHeight() / 2; + _item.y = _fitem.y; + + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}' + , '', _realStartX, _realY + _ypad, _item.x - 18, _realY + _ypad + )).attr( _p._model.colors().line ); + _rh.JCTriangle( 16, _item.x - 18, _realY + _ypad, _p._model.colors().icon ); + } + } + + if( _nodes && _nodes.length ){ + if( _nodes.length > 1 ){ + + _sx = _item.x + _node.outerWidth(); + + _fitem = _nodes.first(); + _litem = _nodes.last(); + _fnode = _p._model.item( _fitem.id ); + _lnode = _p._model.item( _litem.id ); + + //JC.log( _item.id, _fitem.name, _litem.name ); + + _ex = _fitem.x; + _realStartX = _ex - _p._model.childLineWidth(); + + _midY = _item.y + Math.abs( _p._model.minY() ) + _node.outerHeight() / 2 + _ypad; + + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}' + , '' + , _sx, _midY + , _realStartX - 18, _midY + )).attr( _p._model.colors().line ); + + _rh.JCTriangle( 16, _realStartX - 18, _midY, _p._model.colors().icon ); + + _tmpY1 = _fitem.y + Math.abs( _p._model.minY() ) + _fnode.outerHeight() / 2 + _ypad; + _tmpY2 = _litem.y + Math.abs( _p._model.minY() ) + _lnode.outerHeight() / 2 + _ypad; + + _endX = _item.x - 18; + + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}' + , '' + , _realStartX, _tmpY1 + , _realStartX, _tmpY2 + )).attr( _p._model.colors().line ); + + $.each( _nodes, function( _sk, _sitem ){ + _sdata = _sitem; + _snode = _p._model.item( _sdata.id ); + _tmpY = _sdata.y + Math.abs( _p._model.minY() ) + _snode.outerHeight() / 2 + _ypad; + + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}' + , '' + , _realStartX, _tmpY + , _sdata.x, _tmpY + )).attr( _p._model.colors().line ); + }); + + } + + if( _nodes.length === 1 ){ + _realStartX = _columnX + _node.outerWidth(); + _realY = _item.y + _node.outerHeight() / 2; + + _subitem = _nodes[0]; + _rh.path( JC.f.printf( + '{0}M{1} {2}L{3} {4}' + , '', _realStartX, _realY + _y + _ypad, _subitem.x - 18, _realY + _y + _ypad + )).attr( _p._model.colors().line ); + _rh.JCTriangle( 16, _subitem.x - 18, _realY + _y + _ypad, _p._model.colors().icon ); + } + } + }); + } + + } + + , showGrid: + function(){ + var _p = this; + for( var i = 0; i <= _p._model.gridMaxColumn(); i++ ){ + var _rowList = _p._model.gridIdColumnIndexMap()[ i ] + ; + $.each( _rowList, function( _k, _item ){ + var _node = _p._model.item( _item.id ) + ; + _node.css({ + 'left': _item.x + 'px', 'top': _item.y + 'px' + }); + _p.notification( JC.FlowChart.Model.ITEM_INITED, [ _node, _item, _rowList, _p._model.data() ] ); + }); + } + } + }); + + FlowChart.TIPS_TPL = + [ + '' + ,'{0}' + ,' + + + + +
        +
        JC.FlowChart - 示例
        +
        +

        before text

        +
        +
        + +
        +
        +

        after text

        +
        +
        + + + + diff --git a/comps/FlowChart/_demo/demo.html b/comps/FlowChart/_demo/demo.html new file mode 100755 index 000000000..9da20a012 --- /dev/null +++ b/comps/FlowChart/_demo/demo.html @@ -0,0 +1,114 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +
        +
        JC.FlowChart - 示例
        +
        +

        before text

        +
        +
        + +
        +
        +

        after text

        +
        +
        + + + + diff --git a/comps/FlowChart/_demo/demo.status.html b/comps/FlowChart/_demo/demo.status.html new file mode 100755 index 000000000..6e257b7b4 --- /dev/null +++ b/comps/FlowChart/_demo/demo.status.html @@ -0,0 +1,124 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +
        +
        JC.FlowChart - 示例
        +
        +

        before text

        +
        +
        + +
        +
        +

        after text

        +
        +
        + + + + diff --git a/comps/FlowChart/_demo/demo.tips.html b/comps/FlowChart/_demo/demo.tips.html new file mode 100755 index 000000000..bf9fcee9c --- /dev/null +++ b/comps/FlowChart/_demo/demo.tips.html @@ -0,0 +1,128 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + +
        +
        JC.FlowChart - 示例
        +
        +

        before text

        +
        + +
        +

        after text

        +
        +
        + + + + diff --git a/comps/FlowChart/_demo/index.php b/comps/FlowChart/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/FlowChart/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FlowChart/index.php b/comps/FlowChart/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/FlowChart/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FlowChart/res/default/style.css b/comps/FlowChart/res/default/style.css new file mode 100755 index 000000000..3f5c1653f --- /dev/null +++ b/comps/FlowChart/res/default/style.css @@ -0,0 +1,88 @@ + +.js_compFlowChart { + +} + +.js_compFlowChart .js_cfcContainer, .js_compFlowChart .js_cfcLayout, .js_compFlowChart .js_cfcRaphael, .js_compFlowChart .js_cfcBox{ + margin: 0!important; + padding: 0!important; +} + +.js_compFlowChart .js_cfcContainer{ + width: 100%; + overflow-x: auto; + padding-bottom: 20px!important; +} + +.js_compFlowChart .js_cfcRaphael{ +} + +.js_compFlowChart .js_cfcLayout { + position: relative; +} + +.js_compFlowChart .js_cfcBox { + position: absolute; +} + +.js_compFlowChart .js_cfcBox .js_compPopTips { + position: absolute; + display: inline-block; +} + +.js_compFlowChart .js_cfcItem{ + padding: 4px 15px; + min-width: 70px; + background: #F2F2F2; + border: 1px solid #E7E7E7; + white-space:pre; + position: absolute; + text-align: center; + font: 12px/1.5 Tahoma,Helvetica,Arial,'宋体',sans-serif; + font-weight: bold; + cursor: default; +} + +.js_compFlowChart .js_cfcItemStatus_0{ + color: #6B6F81; +} + +.js_compFlowChart .js_cfcItemStatus_1{ + color: #09c100; +} + +.js_compFlowChart .js_cfcItemStatus_2{ + color: #ff0619; +} + +.js_compFlowChart .js_cfcItemStatus_3{ + color: #0c76c4; +} + +.js_compFlowChart .js_cfcItemStatus_4{ + color: #ffbf00; +} + +.js_compFlowChart .js_cfcItemStatus_5{ + color: #ff7100; +} + +.js_compFlowChart .js_cfcItemStatus_6{ + color: #ff06b3; +} + +.js_compFlowChart .js_cfcItemStatus_7{ + color: #41e2e6; +} + +.js_compFlowChart .js_cfcItemStatus_8{ + color: #c3e2a4; +} + +.js_compFlowChart .js_cfcItemStatus_9{ + color: #ffb2bc; +} + +.js_compFlowChart .js_cfcItemStatus_10{ + color: #dbb8fd; +} diff --git a/comps/FlowChart/res/index.php b/comps/FlowChart/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/FlowChart/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/Form/Form.js b/comps/Form/Form.js old mode 100644 new mode 100755 index a8d72ad76..e9caabd7e --- a/comps/Form/Form.js +++ b/comps/Form/Form.js @@ -1,20 +1,29 @@ -;(function($){ +;(function(define, _win) { 'use strict'; define( [ 'JC.AutoSelect', 'JC.AutoChecked', 'JC.FormFillUrl' ], function(){ /** * 表单常用功能类 JC.Form - *

        requires: jQuery

        + *

        这个组件将不再维护, 相关功能请使用抽取出来的对应组件

        + + *

        + * optional: + * JC.AutoSelect + * , JC.AutoChecked + * , JC.FormFillUrl + *

        *

        JC Project Site * | API docs * | demo link

        * @namespace JC * @class Form * @static - * @version dev 0.1 + * @version dev 0.2 2014-01-19 + * @version dev 0.1 2013-06-11 * @author qiushaowei | 75 team - * @date 2013-06-11 */ window.JCForm = JC.Form = { /** * 禁用按钮一定时间, 默认为1秒 + *
        这个方法已停止维护 + * , 请使用 Bizs.ActionLogic.disableButton * @method disableButton * @static * @param {selector} _selector 要禁用button的选择器 @@ -34,7 +43,7 @@ /** * select 级联下拉框无限联动 *
        这个方法已经摘取出来, 单独成为一个类. - *
        详情请见: JC.AutoSelect.html + *
        详情请见: JC.AutoSelect *
        目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法 * @method initAutoSelect * @static @@ -43,261 +52,30 @@ /** * 全选/反选 *
        这个方法已经摘取出来, 单独成为一个类. - *
        详情请见: JC.AutoChecked.html + *
        详情请见: JC.AutoChecked *
        目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法 * @method initCheckAll * @static */ JC.AutoChecked && ( JC.Form.initCheckAll = JC.AutoChecked ); -}(jQuery)); -; - - ;(function($){ /** * 表单自动填充 URL GET 参数 - *
        只要引用本脚本, DOM 加载完毕后, 页面上所有带 class js_autoFillUrlForm 的 form 都会自动初始化默认值 - *

        requires: jQuery

        - *

        JC Project Site - * | API docs + *
        这个方法已经摘取出来, 单独成为一个类. + *
        详情请见: JC.FormFillUrl * @method initAutoFill - * @static - * @for JC.Form - * @version dev 0.1 - * @author qiushaowei | 75 team - * @date 2013-06-13 * @param {selector|url string} _selector 显示指定要初始化的区域, 默认为 document * @param {string} _url 显示指定, 取初始化值的 URL, 默认为 location.href - * @example - * JC.Form.initAutoFill( myCustomSelector, myUrl ); - */ - JC.Form.initAutoFill = - function( _selector, _url ){ - _selector = $( _selector || document ); - if( !(_selector && _selector.length ) ) _selector = $(document); - _url = _url || location.href; - - JC.log( 'JC.Form.initAutoFill' ); - - if( _selector.prop( 'nodeName' ).toLowerCase() == 'form' ){ - fillForm( _selector, _url ); - }else{ - var _fms = _selector.find('form.js_autoFillUrlForm'); - _fms.each( function(){ - fillForm( this, _url ); - }); - - if( !_fms.length ){ - fillItems( _selector, _url ); - } - } - - }; - - function fillItems( _selector, _url ){ - _selector = $(_selector); - _url = decode( _url ); - - _selector.find( 'input[type=text][name],input[type=password][name],textarea[name]' ).each( function(){ - var _sp = $(this); - if( hasUrlParam( _url, _sp.attr('name') ) ){ - _sp.val( decode( getUrlParam( _url, _sp.attr('name') ).replace(/[\+]/g, ' ' ) ) ); - } - }); - - _selector.find( 'select[name]' ).each( function(){ - var _sp = $(this), _uval = decode( getUrlParam( _url, _sp.attr('name') ).replace(/[\+]/g, ' ' ) ) ; - if( hasUrlParam( _url, _sp.attr('name') ) ){ - if( selectHasVal( _sp, _uval ) ){ - _sp.removeAttr('selectignoreinitrequest'); - _sp.val( getUrlParam( _url, _sp.attr('name') ) ); - }else{ - _sp.attr( 'selectvalue', _uval ); - } - } - }); - - var _keyObj = {}; - _selector.find( 'input[type=checkbox][name], input[type=radio][name]' ).each( function(){ - var _sp = $(this), _key = _sp.attr('name').trim(), _keys, _v = _sp.val(); - //alert( _sp.attr('name') ); - if( !( _key in _keyObj ) ){ - _keys = getUrlParams( _url, _key ); - _keyObj[ _key ] = _keys; - }else{ - _keys = _keyObj[ _key ]; - } - - if( _keys && _keys.length ){ - $.each( _keys, function( _ix, _item ){ - if( _item == _v ){ - _sp.prop('checked', true); - _sp.trigger('change'); - } - }); - } - }); - - window.jcAutoInitComps && jcAutoInitComps( _selector ); - } - - function fillForm( _selector, _url ){ - fillItems( _selector, _url ); - /* - ?s_startTime=2013-08-28 - &s_endTime=2013-09-28 - &kword_type= - &kword= - &department[]=2 - &department[]=3 - &operator[]=328 - &operator[]=330 - &operator[]=331 - &isp=1379841840601_232_161 - */ - } - /** - * 自定义 URI decode 函数 - * @property initAutoFill.decodeFunc - * @static - * @for JC.Form - * @type function - * @default null - */ - JC.Form.initAutoFill.decodeFunc; - - function decode( _val ){ - try{ - _val = (JC.Form.initAutoFill.decodeFunc || decodeURIComponent)( _val ); - }catch(ex){} - return _val; - } - /** - * 判断下拉框的option里是否有给定的值 - * @method initAutoFill.selectHasVal - * @private * @static - * @param {selector} _select - * @param {string} _val 要查找的值 */ - function selectHasVal( _select, _val ){ - var _r = false, _val = _val.toString(); - _select.find('option').each( function(){ - var _tmp = $(this); - if( _tmp.val() == _val ){ - _r = true; - return false; - } - }); - return _r; - } - - $(document).ready( function( _evt ){ - setTimeout( function(){ JC.Form.initAutoFill(); }, 50 ); - }); - -}(jQuery)); - -; - - ;(function($){ - /** - * 文本框 值增减 应用 - *
        只要引用本脚本, 页面加载完毕时就会自动初始化 NumericStepper - *
        所有带 class js_NStepperPlus, js_NStepperMinus 视为值加减按钮 - *

        目标文本框可以添加一些HTML属性自己的规则, - *
        nsminvalue=最小值(默认=0), nsmaxvalue=最大值(默认=100), nsstep=步长(默认=1), nsfixed=小数点位数(默认=0) - *
        nschangecallback=值变改后的回调 - * @method initNumericStepper - * @static - * @for JC.Form - * @version dev 0.1 - * @author qiushaowei | 360 75 Team - * @date 2013-07-05 - * @param {selector} _selector 要初始化的全选反选的父级节点 - * @example -

        -
        JC.Form.initNumericStepper 默认值 0 - 100, step 1, fixed 0
        -
        - - - -
        -
        - -
        -
        JC.Form.initNumericStepper -10 ~ 10, step 2, fixed 2
        -
        - - - -
        -
        - */ - JC.Form.initNumericStepper = - function( _selector ){ - _selector && ( _selector = $( _selector ) ); - - _selector.delegate( '.js_NStepperPlus, .js_NStepperMinus', 'click', function( _evt ){ - var _p = $(this), _target = _logic.target( _p ); - if( !( _target && _target.length ) ) return; - - var _fixed = parseInt( _logic.fixed( _target ), 10 ) || 0; - var _val = $.trim( _target.val() ), _step = _logic.step( _target ); - _val = ( _fixed ? parseFloat( _val ) : parseInt( _val, 10 ) ) || 0; - var _min = _logic.minvalue( _target ), _max = _logic.maxvalue( _target ); - - _p.hasClass( 'js_NStepperPlus') && ( _val += _step ); - _p.hasClass( 'js_NStepperMinus') && ( _val -= _step ); - - _val < _min && ( _val = _min ); - _val > _max && ( _val = _max ); - - JC.log( _min, _max, _val, _fixed, _step ); - - _target.val( _val.toFixed( _fixed ) ); - - _logic.callback( _target ) && _logic.callback( _target ).call( _target, _p ); - }); - }; - /** - * 文本框 值增减 值变改后的回调 - *
        这个是定义全局的回调函数, 要定义局部回调请在目标文本框上添加 nschangecallback=回调 HTML属性 - * @property initNumericStepper.onchange - * @type function - * @static - * @for JC.Form - */ - JC.Form.initNumericStepper.onchange; - - var _logic = { - target: - function( _src ){ - var _r; - if( _src.attr( 'nstarget') ){ - if( /^\~/.test( _src.attr('nstarget') ) ){ - _r = _src.parent().find( _src.attr('nstarget').replace( /^\~[\s]*/g, '') ); - !( _r && _r.length ) && ( _r = $( _src.attr('nstarget') ) ); - }else{ - _r = $( _src.attr('nstarget') ); - } - } - - return _r; - } - - , fixed: function( _target ){ return _target.attr('nsfixed'); } - , step: function( _target ){ return parseFloat( _target.attr( 'nsstep' ) ) || 1; } - , minvalue: function( _target ){ return parseFloat( _target.attr( 'nsminvalue' ) || _target.attr( 'minvalue' ) ) || 0; } - , maxvalue: function( _target ){ return parseFloat( _target.attr( 'nsmaxvalue' ) || _target.attr( 'maxvalue' ) ) || 100; } - , callback: - function( _target ){ - var _r = JC.Form.initNumericStepper.onchange, _tmp; - _target.attr('nschangecallback') && ( _tmp = window[ _target.attr('nschangecallback') ] ) && ( _r = _tmp ); - return _r; - } - }; - - $(document).ready( function( _evt ){ - JC.Form.initNumericStepper( $(document) ); - }); -}(jQuery)); + JC.FormFillUrl && ( JC.Form.initAutoFill = JC.FormFillUrl.init ); + + return JC.Form; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Form/_demo/data/SHENGSHI.js b/comps/Form/_demo/data/SHENGSHI.js old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/data/autoInitCheckAll.php b/comps/Form/_demo/data/autoInitCheckAll.php old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/data/data1.js b/comps/Form/_demo/data/data1.js old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/data/initCheckAll.php b/comps/Form/_demo/data/initCheckAll.php old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/data/shengshi.php b/comps/Form/_demo/data/shengshi.php old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/data/shengshi_html.php b/comps/Form/_demo/data/shengshi_html.php old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/data/shengshi_with_error_code.php b/comps/Form/_demo/data/shengshi_with_error_code.php old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/form.initAutoFill.html b/comps/Form/_demo/form.initAutoFill.html old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/form.initAutoSelect.html b/comps/Form/_demo/form.initAutoSelect.html old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/form.initAutoSelect_static_data.html b/comps/Form/_demo/form.initAutoSelect_static_data.html old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/form.initCheckAll.html b/comps/Form/_demo/form.initCheckAll.html old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/form.initNumericStepper.html b/comps/Form/_demo/form.initNumericStepper.html old mode 100644 new mode 100755 diff --git a/comps/Form/_demo/index.php b/comps/Form/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/Form/index.php b/comps/Form/index.php old mode 100644 new mode 100755 diff --git a/comps/Form/nodejs_merge.js b/comps/Form/nodejs_merge.js deleted file mode 100644 index 134ee4ea4..000000000 --- a/comps/Form/nodejs_merge.js +++ /dev/null @@ -1,28 +0,0 @@ -var fs = require('fs'); - -var dir = __dirname + '/'; - -var path1 = dir + 'JC.Form.js'; -//var path2 = dir + 'JC.Form.initCheckAll.js'; -var path4 = dir + 'JC.Form.initAutoFill.js'; -var path5 = dir + 'JC.Form.initNumericStepper.js'; - -var outPath = dir + 'Form.js'; - -if( !( fs.existsSync( path1 ) - //&& fs.existsSync( path2 ) - && fs.existsSync( path5 ) - && fs.existsSync( path4 ) ) ) return; - -var tmp = []; - tmp.push( fs.readFileSync( path1, 'utf8') ); - //tmp.push( fs.readFileSync( path2, 'utf8') ); - tmp.push( fs.readFileSync( path4, 'utf8') ); - tmp.push( fs.readFileSync( path5, 'utf8') ); - -fs.writeFileSync( outPath, tmp.join(';\n\n') ); - -fs.unlinkSync( path1 ); -//fs.unlinkSync( path2 ); -fs.unlinkSync( path4 ); -fs.unlinkSync( path5 ); diff --git a/comps/Form/res/default/images/minus_20x20.png b/comps/Form/res/default/images/minus_20x20.png old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/images/minus_22x22.png b/comps/Form/res/default/images/minus_22x22.png old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/images/minus_32x32.png b/comps/Form/res/default/images/minus_32x32.png old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/images/plus_20x20.png b/comps/Form/res/default/images/plus_20x20.png old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/images/plus_22x22.png b/comps/Form/res/default/images/plus_22x22.png old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/images/plus_32x32.png b/comps/Form/res/default/images/plus_32x32.png old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/numericStepper.css b/comps/Form/res/default/numericStepper.css old mode 100644 new mode 100755 diff --git a/comps/Form/res/default/numericStepper.html b/comps/Form/res/default/numericStepper.html old mode 100644 new mode 100755 diff --git a/comps/FormFillUrl/FormFillUrl.js b/comps/FormFillUrl/FormFillUrl.js new file mode 100755 index 000000000..49bd5d247 --- /dev/null +++ b/comps/FormFillUrl/FormFillUrl.js @@ -0,0 +1,360 @@ +//TODO: 支持 或 忽略 多选下拉框 +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * FormFillUrl 表单自动填充 URL 参数 + * + *

        require: + * JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 form class="js_compFormFillUrl"

        + * + *

        Form 可用的 HTML attribute

        + * + *
        + *
        decoder = function, default = decodeURIComponent
        + *
        URL 的解码函数
        + * + *
        encoder = function, default = encodeURIComponent
        + *
        URL 的编码码函数
        + * + *
        ignoreUrlFill = bool, default = false
        + *
        是否忽略 URL填充
        + *
        + * + * @namespace JC + * @class FormFillUrl + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-01-19 + * @author qiushaowei | 75 Team + * @example +

        JC.FormFillUrl 示例

        +
        +
        + */ + var _jdoc = $( document ); + + JC.FormFillUrl = FormFillUrl; + + function FormFillUrl( _selector, _url ){ + _selector && ( _selector = $( _selector ) ); + _url = _url || location.href; + + if( JC.BaseMVC.getInstance( _selector, FormFillUrl ) ) + return JC.BaseMVC.getInstance( _selector, FormFillUrl ); + + JC.BaseMVC.getInstance( _selector, FormFillUrl, this ); + + this._model = new FormFillUrl.Model( _selector ); + this._model.url( _url ); + + this._init(); + + JC.log( FormFillUrl.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 FormFillUrl 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of FormFillUrlInstance} + */ + FormFillUrl.init = + function( _selector, _url ){ + var _r = []; + _selector = $( _selector || document ); + _url = _url || location.href; + + if( _selector.length ){ + if( _selector.prop( 'nodeName' ).toLowerCase() == 'form' ){ + _r.push( new FormFillUrl( _selector, _url ) ); + }else{ + var _frms = _selector.find( 'form.js_compFormFillUrl, form.js_autoFillUrlForm' ); + + _frms.each( function(){ + _r.push( new FormFillUrl( this, _url ) ); + }); + + if( !_frms.length ){ + _r.push( new FormFillUrl( _selector, _url ) ); + } + } + } + return _r; + }; + JC.Form && ( JC.Form.initAutoFill = FormFillUrl.init ); + /** + * 自定义 URI decode 函数 + * @property decoder + * @type function + * @default decodeURIComponent + * @static + */ + FormFillUrl.decoder = decodeURIComponent; + + /** + * 自定义 URI encode 函数 + * @property encoder + * @type function + * @default encodeURIComponent + * @static + */ + FormFillUrl.encoder = encodeURIComponent; + + /** + * 判断下拉框的option里是否有给定的值 + * @method selectHasVal + * @param {selector} _select + * @param {string} _val 要查找的值 + * @static + */ + FormFillUrl.selectHasVal = + function( _select, _val ){ + _select = $( _select ); + var _r = false, _val = _val.toString(); + _select.find('option').each( function(){ + var _tmp = $(this); + if( _tmp.val() == _val ){ + _r = true; + return false; + } + }); + return _r; + }; + + JC.BaseMVC.build( FormFillUrl ); + + JC.f.extendObject( FormFillUrl.prototype, { + _beforeInit: + function(){ + //JC.log( 'FormFillUrl _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( FormFillUrl.Model.INITED, function( _evt ){ + _p.trigger( FormFillUrl.Model.PROCESS ); + }); + + _p.on( FormFillUrl.Model.PROCESS, function( _evt, _selector, _url ){ + _selector && _p._model.selector( _selector ); + _url && _p._model.url( _url ); + + if( !_p._model.formtoken() ) return; + + _p._model.selector().prop( 'nodeName' ).toLowerCase() == 'form' + ? _p._model.fillForm() + : _p._model.fillItems() + ; + }); + } + + , _inited: + function(){ + //JC.log( 'FormFillUrl _inited', new Date().getTime() ); + this.trigger( FormFillUrl.Model.INITED ); + } + /** + * 手动填充 URL 值 + * @method fill + * @param {selector} _selector + * @param {string} _url + * @return FormFillUrlInstance + */ + , fill: + function( _selector, _url ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length && _url ) ) return this; + _p.trigger( FormFillUrl.Model.PROCESS, [ _selector, _url ] ); + return this; + } + + }); + + FormFillUrl.Model._instanceName = 'JCFormFillUrl'; + FormFillUrl.Model.INITED = 'inited'; + FormFillUrl.Model.PROCESS = 'process'; + + JC.f.extendObject( FormFillUrl.Model.prototype, { + init: + function(){ + //JC.log( 'FormFillUrl.Model.init:', new Date().getTime() ); + } + + , url: + function( _url ){ + typeof _url != 'undefined' && ( this._url = _url ); + return this._url; + } + + , formtoken: + function(){ + var _p = this, _r = true; + if( JC.f.hasUrlParam( _p.url(), 'formtoken' ) ){ + var _item = _p.selector().find( '[name=formtoken]' ); + if( !_item.length ) return false; + + if( _item.val() != JC.f.getUrlParam( _p.url(), 'formtoken' ) ){ + return false; + } + } + return _r; + } + + , fillForm: + function( _selector, _url ){ + this.fillItems( _selector, _url ); + } + + , fillItems: + function( _selector, _url ){ + _selector = $( _selector || this.selector() ); + + var _p = this + , _controls = [] + , _params + ; + + _url = _url || _p.url(); + _params = _p.urlParams( _url, _p.decoder() ); + + _selector.find( '[name]' ).each( function( _ix, _item ){ + _item = $( _item ); + switch( ( _item.prop( 'nodeName' ) || '' ).toLowerCase() ){ + case 'input': + case 'select': + case 'textarea': + if( JC.f.parseBool( _item.attr( 'ignoreUrlFill' ) || '' ) ) return; + _controls.push( _item ); + break; + } + }); + + $.each( _params, function( _k, _vals ){ + //alert( [ _k, _items ] ); + var _findControls = [], _isCheck; + $.each( _controls, function( _ix, _item ){ + _item.attr( 'name' ) == _k && ( _findControls.push( _item ) ); + }); + + if( !_findControls.length ) return; + + //JC.log( _k, _findControls.length, _vals ); + + $.each( _findControls, function( _ix, _item ){ + var _nt = ( _item.prop( 'nodeName' ) ).toLowerCase() + , _type = ( _item.attr( 'type' ) || 'text' ).toLowerCase() + ; + if( _type == 'file' ) return; + + if( JC.f.parseBool( _item.attr( 'ignoreUrlFill' ) || '' ) ) return; + + //JC.log( _nt, _type ); + + if( /input/i.test( _nt ) ){ + switch( _type ){ + case 'radio': + case 'checkbox': + _isCheck = true; + break; + + default: + if( _findControls.length != _vals.length ) return; + _p._updateInputVal( _item, _vals, _ix ); + break; + } + }else if( /textarea/i.test( _nt ) ){ + _p._updateInputVal( _item, _vals, _ix ); + }else if( /select/i.test( _nt ) ){ + _p._updateSelect( _item, _vals, _ix ); + } + }); + + if( _isCheck ){ + _p._updateInputChecked( _findControls, _vals ); + } + }); + + JC.f.autoInit && JC.f.autoInit( _selector ); + } + + , _updateSelect: + function( _item, _vals, _ix ){ + var _val = _vals[ _ix ] || ''; + if( FormFillUrl.selectHasVal( _item, _val ) ){ + _item.removeAttr('selectIgnoreInitRequest'); + _item.val( _val ); + }else{ + _item.attr( 'selectvalue', _val ); + } + } + + , _updateInputVal: + function( _item, _vals, _ix ){ + _item.val( _vals[ _ix ] || '' ); + } + + , _updateInputChecked: + function( _controls, _vals ){ + $.each( _controls, function( _ix, _item ){ + var _type = ( _item.attr( 'type' ) || 'text' ).toLowerCase(), _find; + if( !( _type == 'checkbox' || _type == 'radio' ) ) return; + $.each( _vals, function( _six, _sitem ){ + _item.val() == _sitem && ( _find = true ); + }); + _find ? _item.prop( 'checked', true ) : _item.prop( 'checked', false ); + }); + } + + , urlParams: + function( _url, _decoder ){ + var _r = {}, _re = /[\+]/g; + _decoder = _decoder || decodeURIComponent; + if( _url ){ + _url = _url.split( /[?]+/ ); + _url.shift(); + + if( !_url.length ) return _r; + _url = _url[ 0 ]; + + _url = _url.split( '&' ); + $.each( _url, function( _ix, _item ){ + if( !_item ) return; + var _sitem = _item.split( '=' ); + if( !_sitem[0] ) return; + _sitem[ 0 ] = ( _sitem[ 0 ] || '' ).replace( _re, ' ' ); + try{ _sitem[ 0 ] = _decoder( _sitem[ 0 ] ); }catch( ex ){} + !( _sitem[0] in _r ) && ( _r[ _sitem[0] ] = [] ); + _r[ _sitem[0] ].push( _decoder( ( _sitem[ 1 ] || '' ).replace( _re, ' ' ) ) ); + }); + } + return _r; + } + + , decoder: function(){ return this.callbackProp( 'decoder' ) || FormFillUrl.decoder; } + , encoder: function(){ return this.callbackProp( 'encoder' ) || FormFillUrl.encoder; } + }); + + _jdoc.ready( function(){ + FormFillUrl.autoInit + && JC.f.safeTimeout( function(){ FormFillUrl.init(); }, null, 'JCFormFillUrl', 50 ); + }); + + return JC.FormFillUrl; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/FormFillUrl/_demo/data/SHENGSHI.js b/comps/FormFillUrl/_demo/data/SHENGSHI.js new file mode 100755 index 000000000..7c149c09d --- /dev/null +++ b/comps/FormFillUrl/_demo/data/SHENGSHI.js @@ -0,0 +1 @@ +SHENGSHI = [["28","\u5317\u4eac ","0"],["3705","\u4e1c\u57ce\u533a ","28"],["3706","\u897f\u57ce\u533a ","28"],["3708","\u5d07\u6587\u533a ","28"],["3709","\u5ba3\u6b66\u533a ","28"],["3710","\u671d\u9633\u533a ","28"],["3711","\u4e30\u53f0\u533a ","28"],["3712","\u77f3\u666f\u5c71\u533a ","28"],["3713","\u6d77\u6dc0\u533a ","28"],["3714","\u95e8\u5934\u6c9f\u533a ","28"],["3715","\u623f\u5c71\u533a ","28"],["3716","\u901a\u5dde\u533a ","28"],["3718","\u987a\u4e49\u533a ","28"],["3719","\u660c\u5e73\u533a ","28"],["3720","\u5927\u5174\u533a ","28"],["3721","\u6000\u67d4\u533a ","28"],["3722","\u5e73\u8c37\u533a ","28"],["3723","\u5bc6\u4e91\u53bf ","28"],["3724","\u5ef6\u5e86\u53bf ","28"],["29","\u5929\u6d25 ","0"],["3726","\u548c\u5e73\u533a ","29"],["3727","\u6cb3\u4e1c\u533a ","29"],["3728","\u6cb3\u897f\u533a ","29"],["3729","\u5357\u5f00\u533a ","29"],["3730","\u6cb3\u5317\u533a ","29"],["3731","\u7ea2\u6865\u533a ","29"],["3732","\u5858\u6cbd\u533a ","29"],["3733","\u6c49\u6cbd\u533a ","29"],["3734","\u5927\u6e2f\u533a ","29"],["3735","\u4e1c\u4e3d\u533a ","29"],["3736","\u897f\u9752\u533a ","29"],["35","\u6d25\u5357\u533a ","29"],["36","\u5317\u8fb0\u533a ","29"],["37","\u6b66\u6e05\u533a ","29"],["38","\u5b9d\u577b\u533a ","29"],["39","\u5b81\u6cb3\u53bf ","29"],["40","\u9759\u6d77\u53bf ","29"],["41","\u84df\u53bf ","29"],["34","\u6cb3\u5317\u7701 ","0"],["44","\u77f3\u5bb6\u5e84\u5e02 ","34"],["45","\u957f\u5b89\u533a ","44"],["46","\u6865\u4e1c\u533a ","44"],["47","\u6865\u897f\u533a ","44"],["48","\u65b0\u534e\u533a ","44"],["49","\u4e95\u9649\u77ff\u533a ","44"],["50","\u88d5\u534e\u533a ","44"],["51","\u4e95\u9649\u53bf ","44"],["52","\u6b63\u5b9a\u53bf ","44"],["53","\u683e\u57ce\u53bf ","44"],["54","\u884c\u5510\u53bf ","44"],["55","\u7075\u5bff\u53bf ","44"],["56","\u9ad8\u9091\u53bf ","44"],["57","\u6df1\u6cfd\u53bf ","44"],["58","\u8d5e\u7687\u53bf ","44"],["59","\u65e0\u6781\u53bf ","44"],["60","\u5e73\u5c71\u53bf ","44"],["61","\u5143\u6c0f\u53bf ","44"],["62","\u8d75\u53bf ","44"],["63"," \u8f9b\u96c6\u5e02 ","44"],["64","\u85c1\u57ce\u5e02 ","44"],["65","\u664b\u5dde\u5e02 ","44"],["66","\u65b0\u4e50\u5e02 ","44"],["67","\u9e7f\u6cc9\u5e02 ","44"],["69","\u5510\u5c71\u5e02 ","34"],["70","\u8def\u5357\u533a ","69"],["270","\u77ff\u533a ","268"],["271","\u90ca\u533a ","268"],["272","\u5e73\u5b9a\u53bf ","268"],["273","\u76c2\u53bf ","268"],["275","\u957f\u6cbb\u5e02 ","1"],["276","\u957f\u6cbb\u53bf ","275"],["277","\u8944\u57a3\u53bf ","275"],["278","\u5c6f\u7559\u53bf ","275"],["279","\u5e73\u987a\u53bf ","275"],["280","\u9ece\u57ce\u53bf ","275"],["281","\u58f6\u5173\u53bf ","275"],["282","\u957f\u5b50\u53bf ","275"],["283","\u6b66\u4e61\u53bf ","275"],["284","\u6c81\u53bf ","275"],["285","\u6c81\u6e90\u53bf ","275"],["286","\u6f5e\u57ce\u5e02 ","275"],["287","\u57ce\u533a ","275"],["288","\u90ca\u533a ","275"],["289","\u9ad8\u65b0\u533a ","275"],["291","\u664b\u57ce\u5e02 ","1"],["292","\u57ce\u533a ","291"],["293","\u6c81\u6c34\u53bf ","291"],["294","\u9633\u57ce\u53bf ","291"],["295","\u9675\u5ddd\u53bf ","291"],["296","\u6cfd\u5dde\u53bf ","291"],["297","\u9ad8\u5e73\u5e02 ","291"],["299","\u6714\u5dde\u5e02 ","1"],["300","\u6714\u57ce\u533a ","299"],["301","\u5e73\u9c81\u533a ","299"],["302","\u5c71\u9634\u53bf ","299"],["303","\u5e94\u53bf ","299"],["304","\u53f3\u7389\u53bf ","299"],["305","\u6000\u4ec1\u53bf ","299"],["307","\u664b\u4e2d\u5e02 ","1"],["308","\u6986\u6b21\u533a ","307"],["309","\u6986\u793e\u53bf ","307"],["310","\u5de6\u6743\u53bf ","307"],["311","\u548c\u987a\u53bf ","307"],["312","\u6614\u9633\u53bf ","307"],["313","\u5bff\u9633\u53bf ","307"],["314","\u592a\u8c37\u53bf ","307"],["315","\u7941\u53bf ","307"],["316","\u5e73\u9065\u53bf ","307"],["317","\u7075\u77f3\u53bf ","307"],["318","\u4ecb\u4f11\u5e02 ","307"],["320","\u8fd0\u57ce\u5e02 ","1"],["321","\u76d0\u6e56\u533a ","320"],["322","\u4e34\u7317\u53bf ","320"],["323","\u4e07\u8363\u53bf ","320"],["324","\u95fb\u559c\u53bf ","320"],["325","\u7a37\u5c71\u53bf ","320"],["326","\u65b0\u7edb\u53bf ","320"],["327","\u7edb\u53bf ","320"],["328","\u57a3\u66f2\u53bf ","320"],["329","\u590f\u53bf ","320"],["330"," \u5e73\u9646\u53bf ","320"],["331","\u82ae\u57ce\u53bf ","320"],["332","\u6c38\u6d4e\u5e02 ","320"],["333","\u6cb3\u6d25\u5e02 ","320"],["71","\u8def\u5317\u533a ","69"],["72","\u53e4\u51b6\u533a ","69"],["73","\u5f00\u5e73\u533a ","69"],["74","\u4e30\u5357\u533a ","69"],["75","\u4e30\u6da6\u533a ","69"],["76","\u6ee6\u53bf ","69"],["77","\u6ee6\u5357\u53bf ","69"],["78","\u4e50\u4ead\u53bf ","69"],["79","\u8fc1\u897f\u53bf ","69"],["80","\u7389\u7530\u53bf ","69"],["81","\u5510\u6d77\u53bf ","69"],["82","\u9075\u5316\u5e02 ","69"],["83","\u8fc1\u5b89\u5e02 ","69"],["85","\u79e6\u7687\u5c9b\u5e02 ","34"],["86","\u6d77\u6e2f\u533a ","85"],["87","\u5c71\u6d77\u5173\u533a ","85"],["88","\u5317\u6234\u6cb3\u533a ","85"],["89","\u9752\u9f99\u6ee1\u65cf\u81ea\u6cbb\u53bf ","85"],["90","\u660c\u9ece\u53bf ","85"],["91","\u629a\u5b81\u53bf ","85"],["92","\u5362\u9f99\u53bf ","85"],["94","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","85"],["95","\u90af\u90f8\u5e02 ","34"],["96","\u90af\u5c71\u533a ","95"],["97","\u4e1b\u53f0\u533a ","95"],["98","\u590d\u5174\u533a ","95"],["99","\u5cf0\u5cf0\u77ff\u533a ","95"],["100","\u90af\u90f8\u53bf ","95"],["101","\u4e34\u6f33\u53bf ","95"],["102","\u6210\u5b89\u53bf ","95"],["103","\u5927\u540d\u53bf ","95"],["104","\u6d89\u53bf ","95"],["105"," \u78c1\u53bf ","95"],["106","\u80a5\u4e61\u53bf ","95"],["107","\u6c38\u5e74\u53bf ","95"],["108","\u90b1\u53bf ","95"],["109","\u9e21\u6cfd\u53bf ","95"],["110","\u5e7f\u5e73\u53bf ","95"],["111","\u9986\u9676\u53bf ","95"],["112","\u9b4f\u53bf ","95"],["113"," \u66f2\u5468\u53bf ","95"],["114","\u6b66\u5b89\u5e02 ","95"],["116","\u90a2\u53f0\u5e02 ","34"],["117","\u6865\u4e1c\u533a ","116"],["118","\u6865\u897f\u533a ","116"],["119","\u90a2\u53f0\u53bf ","116"],["120","\u4e34\u57ce\u53bf ","116"],["121","\u5185\u4e18\u53bf ","116"],["122","\u67cf\u4e61\u53bf ","116"],["123","\u9686\u5c27\u53bf ","116"],["124","\u4efb\u53bf ","116"],["125","\u5357\u548c\u53bf ","116"],["126","\u5b81\u664b\u53bf ","116"],["127","\u5de8\u9e7f\u53bf ","116"],["128","\u65b0\u6cb3\u53bf ","116"],["129","\u5e7f\u5b97\u53bf ","116"],["130","\u5e73\u4e61\u53bf ","116"],["131","\u5a01\u53bf ","116"],["132","\u6e05\u6cb3\u53bf ","116"],["133","\u4e34\u897f\u53bf ","116"],["134","\u5357\u5bab\u5e02 ","116"],["135","\u6c99\u6cb3\u5e02 ","116"],["137","\u4fdd\u5b9a\u5e02 ","34"],["138","\u65b0\u5e02\u533a ","137"],["139","\u5317\u5e02\u533a ","137"],["140","\u5357\u5e02\u533a ","137"],["141","\u6ee1\u57ce\u53bf ","137"],["142","\u6e05\u82d1\u53bf ","137"],["143","\u6d9e\u6c34\u53bf ","137"],["144","\u961c\u5e73\u53bf ","137"],["145","\u5f90\u6c34\u53bf ","137"],["146","\u5b9a\u5174\u53bf ","137"],["147","\u5510\u53bf ","137"],["148","\u9ad8\u9633\u53bf ","137"],["149","\u5bb9\u57ce\u53bf ","137"],["150","\u6d9e\u6e90\u53bf ","137"],["151","\u671b\u90fd\u53bf ","137"],["152","\u5b89\u65b0\u53bf ","137"],["153","\u6613\u53bf ","137"],["154","\u66f2\u9633\u53bf ","137"],["155","\u8821\u53bf ","137"],["156","\u987a\u5e73\u53bf ","137"],["157","\u535a\u91ce\u53bf ","137"],["158","\u96c4\u53bf ","137"],["159","\u6dbf\u5dde\u5e02 ","137"],["160","\u5b9a\u5dde\u5e02 ","137"],["161","\u5b89\u56fd\u5e02 ","137"],["162","\u9ad8\u7891\u5e97\u5e02 ","137"],["163","\u9ad8\u5f00\u533a ","137"],["165","\u5f20\u5bb6\u53e3\u5e02 ","34"],["166","\u6865\u4e1c\u533a ","165"],["167","\u6865\u897f\u533a ","165"],["168","\u5ba3\u5316\u533a ","165"],["169","\u4e0b\u82b1\u56ed\u533a ","165"],["170","\u5ba3\u5316\u53bf ","165"],["171","\u5f20\u5317\u53bf ","165"],["172","\u5eb7\u4fdd\u53bf ","165"],["173","\u6cbd\u6e90\u53bf ","165"],["174","\u5c1a\u4e49\u53bf ","165"],["175","\u851a\u53bf ","165"],["176","\u9633\u539f\u53bf ","165"],["177"," \u6000\u5b89\u53bf ","165"],["178","\u4e07\u5168\u53bf ","165"],["179","\u6000\u6765\u53bf ","165"],["180","\u6dbf\u9e7f\u53bf ","165"],["181","\u8d64\u57ce\u53bf ","165"],["182","\u5d07\u793c\u53bf ","165"],["184","\u627f\u5fb7\u5e02 ","34"],["185","\u53cc\u6865\u533a ","184"],["186","\u53cc\u6ee6\u533a ","184"],["187","\u9e70\u624b\u8425\u5b50\u77ff\u533a ","184"],["188","\u627f\u5fb7\u53bf ","184"],["189","\u5174\u9686\u53bf ","184"],["190","\u5e73\u6cc9\u53bf ","184"],["191","\u6ee6\u5e73\u53bf ","184"],["192","\u9686\u5316\u53bf ","184"],["193","\u4e30\u5b81\u6ee1\u65cf\u81ea\u6cbb\u53bf ","184"],["194","\u5bbd\u57ce\u6ee1\u65cf\u81ea\u6cbb\u53bf ","184"],["195","\u56f4\u573a\u6ee1\u65cf\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","184"],["197","\u6ca7\u5dde\u5e02 ","34"],["198","\u65b0\u534e\u533a ","197"],["199","\u8fd0\u6cb3\u533a ","197"],["200","\u6ca7\u53bf ","197"],["201","\u9752\u53bf ","197"],["202","\u4e1c\u5149\u53bf ","197"],["203"," \u6d77\u5174\u53bf ","197"],["204","\u76d0\u5c71\u53bf ","197"],["205","\u8083\u5b81\u53bf ","197"],["206","\u5357\u76ae\u53bf ","197"],["207","\u5434\u6865\u53bf ","197"],["208","\u732e\u53bf ","197"],["209","\u5b5f\u6751\u56de\u65cf\u81ea\u6cbb\u53bf ","197"],["210","\u6cca\u5934\u5e02 ","197"],["211","\u4efb\u4e18\u5e02 ","197"],["212","\u9ec4\u9a85\u5e02 ","197"],["213","\u6cb3\u95f4\u5e02 ","197"],["215","\u5eca\u574a\u5e02 ","34"],["216","\u5b89\u6b21\u533a ","215"],["217","\u5e7f\u9633\u533a ","215"],["218","\u56fa\u5b89\u53bf ","215"],["219","\u6c38\u6e05\u53bf ","215"],["220","\u9999\u6cb3\u53bf ","215"],["221","\u5927\u57ce\u53bf ","215"],["222","\u6587\u5b89\u53bf ","215"],["223","\u5927\u5382\u56de\u65cf\u81ea\u6cbb\u53bf ","215"],["224","\u5f00\u53d1\u533a ","215"],["225","\u71d5\u90ca\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","215"],["226","\u9738\u5dde\u5e02 ","215"],["227","\u4e09\u6cb3\u5e02 ","215"],["229","\u8861\u6c34\u5e02 ","34"],["230","\u6843\u57ce\u533a ","229"],["231","\u67a3\u5f3a\u53bf ","229"],["232","\u6b66\u9091\u53bf ","229"],["233","\u6b66\u5f3a\u53bf ","229"],["234","\u9976\u9633\u53bf ","229"],["235","\u5b89\u5e73\u53bf ","229"],["236","\u6545\u57ce\u53bf ","229"],["237","\u666f\u53bf ","229"],["238","\u961c\u57ce\u53bf ","229"],["239","\u5180\u5dde\u5e02 ","229"],["240","\u6df1\u5dde\u5e02 ","229"],["1","\u5c71\u897f\u7701 ","0"],["243","\u592a\u539f\u5e02 ","1"],["244","\u5c0f\u5e97\u533a ","243"],["245","\u8fce\u6cfd\u533a ","243"],["246","\u674f\u82b1\u5cad\u533a ","243"],["247","\u5c16\u8349\u576a\u533a ","243"],["248","\u4e07\u67cf\u6797\u533a ","243"],["249","\u664b\u6e90\u533a ","243"],["250","\u6e05\u5f90\u53bf ","243"],["251","\u9633\u66f2\u53bf ","243"],["252","\u5a04\u70e6\u53bf ","243"],["253","\u53e4\u4ea4\u5e02 ","243"],["255","\u5927\u540c\u5e02 ","1"],["256","\u57ce\u533a ","255"],["257","\u77ff\u533a ","255"],["258","\u5357\u90ca\u533a ","255"],["259","\u65b0\u8363\u533a ","255"],["260","\u9633\u9ad8\u53bf ","255"],["261","\u5929\u9547\u53bf ","255"],["262","\u5e7f\u7075\u53bf ","255"],["263","\u7075\u4e18\u53bf ","255"],["264","\u6d51\u6e90\u53bf ","255"],["265","\u5de6\u4e91\u53bf ","255"],["266","\u5927\u540c\u53bf ","255"],["268","\u9633\u6cc9\u5e02 ","1"],["269","\u57ce\u533a ","268"],["798","\u5b9d\u6e05\u53bf ","791"],["799","\u9976\u6cb3\u53bf ","791"],["801","\u5927\u5e86\u5e02 ","4"],["802","\u8428\u5c14\u56fe\u533a ","801"],["803","\u9f99\u51e4\u533a ","801"],["804","\u8ba9\u80e1\u8def\u533a ","801"],["805","\u7ea2\u5c97\u533a ","801"],["806","\u5927\u540c\u533a ","801"],["807","\u8087\u5dde\u53bf ","801"],["808","\u8087\u6e90\u53bf ","801"],["809","\u6797\u7538\u53bf ","801"],["810","\u675c\u5c14\u4f2f\u7279\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","801"],["812","\u4f0a\u6625\u5e02 ","4"],["813","\u4f0a\u6625\u533a ","812"],["814","\u5357\u5c94\u533a ","812"],["815","\u53cb\u597d\u533a ","812"],["816","\u897f\u6797\u533a ","812"],["817","\u7fe0\u5ce6\u533a ","812"],["818","\u65b0\u9752\u533a ","812"],["819","\u7f8e\u6eaa\u533a ","812"],["820","\u91d1\u5c71\u5c6f\u533a ","812"],["821","\u4e94\u8425\u533a ","812"],["822","\u4e4c\u9a6c\u6cb3\u533a ","812"],["823","\u6c64\u65fa\u6cb3\u533a ","812"],["824","\u5e26\u5cad\u533a ","812"],["825","\u4e4c\u4f0a\u5cad\u533a ","812"],["826","\u7ea2\u661f\u533a ","812"],["827","\u4e0a\u7518\u5cad\u533a ","812"],["828","\u5609\u836b\u53bf ","812"],["829","\u94c1\u529b\u5e02 ","812"],["831","\u4f73\u6728\u65af\u5e02 ","4"],["832","\u6c38\u7ea2\u533a ","831"],["833","\u5411\u9633\u533a ","831"],["834","\u524d\u8fdb\u533a ","831"],["835","\u4e1c\u98ce\u533a ","831"],["836","\u90ca\u533a ","831"],["837","\u6866\u5357\u53bf ","831"],["838"," \u6866\u5ddd\u53bf ","831"],["839","\u6c64\u539f\u53bf ","831"],["840","\u629a\u8fdc\u53bf ","831"],["841","\u540c\u6c5f\u5e02 ","831"],["842","\u5bcc\u9526\u5e02 ","831"],["844","\u4e03\u53f0\u6cb3\u5e02 ","4"],["845","\u65b0\u5174\u533a ","844"],["846","\u6843\u5c71\u533a ","844"],["847","\u8304\u5b50\u6cb3\u533a ","844"],["848","\u52c3\u5229\u53bf ","844"],["850","\u7261\u4e39\u6c5f\u5e02 ","4"],["851","\u4e1c\u5b89\u533a ","850"],["852","\u9633\u660e\u533a ","850"],["853","\u7231\u6c11\u533a ","850"],["854","\u897f\u5b89\u533a ","850"],["855","\u4e1c\u5b81\u53bf ","850"],["856","\u6797\u53e3\u53bf ","850"],["857","\u7ee5\u82ac\u6cb3\u5e02 ","850"],["858","\u6d77\u6797\u5e02 ","850"],["859","\u5b81\u5b89\u5e02 ","850"],["860","\u7a46\u68f1\u5e02 ","850"],["862","\u9ed1\u6cb3\u5e02 ","4"],["863","\u7231\u8f89\u533a ","862"],["335","\u5ffb\u5dde\u5e02 ","1"],["336","\u5ffb\u5e9c\u533a ","335"],["337","\u5b9a\u8944\u53bf ","335"],["338","\u4e94\u53f0\u53bf ","335"],["339","\u4ee3\u53bf ","335"],["340","\u7e41\u5cd9\u53bf ","335"],["341","\u5b81\u6b66\u53bf ","335"],["342","\u9759\u4e50\u53bf ","335"],["343","\u795e\u6c60\u53bf ","335"],["344","\u4e94\u5be8\u53bf ","335"],["345","\u5ca2\u5c9a\u53bf ","335"],["346","\u6cb3\u66f2\u53bf ","335"],["347","\u4fdd\u5fb7\u53bf ","335"],["348","\u504f\u5173\u53bf ","335"],["349","\u539f\u5e73\u5e02 ","335"],["351","\u4e34\u6c7e\u5e02 ","1"],["352","\u5c27\u90fd\u533a ","351"],["353","\u66f2\u6c83\u53bf ","351"],["354","\u7ffc\u57ce\u53bf ","351"],["355","\u8944\u6c7e\u53bf ","351"],["356","\u6d2a\u6d1e\u53bf ","351"],["357","\u53e4\u53bf ","351"],["358","\u5b89\u6cfd\u53bf ","351"],["359","\u6d6e\u5c71\u53bf ","351"],["360","\u5409\u53bf ","351"],["361","\u4e61\u5b81\u53bf ","351"],["362"," \u5927\u5b81\u53bf ","351"],["363","\u96b0\u53bf ","351"],["364","\u6c38\u548c\u53bf ","351"],["365","\u84b2\u53bf ","351"],["366","\u6c7e\u897f\u53bf ","351"],["367","\u4faf\u9a6c\u5e02 ","351"],["368","\u970d\u5dde\u5e02 ","351"],["370","\u5415\u6881\u5e02 ","1"],["371","\u79bb\u77f3\u533a ","370"],["372","\u6587\u6c34\u53bf ","370"],["373","\u4ea4\u57ce\u53bf ","370"],["374","\u5174\u53bf ","370"],["375","\u4e34\u53bf ","370"],["376","\u67f3\u6797\u53bf ","370"],["377","\u77f3\u697c\u53bf ","370"],["378","\u5c9a\u53bf ","370"],["379","\u65b9\u5c71\u53bf ","370"],["380","\u4e2d\u9633\u53bf ","370"],["381","\u4ea4\u53e3\u53bf ","370"],["382","\u5b5d\u4e49\u5e02 ","370"],["383","\u6c7e\u9633\u5e02 ","370"],["23","\u5185\u8499\u53e4\u81ea\u6cbb\u533a ","0"],["386","\u547c\u548c\u6d69\u7279\u5e02 ","23"],["387","\u65b0\u57ce\u533a ","386"],["388","\u56de\u6c11\u533a ","386"],["389","\u7389\u6cc9\u533a ","386"],["390","\u8d5b\u7f55\u533a ","386"],["391","\u571f\u9ed8\u7279\u5de6\u65d7 ","386"],["392","\u6258\u514b\u6258\u53bf ","386"],["393","\u548c\u6797\u683c\u5c14\u53bf ","386"],["394","\u6e05\u6c34\u6cb3\u53bf ","386"],["395","\u6b66\u5ddd\u53bf ","386"],["397","\u5305\u5934\u5e02 ","23"],["398","\u4e1c\u6cb3\u533a ","397"],["399","\u6606\u90fd\u4ed1\u533a ","397"],["400","\u9752\u5c71\u533a ","397"],["401","\u77f3\u62d0\u533a ","397"],["402","\u767d\u4e91\u77ff\u533a ","397"],["403","\u4e5d\u539f\u533a ","397"],["404","\u571f\u9ed8\u7279\u53f3\u65d7 ","397"],["405","\u56fa\u9633\u53bf ","397"],["406","\u8fbe\u5c14\u7f55\u8302\u660e\u5b89\u8054\u5408\u65d7 ","397"],["408","\u4e4c\u6d77\u5e02 ","23"],["409","\u6d77\u52c3\u6e7e\u533a ","408"],["410","\u6d77\u5357\u533a ","408"],["411","\u4e4c\u8fbe\u533a ","408"],["413","\u8d64\u5cf0\u5e02 ","23"],["414","\u7ea2\u5c71\u533a ","413"],["415","\u5143\u5b9d\u5c71\u533a ","413"],["416","\u677e\u5c71\u533a ","413"],["417","\u963f\u9c81\u79d1\u5c14\u6c81\u65d7 ","413"],["418","\u5df4\u6797\u5de6\u65d7 ","413"],["419","\u5df4\u6797\u53f3\u65d7 ","413"],["420","\u6797\u897f\u53bf ","413"],["421","\u514b\u4ec0\u514b\u817e\u65d7 ","413"],["422","\u7fc1\u725b\u7279\u65d7 ","413"],["423","\u5580\u5587\u6c81\u65d7 ","413"],["424","\u5b81\u57ce\u53bf ","413"],["425","\u6556\u6c49\u65d7 ","413"],["427","\u901a\u8fbd\u5e02 ","23"],["428","\u79d1\u5c14\u6c81\u533a ","427"],["429","\u79d1\u5c14\u6c81\u5de6\u7ffc\u4e2d\u65d7 ","427"],["430","\u79d1\u5c14\u6c81\u5de6\u7ffc\u540e\u65d7 ","427"],["431","\u5f00\u9c81\u53bf ","427"],["432","\u5e93\u4f26\u65d7 ","427"],["433","\u5948\u66fc\u65d7 ","427"],["434","\u624e\u9c81\u7279\u65d7 ","427"],["435","\u970d\u6797\u90ed\u52d2\u5e02 ","427"],["437","\u9102\u5c14\u591a\u65af\u5e02 ","23"],["438","\u4e1c\u80dc\u533a ","437"],["439","\u8fbe\u62c9\u7279\u65d7 ","437"],["440","\u51c6\u683c\u5c14\u65d7 ","437"],["441","\u9102\u6258\u514b\u524d\u65d7 ","437"],["442","\u9102\u6258\u514b\u65d7 ","437"],["443","\u676d\u9526\u65d7 ","437"],["444","\u4e4c\u5ba1\u65d7 ","437"],["445","\u4f0a\u91d1\u970d\u6d1b\u65d7 ","437"],["447","\u547c\u4f26\u8d1d\u5c14\u5e02 ","23"],["448","\u6d77\u62c9\u5c14\u533a ","447"],["449","\u963f\u8363\u65d7 ","447"],["450","\u83ab\u529b\u8fbe\u74e6\u8fbe\u65a1\u5c14\u65cf\u81ea\u6cbb\u65d7 ","447"],["451","\u9102\u4f26\u6625\u81ea\u6cbb\u65d7 ","447"],["452","\u9102\u6e29\u514b\u65cf\u81ea\u6cbb\u65d7 ","447"],["453","\u9648\u5df4\u5c14\u864e\u65d7 ","447"],["454","\u65b0\u5df4\u5c14\u864e\u5de6\u65d7 ","447"],["455","\u65b0\u5df4\u5c14\u864e\u53f3\u65d7 ","447"],["456","\u6ee1\u6d32\u91cc\u5e02 ","447"],["457","\u7259\u514b\u77f3\u5e02 ","447"],["458","\u624e\u5170\u5c6f\u5e02 ","447"],["459","\u989d\u5c14\u53e4\u7eb3\u5e02 ","447"],["460","\u6839\u6cb3\u5e02 ","447"],["462","\u5df4\u5f66\u6dd6\u5c14\u5e02 ","23"],["463","\u4e34\u6cb3\u533a ","462"],["464","\u4e94\u539f\u53bf ","462"],["465","\u78f4\u53e3\u53bf ","462"],["466","\u4e4c\u62c9\u7279\u524d\u65d7 ","462"],["467","\u4e4c\u62c9\u7279\u4e2d\u65d7 ","462"],["468","\u4e4c\u62c9\u7279\u540e\u65d7 ","462"],["469","\u676d\u9526\u540e\u65d7 ","462"],["471","\u4e4c\u5170\u5bdf\u5e03\u5e02 ","23"],["472","\u96c6\u5b81\u533a ","471"],["473","\u5353\u8d44\u53bf ","471"],["474","\u5316\u5fb7\u53bf ","471"],["475","\u5546\u90fd\u53bf ","471"],["476","\u5174\u548c\u53bf ","471"],["477","\u51c9\u57ce\u53bf ","471"],["478","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u524d\u65d7 ","471"],["479","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u4e2d\u65d7 ","471"],["480","\u5bdf\u54c8\u5c14\u53f3\u7ffc\u540e\u65d7 ","471"],["481","\u56db\u5b50\u738b\u65d7 ","471"],["482","\u4e30\u9547\u5e02 ","471"],["484","\u5174\u5b89\u76df ","23"],["485","\u4e4c\u5170\u6d69\u7279\u5e02 ","484"],["486","\u963f\u5c14\u5c71\u5e02 ","484"],["487","\u79d1\u5c14\u6c81\u53f3\u7ffc\u524d\u65d7 ","484"],["488","\u79d1\u5c14\u6c81\u53f3\u7ffc\u4e2d\u65d7 ","484"],["489","\u624e\u8d49\u7279\u65d7 ","484"],["490","\u7a81\u6cc9\u53bf ","484"],["492","\u9521\u6797\u90ed\u52d2\u76df ","23"],["493","\u4e8c\u8fde\u6d69\u7279\u5e02 ","492"],["494","\u9521\u6797\u6d69\u7279\u5e02 ","492"],["495","\u963f\u5df4\u560e\u65d7 ","492"],["496","\u82cf\u5c3c\u7279\u5de6\u65d7 ","492"],["497","\u82cf\u5c3c\u7279\u53f3\u65d7 ","492"],["498","\u4e1c\u4e4c\u73e0\u7a46\u6c81\u65d7 ","492"],["499","\u897f\u4e4c\u73e0\u7a46\u6c81\u65d7 ","492"],["500","\u592a\u4ec6\u5bfa\u65d7 ","492"],["501","\u9576\u9ec4\u65d7 ","492"],["502","\u6b63\u9576\u767d\u65d7 ","492"],["503","\u6b63\u84dd\u65d7 ","492"],["504","\u591a\u4f26\u53bf ","492"],["506","\u963f\u62c9\u5584\u76df ","23"],["507","\u963f\u62c9\u5584\u5de6\u65d7 ","506"],["508","\u963f\u62c9\u5584\u53f3\u65d7 ","506"],["509","\u989d\u6d4e\u7eb3\u65d7 ","506"],["2","\u8fbd\u5b81\u7701 ","0"],["512","\u6c88\u9633\u5e02 ","2"],["513","\u548c\u5e73\u533a ","512"],["514","\u6c88\u6cb3\u533a ","512"],["515","\u5927\u4e1c\u533a ","512"],["516","\u7687\u59d1\u533a ","512"],["517","\u94c1\u897f\u533a ","512"],["518","\u82cf\u5bb6\u5c6f\u533a ","512"],["519","\u4e1c\u9675\u533a ","512"],["520","\u65b0\u57ce\u5b50\u533a ","512"],["521","\u4e8e\u6d2a\u533a ","512"],["522","\u8fbd\u4e2d\u53bf ","512"],["523","\u5eb7\u5e73\u53bf ","512"],["524","\u6cd5\u5e93\u53bf ","512"],["525","\u65b0\u6c11\u5e02 ","512"],["526","\u6d51\u5357\u65b0\u533a ","512"],["527","\u5f20\u58eb\u5f00\u53d1\u533a ","512"],["528","\u6c88\u5317\u65b0\u533a ","512"],["530","\u5927\u8fde\u5e02 ","2"],["531","\u4e2d\u5c71\u533a ","530"],["532","\u897f\u5c97\u533a ","530"],["533","\u6c99\u6cb3\u53e3\u533a ","530"],["534","\u7518\u4e95\u5b50\u533a ","530"],["535","\u65c5\u987a\u53e3\u533a ","530"],["536","\u91d1\u5dde\u533a ","530"],["537","\u957f\u6d77\u53bf ","530"],["538","\u5f00\u53d1\u533a ","530"],["539","\u74e6\u623f\u5e97\u5e02 ","530"],["540","\u666e\u5170\u5e97\u5e02 ","530"],["541","\u5e84\u6cb3\u5e02 ","530"],["542","\u5cad\u524d\u533a ","530"],["544","\u978d\u5c71\u5e02 ","2"],["545","\u94c1\u4e1c\u533a ","544"],["546","\u94c1\u897f\u533a ","544"],["547","\u7acb\u5c71\u533a ","544"],["548","\u5343\u5c71\u533a ","544"],["549","\u53f0\u5b89\u53bf ","544"],["550","\u5cab\u5ca9\u6ee1\u65cf\u81ea\u6cbb\u53bf ","544"],["551","\u9ad8\u65b0\u533a ","544"],["552","\u6d77\u57ce\u5e02 ","544"],["554","\u629a\u987a\u5e02 ","2"],["555","\u65b0\u629a\u533a ","554"],["556","\u4e1c\u6d32\u533a ","554"],["557","\u671b\u82b1\u533a ","554"],["558","\u987a\u57ce\u533a ","554"],["559","\u629a\u987a\u53bf ","554"],["560","\u65b0\u5bbe\u6ee1\u65cf\u81ea\u6cbb\u53bf ","554"],["561","\u6e05\u539f\u6ee1\u65cf\u81ea\u6cbb\u53bf ","554"],["563","\u672c\u6eaa\u5e02 ","2"],["564","\u5e73\u5c71\u533a ","563"],["565","\u6eaa\u6e56\u533a ","563"],["566","\u660e\u5c71\u533a ","563"],["567","\u5357\u82ac\u533a ","563"],["568","\u672c\u6eaa\u6ee1\u65cf\u81ea\u6cbb\u53bf ","563"],["569","\u6853\u4ec1\u6ee1\u65cf\u81ea\u6cbb\u53bf ","563"],["571","\u4e39\u4e1c\u5e02 ","2"],["572","\u5143\u5b9d\u533a ","571"],["573","\u632f\u5174\u533a ","571"],["574","\u632f\u5b89\u533a ","571"],["575","\u5bbd\u7538\u6ee1\u65cf\u81ea\u6cbb\u53bf ","571"],["576","\u4e1c\u6e2f\u5e02 ","571"],["577","\u51e4\u57ce\u5e02 ","571"],["579","\u9526\u5dde\u5e02 ","2"],["580","\u53e4\u5854\u533a ","579"],["581","\u51cc\u6cb3\u533a ","579"],["582","\u592a\u548c\u533a ","579"],["583","\u9ed1\u5c71\u53bf ","579"],["584","\u4e49\u53bf ","579"],["585","\u51cc\u6d77\u5e02 ","579"],["586"," \u5317\u9547\u5e02 ","579"],["588","\u8425\u53e3\u5e02 ","2"],["589","\u7ad9\u524d\u533a ","588"],["590","\u897f\u5e02\u533a ","588"],["591","\u9c85\u9c7c\u5708\u533a ","588"],["592","\u8001\u8fb9\u533a ","588"],["593","\u76d6\u5dde\u5e02 ","588"],["594","\u5927\u77f3\u6865\u5e02 ","588"],["596","\u961c\u65b0\u5e02 ","2"],["597","\u6d77\u5dde\u533a ","596"],["598","\u65b0\u90b1\u533a ","596"],["599","\u592a\u5e73\u533a ","596"],["600","\u6e05\u6cb3\u95e8\u533a ","596"],["601","\u7ec6\u6cb3\u533a ","596"],["602","\u961c\u65b0\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","596"],["603","\u5f70\u6b66\u53bf ","596"],["605","\u8fbd\u9633\u5e02 ","2"],["606","\u767d\u5854\u533a ","605"],["607","\u6587\u5723\u533a ","605"],["608","\u5b8f\u4f1f\u533a ","605"],["609","\u5f13\u957f\u5cad\u533a ","605"],["610","\u592a\u5b50\u6cb3\u533a ","605"],["611","\u8fbd\u9633\u53bf ","605"],["612","\u706f\u5854\u5e02 ","605"],["614","\u76d8\u9526\u5e02 ","2"],["615","\u53cc\u53f0\u5b50\u533a ","614"],["616","\u5174\u9686\u53f0\u533a ","614"],["617","\u5927\u6d3c\u53bf ","614"],["618","\u76d8\u5c71\u53bf ","614"],["620","\u94c1\u5cad\u5e02 ","2"],["621","\u94f6\u5dde\u533a ","620"],["622","\u6e05\u6cb3\u533a ","620"],["623","\u94c1\u5cad\u53bf ","620"],["624","\u897f\u4e30\u53bf ","620"],["625","\u660c\u56fe\u53bf ","620"],["626","\u8c03\u5175\u5c71\u5e02 ","620"],["627","\u5f00\u539f\u5e02 ","620"],["629","\u671d\u9633\u5e02 ","2"],["630","\u53cc\u5854\u533a ","629"],["631","\u9f99\u57ce\u533a ","629"],["632","\u671d\u9633\u53bf ","629"],["633","\u5efa\u5e73\u53bf ","629"],["634","\u5580\u5587\u6c81\u5de6\u7ffc\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","629"],["635","\u5317\u7968\u5e02 ","629"],["636","\u51cc\u6e90\u5e02 ","629"],["638","\u846b\u82a6\u5c9b\u5e02 ","2"],["639","\u8fde\u5c71\u533a ","638"],["640","\u9f99\u6e2f\u533a ","638"],["641","\u5357\u7968\u533a ","638"],["642","\u7ee5\u4e2d\u53bf ","638"],["643","\u5efa\u660c\u53bf ","638"],["644","\u5174\u57ce\u5e02 ","638"],["3","\u5409\u6797\u7701 ","0"],["647","\u957f\u6625\u5e02 ","3"],["648","\u5357\u5173\u533a ","647"],["649","\u5bbd\u57ce\u533a ","647"],["650","\u671d\u9633\u533a ","647"],["651","\u4e8c\u9053\u533a ","647"],["652","\u7eff\u56ed\u533a ","647"],["653","\u53cc\u9633\u533a ","647"],["654","\u519c\u5b89\u53bf ","647"],["655","\u4e5d\u53f0\u5e02 ","647"],["656","\u6986\u6811\u5e02 ","647"],["657","\u5fb7\u60e0\u5e02 ","647"],["658","\u9ad8\u65b0\u6280\u672f\u4ea7\u4e1a\u5f00\u53d1\u533a ","647"],["659","\u6c7d\u8f66\u4ea7\u4e1a\u5f00\u53d1\u533a ","647"],["660","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","647"],["661","\u51c0\u6708\u65c5\u6e38\u5f00\u53d1\u533a ","647"],["663","\u5409\u6797\u5e02 ","3"],["664","\u660c\u9091\u533a ","663"],["665","\u9f99\u6f6d\u533a ","663"],["666","\u8239\u8425\u533a ","663"],["667","\u4e30\u6ee1\u533a ","663"],["668","\u6c38\u5409\u53bf ","663"],["669","\u86df\u6cb3\u5e02 ","663"],["670","\u6866\u7538\u5e02 ","663"],["671","\u8212\u5170\u5e02 ","663"],["672","\u78d0\u77f3\u5e02 ","663"],["674","\u56db\u5e73\u5e02 ","3"],["675","\u94c1\u897f\u533a ","674"],["676","\u94c1\u4e1c\u533a ","674"],["677","\u68a8\u6811\u53bf ","674"],["678","\u4f0a\u901a\u6ee1\u65cf\u81ea\u6cbb\u53bf ","674"],["679","\u516c\u4e3b\u5cad\u5e02 ","674"],["680","\u53cc\u8fbd\u5e02 ","674"],["682","\u8fbd\u6e90\u5e02 ","3"],["683","\u9f99\u5c71\u533a ","682"],["684","\u897f\u5b89\u533a ","682"],["685","\u4e1c\u4e30\u53bf ","682"],["686","\u4e1c\u8fbd\u53bf ","682"],["688","\u901a\u5316\u5e02 ","3"],["689","\u4e1c\u660c\u533a ","688"],["690","\u4e8c\u9053\u6c5f\u533a ","688"],["691","\u901a\u5316\u53bf ","688"],["692","\u8f89\u5357\u53bf ","688"],["693","\u67f3\u6cb3\u53bf ","688"],["694","\u6885\u6cb3\u53e3\u5e02 ","688"],["695","\u96c6\u5b89\u5e02 ","688"],["697","\u767d\u5c71\u5e02 ","3"],["698","\u516b\u9053\u6c5f\u533a ","697"],["699","\u629a\u677e\u53bf ","697"],["700","\u9756\u5b87\u53bf ","697"],["701","\u957f\u767d\u671d\u9c9c\u65cf\u81ea\u6cbb\u53bf ","697"],["702","\u6c5f\u6e90\u53bf ","697"],["703","\u4e34\u6c5f\u5e02 ","697"],["705","\u677e\u539f\u5e02 ","3"],["706","\u5b81\u6c5f\u533a ","705"],["707","\u524d\u90ed\u5c14\u7f57\u65af\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","705"],["708","\u957f\u5cad\u53bf ","705"],["709","\u4e7e\u5b89\u53bf ","705"],["710","\u6276\u4f59\u53bf ","705"],["712","\u767d\u57ce\u5e02 ","3"],["713","\u6d2e\u5317\u533a ","712"],["714","\u9547\u8d49\u53bf ","712"],["715","\u901a\u6986\u53bf ","712"],["716","\u6d2e\u5357\u5e02 ","712"],["717","\u5927\u5b89\u5e02 ","712"],["719","\u5ef6\u8fb9\u671d\u9c9c\u65cf\u81ea\u6cbb\u5dde ","3"],["720","\u5ef6\u5409\u5e02 ","719"],["721","\u56fe\u4eec\u5e02 ","719"],["722","\u6566\u5316\u5e02 ","719"],["723","\u73f2\u6625\u5e02 ","719"],["724","\u9f99\u4e95\u5e02 ","719"],["725","\u548c\u9f99\u5e02 ","719"],["726","\u6c6a\u6e05\u53bf ","719"],["727","\u5b89\u56fe\u53bf ","719"],["4","\u9ed1\u9f99\u6c5f\u7701 ","0"],["730","\u54c8\u5c14\u6ee8\u5e02 ","4"],["731","\u9053\u91cc\u533a ","730"],["732","\u5357\u5c97\u533a ","730"],["733","\u9053\u5916\u533a ","730"],["734","\u9999\u574a\u533a ","730"],["735","\u52a8\u529b\u533a ","730"],["736","\u5e73\u623f\u533a ","730"],["737","\u677e\u5317\u533a ","730"],["738","\u547c\u5170\u533a ","730"],["739","\u4f9d\u5170\u53bf ","730"],["740","\u65b9\u6b63\u53bf ","730"],["741","\u5bbe\u53bf ","730"],["742","\u5df4\u5f66\u53bf ","730"],["743","\u6728\u5170\u53bf ","730"],["744","\u901a\u6cb3\u53bf ","730"],["745","\u5ef6\u5bff\u53bf ","730"],["746","\u963f\u57ce\u5e02 ","730"],["747","\u53cc\u57ce\u5e02 ","730"],["748","\u5c1a\u5fd7\u5e02 ","730"],["749","\u4e94\u5e38\u5e02 ","730"],["752","\u9f50\u9f50\u54c8\u5c14\u5e02 ","4"],["753","\u9f99\u6c99\u533a ","752"],["754","\u5efa\u534e\u533a ","752"],["755","\u94c1\u950b\u533a ","752"],["756","\u6602\u6602\u6eaa\u533a ","752"],["757","\u5bcc\u62c9\u5c14\u57fa\u533a ","752"],["758","\u78be\u5b50\u5c71\u533a ","752"],["759","\u6885\u91cc\u65af\u8fbe\u65a1\u5c14\u65cf\u533a ","752"],["760","\u9f99\u6c5f\u53bf ","752"],["761","\u4f9d\u5b89\u53bf ","752"],["762","\u6cf0\u6765\u53bf ","752"],["763","\u7518\u5357\u53bf ","752"],["764","\u5bcc\u88d5\u53bf ","752"],["765","\u514b\u5c71\u53bf ","752"],["766","\u514b\u4e1c\u53bf ","752"],["767","\u62dc\u6cc9\u53bf ","752"],["768","\u8bb7\u6cb3\u5e02 ","752"],["770","\u9e21\u897f\u5e02 ","4"],["771","\u9e21\u51a0\u533a ","770"],["772","\u6052\u5c71\u533a ","770"],["773","\u6ef4\u9053\u533a ","770"],["774","\u68a8\u6811\u533a ","770"],["775","\u57ce\u5b50\u6cb3\u533a ","770"],["776","\u9ebb\u5c71\u533a ","770"],["777","\u9e21\u4e1c\u53bf ","770"],["778","\u864e\u6797\u5e02 ","770"],["779","\u5bc6\u5c71\u5e02 ","770"],["781","\u9e64\u5c97\u5e02 ","4"],["782","\u5411\u9633\u533a ","781"],["783","\u5de5\u519c\u533a ","781"],["784","\u5357\u5c71\u533a ","781"],["785","\u5174\u5b89\u533a ","781"],["786","\u4e1c\u5c71\u533a ","781"],["787","\u5174\u5c71\u533a ","781"],["788","\u841d\u5317\u53bf ","781"],["789","\u7ee5\u6ee8\u53bf ","781"],["791","\u53cc\u9e2d\u5c71\u5e02 ","4"],["792","\u5c16\u5c71\u533a ","791"],["793","\u5cad\u4e1c\u533a ","791"],["794","\u56db\u65b9\u53f0\u533a ","791"],["795","\u5b9d\u5c71\u533a ","791"],["796","\u96c6\u8d24\u53bf ","791"],["797","\u53cb\u8c0a\u53bf ","791"],["1063","\u4e34\u5b89\u5e02 ","1050"],["1065","\u5b81\u6ce2\u5e02 ","6"],["1066","\u6d77\u66d9\u533a ","1065"],["1067","\u6c5f\u4e1c\u533a ","1065"],["1068","\u6c5f\u5317\u533a ","1065"],["1069","\u5317\u4ed1\u533a ","1065"],["1070","\u9547\u6d77\u533a ","1065"],["1071","\u911e\u5dde\u533a ","1065"],["1072","\u8c61\u5c71\u53bf ","1065"],["1073","\u5b81\u6d77\u53bf ","1065"],["1074","\u4f59\u59da\u5e02 ","1065"],["1075","\u6148\u6eaa\u5e02 ","1065"],["1076","\u5949\u5316\u5e02 ","1065"],["1078","\u6e29\u5dde\u5e02 ","6"],["1079","\u9e7f\u57ce\u533a ","1078"],["1080","\u9f99\u6e7e\u533a ","1078"],["1081","\u74ef\u6d77\u533a ","1078"],["1082","\u6d1e\u5934\u53bf ","1078"],["1083","\u6c38\u5609\u53bf ","1078"],["1084","\u5e73\u9633\u53bf ","1078"],["1085","\u82cd\u5357\u53bf ","1078"],["1086","\u6587\u6210\u53bf ","1078"],["1087","\u6cf0\u987a\u53bf ","1078"],["1088","\u745e\u5b89\u5e02 ","1078"],["1089","\u4e50\u6e05\u5e02 ","1078"],["1091","\u5609\u5174\u5e02 ","6"],["1092","\u5357\u6e56\u533a ","1091"],["1093","\u79c0\u6d32\u533a ","1091"],["1094","\u5609\u5584\u53bf ","1091"],["1095","\u6d77\u76d0\u53bf ","1091"],["1096","\u6d77\u5b81\u5e02 ","1091"],["1097","\u5e73\u6e56\u5e02 ","1091"],["1098","\u6850\u4e61\u5e02 ","1091"],["1100","\u6e56\u5dde\u5e02 ","6"],["1101","\u5434\u5174\u533a ","1100"],["1102","\u5357\u6d54\u533a ","1100"],["1103","\u5fb7\u6e05\u53bf ","1100"],["1104","\u957f\u5174\u53bf ","1100"],["1105","\u5b89\u5409\u53bf ","1100"],["1107","\u7ecd\u5174\u5e02 ","6"],["1108","\u8d8a\u57ce\u533a ","1107"],["1109","\u7ecd\u5174\u53bf ","1107"],["1110","\u65b0\u660c\u53bf ","1107"],["1111","\u8bf8\u66a8\u5e02 ","1107"],["1112","\u4e0a\u865e\u5e02 ","1107"],["1113","\u5d4a\u5dde\u5e02 ","1107"],["1115","\u91d1\u534e\u5e02 ","6"],["1116","\u5a7a\u57ce\u533a ","1115"],["1117","\u91d1\u4e1c\u533a ","1115"],["1118","\u6b66\u4e49\u53bf ","1115"],["1119","\u6d66\u6c5f\u53bf ","1115"],["1120","\u78d0\u5b89\u53bf ","1115"],["1121","\u5170\u6eaa\u5e02 ","1115"],["1122","\u4e49\u4e4c\u5e02 ","1115"],["1123","\u4e1c\u9633\u5e02 ","1115"],["1124","\u6c38\u5eb7\u5e02 ","1115"],["1126","\u8862\u5dde\u5e02 ","6"],["1127","\u67ef\u57ce\u533a ","1126"],["1128","\u8862\u6c5f\u533a ","1126"],["1129","\u5e38\u5c71\u53bf ","1126"],["1262","\u7800\u5c71\u53bf ","1260"],["1263","\u8427\u53bf ","1260"],["1264","\u7075\u74a7\u53bf ","1260"],["1265","\u6cd7\u53bf ","1260"],["1267","\u5de2\u6e56\u5e02 ","7"],["1268","\u5c45\u5de2\u533a ","1267"],["1269","\u5e90\u6c5f\u53bf ","1267"],["1270","\u65e0\u4e3a\u53bf ","1267"],["1271","\u542b\u5c71\u53bf ","1267"],["1272","\u548c\u53bf ","1267"],["1274","\u516d\u5b89\u5e02 ","7"],["1275","\u91d1\u5b89\u533a ","1274"],["1276","\u88d5\u5b89\u533a ","1274"],["1277","\u5bff\u53bf ","1274"],["1278","\u970d\u90b1\u53bf ","1274"],["1279","\u8212\u57ce\u53bf ","1274"],["1280","\u91d1\u5be8\u53bf ","1274"],["1281","\u970d\u5c71\u53bf ","1274"],["1283","\u4eb3\u5dde\u5e02 ","7"],["1284","\u8c2f\u57ce\u533a ","1283"],["1285","\u6da1\u9633\u53bf ","1283"],["1286","\u8499\u57ce\u53bf ","1283"],["1287","\u5229\u8f9b\u53bf ","1283"],["1289","\u6c60\u5dde\u5e02 ","7"],["1290","\u8d35\u6c60\u533a ","1289"],["1291","\u4e1c\u81f3\u53bf ","1289"],["1292","\u77f3\u53f0\u53bf ","1289"],["1293","\u9752\u9633\u53bf ","1289"],["1295","\u5ba3\u57ce\u5e02 ","7"],["1296","\u5ba3\u5dde\u533a ","1295"],["1297","\u90ce\u6eaa\u53bf ","1295"],["1298","\u5e7f\u5fb7\u53bf ","1295"],["1299","\u6cfe\u53bf ","1295"],["1300"," \u7ee9\u6eaa\u53bf ","1295"],["1301","\u65cc\u5fb7\u53bf ","1295"],["1302","\u5b81\u56fd\u5e02 ","1295"],["8","\u798f\u5efa\u7701 ","0"],["1305","\u798f\u5dde\u5e02 ","8"],["1306","\u9f13\u697c\u533a ","1305"],["1307","\u53f0\u6c5f\u533a ","1305"],["1308","\u4ed3\u5c71\u533a ","1305"],["1309","\u9a6c\u5c3e\u533a ","1305"],["1310","\u664b\u5b89\u533a ","1305"],["1311","\u95fd\u4faf\u53bf ","1305"],["1312","\u8fde\u6c5f\u53bf ","1305"],["1313","\u7f57\u6e90\u53bf ","1305"],["1314","\u95fd\u6e05\u53bf ","1305"],["1315","\u6c38\u6cf0\u53bf ","1305"],["1316","\u5e73\u6f6d\u53bf ","1305"],["1317","\u798f\u6e05\u5e02 ","1305"],["1318","\u957f\u4e50\u5e02 ","1305"],["1320","\u53a6\u95e8\u5e02 ","8"],["1321","\u601d\u660e\u533a ","1320"],["1322","\u6d77\u6ca7\u533a ","1320"],["1323","\u6e56\u91cc\u533a ","1320"],["1324","\u96c6\u7f8e\u533a ","1320"],["1325","\u540c\u5b89\u533a ","1320"],["1326","\u7fd4\u5b89\u533a ","1320"],["1130","\u5f00\u5316\u53bf ","1126"],["1131","\u9f99\u6e38\u53bf ","1126"],["1132","\u6c5f\u5c71\u5e02 ","1126"],["1134","\u821f\u5c71\u5e02 ","6"],["1135","\u5b9a\u6d77\u533a ","1134"],["1136","\u666e\u9640\u533a ","1134"],["1137","\u5cb1\u5c71\u53bf ","1134"],["1138","\u5d4a\u6cd7\u53bf ","1134"],["1140","\u53f0\u5dde\u5e02 ","6"],["1141","\u6912\u6c5f\u533a ","1140"],["1142","\u9ec4\u5ca9\u533a ","1140"],["1143","\u8def\u6865\u533a ","1140"],["1144","\u7389\u73af\u53bf ","1140"],["1145","\u4e09\u95e8\u53bf ","1140"],["1146","\u5929\u53f0\u53bf ","1140"],["1147","\u4ed9\u5c45\u53bf ","1140"],["1148","\u6e29\u5cad\u5e02 ","1140"],["1149","\u4e34\u6d77\u5e02 ","1140"],["1151","\u4e3d\u6c34\u5e02 ","6"],["1152","\u83b2\u90fd\u533a ","1151"],["1153","\u9752\u7530\u53bf ","1151"],["1154","\u7f19\u4e91\u53bf ","1151"],["1155","\u9042\u660c\u53bf ","1151"],["1156","\u677e\u9633\u53bf ","1151"],["1157","\u4e91\u548c\u53bf ","1151"],["1158","\u5e86\u5143\u53bf ","1151"],["1159","\u666f\u5b81\u7572\u65cf\u81ea\u6cbb\u53bf ","1151"],["1160","\u9f99\u6cc9\u5e02 ","1151"],["7","\u5b89\u5fbd\u7701 ","0"],["1163","\u5408\u80a5\u5e02 ","7"],["1164","\u7476\u6d77\u533a ","1163"],["1165","\u5e90\u9633\u533a ","1163"],["1166","\u8700\u5c71\u533a ","1163"],["1167","\u5305\u6cb3\u533a ","1163"],["1168","\u957f\u4e30\u53bf ","1163"],["1169","\u80a5\u4e1c\u53bf ","1163"],["1170","\u80a5\u897f\u53bf ","1163"],["1171","\u9ad8\u65b0\u533a ","1163"],["1172","\u4e2d\u533a ","1163"],["1174","\u829c\u6e56\u5e02 ","7"],["1175","\u955c\u6e56\u533a ","1174"],["1176","\u5f0b\u6c5f\u533a ","1174"],["1177","\u9e20\u6c5f\u533a ","1174"],["1178","\u4e09\u5c71\u533a ","1174"],["1179","\u829c\u6e56\u53bf ","1174"],["1180","\u7e41\u660c\u53bf ","1174"],["1181","\u5357\u9675\u53bf ","1174"],["1183","\u868c\u57e0\u5e02 ","7"],["1184","\u9f99\u5b50\u6e56\u533a ","1183"],["1185","\u868c\u5c71\u533a ","1183"],["1186","\u79b9\u4f1a\u533a ","1183"],["1187","\u6dee\u4e0a\u533a ","1183"],["1188","\u6000\u8fdc\u53bf ","1183"],["1189","\u4e94\u6cb3\u53bf ","1183"],["1190","\u56fa\u9547\u53bf ","1183"],["1192","\u6dee\u5357\u5e02 ","7"],["1193","\u5927\u901a\u533a ","1192"],["1194","\u7530\u5bb6\u5eb5\u533a ","1192"],["1195","\u8c22\u5bb6\u96c6\u533a ","1192"],["1196","\u516b\u516c\u5c71\u533a ","1192"],["1197","\u6f58\u96c6\u533a ","1192"],["1198","\u51e4\u53f0\u53bf ","1192"],["1200","\u9a6c\u978d\u5c71\u5e02 ","7"],["1201","\u91d1\u5bb6\u5e84\u533a ","1200"],["1202","\u82b1\u5c71\u533a ","1200"],["1203","\u96e8\u5c71\u533a ","1200"],["1204","\u5f53\u6d82\u53bf ","1200"],["1206","\u6dee\u5317\u5e02 ","7"],["1207","\u675c\u96c6\u533a ","1206"],["1208","\u76f8\u5c71\u533a ","1206"],["1209","\u70c8\u5c71\u533a ","1206"],["1210","\u6fc9\u6eaa\u53bf ","1206"],["1212","\u94dc\u9675\u5e02 ","7"],["1213","\u94dc\u5b98\u5c71\u533a ","1212"],["1214","\u72ee\u5b50\u5c71\u533a ","1212"],["1215","\u90ca\u533a ","1212"],["1216","\u94dc\u9675\u53bf ","1212"],["1218","\u5b89\u5e86\u5e02 ","7"],["1219","\u8fce\u6c5f\u533a ","1218"],["1220","\u5927\u89c2\u533a ","1218"],["1221","\u5b9c\u79c0\u533a ","1218"],["1222","\u6000\u5b81\u53bf ","1218"],["1223","\u679e\u9633\u53bf ","1218"],["1224","\u6f5c\u5c71\u53bf ","1218"],["1225","\u592a\u6e56\u53bf ","1218"],["1226","\u5bbf\u677e\u53bf ","1218"],["1227","\u671b\u6c5f\u53bf ","1218"],["1228","\u5cb3\u897f\u53bf ","1218"],["1229","\u6850\u57ce\u5e02 ","1218"],["1231","\u9ec4\u5c71\u5e02 ","7"],["1232","\u5c6f\u6eaa\u533a ","1231"],["1233","\u9ec4\u5c71\u533a ","1231"],["1234","\u5fbd\u5dde\u533a ","1231"],["1235","\u6b59\u53bf ","1231"],["1236"," \u4f11\u5b81\u53bf ","1231"],["1237","\u9edf\u53bf ","1231"],["1238","\u7941\u95e8\u53bf ","1231"],["1240","\u6ec1\u5dde\u5e02 ","7"],["1241","\u7405\u740a\u533a ","1240"],["1242","\u5357\u8c2f\u533a ","1240"],["1243","\u6765\u5b89\u53bf ","1240"],["1244","\u5168\u6912\u53bf ","1240"],["1245","\u5b9a\u8fdc\u53bf ","1240"],["1246","\u51e4\u9633\u53bf ","1240"],["1247","\u5929\u957f\u5e02 ","1240"],["1248","\u660e\u5149\u5e02 ","1240"],["1250","\u961c\u9633\u5e02 ","7"],["1251","\u988d\u5dde\u533a ","1250"],["1252"," \u988d\u4e1c\u533a ","1250"],["1253","\u988d\u6cc9\u533a ","1250"],["1254","\u4e34\u6cc9\u53bf ","1250"],["1255","\u592a\u548c\u53bf ","1250"],["1256","\u961c\u5357\u53bf ","1250"],["1257","\u988d\u4e0a\u53bf ","1250"],["1258","\u754c\u9996\u5e02 ","1250"],["1260","\u5bbf\u5dde\u5e02 ","7"],["1261","\u57c7\u6865\u533a ","1260"],["864","\u5ae9\u6c5f\u53bf ","862"],["865","\u900a\u514b\u53bf ","862"],["866","\u5b59\u5434\u53bf ","862"],["867","\u5317\u5b89\u5e02 ","862"],["868","\u4e94\u5927\u8fde\u6c60\u5e02 ","862"],["870","\u7ee5\u5316\u5e02 ","4"],["871","\u5317\u6797\u533a ","870"],["872","\u671b\u594e\u53bf ","870"],["873","\u5170\u897f\u53bf ","870"],["874","\u9752\u5188\u53bf ","870"],["875","\u5e86\u5b89\u53bf ","870"],["876","\u660e\u6c34\u53bf ","870"],["877","\u7ee5\u68f1\u53bf ","870"],["878","\u5b89\u8fbe\u5e02 ","870"],["879","\u8087\u4e1c\u5e02 ","870"],["880","\u6d77\u4f26\u5e02 ","870"],["882","\u5927\u5174\u5b89\u5cad\u5730\u533a ","4"],["883","\u547c\u739b\u53bf ","882"],["884","\u5854\u6cb3\u53bf ","882"],["885","\u6f20\u6cb3\u53bf ","882"],["886","\u52a0\u683c\u8fbe\u5947\u533a ","882"],["30","\u4e0a\u6d77 ","0"],["890","\u9ec4\u6d66\u533a ","30"],["891","\u5362\u6e7e\u533a ","30"],["892","\u5f90\u6c47\u533a ","30"],["893","\u957f\u5b81\u533a ","30"],["894","\u9759\u5b89\u533a ","30"],["895","\u666e\u9640\u533a ","30"],["896","\u95f8\u5317\u533a ","30"],["897","\u8679\u53e3\u533a ","30"],["898","\u6768\u6d66\u533a ","30"],["899","\u95f5\u884c\u533a ","30"],["900","\u5b9d\u5c71\u533a ","30"],["901","\u5609\u5b9a\u533a ","30"],["902","\u6d66\u4e1c\u65b0\u533a ","30"],["903","\u91d1\u5c71\u533a ","30"],["904","\u677e\u6c5f\u533a ","30"],["905","\u9752\u6d66\u533a ","30"],["906","\u5357\u6c47\u533a ","30"],["907","\u5949\u8d24\u533a ","30"],["908","\u5ddd\u6c99\u533a ","30"],["909","\u5d07\u660e\u53bf ","30"],["5","\u6c5f\u82cf\u7701 ","0"],["912","\u5357\u4eac\u5e02 ","5"],["913","\u7384\u6b66\u533a ","912"],["914","\u767d\u4e0b\u533a ","912"],["915","\u79e6\u6dee\u533a ","912"],["916","\u5efa\u90ba\u533a ","912"],["917","\u9f13\u697c\u533a ","912"],["918","\u4e0b\u5173\u533a ","912"],["919","\u6d66\u53e3\u533a ","912"],["920","\u6816\u971e\u533a ","912"],["921","\u96e8\u82b1\u53f0\u533a ","912"],["922","\u6c5f\u5b81\u533a ","912"],["923","\u516d\u5408\u533a ","912"],["924","\u6ea7\u6c34\u53bf ","912"],["925","\u9ad8\u6df3\u53bf ","912"],["927","\u65e0\u9521\u5e02 ","5"],["928","\u5d07\u5b89\u533a ","927"],["929","\u5357\u957f\u533a ","927"],["930","\u5317\u5858\u533a ","927"],["931","\u9521\u5c71\u533a ","927"],["932","\u60e0\u5c71\u533a ","927"],["933","\u6ee8\u6e56\u533a ","927"],["934","\u6c5f\u9634\u5e02 ","927"],["935","\u5b9c\u5174\u5e02 ","927"],["936","\u65b0\u533a ","927"],["938","\u5f90\u5dde\u5e02 ","5"],["939","\u9f13\u697c\u533a ","938"],["940","\u4e91\u9f99\u533a ","938"],["941","\u4e5d\u91cc\u533a ","938"],["942","\u8d3e\u6c6a\u533a ","938"],["943","\u6cc9\u5c71\u533a ","938"],["944","\u4e30\u53bf ","938"],["945","\u6c9b\u53bf ","938"],["946","\u94dc\u5c71\u53bf ","938"],["947","\u7762\u5b81\u53bf ","938"],["948","\u65b0\u6c82\u5e02 ","938"],["949","\u90b3\u5dde\u5e02 ","938"],["951","\u5e38\u5dde\u5e02 ","5"],["952","\u5929\u5b81\u533a ","951"],["953","\u949f\u697c\u533a ","951"],["954","\u621a\u5885\u5830\u533a ","951"],["955","\u65b0\u5317\u533a ","951"],["956","\u6b66\u8fdb\u533a ","951"],["957","\u6ea7\u9633\u5e02 ","951"],["958","\u91d1\u575b\u5e02 ","951"],["960","\u82cf\u5dde\u5e02 ","5"],["961","\u6ca7\u6d6a\u533a ","960"],["962","\u5e73\u6c5f\u533a ","960"],["963","\u91d1\u960a\u533a ","960"],["964","\u864e\u4e18\u533a ","960"],["965","\u5434\u4e2d\u533a ","960"],["966","\u76f8\u57ce\u533a ","960"],["967","\u5e38\u719f\u5e02 ","960"],["968","\u5f20\u5bb6\u6e2f\u5e02 ","960"],["969","\u6606\u5c71\u5e02 ","960"],["970","\u5434\u6c5f\u5e02 ","960"],["971","\u592a\u4ed3\u5e02 ","960"],["972","\u65b0\u533a ","960"],["973","\u56ed\u533a ","960"],["975","\u5357\u901a\u5e02 ","5"],["976","\u5d07\u5ddd\u533a ","975"],["977","\u6e2f\u95f8\u533a ","975"],["978","\u6d77\u5b89\u53bf ","975"],["979","\u5982\u4e1c\u53bf ","975"],["980","\u542f\u4e1c\u5e02 ","975"],["981","\u5982\u768b\u5e02 ","975"],["982","\u901a\u5dde\u5e02 ","975"],["983","\u6d77\u95e8\u5e02 ","975"],["984","\u5f00\u53d1\u533a ","975"],["986","\u8fde\u4e91\u6e2f\u5e02 ","5"],["987","\u8fde\u4e91\u533a ","986"],["988","\u65b0\u6d66\u533a ","986"],["989","\u6d77\u5dde\u533a ","986"],["990","\u8d63\u6986\u53bf ","986"],["991","\u4e1c\u6d77\u53bf ","986"],["992","\u704c\u4e91\u53bf ","986"],["993","\u704c\u5357\u53bf ","986"],["995","\u6dee\u5b89\u5e02 ","5"],["996","\u6e05\u6cb3\u533a ","995"],["997","\u695a\u5dde\u533a ","995"],["998","\u6dee\u9634\u533a ","995"],["999","\u6e05\u6d66\u533a ","995"],["1000","\u6d9f\u6c34\u53bf ","995"],["1001","\u6d2a\u6cfd\u53bf ","995"],["1002","\u76f1\u7719\u53bf ","995"],["1003","\u91d1\u6e56\u53bf ","995"],["1005","\u76d0\u57ce\u5e02 ","5"],["1006","\u4ead\u6e56\u533a ","1005"],["1007","\u76d0\u90fd\u533a ","1005"],["1008","\u54cd\u6c34\u53bf ","1005"],["1009","\u6ee8\u6d77\u53bf ","1005"],["1010","\u961c\u5b81\u53bf ","1005"],["1011","\u5c04\u9633\u53bf ","1005"],["1012","\u5efa\u6e56\u53bf ","1005"],["1013","\u4e1c\u53f0\u5e02 ","1005"],["1014","\u5927\u4e30\u5e02 ","1005"],["1016","\u626c\u5dde\u5e02 ","5"],["1017","\u5e7f\u9675\u533a ","1016"],["1018","\u9097\u6c5f\u533a ","1016"],["1019","\u7ef4\u626c\u533a ","1016"],["1020","\u5b9d\u5e94\u53bf ","1016"],["1021","\u4eea\u5f81\u5e02 ","1016"],["1022","\u9ad8\u90ae\u5e02 ","1016"],["1023","\u6c5f\u90fd\u5e02 ","1016"],["1024","\u7ecf\u6d4e\u5f00\u53d1\u533a ","1016"],["1026","\u9547\u6c5f\u5e02 ","5"],["1027","\u4eac\u53e3\u533a ","1026"],["1028","\u6da6\u5dde\u533a ","1026"],["1029","\u4e39\u5f92\u533a ","1026"],["1030","\u4e39\u9633\u5e02 ","1026"],["1031","\u626c\u4e2d\u5e02 ","1026"],["1032","\u53e5\u5bb9\u5e02 ","1026"],["1034","\u6cf0\u5dde\u5e02 ","5"],["1035","\u6d77\u9675\u533a ","1034"],["1036","\u9ad8\u6e2f\u533a ","1034"],["1037","\u5174\u5316\u5e02 ","1034"],["1038","\u9756\u6c5f\u5e02 ","1034"],["1039","\u6cf0\u5174\u5e02 ","1034"],["1040","\u59dc\u5830\u5e02 ","1034"],["1042","\u5bbf\u8fc1\u5e02 ","5"],["1043","\u5bbf\u57ce\u533a ","1042"],["1044","\u5bbf\u8c6b\u533a ","1042"],["1045","\u6cad\u9633\u53bf ","1042"],["1046","\u6cd7\u9633\u53bf ","1042"],["1047","\u6cd7\u6d2a\u53bf ","1042"],["6","\u6d59\u6c5f\u7701 ","0"],["1050","\u676d\u5dde\u5e02 ","6"],["1051","\u4e0a\u57ce\u533a ","1050"],["1052","\u4e0b\u57ce\u533a ","1050"],["1053","\u6c5f\u5e72\u533a ","1050"],["1054","\u62f1\u5885\u533a ","1050"],["1055","\u897f\u6e56\u533a ","1050"],["1056","\u6ee8\u6c5f\u533a ","1050"],["1057","\u8427\u5c71\u533a ","1050"],["1058","\u4f59\u676d\u533a ","1050"],["1059","\u6850\u5e90\u53bf ","1050"],["1060","\u6df3\u5b89\u53bf ","1050"],["1061","\u5efa\u5fb7\u5e02 ","1050"],["1062","\u5bcc\u9633\u5e02 ","1050"],["1791","\u65b0\u4e61\u5e02 ","11"],["1792","\u7ea2\u65d7\u533a ","1791"],["1793","\u536b\u6ee8\u533a ","1791"],["1794","\u51e4\u6cc9\u533a ","1791"],["1795","\u7267\u91ce\u533a ","1791"],["1796","\u65b0\u4e61\u53bf ","1791"],["1797","\u83b7\u5609\u53bf ","1791"],["1798","\u539f\u9633\u53bf ","1791"],["1799","\u5ef6\u6d25\u53bf ","1791"],["1800","\u5c01\u4e18\u53bf ","1791"],["1801","\u957f\u57a3\u53bf ","1791"],["1802","\u536b\u8f89\u5e02 ","1791"],["1803","\u8f89\u53bf\u5e02 ","1791"],["1805","\u7126\u4f5c\u5e02 ","11"],["1806","\u89e3\u653e\u533a ","1805"],["1807","\u4e2d\u7ad9\u533a ","1805"],["1808","\u9a6c\u6751\u533a ","1805"],["1809","\u5c71\u9633\u533a ","1805"],["1810","\u4fee\u6b66\u53bf ","1805"],["1811","\u535a\u7231\u53bf ","1805"],["1812","\u6b66\u965f\u53bf ","1805"],["1813","\u6e29\u53bf ","1805"],["1814","\u6c81\u9633\u5e02 ","1805"],["1815","\u5b5f\u5dde\u5e02 ","1805"],["1817","\u6d4e\u6e90\u5e02 ","11"],["1818","\u6fee\u9633\u5e02 ","11"],["1819","\u534e\u9f99\u533a ","1818"],["1820","\u6e05\u4e30\u53bf ","1818"],["1821","\u5357\u4e50\u53bf ","1818"],["1822","\u8303\u53bf ","1818"],["1823","\u53f0\u524d\u53bf ","1818"],["1824","\u6fee\u9633\u53bf ","1818"],["1826","\u8bb8\u660c\u5e02 ","11"],["1827","\u9b4f\u90fd\u533a ","1826"],["1828","\u8bb8\u660c\u53bf ","1826"],["1829","\u9122\u9675\u53bf ","1826"],["1830","\u8944\u57ce\u53bf ","1826"],["1831","\u79b9\u5dde\u5e02 ","1826"],["1832","\u957f\u845b\u5e02 ","1826"],["1834","\u6f2f\u6cb3\u5e02 ","11"],["1835","\u6e90\u6c47\u533a ","1834"],["1836","\u90fe\u57ce\u533a ","1834"],["1837","\u53ec\u9675\u533a ","1834"],["1838","\u821e\u9633\u53bf ","1834"],["1839","\u4e34\u988d\u53bf ","1834"],["1841","\u4e09\u95e8\u5ce1\u5e02 ","11"],["1842","\u6e56\u6ee8\u533a ","1841"],["1843","\u6e11\u6c60\u53bf ","1841"],["1844","\u9655\u53bf ","1841"],["1845","\u5362\u6c0f\u53bf ","1841"],["1846","\u4e49\u9a6c\u5e02 ","1841"],["1847","\u7075\u5b9d\u5e02 ","1841"],["1849","\u5357\u9633\u5e02 ","11"],["1850","\u5b9b\u57ce\u533a ","1849"],["1851","\u5367\u9f99\u533a ","1849"],["1852","\u5357\u53ec\u53bf ","1849"],["1853","\u65b9\u57ce\u53bf ","1849"],["1854","\u897f\u5ce1\u53bf ","1849"],["1855","\u9547\u5e73\u53bf ","1849"],["1328","\u8386\u7530\u5e02 ","8"],["1329","\u57ce\u53a2\u533a ","1328"],["1330","\u6db5\u6c5f\u533a ","1328"],["1331","\u8354\u57ce\u533a ","1328"],["1332","\u79c0\u5c7f\u533a ","1328"],["1333","\u4ed9\u6e38\u53bf ","1328"],["1335","\u4e09\u660e\u5e02 ","8"],["1336","\u6885\u5217\u533a ","1335"],["1337","\u4e09\u5143\u533a ","1335"],["1338","\u660e\u6eaa\u53bf ","1335"],["1339","\u6e05\u6d41\u53bf ","1335"],["1340","\u5b81\u5316\u53bf ","1335"],["1341","\u5927\u7530\u53bf ","1335"],["1342","\u5c24\u6eaa\u53bf ","1335"],["1343","\u6c99\u53bf ","1335"],["1344","\u5c06\u4e50\u53bf ","1335"],["1345","\u6cf0\u5b81\u53bf ","1335"],["1346","\u5efa\u5b81\u53bf ","1335"],["1347","\u6c38\u5b89\u5e02 ","1335"],["1349","\u6cc9\u5dde\u5e02 ","8"],["1350","\u9ca4\u57ce\u533a ","1349"],["1351","\u4e30\u6cfd\u533a ","1349"],["1352","\u6d1b\u6c5f\u533a ","1349"],["1353","\u6cc9\u6e2f\u533a ","1349"],["1354","\u60e0\u5b89\u53bf ","1349"],["1355","\u5b89\u6eaa\u53bf ","1349"],["1356","\u6c38\u6625\u53bf ","1349"],["1357","\u5fb7\u5316\u53bf ","1349"],["1358","\u91d1\u95e8\u53bf ","1349"],["1359","\u77f3\u72ee\u5e02 ","1349"],["1360","\u664b\u6c5f\u5e02 ","1349"],["1361","\u5357\u5b89\u5e02 ","1349"],["1363","\u6f33\u5dde\u5e02 ","8"],["1364","\u8297\u57ce\u533a ","1363"],["1365","\u9f99\u6587\u533a ","1363"],["1366","\u4e91\u9704\u53bf ","1363"],["1367","\u6f33\u6d66\u53bf ","1363"],["1368","\u8bcf\u5b89\u53bf ","1363"],["1369","\u957f\u6cf0\u53bf ","1363"],["1370","\u4e1c\u5c71\u53bf ","1363"],["1371","\u5357\u9756\u53bf ","1363"],["1372","\u5e73\u548c\u53bf ","1363"],["1373","\u534e\u5b89\u53bf ","1363"],["1374","\u9f99\u6d77\u5e02 ","1363"],["1376","\u5357\u5e73\u5e02 ","8"],["1377","\u5ef6\u5e73\u533a ","1376"],["1378","\u987a\u660c\u53bf ","1376"],["1379","\u6d66\u57ce\u53bf ","1376"],["1380","\u5149\u6cfd\u53bf ","1376"],["1381","\u677e\u6eaa\u53bf ","1376"],["1382","\u653f\u548c\u53bf ","1376"],["1383","\u90b5\u6b66\u5e02 ","1376"],["1384","\u6b66\u5937\u5c71\u5e02 ","1376"],["1385","\u5efa\u74ef\u5e02 ","1376"],["1386","\u5efa\u9633\u5e02 ","1376"],["1388","\u9f99\u5ca9\u5e02 ","8"],["1389","\u65b0\u7f57\u533a ","1388"],["1390","\u957f\u6c40\u53bf ","1388"],["1391","\u6c38\u5b9a\u53bf ","1388"],["1392","\u4e0a\u676d\u53bf ","1388"],["1393","\u6b66\u5e73\u53bf ","1388"],["1394","\u8fde\u57ce\u53bf ","1388"],["1395","\u6f33\u5e73\u5e02 ","1388"],["1397","\u5b81\u5fb7\u5e02 ","8"],["1398","\u8549\u57ce\u533a ","1397"],["1399","\u971e\u6d66\u53bf ","1397"],["1400","\u53e4\u7530\u53bf ","1397"],["1401","\u5c4f\u5357\u53bf ","1397"],["1402","\u5bff\u5b81\u53bf ","1397"],["1403","\u5468\u5b81\u53bf ","1397"],["1404","\u67d8\u8363\u53bf ","1397"],["1405","\u798f\u5b89\u5e02 ","1397"],["1406","\u798f\u9f0e\u5e02 ","1397"],["9","\u6c5f\u897f\u7701 ","0"],["1409","\u5357\u660c\u5e02 ","9"],["1410","\u4e1c\u6e56\u533a ","1409"],["1411","\u897f\u6e56\u533a ","1409"],["1412","\u9752\u4e91\u8c31\u533a ","1409"],["1413","\u6e7e\u91cc\u533a ","1409"],["1414","\u9752\u5c71\u6e56\u533a ","1409"],["1415","\u5357\u660c\u53bf ","1409"],["1416","\u65b0\u5efa\u53bf ","1409"],["1417","\u5b89\u4e49\u53bf ","1409"],["1418","\u8fdb\u8d24\u53bf ","1409"],["1419","\u7ea2\u8c37\u6ee9\u65b0\u533a ","1409"],["1420","\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a ","1409"],["1421","\u660c\u5317\u533a ","1409"],["1423","\u666f\u5fb7\u9547\u5e02 ","9"],["1424","\u660c\u6c5f\u533a ","1423"],["1425","\u73e0\u5c71\u533a ","1423"],["1426","\u6d6e\u6881\u53bf ","1423"],["1427","\u4e50\u5e73\u5e02 ","1423"],["1429","\u840d\u4e61\u5e02 ","9"],["1430","\u5b89\u6e90\u533a ","1429"],["1431","\u6e58\u4e1c\u533a ","1429"],["1432","\u83b2\u82b1\u53bf ","1429"],["1433","\u4e0a\u6817\u53bf ","1429"],["1434","\u82a6\u6eaa\u53bf ","1429"],["1436","\u4e5d\u6c5f\u5e02 ","9"],["1437","\u5e90\u5c71\u533a ","1436"],["1438","\u6d54\u9633\u533a ","1436"],["1439","\u4e5d\u6c5f\u53bf ","1436"],["1440","\u6b66\u5b81\u53bf ","1436"],["1441","\u4fee\u6c34\u53bf ","1436"],["1442","\u6c38\u4fee\u53bf ","1436"],["1443","\u5fb7\u5b89\u53bf ","1436"],["1444","\u661f\u5b50\u53bf ","1436"],["1445","\u90fd\u660c\u53bf ","1436"],["1446","\u6e56\u53e3\u53bf ","1436"],["1447","\u5f6d\u6cfd\u53bf ","1436"],["1448","\u745e\u660c\u5e02 ","1436"],["1450","\u65b0\u4f59\u5e02 ","9"],["1451","\u6e1d\u6c34\u533a ","1450"],["1452","\u5206\u5b9c\u53bf ","1450"],["1454","\u9e70\u6f6d\u5e02 ","9"],["1455","\u6708\u6e56\u533a ","1454"],["1456","\u4f59\u6c5f\u53bf ","1454"],["1457","\u8d35\u6eaa\u5e02 ","1454"],["1459","\u8d63\u5dde\u5e02 ","9"],["1460","\u7ae0\u8d21\u533a ","1459"],["1461","\u8d63\u53bf ","1459"],["1462","\u4fe1\u4e30\u53bf ","1459"],["1463","\u5927\u4f59\u53bf ","1459"],["1464","\u4e0a\u72b9\u53bf ","1459"],["1465","\u5d07\u4e49\u53bf ","1459"],["1466","\u5b89\u8fdc\u53bf ","1459"],["1467","\u9f99\u5357\u53bf ","1459"],["1468","\u5b9a\u5357\u53bf ","1459"],["1469","\u5168\u5357\u53bf ","1459"],["1470","\u5b81\u90fd\u53bf ","1459"],["1471","\u4e8e\u90fd\u53bf ","1459"],["1472","\u5174\u56fd\u53bf ","1459"],["1473","\u4f1a\u660c\u53bf ","1459"],["1474","\u5bfb\u4e4c\u53bf ","1459"],["1475","\u77f3\u57ce\u53bf ","1459"],["1476","\u9ec4\u91d1\u533a ","1459"],["1477","\u745e\u91d1\u5e02 ","1459"],["1478","\u5357\u5eb7\u5e02 ","1459"],["1480","\u5409\u5b89\u5e02 ","9"],["1481","\u5409\u5dde\u533a ","1480"],["1482","\u9752\u539f\u533a ","1480"],["1483","\u5409\u5b89\u53bf ","1480"],["1484","\u5409\u6c34\u53bf ","1480"],["1485","\u5ce1\u6c5f\u53bf ","1480"],["1486","\u65b0\u5e72\u53bf ","1480"],["1487","\u6c38\u4e30\u53bf ","1480"],["1488","\u6cf0\u548c\u53bf ","1480"],["1489","\u9042\u5ddd\u53bf ","1480"],["1490","\u4e07\u5b89\u53bf ","1480"],["1491","\u5b89\u798f\u53bf ","1480"],["1492","\u6c38\u65b0\u53bf ","1480"],["1493","\u4e95\u5188\u5c71\u5e02 ","1480"],["1495","\u5b9c\u6625\u5e02 ","9"],["1496","\u8881\u5dde\u533a ","1495"],["1497","\u5949\u65b0\u53bf ","1495"],["1498","\u4e07\u8f7d\u53bf ","1495"],["1499","\u4e0a\u9ad8\u53bf ","1495"],["1500","\u5b9c\u4e30\u53bf ","1495"],["1501","\u9756\u5b89\u53bf ","1495"],["1502","\u94dc\u9f13\u53bf ","1495"],["1503","\u4e30\u57ce\u5e02 ","1495"],["1504","\u6a1f\u6811\u5e02 ","1495"],["1505","\u9ad8\u5b89\u5e02 ","1495"],["1507","\u629a\u5dde\u5e02 ","9"],["1508","\u4e34\u5ddd\u533a ","1507"],["1509","\u5357\u57ce\u53bf ","1507"],["1510","\u9ece\u5ddd\u53bf ","1507"],["1511","\u5357\u4e30\u53bf ","1507"],["1512","\u5d07\u4ec1\u53bf ","1507"],["1513","\u4e50\u5b89\u53bf ","1507"],["1514","\u5b9c\u9ec4\u53bf ","1507"],["1515","\u91d1\u6eaa\u53bf ","1507"],["1516","\u8d44\u6eaa\u53bf ","1507"],["1517","\u4e1c\u4e61\u53bf ","1507"],["1518","\u5e7f\u660c\u53bf ","1507"],["1520","\u4e0a\u9976\u5e02 ","9"],["1521","\u4fe1\u5dde\u533a ","1520"],["1522","\u4e0a\u9976\u53bf ","1520"],["1523","\u5e7f\u4e30\u53bf ","1520"],["1524","\u7389\u5c71\u53bf ","1520"],["1525","\u94c5\u5c71\u53bf ","1520"],["1526","\u6a2a\u5cf0\u53bf ","1520"],["1527","\u5f0b\u9633\u53bf ","1520"],["1528","\u4f59\u5e72\u53bf ","1520"],["1529","\u9131\u9633\u53bf ","1520"],["1530","\u4e07\u5e74\u53bf ","1520"],["1531","\u5a7a\u6e90\u53bf ","1520"],["1532","\u5fb7\u5174\u5e02 ","1520"],["10","\u5c71\u4e1c\u7701 ","0"],["1535","\u6d4e\u5357\u5e02 ","10"],["1536","\u5386\u4e0b\u533a ","1535"],["1537","\u5e02\u4e2d\u533a ","1535"],["1538","\u69d0\u836b\u533a ","1535"],["1539","\u5929\u6865\u533a ","1535"],["1540","\u5386\u57ce\u533a ","1535"],["1541","\u957f\u6e05\u533a ","1535"],["1542","\u5e73\u9634\u53bf ","1535"],["1543","\u6d4e\u9633\u53bf ","1535"],["1544","\u5546\u6cb3\u53bf ","1535"],["1545","\u7ae0\u4e18\u5e02 ","1535"],["1547","\u9752\u5c9b\u5e02 ","10"],["1548","\u5e02\u5357\u533a ","1547"],["1549","\u5e02\u5317\u533a ","1547"],["1550","\u56db\u65b9\u533a ","1547"],["1551","\u9ec4\u5c9b\u533a ","1547"],["1552","\u5d02\u5c71\u533a ","1547"],["1553","\u674e\u6ca7\u533a ","1547"],["1554","\u57ce\u9633\u533a ","1547"],["1555","\u5f00\u53d1\u533a ","1547"],["1556","\u80f6\u5dde\u5e02 ","1547"],["1557","\u5373\u58a8\u5e02 ","1547"],["1558","\u5e73\u5ea6\u5e02 ","1547"],["1559","\u80f6\u5357\u5e02 ","1547"],["1560","\u83b1\u897f\u5e02 ","1547"],["1562","\u6dc4\u535a\u5e02 ","10"],["1563","\u6dc4\u5ddd\u533a ","1562"],["1564","\u5f20\u5e97\u533a ","1562"],["1565","\u535a\u5c71\u533a ","1562"],["1566","\u4e34\u6dc4\u533a ","1562"],["1567","\u5468\u6751\u533a ","1562"],["1568","\u6853\u53f0\u53bf ","1562"],["1569","\u9ad8\u9752\u53bf ","1562"],["1570","\u6c82\u6e90\u53bf ","1562"],["1572","\u67a3\u5e84\u5e02 ","10"],["1573","\u5e02\u4e2d\u533a ","1572"],["1574","\u859b\u57ce\u533a ","1572"],["1575","\u5cc4\u57ce\u533a ","1572"],["1576","\u53f0\u513f\u5e84\u533a ","1572"],["1577","\u5c71\u4ead\u533a ","1572"],["1578","\u6ed5\u5dde\u5e02 ","1572"],["1580","\u4e1c\u8425\u5e02 ","10"],["1581","\u4e1c\u8425\u533a ","1580"],["1582","\u6cb3\u53e3\u533a ","1580"],["1583","\u57a6\u5229\u53bf ","1580"],["1584","\u5229\u6d25\u53bf ","1580"],["1585","\u5e7f\u9976\u53bf ","1580"],["1586","\u897f\u57ce\u533a ","1580"],["1587","\u4e1c\u57ce\u533a ","1580"],["1589","\u70df\u53f0\u5e02 ","10"],["1590","\u829d\u7f58\u533a ","1589"],["1591","\u798f\u5c71\u533a ","1589"],["1592","\u725f\u5e73\u533a ","1589"],["1593","\u83b1\u5c71\u533a ","1589"],["1594","\u957f\u5c9b\u53bf ","1589"],["1595","\u9f99\u53e3\u5e02 ","1589"],["1596","\u83b1\u9633\u5e02 ","1589"],["1597","\u83b1\u5dde\u5e02 ","1589"],["1598","\u84ec\u83b1\u5e02 ","1589"],["1599","\u62db\u8fdc\u5e02 ","1589"],["1600","\u6816\u971e\u5e02 ","1589"],["1601","\u6d77\u9633\u5e02 ","1589"],["1603","\u6f4d\u574a\u5e02 ","10"],["1604","\u6f4d\u57ce\u533a ","1603"],["1605","\u5bd2\u4ead\u533a ","1603"],["1606","\u574a\u5b50\u533a ","1603"],["1607","\u594e\u6587\u533a ","1603"],["1608","\u4e34\u6710\u53bf ","1603"],["1609","\u660c\u4e50\u53bf ","1603"],["1610","\u5f00\u53d1\u533a ","1603"],["1611","\u9752\u5dde\u5e02 ","1603"],["1612","\u8bf8\u57ce\u5e02 ","1603"],["1613","\u5bff\u5149\u5e02 ","1603"],["1614","\u5b89\u4e18\u5e02 ","1603"],["1615","\u9ad8\u5bc6\u5e02 ","1603"],["1616","\u660c\u9091\u5e02 ","1603"],["1618","\u6d4e\u5b81\u5e02 ","10"],["1619","\u5e02\u4e2d\u533a ","1618"],["1620","\u4efb\u57ce\u533a ","1618"],["1621","\u5fae\u5c71\u53bf ","1618"],["1622","\u9c7c\u53f0\u53bf ","1618"],["1623","\u91d1\u4e61\u53bf ","1618"],["1624","\u5609\u7965\u53bf ","1618"],["1625","\u6c76\u4e0a\u53bf ","1618"],["1626","\u6cd7\u6c34\u53bf ","1618"],["1627","\u6881\u5c71\u53bf ","1618"],["1628","\u66f2\u961c\u5e02 ","1618"],["1629","\u5156\u5dde\u5e02 ","1618"],["1630","\u90b9\u57ce\u5e02 ","1618"],["1632","\u6cf0\u5b89\u5e02 ","10"],["1633","\u6cf0\u5c71\u533a ","1632"],["1634","\u5cb1\u5cb3\u533a ","1632"],["1635","\u5b81\u9633\u53bf ","1632"],["1636","\u4e1c\u5e73\u53bf ","1632"],["1637","\u65b0\u6cf0\u5e02 ","1632"],["1638","\u80a5\u57ce\u5e02 ","1632"],["1640","\u5a01\u6d77\u5e02 ","10"],["1641","\u73af\u7fe0\u533a ","1640"],["1642","\u6587\u767b\u5e02 ","1640"],["1643","\u8363\u6210\u5e02 ","1640"],["1644","\u4e73\u5c71\u5e02 ","1640"],["1646","\u65e5\u7167\u5e02 ","10"],["1647","\u4e1c\u6e2f\u533a ","1646"],["1648","\u5c9a\u5c71\u533a ","1646"],["1649","\u4e94\u83b2\u53bf ","1646"],["1650","\u8392\u53bf ","1646"],["1652","\u83b1\u829c\u5e02 ","10"],["1653","\u83b1\u57ce\u533a ","1652"],["1654","\u94a2\u57ce\u533a ","1652"],["1656","\u4e34\u6c82\u5e02 ","10"],["1657","\u5170\u5c71\u533a ","1656"],["1658","\u7f57\u5e84\u533a ","1656"],["1659","\u6cb3\u4e1c\u533a ","1656"],["1660","\u6c82\u5357\u53bf ","1656"],["1661","\u90ef\u57ce\u53bf ","1656"],["1662","\u6c82\u6c34\u53bf ","1656"],["1663","\u82cd\u5c71\u53bf ","1656"],["1665"," \u5e73\u9091\u53bf ","1656"],["1666","\u8392\u5357\u53bf ","1656"],["1667","\u8499\u9634\u53bf ","1656"],["1668","\u4e34\u6cad\u53bf ","1656"],["1670","\u5fb7\u5dde\u5e02 ","10"],["1671","\u5fb7\u57ce\u533a ","1670"],["1672","\u9675\u53bf ","1670"],["1673"," \u5b81\u6d25\u53bf ","1670"],["1674","\u5e86\u4e91\u53bf ","1670"],["1675","\u4e34\u9091\u53bf ","1670"],["1676","\u9f50\u6cb3\u53bf ","1670"],["1677","\u5e73\u539f\u53bf ","1670"],["1678","\u590f\u6d25\u53bf ","1670"],["1679","\u6b66\u57ce\u53bf ","1670"],["1680","\u5f00\u53d1\u533a ","1670"],["1681","\u4e50\u9675\u5e02 ","1670"],["1682","\u79b9\u57ce\u5e02 ","1670"],["1684","\u804a\u57ce\u5e02 ","10"],["1685","\u4e1c\u660c\u5e9c\u533a ","1684"],["1686","\u9633\u8c37\u53bf ","1684"],["1687","\u8398\u53bf ","1684"],["1688","\u830c\u5e73\u53bf ","1684"],["1689"," \u4e1c\u963f\u53bf ","1684"],["1690","\u51a0\u53bf ","1684"],["1691","\u9ad8\u5510\u53bf ","1684"],["1692","\u4e34\u6e05\u5e02 ","1684"],["1694","\u6ee8\u5dde\u5e02 ","10"],["1695","\u6ee8\u57ce\u533a ","1694"],["1696","\u60e0\u6c11\u53bf ","1694"],["1697","\u9633\u4fe1\u53bf ","1694"],["1698","\u65e0\u68e3\u53bf ","1694"],["1699","\u6cbe\u5316\u53bf ","1694"],["1700","\u535a\u5174\u53bf ","1694"],["1701","\u90b9\u5e73\u53bf ","1694"],["1703","\u83cf\u6cfd\u5e02 ","10"],["1704","\u7261\u4e39\u533a ","1703"],["1705","\u66f9\u53bf ","1703"],["1706","\u5355\u53bf ","1703"],["1707","\u6210\u6b66\u53bf ","1703"],["1708","\u5de8\u91ce\u53bf ","1703"],["1709","\u90d3\u57ce\u53bf ","1703"],["1710","\u9104\u57ce\u53bf ","1703"],["1711","\u5b9a\u9676\u53bf ","1703"],["1712","\u4e1c\u660e\u53bf ","1703"],["11","\u6cb3\u5357\u7701 ","0"],["1715","\u90d1\u5dde\u5e02 ","11"],["1716","\u4e2d\u539f\u533a ","1715"],["1717","\u4e8c\u4e03\u533a ","1715"],["1718","\u7ba1\u57ce\u56de\u65cf\u533a ","1715"],["1719","\u91d1\u6c34\u533a ","1715"],["1720","\u4e0a\u8857\u533a ","1715"],["1721","\u60e0\u6d4e\u533a ","1715"],["1722","\u4e2d\u725f\u53bf ","1715"],["1723","\u5de9\u4e49\u5e02 ","1715"],["1724","\u8365\u9633\u5e02 ","1715"],["1725","\u65b0\u5bc6\u5e02 ","1715"],["1726","\u65b0\u90d1\u5e02 ","1715"],["1727","\u767b\u5c01\u5e02 ","1715"],["1728","\u90d1\u4e1c\u65b0\u533a ","1715"],["1729","\u9ad8\u65b0\u533a ","1715"],["1731","\u5f00\u5c01\u5e02 ","11"],["1732","\u9f99\u4ead\u533a ","1731"],["1733","\u987a\u6cb3\u56de\u65cf\u533a ","1731"],["1734","\u9f13\u697c\u533a ","1731"],["1735","\u79b9\u738b\u53f0\u533a ","1731"],["1736","\u91d1\u660e\u533a ","1731"],["1737","\u675e\u53bf ","1731"],["1738","\u901a\u8bb8\u53bf ","1731"],["1739","\u5c09\u6c0f\u53bf ","1731"],["1740","\u5f00\u5c01\u53bf ","1731"],["1741","\u5170\u8003\u53bf ","1731"],["1743","\u6d1b\u9633\u5e02 ","11"],["1744","\u8001\u57ce\u533a ","1743"],["1745","\u897f\u5de5\u533a ","1743"],["1746","\u5edb\u6cb3\u56de\u65cf\u533a ","1743"],["1747","\u6da7\u897f\u533a ","1743"],["1748","\u5409\u5229\u533a ","1743"],["1749","\u6d1b\u9f99\u533a ","1743"],["1750","\u5b5f\u6d25\u53bf ","1743"],["1751","\u65b0\u5b89\u53bf ","1743"],["1752","\u683e\u5ddd\u53bf ","1743"],["1753","\u5d69\u53bf ","1743"],["1754","\u6c5d\u9633\u53bf ","1743"],["1755","\u5b9c\u9633\u53bf ","1743"],["1756","\u6d1b\u5b81\u53bf ","1743"],["1757","\u4f0a\u5ddd\u53bf ","1743"],["1758","\u5043\u5e08\u5e02 ","1743"],["1759","\u9ad8\u65b0\u533a ","1743"],["1761","\u5e73\u9876\u5c71\u5e02 ","11"],["1762","\u65b0\u534e\u533a ","1761"],["1763","\u536b\u4e1c\u533a ","1761"],["1764","\u77f3\u9f99\u533a ","1761"],["1765","\u6e5b\u6cb3\u533a ","1761"],["1766","\u5b9d\u4e30\u53bf ","1761"],["1767","\u53f6\u53bf ","1761"],["1768","\u9c81\u5c71\u53bf ","1761"],["1769"," \u90cf\u53bf ","1761"],["1770","\u821e\u94a2\u5e02 ","1761"],["1771","\u6c5d\u5dde\u5e02 ","1761"],["1773","\u5b89\u9633\u5e02 ","11"],["1774","\u6587\u5cf0\u533a ","1773"],["1775","\u5317\u5173\u533a ","1773"],["1776","\u6bb7\u90fd\u533a ","1773"],["1777","\u9f99\u5b89\u533a ","1773"],["1778","\u5b89\u9633\u53bf ","1773"],["1779","\u6c64\u9634\u53bf ","1773"],["1780","\u6ed1\u53bf ","1773"],["1781","\u5185\u9ec4\u53bf ","1773"],["1782","\u6797\u5dde\u5e02 ","1773"],["1784","\u9e64\u58c1\u5e02 ","11"],["1785","\u9e64\u5c71\u533a ","1784"],["1786","\u5c71\u57ce\u533a ","1784"],["1787","\u6dc7\u6ee8\u533a ","1784"],["1788","\u6d5a\u53bf ","1784"],["1789","\u6dc7\u53bf ","1784"],["2054","\u6d4f\u9633\u5e02 ","2045"],["2056","\u682a\u6d32\u5e02 ","13"],["2057","\u8377\u5858\u533a ","2056"],["2058","\u82a6\u6dde\u533a ","2056"],["2059","\u77f3\u5cf0\u533a ","2056"],["2060","\u5929\u5143\u533a ","2056"],["2061","\u682a\u6d32\u53bf ","2056"],["2062","\u6538\u53bf ","2056"],["2063","\u8336\u9675\u53bf ","2056"],["2064"," \u708e\u9675\u53bf ","2056"],["2065","\u91b4\u9675\u5e02 ","2056"],["2067","\u6e58\u6f6d\u5e02 ","13"],["2068","\u96e8\u6e56\u533a ","2067"],["2069","\u5cb3\u5858\u533a ","2067"],["2070","\u6e58\u6f6d\u53bf ","2067"],["2071","\u6e58\u4e61\u5e02 ","2067"],["2072","\u97f6\u5c71\u5e02 ","2067"],["2074","\u8861\u9633\u5e02 ","13"],["2075","\u73e0\u6656\u533a ","2074"],["2076","\u96c1\u5cf0\u533a ","2074"],["2077","\u77f3\u9f13\u533a ","2074"],["2078","\u84b8\u6e58\u533a ","2074"],["2079","\u5357\u5cb3\u533a ","2074"],["2080","\u8861\u9633\u53bf ","2074"],["2081","\u8861\u5357\u53bf ","2074"],["2082","\u8861\u5c71\u53bf ","2074"],["2083","\u8861\u4e1c\u53bf ","2074"],["2084","\u7941\u4e1c\u53bf ","2074"],["2085","\u8012\u9633\u5e02 ","2074"],["2086","\u5e38\u5b81\u5e02 ","2074"],["2088","\u90b5\u9633\u5e02 ","13"],["2089","\u53cc\u6e05\u533a ","2088"],["2090","\u5927\u7965\u533a ","2088"],["2091","\u5317\u5854\u533a ","2088"],["2092","\u90b5\u4e1c\u53bf ","2088"],["2093","\u65b0\u90b5\u53bf ","2088"],["2094","\u90b5\u9633\u53bf ","2088"],["2095","\u9686\u56de\u53bf ","2088"],["2096","\u6d1e\u53e3\u53bf ","2088"],["2097","\u7ee5\u5b81\u53bf ","2088"],["2098","\u65b0\u5b81\u53bf ","2088"],["2099","\u57ce\u6b65\u82d7\u65cf\u81ea\u6cbb\u53bf ","2088"],["2100","\u6b66\u5188\u5e02 ","2088"],["2102","\u5cb3\u9633\u5e02 ","13"],["2103","\u5cb3\u9633\u697c\u533a ","2102"],["2104","\u4e91\u6eaa\u533a ","2102"],["2105","\u541b\u5c71\u533a ","2102"],["2106","\u5cb3\u9633\u53bf ","2102"],["2107","\u534e\u5bb9\u53bf ","2102"],["2108","\u6e58\u9634\u53bf ","2102"],["2109","\u5e73\u6c5f\u53bf ","2102"],["2110","\u6c68\u7f57\u5e02 ","2102"],["2111","\u4e34\u6e58\u5e02 ","2102"],["2113","\u5e38\u5fb7\u5e02 ","13"],["2114","\u6b66\u9675\u533a ","2113"],["2115","\u9f0e\u57ce\u533a ","2113"],["2116","\u5b89\u4e61\u53bf ","2113"],["2117","\u6c49\u5bff\u53bf ","2113"],["2118","\u6fa7\u53bf ","2113"],["2119","\u4e34\u6fa7\u53bf ","2113"],["2120"," \u6843\u6e90\u53bf ","2113"],["2254","\u6c5f\u95e8\u5e02 ","14"],["2255","\u84ec\u6c5f\u533a ","2254"],["2256","\u6c5f\u6d77\u533a ","2254"],["2257","\u65b0\u4f1a\u533a ","2254"],["2258","\u53f0\u5c71\u5e02 ","2254"],["2259","\u5f00\u5e73\u5e02 ","2254"],["2260","\u9e64\u5c71\u5e02 ","2254"],["2261","\u6069\u5e73\u5e02 ","2254"],["2263","\u6e5b\u6c5f\u5e02 ","14"],["2264","\u8d64\u574e\u533a ","2263"],["2265","\u971e\u5c71\u533a ","2263"],["2266","\u5761\u5934\u533a ","2263"],["2267","\u9ebb\u7ae0\u533a ","2263"],["2268","\u9042\u6eaa\u53bf ","2263"],["2269","\u5f90\u95fb\u53bf ","2263"],["2270","\u5ec9\u6c5f\u5e02 ","2263"],["2271","\u96f7\u5dde\u5e02 ","2263"],["2272","\u5434\u5ddd\u5e02 ","2263"],["2274","\u8302\u540d\u5e02 ","14"],["2275","\u8302\u5357\u533a ","2274"],["2276","\u8302\u6e2f\u533a ","2274"],["2277","\u7535\u767d\u53bf ","2274"],["2278","\u9ad8\u5dde\u5e02 ","2274"],["2279","\u5316\u5dde\u5e02 ","2274"],["2280","\u4fe1\u5b9c\u5e02 ","2274"],["2282","\u8087\u5e86\u5e02 ","14"],["2283","\u7aef\u5dde\u533a ","2282"],["2284","\u9f0e\u6e56\u533a ","2282"],["2285","\u5e7f\u5b81\u53bf ","2282"],["2286","\u6000\u96c6\u53bf ","2282"],["2287","\u5c01\u5f00\u53bf ","2282"],["2288","\u5fb7\u5e86\u53bf ","2282"],["2289","\u9ad8\u8981\u5e02 ","2282"],["2290","\u56db\u4f1a\u5e02 ","2282"],["2292","\u60e0\u5dde\u5e02 ","14"],["2293","\u60e0\u57ce\u533a ","2292"],["2294","\u60e0\u9633\u533a ","2292"],["2295","\u535a\u7f57\u53bf ","2292"],["2296","\u60e0\u4e1c\u53bf ","2292"],["2297","\u9f99\u95e8\u53bf ","2292"],["2299","\u6885\u5dde\u5e02 ","14"],["2300","\u6885\u6c5f\u533a ","2299"],["2301","\u6885\u53bf ","2299"],["2302"," \u5927\u57d4\u53bf ","2299"],["2303","\u4e30\u987a\u53bf ","2299"],["2304","\u4e94\u534e\u53bf ","2299"],["2305","\u5e73\u8fdc\u53bf ","2299"],["2306","\u8549\u5cad\u53bf ","2299"],["2307","\u5174\u5b81\u5e02 ","2299"],["2309","\u6c55\u5c3e\u5e02 ","14"],["2310","\u57ce\u533a ","2309"],["2311","\u6d77\u4e30\u53bf ","2309"],["2312","\u9646\u6cb3\u53bf ","2309"],["2313","\u9646\u4e30\u5e02 ","2309"],["2315","\u6cb3\u6e90\u5e02 ","14"],["2316","\u6e90\u57ce\u533a ","2315"],["2317","\u7d2b\u91d1\u53bf ","2315"],["2121","\u77f3\u95e8\u53bf ","2113"],["2122","\u6d25\u5e02\u5e02 ","2113"],["2124","\u5f20\u5bb6\u754c\u5e02 ","13"],["2125","\u6c38\u5b9a\u533a ","2124"],["2126","\u6b66\u9675\u6e90\u533a ","2124"],["2127","\u6148\u5229\u53bf ","2124"],["2128","\u6851\u690d\u53bf ","2124"],["2130","\u76ca\u9633\u5e02 ","13"],["2131","\u8d44\u9633\u533a ","2130"],["2132","\u8d6b\u5c71\u533a ","2130"],["2133","\u5357\u53bf ","2130"],["2134","\u6843\u6c5f\u53bf ","2130"],["2135","\u5b89\u5316\u53bf ","2130"],["2136","\u6c85\u6c5f\u5e02 ","2130"],["2138","\u90f4\u5dde\u5e02 ","13"],["2139","\u5317\u6e56\u533a ","2138"],["2140","\u82cf\u4ed9\u533a ","2138"],["2141","\u6842\u9633\u53bf ","2138"],["2142","\u5b9c\u7ae0\u53bf ","2138"],["2143","\u6c38\u5174\u53bf ","2138"],["2144","\u5609\u79be\u53bf ","2138"],["2145","\u4e34\u6b66\u53bf ","2138"],["2146","\u6c5d\u57ce\u53bf ","2138"],["2147","\u6842\u4e1c\u53bf ","2138"],["2148","\u5b89\u4ec1\u53bf ","2138"],["2149","\u8d44\u5174\u5e02 ","2138"],["2151","\u6c38\u5dde\u5e02 ","13"],["2152","\u96f6\u9675\u533a ","2151"],["2153","\u51b7\u6c34\u6ee9\u533a ","2151"],["2154","\u7941\u9633\u53bf ","2151"],["2155","\u4e1c\u5b89\u53bf ","2151"],["2156","\u53cc\u724c\u53bf ","2151"],["2157","\u9053\u53bf ","2151"],["2158","\u6c5f\u6c38\u53bf ","2151"],["2159","\u5b81\u8fdc\u53bf ","2151"],["2160","\u84dd\u5c71\u53bf ","2151"],["2161","\u65b0\u7530\u53bf ","2151"],["2162","\u6c5f\u534e\u7476\u65cf\u81ea\u6cbb\u53bf ","2151"],["2164","\u6000\u5316\u5e02 ","13"],["2165","\u9e64\u57ce\u533a ","2164"],["2166","\u4e2d\u65b9\u53bf ","2164"],["2167","\u6c85\u9675\u53bf ","2164"],["2168","\u8fb0\u6eaa\u53bf ","2164"],["2169","\u6e86\u6d66\u53bf ","2164"],["2170","\u4f1a\u540c\u53bf ","2164"],["2171","\u9ebb\u9633\u82d7\u65cf\u81ea\u6cbb\u53bf ","2164"],["2172","\u65b0\u6643\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2173","\u82b7\u6c5f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2174","\u9756\u5dde\u82d7\u65cf\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2175","\u901a\u9053\u4f97\u65cf\u81ea\u6cbb\u53bf ","2164"],["2176","\u6d2a\u6c5f\u5e02 ","2164"],["2178","\u5a04\u5e95\u5e02 ","13"],["2179","\u5a04\u661f\u533a ","2178"],["2180","\u53cc\u5cf0\u53bf ","2178"],["2181","\u65b0\u5316\u53bf ","2178"],["2182","\u51b7\u6c34\u6c5f\u5e02 ","2178"],["2183","\u6d9f\u6e90\u5e02 ","2178"],["2185","\u6e58\u897f\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","13"],["2186","\u5409\u9996\u5e02 ","2185"],["2187","\u6cf8\u6eaa\u53bf ","2185"],["2188","\u51e4\u51f0\u53bf ","2185"],["2189","\u82b1\u57a3\u53bf ","2185"],["2190","\u4fdd\u9756\u53bf ","2185"],["2191","\u53e4\u4e08\u53bf ","2185"],["2192","\u6c38\u987a\u53bf ","2185"],["2193","\u9f99\u5c71\u53bf ","2185"],["14","\u5e7f\u4e1c\u7701 ","0"],["2196","\u5e7f\u5dde\u5e02 ","14"],["2197","\u8354\u6e7e\u533a ","2196"],["2198","\u8d8a\u79c0\u533a ","2196"],["2199","\u6d77\u73e0\u533a ","2196"],["2200","\u5929\u6cb3\u533a ","2196"],["2201","\u767d\u4e91\u533a ","2196"],["2202","\u9ec4\u57d4\u533a ","2196"],["2203","\u756a\u79ba\u533a ","2196"],["2204","\u82b1\u90fd\u533a ","2196"],["2205","\u5357\u6c99\u533a ","2196"],["2206","\u841d\u5c97\u533a ","2196"],["2207","\u589e\u57ce\u5e02 ","2196"],["2208","\u4ece\u5316\u5e02 ","2196"],["2209","\u4e1c\u5c71\u533a ","2196"],["2211","\u97f6\u5173\u5e02 ","14"],["2212","\u6b66\u6c5f\u533a ","2211"],["2213","\u6d48\u6c5f\u533a ","2211"],["2214","\u66f2\u6c5f\u533a ","2211"],["2215","\u59cb\u5174\u53bf ","2211"],["2216","\u4ec1\u5316\u53bf ","2211"],["2217","\u7fc1\u6e90\u53bf ","2211"],["2218","\u4e73\u6e90\u7476\u65cf\u81ea\u6cbb\u53bf ","2211"],["2219","\u65b0\u4e30\u53bf ","2211"],["2220","\u4e50\u660c\u5e02 ","2211"],["2221","\u5357\u96c4\u5e02 ","2211"],["2223","\u6df1\u5733\u5e02 ","14"],["2224","\u7f57\u6e56\u533a ","2223"],["2225","\u798f\u7530\u533a ","2223"],["2226","\u5357\u5c71\u533a ","2223"],["2227","\u5b9d\u5b89\u533a ","2223"],["2228","\u9f99\u5c97\u533a ","2223"],["2229","\u76d0\u7530\u533a ","2223"],["2231","\u73e0\u6d77\u5e02 ","14"],["2232","\u9999\u6d32\u533a ","2231"],["2233","\u6597\u95e8\u533a ","2231"],["2234","\u91d1\u6e7e\u533a ","2231"],["2235","\u91d1\u5510\u533a ","2231"],["2236","\u5357\u6e7e\u533a ","2231"],["2238","\u6c55\u5934\u5e02 ","14"],["2239","\u9f99\u6e56\u533a ","2238"],["2240","\u91d1\u5e73\u533a ","2238"],["2241","\u6fe0\u6c5f\u533a ","2238"],["2242","\u6f6e\u9633\u533a ","2238"],["2243","\u6f6e\u5357\u533a ","2238"],["2244","\u6f84\u6d77\u533a ","2238"],["2245","\u5357\u6fb3\u53bf ","2238"],["2247","\u4f5b\u5c71\u5e02 ","14"],["2248","\u7985\u57ce\u533a ","2247"],["2249","\u5357\u6d77\u533a ","2247"],["2250","\u987a\u5fb7\u533a ","2247"],["2251","\u4e09\u6c34\u533a ","2247"],["2252","\u9ad8\u660e\u533a ","2247"],["1856","\u5185\u4e61\u53bf ","1849"],["1857","\u6dc5\u5ddd\u53bf ","1849"],["1858","\u793e\u65d7\u53bf ","1849"],["1859","\u5510\u6cb3\u53bf ","1849"],["1860","\u65b0\u91ce\u53bf ","1849"],["1861","\u6850\u67cf\u53bf ","1849"],["1862","\u9093\u5dde\u5e02 ","1849"],["1864","\u5546\u4e18\u5e02 ","11"],["1865","\u6881\u56ed\u533a ","1864"],["1866","\u7762\u9633\u533a ","1864"],["1867","\u6c11\u6743\u53bf ","1864"],["1868","\u7762\u53bf ","1864"],["1869","\u5b81\u9675\u53bf ","1864"],["1870","\u67d8\u57ce\u53bf ","1864"],["1871","\u865e\u57ce\u53bf ","1864"],["1872","\u590f\u9091\u53bf ","1864"],["1873","\u6c38\u57ce\u5e02 ","1864"],["1875","\u4fe1\u9633\u5e02 ","11"],["1876","\u6d49\u6cb3\u533a ","1875"],["1877","\u5e73\u6865\u533a ","1875"],["1878","\u7f57\u5c71\u53bf ","1875"],["1879","\u5149\u5c71\u53bf ","1875"],["1880","\u65b0\u53bf ","1875"],["1881"," \u5546\u57ce\u53bf ","1875"],["1882","\u56fa\u59cb\u53bf ","1875"],["1883","\u6f62\u5ddd\u53bf ","1875"],["1884","\u6dee\u6ee8\u53bf ","1875"],["1885","\u606f\u53bf ","1875"],["1887","\u5468\u53e3\u5e02 ","11"],["1888","\u5ddd\u6c47\u533a ","1887"],["1889","\u6276\u6c9f\u53bf ","1887"],["1890","\u897f\u534e\u53bf ","1887"],["1891","\u5546\u6c34\u53bf ","1887"],["1892","\u6c88\u4e18\u53bf ","1887"],["1893","\u90f8\u57ce\u53bf ","1887"],["1894","\u6dee\u9633\u53bf ","1887"],["1895","\u592a\u5eb7\u53bf ","1887"],["1896","\u9e7f\u9091\u53bf ","1887"],["1897","\u9879\u57ce\u5e02 ","1887"],["1899","\u9a7b\u9a6c\u5e97\u5e02 ","11"],["1900","\u9a7f\u57ce\u533a ","1899"],["1901","\u897f\u5e73\u53bf ","1899"],["1902","\u4e0a\u8521\u53bf ","1899"],["1903","\u5e73\u8206\u53bf ","1899"],["1904","\u6b63\u9633\u53bf ","1899"],["1905","\u786e\u5c71\u53bf ","1899"],["1906","\u6ccc\u9633\u53bf ","1899"],["1907","\u6c5d\u5357\u53bf ","1899"],["1908","\u9042\u5e73\u53bf ","1899"],["1909","\u65b0\u8521\u53bf ","1899"],["12","\u6e56\u5317\u7701 ","0"],["1912","\u6b66\u6c49\u5e02 ","12"],["1913","\u6c5f\u5cb8\u533a ","1912"],["1914","\u6c5f\u6c49\u533a ","1912"],["1915","\u785a\u53e3\u533a ","1912"],["1916","\u6c49\u9633\u533a ","1912"],["1917","\u6b66\u660c\u533a ","1912"],["1918","\u9752\u5c71\u533a ","1912"],["1919","\u6d2a\u5c71\u533a ","1912"],["1920","\u4e1c\u897f\u6e56\u533a ","1912"],["1921","\u6c49\u5357\u533a ","1912"],["1922","\u8521\u7538\u533a ","1912"],["1923","\u6c5f\u590f\u533a ","1912"],["1924","\u9ec4\u9642\u533a ","1912"],["1925","\u65b0\u6d32\u533a ","1912"],["1927","\u9ec4\u77f3\u5e02 ","12"],["1928","\u9ec4\u77f3\u6e2f\u533a ","1927"],["1929","\u897f\u585e\u5c71\u533a ","1927"],["1930","\u4e0b\u9646\u533a ","1927"],["1931","\u94c1\u5c71\u533a ","1927"],["1932","\u9633\u65b0\u53bf ","1927"],["1933","\u5927\u51b6\u5e02 ","1927"],["1935","\u5341\u5830\u5e02 ","12"],["1936","\u8305\u7bad\u533a ","1935"],["1937","\u5f20\u6e7e\u533a ","1935"],["1938","\u90e7\u53bf ","1935"],["1939","\u90e7\u897f\u53bf ","1935"],["1940","\u7af9\u5c71\u53bf ","1935"],["1941","\u7af9\u6eaa\u53bf ","1935"],["1942","\u623f\u53bf ","1935"],["1943","\u4e39\u6c5f\u53e3\u5e02 ","1935"],["1944","\u57ce\u533a ","1935"],["1946","\u5b9c\u660c\u5e02 ","12"],["1947","\u897f\u9675\u533a ","1946"],["1948","\u4f0d\u5bb6\u5c97\u533a ","1946"],["1949","\u70b9\u519b\u533a ","1946"],["1950","\u7307\u4ead\u533a ","1946"],["1951","\u5937\u9675\u533a ","1946"],["1952","\u8fdc\u5b89\u53bf ","1946"],["1953","\u5174\u5c71\u53bf ","1946"],["1954","\u79ed\u5f52\u53bf ","1946"],["1955","\u957f\u9633\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","1946"],["1956","\u4e94\u5cf0\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","1946"],["1957","\u845b\u6d32\u575d\u533a ","1946"],["1958","\u5f00\u53d1\u533a ","1946"],["1959","\u5b9c\u90fd\u5e02 ","1946"],["1960","\u5f53\u9633\u5e02 ","1946"],["1961","\u679d\u6c5f\u5e02 ","1946"],["1963","\u8944\u6a0a\u5e02 ","12"],["1964","\u8944\u57ce\u533a ","1963"],["1965","\u6a0a\u57ce\u533a ","1963"],["1966","\u8944\u9633\u533a ","1963"],["1967","\u5357\u6f33\u53bf ","1963"],["1968","\u8c37\u57ce\u53bf ","1963"],["1969","\u4fdd\u5eb7\u53bf ","1963"],["1970","\u8001\u6cb3\u53e3\u5e02 ","1963"],["1971","\u67a3\u9633\u5e02 ","1963"],["1972","\u5b9c\u57ce\u5e02 ","1963"],["1974","\u9102\u5dde\u5e02 ","12"],["1975","\u6881\u5b50\u6e56\u533a ","1974"],["1976","\u534e\u5bb9\u533a ","1974"],["1977","\u9102\u57ce\u533a ","1974"],["1979","\u8346\u95e8\u5e02 ","12"],["1980","\u4e1c\u5b9d\u533a ","1979"],["1981","\u6387\u5200\u533a ","1979"],["1982","\u4eac\u5c71\u53bf ","1979"],["1983","\u6c99\u6d0b\u53bf ","1979"],["1984","\u949f\u7965\u5e02 ","1979"],["1986","\u5b5d\u611f\u5e02 ","12"],["1987","\u5b5d\u5357\u533a ","1986"],["1988","\u5b5d\u660c\u53bf ","1986"],["1989","\u5927\u609f\u53bf ","1986"],["1990","\u4e91\u68a6\u53bf ","1986"],["1991","\u5e94\u57ce\u5e02 ","1986"],["1992","\u5b89\u9646\u5e02 ","1986"],["1993","\u6c49\u5ddd\u5e02 ","1986"],["1995","\u8346\u5dde\u5e02 ","12"],["1996","\u6c99\u5e02\u533a ","1995"],["1997","\u8346\u5dde\u533a ","1995"],["1998","\u516c\u5b89\u53bf ","1995"],["1999","\u76d1\u5229\u53bf ","1995"],["2000","\u6c5f\u9675\u53bf ","1995"],["2001","\u77f3\u9996\u5e02 ","1995"],["2002","\u6d2a\u6e56\u5e02 ","1995"],["2003","\u677e\u6ecb\u5e02 ","1995"],["2005","\u9ec4\u5188\u5e02 ","12"],["2006","\u9ec4\u5dde\u533a ","2005"],["2007","\u56e2\u98ce\u53bf ","2005"],["2008","\u7ea2\u5b89\u53bf ","2005"],["2009","\u7f57\u7530\u53bf ","2005"],["2010","\u82f1\u5c71\u53bf ","2005"],["2011","\u6d60\u6c34\u53bf ","2005"],["2012","\u8572\u6625\u53bf ","2005"],["2013","\u9ec4\u6885\u53bf ","2005"],["2014","\u9ebb\u57ce\u5e02 ","2005"],["2015","\u6b66\u7a74\u5e02 ","2005"],["2017","\u54b8\u5b81\u5e02 ","12"],["2018","\u54b8\u5b89\u533a ","2017"],["2019","\u5609\u9c7c\u53bf ","2017"],["2020","\u901a\u57ce\u53bf ","2017"],["2021","\u5d07\u9633\u53bf ","2017"],["2022","\u901a\u5c71\u53bf ","2017"],["2023","\u8d64\u58c1\u5e02 ","2017"],["2024","\u6e29\u6cc9\u57ce\u533a ","2017"],["2026","\u968f\u5dde\u5e02 ","12"],["2027","\u66fe\u90fd\u533a ","2026"],["2028","\u5e7f\u6c34\u5e02 ","2026"],["2030","\u6069\u65bd\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","12"],["2031","\u6069\u65bd\u5e02 ","2030"],["2032","\u5229\u5ddd\u5e02 ","2030"],["2033","\u5efa\u59cb\u53bf ","2030"],["2034","\u5df4\u4e1c\u53bf ","2030"],["2035","\u5ba3\u6069\u53bf ","2030"],["2036","\u54b8\u4e30\u53bf ","2030"],["2037","\u6765\u51e4\u53bf ","2030"],["2038","\u9e64\u5cf0\u53bf ","2030"],["2040"," \u4ed9\u6843\u5e02 ","12"],["2041","\u6f5c\u6c5f\u5e02 ","12"],["2042","\u5929\u95e8\u5e02 ","12"],["2043","\u795e\u519c\u67b6\u6797\u533a ","12"],["13","\u6e56\u5357\u7701 ","0"],["2045","\u957f\u6c99\u5e02 ","13"],["2046","\u8299\u84c9\u533a ","2045"],["2047","\u5929\u5fc3\u533a ","2045"],["2048","\u5cb3\u9e93\u533a ","2045"],["2049","\u5f00\u798f\u533a ","2045"],["2050","\u96e8\u82b1\u533a ","2045"],["2051","\u957f\u6c99\u53bf ","2045"],["2052","\u671b\u57ce\u53bf ","2045"],["2053","\u5b81\u4e61\u53bf ","2045"],["2782","\u4f1a\u7406\u53bf ","2777"],["2783","\u4f1a\u4e1c\u53bf ","2777"],["2784","\u5b81\u5357\u53bf ","2777"],["2785","\u666e\u683c\u53bf ","2777"],["2786","\u5e03\u62d6\u53bf ","2777"],["2787","\u91d1\u9633\u53bf ","2777"],["2788","\u662d\u89c9\u53bf ","2777"],["2789","\u559c\u5fb7\u53bf ","2777"],["2790","\u5195\u5b81\u53bf ","2777"],["2791","\u8d8a\u897f\u53bf ","2777"],["2792","\u7518\u6d1b\u53bf ","2777"],["2793","\u7f8e\u59d1\u53bf ","2777"],["2794","\u96f7\u6ce2\u53bf ","2777"],["17","\u8d35\u5dde\u7701 ","0"],["2797","\u8d35\u9633\u5e02 ","17"],["2798","\u5357\u660e\u533a ","2797"],["2799","\u4e91\u5ca9\u533a ","2797"],["2800","\u82b1\u6eaa\u533a ","2797"],["2801","\u4e4c\u5f53\u533a ","2797"],["2802","\u767d\u4e91\u533a ","2797"],["2803","\u5c0f\u6cb3\u533a ","2797"],["2804","\u5f00\u9633\u53bf ","2797"],["2805","\u606f\u70fd\u53bf ","2797"],["2806","\u4fee\u6587\u53bf ","2797"],["2807","\u91d1\u9633\u5f00\u53d1\u533a ","2797"],["2808","\u6e05\u9547\u5e02 ","2797"],["2810","\u516d\u76d8\u6c34\u5e02 ","17"],["2811","\u949f\u5c71\u533a ","2810"],["2812","\u516d\u679d\u7279\u533a ","2810"],["2813","\u6c34\u57ce\u53bf ","2810"],["2814","\u76d8\u53bf ","2810"],["2816","\u9075\u4e49\u5e02 ","17"],["2817","\u7ea2\u82b1\u5c97\u533a ","2816"],["2818","\u6c47\u5ddd\u533a ","2816"],["2819","\u9075\u4e49\u53bf ","2816"],["2820","\u6850\u6893\u53bf ","2816"],["2821","\u7ee5\u9633\u53bf ","2816"],["2822","\u6b63\u5b89\u53bf ","2816"],["2823","\u9053\u771f\u4ee1\u4f6c\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2816"],["2824","\u52a1\u5ddd\u4ee1\u4f6c\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2816"],["2825","\u51e4\u5188\u53bf ","2816"],["2826","\u6e44\u6f6d\u53bf ","2816"],["2827","\u4f59\u5e86\u53bf ","2816"],["2828","\u4e60\u6c34\u53bf ","2816"],["2829","\u8d64\u6c34\u5e02 ","2816"],["2830","\u4ec1\u6000\u5e02 ","2816"],["2832","\u5b89\u987a\u5e02 ","17"],["2833","\u897f\u79c0\u533a ","2832"],["2834","\u5e73\u575d\u53bf ","2832"],["2835","\u666e\u5b9a\u53bf ","2832"],["2836","\u9547\u5b81\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2832"],["2837","\u5173\u5cad\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2832"],["2838","\u7d2b\u4e91\u82d7\u65cf\u5e03\u4f9d\u65cf\u81ea\u6cbb\u53bf ","2832"],["2840","\u94dc\u4ec1\u5730\u533a ","17"],["2841","\u94dc\u4ec1\u5e02 ","2840"],["2842","\u6c5f\u53e3\u53bf ","2840"],["2843","\u7389\u5c4f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2840"],["2844","\u77f3\u9621\u53bf ","2840"],["2845","\u601d\u5357\u53bf ","2840"],["2846","\u5370\u6c5f\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2840"],["2847","\u5fb7\u6c5f\u53bf ","2840"],["2318","\u9f99\u5ddd\u53bf ","2315"],["2319","\u8fde\u5e73\u53bf ","2315"],["2320","\u548c\u5e73\u53bf ","2315"],["2321","\u4e1c\u6e90\u53bf ","2315"],["2323","\u9633\u6c5f\u5e02 ","14"],["2324","\u6c5f\u57ce\u533a ","2323"],["2325","\u9633\u897f\u53bf ","2323"],["2326","\u9633\u4e1c\u53bf ","2323"],["2327","\u9633\u6625\u5e02 ","2323"],["2329","\u6e05\u8fdc\u5e02 ","14"],["2330","\u6e05\u57ce\u533a ","2329"],["2331","\u4f5b\u5188\u53bf ","2329"],["2332","\u9633\u5c71\u53bf ","2329"],["2333","\u8fde\u5c71\u58ee\u65cf\u7476\u65cf\u81ea\u6cbb\u53bf ","2329"],["2334","\u8fde\u5357\u7476\u65cf\u81ea\u6cbb\u53bf ","2329"],["2335","\u6e05\u65b0\u53bf ","2329"],["2336","\u82f1\u5fb7\u5e02 ","2329"],["2337","\u8fde\u5dde\u5e02 ","2329"],["2339","\u4e1c\u839e\u5e02 ","14"],["2340","\u4e2d\u5c71\u5e02 ","14"],["2341","\u6f6e\u5dde\u5e02 ","14"],["2342","\u6e58\u6865\u533a ","2341"],["2343","\u6f6e\u5b89\u53bf ","2341"],["2344","\u9976\u5e73\u53bf ","2341"],["2345","\u67ab\u6eaa\u533a ","2341"],["2347","\u63ed\u9633\u5e02 ","14"],["2348","\u6995\u57ce\u533a ","2347"],["2349","\u63ed\u4e1c\u53bf ","2347"],["2350","\u63ed\u897f\u53bf ","2347"],["2351","\u60e0\u6765\u53bf ","2347"],["2352","\u666e\u5b81\u5e02 ","2347"],["2353","\u4e1c\u5c71\u533a ","2347"],["2355","\u4e91\u6d6e\u5e02 ","14"],["2356","\u4e91\u57ce\u533a ","2355"],["2357","\u65b0\u5174\u53bf ","2355"],["2358","\u90c1\u5357\u53bf ","2355"],["2359","\u4e91\u5b89\u53bf ","2355"],["2360","\u7f57\u5b9a\u5e02 ","2355"],["24","\u5e7f\u897f\u58ee\u65cf\u81ea\u6cbb\u533a ","0"],["2363"," \u5357\u5b81\u5e02 ","24"],["2364","\u5174\u5b81\u533a ","2363"],["2365","\u9752\u79c0\u533a ","2363"],["2366","\u6c5f\u5357\u533a ","2363"],["2367","\u897f\u4e61\u5858\u533a ","2363"],["2368","\u826f\u5e86\u533a ","2363"],["2369","\u9095\u5b81\u533a ","2363"],["2370","\u6b66\u9e23\u53bf ","2363"],["2371","\u9686\u5b89\u53bf ","2363"],["2372","\u9a6c\u5c71\u53bf ","2363"],["2373","\u4e0a\u6797\u53bf ","2363"],["2374","\u5bbe\u9633\u53bf ","2363"],["2375","\u6a2a\u53bf ","2363"],["2377","\u67f3\u5dde\u5e02 ","24"],["2378","\u57ce\u4e2d\u533a ","2377"],["2379","\u9c7c\u5cf0\u533a ","2377"],["2380","\u67f3\u5357\u533a ","2377"],["2381","\u67f3\u5317\u533a ","2377"],["2382","\u67f3\u6c5f\u53bf ","2377"],["2383","\u67f3\u57ce\u53bf ","2377"],["2384","\u9e7f\u5be8\u53bf ","2377"],["2385","\u878d\u5b89\u53bf ","2377"],["2386","\u878d\u6c34\u82d7\u65cf\u81ea\u6cbb\u53bf ","2377"],["2387","\u4e09\u6c5f\u4f97\u65cf\u81ea\u6cbb\u53bf ","2377"],["2389","\u6842\u6797\u5e02 ","24"],["2390","\u79c0\u5cf0\u533a ","2389"],["2391","\u53e0\u5f69\u533a ","2389"],["2392","\u8c61\u5c71\u533a ","2389"],["2393","\u4e03\u661f\u533a ","2389"],["2394","\u96c1\u5c71\u533a ","2389"],["2395","\u9633\u6714\u53bf ","2389"],["2396","\u4e34\u6842\u53bf ","2389"],["2397","\u7075\u5ddd\u53bf ","2389"],["2398","\u5168\u5dde\u53bf ","2389"],["2399","\u5174\u5b89\u53bf ","2389"],["2400","\u6c38\u798f\u53bf ","2389"],["2401","\u704c\u9633\u53bf ","2389"],["2402","\u9f99\u80dc\u5404\u65cf\u81ea\u6cbb\u53bf ","2389"],["2403","\u8d44\u6e90\u53bf ","2389"],["2404","\u5e73\u4e50\u53bf ","2389"],["2405","\u8354\u6d66\u53bf ","2389"],["2406","\u606d\u57ce\u7476\u65cf\u81ea\u6cbb\u53bf ","2389"],["2408","\u68a7\u5dde\u5e02 ","24"],["2409","\u4e07\u79c0\u533a ","2408"],["2410","\u8776\u5c71\u533a ","2408"],["2411","\u957f\u6d32\u533a ","2408"],["2412","\u82cd\u68a7\u53bf ","2408"],["2413","\u85e4\u53bf ","2408"],["2414","\u8499\u5c71\u53bf ","2408"],["2415","\u5c91\u6eaa\u5e02 ","2408"],["2417","\u5317\u6d77\u5e02 ","24"],["2418","\u6d77\u57ce\u533a ","2417"],["2419","\u94f6\u6d77\u533a ","2417"],["2420","\u94c1\u5c71\u6e2f\u533a ","2417"],["2421","\u5408\u6d66\u53bf ","2417"],["2423","\u9632\u57ce\u6e2f\u5e02 ","24"],["2424","\u6e2f\u53e3\u533a ","2423"],["2425","\u9632\u57ce\u533a ","2423"],["2426","\u4e0a\u601d\u53bf ","2423"],["2427","\u4e1c\u5174\u5e02 ","2423"],["2429","\u94a6\u5dde\u5e02 ","24"],["2430","\u94a6\u5357\u533a ","2429"],["2431","\u94a6\u5317\u533a ","2429"],["2432","\u7075\u5c71\u53bf ","2429"],["2433","\u6d66\u5317\u53bf ","2429"],["2435","\u8d35\u6e2f\u5e02 ","24"],["2436","\u6e2f\u5317\u533a ","2435"],["2437","\u6e2f\u5357\u533a ","2435"],["2438","\u8983\u5858\u533a ","2435"],["2439","\u5e73\u5357\u53bf ","2435"],["2440","\u6842\u5e73\u5e02 ","2435"],["2442","\u7389\u6797\u5e02 ","24"],["2443","\u7389\u5dde\u533a ","2442"],["2444","\u5bb9\u53bf ","2442"],["2445","\u9646\u5ddd\u53bf ","2442"],["2446","\u535a\u767d\u53bf ","2442"],["2447","\u5174\u4e1a\u53bf ","2442"],["2448","\u5317\u6d41\u5e02 ","2442"],["2450","\u767e\u8272\u5e02 ","24"],["2451","\u53f3\u6c5f\u533a ","2450"],["2452","\u7530\u9633\u53bf ","2450"],["2453","\u7530\u4e1c\u53bf ","2450"],["2454","\u5e73\u679c\u53bf ","2450"],["2455","\u5fb7\u4fdd\u53bf ","2450"],["2456","\u9756\u897f\u53bf ","2450"],["2457","\u90a3\u5761\u53bf ","2450"],["2458","\u51cc\u4e91\u53bf ","2450"],["2459","\u4e50\u4e1a\u53bf ","2450"],["2460","\u7530\u6797\u53bf ","2450"],["2461","\u897f\u6797\u53bf ","2450"],["2462","\u9686\u6797\u5404\u65cf\u81ea\u6cbb\u53bf ","2450"],["2464","\u8d3a\u5dde\u5e02 ","24"],["2465","\u516b\u6b65\u533a ","2464"],["2466","\u662d\u5e73\u53bf ","2464"],["2467","\u949f\u5c71\u53bf ","2464"],["2468","\u5bcc\u5ddd\u7476\u65cf\u81ea\u6cbb\u53bf ","2464"],["2470","\u6cb3\u6c60\u5e02 ","24"],["2471","\u91d1\u57ce\u6c5f\u533a ","2470"],["2472","\u5357\u4e39\u53bf ","2470"],["2473","\u5929\u5ce8\u53bf ","2470"],["2474","\u51e4\u5c71\u53bf ","2470"],["2475","\u4e1c\u5170\u53bf ","2470"],["2476","\u7f57\u57ce\u4eeb\u4f6c\u65cf\u81ea\u6cbb\u53bf ","2470"],["2477","\u73af\u6c5f\u6bdb\u5357\u65cf\u81ea\u6cbb\u53bf ","2470"],["2478","\u5df4\u9a6c\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2479","\u90fd\u5b89\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2480","\u5927\u5316\u7476\u65cf\u81ea\u6cbb\u53bf ","2470"],["2481","\u5b9c\u5dde\u5e02 ","2470"],["2483","\u6765\u5bbe\u5e02 ","24"],["2484","\u5174\u5bbe\u533a ","2483"],["2485","\u5ffb\u57ce\u53bf ","2483"],["2486","\u8c61\u5dde\u53bf ","2483"],["2487","\u6b66\u5ba3\u53bf ","2483"],["2488","\u91d1\u79c0\u7476\u65cf\u81ea\u6cbb\u53bf ","2483"],["2489","\u5408\u5c71\u5e02 ","2483"],["2491","\u5d07\u5de6\u5e02 ","24"],["2492","\u6c5f\u5dde\u533a ","2491"],["2493","\u6276\u7ee5\u53bf ","2491"],["2494","\u5b81\u660e\u53bf ","2491"],["2495","\u9f99\u5dde\u53bf ","2491"],["2496","\u5927\u65b0\u53bf ","2491"],["2497","\u5929\u7b49\u53bf ","2491"],["2498","\u51ed\u7965\u5e02 ","2491"],["15","\u6d77\u5357\u7701 ","0"],["2501","\u6d77\u53e3\u5e02 ","15"],["2502","\u79c0\u82f1\u533a ","2501"],["2503","\u9f99\u534e\u533a ","2501"],["2504","\u743c\u5c71\u533a ","2501"],["2505","\u7f8e\u5170\u533a ","2501"],["2507","\u4e09\u4e9a\u5e02 ","15"],["2508","\u4e94\u6307\u5c71\u5e02 ","15"],["2509","\u743c\u6d77\u5e02 ","15"],["2510","\u510b\u5dde\u5e02 ","15"],["2511","\u6587\u660c\u5e02 ","15"],["2512","\u4e07\u5b81\u5e02 ","15"],["2513","\u4e1c\u65b9\u5e02 ","15"],["2514","\u5b9a\u5b89\u53bf ","15"],["2515","\u5c6f\u660c\u53bf ","15"],["2516","\u6f84\u8fc8\u53bf ","15"],["2517","\u4e34\u9ad8\u53bf ","15"],["2518","\u767d\u6c99\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2519","\u660c\u6c5f\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2520","\u4e50\u4e1c\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2521","\u9675\u6c34\u9ece\u65cf\u81ea\u6cbb\u53bf ","15"],["2522","\u4fdd\u4ead\u9ece\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","15"],["2523","\u743c\u4e2d\u9ece\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","15"],["2524","\u897f\u6c99\u7fa4\u5c9b ","15"],["2525","\u5357\u6c99\u7fa4\u5c9b ","15"],["2526","\u4e2d\u6c99\u7fa4\u5c9b\u7684\u5c9b\u7901\u53ca\u5176\u6d77\u57df ","15"],["31","\u91cd\u5e86 ","0"],["2529","\u4e07\u5dde\u533a ","31"],["2530"," \u6daa\u9675\u533a ","31"],["2531","\u6e1d\u4e2d\u533a ","31"],["2532","\u5927\u6e21\u53e3\u533a ","31"],["2533","\u6c5f\u5317\u533a ","31"],["2534","\u6c99\u576a\u575d\u533a ","31"],["2535","\u4e5d\u9f99\u5761\u533a ","31"],["2536","\u5357\u5cb8\u533a ","31"],["2537","\u5317\u789a\u533a ","31"],["2538","\u4e07\u76db\u533a ","31"],["2539","\u53cc\u6865\u533a ","31"],["2540","\u6e1d\u5317\u533a ","31"],["2541","\u5df4\u5357\u533a ","31"],["2542","\u9ed4\u6c5f\u533a ","31"],["2543","\u957f\u5bff\u533a ","31"],["2544","\u7da6\u6c5f\u53bf ","31"],["2545","\u6f7c\u5357\u53bf ","31"],["2546","\u94dc\u6881\u53bf ","31"],["2547","\u5927\u8db3\u53bf ","31"],["2548","\u8363\u660c\u53bf ","31"],["2549","\u74a7\u5c71\u53bf ","31"],["2550","\u6881\u5e73\u53bf ","31"],["2551","\u57ce\u53e3\u53bf ","31"],["2552","\u4e30\u90fd\u53bf ","31"],["2553","\u57ab\u6c5f\u53bf ","31"],["2554","\u6b66\u9686\u53bf ","31"],["2555","\u5fe0\u53bf ","31"],["2556","\u5f00\u53bf ","31"],["2557","\u4e91\u9633\u53bf ","31"],["2558","\u5949\u8282\u53bf ","31"],["2559","\u5deb\u5c71\u53bf ","31"],["2560","\u5deb\u6eaa\u53bf ","31"],["2561","\u77f3\u67f1\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","31"],["2562","\u79c0\u5c71\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","31"],["2563","\u9149\u9633\u571f\u5bb6\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","31"],["2564","\u5f6d\u6c34\u82d7\u65cf\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","31"],["2565","\u6c5f\u6d25\u533a ","31"],["2566","\u5408\u5ddd\u533a ","31"],["2567","\u6c38\u5ddd\u533a ","31"],["2568","\u5357\u5ddd\u533a ","31"],["16","\u56db\u5ddd\u7701 ","0"],["2571","\u6210\u90fd\u5e02 ","16"],["2572","\u9526\u6c5f\u533a ","2571"],["2573","\u9752\u7f8a\u533a ","2571"],["2574","\u91d1\u725b\u533a ","2571"],["2575","\u6b66\u4faf\u533a ","2571"],["2576","\u6210\u534e\u533a ","2571"],["2577","\u9f99\u6cc9\u9a7f\u533a ","2571"],["2578","\u9752\u767d\u6c5f\u533a ","2571"],["2579","\u65b0\u90fd\u533a ","2571"],["2580","\u6e29\u6c5f\u533a ","2571"],["2581","\u91d1\u5802\u53bf ","2571"],["2582","\u53cc\u6d41\u53bf ","2571"],["2583","\u90eb\u53bf ","2571"],["2584","\u5927\u9091\u53bf ","2571"],["2585","\u84b2\u6c5f\u53bf ","2571"],["2586","\u65b0\u6d25\u53bf ","2571"],["2587","\u90fd\u6c5f\u5830\u5e02 ","2571"],["2588","\u5f6d\u5dde\u5e02 ","2571"],["2589","\u909b\u5d03\u5e02 ","2571"],["2590","\u5d07\u5dde\u5e02 ","2571"],["2592","\u81ea\u8d21\u5e02 ","16"],["2593","\u81ea\u6d41\u4e95\u533a ","2592"],["2594","\u8d21\u4e95\u533a ","2592"],["2595","\u5927\u5b89\u533a ","2592"],["2596","\u6cbf\u6ee9\u533a ","2592"],["2597","\u8363\u53bf ","2592"],["2598"," \u5bcc\u987a\u53bf ","2592"],["2600","\u6500\u679d\u82b1\u5e02 ","16"],["2601","\u4e1c\u533a ","2600"],["2602","\u897f\u533a ","2600"],["2603","\u4ec1\u548c\u533a ","2600"],["2604","\u7c73\u6613\u53bf ","2600"],["2605","\u76d0\u8fb9\u53bf ","2600"],["2607","\u6cf8\u5dde\u5e02 ","16"],["2608","\u6c5f\u9633\u533a ","2607"],["2609","\u7eb3\u6eaa\u533a ","2607"],["2610","\u9f99\u9a6c\u6f6d\u533a ","2607"],["2611","\u6cf8\u53bf ","2607"],["2612","\u5408\u6c5f\u53bf ","2607"],["2613","\u53d9\u6c38\u53bf ","2607"],["2614","\u53e4\u853a\u53bf ","2607"],["2616","\u5fb7\u9633\u5e02 ","16"],["2617","\u65cc\u9633\u533a ","2616"],["2618","\u4e2d\u6c5f\u53bf ","2616"],["2619","\u7f57\u6c5f\u53bf ","2616"],["2620","\u5e7f\u6c49\u5e02 ","2616"],["2621","\u4ec0\u90a1\u5e02 ","2616"],["2622","\u7ef5\u7af9\u5e02 ","2616"],["2624","\u7ef5\u9633\u5e02 ","16"],["2625","\u6daa\u57ce\u533a ","2624"],["2626","\u6e38\u4ed9\u533a ","2624"],["2627","\u4e09\u53f0\u53bf ","2624"],["2628","\u76d0\u4ead\u53bf ","2624"],["2629","\u5b89\u53bf ","2624"],["2630"," \u6893\u6f7c\u53bf ","2624"],["2631","\u5317\u5ddd\u7f8c\u65cf\u81ea\u6cbb\u53bf ","2624"],["2632","\u5e73\u6b66\u53bf ","2624"],["2633","\u9ad8\u65b0\u533a ","2624"],["2634","\u6c5f\u6cb9\u5e02 ","2624"],["2636","\u5e7f\u5143\u5e02 ","16"],["2637","\u5229\u5dde\u533a ","2636"],["2638","\u5143\u575d\u533a ","2636"],["2639","\u671d\u5929\u533a ","2636"],["2640","\u65fa\u82cd\u53bf ","2636"],["2641","\u9752\u5ddd\u53bf ","2636"],["2642","\u5251\u9601\u53bf ","2636"],["2643","\u82cd\u6eaa\u53bf ","2636"],["2645","\u9042\u5b81\u5e02 ","16"],["2646","\u8239\u5c71\u533a ","2645"],["2647","\u5b89\u5c45\u533a ","2645"],["2648","\u84ec\u6eaa\u53bf ","2645"],["2649","\u5c04\u6d2a\u53bf ","2645"],["2650","\u5927\u82f1\u53bf ","2645"],["2652","\u5185\u6c5f\u5e02 ","16"],["2653","\u5e02\u4e2d\u533a ","2652"],["2654","\u4e1c\u5174\u533a ","2652"],["2655","\u5a01\u8fdc\u53bf ","2652"],["2656","\u8d44\u4e2d\u53bf ","2652"],["2657","\u9686\u660c\u53bf ","2652"],["2659","\u4e50\u5c71\u5e02 ","16"],["2660","\u5e02\u4e2d\u533a ","2659"],["2661","\u6c99\u6e7e\u533a ","2659"],["2662","\u4e94\u901a\u6865\u533a ","2659"],["2663","\u91d1\u53e3\u6cb3\u533a ","2659"],["2664","\u728d\u4e3a\u53bf ","2659"],["2665","\u4e95\u7814\u53bf ","2659"],["2666","\u5939\u6c5f\u53bf ","2659"],["2667","\u6c90\u5ddd\u53bf ","2659"],["2668","\u5ce8\u8fb9\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2659"],["2669","\u9a6c\u8fb9\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2659"],["2670","\u5ce8\u7709\u5c71\u5e02 ","2659"],["2672","\u5357\u5145\u5e02 ","16"],["2673","\u987a\u5e86\u533a ","2672"],["2674","\u9ad8\u576a\u533a ","2672"],["2675","\u5609\u9675\u533a ","2672"],["2676","\u5357\u90e8\u53bf ","2672"],["2677","\u8425\u5c71\u53bf ","2672"],["2678","\u84ec\u5b89\u53bf ","2672"],["2679","\u4eea\u9647\u53bf ","2672"],["2680","\u897f\u5145\u53bf ","2672"],["2681","\u9606\u4e2d\u5e02 ","2672"],["2683","\u7709\u5c71\u5e02 ","16"],["2684","\u4e1c\u5761\u533a ","2683"],["2685","\u4ec1\u5bff\u53bf ","2683"],["2686","\u5f6d\u5c71\u53bf ","2683"],["2687","\u6d2a\u96c5\u53bf ","2683"],["2688","\u4e39\u68f1\u53bf ","2683"],["2689","\u9752\u795e\u53bf ","2683"],["2691","\u5b9c\u5bbe\u5e02 ","16"],["2692","\u7fe0\u5c4f\u533a ","2691"],["2693","\u5b9c\u5bbe\u53bf ","2691"],["2694","\u5357\u6eaa\u53bf ","2691"],["2695","\u6c5f\u5b89\u53bf ","2691"],["2696","\u957f\u5b81\u53bf ","2691"],["2697","\u9ad8\u53bf ","2691"],["2698","\u73d9\u53bf ","2691"],["2699","\u7b60\u8fde\u53bf ","2691"],["2700","\u5174\u6587\u53bf ","2691"],["2701","\u5c4f\u5c71\u53bf ","2691"],["2703","\u5e7f\u5b89\u5e02 ","16"],["2704","\u5e7f\u5b89\u533a ","2703"],["2705","\u5cb3\u6c60\u53bf ","2703"],["2706","\u6b66\u80dc\u53bf ","2703"],["2707","\u90bb\u6c34\u53bf ","2703"],["2708","\u534e\u84e5\u5e02 ","2703"],["2709","\u5e02\u8f96\u533a ","2703"],["2711","\u8fbe\u5dde\u5e02 ","16"],["2712","\u901a\u5ddd\u533a ","2711"],["2713","\u8fbe\u53bf ","2711"],["2714","\u5ba3\u6c49\u53bf ","2711"],["2715","\u5f00\u6c5f\u53bf ","2711"],["2716","\u5927\u7af9\u53bf ","2711"],["2717","\u6e20\u53bf ","2711"],["2718"," \u4e07\u6e90\u5e02 ","2711"],["2720","\u96c5\u5b89\u5e02 ","16"],["2721","\u96e8\u57ce\u533a ","2720"],["2722","\u540d\u5c71\u53bf ","2720"],["2723","\u8365\u7ecf\u53bf ","2720"],["2724","\u6c49\u6e90\u53bf ","2720"],["2725","\u77f3\u68c9\u53bf ","2720"],["2726","\u5929\u5168\u53bf ","2720"],["2727","\u82a6\u5c71\u53bf ","2720"],["2728","\u5b9d\u5174\u53bf ","2720"],["2730","\u5df4\u4e2d\u5e02 ","16"],["2731","\u5df4\u5dde\u533a ","2730"],["2732","\u901a\u6c5f\u53bf ","2730"],["2733","\u5357\u6c5f\u53bf ","2730"],["2734","\u5e73\u660c\u53bf ","2730"],["2736","\u8d44\u9633\u5e02 ","16"],["2737","\u96c1\u6c5f\u533a ","2736"],["2738","\u5b89\u5cb3\u53bf ","2736"],["2739","\u4e50\u81f3\u53bf ","2736"],["2740","\u7b80\u9633\u5e02 ","2736"],["2742","\u963f\u575d\u85cf\u65cf\u7f8c\u65cf\u81ea\u6cbb\u5dde ","16"],["2743","\u6c76\u5ddd\u53bf ","2742"],["2744","\u7406\u53bf ","2742"],["2745","\u8302\u53bf ","2742"],["2746","\u677e\u6f58\u53bf ","2742"],["2747"," \u4e5d\u5be8\u6c9f\u53bf ","2742"],["2748","\u91d1\u5ddd\u53bf ","2742"],["2749","\u5c0f\u91d1\u53bf ","2742"],["2750","\u9ed1\u6c34\u53bf ","2742"],["2751","\u9a6c\u5c14\u5eb7\u53bf ","2742"],["2752","\u58e4\u5858\u53bf ","2742"],["2753","\u963f\u575d\u53bf ","2742"],["2754","\u82e5\u5c14\u76d6\u53bf ","2742"],["2755","\u7ea2\u539f\u53bf ","2742"],["2757","\u7518\u5b5c\u85cf\u65cf\u81ea\u6cbb\u5dde ","16"],["2758","\u5eb7\u5b9a\u53bf ","2757"],["2759","\u6cf8\u5b9a\u53bf ","2757"],["2760","\u4e39\u5df4\u53bf ","2757"],["2761","\u4e5d\u9f99\u53bf ","2757"],["2762","\u96c5\u6c5f\u53bf ","2757"],["2763","\u9053\u5b5a\u53bf ","2757"],["2764","\u7089\u970d\u53bf ","2757"],["2765","\u7518\u5b5c\u53bf ","2757"],["2766","\u65b0\u9f99\u53bf ","2757"],["2767","\u5fb7\u683c\u53bf ","2757"],["2768","\u767d\u7389\u53bf ","2757"],["2769","\u77f3\u6e20\u53bf ","2757"],["2770","\u8272\u8fbe\u53bf ","2757"],["2771","\u7406\u5858\u53bf ","2757"],["2772","\u5df4\u5858\u53bf ","2757"],["2773","\u4e61\u57ce\u53bf ","2757"],["2774","\u7a3b\u57ce\u53bf ","2757"],["2775","\u5f97\u8363\u53bf ","2757"],["2777","\u51c9\u5c71\u5f5d\u65cf\u81ea\u6cbb\u5dde ","16"],["2778","\u897f\u660c\u5e02 ","2777"],["2779","\u6728\u91cc\u85cf\u65cf\u81ea\u6cbb\u53bf ","2777"],["2780","\u76d0\u6e90\u53bf ","2777"],["2781","\u5fb7\u660c\u53bf ","2777"],["3046","\u9e64\u5e86\u53bf ","3034"],["3048","\u5fb7\u5b8f\u50a3\u65cf\u666f\u9887\u65cf\u81ea\u6cbb\u5dde ","18"],["3049","\u745e\u4e3d\u5e02 ","3048"],["3050","\u6f5e\u897f\u5e02 ","3048"],["3051","\u6881\u6cb3\u53bf ","3048"],["3052","\u76c8\u6c5f\u53bf ","3048"],["3053","\u9647\u5ddd\u53bf ","3048"],["3055","\u6012\u6c5f\u5088\u50f3\u65cf\u81ea\u6cbb\u5dde ","18"],["3056","\u6cf8\u6c34\u53bf ","3055"],["3057","\u798f\u8d21\u53bf ","3055"],["3058","\u8d21\u5c71\u72ec\u9f99\u65cf\u6012\u65cf\u81ea\u6cbb\u53bf ","3055"],["3059","\u5170\u576a\u767d\u65cf\u666e\u7c73\u65cf\u81ea\u6cbb\u53bf ","3055"],["3061","\u8fea\u5e86\u85cf\u65cf\u81ea\u6cbb\u5dde ","18"],["3062","\u9999\u683c\u91cc\u62c9\u53bf ","3061"],["3063","\u5fb7\u94a6\u53bf ","3061"],["3064","\u7ef4\u897f\u5088\u50f3\u65cf\u81ea\u6cbb\u53bf ","3061"],["25","\u897f\u85cf\u81ea\u6cbb\u533a ","0"],["3067","\u62c9\u8428\u5e02 ","25"],["3068","\u57ce\u5173\u533a ","3067"],["3069","\u6797\u5468\u53bf ","3067"],["3070","\u5f53\u96c4\u53bf ","3067"],["3071","\u5c3c\u6728\u53bf ","3067"],["3072","\u66f2\u6c34\u53bf ","3067"],["3073","\u5806\u9f99\u5fb7\u5e86\u53bf ","3067"],["3074","\u8fbe\u5b5c\u53bf ","3067"],["3075","\u58a8\u7af9\u5de5\u5361\u53bf ","3067"],["3077","\u660c\u90fd\u5730\u533a ","25"],["3078","\u660c\u90fd\u53bf ","3077"],["3079","\u6c5f\u8fbe\u53bf ","3077"],["3080","\u8d21\u89c9\u53bf ","3077"],["3081","\u7c7b\u4e4c\u9f50\u53bf ","3077"],["3082","\u4e01\u9752\u53bf ","3077"],["3083","\u5bdf\u96c5\u53bf ","3077"],["3084","\u516b\u5bbf\u53bf ","3077"],["3085","\u5de6\u8d21\u53bf ","3077"],["3086","\u8292\u5eb7\u53bf ","3077"],["3087","\u6d1b\u9686\u53bf ","3077"],["3088","\u8fb9\u575d\u53bf ","3077"],["3090","\u5c71\u5357\u5730\u533a ","25"],["3091","\u4e43\u4e1c\u53bf ","3090"],["3092","\u624e\u56ca\u53bf ","3090"],["3093","\u8d21\u560e\u53bf ","3090"],["3094","\u6851\u65e5\u53bf ","3090"],["3095","\u743c\u7ed3\u53bf ","3090"],["3096","\u66f2\u677e\u53bf ","3090"],["3097","\u63aa\u7f8e\u53bf ","3090"],["3098","\u6d1b\u624e\u53bf ","3090"],["3099","\u52a0\u67e5\u53bf ","3090"],["3100","\u9686\u5b50\u53bf ","3090"],["3101","\u9519\u90a3\u53bf ","3090"],["3102","\u6d6a\u5361\u5b50\u53bf ","3090"],["3104","\u65e5\u5580\u5219\u5730\u533a ","25"],["3105","\u65e5\u5580\u5219\u5e02 ","3104"],["3106","\u5357\u6728\u6797\u53bf ","3104"],["3107","\u6c5f\u5b5c\u53bf ","3104"],["3108","\u5b9a\u65e5\u53bf ","3104"],["3109","\u8428\u8fe6\u53bf ","3104"],["3110","\u62c9\u5b5c\u53bf ","3104"],["3111","\u6602\u4ec1\u53bf ","3104"],["3112","\u8c22\u901a\u95e8\u53bf ","3104"],["3247","\u6986\u6797\u5e02 ","19"],["3248","\u6986\u9633\u533a ","3247"],["3249","\u795e\u6728\u53bf ","3247"],["3250","\u5e9c\u8c37\u53bf ","3247"],["3251","\u6a2a\u5c71\u53bf ","3247"],["3252","\u9756\u8fb9\u53bf ","3247"],["3253","\u5b9a\u8fb9\u53bf ","3247"],["3254","\u7ee5\u5fb7\u53bf ","3247"],["3255","\u7c73\u8102\u53bf ","3247"],["3256","\u4f73\u53bf ","3247"],["3257","\u5434\u5821\u53bf ","3247"],["3258","\u6e05\u6da7\u53bf ","3247"],["3259","\u5b50\u6d32\u53bf ","3247"],["3261","\u5b89\u5eb7\u5e02 ","19"],["3262","\u6c49\u6ee8\u533a ","3261"],["3263","\u6c49\u9634\u53bf ","3261"],["3264","\u77f3\u6cc9\u53bf ","3261"],["3265","\u5b81\u9655\u53bf ","3261"],["3266","\u7d2b\u9633\u53bf ","3261"],["3267","\u5c9a\u768b\u53bf ","3261"],["3268","\u5e73\u5229\u53bf ","3261"],["3269","\u9547\u576a\u53bf ","3261"],["3270","\u65ec\u9633\u53bf ","3261"],["3271","\u767d\u6cb3\u53bf ","3261"],["3273","\u5546\u6d1b\u5e02 ","19"],["3274","\u5546\u5dde\u533a ","3273"],["3275","\u6d1b\u5357\u53bf ","3273"],["3276","\u4e39\u51e4\u53bf ","3273"],["3277","\u5546\u5357\u53bf ","3273"],["3278","\u5c71\u9633\u53bf ","3273"],["3279","\u9547\u5b89\u53bf ","3273"],["3280","\u67de\u6c34\u53bf ","3273"],["20","\u7518\u8083\u7701 ","0"],["3283","\u5170\u5dde\u5e02 ","20"],["3284","\u57ce\u5173\u533a ","3283"],["3285","\u4e03\u91cc\u6cb3\u533a ","3283"],["3286","\u897f\u56fa\u533a ","3283"],["3287","\u5b89\u5b81\u533a ","3283"],["3288","\u7ea2\u53e4\u533a ","3283"],["3289","\u6c38\u767b\u53bf ","3283"],["3290","\u768b\u5170\u53bf ","3283"],["3291","\u6986\u4e2d\u53bf ","3283"],["3293","\u5609\u5cea\u5173\u5e02 ","20"],["3294","\u91d1\u660c\u5e02 ","20"],["3295","\u91d1\u5ddd\u533a ","3294"],["3296","\u6c38\u660c\u53bf ","3294"],["3298","\u767d\u94f6\u5e02 ","20"],["3299","\u767d\u94f6\u533a ","3298"],["3300","\u5e73\u5ddd\u533a ","3298"],["3301","\u9756\u8fdc\u53bf ","3298"],["3302","\u4f1a\u5b81\u53bf ","3298"],["3303","\u666f\u6cf0\u53bf ","3298"],["3305","\u5929\u6c34\u5e02 ","20"],["3306","\u79e6\u5dde\u533a ","3305"],["3307","\u9ea6\u79ef\u533a ","3305"],["3308","\u6e05\u6c34\u53bf ","3305"],["3309","\u79e6\u5b89\u53bf ","3305"],["3310","\u7518\u8c37\u53bf ","3305"],["3113","\u767d\u6717\u53bf ","3104"],["3114","\u4ec1\u5e03\u53bf ","3104"],["3115","\u5eb7\u9a6c\u53bf ","3104"],["3116","\u5b9a\u7ed3\u53bf ","3104"],["3117","\u4ef2\u5df4\u53bf ","3104"],["3118","\u4e9a\u4e1c\u53bf ","3104"],["3119","\u5409\u9686\u53bf ","3104"],["3120","\u8042\u62c9\u6728\u53bf ","3104"],["3121","\u8428\u560e\u53bf ","3104"],["3122","\u5c97\u5df4\u53bf ","3104"],["3124","\u90a3\u66f2\u5730\u533a ","25"],["3125","\u90a3\u66f2\u53bf ","3124"],["3126","\u5609\u9ece\u53bf ","3124"],["3127","\u6bd4\u5982\u53bf ","3124"],["3128","\u8042\u8363\u53bf ","3124"],["3129","\u5b89\u591a\u53bf ","3124"],["3130","\u7533\u624e\u53bf ","3124"],["3131","\u7d22\u53bf ","3124"],["3132","\u73ed\u6208\u53bf ","3124"],["3133","\u5df4\u9752\u53bf ","3124"],["3134","\u5c3c\u739b\u53bf ","3124"],["3136","\u963f\u91cc\u5730\u533a ","25"],["3137","\u666e\u5170\u53bf ","3136"],["3138","\u672d\u8fbe\u53bf ","3136"],["3139","\u5676\u5c14\u53bf ","3136"],["3140","\u65e5\u571f\u53bf ","3136"],["3141","\u9769\u5409\u53bf ","3136"],["3142","\u6539\u5219\u53bf ","3136"],["3143","\u63aa\u52e4\u53bf ","3136"],["3145","\u6797\u829d\u5730\u533a ","25"],["3146","\u6797\u829d\u53bf ","3145"],["3147","\u5de5\u5e03\u6c5f\u8fbe\u53bf ","3145"],["3148","\u7c73\u6797\u53bf ","3145"],["3149","\u58a8\u8131\u53bf ","3145"],["3150","\u6ce2\u5bc6\u53bf ","3145"],["3151","\u5bdf\u9685\u53bf ","3145"],["3152","\u6717\u53bf ","3145"],["19","\u9655\u897f\u7701 ","0"],["3155","\u897f\u5b89\u5e02 ","19"],["3156","\u65b0\u57ce\u533a ","3155"],["3157","\u7891\u6797\u533a ","3155"],["3158","\u83b2\u6e56\u533a ","3155"],["3159","\u705e\u6865\u533a ","3155"],["3160","\u672a\u592e\u533a ","3155"],["3161","\u96c1\u5854\u533a ","3155"],["3162","\u960e\u826f\u533a ","3155"],["3163","\u4e34\u6f7c\u533a ","3155"],["3164","\u957f\u5b89\u533a ","3155"],["3165","\u84dd\u7530\u53bf ","3155"],["3166","\u5468\u81f3\u53bf ","3155"],["3167","\u6237\u53bf ","3155"],["3168","\u9ad8\u9675\u53bf ","3155"],["3170","\u94dc\u5ddd\u5e02 ","19"],["3171","\u738b\u76ca\u533a ","3170"],["3172","\u5370\u53f0\u533a ","3170"],["3173","\u8000\u5dde\u533a ","3170"],["3174","\u5b9c\u541b\u53bf ","3170"],["3176","\u5b9d\u9e21\u5e02 ","19"],["3177","\u6e2d\u6ee8\u533a ","3176"],["3178","\u91d1\u53f0\u533a ","3176"],["3179","\u9648\u4ed3\u533a ","3176"],["3180","\u51e4\u7fd4\u53bf ","3176"],["3181","\u5c90\u5c71\u53bf ","3176"],["3182","\u6276\u98ce\u53bf ","3176"],["3183","\u7709\u53bf ","3176"],["3184","\u9647\u53bf ","3176"],["3185","\u5343\u9633\u53bf ","3176"],["3186","\u9e9f\u6e38\u53bf ","3176"],["3187","\u51e4\u53bf ","3176"],["3188","\u592a\u767d\u53bf ","3176"],["3190","\u54b8\u9633\u5e02 ","19"],["3191","\u79e6\u90fd\u533a ","3190"],["3192","\u6768\u51cc\u533a ","3190"],["3193","\u6e2d\u57ce\u533a ","3190"],["3194","\u4e09\u539f\u53bf ","3190"],["3195","\u6cfe\u9633\u53bf ","3190"],["3196","\u4e7e\u53bf ","3190"],["3197","\u793c\u6cc9\u53bf ","3190"],["3198","\u6c38\u5bff\u53bf ","3190"],["3199","\u5f6c\u53bf ","3190"],["3200","\u957f\u6b66\u53bf ","3190"],["3201","\u65ec\u9091\u53bf ","3190"],["3202","\u6df3\u5316\u53bf ","3190"],["3203","\u6b66\u529f\u53bf ","3190"],["3204","\u5174\u5e73\u5e02 ","3190"],["3206","\u6e2d\u5357\u5e02 ","19"],["3207","\u4e34\u6e2d\u533a ","3206"],["3208","\u534e\u53bf ","3206"],["3209","\u6f7c\u5173\u53bf ","3206"],["3210","\u5927\u8354\u53bf ","3206"],["3211","\u5408\u9633\u53bf ","3206"],["3212","\u6f84\u57ce\u53bf ","3206"],["3213","\u84b2\u57ce\u53bf ","3206"],["3214","\u767d\u6c34\u53bf ","3206"],["3215","\u5bcc\u5e73\u53bf ","3206"],["3216","\u97e9\u57ce\u5e02 ","3206"],["3217","\u534e\u9634\u5e02 ","3206"],["3219","\u5ef6\u5b89\u5e02 ","19"],["3220","\u5b9d\u5854\u533a ","3219"],["3221","\u5ef6\u957f\u53bf ","3219"],["3222","\u5ef6\u5ddd\u53bf ","3219"],["3223","\u5b50\u957f\u53bf ","3219"],["3224","\u5b89\u585e\u53bf ","3219"],["3225","\u5fd7\u4e39\u53bf ","3219"],["3226","\u5434\u8d77\u53bf ","3219"],["3227","\u7518\u6cc9\u53bf ","3219"],["3228","\u5bcc\u53bf ","3219"],["3229","\u6d1b\u5ddd\u53bf ","3219"],["3230","\u5b9c\u5ddd\u53bf ","3219"],["3231","\u9ec4\u9f99\u53bf ","3219"],["3232","\u9ec4\u9675\u53bf ","3219"],["3234","\u6c49\u4e2d\u5e02 ","19"],["3235","\u6c49\u53f0\u533a ","3234"],["3237","\u57ce\u56fa\u53bf ","3234"],["3238","\u6d0b\u53bf ","3234"],["3239"," \u897f\u4e61\u53bf ","3234"],["3240","\u52c9\u53bf ","3234"],["3241","\u5b81\u5f3a\u53bf ","3234"],["3242","\u7565\u9633\u53bf ","3234"],["3243","\u9547\u5df4\u53bf ","3234"],["3244","\u7559\u575d\u53bf ","3234"],["3245","\u4f5b\u576a\u53bf ","3234"],["2848","\u6cbf\u6cb3\u571f\u5bb6\u65cf\u81ea\u6cbb\u53bf ","2840"],["2849","\u677e\u6843\u82d7\u65cf\u81ea\u6cbb\u53bf ","2840"],["2850","\u4e07\u5c71\u7279\u533a ","2840"],["2852","\u9ed4\u897f\u5357\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","17"],["2853","\u5174\u4e49\u5e02 ","2852"],["2854","\u5174\u4ec1\u53bf ","2852"],["2855","\u666e\u5b89\u53bf ","2852"],["2856","\u6674\u9686\u53bf ","2852"],["2857","\u8d1e\u4e30\u53bf ","2852"],["2858","\u671b\u8c1f\u53bf ","2852"],["2859","\u518c\u4ea8\u53bf ","2852"],["2860","\u5b89\u9f99\u53bf ","2852"],["2862","\u6bd5\u8282\u5730\u533a ","17"],["2863","\u6bd5\u8282\u5e02 ","2862"],["2864","\u5927\u65b9\u53bf ","2862"],["2865","\u9ed4\u897f\u53bf ","2862"],["2866","\u91d1\u6c99\u53bf ","2862"],["2867","\u7ec7\u91d1\u53bf ","2862"],["2868","\u7eb3\u96cd\u53bf ","2862"],["2869","\u5a01\u5b81\u5f5d\u65cf\u56de\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2862"],["2870","\u8d6b\u7ae0\u53bf ","2862"],["2872","\u9ed4\u4e1c\u5357\u82d7\u65cf\u4f97\u65cf\u81ea\u6cbb\u5dde ","17"],["2873","\u51ef\u91cc\u5e02 ","2872"],["2874","\u9ec4\u5e73\u53bf ","2872"],["2875","\u65bd\u79c9\u53bf ","2872"],["2876","\u4e09\u7a57\u53bf ","2872"],["2877","\u9547\u8fdc\u53bf ","2872"],["2878","\u5c91\u5de9\u53bf ","2872"],["2879","\u5929\u67f1\u53bf ","2872"],["2880","\u9526\u5c4f\u53bf ","2872"],["2881","\u5251\u6cb3\u53bf ","2872"],["2882","\u53f0\u6c5f\u53bf ","2872"],["2883","\u9ece\u5e73\u53bf ","2872"],["2884","\u6995\u6c5f\u53bf ","2872"],["2885","\u4ece\u6c5f\u53bf ","2872"],["2886","\u96f7\u5c71\u53bf ","2872"],["2887","\u9ebb\u6c5f\u53bf ","2872"],["2888","\u4e39\u5be8\u53bf ","2872"],["2890","\u9ed4\u5357\u5e03\u4f9d\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","17"],["2891","\u90fd\u5300\u5e02 ","2890"],["2892","\u798f\u6cc9\u5e02 ","2890"],["2893","\u8354\u6ce2\u53bf ","2890"],["2894","\u8d35\u5b9a\u53bf ","2890"],["2895","\u74ee\u5b89\u53bf ","2890"],["2896","\u72ec\u5c71\u53bf ","2890"],["2897","\u5e73\u5858\u53bf ","2890"],["2898","\u7f57\u7538\u53bf ","2890"],["2899","\u957f\u987a\u53bf ","2890"],["2900","\u9f99\u91cc\u53bf ","2890"],["2901","\u60e0\u6c34\u53bf ","2890"],["2902","\u4e09\u90fd\u6c34\u65cf\u81ea\u6cbb\u53bf ","2890"],["18","\u4e91\u5357\u7701 ","0"],["2905","\u6606\u660e\u5e02 ","18"],["2906","\u4e94\u534e\u533a ","2905"],["2907","\u76d8\u9f99\u533a ","2905"],["2908","\u5b98\u6e21\u533a ","2905"],["2909","\u897f\u5c71\u533a ","2905"],["2910","\u4e1c\u5ddd\u533a ","2905"],["2911","\u5448\u8d21\u53bf ","2905"],["2912","\u664b\u5b81\u53bf ","2905"],["2913","\u5bcc\u6c11\u53bf ","2905"],["2914","\u5b9c\u826f\u53bf ","2905"],["2915","\u77f3\u6797\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2905"],["2916","\u5d69\u660e\u53bf ","2905"],["2917","\u7984\u529d\u5f5d\u65cf\u82d7\u65cf\u81ea\u6cbb\u53bf ","2905"],["2918","\u5bfb\u7538\u56de\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2905"],["2919","\u5b89\u5b81\u5e02 ","2905"],["2921","\u66f2\u9756\u5e02 ","18"],["2922","\u9e92\u9e9f\u533a ","2921"],["2923","\u9a6c\u9f99\u53bf ","2921"],["2924","\u9646\u826f\u53bf ","2921"],["2925","\u5e08\u5b97\u53bf ","2921"],["2926","\u7f57\u5e73\u53bf ","2921"],["2927","\u5bcc\u6e90\u53bf ","2921"],["2928","\u4f1a\u6cfd\u53bf ","2921"],["2929","\u6cbe\u76ca\u53bf ","2921"],["2930","\u5ba3\u5a01\u5e02 ","2921"],["2932","\u7389\u6eaa\u5e02 ","18"],["2933","\u7ea2\u5854\u533a ","2932"],["2934","\u6c5f\u5ddd\u53bf ","2932"],["2935","\u6f84\u6c5f\u53bf ","2932"],["2936","\u901a\u6d77\u53bf ","2932"],["2937","\u534e\u5b81\u53bf ","2932"],["2938","\u6613\u95e8\u53bf ","2932"],["2939","\u5ce8\u5c71\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2932"],["2940","\u65b0\u5e73\u5f5d\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2932"],["2941","\u5143\u6c5f\u54c8\u5c3c\u65cf\u5f5d\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2932"],["2943","\u4fdd\u5c71\u5e02 ","18"],["2944","\u9686\u9633\u533a ","2943"],["2945","\u65bd\u7538\u53bf ","2943"],["2946","\u817e\u51b2\u53bf ","2943"],["2947","\u9f99\u9675\u53bf ","2943"],["2948","\u660c\u5b81\u53bf ","2943"],["2950","\u662d\u901a\u5e02 ","18"],["2951","\u662d\u9633\u533a ","2950"],["2952","\u9c81\u7538\u53bf ","2950"],["2953","\u5de7\u5bb6\u53bf ","2950"],["2954","\u76d0\u6d25\u53bf ","2950"],["2955","\u5927\u5173\u53bf ","2950"],["2956","\u6c38\u5584\u53bf ","2950"],["2957","\u7ee5\u6c5f\u53bf ","2950"],["2958","\u9547\u96c4\u53bf ","2950"],["2959","\u5f5d\u826f\u53bf ","2950"],["2960","\u5a01\u4fe1\u53bf ","2950"],["2961","\u6c34\u5bcc\u53bf ","2950"],["2963","\u4e3d\u6c5f\u5e02 ","18"],["2964","\u53e4\u57ce\u533a ","2963"],["2965","\u7389\u9f99\u7eb3\u897f\u65cf\u81ea\u6cbb\u53bf ","2963"],["2966","\u6c38\u80dc\u53bf ","2963"],["2967","\u534e\u576a\u53bf ","2963"],["2968","\u5b81\u8497\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2963"],["2970","\u666e\u6d31\u5e02 ","18"],["2971","\u601d\u8305\u533a ","2970"],["2972","\u5b81\u6d31\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2973","\u58a8\u6c5f\u54c8\u5c3c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2974","\u666f\u4e1c\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2975","\u666f\u8c37\u50a3\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2976","\u9547\u6c85\u5f5d\u65cf\u54c8\u5c3c\u65cf\u62c9\u795c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2977","\u6c5f\u57ce\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u53bf ","2970"],["2978","\u5b5f\u8fde\u50a3\u65cf\u62c9\u795c\u65cf\u4f64\u65cf\u81ea\u6cbb\u53bf ","2970"],["2979","\u6f9c\u6ca7\u62c9\u795c\u65cf\u81ea\u6cbb\u53bf ","2970"],["2980","\u897f\u76df\u4f64\u65cf\u81ea\u6cbb\u53bf ","2970"],["2982","\u4e34\u6ca7\u5e02 ","18"],["2983","\u4e34\u7fd4\u533a ","2982"],["2984","\u51e4\u5e86\u53bf ","2982"],["2985","\u4e91\u53bf ","2982"],["2986"," \u6c38\u5fb7\u53bf ","2982"],["2987","\u9547\u5eb7\u53bf ","2982"],["2988","\u53cc\u6c5f\u62c9\u795c\u65cf\u4f64\u65cf\u5e03\u6717\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","2982"],["2989","\u803f\u9a6c\u50a3\u65cf\u4f64\u65cf\u81ea\u6cbb\u53bf ","2982"],["2990","\u6ca7\u6e90\u4f64\u65cf\u81ea\u6cbb\u53bf ","2982"],["2992","\u695a\u96c4\u5f5d\u65cf\u81ea\u6cbb\u5dde ","18"],["2993","\u695a\u96c4\u5e02 ","2992"],["2994","\u53cc\u67cf\u53bf ","2992"],["2995","\u725f\u5b9a\u53bf ","2992"],["2996","\u5357\u534e\u53bf ","2992"],["2997","\u59da\u5b89\u53bf ","2992"],["2998","\u5927\u59da\u53bf ","2992"],["2999","\u6c38\u4ec1\u53bf ","2992"],["3000","\u5143\u8c0b\u53bf ","2992"],["3001","\u6b66\u5b9a\u53bf ","2992"],["3002","\u7984\u4e30\u53bf ","2992"],["3004","\u7ea2\u6cb3\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u5dde ","18"],["3005","\u4e2a\u65e7\u5e02 ","3004"],["3006","\u5f00\u8fdc\u5e02 ","3004"],["3007","\u8499\u81ea\u53bf ","3004"],["3008","\u5c4f\u8fb9\u82d7\u65cf\u81ea\u6cbb\u53bf ","3004"],["3009","\u5efa\u6c34\u53bf ","3004"],["3010","\u77f3\u5c4f\u53bf ","3004"],["3011","\u5f25\u52d2\u53bf ","3004"],["3012","\u6cf8\u897f\u53bf ","3004"],["3013","\u5143\u9633\u53bf ","3004"],["3014","\u7ea2\u6cb3\u53bf ","3004"],["3015","\u91d1\u5e73\u82d7\u65cf\u7476\u65cf\u50a3\u65cf\u81ea\u6cbb\u53bf ","3004"],["3016","\u7eff\u6625\u53bf ","3004"],["3017","\u6cb3\u53e3\u7476\u65cf\u81ea\u6cbb\u53bf ","3004"],["3019","\u6587\u5c71\u58ee\u65cf\u82d7\u65cf\u81ea\u6cbb\u5dde ","18"],["3020","\u6587\u5c71\u53bf ","3019"],["3021","\u781a\u5c71\u53bf ","3019"],["3022","\u897f\u7574\u53bf ","3019"],["3023","\u9ebb\u6817\u5761\u53bf ","3019"],["3024","\u9a6c\u5173\u53bf ","3019"],["3025","\u4e18\u5317\u53bf ","3019"],["3026","\u5e7f\u5357\u53bf ","3019"],["3027","\u5bcc\u5b81\u53bf ","3019"],["3029","\u897f\u53cc\u7248\u7eb3\u50a3\u65cf\u81ea\u6cbb\u5dde ","18"],["3030","\u666f\u6d2a\u5e02 ","3029"],["3031","\u52d0\u6d77\u53bf ","3029"],["3032","\u52d0\u814a\u53bf ","3029"],["3034","\u5927\u7406\u767d\u65cf\u81ea\u6cbb\u5dde ","18"],["3035","\u5927\u7406\u5e02 ","3034"],["3036","\u6f3e\u6fde\u5f5d\u65cf\u81ea\u6cbb\u53bf ","3034"],["3037","\u7965\u4e91\u53bf ","3034"],["3038","\u5bbe\u5ddd\u53bf ","3034"],["3039","\u5f25\u6e21\u53bf ","3034"],["3040","\u5357\u6da7\u5f5d\u65cf\u81ea\u6cbb\u53bf ","3034"],["3041","\u5dcd\u5c71\u5f5d\u65cf\u56de\u65cf\u81ea\u6cbb\u53bf ","3034"],["3042","\u6c38\u5e73\u53bf ","3034"],["3043","\u4e91\u9f99\u53bf ","3034"],["3044","\u6d31\u6e90\u53bf ","3034"],["3045","\u5251\u5ddd\u53bf ","3034"],["3311","\u6b66\u5c71\u53bf ","3305"],["3312","\u5f20\u5bb6\u5ddd\u56de\u65cf\u81ea\u6cbb\u53bf ","3305"],["3314","\u6b66\u5a01\u5e02 ","20"],["3315","\u51c9\u5dde\u533a ","3314"],["3316","\u6c11\u52e4\u53bf ","3314"],["3317","\u53e4\u6d6a\u53bf ","3314"],["3318","\u5929\u795d\u85cf\u65cf\u81ea\u6cbb\u53bf ","3314"],["3320","\u5f20\u6396\u5e02 ","20"],["3321","\u7518\u5dde\u533a ","3320"],["3322","\u8083\u5357\u88d5\u56fa\u65cf\u81ea\u6cbb\u53bf ","3320"],["3323","\u6c11\u4e50\u53bf ","3320"],["3324","\u4e34\u6cfd\u53bf ","3320"],["3325","\u9ad8\u53f0\u53bf ","3320"],["3326","\u5c71\u4e39\u53bf ","3320"],["3328","\u5e73\u51c9\u5e02 ","20"],["3329","\u5d06\u5cd2\u533a ","3328"],["3330","\u6cfe\u5ddd\u53bf ","3328"],["3331","\u7075\u53f0\u53bf ","3328"],["3332","\u5d07\u4fe1\u53bf ","3328"],["3333","\u534e\u4ead\u53bf ","3328"],["3334","\u5e84\u6d6a\u53bf ","3328"],["3335","\u9759\u5b81\u53bf ","3328"],["3337","\u9152\u6cc9\u5e02 ","20"],["3338","\u8083\u5dde\u533a ","3337"],["3339","\u91d1\u5854\u53bf ","3337"],["3340","\u5b89\u897f\u53bf ","3337"],["3341","\u8083\u5317\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","3337"],["3342","\u963f\u514b\u585e\u54c8\u8428\u514b\u65cf\u81ea\u6cbb\u53bf ","3337"],["3343","\u7389\u95e8\u5e02 ","3337"],["3344","\u6566\u714c\u5e02 ","3337"],["3346","\u5e86\u9633\u5e02 ","20"],["3347","\u897f\u5cf0\u533a ","3346"],["3348","\u5e86\u57ce\u53bf ","3346"],["3349","\u73af\u53bf ","3346"],["3350","\u534e\u6c60\u53bf ","3346"],["3351","\u5408\u6c34\u53bf ","3346"],["3352","\u6b63\u5b81\u53bf ","3346"],["3353","\u5b81\u53bf ","3346"],["3354","\u9547\u539f\u53bf ","3346"],["3356","\u5b9a\u897f\u5e02 ","20"],["3357","\u5b89\u5b9a\u533a ","3356"],["3358","\u901a\u6e2d\u53bf ","3356"],["3359","\u9647\u897f\u53bf ","3356"],["3360","\u6e2d\u6e90\u53bf ","3356"],["3361","\u4e34\u6d2e\u53bf ","3356"],["3362","\u6f33\u53bf ","3356"],["3363","\u5cb7\u53bf ","3356"],["3365","\u9647\u5357\u5e02 ","20"],["3366","\u6b66\u90fd\u533a ","3365"],["3367","\u6210\u53bf ","3365"],["3368"," \u6587\u53bf ","3365"],["3369","\u5b95\u660c\u53bf ","3365"],["3370","\u5eb7\u53bf ","3365"],["3371","\u897f\u548c\u53bf ","3365"],["3372","\u793c\u53bf ","3365"],["3373","\u5fbd\u53bf ","3365"],["3374","\u4e24\u5f53\u53bf ","3365"],["3376","\u4e34\u590f\u56de\u65cf\u81ea\u6cbb\u5dde ","20"],["3377","\u4e34\u590f\u5e02 ","3376"],["3378","\u4e34\u590f\u53bf ","3376"],["3379","\u5eb7\u4e50\u53bf ","3376"],["3380","\u6c38\u9756\u53bf ","3376"],["3381","\u5e7f\u6cb3\u53bf ","3376"],["3382","\u548c\u653f\u53bf ","3376"],["3383","\u4e1c\u4e61\u65cf\u81ea\u6cbb\u53bf ","3376"],["3384","\u79ef\u77f3\u5c71\u4fdd\u5b89\u65cf\u4e1c\u4e61\u65cf\u6492\u62c9\u65cf\u81ea\u6cbb\u53bf ","3376"],["3386","\u7518\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","20"],["3387","\u5408\u4f5c\u5e02 ","3386"],["3388","\u4e34\u6f6d\u53bf ","3386"],["3389","\u5353\u5c3c\u53bf ","3386"],["3390","\u821f\u66f2\u53bf ","3386"],["3391","\u8fed\u90e8\u53bf ","3386"],["3392","\u739b\u66f2\u53bf ","3386"],["3393","\u788c\u66f2\u53bf ","3386"],["3394","\u590f\u6cb3\u53bf ","3386"],["21","\u9752\u6d77\u7701 ","0"],["3397","\u897f\u5b81\u5e02 ","21"],["3398","\u57ce\u4e1c\u533a ","3397"],["3399","\u57ce\u4e2d\u533a ","3397"],["3400","\u57ce\u897f\u533a ","3397"],["3401","\u57ce\u5317\u533a ","3397"],["3402","\u5927\u901a\u56de\u65cf\u571f\u65cf\u81ea\u6cbb\u53bf ","3397"],["3403","\u6e5f\u4e2d\u53bf ","3397"],["3404","\u6e5f\u6e90\u53bf ","3397"],["3406","\u6d77\u4e1c\u5730\u533a ","21"],["3407","\u5e73\u5b89\u53bf ","3406"],["3408","\u6c11\u548c\u56de\u65cf\u571f\u65cf\u81ea\u6cbb\u53bf ","3406"],["3409","\u4e50\u90fd\u53bf ","3406"],["3410","\u4e92\u52a9\u571f\u65cf\u81ea\u6cbb\u53bf ","3406"],["3411","\u5316\u9686\u56de\u65cf\u81ea\u6cbb\u53bf ","3406"],["3412","\u5faa\u5316\u6492\u62c9\u65cf\u81ea\u6cbb\u53bf ","3406"],["3414","\u6d77\u5317\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3415","\u95e8\u6e90\u56de\u65cf\u81ea\u6cbb\u53bf ","3414"],["3416","\u7941\u8fde\u53bf ","3414"],["3417","\u6d77\u664f\u53bf ","3414"],["3418","\u521a\u5bdf\u53bf ","3414"],["3420","\u9ec4\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3421","\u540c\u4ec1\u53bf ","3420"],["3422","\u5c16\u624e\u53bf ","3420"],["3423","\u6cfd\u5e93\u53bf ","3420"],["3424","\u6cb3\u5357\u8499\u53e4\u65cf\u81ea\u6cbb\u53bf ","3420"],["3426","\u6d77\u5357\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3427","\u5171\u548c\u53bf ","3426"],["3428","\u540c\u5fb7\u53bf ","3426"],["3429","\u8d35\u5fb7\u53bf ","3426"],["3430","\u5174\u6d77\u53bf ","3426"],["3431","\u8d35\u5357\u53bf ","3426"],["3433","\u679c\u6d1b\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3434","\u739b\u6c81\u53bf ","3433"],["3435","\u73ed\u739b\u53bf ","3433"],["3436","\u7518\u5fb7\u53bf ","3433"],["3437"," \u8fbe\u65e5\u53bf ","3433"],["3438","\u4e45\u6cbb\u53bf ","3433"],["3439","\u739b\u591a\u53bf ","3433"],["3441","\u7389\u6811\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3442","\u7389\u6811\u53bf ","3441"],["3443","\u6742\u591a\u53bf ","3441"],["3444","\u79f0\u591a\u53bf ","3441"],["3445","\u6cbb\u591a\u53bf ","3441"],["3446","\u56ca\u8c26\u53bf ","3441"],["3447","\u66f2\u9ebb\u83b1\u53bf ","3441"],["3449","\u6d77\u897f\u8499\u53e4\u65cf\u85cf\u65cf\u81ea\u6cbb\u5dde ","21"],["3450","\u683c\u5c14\u6728\u5e02 ","3449"],["3451","\u5fb7\u4ee4\u54c8\u5e02 ","3449"],["3452","\u4e4c\u5170\u53bf ","3449"],["3453","\u90fd\u5170\u53bf ","3449"],["3454","\u5929\u5cfb\u53bf ","3449"],["26","\u5b81\u590f\u56de\u65cf\u81ea\u6cbb\u533a ","0"],["3457","\u94f6\u5ddd\u5e02 ","26"],["3458"," \u5174\u5e86\u533a ","3457"],["3459","\u897f\u590f\u533a ","3457"],["3460","\u91d1\u51e4\u533a ","3457"],["3461","\u6c38\u5b81\u53bf ","3457"],["3462","\u8d3a\u5170\u53bf ","3457"],["3463","\u7075\u6b66\u5e02 ","3457"],["3465","\u77f3\u5634\u5c71\u5e02 ","26"],["3466","\u5927\u6b66\u53e3\u533a ","3465"],["3467","\u60e0\u519c\u533a ","3465"],["3468","\u5e73\u7f57\u53bf ","3465"],["3470","\u5434\u5fe0\u5e02 ","26"],["3471","\u5229\u901a\u533a ","3470"],["3472","\u76d0\u6c60\u53bf ","3470"],["3473","\u540c\u5fc3\u53bf ","3470"],["3474","\u9752\u94dc\u5ce1\u5e02 ","3470"],["3476","\u56fa\u539f\u5e02 ","26"],["3477","\u539f\u5dde\u533a ","3476"],["3478","\u897f\u5409\u53bf ","3476"],["3479","\u9686\u5fb7\u53bf ","3476"],["3480","\u6cfe\u6e90\u53bf ","3476"],["3481","\u5f6d\u9633\u53bf ","3476"],["3483","\u4e2d\u536b\u5e02 ","26"],["3484","\u6c99\u5761\u5934\u533a ","3483"],["3485","\u4e2d\u5b81\u53bf ","3483"],["3486","\u6d77\u539f\u53bf ","3483"],["27","\u65b0\u7586\u7ef4\u543e\u5c14\u81ea\u6cbb\u533a ","0"],["3489","\u4e4c\u9c81\u6728\u9f50\u5e02 ","27"],["3490","\u5929\u5c71\u533a ","3489"],["3491","\u6c99\u4f9d\u5df4\u514b\u533a ","3489"],["3492","\u65b0\u5e02\u533a ","3489"],["3493","\u6c34\u78e8\u6c9f\u533a ","3489"],["3494","\u5934\u5c6f\u6cb3\u533a ","3489"],["3495","\u8fbe\u5742\u57ce\u533a ","3489"],["3496","\u4e1c\u5c71\u533a ","3489"],["3497","\u7c73\u4e1c\u533a ","3489"],["3498","\u4e4c\u9c81\u6728\u9f50\u53bf ","3489"],["3500","\u514b\u62c9\u739b\u4f9d\u5e02 ","27"],["3501","\u72ec\u5c71\u5b50\u533a ","3500"],["3502","\u514b\u62c9\u739b\u4f9d\u533a ","3500"],["3503","\u767d\u78b1\u6ee9\u533a ","3500"],["3504","\u4e4c\u5c14\u79be\u533a ","3500"],["3506","\u5410\u9c81\u756a\u5730\u533a ","27"],["3507","\u5410\u9c81\u756a\u5e02 ","3506"],["3508","\u912f\u5584\u53bf ","3506"],["3509","\u6258\u514b\u900a\u53bf ","3506"],["3511","\u54c8\u5bc6\u5730\u533a ","27"],["3512","\u54c8\u5bc6\u5e02 ","3511"],["3513","\u5df4\u91cc\u5764\u54c8\u8428\u514b\u81ea\u6cbb\u53bf ","3511"],["3514","\u4f0a\u543e\u53bf ","3511"],["3516","\u660c\u5409\u56de\u65cf\u81ea\u6cbb\u5dde ","27"],["3517","\u660c\u5409\u5e02 ","3516"],["3518","\u961c\u5eb7\u5e02 ","3516"],["3519","\u7c73\u6cc9\u5e02 ","3516"],["3520","\u547c\u56fe\u58c1\u53bf ","3516"],["3521","\u739b\u7eb3\u65af\u53bf ","3516"],["3522","\u5947\u53f0\u53bf ","3516"],["3523","\u5409\u6728\u8428\u5c14\u53bf ","3516"],["3524","\u6728\u5792\u54c8\u8428\u514b\u81ea\u6cbb\u53bf ","3516"],["3526","\u535a\u5c14\u5854\u62c9\u8499\u53e4\u81ea\u6cbb\u5dde ","27"],["3527","\u535a\u4e50\u5e02 ","3526"],["3528","\u7cbe\u6cb3\u53bf ","3526"],["3529","\u6e29\u6cc9\u53bf ","3526"],["3531","\u5df4\u97f3\u90ed\u695e\u8499\u53e4\u81ea\u6cbb\u5dde ","27"],["3532","\u5e93\u5c14\u52d2\u5e02 ","3531"],["3533","\u8f6e\u53f0\u53bf ","3531"],["3534","\u5c09\u7281\u53bf ","3531"],["3535","\u82e5\u7f8c\u53bf ","3531"],["3536","\u4e14\u672b\u53bf ","3531"],["3537","\u7109\u8006\u56de\u65cf\u81ea\u6cbb\u53bf ","3531"],["3538","\u548c\u9759\u53bf ","3531"],["3539","\u548c\u7855\u53bf ","3531"],["3540","\u535a\u6e56\u53bf ","3531"],["3542","\u963f\u514b\u82cf\u5730\u533a ","27"],["3543","\u963f\u514b\u82cf\u5e02 ","3542"],["3544","\u6e29\u5bbf\u53bf ","3542"],["3545","\u5e93\u8f66\u53bf ","3542"],["3546","\u6c99\u96c5\u53bf ","3542"],["3547","\u65b0\u548c\u53bf ","3542"],["3548","\u62dc\u57ce\u53bf ","3542"],["3549","\u4e4c\u4ec0\u53bf ","3542"],["3550","\u963f\u74e6\u63d0\u53bf ","3542"],["3551","\u67ef\u576a\u53bf ","3542"],["3553","\u514b\u5b5c\u52d2\u82cf\u67ef\u5c14\u514b\u5b5c\u81ea\u6cbb\u5dde ","27"],["3554","\u963f\u56fe\u4ec0\u5e02 ","3553"],["3555","\u963f\u514b\u9676\u53bf ","3553"],["3556","\u963f\u5408\u5947\u53bf ","3553"],["3557","\u4e4c\u6070\u53bf ","3553"],["3559","\u5580\u4ec0\u5730\u533a ","27"],["3560","\u5580\u4ec0\u5e02 ","3559"],["3561","\u758f\u9644\u53bf ","3559"],["3562","\u758f\u52d2\u53bf ","3559"],["3563","\u82f1\u5409\u6c99\u53bf ","3559"],["3564","\u6cfd\u666e\u53bf ","3559"],["3565","\u838e\u8f66\u53bf ","3559"],["3566","\u53f6\u57ce\u53bf ","3559"],["3567","\u9ea6\u76d6\u63d0\u53bf ","3559"],["3568","\u5cb3\u666e\u6e56\u53bf ","3559"],["3569","\u4f3d\u5e08\u53bf ","3559"],["3570","\u5df4\u695a\u53bf ","3559"],["3571","\u5854\u4ec0\u5e93\u5c14\u5e72\u5854\u5409\u514b\u81ea\u6cbb\u53bf ","3559"],["3573","\u548c\u7530\u5730\u533a ","27"],["3574","\u548c\u7530\u5e02 ","3573"],["3575","\u548c\u7530\u53bf ","3573"],["3576","\u58a8\u7389\u53bf ","3573"],["3577","\u76ae\u5c71\u53bf ","3573"],["3578","\u6d1b\u6d66\u53bf ","3573"],["3579","\u7b56\u52d2\u53bf ","3573"],["3580","\u4e8e\u7530\u53bf ","3573"],["3581","\u6c11\u4e30\u53bf ","3573"],["3583","\u4f0a\u7281\u54c8\u8428\u514b\u81ea\u6cbb\u5dde ","27"],["3584","\u4f0a\u5b81\u5e02 ","3583"],["3585","\u594e\u5c6f\u5e02 ","3583"],["3586","\u4f0a\u5b81\u53bf ","3583"],["3587","\u5bdf\u5e03\u67e5\u5c14\u9521\u4f2f\u81ea\u6cbb\u53bf ","3583"],["3588","\u970d\u57ce\u53bf ","3583"],["3589","\u5de9\u7559\u53bf ","3583"],["3590","\u65b0\u6e90\u53bf ","3583"],["3591","\u662d\u82cf\u53bf ","3583"],["3592","\u7279\u514b\u65af\u53bf ","3583"],["3593","\u5c3c\u52d2\u514b\u53bf ","3583"],["3595","\u5854\u57ce\u5730\u533a ","27"],["3596","\u5854\u57ce\u5e02 ","3595"],["3597","\u4e4c\u82cf\u5e02 ","3595"],["3598","\u989d\u654f\u53bf ","3595"],["3599","\u6c99\u6e7e\u53bf ","3595"],["3600","\u6258\u91cc\u53bf ","3595"],["3601","\u88d5\u6c11\u53bf ","3595"],["3602","\u548c\u5e03\u514b\u8d5b\u5c14\u8499\u53e4\u81ea\u6cbb\u53bf ","3595"],["3604","\u963f\u52d2\u6cf0\u5730\u533a ","27"],["3605","\u963f\u52d2\u6cf0\u5e02 ","3604"],["3606","\u5e03\u5c14\u6d25\u53bf ","3604"],["3607","\u5bcc\u8574\u53bf ","3604"],["3608","\u798f\u6d77\u53bf ","3604"],["3609","\u54c8\u5df4\u6cb3\u53bf ","3604"],["3610","\u9752\u6cb3\u53bf ","3604"],["3611","\u5409\u6728\u4e43\u53bf ","3604"],["3613","\u77f3\u6cb3\u5b50\u5e02 ","27"],["3614","\u963f\u62c9\u5c14\u5e02 ","27"],["3615","\u56fe\u6728\u8212\u514b\u5e02 ","27"],["3616","\u4e94\u5bb6\u6e20\u5e02 ","27"],["22","\u53f0\u6e7e\u7701 ","0"],["3618","\u53f0\u5317\u5e02 ","22"],["3619","\u4e2d\u6b63\u533a ","3618"],["3620","\u5927\u540c\u533a ","3618"],["3621","\u4e2d\u5c71\u533a ","3618"],["3622","\u677e\u5c71\u533a ","3618"],["3623","\u5927\u5b89\u533a ","3618"],["3624","\u4e07\u534e\u533a ","3618"],["3625","\u4fe1\u4e49\u533a ","3618"],["3626","\u58eb\u6797\u533a ","3618"],["3627","\u5317\u6295\u533a ","3618"],["3628","\u5185\u6e56\u533a ","3618"],["3629","\u5357\u6e2f\u533a ","3618"],["3630","\u6587\u5c71\u533a ","3618"],["3632","\u9ad8\u96c4\u5e02 ","22"],["3633","\u65b0\u5174\u533a ","3632"],["3634","\u524d\u91d1\u533a ","3632"],["3635","\u82a9\u96c5\u533a ","3632"],["3636","\u76d0\u57d5\u533a ","3632"],["3637","\u9f13\u5c71\u533a ","3632"],["3638","\u65d7\u6d25\u533a ","3632"],["3639","\u524d\u9547\u533a ","3632"],["3640","\u4e09\u6c11\u533a ","3632"],["3641","\u5de6\u8425\u533a ","3632"],["3642","\u6960\u6893\u533a ","3632"],["3643","\u5c0f\u6e2f\u533a ","3632"],["3645","\u53f0\u5357\u5e02 ","22"],["3646","\u4e2d\u897f\u533a ","3645"],["3647","\u4e1c\u533a ","3645"],["3648","\u5357\u533a ","3645"],["3649","\u5317\u533a ","3645"],["3650","\u5b89\u5e73\u533a ","3645"],["3651","\u5b89\u5357\u533a ","3645"],["3653","\u53f0\u4e2d\u5e02 ","22"],["3654","\u4e2d\u533a ","3653"],["3655","\u4e1c\u533a ","3653"],["3656","\u5357\u533a ","3653"],["3657","\u897f\u533a ","3653"],["3658","\u5317\u533a ","3653"],["3659","\u5317\u5c6f\u533a ","3653"],["3660","\u897f\u5c6f\u533a ","3653"],["3661","\u5357\u5c6f\u533a ","3653"],["3663","\u91d1\u95e8\u53bf ","22"],["3664","\u5357\u6295\u53bf ","22"],["3665","\u57fa\u9686\u5e02 ","22"],["3666","\u4ec1\u7231\u533a ","3665"],["3667","\u4fe1\u4e49\u533a ","3665"],["3668","\u4e2d\u6b63\u533a ","3665"],["3669","\u4e2d\u5c71\u533a ","3665"],["3670","\u5b89\u4e50\u533a ","3665"],["3671","\u6696\u6696\u533a ","3665"],["3672","\u4e03\u5835\u533a ","3665"],["3674","\u65b0\u7af9\u5e02 ","22"],["3675","\u4e1c\u533a ","3674"],["3676","\u5317\u533a ","3674"],["3677","\u9999\u5c71\u533a ","3674"],["3679","\u5609\u4e49\u5e02 ","22"],["3680","\u4e1c\u533a ","3679"],["3681","\u897f\u533a ","3679"],["3683","\u53f0\u5317\u53bf ","22"],["3684","\u5b9c\u5170\u53bf ","22"],["3685","\u65b0\u7af9\u53bf ","22"],["3686","\u6843\u56ed\u53bf ","22"],["3687","\u82d7\u6817\u53bf ","22"],["3688","\u53f0\u4e2d\u53bf ","22"],["3689","\u5f70\u5316\u53bf ","22"],["3690","\u5609\u4e49\u53bf ","22"],["3691","\u4e91\u6797\u53bf ","22"],["3692","\u53f0\u5357\u53bf ","22"],["3693","\u9ad8\u96c4\u53bf ","22"],["3694","\u5c4f\u4e1c\u53bf ","22"],["3695","\u53f0\u4e1c\u53bf ","22"],["3696","\u82b1\u83b2\u53bf ","22"],["3697","\u6f8e\u6e56\u53bf ","22"],["32","\u9999\u6e2f\u7279\u522b\u884c\u653f\u533a ","0"],["3699","\u9999\u6e2f\u5c9b ","32"],["3700","\u4e5d\u9f99 ","32"],["3701","\u65b0\u754c ","32"],["33","\u6fb3\u95e8\u7279\u522b\u884c\u653f\u533a ","0"],["3703","\u6fb3\u95e8\u534a\u5c9b ","33"],["3704","\u79bb\u5c9b ","33"],["274","d\u5e02\u573a ","36"]] diff --git a/comps/FormFillUrl/_demo/data/shengshi.php b/comps/FormFillUrl/_demo/data/shengshi.php new file mode 100755 index 000000000..9eda46a8d --- /dev/null +++ b/comps/FormFillUrl/_demo/data/shengshi.php @@ -0,0 +1,22 @@ += $max ){ + break; + } + + if( $json[$i][2] == $id ){ + array_push( $r, $json[$i] ); + } + } + + echo json_encode( $r ); +?> diff --git a/comps/FormFillUrl/_demo/data/shengshi_with_error_code.php b/comps/FormFillUrl/_demo/data/shengshi_with_error_code.php new file mode 100755 index 000000000..cd1e756f5 --- /dev/null +++ b/comps/FormFillUrl/_demo/data/shengshi_with_error_code.php @@ -0,0 +1,23 @@ + 0, 'data' => $r ); + + if( isset( $_REQUEST['errorno'] ) ){ + $r['errorno'] = (int)$_REQUEST['errorno']; + } + + echo json_encode( $result ); +?> diff --git a/comps/FormFillUrl/_demo/demo.backwrad.Form.initAutoFill.html b/comps/FormFillUrl/_demo/demo.backwrad.Form.initAutoFill.html new file mode 100755 index 000000000..cf524d1e9 --- /dev/null +++ b/comps/FormFillUrl/_demo/demo.backwrad.Form.initAutoFill.html @@ -0,0 +1,113 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FormFillUrl 示例 - 向后兼容 Form.initAutoFill

        + +
        +
        +
        +
        +
        +
        form auto fill example
        +
        + + +
        +
        + + + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + back +
        +
        +
        +
        + + + + diff --git a/comps/FormFillUrl/_demo/demo.checkbox.radio.html b/comps/FormFillUrl/_demo/demo.checkbox.radio.html new file mode 100755 index 000000000..d44989028 --- /dev/null +++ b/comps/FormFillUrl/_demo/demo.checkbox.radio.html @@ -0,0 +1,229 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.FormFillUrl 示例 - checkbox && radio

        + +
        + +
        +
        normal
        +
        +
        + + + + + +
        + +
        + + + + + +
        +
        +
        + +
        +
        range - name with []
        +
        +
        + + + + + + + + + + + + + + + + + + + +
        + 提交人为: + +
          +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        + +
        + +
          +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        + +
        + +
          +
        • + 1 +
        • +
        • + 2 +
        • +
        • + 3 +
        • +
        • + 4 +
        • +
        +
        + + + + back +
        +
        +
        +
        +
        + + + + diff --git a/comps/FormFillUrl/_demo/demo.formtoken.html b/comps/FormFillUrl/_demo/demo.formtoken.html new file mode 100755 index 000000000..daa493b17 --- /dev/null +++ b/comps/FormFillUrl/_demo/demo.formtoken.html @@ -0,0 +1,214 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FormFillUrl 示例 - formtoken, 只针对提交的form进行操作

        + +
        +
        +
        +
        +
        form auto fill example - normal form
        +
        + + +
        +
        + + + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + back +
        +
        +
        + +
        +
        +
        +
        form auto fill example - formtoken = 1
        +
        + + +
        +
        + + + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + back +
        + + +
        +
        + +
        +
        +
        +
        form auto fill example - formtoken = 2
        +
        + + +
        +
        + + + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + back +
        + + +
        +
        +
        + + + + diff --git a/comps/FormFillUrl/_demo/demo.html b/comps/FormFillUrl/_demo/demo.html new file mode 100755 index 000000000..519c9e803 --- /dev/null +++ b/comps/FormFillUrl/_demo/demo.html @@ -0,0 +1,113 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FormFillUrl 示例

        + +
        +
        +
        +
        +
        +
        form auto fill example
        +
        + + +
        +
        + + + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + back +
        +
        +
        +
        + + + + diff --git a/comps/FormFillUrl/_demo/demo.select.html b/comps/FormFillUrl/_demo/demo.select.html new file mode 100755 index 000000000..aaab610aa --- /dev/null +++ b/comps/FormFillUrl/_demo/demo.select.html @@ -0,0 +1,221 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FormFillUrl 示例 - text && textarea && password

        + +
        + +
        +
        normal
        +
        +
        + + + +
        +
        + + + +
        + +
        + + + + + + + + + + +
        +
        +
        +
        +
        range - name with []
        +
        +
        + + + +
        +
        + + + +
        +
        +
        +
        + + + +
        +
        + + + +
        +
        +
        +
        + + back +
        +
        + + + + + diff --git a/comps/FormFillUrl/_demo/demo.text.password.textarea.html b/comps/FormFillUrl/_demo/demo.text.password.textarea.html new file mode 100755 index 000000000..1dda9402f --- /dev/null +++ b/comps/FormFillUrl/_demo/demo.text.password.textarea.html @@ -0,0 +1,99 @@ + + + + +Open JQuery Components Library - suches + + + + + + +

        JC.FormFillUrl 示例 - text && textarea && password

        + +
        + +
        +
        normal
        +
        +
        + + + + + +
        +
        + + + + +
        +
        + + + + +
        +
        +
        +
        +
        range - name with []
        +
        +
        + + +
        +
        + + +
        +
        + + +
        + +
        +
        +
        + + back +
        +
        + + + + + diff --git a/comps/FormFillUrl/_demo/index.php b/comps/FormFillUrl/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/FormFillUrl/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FormFillUrl/index.php b/comps/FormFillUrl/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/FormFillUrl/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FormFillUrl/res/default/style.css b/comps/FormFillUrl/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/comps/FrameUtil/FrameUtil.js b/comps/FrameUtil/FrameUtil.js new file mode 100755 index 000000000..75e6be7f3 --- /dev/null +++ b/comps/FrameUtil/FrameUtil.js @@ -0,0 +1,504 @@ + ;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ +/** + *

        iframe 自适应 与 数据交互 工具类

        + * + *

        require: + * JC.common + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + * @namespace JC + * @class FrameUtil + * @static + * @version dev 0.1 2014-04-26 + * @author qiushaowei | 75 Team + */ + var _jdoc = $( document ), _jwin = $( window ), FU; + + JC.FrameUtil = FU = { + /** + * 事件保存与触发对象 + * @property eventHost + * @type object + */ + eventHost: {} + /** + * frame 高度偏移值 + * @property heightOffset + * @type int + * @default 0 + */ + , heightOffset: 0 + /** + * 自动大小的间隔 + *
        单位毫秒 + * @property autoUpdateSizeMs + * @type int + * @default 1000 + */ + , autoUpdateSizeMs: 1000 + /** + * 设置自适应大小应用的属性 + *
        1: height + *
        2: width + *
        3: height + width + * @property childSizePattern + * @type int + * @default 1 + */ + , childSizePattern: 1 + /** + * 是否自动响应关闭事件 + * @property isChildAutoClose + * @type boolean + * @default true + */ + , isChildAutoClose: true + /** + * 是否自动响应大小改变事件 + * @property isChildAutoSize + * @type boolean + * @default true + */ + , isChildAutoSize: true + /** + * 获取 JC.FrameUtil 唯一id + *
        id = location.url_timestamp + * @method id + * @return string + */ + , id: function(){ return FU._id; } + /** + * 通知父窗口更新frame大小 + * @method noticeSize + * @param {string} _type + */ + , noticeSize: + function( _type ){ + try{ + _type = FU.type( _type ); + if( ! FU.parent() ) return FU; + var _ext = { 'type': _type }; + FU.parent().jEventHost.trigger( 'size', [ FU.info( _ext ) ] ); + }catch(ex){ + JC.error( 'JC.FrameUtil noticeSize', ex.message ); + } + return FU; + } + /** + * 自动通知父窗口更新frame大小 + * @method autoNoticeSize + * @param {int} _ms + * @param {string} _type + */ + , autoNoticeSize: + function( _ms, _type ){ + typeof _ms == 'undefined' && ( _ms = FU.autoUpdateSizeMs ); + + $( FU ).data( 'FUI_noticeSize' ) && clearInterval( $( FU ).data( 'FUI_noticeSize' ) ); + FU.noticeSize( _type ); + _ms + && $(FU).data( 'FUI_noticeSize', setInterval( function(){ + FU.noticeSize( _type ); + }, _ms ) ); + + return FU; + } + /** + * 订阅 frame 的事件 + *
        目前有以下事件: + *
        close: 关闭 + *
        size: 更新大小 + *
        data: json 数据 + * @method subscribeEvent + * @param {string} _name + * @param {function} _cb + */ + , subscribeEvent: + function( _name, _cb ){ + if( !_name ) return FU; + $( FU.eventHost ).on( _name, _cb ); + return FU; + } + /** + * 通知父级有数据交互 + * @method noticeData + * @param {json} _data + * @param {string} _type + */ + , noticeData: + function( _data, _type ){ + try{ + if( !(_data) ) return FU; + if( !FU.parent() ) return FU; + _type = FU.type( _type ); + + FU.parent().jEventHost.trigger( 'data', FU.info( { 'data': _data, 'type': _type } ) ); + }catch( ex ){ + JC.error( 'JC.FrameUtil noticeData', ex.message ); + } + return FU; + } + /** + * 通知父级刷新页面 + * @method noticeReload + * @param {string} _url + * @param {string} _type + */ + , noticeReload: + function( _url, _type ){ + if( !FU.parent() ) return FU; + _type = FU.type( _type ); + + FU.parent().jEventHost.trigger( 'reload', FU.info( { 'url': _url, 'type': _type } ) ); + return FU; + } + + /** + * 通知父级已经初始化完毕 + * @method noticeReady + * @param {string} _type + */ + , noticeReady: + function( _type ){ + if( !FU.parent() ) return FU; + try{ + _type = FU.type( _type ); + + FU.parent() + && FU.parent().jEventHost.trigger( 'ready', FU.info( { 'type': _type } ) ); + }catch( ex ){ + JC.error ( 'JC.FrameUtil noticeReady', ex.message ); + } + return FU; + } + /** + * 通知子级有数据交互 + * @method noticeChildData + * @param {json} _params + * @param {string} _type + */ + , noticeChildData: + function( _params, _type ){ + if( !(_params) ) return FU; + _params.type = FU.type( _type ) || _params.type; + + FU.info().jEventHost.trigger( 'childData', FU.info( _params ) ); + return FU; + } + /** + * 通知父级关闭窗口 + * @method noticeClose + * @param {string} _type + */ + , noticeClose: + function( _type ){ + try{ + _type = FU.type( _type ); + FU.parent().jEventHost.trigger( 'close', FU.info( { 'type': _type } ) ); + }catch(ex){ + JC.error( 'JC.FrameUtil noticeClose', ex.message ); + } + return FU; + } + /** + * 获取窗口信息 + * @method info + * @return {object} $, width, height, bodyWidth, bodyHeight, id + */ + , info: + function( _ext ){ + var _body = $( document.body ) + , _vs = JC.f.docSize() + , _r = { + '$': $ + , 'width': _vs.width + , 'height': _vs.height + , 'bodyWidth': _vs.bodyWidth + , 'bodyHeight': _vs.bodyHeight + , 'id': FU.id() + , 'eventHost': FU.eventHost + , 'jEventHost': $( FU.eventHost ) + , 'FrameUtil': FU + }; + + _ext && ( _r = JC.f.extendObject( _r, _ext ) ); + + return _r; + } + /** + * 获取父级窗口信息 + * @method parent + * @return {object} $, win, jwin, JC, FrameUtil, eventHost, jEventHost, id + */ + , parent: + function(){ + var _r; + + if( window.parent + && window.parent != window + && window.parent.$ + && window.parent.JC + && window.parent.JC.FrameUtil + ){ + _r = { + '$': window.parent.$ + , 'win': window.parent + , 'jwin': window.parent.$( window.parent ) + , 'JC': window.parent.JC + , 'eventHost': window.parent.JC.FrameUtil.eventHost + , 'jEventHost': window.parent.$( window.parent.JC.FrameUtil.eventHost ) + , 'id': window.parent.JC.FrameUtil.id() + , 'FrameUtil': window.parent.JC.FrameUtil + }; + } + + return _r; + } + /** + * 获取子级窗口信息 + * @method parent + * @return {object} $, width, height, bodyWidth, bodyHeight, win, doc, type, id + */ + , frameInfo: + function( _frame, _ext ){ + _frame && ( _frame = $( _frame ) ); + var _r = null; + + if( _frame && _frame.length ){ + try{ + var _cwin = _frame.prop( 'contentWindow' ) + , _cdoc = _frame.prop( 'contentDocument' ) + , _type = JC.f.getUrlParam( _frame.attr('src') || '', 'jsAction' ) || _cwin.name || '' + , _vs = JC.f.docSize( _cdoc ) + ; + }catch(ex){ + JC.error( 'JC.FrameUtil frameInfo', ex.message ); + return _r; + } + + _r = { + '$': _cwin.$ + , 'width': _vs.width + , 'height': _vs.height + , 'bodyWidth': _vs.bodyWidth + , 'bodyHeight': _vs.bodyHeight + , 'docWidth': _vs.docWidth + , 'docHeight': _vs.docHeight + , 'win': _cwin + , 'doc': _cdoc + , 'type': _type + , 'id': '' + }; + + _cdoc && _cdoc.body + && ( + _r.bodyWidth = _cdoc.body.offsetWidth + , _r.bodyHeight = _cdoc.body.offsetHeight + ); + + if( _cwin.JC && _cwin.JC.FrameUtil ){ + _r.id = _cwin.JC.FrameUtil.id(); + } + + _ext && ( _r = JC.f.extendObject( _r, _ext ) ); + } + + return _r; + } + /** + * 获取窗口类型 + *
        这个方法的作用可用 id() + childIdMap() 替代 + * @method type + * @default window.name + * @return string + */ + , type: + function( _type, _plus, _frame ){ + if( !_type ){ + _frame && ( _frame = $( _frame ) ); + if( _frame && _frame.length ){ + _type = JC.f.getUrlParam( _frame.attr( 'jsAction' ) || '', 'jsAction' ); + _type = _type || _frame.prop( 'contentWindow' ).name || ''; + }else{ + _type = JC.f.getUrlParam( 'jsAction' ); + _type = _type || window.name || ''; + } + } + _type && _plus && ( _type += _plus ); + + return _type; + } + /** + * 批量更新 frame 大小 + * @method updateChildrenSize + * @param {selector} _frames + */ + , updateChildrenSize: + function( _frames ){ + _frames && ( _frames = $( _frames ) ); + if( !( _frames && _frames.length ) ) return FU; + _frames.each( function(){ + FU.updateChildSize( $( this ) ); + }); + return FU; + } + /** + * 更新 frame 大小 + * @method updateChildSize + * @param {selector} _frame + */ + , updateChildSize: + function( _frame ){ + _frame && ( _frame = $( _frame ) ); + if( !( _frame && _frame.length ) ) return FU; + if( !_frame.is( ':visible' ) ) return FU; + var _finfo, _h; + _finfo = FU.frameInfo( _frame ); + if( !_finfo ) return; + if( !_finfo.height ) return FU; + _frame.css( FU.cssFromSizePattern( FU.childSizePattern, _finfo ) ); + _frame.css( 'height', _finfo.height + 'px' ); + //JC.log( _frame.attr( 'name' ), _finfo.height, _finfo.bodyHeight ); + return FU; + } + /** + * 自动批量更新 frame 大小 + * @method childrenAutoSize + * @param {selector} _frames + * @param {int} _ms + */ + , childrenAutoSize: + function( _frames, _ms ){ + _frames && ( _frames = $( _frames ) ); + if( !( _frames && _frames.length ) ) return FU; + typeof _ms == 'undefined' && ( _ms = FU.autoUpdateSizeMs ); + var _d = { 'frames': _frames }; + + FU.updateChildrenSize( _frames ); + + _frames.data( 'FUI_autoSize' ) + && clearInterval( _frames.data( 'FUI_autoSize' ) ) + ; + + _ms + && _frames.data( 'FUI_autoSize', setInterval( function(){ + FU.updateChildrenSize( _frames ); + }, _ms ) ); + + return FU; + } + /** + * 通过 id 比对 frame 的 FrameUtil.id() 获取 frame + * @method childIdMap + * @param {string} _id + * @return selector | null + */ + , childIdMap: + function( _id ){ + var _r; + + if( _id ){ + if( _id in FU._childIdMap ){ + _r = FU._childIdMap[ _id ]; + }else{ + $( 'iframe' ).each( function( _ix ){ + var _iframe = $( this ), _win = _iframe.prop( 'contentWindow' ); + + if( + _win && _win.JC && _win.JC.FrameUtil + && _win.JC.FrameUtil.id() + ){ + if( _win.JC.FrameUtil.id() === _id ){ + FU._childIdMap[ _id ] = _r = _iframe; + return false; + } + } + }); + } + } + return _r; + } + , _childIdMap: {} + + /** + * 通过 FrameUtil.childSizePattern 获取对应的 css 样式 + * @method cssFromSizePattern + * @param {int} _pattern + * @param {json} _params + * @return json + */ + , cssFromSizePattern: + function( _pattern, _params ){ + var _css = {}; + switch( _pattern ){ + case 1: _css.height = _params.height + FU.heightOffset; break; + case 2: _css.width = _params.width; break; + default: + _css.height = _params.height + FU.heightOffset; + _css.width = _params.width; + break; + } + return _css; + } + + }; + + FU._id = location.href + '_' + new Date().getTime(); + + + if( FU.parent() ){ + FU.parent().FrameUtil.subscribeEvent( 'childData', function( _evt, _params ){ + if( !( _params.id === FU._id ) ) return; + FU.noticeChildData( _params ); + }); + + setTimeout( function(){ FU.noticeReady(); }, 1 ); + } + + JC.f.safeTimeout( function(){ + + if( FU.isChildAutoSize ){ + JC.FrameUtil.subscribeEvent( 'size', function( _evt, _params ){ + if( !_params.height ) return; + var _childFrame = FU.childIdMap( _params.id ), _css; + if( _childFrame && _childFrame.length ){ + _childFrame.css( FU.cssFromSizePattern( FU.childSizePattern, _params ) ); + } + }); + } + + if( FU.isChildAutoClose ){ + JC.FrameUtil.subscribeEvent( 'close', function( _evt, _params ){ + var _childFrame = FU.childIdMap( _params.id ), _css, _panel; + if( _childFrame && _childFrame.length ){ + _panel = JC.f.parentSelector( _childFrame, 'div.UPanel' ); + _panel + && _panel.length + && JC.Panel.getInstance( _panel ) + && JC.Panel.getInstance( _panel ).close() + ; + } + }); + } + + JC.FrameUtil.subscribeEvent( 'reload', function( _evt, _params ){ + var _url = _params.url || location.href; + JC.f.reloadPage( _url ); + }); + + }, null, 'JCFrameUtilInit', 200 ); + + return JC.FrameUtil; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/FrameUtil/_demo/data/childToParent.close.html b/comps/FrameUtil/_demo/data/childToParent.close.html new file mode 100755 index 000000000..b5942e744 --- /dev/null +++ b/comps/FrameUtil/_demo/data/childToParent.close.html @@ -0,0 +1,209 @@ + + + + +Open JQuery Components Library - suches + + + + + + +
        +
        CommonModify 添加删除演示 示例1
        +
        + + + + + +
        + + +   + + 添加 + +
        +
        +
        + +
        +
        CommonModify 添加删除演示 示例2 (模板过滤函数 php索引叠加)
        +
        + + + + + +
        + + +   + + 添加 + +
        +
        +
        + +
        + +
        + + + + + + + + diff --git a/comps/FrameUtil/_demo/data/childToParent.html b/comps/FrameUtil/_demo/data/childToParent.html new file mode 100755 index 000000000..16d3203d9 --- /dev/null +++ b/comps/FrameUtil/_demo/data/childToParent.html @@ -0,0 +1,201 @@ + + + + +Open JQuery Components Library - suches + + + + + + +
        +
        CommonModify 添加删除演示 示例1
        +
        + + + + + +
        + + +   + + 添加 + +
        +
        +
        + +
        +
        CommonModify 添加删除演示 示例2 (模板过滤函数 php索引叠加)
        +
        + + + + + +
        + + +   + + 添加 + +
        +
        +
        + + + + + + + + diff --git a/comps/FrameUtil/_demo/data/childToParent.noticeData.html b/comps/FrameUtil/_demo/data/childToParent.noticeData.html new file mode 100755 index 000000000..a2f25464f --- /dev/null +++ b/comps/FrameUtil/_demo/data/childToParent.noticeData.html @@ -0,0 +1,143 @@ + + + + +Open JQuery Components Library - suches + + + + + + + + + + + +
        +
        Bizs.FormLogic, ajax get form example 1, system done
        +
        +
        +
        +
        +
        + 文件框: +
        +
        + 日期: + +
        +
        + 下拉框: + +
        +
        + 动态添加: +   + + 添加 + +
        +
        + + + + + back +
        +
        +
        +
        +
        +
        + + + + + + diff --git a/comps/FrameUtil/_demo/data/frame1.php b/comps/FrameUtil/_demo/data/frame1.php new file mode 100755 index 000000000..904ec794d --- /dev/null +++ b/comps/FrameUtil/_demo/data/frame1.php @@ -0,0 +1,57 @@ + + + + +Open JQuery Components Library - suches + + + + + + + + +

        示例

        + +
        +
        +
        +
        +
        + + + + diff --git a/comps/FrameUtil/_demo/data/frame2.php b/comps/FrameUtil/_demo/data/frame2.php new file mode 100755 index 000000000..e69de29bb diff --git a/comps/FrameUtil/_demo/data/frame3.php b/comps/FrameUtil/_demo/data/frame3.php new file mode 100755 index 000000000..e69de29bb diff --git a/comps/FrameUtil/_demo/data/handler.php b/comps/FrameUtil/_demo/data/handler.php new file mode 100755 index 000000000..4830211e6 --- /dev/null +++ b/comps/FrameUtil/_demo/data/handler.php @@ -0,0 +1,13 @@ + 0, 'errmsg' => '', 'data' => array () ); + + isset( $_REQUEST['errorno'] ) && ( $r['errorno'] = (int)$_REQUEST['errorno'] ); + isset( $_REQUEST['errmsg'] ) && ( $r['errmsg'] = $_REQUEST['errmsg'] ); + isset( $_REQUEST['url'] ) && ( $r['url'] = $_REQUEST['url'] ); + + $r['data'] = $_REQUEST; + + isset( $_REQUEST['formReturnUrl'] ) && ( $r['url'] = $_REQUEST['formReturnUrl'] ); + + echo json_encode( $r ); +?> diff --git a/comps/FrameUtil/_demo/data/parentToChild.html b/comps/FrameUtil/_demo/data/parentToChild.html new file mode 100755 index 000000000..e724ac7f2 --- /dev/null +++ b/comps/FrameUtil/_demo/data/parentToChild.html @@ -0,0 +1,201 @@ + + + + +Open JQuery Components Library - suches + + + + + + +
        +
        CommonModify 添加删除演示 示例1
        +
        + + + + + +
        + + +   + + 添加 + +
        +
        +
        + +
        +
        CommonModify 添加删除演示 示例2 (模板过滤函数 php索引叠加)
        +
        + + + + + +
        + + +   + + 添加 + +
        +
        +
        + + + + + + + + diff --git a/comps/FrameUtil/_demo/demo.childToParent.autoNoticeSize.html b/comps/FrameUtil/_demo/demo.childToParent.autoNoticeSize.html new file mode 100755 index 000000000..bcc72cb3f --- /dev/null +++ b/comps/FrameUtil/_demo/demo.childToParent.autoNoticeSize.html @@ -0,0 +1,100 @@ + + + + +JC.FrameUtil - Open JQuery Components Library - suches + + + + + + + +

        JC.FrameUtil - child to parent - JC.FrameUtil.autoNoticeSize( _ms, _type ) - 示例

        + +
        +
        panel iframe
        +
        + +
        +
        + +
        +
        iframe
        +
        + +
        +
        + +
        +
        iframe
        +
        + +
        +
        + + + + + + diff --git a/comps/FrameUtil/_demo/demo.childToParent.noticeData.html b/comps/FrameUtil/_demo/demo.childToParent.noticeData.html new file mode 100755 index 000000000..b9b66e2db --- /dev/null +++ b/comps/FrameUtil/_demo/demo.childToParent.noticeData.html @@ -0,0 +1,92 @@ + + + + +JC.FrameUtil - Open JQuery Components Library - suches + + + + + + + +

        JC.FrameUtil - child to parent - JC.FrameUtil.noticeData( _data, _type ) - 示例

        + +
        +
        panel iframe
        +
        + +
        +
        + + + + + + diff --git a/comps/FrameUtil/_demo/demo.parentToChild.childrenAutoSize.html b/comps/FrameUtil/_demo/demo.parentToChild.childrenAutoSize.html new file mode 100755 index 000000000..acbfff61b --- /dev/null +++ b/comps/FrameUtil/_demo/demo.parentToChild.childrenAutoSize.html @@ -0,0 +1,70 @@ + + + + +JC.FrameUtil - Open JQuery Components Library - suches + + + + + + + +

        JC.FrameUtil - child to parent - JC.FrameUtil.childrenAutoSize( _frames, _ms ) - 示例

        + +
        +
        iframe
        +
        + +
        +
        + +
        +
        + +
        +
        + + + + + diff --git a/comps/FrameUtil/_demo/index.php b/comps/FrameUtil/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/FrameUtil/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/FrameUtil/index.php b/comps/FrameUtil/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/FrameUtil/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/ImageCutter/ImageCutter.js b/comps/ImageCutter/ImageCutter.js new file mode 100755 index 000000000..9d8498b3d --- /dev/null +++ b/comps/ImageCutter/ImageCutter.js @@ -0,0 +1,1805 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 图片裁切组件 + *
        借助 PHP GD 库进行图片裁切( 不仅限于 PHP GD ) + * + *

        require: + * JC.common + * , JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 div class="js_compImageCutter"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        imageUrl = url string
        + *
        图片URL
        + * + *
        defaultCoordinate = string
        + *
        + * 设置默认选择范围, 有以下三种模式 + *
        sidelength + *
        x, y + *
        x, y, sidelength + *
        + * + *
        coordinateSelector = selector
        + *
        保存当前坐标值的 node + *
        坐标值分别为: [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ] + *
        + * + *
        imageUrlSelector = selector
        + *
        保存当前图片URL的 node
        + * + *
        previewSelector = selector
        + *
        用于显示预览的 node, 支持多个预览, node 宽高并须为正方形
        + * + *
        minRectSidelength = int, default = 50
        + *
        裁切块的最小边长
        + * + *
        minImageSidelength = int, default = 50
        + *
        图片的最小边长
        + * + *
        maxImageSidelength = int
        + *
        图片的最大边长
        + * + *
        cicInitedCb = function
        + *
        组件初始化后的回调, window变量域 +
        function cicInitedCb(){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicInitedCb', new Date().getTime() );
        +}
        + *
        + * + *
        cicImageInitedCb = function
        + *
        图片初始化完成时的回调, window变量域 +
        function cicImageInitedCb( _sizeObj, _img ){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicImageInitedCb', new Date().getTime() );
        +}
        + *
        + * + *
        cicCoordinateUpdateCb = function
        + *
        更新裁切坐标后的回调, window变量域 + *
        _corAr = Array = [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ] +
        function cicCoordinateUpdateCb( _corAr, _imgUrl ){
        +    var _p = this, _selector = _p.selector();
        +    JC.log( 'cicCoordinateUpdateCb', _corAr, _imgUrl, new Date().getTime() );
        +}
        + *
        + * + *
        cicDragDoneCb = function
        + *
        拖动完成后的回调, window变量域 + *
        与 cicCoordinateUpdateCb 的差别是: cicDragDoneCb 初始化不会触发 +
        function cicDragDoneCb( _sizeObj ){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicDragDoneCb', new Date().getTime() );
        +}
        + *
        + * + *
        cicErrorCb = function
        + *
        发生错误时的回调, window变量域 + *
        所有错误类型都会触发这个回调 +
        function cicErrorCb( _errType, _args ){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicErrorCb', _errType, new Date().getTime() );
        +}
        + *
        + * + *
        cicLoadErrorCb = function
        + *
        图片加载错误时的回调, window变量域 +
        function cicLoadErrorCb( _imgUrl ){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicLoadErrorCb',_imgUrl, new Date().getTime() );
        +}
        + *
        + * + *
        cicSizeErrorCb = function
        + *
        图片尺寸不符合设置要求时的回调, window变量域 +
        function cicSizeErrorCb( _width, _height, _imgUrl, _isMax ){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicSizeErrorCb', _width, _height, _imgUrl, _isMax, new Date().getTime() );
        +}
        + *
        + * + *
        cicPreviewSizeErrorCb = function
        + *
        图片缩放后尺寸不符合设置要求时的回调, window变量域 +
        function cicPreviewSizeErrorCb( _width, _height, _imgUrl, _newSize ){
        +    var _ins = this, _selector = _ins.selector();
        +    JC.log( 'cicPreviewSizeErrorCb', _width, _height, _imgUrl, _newSize, new Date().getTime() );
        +}
        + *
        + *
        + * + * @namespace JC + * @class ImageCutter + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2013-12-13 + * @author qiushaowei | 75 Team + * @example +<table> + <tr> + <td> + <div class="js_compImageCutter" + imageUrl="data/uploads/h_1680x1050.jpg" + previewSelector="(tr div.js_previewItem" + coordinateSelector="(td input.js_coordinate" + imageUrlSelector="(td input.js_imageUrl" + cicCoordinateUpdateCb="cicCoordinateUpdateCb" + > + </div> + <input type="text" class="ipt js_coordinate" value="" /> + <input type="text" class="ipt js_imageUrl" value="" /> + </td> + <td> + <div class="cic_previewItem js_previewItem" style="width: 50px; height: 50px;"></div> + <div class="cic_previewItem js_previewItem" style="width: 75px; height: 75px;"></div> + <div class="cic_previewItem js_previewItem" style="width: 150px; height: 150px;"></div> + </td> + </tr> +</table> + */ + var _jdoc = $( document ), _jwin = $( window ), _jbody; + + JC.ImageCutter = ImageCutter; + + function ImageCutter( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, ImageCutter ) ) + return JC.BaseMVC.getInstance( _selector, ImageCutter ); + + JC.BaseMVC.getInstance( _selector, ImageCutter, this ); + + this._model = new ImageCutter.Model( _selector ); + this._view = new ImageCutter.View( this._model ); + + this._init(); + + JC.log( ImageCutter.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 ImageCutter 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of ImageCutterInstance} + */ + ImageCutter.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compImageCutter' ) ){ + _r.push( new ImageCutter( _selector ) ); + }else{ + _selector.find( 'div.js_compImageCutter' ).each( function(){ + _r.push( new ImageCutter( this ) ); + }); + } + } + return _r; + }; + /** + * 裁切范围的最小边长 + * @property minRectSidelength + * @type int + * @default 50 + * @static + */ + ImageCutter.minRectSidelength = 50; + /** + * 图片的最小边长 + * @property minImageSidelength + * @type int + * @default 50 + * @static + */ + ImageCutter.minImageSidelength = 50; + /** + * 图片的最大边长 + * @property maxImageSidelength + * @type int + * @static + */ + ImageCutter.maxImageSidelength; + /** + * 上下左右方向键移动的步长 + * @property moveStep + * @type int + * @default 1 + * @static + */ + ImageCutter.moveStep = 1; + /** + * 进行坐标计算的偏移值 + * @property _positionPoint + * @type int + * @default 10000 + * @static + * @protected + */ + ImageCutter._positionPoint = 10000; + /** + * 默认的 CSS cursor + * @property _defaultCursor + * @type string + * @default auto + * @static + * @protected + */ + ImageCutter._defaultCursor = 'auto'; + /** + * 获取 拖动 的相关信息 + * @method dragInfo + * @param {ImageCutterInstance} _p + * @param {event} _evt + * @param {object} _size + * @param {selector} _srcSelector + * @static + */ + ImageCutter.dragInfo = + function( _p, _evt, _size, _srcSelector ){ + if( _p && _evt && _size ){ + ImageCutter._dragInfo = { + 'ins': _p + , 'evt': _evt + , 'size': _p._model.size() + , 'tmpSize': _size + , 'pageX': _evt.pageX + , 'pageY': _evt.pageY + , 'srcSelector': _srcSelector + , 'offset': _p.selector().offset() + , 'minDistance': _p._model.minDistance() + , 'winWidth': _jwin.width() + , 'winHeight': _jwin.height() + , 'btnSidelength': _p._model.btnTl().width() + } + //JC.log( 'minDistance', ImageCutter._dragInfo.minDistance ); + //window.JSON && JC.log( JSON.stringify( _size ) ); + } + return ImageCutter._dragInfo; + }; + /** + * 清除拖动信息 + * @method cleanInfo + * @static + */ + ImageCutter.cleanInfo = + function(){ + + _jdoc.off( 'mouseup', ImageCutter.dragMainMouseUp ); + _jdoc.off( 'mousemove', ImageCutter.dragMainMouseMove ); + + _jdoc.off( 'mouseup', ImageCutter.dragBtnMouseUp ); + _jdoc.off( 'mousemove', ImageCutter.dragBtnMouseMove ); + + ImageCutter.dragInfo( null ); + _jbody.css( 'cursor', ImageCutter._defaultCursor ); + }; + /* + { + "minX": 0, + "dragger": { + "srcSidelength": 94, + "sidelength": 84, + "left": 103, + "top": 103, + "halfSidelength": 42 + }, + "maxX": 300, + "top": 56, + "left": 0, + "width": 1680, + "height": 1050, + "selector": { + "width": 300, + "height": 300 + }, + "preview": { + "width": 300, + "height": 188 + }, + "minY": 56, + "img": { + "width": 1680, + "height": 1050 + }, + "maxY": 244 + } + */ + ImageCutter.dragMainMouseMove = + function( _evt ){ + if( !( ImageCutter.dragInfo() && _evt ) ) return; + var _di = ImageCutter.dragInfo(), _p; + var _p = _di.ins + , _posX = _di.pageX - _evt.pageX + , _posY = _di.pageY - _evt.pageY + + , _newX = _di.size.dragger.left - _posX + , _newY = _di.size.dragger.top - _posY + + , _maxX = _di.size.maxX - _di.size.dragger.srcSidelength + , _maxY = _di.size.maxY - _di.size.dragger.srcSidelength + ; + + _newX < _di.size.minX && ( _newX = _di.size.minX ); + _newX > _maxX && ( _newX = _maxX ); + + _newY < _di.size.minY && ( _newY = _di.size.minY ); + _newY > _maxY && ( _newY = _maxY ); + + _di.tmpSize.dragger.left = _newX; + _di.tmpSize.dragger.top = _newY; + + _p.updatePosition( _di.tmpSize ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] ); + + //JC.log( 'ImageCutter.dragMainMouseMove', _newX, _newY ); + }; + + ImageCutter.dragMainMouseUp = + function( _evt ){ + if( !ImageCutter.dragInfo() ) return; + var _di = ImageCutter.dragInfo(), _p = _di.ins; + + _jbody.css( 'cursor', ImageCutter._defaultCursor ); + + _p._size( _di.tmpSize ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] ); + _p.trigger( ImageCutter.Model.DRAG_DONE, [ _di.tmpSize ] ); + + ImageCutter.cleanInfo(); + }; + + ImageCutter.dragBtnMouseMove = + function( _evt ){ + if( !( ImageCutter.dragInfo() && _evt ) ) return; + var _di = ImageCutter.dragInfo() + , _p = _di.ins + , _posX = _di.pageX - _evt.pageX + , _posY = _di.pageY - _evt.pageY + , _direct = _di.srcSelector.attr( 'diretype' ) + ; + //JC.log( 'old', _di.size.dragger.left, _di.size.dragger.top ); + //JC.log( 'ImageCutter.dragBtnMouseMove', _posX, _posY, _direct ); + + switch( _direct ){ + case 'cic_btnTl': ImageCutter.resizeTopLeft( _di, _posX, _posY, _evt ); break; + case 'cic_btnTc': ImageCutter.resizeTopCenter( _di, _posX, _posY, _evt ); break; + case 'cic_btnTr': ImageCutter.resizeTopRight( _di, _posX, _posY, _evt ); break; + case 'cic_btnMl': ImageCutter.resizeMidLeft( _di, _posX, _posY, _evt ); break; + case 'cic_btnMr': ImageCutter.resizeMidRight( _di, _posX, _posY, _evt ); break; + case 'cic_btnBl': ImageCutter.resizeBottomLeft( _di, _posX, _posY, _evt ); break; + case 'cic_btnBc': ImageCutter.resizeBottomCenter( _di, _posX, _posY, _evt ); break; + case 'cic_btnBr': ImageCutter.resizeBottomRight( _di, _posX, _posY, _evt ); break; + } + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] ); + }; + + ImageCutter.dragBtnMouseUp = + function( _evt ){ + if( !ImageCutter.dragInfo() ) return; + var _di = ImageCutter.dragInfo(), _p = _di.ins; + //JC.log( 'ImageCutter.dragBtnMouseUp', new Date().getTime() ); + + _jbody.css( 'cursor', ImageCutter._defaultCursor ); + + _p._size( _di.tmpSize ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] ); + _p.trigger( ImageCutter.Model.DRAG_DONE, [ _di.tmpSize ] ); + + ImageCutter.cleanInfo(); + }; + + ImageCutter.defaultKeydown = + function( _evt ){ + if( !( _evt && ImageCutter._currentIns ) ) return; + _evt.preventDefault(); + var _keyCode = _evt.keyCode; + //JC.log( 'ImageCutter.defaultKeydown', new Date().getTime(), _keyCode ); + switch( _keyCode ){ + case 37: ImageCutter._currentIns.moveLeft(); break; + case 38: ImageCutter._currentIns.moveUp(); break; + case 39: ImageCutter._currentIns.moveRight(); break; + case 40: ImageCutter._currentIns.moveDown(); break; + } + }; + + ImageCutter.defaultMouseenter = + function( _evt ){ + var _sp = $( this ), _ins = BaseMVC.getInstance( _sp, ImageCutter ); + if( !_ins ) return; + ImageCutter._currentIns = _ins; + //JC.log( 'ImageCutter.defaultMouseenter', new Date().getTime() ); + }; + + ImageCutter.defaultMouseleave = + function( _evt ){ + ImageCutter._currentIns = null; + //JC.log( 'ImageCutter.defaultMouseleave', new Date().getTime() ); + }; + + JC.BaseMVC.build( ImageCutter ); + + JC.f.extendObject( ImageCutter.prototype, { + _beforeInit: + function(){ + //JC.log( 'ImageCutter _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on( ImageCutter.Model.INITED, function( _evt ){ + _p._model.coordinateSelector() && _p._model.coordinateSelector().val( '' ); + _p._model.imageUrlSelector() && _p._model.imageUrlSelector().val( '' ); + + _p._model.imageUrl() + && _p.update( _p._model.imageUrl() ); + + _p._model.cicInitedCb() + && _p._model.cicInitedCb().call( _p ); + }); + + _p.on( ImageCutter.Model.IMAGE_LOAD, function( _evt, _img, _width, _height ){ + + _p.clean(); + + _p._model.imageUrl( _img.attr( 'src' ) ); + + if( _p._model.maxImageSidelength() + && ( _width > _p._model.maxImageSidelength() || _height > _p._model.maxImageSidelength() ) + ){ + _p.trigger( ImageCutter.Model.ERROR_SIZE, [ _width, _height, _img, true ] ); + return; + } + + if( _p._model.minImageSidelength() + && ( _width < _p._model.minImageSidelength() || _height < _p._model.minImageSidelength() ) + ){ + _p.trigger( ImageCutter.Model.ERROR_SIZE, [ _width, _height, _img ] ); + return; + } + + var _newSize = _p._model.size( _width, _height ); + + //if( true ){ + if( _newSize.preview.width < _p._model.minRectSidelength() + || _newSize.preview.height < _p._model.minRectSidelength() ){ + _p.trigger( ImageCutter.Model.ERROR_PREVIEW, [ _width, _height, _img, _newSize ] ); + return; + } + + _img.css( { + 'width': _newSize.preview.width + , 'height': _newSize.preview.height + , 'left': _newSize.left + , 'top': _newSize.top + }); + _img.prependTo( _p.selector() ); + + _p._model.imageUrlSelector() + && _p._model.imageUrlSelector().length + && _p._model.imageUrlSelector().val( _img.attr( 'src' ) ); + + _p._view.initDragger( _newSize ); + + _p.trigger( ImageCutter.Model.INIT_PREVIEW ); + _p.trigger( ImageCutter.Model.UPDATE_COORDINATE, [ _newSize ] ); + + _p._model.ready( true ); + + _p._model.cicImageInitedCb() + && _p._model.cicImageInitedCb().call( _p, _p._model.size(), _img ); + }); + + _p.selector().on( 'mouseenter', ImageCutter.defaultMouseenter ); + _p.selector().on( 'mouseleave', ImageCutter.defaultMouseleave ); + + _p.selector().delegate( 'div.cic_dragMain', 'mousedown', function( _evt ){ + if( !_p._model.ready() ) return; + _evt.preventDefault(); + _evt.stopPropagation(); + //JC.log( 'div.cic_dragMain mousedown', new Date().getTime() ); + + ImageCutter.cleanInfo(); + ImageCutter.dragInfo( _p, _evt, JC.f.cloneObject( _p._model.size() ), $( this ) ); + + _jbody.css( 'cursor', 'move' ); + _p.trigger( ImageCutter.Model.INIT_PREVIEW ); + + _jdoc.on( 'mousemove', ImageCutter.dragMainMouseMove ); + _jdoc.on( 'mouseup', ImageCutter.dragMainMouseUp ); + + return false; + }); + + _p.selector().delegate( 'button.cic_btn', 'mousedown', function( _evt ){ + if( !_p._model.ready() ) return; + _evt.preventDefault(); + //JC.log( 'div.cic_btn mousedown', new Date().getTime() ); + + ImageCutter.cleanInfo(); + ImageCutter.dragInfo( _p, _evt, JC.f.cloneObject( _p._model.size() ), $( this ) ); + + var _btn = $( this ) + , _direct = _btn.attr( 'diretype' ) + ; + + switch( _direct ){ + case 'cic_btnTl': _jbody.css( 'cursor', 'nw-resize' ); break; + case 'cic_btnTc': _jbody.css( 'cursor', 'n-resize' ); break; + case 'cic_btnTr': _jbody.css( 'cursor', 'ne-resize' ); break; + case 'cic_btnMl': _jbody.css( 'cursor', 'w-resize' ); break; + case 'cic_btnMr': _jbody.css( 'cursor', 'e-resize' ); break; + case 'cic_btnBl': _jbody.css( 'cursor', 'sw-resize' ); break; + case 'cic_btnBc': _jbody.css( 'cursor', 's-resize' ); break; + case 'cic_btnBr': _jbody.css( 'cursor', 'se-resize' ); break; + } + + _p.trigger( ImageCutter.Model.INIT_PREVIEW ); + + _jdoc.on( 'mousemove', ImageCutter.dragBtnMouseMove ); + _jdoc.on( 'mouseup', ImageCutter.dragBtnMouseUp ); + + return false; + }); + + _p.on( ImageCutter.Model.INIT_PREVIEW, function( _evt ){ + //JC.log( 'ImageCutter.Model.INIT_PREVIEW', new Date().getTime() ); + _p._view.initPreviewItems(); + }); + + _p.on( ImageCutter.Model.UPDATE_RECT, function( _evt, _size ){ + _p.trigger( ImageCutter.Model.UPDATE_PREVIEW, [ _size ] ); + }); + + _p.on( ImageCutter.Model.UPDATE_PREVIEW, function( _evt, _size ){ + //JC.log( 'ImageCutter.Model.UPDATE_PREVIEW', new Date().getTime() ); + if( !_size ) return; + _p._view.updatePreviewItems( _size ); + }); + + _p.on( ImageCutter.Model.DRAG_DONE, function( _evt, _size ){ + //JC.log( 'ImageCutter.DRAG_DONE', new Date().getTime() ); + _p.trigger( ImageCutter.Model.UPDATE_COORDINATE, [ _size ] ); + + _p._model.cicDragDoneCb() + && _p._model.cicDragDoneCb().call( _p, _p._model.size() ); + }); + + _p.on( ImageCutter.Model.UPDATE_COORDINATE, function( _evt, _size ){ + var _size = _size || _p._model.size() + , _selector = _p._model.coordinateSelector() + ; + if( !_size ) return; + var _corAr = _p._model.realCoordinate( _size ); + + _p._model.cicCoordinateUpdateCb() + && _p._model.cicCoordinateUpdateCb().call( _p, _corAr, _p._model.imageUrl() ); + + if( !( _selector && _selector.length ) ) return; + _selector.val( _corAr ); + }); + + _p.on( ImageCutter.Model.ERROR, function( _evt, _type, _args ){ + _p._model.clean(); + _p._model.ready( false ); + + _p._model.cicErrorCb() + && _p._model.cicErrorCb().call( _p, _type, _args ); + }); + + _p.on( ImageCutter.Model.LOAD_ERROR, function( _evt, _imgUrl ){ + _p.clean(); + _p._model.ready( false ); + _p._view.imageLoadError( _imgUrl ); + _p._model.cicLoadErrorCb() && _p._model.cicLoadErrorCb().call( _p, _imgUrl ); + _p.trigger( ImageCutter.Model.ERROR, [ ImageCutter.Model.LOAD_ERROR, [ _imgUrl ] ] ); + }); + + _p.on( ImageCutter.Model.ERROR_SIZE, function( _evt, _width, _height, _img, _isMax ){ + _p._view.sizeError( _width, _height, _img, _isMax ); + _p._model.cicSizeErrorCb() && _p._model.cicSizeErrorCb().call( _p, _width, _height, _img.attr('src'), _isMax ); + _p.trigger( ImageCutter.Model.ERROR, [ ImageCutter.Model.ERROR_SIZE, [ _width, _height, _img, _isMax ] ] ); + }); + + _p.on( ImageCutter.Model.ERROR_PREVIEW, function( _evt, _width, _height, _img, _newSize ){ + _p._view.previewError( _width, _height, _img, _newSize ); + _p._model.cicPreviewSizeErrorCb() + && _p._model.cicPreviewSizeErrorCb().call( _p, _width, _height, _img.attr('src'), _newSize ); + _p.trigger( ImageCutter.Model.ERROR, [ ImageCutter.Model.ERROR_PREVIEW, [ _width, _height, _img, _newSize ] ] ); + }); + } + + , _inited: + function(){ + //JC.log( 'ImageCutter _inited', new Date().getTime() ); + this.trigger( ImageCutter.Model.INITED ); + } + /** + * 更新图片 + * @method update + * @param {string} _imgUrl + */ + , update: + function( _imgUrl ){ + if( !_imgUrl ) return; + this._view.update( _imgUrl ); + return this; + } + /** + * 清除拖动的所有内容 + * @method clean + */ + , clean: + function(){ + ImageCutter.cleanInfo(); + this._view.clean(); + this._model.clean(); + return this; + } + /** + * 更新拖动位置 + * @method updatePosition + * @param {object} _size + */ + , updatePosition: function(){ this._view.updatePosition.apply( this._view, JC.f.sliceArgs( arguments ) ); return this;} + /** + * 设置拖动信息 + * @method _size + * @param {object} _size + * @protected + */ + , _size: function(){ this._model.size.apply( this._model, JC.f.sliceArgs( arguments ) ); } + /** + * 向左移动, 移动步长为 ImageCutter.moveStep 定义的步长 + * @method moveLeft + */ + , moveLeft: function(){ this._view.moveLeft.apply( this._view, JC.f.sliceArgs( arguments ) ); } + /** + * 向上移动, 移动步长为 ImageCutter.moveStep 定义的步长 + * @method moveUp + */ + , moveUp: function(){ this._view.moveUp.apply( this._view, JC.f.sliceArgs( arguments ) ); } + /** + * 向右移动, 移动步长为 ImageCutter.moveStep 定义的步长 + * @method moveRight + */ + , moveRight: function(){ this._view.moveRight.apply( this._view, JC.f.sliceArgs( arguments ) ); } + /** + * 向下移动, 移动步长为 ImageCutter.moveStep 定义的步长 + * @method moveDown + */ + , moveDown: function(){ this._view.moveDown.apply( this._view, JC.f.sliceArgs( arguments ) ); } + }); + + ImageCutter.Model._instanceName = 'JCImageCutter'; + + ImageCutter.Model.INITED = "ImageCutterInited"; + ImageCutter.Model.INIT_PREVIEW = "CICInitPreview"; + ImageCutter.Model.DRAG_DONE = "CICDragDone"; + + ImageCutter.Model.UPDATE_RECT = "CICUpdateDragger"; + ImageCutter.Model.UPDATE_PREVIEW = "CICUpdatePreview"; + ImageCutter.Model.UPDATE_COORDINATE = "CICUpdateCoordinate"; + + ImageCutter.Model.IMAGE_LOAD = 'CICImageLoad'; + ImageCutter.Model.LOAD_ERROR = 'CICImageLoadError'; + + ImageCutter.Model.ERROR = "CICError"; + ImageCutter.Model.ERROR_SIZE = "CICSizeError"; + ImageCutter.Model.ERROR_PREVIEW = "CICPreviewError"; + + + JC.f.extendObject( ImageCutter.Model.prototype, { + init: + function(){ + //JC.log( 'ImageCutter.Model.init:', new Date().getTime() ); + var _p = this; + } + + , ready: + function( _setter ){ + typeof _setter != 'undefined' && ( this._ready = _setter ); + return this._ready; + } + + , imageUrl: + function( _setter ){ + _setter && this.selector().attr( 'imageUrl', _setter ); + return this.attrProp( 'imageUrl' ); + } + + , cicImageInitedCb: function(){ return this.callbackProp( 'cicImageInitedCb' ); } + + , cicInitedCb: function(){ return this.callbackProp( 'cicInitedCb' ); } + , cicDragDoneCb: function(){ return this.callbackProp( 'cicDragDoneCb' ); } + , cicErrorCb: function(){ return this.callbackProp( 'cicErrorCb' ); } + , cicLoadErrorCb: function(){ return this.callbackProp( 'cicLoadErrorCb' ); } + , cicSizeErrorCb: function(){ return this.callbackProp( 'cicSizeErrorCb' ); } + , cicPreviewSizeErrorCb: function(){ return this.callbackProp( 'cicPreviewSizeErrorCb' ); } + + , previewSelector: + function( _cleanCache ){ + if( this.is( '[previewSelector]' ) && ( !this._previewSelector || _cleanCache ) ){ + this._previewSelector = this.selectorProp( 'previewSelector' ); + } + return this._previewSelector; + } + + , minRectSidelength: function(){ return this.intProp( 'minRectSidelength' ) || ImageCutter.minRectSidelength; } + + , minImageSidelength: function(){ return this.intProp( 'minImageSidelength' ) || ImageCutter.minImageSidelength; } + , maxImageSidelength: function(){ return this.intProp( 'maxImageSidelength' ) || ImageCutter.maxImageSidelength; } + + , minDistance: + function(){ + return pointDistance( { x: 0, y: 0 }, { x: this.minRectSidelength(), y: this.minRectSidelength() } ); + } + + , size: + function( _width, _height ){ + + if( _width && _height ){ + this._size.img = { width: _width, height: _height }; + + this._size.preview = { 'width': _width, 'height': _height }; + if( _width > this._size.selector.width || _height > this._size.selector.height ){ + this._size.preview = sizeZoom( _width, _height, this._size.selector.width, this._size.selector.height ); + } + + this._size.preview.width = Math.round( this._size.preview.width ); + this._size.preview.height = Math.round( this._size.preview.height ); + + this._size.left = Math.round( ( this._size.selector.width - this._size.preview.width ) / 2 ); + this._size.top = Math.round( ( this._size.selector.height - this._size.preview.height ) / 2 ); + + this._size.width = _width; + this._size.height = _height; + + this._size.minX = this._size.left; + this._size.maxX = ( this._size.minX + this._size.preview.width ); + + this._size.minY = this._size.top; + this._size.maxY = ( this._size.minY + this._size.preview.height ); + + this._size.dragger = { + srcSidelength: 0 + , sidelength: 0 + , halfSidelength: 0 + , left: 0 + , top: 0 + }; + + //JC.log( this._size.left, this._size.top ); + } + + if( _width && !_height ){ + this._size = _width; + } + + return this._size; + } + + , realCoordinate: + function( _size ){ + var _r = []; + //JC.log( 'ImageCutter._model.realCoordinate', new Date().getTime() ); + if( _size ){ + var _p = this + , _percent = _size.img.width / _size.preview.width + , _left = ( _size.dragger.left - _size.left ) * _percent + , _top = ( _size.dragger.top - _size.top ) * _percent + , _sidelength = _size.dragger.srcSidelength * _percent + , _offset + ; + + _left = Math.ceil( _left ); + _top = Math.ceil( _top ); + _sidelength = Math.ceil( _sidelength ); + + _left < 0 && ( _left = 0 ); + _top < 0 && ( _top = 0 ); + + ( _left + _sidelength ) > _size.img.width && ( _left = _size.img.width - _sidelength ); + ( _top + _sidelength ) > _size.img.height && ( _top = _size.img.height - _sidelength ); + + if( _sidelength > _size.img.width ){ + _offset = _sidelength - _size.img.width; + _sidelength = _size.img.width; + _top !== 0 && ( _top += _offset ); + _left += _offset; + } + + if( _sidelength > _size.img.height ){ + _offset = _sidelength - _size.img.height; + _sidelength = _size.img.height; + _left !== 0 && ( _left += _offset ); + _top += _offset; + } + + _r.push( _left, _top, _sidelength, _sidelength, _size.img.width, _size.img.height ); + } + return _r; + } + + , cicCoordinateUpdateCb: function(){ return this.callbackProp( 'cicCoordinateUpdateCb' ); } + + , clean: + function(){ + var _p = this; + this._size ={ + selector: { width: _p.selector().prop( 'offsetWidth' ), height: _p.selector().prop( 'offsetHeight' ) } + , img: { width: 0, height: 0 } + , preview: { width: 0, height: 0 } + , left: 0 + , top: 0 + }; + + this.previewSelector() + && this.previewSelector().each( function(){ + $( this ).html( '' ); + }); + + this.coordinateSelector() && this.coordinateSelector().val( '' ); + this.imageUrlSelector() && this.imageUrlSelector().val( '' ); + + _p.ready( false ); + } + + , draggerList: + function(){ + if( !this._draggerList ){ + this._draggerList = + $( + JC.f.printf( + '{0}{1}{2}{3}{4}{5}{6}{7}{8}' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + , '' + ) + ); + this._draggerList.hide().appendTo( this.selector() ); + } + return this._draggerList; + } + + , btnTl: + function(){ + !this._btnTl && ( this.draggerList(), this._btnTl = this.selector().find( 'button.cic_btnTl' ) ); + return this._btnTl; + } + + , btnTc: + function(){ + !this._btnTc && ( this.draggerList(), this._btnTc = this.selector().find( 'button.cic_btnTc' ) ); + return this._btnTc; + } + + , btnTr: + function(){ + !this._btnTr && ( this.draggerList(), this._btnTr = this.selector().find( 'button.cic_btnTr' ) ); + return this._btnTr; + } + + , btnMl: + function(){ + !this._btnMl && ( this.draggerList(), this._btnMl = this.selector().find( 'button.cic_btnMl' ) ); + return this._btnMl; + } + + , btnMr: + function(){ + !this._btnMr && ( this.draggerList(), this._btnMr = this.selector().find( 'button.cic_btnMr' ) ); + return this._btnMr; + } + + , btnBl: + function(){ + !this._btnBl && ( this.draggerList(), this._btnBl = this.selector().find( 'button.cic_btnBl' ) ); + return this._btnBl; + } + + , btnBc: + function(){ + !this._btnBc && ( this.draggerList(), this._btnBc = this.selector().find( 'button.cic_btnBc' ) ); + return this._btnBc; + } + + , btnBr: + function(){ + !this._btnBr && ( this.draggerList(), this._btnBr = this.selector().find( 'button.cic_btnBr' ) ); + return this._btnBr; + } + + , maskList: + function(){ + if( !this._maskList ){ + this._maskList = + $( + JC.f.printf( + '{0}{1}{2}{3}' + , '
        ' + , '
        ' + , '
        ' + , '
        ' + ) + ); + this._maskList.hide().appendTo( this.selector() ); + } + return this._maskList; + } + + , maskLeft: + function(){ + !this._maskLeft && ( this.maskList(), this._maskLeft = this.selector().find( 'div.cic_maskLeft' ) ); + return this._maskLeft; + } + + , maskTop: + function(){ + !this._maskTop && ( this.maskList(), this._maskTop = this.selector().find( 'div.cic_maskTop' ) ); + return this._maskTop; + } + + , maskRight: + function(){ + !this._maskRight && ( this.maskList(), this._maskRight = this.selector().find( 'div.cic_maskRight' ) ); + return this._maskRight; + } + + , maskBottom: + function(){ + !this._maskBottom && ( this.maskList(), this._maskBottom = this.selector().find( 'div.cic_maskBottom' ) ); + return this._maskBottom; + } + + , dragMain: + function(){ + if( !this._dragMain ){ + this._dragMain = $( '
        ' ); + this._dragMain.hide().appendTo( this.selector() ); + } + return this._dragMain; + } + + , cicErrorBox: + function(){ + if( !this._cicErrorBox ){ + this._cicErrorBox = $( '
        ' ); + this._cicErrorBox.appendTo( this.selector() ); + } + return this._cicErrorBox; + } + + , coordinateSelector: function(){ return this.selectorProp( 'coordinateSelector' ); } + + , defaultCoordinate: + function(){ + var _p = this, _r = '', _v = this.attrProp( 'defaultCoordinate' ); + if( _v ){ + _r = _v.replace( /[^\d,\-]+/g, '' ); + if( _r ){ + _r = _r.split( ',' ); + $.each( _r, function( _ix, _item ){ + _r[ _ix ] = parseInt( _item, 10 ); + //JC.log( 'aaa', _item, _r[ _ix ] ); + }); + //JC.log( _r ); + } + } + return _r; + } + + , imageUrlSelector: function(){ return this.selectorProp( 'imageUrlSelector' ); } + }); + + JC.f.extendObject( ImageCutter.View.prototype, { + init: + function(){ + //JC.log( 'ImageCutter.View.init:', new Date().getTime() ); + var _p = this; + } + + , clean: + function(){ + this.selector().find( 'img' ).remove(); + this.selector().find( 'button' ).hide(); + + this._model.maskList().hide(); + this._model.cicErrorBox().hide(); + } + + , update: + function( _imgUrl ){ + if( !_imgUrl ) return; + var _p = this, _img = document.createElement( 'img' ), _jimg = $( _img ); + + _p.clean(); + + _jimg.on( 'load', function(){ + //JC.log( this.width, this.height ); + _p.trigger( ImageCutter.Model.IMAGE_LOAD, [ _jimg, this.width, this.height] ); + }); + + _jimg.on( 'error', function(){ + _p.trigger( ImageCutter.Model.LOAD_ERROR, [ _imgUrl ] ); + }); + + _jimg.on( 'mousedown', function( _evt ){ _evt.preventDefault(); return false; } ); + _img.src = _imgUrl; + } + + , initDragger: + function( _size ){ + this._model.dragMain(); + this._model.maskList() + + var _p = this + , _dragger = _p._model.draggerList() + , _sidelength = _size.preview.width > _size.preview.height ? _size.preview.height : _size.preview.width + , _sidelength = _sidelength / 2 > _p._model.minRectSidelength() ? _sidelength / 2 : _p._model.minRectSidelength() + , _sidelength = Math.ceil( _sidelength ) + , _sidelength = _sidelength > _p._model.minRectSidelength() ? _sidelength : _p._model.minRectSidelength() + , _btnSize = _p._model.btnTl().width() + , _srcSidelength = _sidelength + , _sidelength = _sidelength - _btnSize + , _halfSidelength = _sidelength / 2 + , _left = _size.left + ( _size.preview.width - _sidelength ) / 2 - _btnSize / 2 + , _top = _size.top + ( _size.preview.height - _sidelength ) / 2 - _btnSize / 2 + + ; + //JC.log( 'initDragger', _sidelength, new Date().getTime() ); + + _size.dragger = { + srcSidelength: _srcSidelength + , sidelength: _sidelength + , halfSidelength: _halfSidelength + , left: _left + , top: _top + }; + + _size = _p.processDefaultCoordinate( _size ); + + _p.updatePosition( _size ); + } + + , processDefaultCoordinate: + function( _size ){ + var _p = this + , _defaultCoordinate = _p._model.defaultCoordinate() + , _btnSize = _p._model.btnTl().width() + ; + + if( _defaultCoordinate.length ){ + var _srcSidelength = _size.dragger.srcSidelength + , _sidelength = _size.dragger.sidelength + , _halfSidelength = _size.dragger.halfSidelength + , _left = _size.left + , _top = _size.top + ; + + switch( _defaultCoordinate.length ){ + case 1: { + _srcSidelength = _defaultCoordinate[0]; + _left = _size.left + ( _size.preview.width - _srcSidelength ) / 2; + _top = _size.top + ( _size.preview.height - _srcSidelength ) / 2; + + break; + } + case 2: { + _left = _defaultCoordinate[0]; + _top = _defaultCoordinate[1]; + break; + } + case 3: { + _left = _defaultCoordinate[0] + _size.left; + _top = _defaultCoordinate[1] + _size.top; + _srcSidelength = _defaultCoordinate[2]; + break; + } + } + //JC.log( [ _left, _top, 'xxx', _p.selector().attr( 'defaultCoordinate' ) ] ); + + if( _srcSidelength > _size.preview.width || _srcSidelength > _size.preview.height ){ + _srcSidelength = _size.preview.width > _size.preview.height + ? _size.preview.height + : _size.preview.width; + _left = _size.left + ( _size.preview.width - _srcSidelength ) / 2; + _top = _size.top + ( _size.preview.height - _srcSidelength ) / 2; + } + + if( _left < _size.left + || ( _left + _srcSidelength ) > ( _size.left + _size.preview.width ) + || _top < _size.top + || ( _top + _srcSidelength ) > ( _size.top + _size.preview.height ) + ){ + _left = _size.left + ( _size.preview.width - _srcSidelength ) / 2; + _top = _size.top + ( _size.preview.height - _srcSidelength ) / 2; + } + + _sidelength = _srcSidelength - _btnSize; + _halfSidelength = _sidelength / 2; + + if( _srcSidelength < _p._model.minRectSidelength() ){ + _srcSidelength = _p._model.minRectSidelength(); + _sidelength = _srcSidelength - _btnSize; + _halfSidelength = _sidelength/ 2; + _left = _size.left + ( _p.preview.width - _srcSidelength ) / 2; + _top = _size.top + ( _p.preview.height - _srcSidelength ) / 2; + } + + _size.dragger = { + srcSidelength: _srcSidelength + , sidelength: _sidelength + , halfSidelength: _halfSidelength + , left: _left + , top: _top + }; + + } + + return _size; + } + + , updatePosition: + function( _size ){ + var _p = this; + //JC.log( 'updatePosition', new Date().getTime() ); + + _p.updateDragger( _size ); + _p.updateMask( _size ); + _p.updateDragMain( _size ); + + } + + , updateDragger: + function( _size ){ + var _p = this; + + _p._model.btnTl().css( { 'left': _size.dragger.left , 'top': _size.dragger.top } ); + _p._model.btnTc().css( { 'left': ( _size.dragger.left + _size.dragger.halfSidelength ), 'top': _size.dragger.top } ); + _p._model.btnTr().css( { 'left': ( _size.dragger.left + _size.dragger.sidelength ), 'top': _size.dragger.top } ); + + _p._model.btnMl().css( { 'left': _size.dragger.left + , 'top': ( _size.dragger.top + _size.dragger.halfSidelength) } ); + + _p._model.btnMr().css( { 'left': _size.dragger.left + _size.dragger.sidelength + , 'top': ( _size.dragger.top + _size.dragger.halfSidelength ) } ); + + _p._model.btnBl().css( { 'left': _size.dragger.left, 'top': _size.dragger.top + _size.dragger.sidelength } ); + + _p._model.btnBc().css( { 'left': _size.dragger.left + _size.dragger.halfSidelength + , 'top': _size.dragger.top + _size.dragger.sidelength} ); + + _p._model.btnBr().css( { 'left': _size.dragger.left + _size.dragger.sidelength + , 'top': _size.dragger.top + _size.dragger.sidelength } ); + + _p._model.draggerList().show(); + } + + , updateMask: + function( _size ){ + var _p = this + , _maskList = _p._model.maskList() + ; + + //JC.log( _size.dragger.left, _size.dragger.top, _size.dragger.srcSidelength ); + + _p._model.maskLeft().css( { + 'height': _size.dragger.srcSidelength + , 'width': _size.dragger.left + , 'top': _size.dragger.top + , 'left': 0 + }); + + _p._model.maskTop().css( { + 'height': _size.dragger.top + , 'width': _size.selector.width + , 'top': 0 + , 'left': 0 + }); + + _p._model.maskRight().css( { + 'left': _size.dragger.left + _size.dragger.srcSidelength + , 'top': _size.dragger.top + , 'width': _size.selector.width - _size.dragger.left - _size.dragger.srcSidelength + , 'height': _size.dragger.srcSidelength + }); + + _p._model.maskBottom().css( { + 'height': _size.selector.height - (_size.dragger.top + _size.dragger.srcSidelength ) + , 'width': _size.selector.width + , 'top': _size.dragger.top + _size.dragger.srcSidelength + , 'left': 0 + }); + + _maskList.show(); + } + + , updateDragMain: + function( _size ){ + var _p = this, _dragMain = _p._model.dragMain(); + + _dragMain.css({ + 'width': _size.dragger.srcSidelength + , 'height': _size.dragger.srcSidelength + , 'left': _size.dragger.left + , 'top': _size.dragger.top + }); + + _dragMain.show(); + } + + , initPreviewItems: + function(){ + var _p = this, _previewSelector = _p._model.previewSelector( true ); + if( !( _previewSelector && _previewSelector.length ) ) return; + if( !_p._model.ready() ){ + _previewSelector.each( function(){ + var _sp = $( this ), _img = _sp.find( 'img' ); + + if ( !_img.length ){ + _img = $( JC.f.printf( '', _p._model.imageUrl() ) ); + _img.appendTo( _sp ); + }else{ + _img.attr( 'src', _p._model.imageUrl() ); + } + }); + } + + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _p._model.size() ] ); + } + + , updatePreviewItems: + function( _size ){ + var _p = this + , _previewSelector = _p._model.previewSelector() + ; + + if( !_size ) return; + if( !( _previewSelector && _previewSelector.length ) ) return; + + _previewSelector.each( function(){ + var _sp = $( this ) + , _width = _sp.width() + , _img = _sp.find( 'img' ) + ; + + if( !( _width && _img.length ) ) return; + + var _width = _sp.width() + , _percent = _width / _size.dragger.srcSidelength + , _newWidth = Math.ceil( _size.preview.width * _percent ) + , _newHeight = Math.ceil( _size.preview.height * _percent ) + , _newLeft = Math.ceil( ( _size.dragger.left - _size.left ) * _percent ) + , _newTop = Math.ceil( ( _size.dragger.top - _size.top ) * _percent ) + ; + + _img.css( { + 'width': _newWidth + , 'height': _newHeight + , 'left': -_newLeft + , 'top': -_newTop + , 'max-width': _newWidth + , 'min-width': _newWidth + , 'max-height': _newHeight + , 'min-height': _newHeight + }); + + }); + } + + , moveLeft: + function(){ + if( !this._model.ready() ) return; + var _p = this, _size = _p._model.size(); + _size.dragger.left -= ImageCutter.moveStep; + _size.dragger.left < _size.left && ( _size.dragger.left = _size.left ); + _p.updatePosition( _size ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] ); + _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] ); + } + + , moveUp: + function(){ + if( !this._model.ready() ) return; + var _p = this, _size = _p._model.size(); + _size.dragger.top -= ImageCutter.moveStep; + _size.dragger.top < _size.top && ( _size.dragger.top = _size.top ); + _p.updatePosition( _size ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] ); + _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] ); + } + + , moveRight: + function(){ + if( !this._model.ready() ) return; + var _p = this, _size = _p._model.size(); + _size.dragger.left += ImageCutter.moveStep; + ( _size.dragger.left + _size.dragger.srcSidelength ) > ( _size.left + _size.preview.width ) + && ( _size.dragger.left = _size.left + _size.preview.width - _size.dragger.srcSidelength ); + _p.updatePosition( _size ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] ); + _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] ); + } + + , moveDown: + function(){ + if( !this._model.ready() ) return; + var _p = this, _size = _p._model.size(); + _size.dragger.top += ImageCutter.moveStep; + ( _size.dragger.top + _size.dragger.srcSidelength ) > ( _size.top + _size.preview.height ) + && ( _size.dragger.top = _size.top + _size.preview.height - _size.dragger.srcSidelength ); + _p.updatePosition( _size ); + _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] ); + _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] ); + } + + , sizeError: + function( _width, _height, _img, _isMax ){ + var _sidelength, _word; + if( _isMax ){ + _sidelength = this._model.maxImageSidelength(); + _word = '大'; + }else{ + _sidelength = this._model.minImageSidelength(); + _word = '小'; + } + this._model.cicErrorBox().show().html( + JC.f.printf( + '{5}

        图片实际宽高为: {2}, {3}

        可接受的最'+ _word +'宽高为: {0}, {1}

        {4}' + , _sidelength, _sidelength + , _width, _height + , '查看图片' + , '

        图片尺寸错误

        ' + ) + ); + } + + , previewError: + function( _width, _height, _img, _newSize ){ + this._model.cicErrorBox().show().html( + JC.f.printf( + '{5}

        图片实际宽高为: {2}, {3}

        ' + + '

        图片缩放后宽高为: {6}, {7}

        ' + + '

        缩放后可接受的最小宽高为: {0}, {1}

        {4}' + , this._model.minRectSidelength(), this._model.minRectSidelength() + , _width, _height + , '查看图片' + , '

        图片缩放比例错误

        ' + , _newSize.preview.width, _newSize.preview.height + ) + ); + } + + , imageLoadError: + function( _imgUrl){ + this._model.cicErrorBox().show().html( + JC.f.printf( '

        无法加载图片
        请检查图片路径和网络链接

        {0}

        ' + , _imgUrl + ) + ); + } + + }); + + ImageCutter.resizeTopLeft = + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _maxX = _di.size.dragger.left + _di.size.dragger.srcSidelength + , _maxY = _di.size.dragger.top + _di.size.dragger.srcSidelength + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: 0, y: -ImageCutter._positionPoint } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: 0, y: -ImageCutter._positionPoint } ) ) + , _distance = _srcDist - _curDist + , _sidelength = _di.size.dragger.srcSidelength + _distance + ; + + if( ( _maxY - _sidelength ) < _di.size.top ){ + _sidelength = _maxY - _di.size.top; + } + + if( ( _maxX - _sidelength ) < _di.size.left ){ + _sidelength = _maxX - _di.size.left; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _maxX - _sidelength + , top: _maxY - _sidelength + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeTopCenter = + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _maxX = _di.size.left + _di.size.preview.width + , _maxY = _di.size.dragger.top + _di.size.dragger.srcSidelength + , _midX = _di.size.dragger.left + ( _di.size.dragger.srcSidelength ) / 2 + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: _di.pageX, y: -ImageCutter._positionPoint } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: _di.pageX, y: -ImageCutter._positionPoint } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength + _distance + ; + + if( ( _maxY - _sidelength ) < _di.size.top ){ + _sidelength = _maxY - _di.size.top; + } + + if( ( _midX - _sidelength / 2 ) < _di.size.left ){ + _sidelength = ( _midX - _di.size.left ) * 2; + } + + if( ( _midX + _sidelength / 2 ) > _maxX ){ + _sidelength = ( _maxX - _midX ) * 2; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _midX - _sidelength / 2 + , top: _maxY - _sidelength + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeTopRight = + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _minX = _di.size.dragger.left + , _maxY = _di.size.dragger.top + _di.size.dragger.srcSidelength + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: ImageCutter._positionPoint, y: 0 } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: ImageCutter._positionPoint, y: 0 } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength + _distance + ; + + if( ( _maxY - _sidelength ) < _di.size.top ){ + _sidelength = _maxY - _di.size.top; + } + + if( ( _minX + _sidelength ) > ( _di.size.left + _di.size.preview.width ) ){ + _sidelength = ( _di.size.left + _di.size.preview.width ) - _minX; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _minX + , top: _maxY - _sidelength + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeMidLeft = + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _maxX = _di.size.dragger.left + _di.size.dragger.srcSidelength + , _midY = _di.size.dragger.top + _di.size.dragger.srcSidelength / 2 + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: -ImageCutter._positionPoint, y: _di.pageY } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: -ImageCutter._positionPoint, y: _di.pageY } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength + _distance + ; + + if( ( _midY - _sidelength / 2 ) < _di.size.top ){ + _sidelength = ( _midY - _di.size.top ) * 2; + } + + if( ( _midY + _sidelength / 2 ) > ( _di.size.top + _di.size.preview.height ) ){ + _sidelength = ( _di.size.top + _di.size.preview.height - _midY ) * 2; + } + + if( ( _maxX - _sidelength ) < _di.size.left ){ + _sidelength = _maxX - _di.size.left; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _maxX - _sidelength + , top: _midY - _sidelength / 2 + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeMidRight = + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _minX = _di.size.dragger.left + , _midY = _di.size.dragger.top + _di.size.dragger.srcSidelength / 2 + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: ImageCutter._positionPoint, y: _di.pageY } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: ImageCutter._positionPoint, y: _di.pageY } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength + _distance + ; + + if( ( _midY - _sidelength / 2 ) < _di.size.top ){ + _sidelength = ( _midY - _di.size.top ) * 2; + } + + if( ( _midY + _sidelength / 2 ) > ( _di.size.top + _di.size.preview.height ) ){ + _sidelength = ( _di.size.top + _di.size.preview.height - _midY ) * 2; + } + + if( ( _minX + _sidelength ) > ( _di.size.left + _di.size.preview.width ) ){ + _sidelength = _di.size.left + _di.size.preview.width - _minX; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _minX + , top: _midY - _sidelength / 2 + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeBottomLeft= + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _maxX = _di.size.dragger.left + _di.size.dragger.srcSidelength + , _maxY = _di.size.dragger.top + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: ImageCutter._positionPoint, y: 0 } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: ImageCutter._positionPoint, y: 0 } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength - _distance + ; + + if( ( _maxY + _sidelength ) > ( _di.size.top + _di.size.preview.height ) ){ + _sidelength = ( _di.size.top + _di.size.preview.height ) - _maxY; + } + + if( ( _maxX - _sidelength ) < _di.size.left ){ + _sidelength = _maxX - _di.size.left; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _maxX - _sidelength + , top: _maxY + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeBottomCenter= + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _minY = _di.size.dragger.top + , _midX = _di.size.dragger.left + _di.size.dragger.srcSidelength / 2 + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: _di.pageX, y: -ImageCutter._positionPoint } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: _di.pageX, y: -ImageCutter._positionPoint } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength - _distance + ; + + if( ( _minY + _sidelength ) > ( _di.size.top + _di.size.preview.height ) ){ + _sidelength = ( _di.size.top + _di.size.preview.height ) - _minY; + } + + if( ( _midX - _sidelength / 2 ) < _di.size.left ){ + _sidelength = ( _midX - _di.size.left ) * 2; + } + + if( ( _midX + _sidelength / 2 ) > ( _di.size.left + _di.size.preview.width ) ){ + _sidelength = ( _di.size.left + _di.size.preview.width - _midX ) * 2; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _midX - _sidelength / 2 + , top: _minY + }; + + _p.updatePosition( _di.tmpSize ); + }; + + ImageCutter.resizeBottomRight= + function( _di, _posX, _posY, _evt ){ + if( !_di ) return; + var _p = _di.ins + , _minX = _di.size.dragger.left + , _minY = _di.size.dragger.top + , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY } + , { x: 0, y: -ImageCutter._positionPoint } ) ) + , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY } + , { x: 0, y: -ImageCutter._positionPoint } ) ) + , _distance = ( _srcDist - _curDist ) + , _sidelength = _di.size.dragger.srcSidelength - _distance + ; + + if( ( _minX + _sidelength ) > ( _di.size.left + _di.size.preview.width ) ){ + _sidelength = ( _di.size.left + _di.size.preview.width ) - _minX; + } + + if( ( _minY + _sidelength ) > ( _di.size.top + _di.size.preview.height ) ){ + _sidelength = ( _di.size.top + _di.size.preview.height ) - _minY; + } + + _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength; + + _di.tmpSize.dragger = { + srcSidelength: _sidelength + , sidelength: _sidelength - _di.btnSidelength + , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2 + , left: _minX + , top: _minY + }; + + _p.updatePosition( _di.tmpSize ); + }; + + /** + * 初始化实例时触发的事件 + * @event ImageCutterInited + */ + /** + * 初始化预览时触发的事件 + * @event CICInitPreview + */ + /** + * 拖动完成时触发的事件 + * @event CICDragDone + */ + /** + * 更新拖动块时触发的事件 + * @event CICUpdateDragger + */ + /** + * 更新预览时触发的事件 + * @event CICUpdatePreview + */ + /** + * 更新坐标值时触发的事件 + * @event CICUpdateCoordinate + */ + /** + * 图片加载完毕时触发的事件 + * @event CICImageLoad + */ + /** + * 图片加载失败时触发的事件 + * @event CICImageLoadError + */ + /** + * 发生错误时触发的事件 + * @event CICError + */ + /** + * 图片大小不符合要求时触发的事件 + * @event CICSizeError + */ + /** + * 图片缩放后大小不符合要求时触发的事件 + * @event CICPreviewError + */ + /** + * 按比例缩放图片 + *
        返回: { width: int, height: int } + * @param {int} _w + * @param {int} _h + * @param {int} _newWidth + * @param {int} _newHeight + * @return {object} width, height + */ + function sizeZoom( _w, _h, _newWidth, _newHeight ){ + var w, h; + + if( _w > _newWidth && ( _h < _w )){ + w = _newWidth; + h = _h - ( _h / ( _w / ( _w - _newWidth ) ) ); + }else if( _h > _newHeight && ( _h > _w ) ){ + w = _w - ( _w / ( _h / ( _h - _newHeight ) ) ); + h = _newHeight; + }else{ + w = _newWidth; + h = _newHeight; + } + return { 'width': w, 'height': h }; + } + /** + * 计算两个坐标点之间的距离 + */ + function pointDistance( _p1, _p2 ){ + var _dx = _p2.x - _p1.x + , _dy = _p2.y - _p1.y + , _dist = Math.sqrt( _dx * _dx + _dy * _dy ); + ; + return _dist; + } + /** + * 从长度和角度求坐标点 + */ + function distanceAngleToPoint( _distance, _angle){ + var _radian = _angle * Math.PI / 180; + return { + x: parseInt( Math.cos( _radian ) * _distance ) + , y: parseInt( Math.sin( _radian ) * _distance ) + } + } + + _jdoc.ready( function(){ + _jbody = $( 'body' ); + ImageCutter._defaultCursor = _jbody.css( 'cursor' ); + ImageCutter.autoInit && ImageCutter.init(); + _jwin.on( 'keydown', ImageCutter.defaultKeydown ); + }); + + return JC.ImageCutter; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/ImageCutter/_demo/data/gd.php b/comps/ImageCutter/_demo/data/gd.php new file mode 100755 index 000000000..98f0c8651 --- /dev/null +++ b/comps/ImageCutter/_demo/data/gd.php @@ -0,0 +1,41 @@ + diff --git a/comps/ImageCutter/_demo/data/uploads/.comments/v2.jpg.xml b/comps/ImageCutter/_demo/data/uploads/.comments/v2.jpg.xml new file mode 100755 index 000000000..ac2fb01e6 --- /dev/null +++ b/comps/ImageCutter/_demo/data/uploads/.comments/v2.jpg.xml @@ -0,0 +1,7 @@ + + + + 4332-2161 + + + diff --git a/comps/ImageCutter/_demo/data/uploads/h1_600x415.jpg b/comps/ImageCutter/_demo/data/uploads/h1_600x415.jpg new file mode 100755 index 000000000..16bf1a8b8 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/h1_600x415.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/h2_600x415.jpg b/comps/ImageCutter/_demo/data/uploads/h2_600x415.jpg new file mode 100755 index 000000000..0485d0a6a Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/h2_600x415.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/h_1680x1050.jpg b/comps/ImageCutter/_demo/data/uploads/h_1680x1050.jpg new file mode 100755 index 000000000..c68adb223 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/h_1680x1050.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/r1_1048x1048.jpg b/comps/ImageCutter/_demo/data/uploads/r1_1048x1048.jpg new file mode 100755 index 000000000..95578f321 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/r1_1048x1048.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/r2_800x800.jpg b/comps/ImageCutter/_demo/data/uploads/r2_800x800.jpg new file mode 100755 index 000000000..5dd5ac1b5 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/r2_800x800.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/r_768x768.jpg b/comps/ImageCutter/_demo/data/uploads/r_768x768.jpg new file mode 100755 index 000000000..66be7c6bb Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/r_768x768.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/s1_40x40.jpg b/comps/ImageCutter/_demo/data/uploads/s1_40x40.jpg new file mode 100755 index 000000000..ef90ff2c4 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/s1_40x40.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/s2_50x400.jpg b/comps/ImageCutter/_demo/data/uploads/s2_50x400.jpg new file mode 100755 index 000000000..4698495f7 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/s2_50x400.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/s3_50x50.jpg b/comps/ImageCutter/_demo/data/uploads/s3_50x50.jpg new file mode 100755 index 000000000..740e47411 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/s3_50x50.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/s4_100x100.jpg b/comps/ImageCutter/_demo/data/uploads/s4_100x100.jpg new file mode 100755 index 000000000..91449bbeb Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/s4_100x100.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/s5_60x60.jpg b/comps/ImageCutter/_demo/data/uploads/s5_60x60.jpg new file mode 100755 index 000000000..a94fb8351 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/s5_60x60.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/s6_120x120.jpg b/comps/ImageCutter/_demo/data/uploads/s6_120x120.jpg new file mode 100755 index 000000000..23ce8ad62 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/s6_120x120.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/v1_411x615.jpg b/comps/ImageCutter/_demo/data/uploads/v1_411x615.jpg new file mode 100755 index 000000000..3ef272b15 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/v1_411x615.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/v2_474x615.jpg b/comps/ImageCutter/_demo/data/uploads/v2_474x615.jpg new file mode 100755 index 000000000..61116e135 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/v2_474x615.jpg differ diff --git a/comps/ImageCutter/_demo/data/uploads/v_400x615.jpg b/comps/ImageCutter/_demo/data/uploads/v_400x615.jpg new file mode 100755 index 000000000..033adbae5 Binary files /dev/null and b/comps/ImageCutter/_demo/data/uploads/v_400x615.jpg differ diff --git a/comps/ImageCutter/_demo/demo.defaultCoordinate.html b/comps/ImageCutter/_demo/demo.defaultCoordinate.html new file mode 100755 index 000000000..b1234f76f --- /dev/null +++ b/comps/ImageCutter/_demo/demo.defaultCoordinate.html @@ -0,0 +1,248 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        水平较大
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +

        normal

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +

        defaultCoordinate="-20,0", rect left outrange

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +

        defaultCoordinate="0,-20", rect left outrange

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +

        defaultCoordinate="200", rect size outrange

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +

        defaultCoordinate="150"

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +

        defaultCoordinate="10, 10, 150"

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +

        defaultCoordinate="10000"

        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + + diff --git a/comps/ImageCutter/_demo/demo.maxImageSidelength.html b/comps/ImageCutter/_demo/demo.maxImageSidelength.html new file mode 100755 index 000000000..b7b746484 --- /dev/null +++ b/comps/ImageCutter/_demo/demo.maxImageSidelength.html @@ -0,0 +1,186 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        maxImageSidelength = 100, 图片最大宽高
        +
        + + + + + + + + + + + + + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + + + + diff --git a/comps/ImageCutter/_demo/demo.minImageSidelength.html b/comps/ImageCutter/_demo/demo.minImageSidelength.html new file mode 100755 index 000000000..68079138a --- /dev/null +++ b/comps/ImageCutter/_demo/demo.minImageSidelength.html @@ -0,0 +1,186 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        minImageSidelength = 100, 缩放后最小宽高
        +
        + + + + + + + + + + + + + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + + + + diff --git a/comps/ImageCutter/_demo/demo.minRectSidelength.html b/comps/ImageCutter/_demo/demo.minRectSidelength.html new file mode 100755 index 000000000..c6b754842 --- /dev/null +++ b/comps/ImageCutter/_demo/demo.minRectSidelength.html @@ -0,0 +1,186 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        minRectSidelength = 100, 缩放后最小宽高
        +
        + + + + + + + + + + + + + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + + + + diff --git a/comps/ImageCutter/_demo/demo.normal.html b/comps/ImageCutter/_demo/demo.normal.html new file mode 100755 index 000000000..e494a4b2a --- /dev/null +++ b/comps/ImageCutter/_demo/demo.normal.html @@ -0,0 +1,239 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        水平较大
        +
        + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + +
        垂直较大
        +
        + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        + +
        大小一致
        +
        + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        + +
        图片缩放后过小
        +
        + + + + +
        +
        +
        +
        +
        + +
        图片原始尺寸过小
        +
        + + + + +
        +
        +
        +
        +
        + +
        + +
        +
        {
        +    "minX": 0, 
        +    "dragger": {
        +        "srcSidelength": 94, 
        +        "sidelength": 84, 
        +        "left": 103, 
        +        "top": 103, 
        +        "halfSidelength": 42
        +    }, 
        +    "maxX": 300, 
        +    "top": 56, 
        +    "left": 0, 
        +    "width": 1680, 
        +    "height": 1050, 
        +    "selector": {
        +        "width": 300, 
        +        "height": 300
        +    }, 
        +    "zoom": {
        +        "width": 300, 
        +        "height": 188
        +    }, 
        +    "minY": 56, 
        +    "img": {
        +        "width": 1680, 
        +        "height": 1050
        +    }, 
        +    "maxY": 244
        +}
        +
        + + + + + diff --git a/comps/ImageCutter/_demo/demo.preview.html b/comps/ImageCutter/_demo/demo.preview.html new file mode 100755 index 000000000..d09a0859c --- /dev/null +++ b/comps/ImageCutter/_demo/demo.preview.html @@ -0,0 +1,201 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        水平较大
        +
        + + + + + + + + + + + + + + + + + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        + + + + + diff --git a/comps/ImageCutter/_demo/demo.update.html b/comps/ImageCutter/_demo/demo.update.html new file mode 100755 index 000000000..7bf39324e --- /dev/null +++ b/comps/ImageCutter/_demo/demo.update.html @@ -0,0 +1,291 @@ + + + + +Open JQuery Components Library - suches + + + + + + + +

        JC.ImageCutter 示例 - 动态更新

        +
        坐标对应: 0, 0, 0, 0, 0, 0 = x, y, rect width, rect height, img width, img height
        + +
        +
        +
        + + + + + +
        +
        +
        + + 生成图片 +
        +
        +
        +
        +
        +
        +
        +
        + + + + + + + + + + + + + + + + + +
        +
        +
        +
        + +
        + +
        +
        imageUrl="data/uploads/h1_600x415.jpg"
        +previewSelector="(tr div.js_previewItem"
        +coordinateSelector="(td input.js_coordinate"
        +imageUrlSelector="(td input.js_imageUrl"
        +cicCoordinateUpdateCb="cicCoordinateUpdateCb"
        +minImageSidelength="100"
        +maxImageSidelength="1000"
        +minRectSidelength="100"
        +
        + + + + + diff --git a/comps/ImageCutter/_demo/index.php b/comps/ImageCutter/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/ImageCutter/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/ImageCutter/_demo/tags b/comps/ImageCutter/_demo/tags new file mode 100755 index 000000000..204ece48e --- /dev/null +++ b/comps/ImageCutter/_demo/tags @@ -0,0 +1,21 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +coordinate data/gd.php /^ $coordinate = isset( $_REQUEST[ 'coordinate' ] ) ? $_REQUEST[ 'coordinate' ] : '';$/;" v +coordinateUpdateCb demo.defaultCoordinate.html /^ function coordinateUpdateCb( _corAr, _imgUrl ){$/;" f +coordinateUpdateCb demo.normal.html /^ function coordinateUpdateCb( _corAr, _imgUrl ){$/;" f +coordinateUpdateCb demo.preview.html /^ function coordinateUpdateCb( _corAr, _imgUrl ){$/;" f +corAr data/gd.php /^ $corAr = explode( ',', $coordinate );$/;" v +filename data/gd.php /^ $filename = isset( $_REQUEST[ 'filename' ] ) ? $_REQUEST[ 'filename' ] : '';$/;" v +height data/gd.php /^ $height = (int)$corAr[3];$/;" v +image data/gd.php /^ $image = imagecreatefromjpeg( $path );$/;" v +image_p data/gd.php /^ $image_p = imagecreatetruecolor( $width, $height );$/;" v +left data/gd.php /^ $left = (int)$corAr[0];$/;" v +path data/gd.php /^ $path = "uploads\/$filename";$/;" v +sheight data/gd.php /^ $sheight = (int)$corAr[5];$/;" v +swidth data/gd.php /^ $swidth = (int)$corAr[4];$/;" v +top data/gd.php /^ $top = (int)$corAr[1];$/;" v +width data/gd.php /^ $width = (int)$corAr[2];$/;" v diff --git a/comps/ImageCutter/index.php b/comps/ImageCutter/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/ImageCutter/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/ImageCutter/res/default/style.css b/comps/ImageCutter/res/default/style.css new file mode 100755 index 000000000..1e6f78d52 --- /dev/null +++ b/comps/ImageCutter/res/default/style.css @@ -0,0 +1,94 @@ +.js_compImageCutter { + position: relative; + + width: 300px; + height: 300px; + overflow: hidden; + + background: #ccc; + text-align: center; + vertical-align: middle; +} + +.js_compImageCutter img { + position: absolute; +} + +.js_compImageCutter .cic_btn { + background: #0a7cca; + width: 10px; + height: 10px; + overflow: hidden; + margin: 0px!important; + padding: 0px!important; + border: none!important; + position: absolute; + display: none; +} + +.js_compImageCutter .cic_btnTl { + cursor: nw-resize; +} + +.js_compImageCutter .cic_btnTc { + cursor: n-resize; +} + +.js_compImageCutter .cic_btnTr { + cursor: ne-resize; +} + +.js_compImageCutter .cic_btnMl { + cursor: w-resize; +} + +.js_compImageCutter .cic_btnMr { + cursor: e-resize; +} + +.js_compImageCutter .cic_btnBl { + cursor: sw-resize; +} + +.js_compImageCutter .cic_btnBc { + cursor: s-resize; +} + +.js_compImageCutter .cic_btnBr { + cursor: se-resize; +} + +.js_compImageCutter .cic_mask { + position: absolute; + background: #000; + opacity: .35; + filter: alpha( opacity = 35 ); +} + +.js_compImageCutter .cic_dragMain { + position: absolute; + background: #fff; + opacity: .0; + filter: alpha( opacity = 0 ); +} + +.js_compImageCutter .cic_move { + cursor: move!important; +} + +.js_compImageCutter .CIC_ERROR { + margin-top: 80px; + color: red !important; + vertical-align: middle; + display: none; +} + +.cic_previewItem { + position: relative; + overflow: hidden; + border: 1px solid #ccc; +} + +.cic_previewItem img { + position: absolute; +} diff --git a/comps/ImageCutter/res/default/style.html b/comps/ImageCutter/res/default/style.html new file mode 100755 index 000000000..c359362e4 --- /dev/null +++ b/comps/ImageCutter/res/default/style.html @@ -0,0 +1,47 @@ + + + + +Open JQuery Components Library - suches + + + +

        示例

        + +
        +
        +
        +
        +
        + + + + diff --git a/comps/ImageCutter/res/index.php b/comps/ImageCutter/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/ImageCutter/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/LunarCalendar/LunarCalendar.default.js b/comps/LunarCalendar/LunarCalendar.default.js new file mode 100755 index 000000000..861414dc1 --- /dev/null +++ b/comps/LunarCalendar/LunarCalendar.default.js @@ -0,0 +1,1153 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ + /// + /// TODO: 添加事件响应机制 + /// + JC.LunarCalendar = window.LunarCalendar = LunarCalendar; + /** + * 农历日历组件 + *
        全局访问请使用 JC.LunarCalendar 或 LunarCalendar + *

        require: + * jQuery + * , JC.BaseMVC + *

        + *

        JC Project Site + * | API docs + * | demo link

        + *

        + * DOM 加载完毕后 + *
        会自动初始化页面可识别的node, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar + *
        Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 JC.LunarCalendar.init( _selector ); + *

        + * + *

        可用的 HTML attribute

        + *
        + *
        clcDate = date string
        + *
        设置日历的默认日期
        + * + *
        minvalue = date string
        + *
        设置日历的有效最小选择范围, 格式YYYY-mm-dd
        + * + *
        maxvalue = date string
        + *
        设置日历的有效最大选择范围, 格式YYYY-mm-dd
        + * + *
        hidecontrol = bool, default = false
        + *
        是否隐藏日历将操作控件
        + * + *
        nopreviousfestivals = bool, default = false
        + *
        不显示上个月的节日
        + * + *
        nonextfestivals = bool, default = false
        + *
        不显示下个月的节日
        + * + *
        clcSelectedItemCb = function, window变量域
        + *
        选择日期时触发的回调 +
        function clcSelectedItemCb1( _date, _td, _a ){
        +    var _ins = this;
        +    JC.log( _date );
        +}
        + *
        + *
        + * + * @namespace JC + * @class LunarCalendar + * @constructor + * @param {selector} _selector 指定要显示日历的选择器, 如果不显示指定该值, 默认为 document.body + * @param {date} _date 日历的当前日期, 如果不显示指定该值, 默认为当天 + * @version dev 0.1 + * @author qiushaowei | 75 team + * @date 2013-06-13 + */ + function LunarCalendar( _selector, _date ){ + _selector && ( _selector = $(_selector) ); + !(_selector && _selector.length) && ( _selector = $(document.body) ); + !_date && ( _date = new Date() ); + + if( JC.BaseMVC.getInstance( _selector, LunarCalendar ) ) + return JC.BaseMVC.getInstance( _selector, LunarCalendar ); + + JC.BaseMVC.getInstance( _selector, LunarCalendar, this ); + + JC.log( 'LunarCalendar.constructor' ); + /** + * LunarCalendar 的数据模型对象 + * @property _model + * @type JC.LunarCalendar.Model + * @private + */ + this._model = new Model( _selector, _date ); + /** + * LunarCalendar 的视图对像 + * @property _view + * @type JC.LunarCalendar.View + * @private + */ + this._view = new View( this._model ); + + this._init(); + } + LunarCalendar.Model = Model; + LunarCalendar.View = View; + /** + * 自定义日历组件模板 + *

        默认模板为JC.LunarCalendar.Model#tpl

        + *

        如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板

        + * @property tpl + * @type {string} + * @default empty + * @static + */ + LunarCalendar.tpl; + /** + * 设置是否在 dom 加载完毕后, 自动初始化所有日期控件 + * @property autoinit + * @default true + * @type {bool} + * @static + + */ + LunarCalendar.autoInit = true + /** + * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年 + * @property defaultYearSpan + * @type {int} + * @default 20 + * @static + + */ + LunarCalendar.defaultYearSpan = 20 + /** + * 从所有的LunarCalendar取得当前选中的日期 + *
        如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined + * @method getSelectedItemGlobal + * @static + * @return {Object|undefined} 如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td } + */ + LunarCalendar.getSelectedItemGlobal = + function(){ + var _r; + $('div.UXCLunarCalendar table.UTableBorder td.cur a').each( function(){ + var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm ); + _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') }; + return false; + }); + if( !_r ){ + $('div.UXCLunarCalendar table.UTableBorder td.today a').each( function(){ + var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm ); + _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') }; + return false; + }); + } + return _r; + }; + /** + * 初始化可识别的 LunarCalendar 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of LunarCalendarInstance} + */ + LunarCalendar.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector && _selector.length ){ + if( _selector.hasClass( 'js_LunarCalendar' ) ){ + _r.push( new LunarCalendar( _selector ) ); + }else{ + _selector.find( 'div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar' ).each( function(){ + _r.push( new LunarCalendar( this ) ); + }); + } + } + return _r; + }; + /** + * 从所有的LunarCalendar取得当前选中日期的日期对象 + *
        如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined + * @method getSelectedDateGlobal + * @static + * @return {date|undefined} + */ + LunarCalendar.getSelectedDateGlobal = + function(){ + var _r, _tmp = LunarCalendar.getSelectedItemGlobal(); + if( _tmp && _tmp.date ) _r = _tmp.date; + return _r; + }; + /** + * 从时间截获取选择器对象 + * @method getItemByTimestamp + * @static + * @param {int} _tm 时间截, 如果时间截少于13位, 将自动补0到13位, ps: php时间截为10位 + * @return {selector|undefined} td selector, 如果 td class unable 不可选, 将忽略 + */ + LunarCalendar.getItemByTimestamp = + function( _tm ){ + var _r, _tmp; + if( _tm ){ + _tm += ''; + (_tm.length < 13) && (_tm += new Array( 13 - _tm.length + 1 ).join('0')); + $('div.UXCLunarCalendar table.UTableBorder td a[date='+_tm+']').each( function(){ + _tmp = $(this).parent('td'); + if( !_tmp.hasClass('unable') ){ + _r = _tmp; + return false; + } + }); + } + return _r; + }; + /** + * 添加或者清除工作日样式 + * @method workday + * @static + * @param {selector} _td 要设置为工作日状态的 td + * @param {any} _customSet 如果 _customSet 为 undefined, 将设为工作日. + * 如果 _customSet 非 undefined, 那么根据真假值判断清除工作日/添加工作日 + */ + LunarCalendar.workday = + function( _td, _customSet ){ + _td = $( _td ); + if( typeof _customSet != 'undefined' ){ + _customSet && _td.removeClass( 'xiuxi' ).addClass( 'shangban' ); + !_customSet && _td.removeClass( 'shangban' ); + }else _td.removeClass( 'xiuxi' ).addClass( 'shangban' ); + }; + /** + * 判断 td 是否为工作日状态 + * @method isWorkday + * @static + * @param {selector} _td + * @return {bool} + */ + LunarCalendar.isWorkday = + function( _td ){ + _td = $( _td ); + return _td.hasClass( 'shangban' ); + }; + /** + * 添加或者清除假日样式 + * @method holiday + * @static + * @param {selector} _td 要设置为假日状态的 td + * @param {any} _customSet 如果 _customSet 为 undefined, 将设为假日. + * 如果 _customSet 非 undefined, 那么根据真假值判断清除假日/添加假日 + */ + LunarCalendar.holiday = + function( _td, _customSet ){ + _td = $( _td ); + if( typeof _customSet != 'undefined' ){ + _customSet && _td.addClass( 'xiuxi' ).removeClass( 'shangban' ); + !_customSet && _td.removeClass( 'xiuxi' ); + }else _td.addClass( 'xiuxi' ).removeClass( 'shangban' ); + }; + /** + * 判断 td 是否为假日状态 + * @method isHoliday + * @static + * @param {selector} _td + * @return {bool} + */ + LunarCalendar.isHoliday = + function( _td ){ + _td = $( _td ); + return _td.hasClass( 'xiuxi' ); + }; + /** + * 添加或者清除注释 + * @method comment + * @static + * @param {selector} _td 要设置注释的 td + * @param {string|bool} _customSet 如果 _customSet 为 undefined, 将清除注释. + * 如果 _customSet 为 string, 将添加注释 + */ + LunarCalendar.comment = + function( _td, _customSet ){ + var _comment; + _td = $( _td ); + + if( typeof _customSet == 'string' ){ + _comment = _customSet; + } + + if( typeof _comment != 'undefined' ){ + _td.addClass( 'zhushi' ); + LunarCalendar.commentTitle( _td, _comment ); + _td.find('a').attr('comment', _comment); + }else{ + _td.removeClass( 'zhushi' ); + _td.find('a').removeAttr('comment'); + LunarCalendar.commentTitle( _td ); + } + }; + /** + * 判断 td 是否为注释状态 + * @method isComment + * @static + * @param {selector} _td + * @return {bool} + */ + LunarCalendar.isComment = + function( _td ){ + _td = $( _td ); + return _td.hasClass( 'zhushi' ); + }; + /** + * 返回 td 的注释 + * @method getComment + * @static + * @param {selector} _td + * @return {string} + */ + LunarCalendar.getComment = + function( _td ){ + var _r = ''; + if( _td && _td.length ){ + _r = _td.find('a').attr('comment') || ''; + } + return _r; + }; + /** + * 用于分隔默认title和注释的分隔符 + * @property commentSeparator + * @type string + * @default ==========comment========== + * @static + */ + LunarCalendar.commentSeparator = '==========comment=========='; + /** + * 把注释添加到 a title 里 + * @method commentTitle + * @static + * @param {selector} _td 要设置注释的 a 父容器 td + * @param {string|undefined} _title 如果 _title 为真, 将把注释添加到a title里. + * 如果 _title 为假, 将从 a title 里删除注释 + */ + LunarCalendar.commentTitle = + function( _td, _title ){ + var _a = _td.find( 'a' ), _hasDataTitle = _a.is( '[datatitle]' ); + + if( _title ){ + _title = LunarCalendar.commentSeparator + '\n'+_title; + if( _hasDataTitle ){ + _title = _a.attr('datatitle') + '\n' + _title; + } + _a.attr('title', _title); + }else{ + if( _hasDataTitle ){ + _a.attr('title', _a.attr('datatitle') ); + }else{ + _a.removeAttr('title'); + } + } + }; + /** + * 从JSON数据更新日历状态( 工作日, 休息日, 注释 ) + *
        注意, 该方法更新页面上所有的 LunarCalendar + * @method updateStatus + * @static + * @param {Object} _data { phpTimestamp:{ dayaction: 0|1|2, comment: string}, ... } + *
              
        +     *          dayaction: 
        +     *          0: delete workday/holiday
        +     *          1: workday
        +     *          2: holiday
        +     *
        + * @example + * LunarCalendar.updateStatus( { + "1369843200": { + "dayaction": 2, + "comment": "dfdfgdsfgsdfgsdg'\"'asdf\"\"'sdf" + }, + "1370966400": { + "dayaction": 0, + "comment": "asdfasdfsa" + }, + "1371139200": { + "dayaction": 1 + }, + "1371225600": { + "dayaction": 0, + "comment": "dddd" + } + }); + */ + LunarCalendar.updateStatus = + function( _data ){ + if( !_data ) return; + $('div.UXCLunarCalendar').each( function(){ + var _p = $(this), _ins = JC.BaseMVC.getInstance( _p, LunarCalendar ), _tmp; + var _min = 0, _max = 3000000000000; + if( _ins.getContainer().is('[nopreviousfestivals]') ){ + _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime(); + } + if( _ins.getContainer().is('[nonextfestivals]') ){ + _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime(); + } + //JC.log( _ins, _min, _max ); + + var _k, _item, _finalk, _itema, _itemtd; + for( var _k in _data ){ + _item = _data[_k]; + _finalk = _k + ''; + _finalk.length < 13 && (_finalk += new Array( 13 - _finalk.length + 1 ).join('0')); + if( !(_finalk >= _min && _finalk < _max) ) continue; + + _itema = _p.find('table.UTableBorder td > a[date='+_finalk+']'); + if( !_itema.length ) continue; + _itemtd = _itema.parent( 'td' ); + + if( 'dayaction' in _item ){ + switch( _item.dayaction ){ + case 1: + { + LunarCalendar.workday( _itemtd ); + break; + } + + case 2: + { + LunarCalendar.holiday( _itemtd ); + break; + } + + default: + { + LunarCalendar.workday(_itemtd, 0); + LunarCalendar.holiday(_itemtd, 0); + break; + } + } + } + + if( 'comment' in _item ){ + LunarCalendar.comment( _itemtd, _item['comment'] ); + } + } + }); + }; + + LunarCalendar.prototype = { + /** + * LunarCalendar 内部初始化 + * @method _init + * @private + */ + _init: + function(){ + var _p = this; + + $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ + _p.on( _evtName, _cb ); + }); + + $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ + var _data = JC.f.sliceArgs( arguments ).slice( 2 ); + _p.trigger( _evtName, _data ); + }); + + _p.on( 'CLCSelectedItem', function( _evt, _date, _td, _a ){ + //JC.log( _date, _td, _a ); + _p._model.clcSelectedItemCb() + && _p._model.clcSelectedItemCb().call( _p, _date, _td, _a ); + }); + + _p._model.init(); + _p._view.init(); + + _p._view.layout.data( Model._instanceName, _p ); + + return this; + } + /** + * 更新日历视图为自定义的日期 + * @method update + * @param {date} _date 更新日历视图为 _date 所在日期的月份 + */ + , update: + function( _date ){ + if( !_date ) return; + this._view.initLayout( _date ); + } + /** + * 显示下一个月的日期 + * @method nextMonth + */ + , nextMonth: + function(){ + var _date = this._model.getDate().date; + _date.setMonth( _date.getMonth() + 1 ); + this._view.initLayout( _date ); + } + /** + * 显示上一个月的日期 + * @method preMonth + */ + , preMonth: + function(){ + var _date = this._model.getDate().date; + _date.setMonth( _date.getMonth() - 1 ); + this._view.initLayout( _date ); + } + /** + * 显示下一年的日期 + * @method nextYear + */ + , nextYear: + function(){ + var _date = this._model.getDate().date; + _date.setFullYear( _date.getFullYear() + 1 ); + this._view.initLayout( _date ); + } + /** + * 显示上一年的日期 + * @method preYear + */ + , preYear: + function(){ + var _date = this._model.getDate().date; + _date.setFullYear( _date.getFullYear() - 1 ); + this._view.initLayout( _date ); + } + /** + * 获取默认时间对象 + * @method getDate + * @return {date} + */ + , getDate: function(){ return this._model.getDate().date; } + /** + * 获取所有的默认时间对象 + * @method getAllDate + * @return {object} { date: 默认时间, minvalue: 有效最小时间 + * , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 } + */ + , getAllDate: function(){ return this._model.getDate(); } + /** + * 获取当前选中的日期, 如果用户没有显式选择, 将查找当前日期, 如果两者都没有的话返回undefined + * @method getSelectedDate + * @return {date} + */ + , getSelectedDate: function(){ + var _r; + this._view.layout.find( 'td.cur a').each( function(){ + var _tm = $(this).attr('date'); + _r = new Date(); + _r.setTime( _tm ); + return false; + }); + if( !_r ){ + this._view.layout.find( 'td.today a').each( function(){ + var _tm = $(this).attr('date'); + _r = new Date(); + _r.setTime( _tm ); + return false; + }); + } + return _r; + } + /** + * 获取初始化日历的选择器对象 + * @method getContainer + * @return selector + */ + , getContainer: function(){ return this._model.container; } + /** + * 获取日历的主选择器对象 + * @method getLayout + * @return selector + */ + , getLayout: function(){ return this._view.layout; } + /** + * 判断日历是否隐藏操作控件 + * @method isHideControl + * @return bool + */ + , isHideControl: function(){ return this._model.hideControl; } + /** + * 使用 jquery on 绑定事件 + * @method {string} on + * @param {string} _evtName + * @param {function} _cb + * @return BaseMVCInstance + */ + , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;} + /** + * 使用 jquery trigger 触发绑定事件 + * @method {string} trigger + * @param {string} _evtName + * @return BaseMVCInstance + */ + , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;} + } + /** + * 选择日期时触发的事件 + * @event CLCSelectedItem + */ + /** + * LunarCalendar 视图类 + * @namespace JC.LunarCalendar + * @class View + * @constructor + * @param {JC.LunarCalendar.Model} _model + */ + function View( _model ){ + /** + * LunarCalendar model 对象 + * @property _model + * @type JC.LunarCalendar.Model + * @private + */ + this._model = _model; + /** + * LunarCalendar 的主容器 + * @property layout + * @type selector + */ + this.layout; + } + + View.prototype = { + /** + * 初始化 View + * @method _init + * @private + */ + init: + function() + { + this.layout = this._model.layout; + this.initLayout(); + return this; + } + /** + * 初始化日历外观 + * @method initLayout + * @param {date} _date + */ + , initLayout: + function( _date ){ + var _dateObj = this._model.getDate(); + if( _date ) _dateObj.date = _date; + this.layout.find('table.UTableBorder tbody').html(''); + + this.initYear( _dateObj ); + this.initMonth( _dateObj ); + this.initMonthDate( _dateObj ); + } + /** + * 初始化年份 + * @method initYear + * @param {DateObject} _dateObj + */ + , initYear: + function( _dateObj ){ + this.layout.find('button.UYear').html( _dateObj.date.getFullYear() ); + } + /** + * 初始化月份 + * @method initMonth + * @param {DateObject} _dateObj + */ + , initMonth: + function( _dateObj ){ + this.layout.find('button.UMonth').html( _dateObj.date.getMonth() + 1 + '月' ); + } + /** + * 初始化月份的所有日期 + * @method _logic.initMonthDate + * @param {DateObjects} _dateObj 保存所有相关日期的对象 + */ + , initMonthDate: + function( _dateObj ){ + var _p = this, _layout = this.layout; + var _maxday = JC.f.maxDayOfMonth( _dateObj.date ), _weekday = _dateObj.date.getDay() || 7 + , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin + , _tmp, i, _class; + + var _beginDate = JC.f.cloneDate( _dateObj.date ); + _beginDate.setDate( 1 ); + var _beginWeekday = _beginDate.getDay() || 7; + if( _beginWeekday < 2 ){ + _beginDate.setDate( -(_beginWeekday-1+6) ); + }else{ + _beginDate.setDate( -(_beginWeekday-2) ); + } + + _dateObj.beginDate = JC.f.cloneDate( _beginDate ); + + var today = new Date(); + + //this._model.title(); + + _ls.push(''); + for( i = 1; i <= 42; i++ ){ + _class = []; + if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend'); + if( !JC.f.isSameMonth( _dateObj.date, _beginDate ) ) _class.push( 'other' ); + if( _dateObj.minvalue && _beginDate.getTime() < _dateObj.minvalue.getTime() ) + _class.push( 'unable' ); + if( _dateObj.maxvalue && _beginDate.getTime() > _dateObj.maxvalue.getTime() ) + _class.push( 'unable' ); + + var lunarDate = LunarCalendar.gregorianToLunar( _beginDate ); + var festivals = LunarCalendar.getFestivals( lunarDate, _beginDate ); + + var _min = 0, _max = 3000000000000, _curtime = _beginDate.getTime(); + var _title = [ _beginDate.getFullYear(), '年 ' + , _beginDate.getMonth() + 1, '月 ' + , _beginDate.getDate(), '日', '\n' ]; + _title.push( '农历 ', lunarDate.yue, lunarDate.ri ); + _title.push( ' ', lunarDate.ganzhi, '【', lunarDate.shengxiao, '】年' ); + + if( festivals && festivals.festivals.length ){ + var _festivalsAr = []; + $.each( festivals.festivals, function( _ix, _item ){ + //JC.log( _item ); + if( _item.fullname ){ + _festivalsAr = _festivalsAr.concat( _item.fullname.split(/[\s]+/) ); + } + }); + + if( _festivalsAr.length ){ + _title.push( '\n节日: ' ); + _title.push( _festivalsAr.join( ', ' ) ); + } + } + + if( this._model.container.is('[nopreviousfestivals]') ){ + _min = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth(), 1 ).getTime(); + } + if( this._model.container.is('[nonextfestivals]') ){ + _max = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth() + 1, 1 ).getTime(); + } + + if( _curtime >= _min && _curtime < _max ){ + if( festivals.isHoliday ){ _class.push( 'festival' ); _class.push('xiuxi'); } + if( festivals.isWorkday ) _class.push( 'shangban' ); + }else{ + _class.push('nopointer'); + _class.push('unable'); + } + + + this._model.title( _beginDate.getTime(), _title.join('') ); + + if( JC.f.isSameDay( today, _beginDate ) ) _class.push( 'today' ); + _ls.push( '' + ,'' + ,'', _beginDate.getDate(), '' + ,'
        ' ); + _beginDate.setDate( _beginDate.getDate() + 1 ); + if( i % 7 === 0 && i != 42 ) _ls.push( '' ); + } + _ls.push(''); + _beginDate.setDate( _beginDate.getDate() - 1 ); + _dateObj.endDate = JC.f.cloneDate( _beginDate ); + + _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ) + .find('td').each( function(){ + _p.addTitle( $(this) ); + }); + + this.hideControl(); + + JC.log( _prebegin, _premaxday, _maxday, _weekday, _sumday, _row ); + } + /** + * 把具体的公历和农历日期写进a标签的title里 + * @method addTitle + * @param {selector} _td + */ + , addTitle: + function( _td ){ + var _a = _td.find('a'), _tm = _a.attr( 'date' ), _title = this._model.title( _tm ); + _a.attr('title', _title ).attr('datatitle', _title); + } + /** + * 检查是否要隐藏操作控件 + * @method hideControl + */ + , hideControl: + function(){ + if( this._model.hideControl ){ + this.layout.find('select, button.UPreYear, button.UPreMonth, button.UNextMonth, button.UNextYear').hide(); + this.layout.find('table.UHeader').addClass('nopointer'); + } + } + }; + /** + * LunarCalendar 数据模型类 + * @namespace JC.LunarCalendar + * @class Model + * @constructor + * @param {selector} _container + * @param {date} _date + */ + function Model( _container, _date ){ + /** + * LunarCalendar 所要显示的selector + * @property {selector} container + * @type selector + * @default document.body + */ + this.container = _container; + /** + * 初始化时的时期 + * @property date + * @type date + * @default new Date() + */ + this.date = _date; + /** + * 日历默认模板 + * @property tpl + * @type string + * @default JC.LunarCalendar._deftpl + */ + this.tpl; + /** + * 显示日历时所需要的所有日期对象 + * @property dateObj + * @type Object + */ + this.dateObj; + /** + * a 标签 title 的临时存储对象 + * @property _titleObj + * @type Object + * @default {} + * @private + */ + this._titleObj = {}; + this.hideControl; + } + + Model._insCount = 1; + LunarCalendar.Model._instanceName = 'LunarCalendar'; + + Model.prototype = { + + init: + function(){ + this.date = this.clcDate(); + JC.log( this.date ); + + this.tpl = JC.f.printf( JC.LunarCalendar.tpl || _deftpl, Model._insCount++ ); + if( this.container.is( '[hidecontrol]' ) ){ + if( !this.container.attr( 'hidecontrol' ) ){ + this.hideControl = true; + }else{ + this.hideControl = JC.f.parseBool( this.container.attr( 'hidecontrol' ) ); + } + } + + this.layout = $( this.tpl ); + this.layout.appendTo( this.container ); + return this; + } + , title: + function( _key, _title ) + { + if( !(_key || _title ) ){ + this._titleObj = {}; + return; + } + _title && ( this._titleObj[_key ] = _title ); + return this._titleObj[_key]; + } + /** + * 获取初始日期对象 + * @method getDate + * @param {selector} _selector 显示日历组件的input + * @private + */ + , getDate: + function(){ + if( this.dateObj ) return this.dateObj; + var _selector = this.container; + var _r = { date: 0, minvalue: 0, maxvalue: 0 }, _tmp; + + if( _tmp = JC.f.dateDetect( _selector.attr('defaultdate') )) _r.date = _tmp; + else _r.date = this.date || new Date(); + + _r.minvalue = JC.f.dateDetect( _selector.attr('minvalue') ); + _r.maxvalue = JC.f.dateDetect( _selector.attr('maxvalue') ); + + _r.date && ( _r.data = JC.f.pureDate( _r.date ) ); + _r.minvalue && ( _r.minvalue = JC.f.pureDate( _r.minvalue ) ); + _r.maxvalue && ( _r.maxvalue = JC.f.pureDate( _r.maxvalue ) ); + + return this.dateObj = _r; + } + /** + * 把日期赋值给文本框 + * @method setDate + * @param {int} _timestamp 日期对象的时间戳 + * @private + */ + , setDate: + function( _timestamp ){ + var _d = new Date(), _symbol = '-'; _d.setTime( _timestamp ); + } + /** + * 给文本框赋值, 日期为控件的当前日期 + * @method setSelectedDate + * @return {int} 0/1 + * @private + */ + , setSelectedDate: + function(){ + var _cur; + _cur = this.getLayout().find('table td.cur a'); + if( _cur.parent('td').hasClass('unable') ) return 0; + _cur && _cur.length && _cur.attr('date') && this.setDate( _cur.attr('date') ); + return 1; + } + , clcSelectedItemCb: + function(){ + var _r = JC.LunarCalendar.clcSelectedItemCb; + this.selector().attr( 'clcSelectedItemCb' ) + && ( _r = window[ this.selector().attr( 'clcSelectedItemCb') ] || _r ); + return _r; + } + , clcDate: + function(){ + var _r = this.date; + this.selector().attr( 'clcDate' ) + && ( _r = JC.f.dateDetect( this.selector().attr('clcDate') ) || _r ) + && ( _r = JC.f.pureDate( _r ) ); + return _r; + } + , selector: function(){ return this.container; } + }; + + /** + * LunarCalendar 日历默认模板 + * @property _deftpl + * @type string + * @static + * @private + */ + var _deftpl = + [ + '
        \n' + ,'
        \n' + ,'\n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,'
        \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,'
        \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,'
        \n' + ,' \n' + ,' \n' + ,' \n' + ,' \n' + ,'
        \n' + ,'
        \n' + ,'
        \n' + ].join(''); + /** + * 监听上一年按钮 + */ + $(document).delegate( 'div.UXCLunarCalendar button.UPreYear', 'click', function(){ + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ); + _ins && _ins.preYear(); + }); + /** + * 监听上一月按钮 + */ + $(document).delegate( 'div.UXCLunarCalendar button.UPreMonth', 'click', function(){ + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ); + _ins && _ins.preMonth(); + }); + /** + * 监听下一月按钮 + */ + $(document).delegate( 'div.UXCLunarCalendar button.UNextMonth', 'click', function(){ + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ); + _ins && _ins.nextMonth(); + }); + /** + * 监听下一年按钮 + */ + $(document).delegate( 'div.UXCLunarCalendar button.UNextYear', 'click', function(){ + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ); + _ins && _ins.nextYear(); + }); + /** + * 监听年份按钮, 是否要显示年份列表 + */ + $(document).delegate( 'div.UXCLunarCalendar button.UYear', 'click', function( _evt ){ + _evt.stopPropagation(); + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ); + if( _ins.isHideControl() ) return; + var _date = _ins.getDate(), _year = _date.getFullYear(); + var _start = _date.getFullYear() - LunarCalendar.defaultYearSpan + , _over = _date.getFullYear() + LunarCalendar.defaultYearSpan; + var _r = [], _selected = ''; + $('div.UXCLunarCalendar select').hide(); + + for( ; _start < _over; _start++ ){ + if( _start === _year ) _selected = ' selected '; else _selected = '' + _r.push( '' ); + } + var _scrollTop = LunarCalendar.defaultYearSpan / 2 * 18; + _ins.getLayout().find('select.UYearList').html(_r.join('')).show().prop('size', 20).scrollTop( _scrollTop ); + }); + /** + * 监听月份按钮, 是否要显示月份列表 + */ + $(document).delegate( 'div.UXCLunarCalendar button.UMonth', 'click', function( _evt ){ + _evt.stopPropagation(); + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ); + if( !_ins ) return; + if( _ins.isHideControl() ) return; + var _date = _ins.getDate(), _year = _date.getFullYear(); + $('div.UXCLunarCalendar select').hide(); + + _ins.getLayout().find('select.UMonthList').val( _date.getMonth() ).prop('size', 12).show(); + }); + /** + * 监听年份列表选择状态 + */ + $(document).delegate( 'div.UXCLunarCalendar select.UYearList', 'change', function(){ + var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' ), _ins, _date; + _ins = JC.BaseMVC.getInstance( _layout, LunarCalendar ); + if( !_ins ) return; + _date = _ins.getDate(); + + _date.setFullYear( _p.val() ); + _ins.update( _date ); + }); + /** + * 监听月份列表选择状态 + */ + $(document).delegate( 'div.UXCLunarCalendar select.UMonthList', 'change', function(){ + var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' ), _ins, _date; + _ins = JC.BaseMVC.getInstance( _layout, LunarCalendar ); + if( !_ins ) return; + _date = _ins.getDate(); + + _date.setMonth( _p.val() ); + _ins.update( _date ); + }); + /** + * 监听日期单元格点击事件 + */ + $(document).delegate( 'div.UXCLunarCalendar table.UTableBorder td', 'click', function(){ + var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); + if( !_selector.length ) return; + if( _p.hasClass('unable') ) return; + var _itema = _p.find('> a') + , _curtime = _itema.attr('date') + , _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar ) + , _curDate + ; + if( !( _curtime && _ins ) ) return; + + _curDate = new Date(); + _curDate.setTime( _curtime ); + + var _min = 0, _max = 3000000000000; + if( _ins.getContainer().is('[nopreviousfestivals]') ){ + _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime(); + } + if( _ins.getContainer().is('[nonextfestivals]') ){ + _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime(); + } + + if( _curtime >= _min && _curtime < _max ){ + $('div.UXCLunarCalendar table.UTableBorder td.cur').removeClass('cur'); + _p.addClass('cur'); + _ins.trigger( 'CLCSelectedItem', [ _curDate, _p, _itema ] ); + } + }); + /** + * 监听body点击事件, 点击时隐藏日历控件的年份和月份列表 + */ + $(document).on('click', function(){ + $('div.UXCLunarCalendar select').hide(); + }); + /** + * DOM 加载完毕后, 初始化日历组件 + * @event dom ready + * @private + */ + $(document).ready( function($evt){ + LunarCalendar.autoInit + && JC.f.safeTimeout( function(){ LunarCalendar.init(); }, null, 'INITLunarCalendar', 100 ); + }); + + + return JC.LunarCalendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/LunarCalendar/LunarCalendar.getFestival.js b/comps/LunarCalendar/LunarCalendar.getFestival.js new file mode 100755 index 000000000..1a92e433c --- /dev/null +++ b/comps/LunarCalendar/LunarCalendar.getFestival.js @@ -0,0 +1,219 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.LunarCalendar.default' ], function(){ + JC.LunarCalendar.getFestivals = getFestivals; + /** + * 返回农历和国历的所在日期的所有节日 + *
        假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 } + *
        返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 } + * @method getFestivals + * @static + * @for JC.LunarCalendar + * @param {Object} _lunarDate 农历日期对象, 由JC.LunarCalendar.gregorianToLunar 获取 + * @param {Date} _greDate 日期对象 + * @return Object + */ + function getFestivals( _lunarDate, _greDate ){ + var _r = { 'dayName': '', 'festivals': [], 'isHoliday': false } + , _lunarDay = [ intPad(_lunarDate.month), intPad(_lunarDate.day) ].join('') + , _greDay = [ intPad(_greDate.getMonth()+1), intPad(_greDate.getDate()) ].join('') + , _greToday = _greDate.getFullYear() + _greDay + ; + + _r.dayName = _lunarDate.ri; + if( _r.dayName == '初一' ) _r.dayName = _lunarDate.yue; + + if( _greDay in gregorianFes ) _r.festivals.push( gregorianFes[ _greDay ] ); + if( _lunarDay in lunarFes ) { + _r.festivals.push( lunarFes[ _lunarDay ] ); + } + + if( _lunarDate.month == 12 && _lunarDate.day >= 29 ){ + var _tmp = new Date(); _tmp.setTime( _greDate.getTime() ); _tmp.setDate( _tmp.getDate() + 1 ); + var _tmpLunar = JC.LunarCalendar.gregorianToLunar( _tmp ); + if( _tmpLunar.month === 1 && _tmpLunar.day === 1 ){ + var fes = lunarFes['0100']; + _r.festivals.unshift( fes ); + _r.dayName = fes.name; + } + } + + if( JC.LunarCalendar.nationalHolidays ){ + if( _greToday in JC.LunarCalendar.nationalHolidays ){ + _r.festivals.push( JC.LunarCalendar.nationalHolidays[ _greToday ] ); + } + } + + if( _r.festivals.length ){ + for( var i = 0, j = _r.festivals.length - 1; i < j; i++ ){ + for( var k = i + 1; k <= j; k++ ){ + if( _r.festivals[k].priority > _r.festivals[i].priority ){ + var _tmp = _r.festivals[i]; + _r.festivals[i] = _r.festivals[k]; + _r.festivals[k] = _tmp; + } + } + } + _r.festivals[0].name && (_r.dayName = _r.festivals[0].name); + for( var i = 0, j = _r.festivals.length; i < j; i++ ){ + if( _r.festivals[i].isHoliday ){ _r.isHoliday = true; break; } + } + for( var i = 0, j = _r.festivals.length; i < j; i++ ){ + if( _r.festivals[i].isWorkday ){ _r.isWorkday = true; break; } + } + } + + /*JC.log( _lunarDay, _greDay, _r.festivals.length );*/ + + return _r; + } + + var lunarFes = { + '0101': { 'name': '春节', 'fullname': '春节', 'priority': 8 }, + '0115': { 'name': '元宵节', 'fullname': '元宵节', 'priority': 8 }, + '0505': { 'name': '端午节', 'fullname': '端午节', 'priority': 8 }, + '0707': { 'name': '七夕', 'fullname': '七夕情人节', 'priority': 5 }, + '0715': { 'name': '中元节', 'fullname': '中元节', 'priority': 5 }, + '0815': { 'name': '中秋节', 'fullname': '中秋节', 'priority': 8 }, + '0909': { 'name': '重阳节', 'fullname': '重阳节', 'priority': 5 }, + '1208': { 'name': '腊八节', 'fullname': '腊八节', 'priority': 5 }, + '1223': { 'name': '小年', 'fullname': '小年', 'priority': 5 }, + '0100': { 'name': '除夕', 'fullname': '除夕', 'priority': 8 } + }; + + var gregorianFes = { + '0101': { 'name': '元旦节', 'fullname': '元旦节', 'priority': 6 }, + '0202': { 'name': '湿地日', 'fullname': '世界湿地日', 'priority': 1 }, + '0210': { 'name': '气象节', 'fullname': '国际气象节', 'priority': 1 }, + '0214': { 'name': '情人节', 'fullname': '情人节', 'priority': 3 }, + '0301': { 'name': '', 'fullname': '国际海豹日', 'priority': 1 }, + '0303': { 'name': '', 'fullname': '全国爱耳日', 'priority': 1 }, + '0305': { 'name': '学雷锋', 'fullname': '学雷锋纪念日', 'priority': 1 }, + '0308': { 'name': '妇女节', 'fullname': '妇女节', 'priority': 3 }, + '0312': { 'name': '植树节', 'fullname': '植树节 孙中山逝世纪念日', 'priority': 2 }, + '0314': { 'name': '', 'fullname': '国际警察日', 'priority': 1 }, + '0315': { 'name': '消权日', 'fullname': '消费者权益日', 'priority': 1 }, + '0317': { 'name': '', 'fullname': '中国国医节 国际航海日', 'priority': 1 }, + '0321': { 'name': '', 'fullname': '世界森林日 消除种族歧视国际日 世界儿歌日', 'priority': 1 }, + '0322': { 'name': '', 'fullname': '世界水日', 'priority': 1 }, + '0323': { 'name': '气象日', 'fullname': '世界气象日', 'priority': 1 }, + '0324': { 'name': '', 'fullname': '世界防治结核病日', 'priority': 1 }, + '0325': { 'name': '', 'fullname': '全国中小学生安全教育日', 'priority': 1 }, + '0401': { 'name': '愚人节', 'fullname': '愚人节 全国爱国卫生运动月(四月) 税收宣传月(四月)', 'priority': 2 }, + '0407': { 'name': '卫生日', 'fullname': '世界卫生日', 'priority': 1 }, + '0422': { 'name': '地球日', 'fullname': '世界地球日', 'priority': 1 }, + '0423': { 'name': '', 'fullname': '世界图书和版权日', 'priority': 1 }, + '0424': { 'name': '', 'fullname': '亚非新闻工作者日', 'priority': 1 }, + '0501': { 'name': '劳动节', 'fullname': '劳动节', 'priority': 6 }, + '0504': { 'name': '青年节', 'fullname': '青年节', 'priority': 1 }, + '0505': { 'name': '', 'fullname': '碘缺乏病防治日', 'priority': 1 }, + '0508': { 'name': '', 'fullname': '世界红十字日', 'priority': 1 }, + '0512': { 'name': '护士节', 'fullname': '国际护士节', 'priority': 1 }, + '0515': { 'name': '家庭日', 'fullname': '国际家庭日', 'priority': 1 }, + '0517': { 'name': '电信日', 'fullname': '国际电信日', 'priority': 1 }, + '0518': { 'name': '', 'fullname': '国际博物馆日', 'priority': 1 }, + '0520': { 'name': '', 'fullname': '全国学生营养日', 'priority': 1 }, + '0523': { 'name': '', 'fullname': '国际牛奶日', 'priority': 1 }, + '0531': { 'name': '无烟日', 'fullname': '世界无烟日', 'priority': 1 }, + '0601': { 'name': '儿童节', 'fullname': '国际儿童节', 'priority': 6 }, + '0605': { 'name': '', 'fullname': '世界环境保护日', 'priority': 1 }, + '0606': { 'name': '', 'fullname': '全国爱眼日', 'priority': 1 }, + '0617': { 'name': '', 'fullname': '防治荒漠化和干旱日', 'priority': 1 }, + '0623': { 'name': '', 'fullname': '国际奥林匹克日', 'priority': 1 }, + '0625': { 'name': '土地日', 'fullname': '全国土地日', 'priority': 1 }, + '0626': { 'name': '禁毒日', 'fullname': '国际禁毒日', 'priority': 1 }, + '0701': { 'name': '', 'fullname': '香港回归纪念日 中共诞辰 世界建筑日', 'priority': 1 }, + '0702': { 'name': '', 'fullname': '国际体育记者日', 'priority': 1 }, + '0707': { 'name': '', 'fullname': '抗日战争纪念日', 'priority': 1 }, + '0711': { 'name': '人口日', 'fullname': '世界人口日', 'priority': 1 }, + '0801': { 'name': '建军节', 'fullname': '建军节', 'priority': 1 }, + '0808': { 'name': '', 'fullname': '中国男子节(爸爸节)', 'priority': 1 }, + '0815': { 'name': '', 'fullname': '抗日战争胜利纪念', 'priority': 1 }, + '0908': { 'name': '', 'fullname': '国际扫盲日 国际新闻工作者日', 'priority': 1 }, + '0909': { 'name': '', 'fullname': '毛逝世纪念', 'priority': 1 }, + '0910': { 'name': '教师节', 'fullname': '中国教师节', 'priority': 6 }, + '0914': { 'name': '地球日', 'fullname': '世界清洁地球日', 'priority': 1 }, + '0916': { 'name': '', 'fullname': '国际臭氧层保护日', 'priority': 1 }, + '0918': { 'name': '九一八', 'fullname': '九·一八事变纪念日', 'priority': 1 }, + '0920': { 'name': '爱牙日', 'fullname': '国际爱牙日', 'priority': 1 }, + '0927': { 'name': '旅游日', 'fullname': '世界旅游日', 'priority': 1 }, + '0928': { 'name': '', 'fullname': '孔子诞辰', 'priority': 1 }, + '1001': { 'name': '国庆节', 'fullname': '国庆节 世界音乐日 国际老人节', 'priority': 6 }, + '1002': { 'name': '', 'fullname': '国际和平与民主自由斗争日', 'priority': 1 }, + '1004': { 'name': '', 'fullname': '世界动物日', 'priority': 1 }, + '1006': { 'name': '', 'fullname': '老人节', 'priority': 1 }, + '1008': { 'name': '', 'fullname': '全国高血压日 世界视觉日', 'priority': 1 }, + '1009': { 'name': '邮政日', 'fullname': '世界邮政日 万国邮联日', 'priority': 1 }, + '1010': { 'name': '', 'fullname': '辛亥革命纪念日 世界精神卫生日', 'priority': 1 }, + '1013': { 'name': '', 'fullname': '世界保健日 国际教师节', 'priority': 1 }, + '1014': { 'name': '', 'fullname': '世界标准日', 'priority': 1 }, + '1015': { 'name': '', 'fullname': '国际盲人节(白手杖节)', 'priority': 1 }, + '1016': { 'name': '粮食日', 'fullname': '世界粮食日', 'priority': 1 }, + '1017': { 'name': '', 'fullname': '世界消除贫困日', 'priority': 1 }, + '1022': { 'name': '', 'fullname': '世界传统医药日', 'priority': 1 }, + '1024': { 'name': '', 'fullname': '联合国日', 'priority': 1 }, + '1031': { 'name': '勤俭日', 'fullname': '世界勤俭日', 'priority': 1 }, + '1107': { 'name': '', 'fullname': '十月社会主义革命纪念日', 'priority': 1 }, + '1108': { 'name': '记者日', 'fullname': '中国记者日', 'priority': 1 }, + '1109': { 'name': '', 'fullname': '全国消防安全宣传教育日', 'priority': 1 }, + '1110': { 'name': '青年节', 'fullname': '世界青年节', 'priority': 3 }, + '1111': { 'name': '', 'fullname': '国际科学与和平周(本日所属的一周)', 'priority': 1 }, + '1112': { 'name': '', 'fullname': '孙中山诞辰纪念日', 'priority': 1 }, + '1114': { 'name': '', 'fullname': '世界糖尿病日', 'priority': 1 }, + '1117': { 'name': '', 'fullname': '国际大学生节 世界学生节', 'priority': 1 }, + '1120': { 'name': '', 'fullname': '彝族年', 'priority': 1 }, + '1121': { 'name': '', 'fullname': '彝族年 世界问候日 世界电视日', 'priority': 1 }, + '1122': { 'name': '', 'fullname': '彝族年', 'priority': 1 }, + '1129': { 'name': '', 'fullname': '国际声援巴勒斯坦人民国际日', 'priority': 1 }, + '1201': { 'name': '', 'fullname': '世界艾滋病日', 'priority': 1 }, + '1203': { 'name': '', 'fullname': '世界残疾人日', 'priority': 1 }, + '1205': { 'name': '', 'fullname': '国际经济和社会发展志愿人员日', 'priority': 1 }, + '1208': { 'name': '', 'fullname': '国际儿童电视日', 'priority': 1 }, + '1209': { 'name': '足球日', 'fullname': '世界足球日', 'priority': 1 }, + '1210': { 'name': '人权日', 'fullname': '世界人权日', 'priority': 1 }, + '1212': { 'name': '', 'fullname': '西安事变纪念日', 'priority': 1 }, + '1213': { 'name': '大屠杀', 'fullname': '南京大屠杀(1937年)纪念日!紧记血泪史!', 'priority': 1 }, + '1220': { 'name': '', 'fullname': '澳门回归纪念', 'priority': 1 }, + '1221': { 'name': '篮球日', 'fullname': '国际篮球日', 'priority': 1 }, + '1224': { 'name': '平安夜', 'fullname': '平安夜', 'priority': 1 }, + '1225': { 'name': '圣诞节', 'fullname': '圣诞节', 'priority': 1 }, + '1226': { 'name': '', 'fullname': '毛诞辰纪念', 'priority': 1 } + }; + + var byDayOrWeekFes = { + '0150': { 'name': '麻风日', 'fullname': '世界麻风日', 'priority': 1 }, //一月的最后一个星期日(月倒数第一个星期日) + '0520': { 'name': '母亲节', 'fullname': '国际母亲节', 'priority': 1 }, + '0530': { 'name': '助残日', 'fullname': '全国助残日', 'priority': 1 }, + '0630': { 'name': '父亲节', 'fullname': '父亲节', 'priority': 1 }, + '0730': { 'name': '', 'fullname': '被奴役国家周', 'priority': 1 }, + '0932': { 'name': '和平日', 'fullname': '国际和平日', 'priority': 1 }, + '0940': { 'name': '聋人节 世界儿童日', 'fullname': '国际聋人节 世界儿童日', 'priority': 1 }, + '0950': { 'name': '海事日', 'fullname': '世界海事日', 'priority': 1 }, + '1011': { 'name': '住房日', 'fullname': '国际住房日', 'priority': 1 }, + '1013': { 'name': '减灾日', 'fullname': '国际减轻自然灾害日(减灾日)', 'priority': 1 }, + '1144': { 'name': '感恩节', 'fullname': '感恩节', 'priority': 1 } + }; + + /** + * 为数字添加前置0 + * @method JC.LunarCalendar.getFestival.intPad + * @param {int} _n 需要添加前置0的数字 + * @param {int} _len 需要添加_len个0, 默认为2 + * @return {string} + * @static + * @private + */ + function intPad( _n, _len ){ + if( typeof _len == 'undefined' ) _len = 2; + _n = new Array( _len + 1 ).join('0') + _n; + return _n.slice( _n.length - _len ); + } + + return JC.LunarCalendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/LunarCalendar/LunarCalendar.gregorianToLunar.js b/comps/LunarCalendar/LunarCalendar.gregorianToLunar.js new file mode 100755 index 000000000..d87d9de88 --- /dev/null +++ b/comps/LunarCalendar/LunarCalendar.gregorianToLunar.js @@ -0,0 +1,319 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.LunarCalendar.default' ], function(){ + /** + * 从公历日期获得农历日期 + *
        返回的数据格式 + *
        +        {
        +            shengxiao: ''   //生肖
        +            , ganzhi: ''    //干支
        +            , yue: ''       //月份
        +            , ri: ''        //日
        +            , shi: ''       //时
        +            , year: ''      //农历数字年
        +            , month: ''     //农历数字月
        +            , day: ''       //农历数字天
        +            , hour: ''      //农历数字时
        +        };
        +     * 
        + * @method gregorianToLunar + * @static + * @for JC.LunarCalendar + * @param {date} _date 要获取农历日期的时间对象 + * @return Object + */ + JC.LunarCalendar.gregorianToLunar = gregorianToLunar; + + function gregorianToLunar( _date ){ + var _r = { + shengxiao: '' //生肖 + , ganzhi: '' //干支 + , yue: '' //月份 + , ri: '' //日 + , shi: '' //时 + , year: '' //农历数字年 + , month: '' //农历数字月 + , day: '' //农历数字天 + , hour: '' //农历数字时 + }; + + var _lunar = JC.LunarCalendar.toLunarDate( _date ); + _r.year = _lunar.y; + _r.month = _lunar.m + 1; + _r.day = _lunar.d; + + //JC.log( _r.year, _r.month, _r.day, ' ', _date.getFullYear(), _date.getMonth()+1, _date.getDate() ); + + _r.shengxiao = shengxiao.charAt((_r.year - 4) % 12); + _r.ganzhi = tiangan.charAt((_r.year - 4) % 10) + dizhi.charAt((_r.year - 4) % 12); + + if(_lunar.isleep) { + _r.yue = "闰" + yuefan.charAt(_r.month - 1); + } + else{ + _r.yue = yuefan.charAt(_r.month - 1); + } + _r.yue += '月'; + + _r.ri = (_r.day < 11) ? "初" : ((_r.day < 20) ? "十" : ((_r.day < 30) ? "廿" : "卅")); + if (_r.day % 10 != 0 || _r.day == 10) { + _r.ri += shuzi.charAt((_r.day - 1) % 10); + } + _r.ri == "廿" && ( _r.ri = "二十" ); + _r.ri == "卅" && ( _r.ri = "三十" ); + /*JC.log( 'month:', _r.month, 2 );*/ + + _r.shi = dizhi.charAt((_r.hour - 1) % 12); + return _r; + }; + + var tiangan = "甲乙丙丁戊己庚辛壬癸" + , dizhi = "子丑寅卯辰巳午未申酉戌亥" + , shengxiao = "鼠牛虎兔龙蛇马羊猴鸡狗猪" + , yuefan = "正二三四五六七八九十冬腊" + , xingqi = "日一二三四五六" + , shuzi = "一二三四五六七八九十" + , lunarDays = [ + 0x41A95,0xD4A,0xDA5,0x20B55,0x56A,0x7155B,0x25D,0x92D,0x5192B + ,0xA95,0xB4A,0x416AA,0xAD5,0x90AB5,0x4BA,0xA5B,0x60A57,0x52B,0xA93,0x40E95 + ] + , lunarMonth = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] + ; + + lunarDate( JC.LunarCalendar ); + + function lunarDate(r){ + r = r || window; + + function l(a){ + for( var c = 348, b = 32768; b > 8; b >>= 1 ){ + c += h[ a-1900 ] & b + ? 1 + : 0 + ; + } + return c + ( i( a ) ? ( h[ a - 1899 ] & 15 ) == 15 ? 30 : 29 : 0 ); + } + + function i(a){ + a = h[ a-1900 ] & 15; + return a == 15 ? 0 : a; + } + + function o(a){ + if( !a || !a.getFullYear ) return !1; + var c = a.getFullYear() + , b = a.getMonth() + , a = a.getDate() + ; + + return Date.UTC( c,b,a ) > Date.UTC( 2101, 0, 28 ) + || Date.UTC( c, b, a ) < Date.UTC( 1900, 0, 31 ) + ? !0 + : !1 + ; + } + + var h = [ + 19416,19168,42352,21717,53856,55632,21844,22191,39632,21970,19168,42422 + ,42192,53840,53845,46415,54944,44450,38320,18807,18815,42160,46261,27216 + ,27968,43860,11119,38256,21234,18800,25958,54432,59984,27285,23263,11104 + ,34531,37615,51415,51551,54432,55462,46431,22176,42420,9695,37584,53938 + ,43344,46423,27808,46416,21333,19887,42416,17779,21183,43432,59728,27296 + ,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925 + ,19152,42192,54484,53840,54616,46400,46752,38310,38335,18864,43380,42160 + ,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480 + ,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680 + ,37584,51893,43344,46240,47780,44368,21977,19360,42416,20854,21183,43312 + ,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371 + ,38608,19195,19152,42192,53430,53855,54560,56645,46496,22224,21938,18864 + ,42359,42160,43600,45653,27951,44448,19299,37759,18936,18800,25776,26790 + ,59999,27424,42692,43759,37600,53987,51552,54615,54432,55888,23893,22176 + ,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168 + ,45683,26928,29495,27296,44368,19285,19311,42352,21732,53856,59752,54560 + ,55968,27302,22239,19168,43476,42192,53584,62034,54560 + ] + , g = "\u96f6,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d,\u4e03,\u516b,\u4e5d,\u5341".split(",") + , p = ["\u521d","\u5341","\u5eff","\u5345","\u25a1"] + , s = "\u7532,\u4e59,\u4e19,\u4e01,\u620a,\u5df1,\u5e9a,\u8f9b,\u58ec,\u7678".split(",") + , t = "\u5b50,\u4e11,\u5bc5,\u536f,\u8fb0,\u5df3,\u5348,\u672a,\u7533,\u9149,\u620c,\u4ea5".split(",") + , u = "\u9f20,\u725b,\u864e,\u5154,\u9f99,\u86c7,\u9a6c,\u7f8a,\u7334,\u9e21,\u72d7,\u732a".split(",") + , q = ( "\u5c0f\u5bd2,\u5927\u5bd2,\u7acb\u6625,\u96e8\u6c34,\u60ca\u86f0,\u6625\u5206," + + "\u6e05\u660e,\u8c37\u96e8,\u7acb\u590f,\u5c0f\u6ee1,\u8292\u79cd,\u590f\u81f3," + + "\u5c0f\u6691,\u5927\u6691,\u7acb\u79cb,\u5904\u6691,\u767d\u9732,\u79cb\u5206," + + "\u5bd2\u9732,\u971c\u964d,\u7acb\u51ac,\u5c0f\u96ea,\u5927\u96ea,\u51ac\u81f3" ).split(",") + , v = [ + 0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072 + ,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795 + ,462224,483532,504758 + ] + , m = r || new Date; + + var date = m; + + r.toLunarDate= + function(a){ + a = a || m; + + if( o(a) ){ + return "the function[toLunarDate()]range[1900/0/31-2101/0/28]"; + throw "dateRangeError"; + } + + for( var c = a.getFullYear(), b = a.getMonth(), a = a.getDate() + , c = ( Date.UTC( c, b, a ) - Date.UTC( 1900, 0, 31 ) ) / 864E5 + , d , b = 1900; + b < 2100 && c > 0; + b++ + ) + d = l( b ), c -= d; + + c < 0 && ( c += d, b-- ); + + var lunarYear = b, lunarMonth, lunarDay, _isLeap = !1, leap = i( lunarYear ); + + for( b = 1; b < 13 && c > 0; b++ ) + leap > 0 && b == leap + 1 && _isLeap == !1 + ? ( b--, _isLeap = !0, d = i( lunarYear ) ? ( h[ lunarYear - 1899 ] & 15 ) == 15 ? 30 : 29 : 0 ) + : d = h[ lunarYear - 1900 ] & 65536 >> b + ? 30 + : 29 + , _isLeap == !0 && b == leap + 1 && ( _isLeap = !1 ) + , c -= d + ; + + c == 0 + && leap > 0 + && b == leap + 1 + && (_isLeap ? _isLeap = !1 : ( _isLeap = !0 , b-- ) ) + ; + + c < 0 && ( c += d, b--); + + lunarMonth = b - 1; + lunarDay = c + 1; + + return { + y: lunarYear + ,m: lunarMonth + ,d: lunarDay + ,leap: leap + ,isleep: _isLeap + ,toString: + function(){ + var a =_isLeap ? "(\u95f0)" : "" + , b = g[ parseInt( lunarYear / 1E3 ) ] + g[ parseInt( lunarYear % 1E3 / 100 ) ] + + g[ parseInt( lunarYear % 100 / 10 ) ] + + g[ parseInt( lunarYear % 10 ) ] + , c = parseInt( ( lunarMonth + 1 ) / 10 ) == 0 ? "" : p[1] + ; + + c += g[ parseInt( ( lunarMonth + 1 ) % 10 ) ]; + var d = p[ parseInt( lunarDay / 10 ) ]; + d += parseInt( lunarDay % 10 ) == 0 ? "" : g[ parseInt( lunarDay % 10 ) ]; + return "" + b + "\u5e74" + c + "\u6708" + a + d + "\u65e5"; + } + } + }; + + r.toSolar= + function(){ + if( arguments.length == 0 ) return m; + else{ + var a, c, b; + arguments[0] && ( a = arguments[0] ); + c = arguments[1] ? arguments[1] : 0; + b = arguments[2] ? arguments[2] : 1; + + for( var d = 0, e = 1900; e < a; e++ ){ + var f = l(e); + d+=f + } + + for( e = 0; e < c; e++ ) + f = h[ a-1900 ] & 65536 >> e ? 30 : 29, d += f; + + d += b-1; + + return new Date( Date.UTC( 1900, 0, 31 ) + d * 864E5 ) + } + }; + + r.ganzhi= + function(a){ + function c( a, b ){ + return ( new Date( 3.15569259747E10 * ( a - 1900 ) + v[b] * 6E4 + Date.UTC( 1900, 0, 6, 2, 5 ) ) ).getUTCDate(); + } + + function b( a ){ + return s[ a % 10 ] + t[ a % 12 ] + } + + var d = a || m; + + if( o( d ) ){ + return "the function[ganzhi()] date'range[1900/0/31-2101/0/28]"; + throw "dateRangeError"; + } + + var e = d.getFullYear() + , f = d.getMonth() + , a = d.getDate() + , d = d.getHours() + , h, g, k, j, n + ; + + g = f < 2 ? e - 1900 + 36 - 1 : e - 1900 + 36; + k = ( e - 1900 ) * 12 + f + 12; + h = c( e, f * 2 ); + var i = c( e, f * 2 + 1 ); + h = a == h ? q[ f * 2 ] : a == i ? q[ f * 2 + 1 ]: ""; + + var i = c( e, 2 ) + , l = c( e, f * 2 ) + ; + + f == 1 + && a >= i + && ( g = e - 1900 + 36 ) + ; + + a + 1 >= l + && ( k = ( e - 1900 ) * 12 + f + 13 ) + ; + + j = Date.UTC( e, f, 1, 0, 0, 0, 0 ) / 864E5 + 25577 + a - 1; + n= j % 10 % 5 * 12 + parseInt( d / 2 ) % 12; + d == 23 && j++; + g %= 60; + k %= 60; + j %= 60; + n %= 60; + + return { + y: g + , m: k + , d: j + , h: n + , jie: h + , animal: u[ g % 12 ] + , toString: + function( a ){ + var c = b( g ) + b( k ) + b( j ) + b( n ); + return a ? c.substring( 0, a ) : c; + } + }; + } + }; + + return JC.LunarCalendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); + + diff --git a/comps/LunarCalendar/LunarCalendar.js b/comps/LunarCalendar/LunarCalendar.js old mode 100644 new mode 100755 index 3aefa25bf..fd4832b2b --- a/comps/LunarCalendar/LunarCalendar.js +++ b/comps/LunarCalendar/LunarCalendar.js @@ -1,1417 +1,32 @@ -;(function($){ - /// - /// TODO: 添加事件响应机制 - /// - JC.LunarCalendar = window.LunarCalendar = LunarCalendar; - /** - * 农历日历组件 - *
        全局访问请使用 JC.LunarCalendar 或 LunarCalendar - *
        DOM 加载完毕后 - * , LunarCalendar会自动初始化页面所有具备识别符的日历, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar - *
        Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 var ins = new JC.LunarCalendar( _selector ); - *

        - * 初始化时, 如果日历是添加到某个selector里, 那么selector可以指定一些设置属性 - *
        hidecontrol: 如果设置该属性, 那么日历将隐藏操作控件 - *
        minvalue: 设置日历的有效最小选择范围, 格式YYYY-mm-dd - *
        maxvalue: 设置日历的有效最大选择范围, 格式YYYY-mm-dd - *
        nopreviousfestivals: 不显示上个月的节日 - *
        nonextfestivals: 不显示下个月的节日 - *

        - *

        require: jQuery - *
        require: window.cloneDate - *
        require: window.parseISODate - *
        require: window.maxDayOfMonth - *
        require: window.isSameDay - *
        require: window.isSameMonth - *

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC - * @class LunarCalendar - * @constructor - * @param {selector} _container 指定要显示日历的选择器, 如果不显示指定该值, 默认为 document.body - * @param {date} _date 日历的当前日期, 如果不显示指定该值, 默认为当天 - * @version dev 0.1 - * @author qiushaowei | 75 team - * @date 2013-06-13 - */ - function LunarCalendar( _container, _date ){ - _container && ( _container = $(_container) ); - !(_container && _container.length) && ( _container = $(document.body) ); - !_date && ( _date = new Date() ); - _container.data('LunarCalendar', this); - - JC.log( 'LunarCalendar.constructor' ); - /** - * LunarCalendar 的数据模型对象 - * @property _model - * @type JC.LunarCalendar.Model - * @private - */ - this._model = new Model( _container, _date ); - /** - * LunarCalendar 的视图对像 - * @property _view - * @type JC.LunarCalendar.View - * @private - */ - this._view = new View( this._model ); - - this._init(); - } - /** - * 自定义日历组件模板 - *

        默认模板为JC.LunarCalendar.Model#tpl

        - *

        如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板

        - * @property tpl - * @type {string} - * @default empty - * @static - */ - LunarCalendar.tpl; - /** - * 设置是否在 dom 加载完毕后, 自动初始化所有日期控件 - * @property autoinit - * @default true - * @type {bool} - * @static - - */ - LunarCalendar.autoInit = true - /** - * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年 - * @property defaultYearSpan - * @type {int} - * @default 20 - * @static - - */ - LunarCalendar.defaultYearSpan = 20 - /** - * 从所有的LunarCalendar取得当前选中的日期 - *
        如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined - * @method getSelectedItemGlobal - * @static - * @return {Object|undefined} 如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td } - */ - LunarCalendar.getSelectedItemGlobal = - function(){ - var _r; - $('div.UXCLunarCalendar table.UTableBorder td.cur a').each( function(){ - var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm ); - _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') }; - return false; - }); - if( !_r ){ - $('div.UXCLunarCalendar table.UTableBorder td.today a').each( function(){ - var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm ); - _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') }; - return false; - }); - } - return _r; - }; - /** - * 从所有的LunarCalendar取得当前选中日期的日期对象 - *
        如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined - * @method getSelectedDateGlobal - * @static - * @return {date|undefined} - */ - LunarCalendar.getSelectedDateGlobal = - function(){ - var _r, _tmp = LunarCalendar.getSelectedItemGlobal(); - if( _tmp && _tmp.date ) _r = _tmp.date; - return _r; - }; - /** - * 从时间截获取选择器对象 - * @method getItemByTimestamp - * @static - * @param {int} _tm 时间截, 如果时间截少于13位, 将自动补0到13位, ps: php时间截为10位 - * @return {selector|undefined} td selector, 如果 td class unable 不可选, 将忽略 - */ - LunarCalendar.getItemByTimestamp = - function( _tm ){ - var _r, _tmp; - if( _tm ){ - _tm += ''; - (_tm.length < 13) && (_tm += new Array( 13 - _tm.length + 1 ).join('0')); - $('div.UXCLunarCalendar table.UTableBorder td a[date='+_tm+']').each( function(){ - _tmp = $(this).parent('td'); - if( !_tmp.hasClass('unable') ){ - _r = _tmp; - return false; - } - }); - } - return _r; - }; - /** - * 添加或者清除工作日样式 - * @method workday - * @static - * @param {selector} _td 要设置为工作日状态的 td - * @param {any} _customSet 如果 _customSet 为 undefined, 将设为工作日. - * 如果 _customSet 非 undefined, 那么根据真假值判断清除工作日/添加工作日 - */ - LunarCalendar.workday = - function( _td, _customSet ){ - _td = $( _td ); - if( typeof _customSet != 'undefined' ){ - _customSet && _td.removeClass( 'xiuxi' ).addClass( 'shangban' ); - !_customSet && _td.removeClass( 'shangban' ); - }else _td.removeClass( 'xiuxi' ).addClass( 'shangban' ); - }; - /** - * 判断 td 是否为工作日状态 - * @method isWorkday - * @static - * @param {selector} _td - * @return {bool} - */ - LunarCalendar.isWorkday = - function( _td ){ - _td = $( _td ); - return _td.hasClass( 'shangban' ); - }; - /** - * 添加或者清除假日样式 - * @method holiday - * @static - * @param {selector} _td 要设置为假日状态的 td - * @param {any} _customSet 如果 _customSet 为 undefined, 将设为假日. - * 如果 _customSet 非 undefined, 那么根据真假值判断清除假日/添加假日 - */ - LunarCalendar.holiday = - function( _td, _customSet ){ - _td = $( _td ); - if( typeof _customSet != 'undefined' ){ - _customSet && _td.addClass( 'xiuxi' ).removeClass( 'shangban' ); - !_customSet && _td.removeClass( 'xiuxi' ); - }else _td.addClass( 'xiuxi' ).removeClass( 'shangban' ); - }; - /** - * 判断 td 是否为假日状态 - * @method isHoliday - * @static - * @param {selector} _td - * @return {bool} - */ - LunarCalendar.isHoliday = - function( _td ){ - _td = $( _td ); - return _td.hasClass( 'xiuxi' ); - }; - /** - * 添加或者清除注释 - * @method comment - * @static - * @param {selector} _td 要设置注释的 td - * @param {string|bool} _customSet 如果 _customSet 为 undefined, 将清除注释. - * 如果 _customSet 为 string, 将添加注释 - */ - LunarCalendar.comment = - function( _td, _customSet ){ - var _comment; - _td = $( _td ); - - if( typeof _customSet == 'string' ){ - _comment = _customSet; - } - - if( typeof _comment != 'undefined' ){ - _td.addClass( 'zhushi' ); - LunarCalendar.commentTitle( _td, _comment ); - _td.find('a').attr('comment', _comment); - }else{ - _td.removeClass( 'zhushi' ); - _td.find('a').removeAttr('comment'); - LunarCalendar.commentTitle( _td ); - } - }; - /** - * 判断 td 是否为注释状态 - * @method isComment - * @static - * @param {selector} _td - * @return {bool} - */ - LunarCalendar.isComment = - function( _td ){ - _td = $( _td ); - return _td.hasClass( 'zhushi' ); - }; - /** - * 返回 td 的注释 - * @method getComment - * @static - * @param {selector} _td - * @return {string} - */ - LunarCalendar.getComment = - function( _td ){ - var _r = ''; - if( _td && _td.length ){ - _r = _td.find('a').attr('comment') || ''; - } - return _r; - }; - /** - * 用于分隔默认title和注释的分隔符 - * @property commentSeparator - * @type string - * @default ==========comment========== - * @static - */ - LunarCalendar.commentSeparator = '==========comment=========='; - /** - * 把注释添加到 a title 里 - * @method commentTitle - * @static - * @param {selector} _td 要设置注释的 a 父容器 td - * @param {string|undefined} _title 如果 _title 为真, 将把注释添加到a title里. - * 如果 _title 为假, 将从 a title 里删除注释 - */ - LunarCalendar.commentTitle = - function( _td, _title ){ - var _a = _td.find( 'a' ), _hasDataTitle = _a.is( '[datatitle]' ); - - if( _title ){ - _title = LunarCalendar.commentSeparator + '\n'+_title; - if( _hasDataTitle ){ - _title = _a.attr('datatitle') + '\n' + _title; - } - _a.attr('title', _title); - }else{ - if( _hasDataTitle ){ - _a.attr('title', _a.attr('datatitle') ); - }else{ - _a.removeAttr('title'); - } - } - }; - /** - * 从JSON数据更新日历状态( 工作日, 休息日, 注释 ) - *
        注意, 该方法更新页面上所有的 LunarCalendar - * @method updateStatus - * @static - * @param {Object} _data { phpTimestamp:{ dayaction: 0|1|2, comment: string}, ... } - *
              
        -     *          dayaction: 
        -     *          0: delete workday/holiday
        -     *          1: workday
        -     *          2: holiday
        -     *
        - * @example - * LunarCalendar.updateStatus( { - "1369843200": { - "dayaction": 2, - "comment": "dfdfgdsfgsdfgsdg'\"'asdf\"\"'sdf" - }, - "1370966400": { - "dayaction": 0, - "comment": "asdfasdfsa" - }, - "1371139200": { - "dayaction": 1 - }, - "1371225600": { - "dayaction": 0, - "comment": "dddd" - } - }); - */ - LunarCalendar.updateStatus = - function( _data ){ - if( !_data ) return; - $('div.UXCLunarCalendar').each( function(){ - var _p = $(this), _ins = _p.data('LunarCalendar'), _tmp; - var _min = 0, _max = 3000000000000; - if( _ins.getContainer().is('[nopreviousfestivals]') ){ - _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime(); - } - if( _ins.getContainer().is('[nonextfestivals]') ){ - _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime(); - } - //JC.log( _ins, _min, _max ); - - var _k, _item, _finalk, _itema, _itemtd; - for( var _k in _data ){ - _item = _data[_k]; - _finalk = _k + ''; - _finalk.length < 13 && (_finalk += new Array( 13 - _finalk.length + 1 ).join('0')); - if( !(_finalk >= _min && _finalk < _max) ) continue; - - _itema = _p.find('table.UTableBorder td > a[date='+_finalk+']'); - if( !_itema.length ) continue; - _itemtd = _itema.parent( 'td' ); - - if( 'dayaction' in _item ){ - switch( _item.dayaction ){ - case 1: - { - LunarCalendar.workday( _itemtd ); - break; - } - - case 2: - { - LunarCalendar.holiday( _itemtd ); - break; - } - - default: - { - LunarCalendar.workday(_itemtd, 0); - LunarCalendar.holiday(_itemtd, 0); - break; - } - } - } - - if( 'comment' in _item ){ - LunarCalendar.comment( _itemtd, _item['comment'] ); - } - } - }); - }; - - LunarCalendar.prototype = { - /** - * LunarCalendar 内部初始化 - * @method _init - * @private - */ - _init: - function(){ - this._view.layout.data('LunarCalendar', this); - - return this; - } - /** - * 更新日历视图为自定义的日期 - * @method update - * @param {date} _date 更新日历视图为 _date 所在日期的月份 - */ - , update: - function( _date ){ - if( !_date ) return; - this._view.initLayout( _date ); - } - /** - * 显示下一个月的日期 - * @method nextMonth - */ - , nextMonth: - function(){ - var _date = this._model.getDate().date; - _date.setMonth( _date.getMonth() + 1 ); - this._view.initLayout( _date ); - } - /** - * 显示上一个月的日期 - * @method preMonth - */ - , preMonth: - function(){ - var _date = this._model.getDate().date; - _date.setMonth( _date.getMonth() - 1 ); - this._view.initLayout( _date ); - } - /** - * 显示下一年的日期 - * @method nextYear - */ - , nextYear: - function(){ - var _date = this._model.getDate().date; - _date.setFullYear( _date.getFullYear() + 1 ); - this._view.initLayout( _date ); - } - /** - * 显示上一年的日期 - * @method preYear - */ - , preYear: - function(){ - var _date = this._model.getDate().date; - _date.setFullYear( _date.getFullYear() - 1 ); - this._view.initLayout( _date ); - } - /** - * 获取默认时间对象 - * @method getDate - * @return {date} - */ - , getDate: function(){ return this._model.getDate().date; } - /** - * 获取所有的默认时间对象 - * @method getAllDate - * @return {object} { date: 默认时间, minvalue: 有效最小时间 - * , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 } - */ - , getAllDate: function(){ return this._model.getDate(); } - /** - * 获取当前选中的日期, 如果用户没有显式选择, 将查找当前日期, 如果两者都没有的话返回undefined - * @method getSelectedDate - * @return {date} - */ - , getSelectedDate: function(){ - var _r; - this._view.layout.find( 'td.cur a').each( function(){ - var _tm = $(this).attr('date'); - _r = new Date(); - _r.setTime( _tm ); - return false; - }); - if( !_r ){ - this._view.layout.find( 'td.today a').each( function(){ - var _tm = $(this).attr('date'); - _r = new Date(); - _r.setTime( _tm ); - return false; - }); - } - return _r; - } - /** - * 获取初始化日历的选择器对象 - * @method getContainer - * @return selector - */ - , getContainer: function(){ return this._model.container; } - /** - * 获取日历的主选择器对象 - * @method getLayout - * @return selector - */ - , getLayout: function(){ return this._view.layout; } - /** - * 判断日历是否隐藏操作控件 - * @method isHideControl - * @return bool - */ - , isHideControl: function(){ return this._model.hideControl; } - } - /** - * LunarCalendar 视图类 - * @namespace JC.LunarCalendar - * @class View - * @constructor - * @param {JC.LunarCalendar.Model} _model - */ - function View( _model ){ - /** - * LunarCalendar model 对象 - * @property _model - * @type JC.LunarCalendar.Model - * @private - */ - this._model = _model; - /** - * LunarCalendar 的主容器 - * @property layout - * @type selector - */ - this.layout; - - this._init(); - } - - View.prototype = { - /** - * 初始化 View - * @method _init - * @private - */ - _init: - function() - { - this.layout = $( this._model.tpl ).appendTo( this._model.container ); - this.initLayout(); - return this; - } - /** - * 初始化日历外观 - * @method initLayout - * @param {date} _date - */ - , initLayout: - function( _date ){ - var _dateObj = this._model.getDate(); - if( _date ) _dateObj.date = _date; - this.layout.find('table.UTableBorder tbody').html(''); - - this.initYear( _dateObj ); - this.initMonth( _dateObj ); - this.initMonthDate( _dateObj ); - } - /** - * 初始化年份 - * @method initYear - * @param {DateObject} _dateObj - */ - , initYear: - function( _dateObj ){ - this.layout.find('button.UYear').html( _dateObj.date.getFullYear() ); - } - /** - * 初始化月份 - * @method initMonth - * @param {DateObject} _dateObj - */ - , initMonth: - function( _dateObj ){ - this.layout.find('button.UMonth').html( _dateObj.date.getMonth() + 1 + '月' ); - } - /** - * 初始化月份的所有日期 - * @method _logic.initMonthDate - * @param {DateObjects} _dateObj 保存所有相关日期的对象 - */ - , initMonthDate: - function( _dateObj ){ - var _p = this, _layout = this.layout; - var _maxday = maxDayOfMonth( _dateObj.date ), _weekday = _dateObj.date.getDay() || 7 - , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin - , _tmp, i, _class; - - var _beginDate = cloneDate( _dateObj.date ); - _beginDate.setDate( 1 ); - var _beginWeekday = _beginDate.getDay() || 7; - if( _beginWeekday < 2 ){ - _beginDate.setDate( -(_beginWeekday-1+6) ); - }else{ - _beginDate.setDate( -(_beginWeekday-2) ); - } - - _dateObj.beginDate = cloneDate( _beginDate ); - - var today = new Date(); - - //this._model.title(); - - _ls.push(''); - for( i = 1; i <= 42; i++ ){ - _class = []; - if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend'); - if( !isSameMonth( _dateObj.date, _beginDate ) ) _class.push( 'other' ); - if( _dateObj.minvalue && _beginDate.getTime() < _dateObj.minvalue.getTime() ) - _class.push( 'unable' ); - if( _dateObj.maxvalue && _beginDate.getTime() > _dateObj.maxvalue.getTime() ) - _class.push( 'unable' ); - - var lunarDate = LunarCalendar.gregorianToLunar( _beginDate ); - var festivals = LunarCalendar.getFestivals( lunarDate, _beginDate ); - - var _min = 0, _max = 3000000000000, _curtime = _beginDate.getTime(); - var _title = [ _beginDate.getFullYear(), '年 ' - , _beginDate.getMonth() + 1, '月 ' - , _beginDate.getDate(), '日', '\n' ]; - _title.push( '农历 ', lunarDate.yue, lunarDate.ri ); - _title.push( ' ', lunarDate.ganzhi, '【', lunarDate.shengxiao, '】年' ); - - if( festivals && festivals.festivals.length ){ - var _festivalsAr = []; - $.each( festivals.festivals, function( _ix, _item ){ - //JC.log( _item ); - if( _item.fullname ){ - _festivalsAr = _festivalsAr.concat( _item.fullname.split(/[\s]+/) ); - } - }); - - if( _festivalsAr.length ){ - _title.push( '\n节日: ' ); - _title.push( _festivalsAr.join( ', ' ) ); - } - } - - if( this._model.container.is('[nopreviousfestivals]') ){ - _min = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth(), 1 ).getTime(); - } - if( this._model.container.is('[nonextfestivals]') ){ - _max = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth() + 1, 1 ).getTime(); - } - - if( _curtime >= _min && _curtime < _max ){ - if( festivals.isHoliday ){ _class.push( 'festival' ); _class.push('xiuxi'); } - if( festivals.isWorkday ) _class.push( 'shangban' ); - }else{ - _class.push('nopointer'); - _class.push('unable'); - } - - - this._model.title( _beginDate.getTime(), _title.join('') ); - - if( isSameDay( today, _beginDate ) ) _class.push( 'today' ); - _ls.push( '' - ,'' - ,'', _beginDate.getDate(), '' - ,'
        ' ); - _beginDate.setDate( _beginDate.getDate() + 1 ); - if( i % 7 === 0 && i != 42 ) _ls.push( '' ); - } - _ls.push(''); - _beginDate.setDate( _beginDate.getDate() - 1 ); - _dateObj.endDate = cloneDate( _beginDate ); - - _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) ) - .find('td').each( function(){ - _p.addTitle( $(this) ); - }); - - this.hideControl(); - - JC.log( _prebegin, _premaxday, _maxday, _weekday, _sumday, _row ); - } - /** - * 把具体的公历和农历日期写进a标签的title里 - * @method addTitle - * @param {selector} _td - */ - , addTitle: - function( _td ){ - var _a = _td.find('a'), _tm = _a.attr( 'date' ), _title = this._model.title( _tm ); - _a.attr('title', _title ).attr('datatitle', _title); - } - /** - * 检查是否要隐藏操作控件 - * @method hideControl - */ - , hideControl: - function(){ - if( this._model.hideControl ){ - this.layout.find('select, button.UPreYear, button.UPreMonth, button.UNextMonth, button.UNextYear').hide(); - this.layout.find('table.UHeader').addClass('nopointer'); - } - } - }; - /** - * LunarCalendar 数据模型类 - * @namespace JC.LunarCalendar - * @class Model - * @constructor - * @param {selector} _container - * @param {date} _date - */ - function Model( _container, _date ){ - /** - * LunarCalendar 所要显示的selector - * @property {selector} container - * @type selector - * @default document.body - */ - this.container = _container; - /** - * 初始化时的时期 - * @property date - * @type date - * @default new Date() - */ - this.date = _date; - /** - * 日历默认模板 - * @property tpl - * @type string - * @default JC.LunarCalendar._deftpl - */ - this.tpl; - /** - * 显示日历时所需要的所有日期对象 - * @property dateObj - * @type Object - */ - this.dateObj; - /** - * a 标签 title 的临时存储对象 - * @property _titleObj - * @type Object - * @default {} - * @private - */ - this._titleObj = {}; - this.hideControl; - - this._init(); - } - - Model.prototype = { - _init: - function(){ - this.tpl = JC.LunarCalendar.tpl || _deftpl; - this.container.is( '[hidecontrol]' ) && ( this.hideControl = true ); - return this; - } - , title: - function( _key, _title ) - { - if( !(_key || _title ) ){ - this._titleObj = {}; - return; - } - _title && ( this._titleObj[_key ] = _title ); - return this._titleObj[_key]; - } - /** - * 获取初始日期对象 - * @method getDate - * @param {selector} _selector 显示日历组件的input - * @private - */ - , getDate: - function(){ - if( this.dateObj ) return this.dateObj; - var _selector = this.container; - var _r = { date: 0, minvalue: 0, maxvalue: 0 }, _tmp; - - if( _tmp = parseISODate( _selector.attr('defaultdate') )) _r.date = _tmp; - else _r.date = new Date(); - - - _r.minvalue = parseISODate( _selector.attr('minvalue') ); - _r.maxvalue = parseISODate( _selector.attr('maxvalue') ); - - return this.dateObj = _r; - } - /** - * 把日期赋值给文本框 - * @method setDate - * @param {int} _timestamp 日期对象的时间戳 - * @private - */ - , setDate: - function( _timestamp ){ - var _d = new Date(), _symbol = '-'; _d.setTime( _timestamp ); - } - /** - * 给文本框赋值, 日期为控件的当前日期 - * @method setSelectedDate - * @return {int} 0/1 - * @private - */ - , setSelectedDate: - function(){ - var _cur; - _cur = this.getLayout().find('table td.cur a'); - if( _cur.parent('td').hasClass('unable') ) return 0; - _cur && _cur.length && _cur.attr('date') && this.setDate( _cur.attr('date') ); - return 1; - } - - }; - /** - * 监听上一年按钮 - */ - $(document).delegate( 'div.UXCLunarCalendar button.UPreYear', 'click', function(){ - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - var _ins = _selector.data('LunarCalendar'); - _ins.preYear(); - }); - /** - * 监听上一月按钮 - */ - $(document).delegate( 'div.UXCLunarCalendar button.UPreMonth', 'click', function(){ - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - var _ins = _selector.data('LunarCalendar'); - _ins.preMonth(); - }); - /** - * 监听下一月按钮 - */ - $(document).delegate( 'div.UXCLunarCalendar button.UNextMonth', 'click', function(){ - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - var _ins = _selector.data('LunarCalendar'); - _ins.nextMonth(); - }); - /** - * 监听下一年按钮 - */ - $(document).delegate( 'div.UXCLunarCalendar button.UNextYear', 'click', function(){ - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - var _ins = _selector.data('LunarCalendar'); - _ins.nextYear(); - }); - /** - * 监听年份按钮, 是否要显示年份列表 - */ - $(document).delegate( 'div.UXCLunarCalendar button.UYear', 'click', function( _evt ){ - _evt.stopPropagation(); - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - var _ins = _selector.data('LunarCalendar'); - if( _ins.isHideControl() ) return; - var _date = _ins.getDate(), _year = _date.getFullYear(); - var _start = _date.getFullYear() - LunarCalendar.defaultYearSpan - , _over = _date.getFullYear() + LunarCalendar.defaultYearSpan; - var _r = [], _selected = ''; - $('div.UXCLunarCalendar select').hide(); - - for( ; _start < _over; _start++ ){ - if( _start === _year ) _selected = ' selected '; else _selected = '' - _r.push( '' ); - } - var _scrollTop = LunarCalendar.defaultYearSpan / 2 * 18; - _ins.getLayout().find('select.UYearList').html(_r.join('')).show().prop('size', 20).scrollTop( _scrollTop ); - }); - /** - * 监听月份按钮, 是否要显示月份列表 - */ - $(document).delegate( 'div.UXCLunarCalendar button.UMonth', 'click', function( _evt ){ - _evt.stopPropagation(); - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - var _ins = _selector.data('LunarCalendar'); - if( _ins.isHideControl() ) return; - var _date = _ins.getDate(), _year = _date.getFullYear(); - $('div.UXCLunarCalendar select').hide(); - - _ins.getLayout().find('select.UMonthList').val( _date.getMonth() ).prop('size', 12).show(); - }); - /** - * 监听年份列表选择状态 - */ - $(document).delegate( 'div.UXCLunarCalendar select.UYearList', 'change', function(){ - var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' ) - , _ins = _layout.data('LunarCalendar'), _date = _ins.getDate(); - - _date.setFullYear( _p.val() ); - _ins.update( _date ); - }); - /** - * 监听月份列表选择状态 - */ - $(document).delegate( 'div.UXCLunarCalendar select.UMonthList', 'change', function(){ - var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' ) - , _ins = _layout.data('LunarCalendar'), _date = _ins.getDate(); - - _date.setMonth( _p.val() ); - _ins.update( _date ); - }); - /** - * 监听日期单元格点击事件 - */ - $(document).delegate( 'div.UXCLunarCalendar table.UTableBorder td', 'click', function(){ - var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' ); - if( !_selector.length ) return; - if( _p.hasClass('unable') ) return; - var _itema = _p.find('> a'), _curtime = _itema.attr('date'), _ins = _selector.data('LunarCalendar'); - - var _min = 0, _max = 3000000000000; - if( _ins.getContainer().is('[nopreviousfestivals]') ){ - _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime(); - } - if( _ins.getContainer().is('[nonextfestivals]') ){ - _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime(); - } - - if( _curtime >= _min && _curtime < _max ){ - $('div.UXCLunarCalendar table.UTableBorder td.cur').removeClass('cur'); - _p.addClass('cur'); - } - }); - /** - * 监听body点击事件, 点击时隐藏日历控件的年份和月份列表 - */ - $(document).on('click', function(){ - $('div.UXCLunarCalendar select').hide(); - }); - /** - * DOM 加载完毕后, 初始化日历组件 - * @event dom ready - * @private - */ - $(document).ready( function($evt){ - if( LunarCalendar.autoInit ){ - setTimeout( function(){ - $('div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar').each( function(){ - new LunarCalendar( $(this) ); - }); - }, 100); - } - }); - /** - * LunarCalendar 日历默认模板 - * @property _deftpl - * @type string - * @static - * @private - */ - var _deftpl = - [ - '
        \n' - ,'
        \n' - ,'\n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,'
        \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,'
        \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,'
        \n' - ,' \n' - ,' \n' - ,' \n' - ,' \n' - ,'
        \n' - ,'
        \n' - ,'
        \n' - ].join(''); - -}(jQuery)); - -; - -;(function($){ - JC.LunarCalendar.getFestivals = getFestivals; - /** - * 返回农历和国历的所在日期的所有节日 - *
        假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 } - *
        返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 } - * @method getFestivals - * @static - * @for JC.LunarCalendar - * @param {Object} _lunarDate 农历日期对象, 由JC.LunarCalendar.gregorianToLunar 获取 - * @param {Date} _greDate 日期对象 - * @return Object - */ - function getFestivals( _lunarDate, _greDate ){ - var _r = { 'dayName': '', 'festivals': [], 'isHoliday': false } - , _lunarDay = [ intPad(_lunarDate.month), intPad(_lunarDate.day) ].join('') - , _greDay = [ intPad(_greDate.getMonth()+1), intPad(_greDate.getDate()) ].join('') - , _greToday = _greDate.getFullYear() + _greDay - ; - - _r.dayName = _lunarDate.ri; - if( _r.dayName == '初一' ) _r.dayName = _lunarDate.yue; - - if( _greDay in gregorianFes ) _r.festivals.push( gregorianFes[ _greDay ] ); - if( _lunarDay in lunarFes ) { - _r.festivals.push( lunarFes[ _lunarDay ] ); - } - - if( _lunarDate.month == 12 && _lunarDate.day >= 29 ){ - var _tmp = new Date(); _tmp.setTime( _greDate.getTime() ); _tmp.setDate( _tmp.getDate() + 1 ); - var _tmpLunar = JC.LunarCalendar.gregorianToLunar( _tmp ); - if( _tmpLunar.month === 1 && _tmpLunar.day === 1 ){ - var fes = lunarFes['0100']; - _r.festivals.unshift( fes ); - _r.dayName = fes.name; - } - } - - if( JC.LunarCalendar.nationalHolidays ){ - if( _greToday in JC.LunarCalendar.nationalHolidays ){ - _r.festivals.push( JC.LunarCalendar.nationalHolidays[ _greToday ] ); - } - } - - if( _r.festivals.length ){ - for( var i = 0, j = _r.festivals.length - 1; i < j; i++ ){ - for( var k = i + 1; k <= j; k++ ){ - if( _r.festivals[k].priority > _r.festivals[i].priority ){ - var _tmp = _r.festivals[i]; - _r.festivals[i] = _r.festivals[k]; - _r.festivals[k] = _tmp; - } - } - } - _r.festivals[0].name && (_r.dayName = _r.festivals[0].name); - for( var i = 0, j = _r.festivals.length; i < j; i++ ){ - if( _r.festivals[i].isHoliday ){ _r.isHoliday = true; break; } - } - for( var i = 0, j = _r.festivals.length; i < j; i++ ){ - if( _r.festivals[i].isWorkday ){ _r.isWorkday = true; break; } - } - } - - /*JC.log( _lunarDay, _greDay, _r.festivals.length );*/ - - return _r; - } - - var lunarFes = { - '0101': { 'name': '春节', 'fullname': '春节', 'priority': 8 }, - '0115': { 'name': '元宵节', 'fullname': '元宵节', 'priority': 8 }, - '0505': { 'name': '端午节', 'fullname': '端午节', 'priority': 8 }, - '0707': { 'name': '七夕', 'fullname': '七夕情人节', 'priority': 5 }, - '0715': { 'name': '中元节', 'fullname': '中元节', 'priority': 5 }, - '0815': { 'name': '中秋节', 'fullname': '中秋节', 'priority': 8 }, - '0909': { 'name': '重阳节', 'fullname': '重阳节', 'priority': 5 }, - '1208': { 'name': '腊八节', 'fullname': '腊八节', 'priority': 5 }, - '1223': { 'name': '小年', 'fullname': '小年', 'priority': 5 }, - '0100': { 'name': '除夕', 'fullname': '除夕', 'priority': 8 } - }; - - var gregorianFes = { - '0101': { 'name': '元旦节', 'fullname': '元旦节', 'priority': 6 }, - '0202': { 'name': '湿地日', 'fullname': '世界湿地日', 'priority': 1 }, - '0210': { 'name': '气象节', 'fullname': '国际气象节', 'priority': 1 }, - '0214': { 'name': '情人节', 'fullname': '情人节', 'priority': 3 }, - '0301': { 'name': '', 'fullname': '国际海豹日', 'priority': 1 }, - '0303': { 'name': '', 'fullname': '全国爱耳日', 'priority': 1 }, - '0305': { 'name': '学雷锋', 'fullname': '学雷锋纪念日', 'priority': 1 }, - '0308': { 'name': '妇女节', 'fullname': '妇女节', 'priority': 3 }, - '0312': { 'name': '植树节', 'fullname': '植树节 孙中山逝世纪念日', 'priority': 2 }, - '0314': { 'name': '', 'fullname': '国际警察日', 'priority': 1 }, - '0315': { 'name': '消权日', 'fullname': '消费者权益日', 'priority': 1 }, - '0317': { 'name': '', 'fullname': '中国国医节 国际航海日', 'priority': 1 }, - '0321': { 'name': '', 'fullname': '世界森林日 消除种族歧视国际日 世界儿歌日', 'priority': 1 }, - '0322': { 'name': '', 'fullname': '世界水日', 'priority': 1 }, - '0323': { 'name': '气象日', 'fullname': '世界气象日', 'priority': 1 }, - '0324': { 'name': '', 'fullname': '世界防治结核病日', 'priority': 1 }, - '0325': { 'name': '', 'fullname': '全国中小学生安全教育日', 'priority': 1 }, - '0401': { 'name': '愚人节', 'fullname': '愚人节 全国爱国卫生运动月(四月) 税收宣传月(四月)', 'priority': 2 }, - '0407': { 'name': '卫生日', 'fullname': '世界卫生日', 'priority': 1 }, - '0422': { 'name': '地球日', 'fullname': '世界地球日', 'priority': 1 }, - '0423': { 'name': '', 'fullname': '世界图书和版权日', 'priority': 1 }, - '0424': { 'name': '', 'fullname': '亚非新闻工作者日', 'priority': 1 }, - '0501': { 'name': '劳动节', 'fullname': '劳动节', 'priority': 6 }, - '0504': { 'name': '青年节', 'fullname': '青年节', 'priority': 1 }, - '0505': { 'name': '', 'fullname': '碘缺乏病防治日', 'priority': 1 }, - '0508': { 'name': '', 'fullname': '世界红十字日', 'priority': 1 }, - '0512': { 'name': '护士节', 'fullname': '国际护士节', 'priority': 1 }, - '0515': { 'name': '家庭日', 'fullname': '国际家庭日', 'priority': 1 }, - '0517': { 'name': '电信日', 'fullname': '国际电信日', 'priority': 1 }, - '0518': { 'name': '', 'fullname': '国际博物馆日', 'priority': 1 }, - '0520': { 'name': '', 'fullname': '全国学生营养日', 'priority': 1 }, - '0523': { 'name': '', 'fullname': '国际牛奶日', 'priority': 1 }, - '0531': { 'name': '无烟日', 'fullname': '世界无烟日', 'priority': 1 }, - '0601': { 'name': '儿童节', 'fullname': '国际儿童节', 'priority': 6 }, - '0605': { 'name': '', 'fullname': '世界环境保护日', 'priority': 1 }, - '0606': { 'name': '', 'fullname': '全国爱眼日', 'priority': 1 }, - '0617': { 'name': '', 'fullname': '防治荒漠化和干旱日', 'priority': 1 }, - '0623': { 'name': '', 'fullname': '国际奥林匹克日', 'priority': 1 }, - '0625': { 'name': '土地日', 'fullname': '全国土地日', 'priority': 1 }, - '0626': { 'name': '禁毒日', 'fullname': '国际禁毒日', 'priority': 1 }, - '0701': { 'name': '', 'fullname': '香港回归纪念日 中共诞辰 世界建筑日', 'priority': 1 }, - '0702': { 'name': '', 'fullname': '国际体育记者日', 'priority': 1 }, - '0707': { 'name': '', 'fullname': '抗日战争纪念日', 'priority': 1 }, - '0711': { 'name': '人口日', 'fullname': '世界人口日', 'priority': 1 }, - '0801': { 'name': '建军节', 'fullname': '建军节', 'priority': 1 }, - '0808': { 'name': '', 'fullname': '中国男子节(爸爸节)', 'priority': 1 }, - '0815': { 'name': '', 'fullname': '抗日战争胜利纪念', 'priority': 1 }, - '0908': { 'name': '', 'fullname': '国际扫盲日 国际新闻工作者日', 'priority': 1 }, - '0909': { 'name': '', 'fullname': '毛逝世纪念', 'priority': 1 }, - '0910': { 'name': '教师节', 'fullname': '中国教师节', 'priority': 6 }, - '0914': { 'name': '地球日', 'fullname': '世界清洁地球日', 'priority': 1 }, - '0916': { 'name': '', 'fullname': '国际臭氧层保护日', 'priority': 1 }, - '0918': { 'name': '九一八', 'fullname': '九·一八事变纪念日', 'priority': 1 }, - '0920': { 'name': '爱牙日', 'fullname': '国际爱牙日', 'priority': 1 }, - '0927': { 'name': '旅游日', 'fullname': '世界旅游日', 'priority': 1 }, - '0928': { 'name': '', 'fullname': '孔子诞辰', 'priority': 1 }, - '1001': { 'name': '国庆节', 'fullname': '国庆节 世界音乐日 国际老人节', 'priority': 6 }, - '1002': { 'name': '', 'fullname': '国际和平与民主自由斗争日', 'priority': 1 }, - '1004': { 'name': '', 'fullname': '世界动物日', 'priority': 1 }, - '1006': { 'name': '', 'fullname': '老人节', 'priority': 1 }, - '1008': { 'name': '', 'fullname': '全国高血压日 世界视觉日', 'priority': 1 }, - '1009': { 'name': '邮政日', 'fullname': '世界邮政日 万国邮联日', 'priority': 1 }, - '1010': { 'name': '', 'fullname': '辛亥革命纪念日 世界精神卫生日', 'priority': 1 }, - '1013': { 'name': '', 'fullname': '世界保健日 国际教师节', 'priority': 1 }, - '1014': { 'name': '', 'fullname': '世界标准日', 'priority': 1 }, - '1015': { 'name': '', 'fullname': '国际盲人节(白手杖节)', 'priority': 1 }, - '1016': { 'name': '粮食日', 'fullname': '世界粮食日', 'priority': 1 }, - '1017': { 'name': '', 'fullname': '世界消除贫困日', 'priority': 1 }, - '1022': { 'name': '', 'fullname': '世界传统医药日', 'priority': 1 }, - '1024': { 'name': '', 'fullname': '联合国日', 'priority': 1 }, - '1031': { 'name': '勤俭日', 'fullname': '世界勤俭日', 'priority': 1 }, - '1107': { 'name': '', 'fullname': '十月社会主义革命纪念日', 'priority': 1 }, - '1108': { 'name': '记者日', 'fullname': '中国记者日', 'priority': 1 }, - '1109': { 'name': '', 'fullname': '全国消防安全宣传教育日', 'priority': 1 }, - '1110': { 'name': '青年节', 'fullname': '世界青年节', 'priority': 3 }, - '1111': { 'name': '', 'fullname': '国际科学与和平周(本日所属的一周)', 'priority': 1 }, - '1112': { 'name': '', 'fullname': '孙中山诞辰纪念日', 'priority': 1 }, - '1114': { 'name': '', 'fullname': '世界糖尿病日', 'priority': 1 }, - '1117': { 'name': '', 'fullname': '国际大学生节 世界学生节', 'priority': 1 }, - '1120': { 'name': '', 'fullname': '彝族年', 'priority': 1 }, - '1121': { 'name': '', 'fullname': '彝族年 世界问候日 世界电视日', 'priority': 1 }, - '1122': { 'name': '', 'fullname': '彝族年', 'priority': 1 }, - '1129': { 'name': '', 'fullname': '国际声援巴勒斯坦人民国际日', 'priority': 1 }, - '1201': { 'name': '', 'fullname': '世界艾滋病日', 'priority': 1 }, - '1203': { 'name': '', 'fullname': '世界残疾人日', 'priority': 1 }, - '1205': { 'name': '', 'fullname': '国际经济和社会发展志愿人员日', 'priority': 1 }, - '1208': { 'name': '', 'fullname': '国际儿童电视日', 'priority': 1 }, - '1209': { 'name': '足球日', 'fullname': '世界足球日', 'priority': 1 }, - '1210': { 'name': '人权日', 'fullname': '世界人权日', 'priority': 1 }, - '1212': { 'name': '', 'fullname': '西安事变纪念日', 'priority': 1 }, - '1213': { 'name': '大屠杀', 'fullname': '南京大屠杀(1937年)纪念日!紧记血泪史!', 'priority': 1 }, - '1220': { 'name': '', 'fullname': '澳门回归纪念', 'priority': 1 }, - '1221': { 'name': '篮球日', 'fullname': '国际篮球日', 'priority': 1 }, - '1224': { 'name': '平安夜', 'fullname': '平安夜', 'priority': 1 }, - '1225': { 'name': '圣诞节', 'fullname': '圣诞节', 'priority': 1 }, - '1226': { 'name': '', 'fullname': '毛诞辰纪念', 'priority': 1 } - }; - - var byDayOrWeekFes = { - '0150': { 'name': '麻风日', 'fullname': '世界麻风日', 'priority': 1 }, //一月的最后一个星期日(月倒数第一个星期日) - '0520': { 'name': '母亲节', 'fullname': '国际母亲节', 'priority': 1 }, - '0530': { 'name': '助残日', 'fullname': '全国助残日', 'priority': 1 }, - '0630': { 'name': '父亲节', 'fullname': '父亲节', 'priority': 1 }, - '0730': { 'name': '', 'fullname': '被奴役国家周', 'priority': 1 }, - '0932': { 'name': '和平日', 'fullname': '国际和平日', 'priority': 1 }, - '0940': { 'name': '聋人节 世界儿童日', 'fullname': '国际聋人节 世界儿童日', 'priority': 1 }, - '0950': { 'name': '海事日', 'fullname': '世界海事日', 'priority': 1 }, - '1011': { 'name': '住房日', 'fullname': '国际住房日', 'priority': 1 }, - '1013': { 'name': '减灾日', 'fullname': '国际减轻自然灾害日(减灾日)', 'priority': 1 }, - '1144': { 'name': '感恩节', 'fullname': '感恩节', 'priority': 1 } - }; - - /** - * 为数字添加前置0 - * @method JC.LunarCalendar.getFestival.intPad - * @param {int} _n 需要添加前置0的数字 - * @param {int} _len 需要添加_len个0, 默认为2 - * @return {string} - * @static - * @private - */ - function intPad( _n, _len ){ - if( typeof _len == 'undefined' ) _len = 2; - _n = new Array( _len + 1 ).join('0') + _n; - return _n.slice( _n.length - _len ); - } - -}(jQuery)); -; - -;(function($){ - /** - * 从公历日期获得农历日期 - *
        返回的数据格式 - *
        -        {
        -            shengxiao: ''   //生肖
        -            , ganzhi: ''    //干支
        -            , yue: ''       //月份
        -            , ri: ''        //日
        -            , shi: ''       //时
        -            , year: ''      //农历数字年
        -            , month: ''     //农历数字月
        -            , day: ''       //农历数字天
        -            , hour: ''      //农历数字时
        -        };
        -     * 
        - * @method gregorianToLunar - * @static - * @for JC.LunarCalendar - * @param {date} _date 要获取农历日期的时间对象 - * @return Object - */ - JC.LunarCalendar.gregorianToLunar = gregorianToLunar; - - function gregorianToLunar( _date ){ - var _r = { - shengxiao: '' //生肖 - , ganzhi: '' //干支 - , yue: '' //月份 - , ri: '' //日 - , shi: '' //时 - , year: '' //农历数字年 - , month: '' //农历数字月 - , day: '' //农历数字天 - , hour: '' //农历数字时 - }; - - var _lunar = toLunarDate( _date ); - _r.year = _lunar.y; - _r.month = _lunar.m + 1; - _r.day = _lunar.d; - - //JC.log( _r.year, _r.month, _r.day, ' ', _date.getFullYear(), _date.getMonth()+1, _date.getDate() ); - - _r.shengxiao = shengxiao.charAt((_r.year - 4) % 12); - _r.ganzhi = tiangan.charAt((_r.year - 4) % 10) + dizhi.charAt((_r.year - 4) % 12); - - if(_lunar.isleep) { - _r.yue = "闰" + yuefan.charAt(_r.month - 1); - } - else{ - _r.yue = yuefan.charAt(_r.month - 1); - } - _r.yue += '月'; - - _r.ri = (_r.day < 11) ? "初" : ((_r.day < 20) ? "十" : ((_r.day < 30) ? "廿" : "卅")); - if (_r.day % 10 != 0 || _r.day == 10) { - _r.ri += shuzi.charAt((_r.day - 1) % 10); - } - _r.ri == "廿" && ( _r.ri = "二十" ); - _r.ri == "卅" && ( _r.ri = "三十" ); - /*JC.log( 'month:', _r.month, 2 );*/ - - _r.shi = dizhi.charAt((_r.hour - 1) % 12); - return _r; - }; - - function getBit(m, n) { return (m >> n) & 1; } - - var tiangan = "甲乙丙丁戊己庚辛壬癸"; - var dizhi = "子丑寅卯辰巳午未申酉戌亥"; - var shengxiao = "鼠牛虎兔龙蛇马羊猴鸡狗猪"; - var yuefan = "正二三四五六七八九十冬腊"; - var xingqi = "日一二三四五六"; - var shuzi = "一二三四五六七八九十"; - var lunarDays = [0x41A95,0xD4A,0xDA5,0x20B55,0x56A,0x7155B,0x25D,0x92D,0x5192B,0xA95,0xB4A,0x416AA,0xAD5,0x90AB5,0x4BA,0xA5B,0x60A57,0x52B,0xA93,0x40E95]; - var lunarMonth = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; - - ;void function(){ - var lunarDate=function(r){function l(a){for(var c=348,b=32768;b>8;b>>=1)c+=h[a-1900]&b?1:0;return c+(i(a)?(h[a-1899]&15)==15?30:29:0)}function i(a){a=h[a-1900]&15;return a==15?0:a}function o(a){if(!a||!a.getFullYear)return!1;var c=a.getFullYear(),b=a.getMonth(),a=a.getDate();return Date.UTC(c,b,a)>Date.UTC(2101,0,28)||Date.UTC(c,b,a)0;b++)d=l(b),c-=d;c<0&&(c+=d,b--);lunarYear=b;_isLeap=!1;leap= - i(lunarYear);for(b=1;b<13&&c>0;b++)leap>0&&b==leap+1&&_isLeap==!1?(b--,_isLeap=!0,d=i(lunarYear)?(h[lunarYear-1899]&15)==15?30:29:0):d=h[lunarYear-1900]&65536>>b?30:29,_isLeap==!0&&b==leap+1&&(_isLeap=!1),c-=d;c==0&&leap>0&&b==leap+1&&(_isLeap?_isLeap=!1:(_isLeap=!0,b--));c<0&&(c+=d,b--);lunarMonth=b-1;lunarDay=c+1;return{y:lunarYear,m:lunarMonth,d:lunarDay,leap:leap,isleep:_isLeap,toString:function(){var a=_isLeap?"(\u95f0)":"",b=g[parseInt(lunarYear/1E3)]+g[parseInt(lunarYear%1E3/100)]+g[parseInt(lunarYear% - 100/10)]+g[parseInt(lunarYear%10)],c=parseInt((lunarMonth+1)/10)==0?"":p[1];c+=g[parseInt((lunarMonth+1)%10)];var d=p[parseInt(lunarDay/10)];d+=parseInt(lunarDay%10)==0?"":g[parseInt(lunarDay%10)];return""+b+"\u5e74"+c+"\u6708"+a+d+"\u65e5"}}};this.toSolar=function(){if(arguments.length==0)return m;else{var a,c,b;arguments[0]&&(a=arguments[0]);c=arguments[1]?arguments[1]:0;b=arguments[2]?arguments[2]:1;for(var d=0,e=1900;e>e?30:29,d+=f;d+= - b-1;return new Date(Date.UTC(1900,0,31)+d*864E5)}};this.ganzhi=function(a){function c(a,b){return(new Date(3.15569259747E10*(a-1900)+v[b]*6E4+Date.UTC(1900,0,6,2,5))).getUTCDate()}function b(a){return s[a%10]+t[a%12]}var d=a||m;if(o(d)){return"the function[ganzhi()] date'range[1900/0/31-2101/0/28]";throw"dateRangeError";}var e=d.getFullYear(),f=d.getMonth(),a=d.getDate(),d=d.getHours(),h,g,k,j,n;g=f<2?e-1900+36-1:e-1900+36;k=(e-1900)*12+f+12;h=c(e,f*2);var i=c(e,f*2+1);h=a==h?q[f*2]:a==i?q[f*2+1]: - "";var i=c(e,2),l=c(e,f*2);f==1&&a>=i&&(g=e-1900+36);a+1>=l&&(k=(e-1900)*12+f+13);j=Date.UTC(e,f,1,0,0,0,0)/864E5+25577+a-1;n=j%10%5*12+parseInt(d/2)%12;d==23&&j++;g%=60;k%=60;j%=60;n%=60;return{y:g,m:k,d:j,h:n,jie:h,animal:u[g%12],toString:function(a){var c=b(g)+b(k)+b(j)+b(n);return a?c.substring(0,a):c}}}}; - lunarDate(); - }.call( window ); -}(jQuery)); -; +;(function(define, _win) { 'use strict'; define( + [ + 'JC.LunarCalendar.default' + , 'JC.LunarCalendar.getFestival' + , 'JC.LunarCalendar.gregorianToLunar' + , 'JC.LunarCalendar.nationalHolidays' + ], function(){ + /** + * 这个判断是为了向后兼容 JC 0.1 + * 使用 requirejs 的项目可以移除这段判断代码 + */ + JC.use + && JC.PATH + && JC.use([ + JC.PATH + 'comps/LunarCalendar/LunarCalendar.default.js' + , JC.PATH + 'comps/LunarCalendar/LunarCalendar.getFestival.js' + , JC.PATH + 'comps/LunarCalendar/LunarCalendar.gregorianToLunar.js' + , JC.PATH + 'comps/LunarCalendar/LunarCalendar.nationalHolidays.js' + ].join()) + ; + + return JC.LunarCalendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); -;(function($){ - var o = JC.LunarCalendar.nationalHolidays = JC.LunarCalendar.nationalHolidays || {}; - //2013 元旦 - o['20130101'] = { 'isHoliday': true }; - o['20130102'] = { 'isHoliday': true }; - o['20130103'] = { 'isHoliday': true }; - o['20130104'] = { 'isWorkday': true }; - o['20130105'] = { 'isWorkday': true }; - //除夕 春节 - o['20130209'] = { 'isHoliday': true }; - o['20130210'] = { 'isHoliday': true }; - o['20130211'] = { 'isHoliday': true }; - o['20130212'] = { 'isHoliday': true }; - o['20130213'] = { 'isHoliday': true }; - o['20130214'] = { 'isHoliday': true }; - o['20130215'] = { 'isHoliday': true }; - o['20130216'] = { 'isWorkday': true }; - o['20130217'] = { 'isWorkday': true }; - //清明 - o['20130404'] = { 'name': '清明节', 'fullname': '清明节', 'priority': 8, 'isHoliday': true }; - o['20130405'] = { 'isHoliday': true }; - o['20130406'] = { 'isHoliday': true }; - o['20130407'] = { 'isWorkday': true }; - //劳动节 - o['20130427'] = { 'isWorkday': true }; - o['20130428'] = { 'isWorkday': true }; - o['20130429'] = { 'isHoliday': true }; - o['20130430'] = { 'isHoliday': true }; - o['20130501'] = { 'isHoliday': true }; - //端午节 - o['20130608'] = { 'isWorkday': true }; - o['20130609'] = { 'isWorkday': true }; - o['20130610'] = { 'isHoliday': true }; - o['20130611'] = { 'isHoliday': true }; - o['20130612'] = { 'isHoliday': true }; - //中秋节 - o['20130919'] = { 'isHoliday': true }; - o['20130920'] = { 'isHoliday': true }; - o['20130921'] = { 'isHoliday': true }; - o['20130922'] = { 'isWorkday': true }; - //国庆节 - o['20130929'] = { 'isWorkday': true }; - o['20131001'] = { 'isHoliday': true }; - o['20131002'] = { 'isHoliday': true }; - o['20131003'] = { 'isHoliday': true }; - o['20131004'] = { 'isHoliday': true }; - o['20131005'] = { 'isHoliday': true }; - o['20131006'] = { 'isHoliday': true }; - o['20131007'] = { 'isHoliday': true }; - o['20131012'] = { 'isWorkday': true }; - //2014 元旦 - o['20131228'] = { 'isWorkday': true }; - o['20131229'] = { 'isWorkday': true }; - o['20131230'] = { 'isHoliday': true }; - o['20131231'] = { 'isHoliday': true }; - o['20140101'] = { 'isHoliday': true }; - //除夕 春节 - o['20140126'] = { 'isWorkday': true }; - o['20140130'] = { 'isHoliday': true }; - o['20140131'] = { 'isHoliday': true }; - o['20140201'] = { 'isHoliday': true }; - o['20140202'] = { 'isHoliday': true }; - o['20140203'] = { 'isHoliday': true }; - o['20140204'] = { 'isHoliday': true }; - o['20140205'] = { 'isHoliday': true }; - o['20140208'] = { 'isWorkday': true }; - //清明节 - o['20140405'] = { 'name': '清明节', 'fullname': '清明节', 'priority': 8, 'isHoliday': true }; - o['20140406'] = { 'isHoliday': true }; - o['20140407'] = { 'isHoliday': true }; - //劳动节 - o['20140501'] = { 'isHoliday': true }; - o['20140502'] = { 'isHoliday': true }; - o['20140503'] = { 'isHoliday': true }; - o['20140504'] = { 'isWorkday': true }; - //端午节 - o['20140531'] = { 'isHoliday': true }; - o['20140601'] = { 'isHoliday': true }; - o['20140602'] = { 'isHoliday': true }; - //中秋节 - o['20140906'] = { 'isHoliday': true }; - o['20140907'] = { 'isHoliday': true }; - o['20140908'] = { 'isHoliday': true }; - //国庆节 - o['20140928'] = { 'isWorkday': true }; - o['20141001'] = { 'isHoliday': true }; - o['20141002'] = { 'isHoliday': true }; - o['20141003'] = { 'isHoliday': true }; - o['20141004'] = { 'isHoliday': true }; - o['20141005'] = { 'isHoliday': true }; - o['20141006'] = { 'isHoliday': true }; - o['20141007'] = { 'isHoliday': true }; - o['20141011'] = { 'isWorkday': true }; -}(jQuery)); diff --git a/comps/LunarCalendar/LunarCalendar.nationalHolidays.js b/comps/LunarCalendar/LunarCalendar.nationalHolidays.js new file mode 100755 index 000000000..bf5aa4179 --- /dev/null +++ b/comps/LunarCalendar/LunarCalendar.nationalHolidays.js @@ -0,0 +1,100 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.LunarCalendar.default' ], function(){ + var o = JC.LunarCalendar.nationalHolidays = JC.LunarCalendar.nationalHolidays || {}; + //2013 元旦 + o['20130101'] = { 'isHoliday': true }; + o['20130102'] = { 'isHoliday': true }; + o['20130103'] = { 'isHoliday': true }; + o['20130104'] = { 'isWorkday': true }; + o['20130105'] = { 'isWorkday': true }; + //除夕 春节 + o['20130209'] = { 'isHoliday': true }; + o['20130210'] = { 'isHoliday': true }; + o['20130211'] = { 'isHoliday': true }; + o['20130212'] = { 'isHoliday': true }; + o['20130213'] = { 'isHoliday': true }; + o['20130214'] = { 'isHoliday': true }; + o['20130215'] = { 'isHoliday': true }; + o['20130216'] = { 'isWorkday': true }; + o['20130217'] = { 'isWorkday': true }; + //清明 + o['20130404'] = { 'name': '清明节', 'fullname': '清明节', 'priority': 8, 'isHoliday': true }; + o['20130405'] = { 'isHoliday': true }; + o['20130406'] = { 'isHoliday': true }; + o['20130407'] = { 'isWorkday': true }; + //劳动节 + o['20130427'] = { 'isWorkday': true }; + o['20130428'] = { 'isWorkday': true }; + o['20130429'] = { 'isHoliday': true }; + o['20130430'] = { 'isHoliday': true }; + o['20130501'] = { 'isHoliday': true }; + //端午节 + o['20130608'] = { 'isWorkday': true }; + o['20130609'] = { 'isWorkday': true }; + o['20130610'] = { 'isHoliday': true }; + o['20130611'] = { 'isHoliday': true }; + o['20130612'] = { 'isHoliday': true }; + //中秋节 + o['20130919'] = { 'isHoliday': true }; + o['20130920'] = { 'isHoliday': true }; + o['20130921'] = { 'isHoliday': true }; + o['20130922'] = { 'isWorkday': true }; + //国庆节 + o['20130929'] = { 'isWorkday': true }; + o['20131001'] = { 'isHoliday': true }; + o['20131002'] = { 'isHoliday': true }; + o['20131003'] = { 'isHoliday': true }; + o['20131004'] = { 'isHoliday': true }; + o['20131005'] = { 'isHoliday': true }; + o['20131006'] = { 'isHoliday': true }; + o['20131007'] = { 'isHoliday': true }; + o['20131012'] = { 'isWorkday': true }; + //2014 元旦 + o['20140101'] = { 'isHoliday': true }; + //除夕 春节 + o['20140126'] = { 'isWorkday': true }; + o['20140131'] = { 'isHoliday': true }; + o['20140201'] = { 'isHoliday': true }; + o['20140202'] = { 'isHoliday': true }; + o['20140203'] = { 'isHoliday': true }; + o['20140204'] = { 'isHoliday': true }; + o['20140205'] = { 'isHoliday': true }; + o['20140206'] = { 'isHoliday': true }; + o['20140208'] = { 'isWorkday': true }; + //清明节 + o['20140405'] = { 'name': '清明节', 'fullname': '清明节', 'priority': 8, 'isHoliday': true }; + o['20140406'] = { 'isHoliday': true }; + o['20140407'] = { 'isHoliday': true }; + //劳动节 + o['20140501'] = { 'isHoliday': true }; + o['20140502'] = { 'isHoliday': true }; + o['20140503'] = { 'isHoliday': true }; + o['20140504'] = { 'isWorkday': true }; + //端午节 + o['20140531'] = { 'isHoliday': true }; + o['20140601'] = { 'isHoliday': true }; + o['20140602'] = { 'isHoliday': true }; + //中秋节 + o['20140906'] = { 'isHoliday': true }; + o['20140907'] = { 'isHoliday': true }; + o['20140908'] = { 'isHoliday': true }; + //国庆节 + o['20140928'] = { 'isWorkday': true }; + o['20141001'] = { 'isHoliday': true }; + o['20141002'] = { 'isHoliday': true }; + o['20141003'] = { 'isHoliday': true }; + o['20141004'] = { 'isHoliday': true }; + o['20141005'] = { 'isHoliday': true }; + o['20141006'] = { 'isHoliday': true }; + o['20141007'] = { 'isHoliday': true }; + o['20141011'] = { 'isWorkday': true }; + + return JC.LunarCalendar; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/LunarCalendar/_demo/crm_example.html b/comps/LunarCalendar/_demo/crm_example.html old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/_demo/data/dataspan.php b/comps/LunarCalendar/_demo/data/dataspan.php old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/_demo/data/json.js b/comps/LunarCalendar/_demo/data/json.js old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/_demo/demo.html b/comps/LunarCalendar/_demo/demo.html old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/_demo/index.php b/comps/LunarCalendar/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/index.php b/comps/LunarCalendar/index.php old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/nodejs_merge.js b/comps/LunarCalendar/nodejs_merge.js old mode 100644 new mode 100755 index b7f8dc3e1..68d268bde --- a/comps/LunarCalendar/nodejs_merge.js +++ b/comps/LunarCalendar/nodejs_merge.js @@ -1,25 +1,30 @@ -var fs = require('fs'); +var _fs = require('fs'); -var dir = __dirname + '/'; +var _dir = __dirname + '/' + , _paths = [] + , _contents = [] + , _outputName = 'LunarCalendar.js' + ; -var path1 = dir + 'JC.LunarCalendar.js'; -var path3 = dir + 'JC.LunarCalendar.gregorianToLunar.js'; -var path4 = dir + 'JC.LunarCalendar.nationalHolidays.js'; -var path2 = dir + 'JC.LunarCalendar.getFestival.js'; + _paths.push( _dir + 'LunarCalendar.default.js' ); + _paths.push( _dir + 'LunarCalendar.getFestival.js' ); + _paths.push( _dir + 'LunarCalendar.gregorianToLunar.js' ); + _paths.push( _dir + 'LunarCalendar.nationalHolidays.js' ); -var outPath = dir + 'LunarCalendar.js'; +for( var i = 0, j = _paths.length; i < j; i++ ){ + if( ! _fs.existsSync( _paths[i] ) ) return; +} -if( !( fs.existsSync( path1 ) && fs.existsSync( path2 ) && fs.existsSync( path3 ) && fs.existsSync( path4 ) ) ) return; +for( var i = 0, j = _paths.length; i < j; i++ ){ + _contents.push( _fs.readFileSync( _paths[i], 'utf8') ); +} -var tmp = []; - tmp.push( fs.readFileSync( path1, 'utf8') ); - tmp.push( fs.readFileSync( path2, 'utf8') ); - tmp.push( fs.readFileSync( path3, 'utf8') ); - tmp.push( fs.readFileSync( path4, 'utf8') ); +_fs.writeFileSync( _dir + _outputName, _contents.join(';\n') ); + +for( var i = 0, j = _paths.length; i < j; i++ ){ + _fs.unlinkSync( _paths[i] ); +} + +console.log( 'merge done: ' + _outputName ); -fs.writeFileSync( outPath, tmp.join(';\n\n') ); -fs.unlinkSync( path1 ); -fs.unlinkSync( path2 ); -fs.unlinkSync( path3 ); -fs.unlinkSync( path4 ); diff --git a/comps/LunarCalendar/res/default/images/LunarCalendar.gif b/comps/LunarCalendar/res/default/images/LunarCalendar.gif old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/res/default/images/UpAndDown.gif b/comps/LunarCalendar/res/default/images/UpAndDown.gif old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/res/default/images/icon.gif b/comps/LunarCalendar/res/default/images/icon.gif old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/res/default/style.css b/comps/LunarCalendar/res/default/style.css old mode 100644 new mode 100755 diff --git a/comps/LunarCalendar/res/default/style.html b/comps/LunarCalendar/res/default/style.html old mode 100644 new mode 100755 diff --git a/comps/NumericStepper/NumericStepper.js b/comps/NumericStepper/NumericStepper.js new file mode 100755 index 000000000..82c64a0d3 --- /dev/null +++ b/comps/NumericStepper/NumericStepper.js @@ -0,0 +1,379 @@ + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 数值加减 + *
        响应式初始化 + * + *

        require: + * jQuery + * , JC.common + * , JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 (div|span) class="js_compNumericStepper"

        + * + *

        可用的 HTML attribute

        + *
        + *
        cnsMinusButton = selector
        + *
        减少数值的 selector
        + * + *
        cnsPlusButton = selector
        + *
        增加数值的 selector
        + * + *
        cnsTarget = selector
        + *
        目标文本框的 selector
        + * + *
        cnsChangeCb = function
        + *
        内容改变后的回调 +
        function cnsChangeCb( _newVal, _oldVal, _ins ){
        +    var _ipt = $(this);
        +    JC.log( 'cnsChangeCb: ', _newVal, _oldVal );
        +}
        + *
        + * + *
        cnsBeforeChangeCb = function
        + *
        内容改变前的回调, 如果显式返回 false 将终止内容变更 +
        function cnsBeforeChangeCb( _newVal, _oldVal, _ins ){
        +    var _ipt = $(this);
        +    JC.log( 'cnsBeforeChangeCb: ', _newVal, _oldVal );
        +    if( _newVal > 5 ) return false;
        +}
        + *
        + *
        + *

        textbox 可用的 HTML attribute

        + *
        + *
        minvalue = number
        + *
        最小值
        + * + *
        maxvalue = number
        + *
        最大值
        + * + *
        step = number, default = 1
        + *
        每次变更的步长
        + * + *
        fixed = int, default = 0
        + *
        显示多少位小数点
        + *
        + * + * @namespace JC + * @class NumericStepper + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-01-18 + * @author qiushaowei | 75 Team + * @example +

        JC.NumericStepper 示例

        + + + + + + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.NumericStepper = NumericStepper; + + function NumericStepper( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, NumericStepper ) ) + return JC.BaseMVC.getInstance( _selector, NumericStepper ); + + JC.BaseMVC.getInstance( _selector, NumericStepper, this ); + + this._model = new NumericStepper.Model( _selector ); + this._view = new NumericStepper.View( this._model ); + + this._init(); + + JC.log( NumericStepper.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 NumericStepper 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of NumericStepperInstance} + */ + NumericStepper.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compNumericStepper' ) ){ + _r.push( new NumericStepper( _selector ) ); + }else{ + _selector.find( 'div.js_compNumericStepper, span.js_compNumericStepper' ).each( function(){ + _r.push( new NumericStepper( this ) ); + }); + } + } + return _r; + }; + /** + * 按下鼠标时 重复执行的频率 + * @property redoMs + * @type ms + * @default 100 + * @static + */ + NumericStepper.redoMs = 100; + /** + * 按下鼠标时 延迟 多少毫秒执行重复执行 + * @property timeoutMs + * @type ms + * @default 100 + * @static + */ + NumericStepper.timeoutMs = 500; + + NumericStepper.defaultMouseUp = + function( _evt ){ + if( !NumericStepper._currentIns ) return; + JC.f.safeTimeout( null, NumericStepper._currentIns._model.cnsTarget(), NumericStepper.Model.REDO_TM_NAME ); + NumericStepper.Model.interval && clearInterval( NumericStepper.Model.interval ); + }; + NumericStepper._currentIns; + + JC.BaseMVC.build( NumericStepper ); + + JC.f.extendObject( NumericStepper.prototype, { + _beforeInit: + function(){ + //JC.log( 'NumericStepper _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + _p._model.cnsMinusButton() + && ( _p._model.cnsMinusButton().on( 'mousedown', function( _evt ){ + + NumericStepper._currentIns = _p; + _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_MINUS ] ); + + JC.f.safeTimeout( function(){ + NumericStepper.Model.interval && clearInterval( NumericStepper.Model.interval ); + NumericStepper.Model.interval = + setInterval( function(){ + _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_MINUS ] ); + }, _p._model.cnsRedoMs() ); + }, _p._model.cnsTarget(), NumericStepper.Model.REDO_TM_NAME, _p._model.cnsTimeoutMs() ); + + _jwin.on( 'mouseup', NumericStepper.defaultMouseUp ); + }), _p._model.cnsMinusButton().each( function(){ + BaseMVC.getInstance( $( this ), NumericStepper, _p ); + } ) ); + + _p._model.cnsPlusButton() + && ( _p._model.cnsPlusButton().on( 'mousedown', function( _evt ){ + + NumericStepper._currentIns = _p; + _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_PLUS ] ); + + JC.f.safeTimeout( function(){ + NumericStepper.Model.interval && clearInterval( NumericStepper.Model.interval ); + NumericStepper.Model.interval = + setInterval( function(){ + _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_PLUS ] ); + }, _p._model.cnsRedoMs() ); + }, _p._model.cnsTarget(), NumericStepper.Model.REDO_TM_NAME, _p._model.cnsTimeoutMs() ); + + _jwin.on( 'mouseup', NumericStepper.defaultMouseUp ); + }), _p._model.cnsPlusButton().each( function(){ + BaseMVC.getInstance( $( this ), NumericStepper, _p ); + } ) ); + + _p.on( NumericStepper.Model.CALC, function( _evt, _type ){ + if( !( _p._model.cnsTarget() && _p._model.cnsTarget().length ) ) return; + //JC.log( 'NumericStepper.Model.CALC', _type ); + var _val = _p._model.val() + , _newVal = _val + , _step = _p._model.step() + , _fixed = _p._model.fixed() + , _minvalue = _p._model.minvalue() + , _maxvalue = _p._model.maxvalue() + ; + + switch( _type ){ + case NumericStepper.Model.CALC_MINUS: + _newVal -= _step; + + _p._model.isMinvalue() + && _newVal < _minvalue + && ( _newVal = _minvalue ) + ; + break; + + case NumericStepper.Model.CALC_PLUS: + _newVal += _step; + + _p._model.isMaxvalue() + && _newVal > _maxvalue + && ( _newVal = _maxvalue ) + ; + break; + } + + //JC.log( _p._model.isMaxvalue(), _newVal, _val, _step, _fixed, _minvalue, _minvalue, new Date().getTime() ); + if( _newVal === _val ) return; + + if( _p._model.cnsBeforeChangeCb() + && _p._model.cnsBeforeChangeCb().call( _p._model.cnsTarget(), _newVal, _val, _p ) === false ) return; + + _p._model.cnsTarget().val( JC.f.parseFinance( _newVal, _fixed ).toFixed( _fixed ) ); + + _p._model.cnsChangeCb() + && _p._model.cnsChangeCb().call( _p._model.cnsTarget(), _newVal, _val, _p ) + ; + }); + } + + , _inited: + function(){ + //JC.log( 'NumericStepper _inited', new Date().getTime() ); + this._view.initStyle(); + } + /** + * 增加一个 step + * @method plus + */ + , plus: + function(){ + this.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_PLUS ] ); + return this; + } + /** + * 减少一个 step + * @method minus + */ + , minus: + function(){ + this.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_MINUS ] ); + return this; + } + }); + + NumericStepper.Model._instanceName = 'JCNumericStepper'; + + NumericStepper.Model.CALC = 'calc'; + NumericStepper.Model.CALC_MINUS = 'minus'; + NumericStepper.Model.CALC_PLUS = 'plus'; + + NumericStepper.Model.CLASS_ICON = 'cnsIcon'; + NumericStepper.Model.CLASS_MINUS = 'cnsMinus'; + NumericStepper.Model.CLASS_PLUS = 'cnsPlus'; + + NumericStepper.Model.REDO_TM_NAME = "cnsTm"; + + JC.f.extendObject( NumericStepper.Model.prototype, { + init: + function(){ + //JC.log( 'NumericStepper.Model.init:', new Date().getTime() ); + } + + , cnsTarget: function(){ return this.selectorProp( 'cnsTarget' ); } + + , cnsMinusButton: function(){ return this.selectorProp( 'cnsMinusButton' ); } + , cnsPlusButton: function(){ return this.selectorProp( 'cnsPlusButton' ); } + + , cnsBeforeChangeCb: function(){ return this.callbackProp( 'cnsBeforeChangeCb' ) || NumericStepper.beforeChangeCb; } + , cnsChangeCb: function(){ return this.callbackProp( 'cnsChangeCb' ) || NumericStepper.changeCb; } + + , cnsRedoMs: function(){ return this.intProp( 'cnsRedoMs' ) || NumericStepper.redoMs; } + , cnsTimeoutMs: function(){ return this.intProp( 'cnsTimeoutMs' ) || NumericStepper.timeoutMs; } + + , isMinvalue: function(){ return this.cnsTarget().is( '[minvalue]' ); } + , isMaxvalue: function(){ return this.cnsTarget().is( '[maxvalue]' ); } + + , val: function(){ return this.getVal( this.cnsTarget().val() ); } + + , minvalue: function(){ return this.getVal( this.cnsTarget().attr( 'minvalue' ) ); } + , maxvalue: function(){ return this.getVal( this.cnsTarget().attr( 'maxvalue' ) ); } + + , step: function(){ return this.getVal( this.cnsTarget().attr( 'step' ) ) || 1; } + , fixed: function(){ return this.getVal( this.cnsTarget().attr( 'fixed' ) ) || 0; } + + , getVal: + function( _v ){ + var _r = 0; + _v && ( _v = _v.toString().trim() ); + + if( _v ){ + + if( /\./.test( _v ) ){ + _r = JC.f.parseFinance( _v, _v.split('.')[1].length || this.fixed() ); + }else{ + _r = parseInt( _v, 10 ) || 0; + } + } + + return _r; + } + }); + + JC.f.extendObject( NumericStepper.View.prototype, { + init: + function(){ + //JC.log( 'NumericStepper.View.init:', new Date().getTime() ); + } + + , initStyle: + function(){ + var _p = this; + + _p._model.cnsMinusButton() + && _p._model.cnsMinusButton() + .addClass( NumericStepper.Model.CLASS_ICON ) + .addClass( NumericStepper.Model.CLASS_MINUS ) + ; + + _p._model.cnsPlusButton() + && _p._model.cnsPlusButton() + .addClass( NumericStepper.Model.CLASS_ICON ) + .addClass( NumericStepper.Model.CLASS_PLUS ) + ; + } + }); + + _jdoc.ready( function(){ + //NumericStepper.autoInit && NumericStepper.init(); + }); + + $( document ).delegate( 'div.js_compNumericStepper, span.js_compNumericStepper', 'mouseenter', function( _evt ){ + var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, NumericStepper ); + !_ins && ( new NumericStepper( _p ) ); + }); + + $( document ).delegate( 'div.js_compNumericStepper .cnsIcon, span.js_compNumericStepper .cnsIcon', 'click', function( _evt ){ + var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, NumericStepper ); + + if( !_ins ){ + var _pnt = JC.f.getJqParent( _p, '.js_compNumericStepper' ); + if( !( _pnt && _pnt.length ) ) return; + _ins = new NumericStepper( _pnt ); + _p.hasClass( 'cnsPlus' ) ? _ins.plus() : _ins.minus(); + } + }); + + return JC.NumericStepper; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/NumericStepper/_demo/demo.html b/comps/NumericStepper/_demo/demo.html new file mode 100755 index 000000000..35ffecb71 --- /dev/null +++ b/comps/NumericStepper/_demo/demo.html @@ -0,0 +1,190 @@ + + + + +Open JQuery Components Library - suches + + + + + + + + +

        JC.NumericStepper 示例

        + +
        +
        normal
        +
        + + + + + +
        +
        + +
        +
        范围 0 ~ 100
        +
        + + + + + +
        +
        + +
        +
        范围 0 ~ 10
        +
        + + + + + +
        +
        + +
        +
        范围 -10 ~ 10, step 2
        +
        + + + + + +
        +
        + +
        +
        范围 0 ~ 1000, step 50
        +
        +
        + + + +
        +
        +
        + +
        +
        范围 0.1 ~ 1, step 0.1, fixed = 1
        +
        +
        + + + +
        +
        +
        + +
        +
        范围 0.01 ~ 1, step 0.01, fixed = 2
        +
        +
        + + + +
        +
        +
        + +
        +
        范围 0 ~ 10, cnsBeforeChangeCb(不能大于五), cnsChangeCb
        +
        + + + + + +
        +
        + + + + diff --git a/comps/NumericStepper/_demo/index.php b/comps/NumericStepper/_demo/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/comps/NumericStepper/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/NumericStepper/index.php b/comps/NumericStepper/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/comps/NumericStepper/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/NumericStepper/res/default/images/minus_20x20.png b/comps/NumericStepper/res/default/images/minus_20x20.png new file mode 100755 index 000000000..8a3c89d9d Binary files /dev/null and b/comps/NumericStepper/res/default/images/minus_20x20.png differ diff --git a/comps/NumericStepper/res/default/images/minus_22x22.png b/comps/NumericStepper/res/default/images/minus_22x22.png new file mode 100755 index 000000000..42653c1a4 Binary files /dev/null and b/comps/NumericStepper/res/default/images/minus_22x22.png differ diff --git a/comps/NumericStepper/res/default/images/minus_32x32.png b/comps/NumericStepper/res/default/images/minus_32x32.png new file mode 100755 index 000000000..4c6ee7d28 Binary files /dev/null and b/comps/NumericStepper/res/default/images/minus_32x32.png differ diff --git a/comps/NumericStepper/res/default/images/plus_20x20.png b/comps/NumericStepper/res/default/images/plus_20x20.png new file mode 100755 index 000000000..baf69750d Binary files /dev/null and b/comps/NumericStepper/res/default/images/plus_20x20.png differ diff --git a/comps/NumericStepper/res/default/images/plus_22x22.png b/comps/NumericStepper/res/default/images/plus_22x22.png new file mode 100755 index 000000000..db1d13ee6 Binary files /dev/null and b/comps/NumericStepper/res/default/images/plus_22x22.png differ diff --git a/comps/NumericStepper/res/default/images/plus_32x32.png b/comps/NumericStepper/res/default/images/plus_32x32.png new file mode 100755 index 000000000..8d19a9455 Binary files /dev/null and b/comps/NumericStepper/res/default/images/plus_32x32.png differ diff --git a/comps/NumericStepper/res/default/index.php b/comps/NumericStepper/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/comps/NumericStepper/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/NumericStepper/res/default/style.css b/comps/NumericStepper/res/default/style.css new file mode 100755 index 000000000..a928aebbc --- /dev/null +++ b/comps/NumericStepper/res/default/style.css @@ -0,0 +1,19 @@ +.js_compNumericStepper .cnsIcon { + width: 20px; + height: 20px; + border: none; + vertical-align: middle; + cursor: pointer; + padding: 0; + margin: 0; + border: 0; + /*margin-top: -6px;*/ +} + +.js_compNumericStepper .cnsMinus { + background: transparent url(./images/minus_20x20.png) no-repeat; +} + +.js_compNumericStepper .cnsPlus { + background: transparent url(./images/plus_20x20.png) no-repeat; +} diff --git a/comps/NumericStepper/res/default/style.html b/comps/NumericStepper/res/default/style.html new file mode 100755 index 000000000..df067d66a --- /dev/null +++ b/comps/NumericStepper/res/default/style.html @@ -0,0 +1,32 @@ + + + + +suches template + + + + +
        +
        JC.NumericStepper 默认样式
        +
        + + + + + +
        +
        + + + diff --git a/comps/NumericStepper/res/index.php b/comps/NumericStepper/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/comps/NumericStepper/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/Paginator/Paginator.js b/comps/Paginator/Paginator.js new file mode 100755 index 000000000..0ddfe4ef5 --- /dev/null +++ b/comps/Paginator/Paginator.js @@ -0,0 +1,396 @@ + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * Paginator 分页 + *

        实现的功能上一页,下一页,数字页,...显示页码,跳转到n页,每页显示n条记录,

        + *

        + * require: + * JC.BaseMVC + *

        + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        + *

        自动初始化.js_compPaginator下的table

        + * + *

        可用的 HTML attribute

        + *
        + *
        paginatorui
        + *
        css selector, 指定分页的模板内容将放到哪个容器里面
        + *
        paginatorcontent
        + *
        css selector, 指定取回来的数据将放到哪个容器里面
        + *
        totalrecords
        + *
        num, 共多少条记录,必填项
        + *
        perpage
        + *
        num, 每页显示多少条记录,默认10条
        + *
        perpageitems
        + *
        定义下拉框的option值,默认为[10,20,50]
        + *
        midrange
        + *
        num, default = 5。显示多少个数字页,超出的页将以...显示,比如一共有10页,那么显示前5页和最后一页,中间的以...显示
        + *
        + * + * @namespace JC + * @class Paginator + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version dev 0.1 2014-05-05 + * @author zuojing | 75 Team + * @example +
        + + 在这里添加你要的数据 +
        +
        + +
        +
        +*/ + JC.Paginator = Paginator; + JC.f.addAutoInit && JC.f.addAutoInit( Paginator ); + + function Paginator( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( Paginator.getInstance( _selector ) ) + return Paginator.getInstance( _selector ); + Paginator.getInstance( _selector, this ); + this._model = new Paginator.Model( _selector ); + this._view = new Paginator.View( this._model ); + this._init(); + } + /** + * 获取或设置 Paginator 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {PaginatorInstance} + */ + Paginator.getInstance = function ( _selector, _setter ) { + if( typeof _selector == 'string' && !/ Math.ceil(p._model.totalRecords / p._model.perPage())) { + val = 1; + } + + p.trigger('GOTOPAGE', [val, $el]); + + }); + + p.on('RENDER', function (e) { + p._view.updatePaginatorView(); + p._view.updateContentView(); + }); + + p.on('PREVPAGE', function () { + p._model.prevPage(); + }); + + p.on('NEXTPAGE', function () { + p._model.nextPage(); + }); + + p.on('GOTOPAGE', function (e, page) { + //更新分页按钮的状态 + p._model.currentPage = page; + p._view.updateContentView(); + p._view.updatePaginatorView(); + }); + + p.on('UPDATEVIEW', function (e, perPage) { + setTimeout(function () { + p._view.paginatedView(perPage); + p._model.selector().attr('perPage', perPage); + p._view.updateContentView(); + }, 20); + }); + + p.on('FLIPPED', function (e, data) { + p._model.flipped() + && p._model.flipped().call(p, p.selector(), data); + }); + + }, + + _inited: function () { + + } + + }); + + Paginator.Model._instanceName = "Paginator"; + + JC.f.extendObject( Paginator.Model.prototype, { + + paginatortype: function () { + return this.attrProp('paginatortype') || 'ajax'; + }, + + paginatorUi: function () { + var p = this, + selector = p.attrProp('paginatorui') || '.page'; + + return p.selector().find(selector); + }, + + paginatorContent: function () { + var p = this, + selector = p.attrProp('paginatorcontent') || 'tbody'; + + return p.selector().find(selector); + }, + + paginatorUiTpl: function () { + return '共{0}页,{1}条记录' + + '上一页' + + '{2}' + + '' + + '下一页' + + '' + + '每页显示' + + '' + + '到第页'; + }, + + currentPage: 1, + + perPage: function () { + return (this.intProp('perPage') || 10); + }, + + perPageOption: function () { + var items = this.attrProp('perpageitems') || '10|20|50', + i, + l, + str = '', + selected = ''; + + items = items.split('|'); + l = items.length; + for (i = 0; i < l; i++) { + selected = i === this.perPage() ? 'selected': ''; + str += ''; + } + + return str; + }, + + midRange: function () { + return (this.intProp('midRange') || 5); + }, + + totalRecords: function () { + return this.intProp('totalrecords'); + }, + + prevPage: function () { + var p = this; + + if (p.currentPage === 1) + return; + + p.currentPage--; + p.trigger('RENDER'); + + }, + + nextPage: function () { + var p = this, + total = Math.ceil(p.totalRecords() / p.perPage()); + + if (p.currentPage === total) + return; + + p.currentPage++; + p.trigger('RENDER'); + + }, + + flipped: function () { + var _p = this, + _selector = _p.selector(), + _key = "flipped"; + + return _p.callbackProp(_selector, _key); + } + }); + + JC.f.extendObject( Paginator.View.prototype, { + init: function () { + + }, + + paginatedView: function (perPage) { + + var p = this, + $box = p._model.paginatorUi(), + tpl = p._model.paginatorUiTpl(), + perPage = perPage || p._model.perPage(), + total = Math.ceil(p._model.totalRecords() / perPage) , + str = '', + i, + currentPage = p._model.currentPage; + + for (i = 1; i < total; i++) { + str += (i > p._model.midRange()) ? ('' + i + ''): ('' + i + ''); + if (total > p._model.midRange()) { + (i === 1) && (str += '...' ); + (i === total - 1) && (str += '...'); + } + } + + str += '' + total + ''; + tpl = JC.f.printf(tpl, total, p._model.totalRecords(), str); + $box.html(tpl).find('.js_perpage').val(perPage); + $box.find('.js_page').eq(currentPage - 1).addClass('cur'); + + }, + + /** + 显示表格内容 + */ + updateContentView: function () { + var p = this, + //每页显示的记录条数 + currentPage = p._model.currentPage, + perPage = p._model.perPage(), + start = (currentPage - 1) * perPage, + end = start + perPage; + + p._model.paginatorContent().find('tr').hide().slice(start, end).show(); + p.trigger('FLIPPED'); + }, + + updatePaginatorView: function () { + var p = this, + curPage = p._model.currentPage, + $box = p._model.paginatorUi(), + $fstBrk = $box.find('.js_firstBreak'), + $lstBrk = $box.find('.js_lastBreak'), + totalPage = Math.ceil(p._model.totalRecords() / p._model.perPage()), + midRange = p._model.midRange(), + halfMidRange = Math.ceil(midRange / 2), + limit = totalPage - midRange, + start, + end; + + start = (curPage - halfMidRange) > 0 ? Math.min((curPage - halfMidRange), limit): 0; + start = Math.max(start - 1, 0); + end = start + midRange; + $box.find('.js_page').not(':first').not(':last').addClass('dn').slice(start, end).removeClass("dn"); + $box.find('.js_page').eq(curPage - 1).addClass('cur').siblings().removeClass('cur'); + $fstBrk[curPage - halfMidRange > 1? 'show': 'hide'](); + $lstBrk[curPage + halfMidRange >= totalPage ? 'hide': 'show'](); + + //设置上一页的状态 + if (curPage === 1) { + $box.find('.js_prevpage').prop('disabled', true).addClass('disabled'); + } else { + $box.find('.js_prevpage').prop('disabled', false).removeClass('disabled'); + } + + //设置下一页的状态 + if (curPage === totalPage) { + $box.find('.js_nextpage').prop('disabled', true).addClass('disabled'); + } else { + $box.find('.js_nextpage').prop('disabled', false).removeClass('disabled'); + } + + } + + }); + + $(document).ready( function () { + var _insAr = 0; + Paginator.autoInit + && ( _insAr = Paginator.init() ); + }); + + return JC.Paginator; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Paginator/_demo/demo.html b/comps/Paginator/_demo/demo.html new file mode 100755 index 000000000..330262508 --- /dev/null +++ b/comps/Paginator/_demo/demo.html @@ -0,0 +1,275 @@ + + + + + 分页 + + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + 代理协议订单ID代理协议编号代理公司名称代理公司类型所属渠道销售提交时间代理协议状态
        + + + 01QS-CRM-201401-000009zyh001222local总部渠道销售32014-01-09 14:31:24待审批
        + + + 02QS-CRM-201401-000010zyh001222local总部渠道销售32014-01-09 14:31:24待审批
        + + + 03QS-CRM-201401-000011zyh001222local总部渠道销售32014-01-09 14:31:24待审批
        + + + 04QH-CRM-201401-000025zyh0012222,500,000.00-总部渠道销售3待审批
        + + + 05QH-CRM-201401-000024测试转移代理公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 06QH-CRM-201401-000025测试转移代理公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 07QH-CRM-201401-000027测试转移代理公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 08QH-CRM-201401-000028测试转移代理公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 09QH-CRM-201401-000029测试转移代公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 10QH-CRM-201401-0029测试转移代理公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 11QH-CRM-201401-000032测试转移代理公司4A渠道销售12013-12-24 11:22:38待审批
        + + + 12QH-CRM-201401-000029测试转移代理公司4A渠道销售12013-12-24 11:22:18待审批
        + + + 13QH-CRM-201401-000032测试转移代理公司4A渠道销售12013-12-24 11:22:58待审批
        + + + 14QH-CRM-201401-000029测试转移代理公司4A渠道销售12013-12-24 11:22:48待审批
        +
        + +
        +
        + + + + + + diff --git a/comps/Paginator/res/default/style.css b/comps/Paginator/res/default/style.css new file mode 100755 index 000000000..6972b2f0f --- /dev/null +++ b/comps/Paginator/res/default/style.css @@ -0,0 +1,11 @@ +.js_compPaginator tbody tr{ + display: none; +} +.js_compPaginator .page {margin-top: 15px; clear: both; overflow:hidden; zoom:1; color: #999; text-align:right;} +.js_compPaginator .page a, +.js_compPaginator .page .cur { display: inline-block; height: 24px; line-height: 24px; border: 1px solid #dedcdc; padding: 0 8px; vertical-align: middle; margin:0 2px; text-decoration: none; + color: #999; + } +.js_compPaginator .page .cur { background: #eaeaea; color: #333; font-weight: bold; border: 1px solid #c0c0c0; } +.js_compPaginator .page .disabled{ border: 0 none; cursor:default;} +.js_compPaginator .page .dn{display: none;} \ No newline at end of file diff --git a/comps/Panel/Dialog.js b/comps/Panel/Dialog.js new file mode 100755 index 000000000..ddb20f411 --- /dev/null +++ b/comps/Panel/Dialog.js @@ -0,0 +1,287 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.Panel.default' ], function(){ + var isIE6 = !!window.ActiveXObject && !window.XMLHttpRequest; + /** + * 带蒙板的会话弹框 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Panel

        + * @namespace JC + * @class Dialog + * @extends JC.Panel + * @static + * @constructor + * @param {selector|string} _selector 自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers + * @param {string} _headers 定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys + * @param {string} _bodys 定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers + * @param {string} _footers 定义模板的 footer 文字 + * @return JC.Panel + */ + var Dialog = window.Dialog = JC.Dialog = + function( _selector, _headers, _bodys, _footers ){ + if( _logic.timeout ) clearTimeout( _logic.timeout ); + var _ins; + + if( _ins = JC.Panel.getInstance( _selector ) ){ + _logic.timeout = setTimeout( function(){ + _ins.show(0); + }, _logic.showMs ); + + return _ins; + } + + if( !JC.Dialog.MULTI_MASK ){ + _logic.dialogIdentifier(); + } + // + + _ins = new JC.Panel( _selector, _headers, _bodys, _footers ); + _logic.dialogIdentifier( _ins ); + + _logic.showMask(); + _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ ); + !_ins.selector().is( '[panelclickclose]' ) && _ins.selector().attr( 'panelclickclose', false ); + + _ins.on('close_default', function( _evt, _panel){ + _logic.hideMask(); + }); + + _ins.on('hide_default', function( _evt, _panel){ + _logic.hideMask(); + }); + + _ins.on('show_default', function( _evt, _panel){ + _logic.showMask(); + + setTimeout( function(){ + _logic.showMask(); + _ins.selector().css( { 'z-index': window.ZINDEX_COUNT, 'display': 'block' } ); + window.ZINDEX_COUNT += 2; + }, 1 ); + }); + window.ZINDEX_COUNT++; + + _logic.timeout = setTimeout( function(){ + _ins.show( 0 ); + }, _logic.showMs ); + + return _ins; + }; + + Dialog.DISPLAY_LIST = []; + + /** + * 是否支持多层蒙板 + * @property MULTI_MASK + * @type boolean + * @default true + * @for JC.Dialog + * @static + */ + JC.Dialog.MULTI_MASK = true; + + /** + * 显示或隐藏 蒙板 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + * @namespace JC.Dialog + * @class mask + * @static + * @constructor + * @param {bool} _isHide 空/假 显示蒙板, 为真 隐藏蒙板 + */ + JC.Dialog.mask = + function( _isHide ){ + !_isHide && _logic.showMask(); + _isHide && _logic.hideMask(); + }; + /** + * 会话弹框逻辑处理方法集 + * @property _logic + * @for JC.Dialog + * @private + */ + var _logic = { + /** + * 设置会话弹框的唯一性 + * @method _logic.dialogIdentifier + * @for JC.Dialog + * @private + * @param {JC.Panel} _panel + */ + dialogIdentifier: + function( _panel ){ + if( !_panel ){ + _logic.hideMask(); + $('body > div.UPanelDialog_identifer').each( function(){ + var _p = $(this), _ins = Panel.getInstance( _p ); + if( !_ins ) return; + _ins.hide(); + _ins.close(); + }); + $('body > div.UPanel_TMP').remove(); + }else{ + _panel.selector().addClass('UPanelDialog_identifer'); + _panel.selector().data('DialogInstance', _panel); + Dialog.DISPLAY_LIST.push( _panel ); + } + } + /** + * 隐藏蒙板 + * @method _logic.hideMask + * @private + * @for JC.Dialog + */ + , hideMask: + function(){ + var _mask, _iframemask; + if( !JC.Dialog.MULTI_MASK ){ + _mask = $('#UPanelMask'); + _iframemask = $('#UPanelMaskIfrmae'); + _mask.length && _mask.hide(); + _iframemask.length && _iframemask.hide(); + return; + } + + JC.f.safeTimeout( function(){ + _mask = $('#UPanelMask'); + _iframemask = $('#UPanelMaskIfrmae'); + var _panel, _time = 1, _zindex, _newIndex; + + if( !( _mask.length || _iframemask.length ) ) return; + + for( var i = Dialog.DISPLAY_LIST.length - 1; i >= 0; i-- ){ + var _tmp = Dialog.DISPLAY_LIST[ i ]; + if( _tmp && _tmp.selector() && _tmp.selector().parent().length && _tmp.selector().is( ':visible' ) && _tmp.selector().offset().left >= -10 ){ + + _panel = _tmp; + //Dialog.DISPLAY_LIST = Dialog.DISPLAY_LIST.slice( 0, i ); + break; + } + } + + if( _panel ){ + //JC.log( _panel.selector().html () ); + _zindex = _panel.selector().css( 'z-index' ) || 0; + _newIndex = _zindex - 1; + if( _newIndex > 0 ){ + _mask.length && _mask.css( { 'z-index': _newIndex } ); + _iframemask.length && _iframemask.css( { 'z-index': _newIndex } ); + }else{ + _mask.length && _mask.hide(); + _iframemask.length && _iframemask.hide(); + } + }else{ + _mask.length && _mask.hide(); + _iframemask.length && _iframemask.hide(); + } + + }, null, 'JC.Dialogasdfaweasdfase', 1 ); + } + + /** + * 显示蒙板 + * @method _logic.showMask + * @private + * @for JC.Dialog + */ + , showMask: + function(){ + var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); + if( !_mask.length ){ + $( _logic.tpls.mask ).appendTo('body'); + _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); + } + _iframemask.show(); _mask.show(); + + _logic.setMaskSizeForIe6(); + + _iframemask.css('z-index', window.ZINDEX_COUNT++ ); + _mask.css('z-index', window.ZINDEX_COUNT++ ); + } + /** + * 延时处理的指针属性 + * @property _logic.timeout + * @type setTimeout + * @private + * @for JC.Dialog + */ + , timeout: null + /** + * 延时显示弹框 + *
        延时是为了使用户绑定的 show 事件能够被执行 + * @property _logic.showMs + * @type int millisecond + * @private + * @for JC.Dialog + */ + , showMs: 10 + /** + * 窗口改变大小时, 改变蒙板的大小, + *
        这个方法主要为了兼容 IE6 + * @method _logic.setMaskSizeForIe6 + * @private + * @for JC.Dialog + */ + , setMaskSizeForIe6: + function(){ + var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); + if( !( _mask.length && _iframemask.length ) ) return; + + var _css = { + 'position': 'absolute' + , 'top': '0px' + , 'left': $(document).scrollLeft() + 'px' + , 'height': $(document).height() + 'px' + , 'width': $(window).width() + 'px' + }; + + _mask.css( _css ); + _iframemask.css( _css ); + } + /** + * 保存会话弹框的所有默认模板 + * @property _logic.tpls + * @type Object + * @for JC.Dialog + * @private + */ + , tpls: { + /** + * 会话弹框的蒙板模板 + * @property _logic.tpls.mask + * @type string + * @private + */ + mask: + [ + '
        ' + , '' + ].join('') + } + }; + /** + * 响应窗口改变大小和滚动 + */ + $(window).on('resize scroll', function( _evt ){ + $('body > div.UPanelDialog_identifer').each( function(){ + var _p = $(this); + if( _p.data('DialogInstance') ){ + if( !_p.data('DialogInstance').selector().is(':visible') ) return; + if( _evt.type.toLowerCase() == 'resize' ) _p.data('DialogInstance').center(); + _logic.setMaskSizeForIe6(); + } + }); + }); + + return JC.Dialog; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Panel/Dialog.popup.js b/comps/Panel/Dialog.popup.js new file mode 100755 index 000000000..f9a15f83a --- /dev/null +++ b/comps/Panel/Dialog.popup.js @@ -0,0 +1,271 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.Dialog' ], function(){ + /** + * 会话框 msgbox 提示 (不带按钮) + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Dialog

        + * @namespace JC.Dialog + * @class msgbox + * @extends JC.Dialog + * @static + * @constructor + * @param {string} _msg 提示内容 + * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 + * @param {function} _cb 弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @param {int} _closeMs 自动关闭的间隔, 单位毫秒, 默认 2000 + * @return JC.Panel + */ + JC.Dialog.msgbox = + function(_msg, _status, _cb, _closeMs ){ + if( !_msg ) return; + var _tpl = ( JC.Dialog.msgbox.tpl || _logic.tpls.msgbox ) + .replace(/\{msg\}/g, _msg) + .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); + var _ins = JC.Dialog(_tpl); + + _logic.fixWidth( _msg, _ins ); + _cb && _ins.on('close', _cb); + setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 ); + + return _ins; + }; + /** + * 自定义 JC.Dialog.alert 的显示模板 + * @property tpl + * @type string + * @default undefined + * @static + */ + JC.Dialog.msgbox.tpl; + /** + * 会话框 alert 提示 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Dialog

        + * @namespace JC.Dialog + * @class alert + * @extends JC.Dialog + * @static + * @constructor + * @param {string} _msg 提示内容 + * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 + * @param {function} _cb 点击弹框确定按钮的回调 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @return JC.Panel + */ + JC.Dialog.alert = + function(_msg, _status, _cb){ + if( !_msg ) return; + var _tpl = ( JC.Dialog.alert.tpl || _logic.tpls.alert ) + .replace(/\{msg\}/g, _msg) + .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); + var _ins = JC.Dialog(_tpl); + _logic.fixWidth( _msg, _ins ); + _cb && _ins.on('confirm', _cb); + + return _ins; + }; + /** + * 自定义 JC.Dialog.alert 的显示模板 + * @property tpl + * @type string + * @default undefined + * @static + */ + JC.Dialog.alert.tpl; + /** + * 会话框 confirm 提示 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Dialog

        + * @namespace JC.Dialog + * @class confirm + * @extends JC.Dialog + * @static + * @constructor + * @param {string} _msg 提示内容 + * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 + * @param {function} _cb 点击弹框确定按钮的回调 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @param {function} _cancelCb 点击弹框取消按钮的回调 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @return JC.Panel + */ + JC.Dialog.confirm = + function(_msg, _status, _cb, _cancelCb ){ + if( !_msg ) return; + var _tpl = ( JC.Dialog.confirm.tpl || _logic.tpls.confirm ) + .replace(/\{msg\}/g, _msg) + .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); + var _ins = JC.Dialog(_tpl); + _logic.fixWidth( _msg, _ins ); + _cb && _ins.on('confirm', _cb); + _cancelCb && _ins.on( 'cancel', _cancelCb ); + + return _ins; + }; + /** + * 自定义 JC.Dialog.confirm 的显示模板 + * @property tpl + * @type string + * @default undefined + * @static + */ + JC.Dialog.confirm.tpl; + + var _logic = { + /** + * 弹框最小宽度 + * @property _logic.minWidth + * @for JC.Dialog + * @type int + * @default 180 + * @private + */ + minWidth: 180 + /** + * 弹框最大宽度 + * @property _logic.maxWidth + * @for JC.Dialog + * @type int + * @default 500 + * @private + */ + , maxWidth: 500 + /** + * 获取弹框的显示状态, 默认为0(成功) + * @method _logic.fixWidth + * @for JC.Dialog + * @private + * @param {int} _status 弹框状态: 0:成功, 1:失败, 2:警告 + * @return {int} + */ + , getStatusClass: + function ( _status ){ + var _r = 'UPanelSuccess'; + switch( _status ){ + case 0: _r = 'UPanelSuccess'; break; + case 1: _r = 'UPanelError'; break; + case 2: _r = 'UPanelAlert'; break; + } + return _r; + } + /** + * 修正弹框的默认显示宽度 + * @method _logic.fixWidth + * @for JC.Dialog + * @private + * @param {string} _msg 查显示的文本 + * @param {JC.Panel} _panel + */ + , fixWidth: + function( _msg, _panel ){ + var _tmp = $('
        ' + _msg + '
        ').appendTo('body'), _w = _tmp.width() + 80; + _w > _logic.maxWidth && ( _w = _logic.maxWidth ); + _w < _logic.minWidth && ( _w = _logic.minWidth ); + + _panel.selector().css('width', _w); + } + /** + * 保存会话弹框的所有默认模板 + * @property _logic.tpls + * @type Object + * @for JC.Dialog + * @private + */ + , tpls: { + /** + * msgbox 会话弹框的默认模板 + * @property _logic.tpls.msgbox + * @type string + * @private + */ + msgbox: + [ + '
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        {msg}
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ].join('') + /** + * alert 会话弹框的默认模板 + * @property _logic.tpls.alert + * @type string + * @private + */ + , alert: + [ + '
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        {msg}
        ' + ,'
        ' + ,'
        ' + ,' ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ].join('') + /** + * confirm 会话弹框的默认模板 + * @property _logic.tpls.confirm + * @type string + * @private + */ + , confirm: + [ + '
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        {msg}
        ' + ,'
        ' + ,'
        ' + ,' ' + ,' ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ].join('') + } + }; + + return JC.Dialog; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Panel/Panel.default.js b/comps/Panel/Panel.default.js new file mode 100755 index 000000000..c8199b40b --- /dev/null +++ b/comps/Panel/Panel.default.js @@ -0,0 +1,1478 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ +//TODO: html popup add trigger ref + window.Panel = JC.Panel = Panel; + /** + * 弹出层基础类 JC.Panel + *

        require: + * JC.common + *

        + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        Panel Layout 可用的 html attribute

        + *
        + *
        panelclickclose = bool
        + *
        点击 Panel 外时, 是否关闭 panel
        + * + *
        panelautoclose = bool
        + *
        Panel 是否自动关闭, 默认关闭时间间隔 = 2000 ms
        + * + *
        panelautoclosems = int, default = 2000 ms
        + *
        自动关闭 Panel 的时间间隔
        + *
        + *

        a, button 可用的 html attribute( 自动生成弹框)

        + *
        + *
        paneltype = string, require
        + *
        + * 弹框类型: alert, confirm, msgbox, panel + *
        dialog.alert, dialog.confirm, dialog.msgbox, dialog + *
        + * + *
        panelmsg = string
        + *
        要显示的内容
        + * + *
        panelmsgBox = script selector
        + *
        要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
        + * + *
        panelstatus = int, default = 0
        + *
        + * 弹框状态: 0: 成功, 1: 失败, 2: 警告 + *
        类型不为 panel, dialog 时生效 + *
        + * + *
        panelcallback = function
        + *
        + * 点击确定按钮的回调, window 变量域 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + *
        + * + *
        panelcancelcallback = function
        + *
        + * 点击取消按钮的回调, window 变量域 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + *
        + * + *
        panelclosecallback = function
        + *
        + * 弹框关闭时的回调, window 变量域 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + *
        + * + *
        panelbutton = int, default = 0
        + *
        + * 要显示的按钮, 0: 无, 1: 确定, 2: 确定, 取消 + *
        类型为 panel, dialog 时生效 + *
        + * + *
        panelheader = string
        + *
        + * panel header 的显示内容 + *
        类型为 panel, dialog 时生效 + *
        + * + *
        panelheaderBox = script selector
        + *
        + * panel header 的显示内容 + *
        要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性 + *
        类型为 panel, dialog 时生效 + *
        + * + *
        panelfooterbox = script selector
        + *
        + * panel footer 的显示内容 + *
        要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性 + *
        类型为 panel, dialog 时生效 + *
        + * + *
        panelhideclose = bool, default = false
        + *
        + * 是否隐藏关闭按钮 + *
        类型为 panel, dialog 时生效 + *
        + * + *
        panelfixed = bool, default = false
        + *
        + * 显示 panel 时, 是否居中显示 + *
        + *
        + * @namespace JC + * @class Panel + * @constructor + * @param {selector|string} _selector 自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers + * @param {string} _headers 定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys + * @param {string} _bodys 定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers + * @param {string} _footers 定义模板的 footer 文字 + * @version dev 0.3, 2014-12-30, qiushaowei | 75 team + * @version dev 0.1, 2013-06-04, qiushaowei | 75 team + * @date + * @example + + + + */ + function Panel( _selector, _headers, _bodys, _footers ){ + typeof _selector == 'string' && ( _selector = _selector.trim().replace( /[\r\n]+/g, '') ); + typeof _headers == 'string' && ( _headers = _headers.trim().replace( /[\r\n]+/g, '') ); + typeof _bodys == 'string' && ( _bodys = _bodys.trim().replace( /[\r\n]+/g, '') ); + + if( typeof _selector == 'string' && //i.test( _selector ) ){ + _headers = '
        ' + JC.f.filterXSS( _selector ) + '
        '; + _selector = '错误:内容不能包含 HTML 和 BODY 标签'; + } + + if( Panel.getInstance( _selector ) ) return Panel.getInstance( _selector ); + /** + * 存放数据的model层, see Panel.Model + * @property _model + * @private + */ + this._model = new Model( _selector, _headers, _bodys, _footers ); + /** + * 控制视图的view层, see Panel.View + * @property _view + * @private + */ + this._view = new View( this._model ); + + this._init(); + } + /** + * 从 selector 获取 Panel 的实例 + *
        如果从DOM初始化, 不进行判断的话, 会重复初始化多次 + * @method getInstance + * @param {selector} _selector + * @static + * @return {Panel instance} + */ + Panel.getInstance = + function( _selector ){ + if( typeof _selector == 'string' && !/调用 ins.autoClose() 时生效 + * @property autoCloseMs + * @type int + * @default 2000 + * @static + */ + Panel.autoCloseMs = 2000; + /** + * 修正弹框的默认显示宽度 + * @method _fixWidth + * @param {string} _msg 查显示的文本 + * @param {JC.Panel} _panel + * @param {int} _minWidth + * @param {int} _maxWidth + * @static + * @private + */ + Panel._fixWidth = + function( _msg, _panel, _minWidth, _maxWidth ){ + var _tmp = $('
        ' + _msg + '
        ').appendTo('body'), _w = _tmp.width() + 80; + _tmp.remove(); + + _minWidth = _minWidth || 200; + _maxWidth = _maxWidth || 500; + + _w > _maxWidth && ( _w = _maxWidth ); + _w < _minWidth && ( _w = _minWidth ); + + _panel.selector().css('width', _w); + }; + /** + * 获取 显示的 BUTTON + * @method _getButton + * @param {int} _type 0: 没有 BUTTON, 1: confirm, 2: confirm + cancel + * @static + * @private + */ + Panel._getButton = + function( _type ){ + var _r = []; + if( _type ){ + _r.push( '
        '); + if( _type >= 1 ){ + _r.push( '' ); + } + if( _type >= 2 ){ + _r.push( '' ); + } + _r.push( '
        '); + } + return _r.join(''); + }; + + Panel.prototype = { + /** + * 初始化Panel + * @method _init + * @private + */ + _init: + function(){ + var _p = this; + _p._view.getPanel().data('PanelInstace', _p); + + /** + * 初始化Panel 默认事件 + * @private + */ + _p._model.addEvent( 'close_default' + , function( _evt, _panel ){ _panel._view.close(); } ); + + _p._model.addEvent( 'show_default' + , function( _evt, _panel ){ _panel._view.show(); } ); + + _p._model.addEvent( 'hide_default' + , function( _evt, _panel ){ _panel._view.hide(); } ); + + _p._model.addEvent( 'confirm_default' + , function( _evt, _panel ){ _panel.trigger('close'); } ); + + _p._model.addEvent( 'cancel_default' + , function( _evt, _panel ){ _panel.trigger('close'); } ); + + _p._model.panelautoclose() && _p.autoClose(); + + return _p; + } + /** + * 为Panel绑定事件 + *
        内置事件类型有 show, hide, close, center, confirm, cancel + * , beforeshow, beforehide, beforeclose, beforecenter + *
        用户可通过 HTML eventtype 属性自定义事件类型 + * @method on + * @param {string} _evtName 要绑定的事件名 + * @param {function} _cb 要绑定的事件回调函数 + * @example + //绑定内置事件 + + + + //绑定自定义事件 + + + */ + , on: + function( _evtName, _cb ){ + _evtName && _cb && this._model.addEvent( _evtName, _cb ); + return this; + } + /** + * 显示 Panel + *
        Panel初始后, 默认是隐藏状态, 显示 Panel 需要显式调用 show 方法 + * @method show + * @param {int|selector} _position 指定 panel 要显示的位置, + *
        如果 _position 为 int: 0, 表示屏幕居中显示 + *
        如果 _position 为 selector: Paenl 的显示位置将基于 _position 的上下左右 + * @example + * panelInstace.show(); //默认显示 + * panelInstace.show( 0 ); //居中显示 + * panelInstace.show( _selector ); //位于 _selector 的上下左右 + */ + , show: + function( _position, _selectorDiretion ){ + var _p = this; + setTimeout( + function(){ + switch( typeof _position ){ + case 'number': + { + switch( _position ){ + case 0: _p.center(); break; + } + break; + } + case 'object': + { + _position = $(_position); + _position.length && _p._view.positionWith( _position, _selectorDiretion ); + + if( !_p._model.bindedPositionWithEvent ){ + _p._model.bindedPositionWithEvent = true; + var changePosition = function(){ + if( !_p._view.getPanel().is( ':visible' ) ) return; + _p.positionWith( _position, _selectorDiretion ); + }; + + $(window).off('resize', changePosition); + $(window).on('resize', changePosition ); + _p.on('close', function(){ + _p._model.bindedPositionWithEvent = false; + $(window).off('resize', changePosition); + }); + } + + break; + } + } + }, 10); + this.trigger('beforeshow', this._view.getPanel() ); + this.trigger('show', this._view.getPanel() ); + + return this; + } + /** + * 设置Panel的显示位置基于 _src 的左右上下 + * @method positionWith + * @param {selector} _src + * @param {string} _selectorDiretion 如果 _src 为 selector, _selectorDiretion 可以指定 top, 显示在上方 + */ + , positionWith: + function( _src, _selectorDiretion ){ + _src = $(_src ); + _src && _src.length && this._view.positionWith( _src, _selectorDiretion ); + return this; + } + /** + * 隐藏 Panel + *
        隐藏 Panel 设置 css display:none, 不会从DOM 删除 Panel + * @method hide + */ + , hide: + function(){ + this.trigger('beforehide', this._view.getPanel() ); + this.trigger('hide', this._view.getPanel() ); + return this; + } + /** + * 关闭 Panel + *
        关闭 Panel 是直接从 DOM 中删除 Panel + * @method close + */ + , close: + function(){ + //JC.log('Panel.close'); + this.trigger('beforeclose', this._view.getPanel() ); + this.trigger('close', this._view.getPanel() ); + return this; + } + /** + * 判断点击页面时, 是否自动关闭 Panel + * @method isClickClose + * @return bool + */ + , isClickClose: + function(){ + return this._model.panelclickclose(); + } + /** + * 点击页面时, 添加自动隐藏功能 + * @method clickClose + * @param {bool} _removeAutoClose + */ + , clickClose: + function( _removeAutoClose ){ + _removeAutoClose && this.layout() && this.layout().removeAttr('panelclickclose'); + !_removeAutoClose && this.layout() && this.layout().attr('panelclickclose', true); + return this; + } + /** + * clickClose 的别名 + *
        这个方法的存在是为了向后兼容, 请使用 clickClose + */ + , addAutoClose: + function(){ + this.clickClose.apply( this, JC.f.sliceArgs( arguments ) ); + return this; + } + /** + * 添加自动关闭功能 + * @method autoClose + * @param {bool} _removeAutoClose + */ + , autoClose: + function( _callback, _ms ){ + if( typeof _callback == 'number' ){ + _ms = _callback; + _callback = null; + } + var _p = this, _tm; + _ms = _p._model.panelautoclosems( _ms ); + + Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout ); + _p.on('close', function(){ + Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout ); + }); + Panel._autoCloseTimeout = + setTimeout( function(){ + _callback && _p.on( 'close', _callback ); + _p.close(); + }, _ms ); + + return this; + } + /** + * focus 到 button + *
        优先查找 input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit] + *
        input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button] + * @method focusButton + */ + , focusButton: function(){ this._view.focusButton(); return this; } + /** + * 从DOM清除Panel + *
        close 方法清除 Panel可以被用户阻止, 该方法不会被用户阻止 + * @method dispose + */ + , dispose: + function(){ + //JC.log('Panel.dispose'); + this._view.close(); + return this; + } + /** + * 把 Panel 位置设为屏幕居中 + * @method center + */ + , center: + function(){ + this.trigger('beforecenter', this._view.getPanel() ); + this._view.center(); + this.trigger('center', this._view.getPanel() ); + return this; + } + /** + * 返回 Panel 的 jquery dom选择器对象 + *
        这个方法以后将会清除, 请使用 layout 方法 + * @method selector + * @return {selector} + */ + , selector: function(){ return this._view.getPanel(); } + /** + * 返回 Panel 的 jquery dom选择器对象 + * @method layout + * @return {selector} + */ + , layout: function(){ return this._view.getPanel(); } + /** + * 从 Panel 选择器中查找内容 + *
        添加这个方法是为了方便jquery 使用者的习惯 + * @method find + * @param {selector} _selector + * @return selector + */ + , find: function( _selector ){ return this.layout().find( _selector ); } + /** + * 触发 Panel 已绑定的事件 + *
        用户可以使用该方法主动触发绑定的事件 + * @method trigger + * @param {string} _evtName 要触发的事件名, 必填参数 + * @param {selector} _srcElement 触发事件的源对象, 可选参数 + * @example + * panelInstace.trigger('close'); + * panelInstace.trigger('userevent', sourceElement); + */ + , trigger: + function( _evtName, _srcElement ){ + //JC.log( 'Panel.trigger', _evtName ); + + var _p = this, _evts = this._model.getEvent( _evtName ), _processDefEvt = true; + if( _evts && _evts.length ){ + _srcElement && (_srcElement = $(_srcElement) ) + && _srcElement.length && (_srcElement = _srcElement[0]); + + $.each( _evts, function( _ix, _cb ){ + if( _cb.call( _srcElement, _evtName, _p ) === false ) + return _processDefEvt = false; + }); + } + + if( _processDefEvt ){ + var _defEvts = this._model.getEvent( _evtName + '_default' ); + if( _defEvts && _defEvts.length ){ + $.each( _defEvts, function( _ix, _cb ){ + if( _cb.call( _srcElement, _evtName, _p ) === false ) + return false; + }); + } + } + return this; + } + /** + * 获取或者设置 Panel Header 的HTML内容 + *
        如果 Panel默认没有 Header的话, 使用该方法 _html 非空可动态创建一个Header + * @method header + * @param {string} _html + * @return {string} header 的HTML内容 + */ + , header: + function( _html ){ + if( typeof _html != 'undefined' ) this._view.getHeader( _html ); + var _selector = this._view.getHeader(); + if( _selector && _selector.length ) _html = _selector.html(); + return _html || ''; + } + /** + * 获取或者设置 Panel body 的HTML内容 + * @method body + * @param {string} _html + * @return {string} body 的HTML内容 + */ + , body: + function( _html ){ + if( typeof _html != 'undefined' ) this._view.getBody( _html ); + var _selector = this._view.getBody(); + if( _selector && _selector.length ) _html = _selector.html(); + return _html || ''; + } + /** + * 获取或者设置 Panel footer 的HTML内容 + *
        如果 Panel默认没有 footer的话, 使用该方法 _html 非空可动态创建一个footer + * @method footer + * @param {string} _html + * @return {string} footer 的HTML内容 + */ + , footer: + function( _html ){ + if( typeof _html != 'undefined' ) this._view.getFooter( _html ); + var _selector = this._view.getFooter(); + if( _selector && _selector.length ) _html = _selector.html(); + return _html || ''; + } + /** + * 获取或者设置 Panel 的HTML内容 + * @method panel + * @param {string} _html + * @return {string} panel 的HTML内容 + */ + , panel: + function( _html ){ + if( typeof _html != 'undefined' ) this._view.getPanel( _html ); + var _selector = this._view.getPanel(); + if( _selector && _selector.length ) _html = _selector.html(); + return _html || ''; + } + /** + * 获取 html popup/dialog 的触发 node + * @method triggerSelector + * @param {Selector} _setterSelector + * @return {Selector|null} + */ + , triggerSelector: + function( _setterSelector ){ + return this._model.triggerSelector( _setterSelector ); + } + + , offsetTop: function( _setter ){ return this._model.offsetTop( _setter ); } + , offsetLeft: function( _setter ){ return this._model.offsetLeft( _setter ); } + } + /** + * Panel 显示前会触发的事件
        + * 这个事件在用户调用 _panelInstance.show() 时触发 + * @event beforeshow + * @type function + * @example + * panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something }); + */ + /** + * 显示Panel时会触发的事件 + * @event show + * @type function + * @example + * panelInstace.on( 'show', function( _evt, _panelInstance ){ do something }); + */ + /** + * Panel 隐藏前会触发的事件
        + *
        这个事件在用户调用 _panelInstance.hide() 时触发 + * @event beforehide + * @type function + * @example + * panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something }); + */ + /** + * Panel 隐藏时会触发的事件
        + *
        这个事件在用户调用 _panelInstance.hide() 时触发 + * @event hide + * @type function + * @example + * panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something }); + */ + /** + * Panel 关闭前会触发的事件
        + * 这个事件在用户调用 _panelInstance.close() 时触发 + * @event beforeclose + * @type function + * @example + * + * + */ + /** + * 关闭事件 + * @event close + * @type function + * @example + * + * + */ + /** + * Panel 居中显示前会触发的事件
        + * 这个事件在用户调用 _panelInstance.center() 时触发 + * @event beforecenter + * @type function + * @example + * panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something }); + */ + /** + * Panel 居中后会触发的事件 + * @event center + * @type function + * @example + * panelInstace.on( 'center', function( _evt, _panelInstance ){ do something }); + */ + /** + * Panel 点击确认按钮触发的事件 + * @event confirm + * @type function + * @example + * + * + */ + /** + * Panel 点击确取消按钮触发的事件 + * @event cancel + * @type function + * @example + * + * + */ + + /** + * 存储 Panel 的基础数据类 + *
        这个类为 Panel 的私有类 + * @class Model + * @namespace JC.Panel + * @constructor + * @param {selector|string} _selector 自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers + * @param {string} _headers 定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys + * @param {string} _bodys 定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers + * @param {string} _footers 定义模板的 footer 文字 + */ + function Model( _selector, _headers, _bodys, _footers ){ + /** + * panel 的 HTML 对象或者字符串 + *
        这是初始化时的原始数据 + * @property selector + * @type selector|string + */ + this.selector = _selector; + /** + * header 内容 + *
        这是初始化时的原始数据 + * @property headers + * @type string + */ + this.headers = _headers; + /** + * body 内容 + *
        这是初始化时的原始数据 + * @property bodys + * @type string + */ + this.bodys = _bodys; + /** + * footers 内容 + *
        这是初始化时的原始数据 + * @property footers + * @type string + */ + this.footers = _footers; + /** + * panel 初始化后的 selector 对象 + * @property panel + * @type selector + */ + this.panel; + /** + * 存储用户事件和默认事件的对象 + * @property _events + * @type Object + * @private + */ + this._events = {}; + this._init(); + } + + Model.prototype = { + /** + * Model 初始化方法 + * @method _init + * @private + * @return {Model instance} + */ + _init: + function(){ + var _p = this, _selector = typeof this.selector != 'undefined' ? $(this.selector) : undefined; + Panel.ignoreClick = true; + if( _selector && _selector.length ){ + this.selector = _selector; + //JC.log( 'user tpl', this.selector.parent().length ); + if( !this.selector.parent().length ){ + _p.selector.appendTo( $(document.body ) ); + JC.f.autoInit && JC.f.autoInit( _p.selector ); + } + }else if( !_selector || _selector.length === 0 ){ + this.footers = this.bodys; + this.bodys = this.headers; + this.headers = this.selector; + this.selector = undefined; + } + setTimeout( function(){ Panel.ignoreClick = false; }, 1 ); + return this; + } + , offsetTop: + function( _setter ){ + typeof _setter != 'undefined' && ( this._offsetTop = _setter ); + return this._offsetTop || 0; + } + + , offsetLeft: + function( _setter ){ + typeof _setter != 'undefined' && ( this._offsetLeft = _setter ); + return this._offsetLeft|| 0; + } + , triggerSelector: + function( _setterSelector ){ + typeof _setterSelector != 'undefined' + && ( this._triggerSelector = _setterSelector ) + ; + return this._triggerSelector; + } + /** + * 添加事件方法 + * @method addEvent + * @param {string} _evtName 事件名 + * @param {function} _cb 事件的回调函数 + */ + , addEvent: + function( _evtName, _cb ){ + if( !(_evtName && _cb ) ) return; + _evtName && ( _evtName = _evtName.toLowerCase() ); + if( !(_evtName in this._events ) ){ + this._events[ _evtName ] = [] + } + if( /\_default/i.test( _evtName ) ) this._events[ _evtName ].unshift( _cb ); + else this._events[ _evtName ].push( _cb ); + } + /** + * 获取事件方法 + * @method getEvent + * @param {string} _evtName 事件名 + * @return {array} 某类事件类型的所有回调 + */ + , getEvent: + function( _evtName ){ + return this._events[ _evtName ]; + } + , panelfocusbutton: + function(){ + var _r = Panel.focusButton; + if( this.panel.is( '[panelfocusbutton]' ) ){ + _r = JC.f.parseBool( this.panel.attr('panelfocusbutton') ); + } + return _r; + } + , panelclickclose: + function(){ + var _r = Panel.clickClose; + if( this.panel.is( '[panelclickclose]' ) ){ + _r = JC.f.parseBool( this.panel.attr('panelclickclose') ); + } + return _r; + } + , panelautoclose: + function(){ + var _r; + if( this.panel.is( '[panelautoclose]' ) ){ + _r = JC.f.parseBool( this.panel.attr('panelautoclose') ); + } + return _r; + } + , panelautoclosems: + function( _ms ){ + var _r = Panel.autoCloseMs; + if( this.panel.is( '[panelautoclosems]' ) ){ + _r = parseInt( this.panel.attr('panelautoclosems'), 10 ); + } + typeof _ms == 'number' && ( _r = _ms ); + return _r; + } + + , panelfixed: + function(){ + var _r = Panel.FIXED; + if( this.panel.is( '[panelfixed]' ) ){ + _r = JC.f.parseBool( this.panel.attr('panelfixed') ); + } + return _r; + } + }; + /** + * 存储 Panel 的基础视图类 + *
        这个类为 Panel 的私有类 + * @class View + * @namespace JC.Panel + * @constructor + * @param {Panel.Model} _model Panel的基础数据类, see Panel.Model + */ + function View( _model ){ + /** + * Panel的基础数据类, see Panel.Model + * @property _model + * @type Panel.Model + * @private + */ + this._model = _model; + /** + * 默认模板 + * @prototype _tpl + * @type string + * @private + */ + this._tpl = _deftpl; + + this._init(); + } + + View.prototype = { + /** + * View 的初始方法 + * @method _init + * @private + * @for View + */ + _init: + function(){ + if( !this._model.panel ){ + if( this._model.selector ){ + this._model.panel = this._model.selector; + }else{ + this._model.panel = $(this._tpl); + this._model.panel.appendTo(document.body); + JC.f.autoInit && JC.f.autoInit( this._model.panel ); + } + } + + this.getHeader(); + this.getBody(); + this.getFooter(); + + return this; + } + /** + * 设置Panel的显示位置基于 _src 的左右上下 + * @method positionWith + * @param {selector} _src + */ + , positionWith: + function( _src, _selectorDiretion ){ + if( !( _src && _src.length ) ) return; + this.getPanel().css( { 'left': '-9999px', 'top': '-9999px', 'display': 'block', 'position': 'absolute' } ); + var _soffset = _src.offset(), _swidth = _src.prop('offsetWidth'), _sheight = _src.prop('offsetHeight'); + var _lwidth = this.getPanel().prop('offsetWidth'), _lheight = this.getPanel().prop('offsetHeight'); + var _wwidth = $(window).width(), _wheight = $(window).height(); + var _stop = $(document).scrollTop(), _sleft = $(document).scrollLeft(); + var _x = _soffset.left + _sleft + , _y = _soffset.top + _sheight + 1; + + if( typeof _selectorDiretion != 'undefined' ){ + switch( _selectorDiretion ){ + case 'top': + { + _y = _soffset.top - _lheight - 1; + _x = _soffset.left + _swidth / 2 - _lwidth / 2; + break; + } + } + } + _y += this._model.offsetTop(); + _x += this._model.offsetLeft(); + + var _maxY = _stop + _wheight - _lheight, _minY = _stop; + if( _y > _maxY ) _y = _soffset.top - _lheight - 1; + if( _y < _minY ) _y = _stop; + + var _maxX = _sleft + _wwidth - _lwidth, _minX = _sleft; + if( _x > _maxX ) _x = _sleft + _wwidth - _lwidth - 1; + if( _x < _minX ) _x = _sleft; + + this.getPanel().css( { 'left': _x + 'px', 'top': _y + 'px' } ); + } + /** + * 显示 Panel + * @method show + */ + , show: + function(){ + this.getPanel().css( { 'z-index': ZINDEX_COUNT++ } ).show(); + //this.focusButton(); + } + /** + * focus button + * @method focus button + */ + , focusButton: + function(){ + if( !this._model.panelfocusbutton() ) return; + var _control = this.getPanel().find( 'input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]' ); + !_control.length && ( _control = this.getPanel().find( 'input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]' ) ) + _control.length && $( _control[0] ).focus(); + } + /** + * 隐藏 Panel + * @method hide + */ + , hide: + function(){ + this.getPanel().hide(); + } + /** + * 关闭 Panel + * @method close + */ + , close: + function(){ + //JC.log( 'Panel._view.close()'); + this.getPanel().remove(); + } + /** + * 获取 Panel 的 selector 对象 + * @method getPanel + * @return selector + */ + , getPanel: + function( _udata ){ + if( typeof _udata != 'undefined' ){ + this.getPanel().html( _udata ); + } + return this._model.panel; + } + /** + * 获取或设置Panel的 header 内容, see Panel.header + * @method getHeader + * @param {string} _udata + * @return string + */ + , getHeader: + function( _udata ){ + var _selector = this.getPanel().find('div.UPContent > div.hd'); + if( typeof _udata != 'undefined' ) this._model.headers = _udata; + if( typeof this._model.headers != 'undefined' ){ + if( !_selector.length ){ + this.getPanel().find('div.UPContent > div.bd') + .before( _selector = $('
        弹出框
        ') ); + } + _selector.html( this._model.headers ); + this._model.headers = undefined; + } + return _selector; + } + /** + * 获取或设置Panel的 body 内容, see Panel.body + * @method getBody + * @param {string} _udata + * @return string + */ + , getBody: + function( _udata ){ + var _selector = this.getPanel().find('div.UPContent > div.bd'); + if( typeof _udata != 'undefined' ) this._model.bodys = _udata; + if( typeof this._model.bodys!= 'undefined' ){ + _selector.html( this._model.bodys); + this._model.bodys = undefined; + } + return _selector; + } + /** + * 获取或设置Panel的 footer 内容, see Panel.footer + * @method getFooter + * @param {string} _udata + * @return string + */ + , getFooter: + function( _udata ){ + var _selector = this.getPanel().find('div.UPContent > div.ft'); + if( typeof _udata != 'undefined' ) this._model.footers = _udata; + if( typeof this._model.footers != 'undefined' ){ + if( !_selector.length ){ + this.getPanel().find('div.UPContent > div.bd') + .after( _selector = $('
        ')); + } + _selector.html( this._model.footers ); + this._model.footers = undefined; + } + return _selector; + } + /** + * 居中显示 Panel + * @method center + */ + , center: + function(){ + var _layout = this.getPanel(), _lw = _layout.width(), _lh = _layout.height() + , _x, _y, _winw = $(window).width(), _winh = $(window).height() + , _scrleft = $(document).scrollLeft(), _scrtop = $(document).scrollTop() + , _iframe + , _p = this + , _tmpTop = 0 + ; + + if( _p._model.panelfixed() ){ + _layout.css( {'left': '-9999px', 'top': '-9999px'} ).show(); + if( _winh > _lh ){ + _tmpTop = ( _winh - _lh ) / 2; + _tmpTop > 200 && ( _tmpTop = 200 ); + } + _layout.css( { + 'position': 'fixed' + , 'left': '0px' + , 'right': '0px' + , 'margin': 'auto' + , 'top': _tmpTop + }); + return; + } + + if( window.parent && window.parent != window ){ + try{ + var _pnt = window.parent + , _p$ = _pnt.window.$ + , _pwin = _pnt.window + , _pdoc = _pnt.document + , _pjwin = _p$( _pwin ) + , _pjdoc = _p$( _pdoc ) + ; + window.PANEL_WIN_ID = 'frame' + JC.f.ts(); + + _pjdoc.find( 'iframe' ).each( function(){ + var _sp = _p$( this ) + , _src = _sp.attr( 'src' ) + , _absSrc = JC.f.relativePath( _src, _pwin.location.href ).trim() + , _url = ( location.href + '' ).trim() + ; + if( _url.indexOf( _absSrc ) > -1 + && _sp.prop( 'contentWindow' ).PANEL_WIN_ID == window.PANEL_WIN_ID + ){ + _iframe = _sp; + return false; + } + }); + + if( _iframe && _iframe.length ){ + var _rvs = rectVeiwportSize( + selectorToRectangle( _iframe, _p$ ) + , docViewport( _pjwin, _pjdoc, _p$ ) + ); + //JC.dir( _rvs ); + _winw = _rvs.width; + _winh = _rvs.height; + _scrtop = _rvs.rect.height - _winh; + if( _scrtop > ( _rvs.viewport.maxY ) ){ + _scrtop = _rvs.viewport.y + _rvs.rect.y; + } + //JC.log( _winw, _winh, _scrtop ); + } + }catch(ex){} + } + + _layout.css( {'left': '-9999px', 'top': '-9999px'} ).show(); + _x = (_winw - _lw) / 2 + _scrleft; + _y = (_winh - _lh) / 2 + _scrtop; + if( (_winh - _lh - 100) > 300 ){ + _y -= 100; + } + //JC.log( (_winh - _lh / 2 - 100) ) + + if( ( _y + _lh - _scrtop ) > _winh ){ + //JC.log('y overflow'); + _y = _scrtop + _winh - _lh; + + } + + if( _y < _scrtop || _y < 0 ) _y = _scrtop; + + _y += this._model.offsetTop(); + _x += this._model.offsetLeft(); + + _layout.css( {left: _x+'px', top: _y+'px'} ); + + //JC.log( _lw, _lh, _winw, _winh ); + } + }; + /** + * Panel 的默认模板 + * @private + */ + var _deftpl = + [ + '
        ' + ,'
        ' + ,'
        ' + ,' ' + ,'
        ' + ,'
        ' + ].join('') + /** + * 隐藏或者清除所有 Panel + *

        使用这个方法应当谨慎, 容易为DOM造成垃圾Panel

        + *
        注意: 这是个方法, 写成class是为了方便生成文档 + * @namespace JC + * @class hideAllPanel + * @constructor + * @static + * @param {bool} _isClose 从DOM清除/隐藏所有Panel(包刮 JC.alert, JC.confirm, JC.Panel, JC.Dialog) + *
        , true = 从DOM 清除, false = 隐藏, 默认 = false( 隐藏 ) + * @example + * JC.hideAllPanel(); //隐藏所有Panel + * JC.hideAllPanel( true ); //从DOM 清除所有Panel + */ + JC.hideAllPanel = + function( _isClose ){ + $('div.UPanel').each( function(){ + var _p = $(this), _ins = Panel.getInstance( _p ); + if( !_ins ) return; + _ins.hide(); + _isClose && _ins.close(); + }); + }; + /** + * 隐藏 或 从DOM清除所有 JC.alert/JC.confirm + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + * @namespace JC + * @class hideAllPopup + * @static + * @constructor + * @param {bool} _isClose 为真从DOM清除JC.alert/JC.confirm, 为假隐藏, 默认为false + * @example + * JC.hideAllPopup(); //隐藏所有JC.alert, JC.confirm + * JC.hideAllPopup( true ); //从 DOM 清除所有 JC.alert, JC.confirm + */ + JC.hideAllPopup = + function( _isClose ){ + $('body > div.UPanelPopup_identifer').each( function(){ + var _p = $(this), _ins = Panel.getInstance( _p ); + if( !_ins ) return; + _ins.hide(); + _isClose && _ins.close(); + }); + }; + + /** + * 监听Panel的所有点击事件 + *
        如果事件源有 eventtype 属性, 则会触发eventtype的事件类型 + * @event Panel click + * @private + */ + $(document).delegate( 'div.UPanel, div.JCPanel', 'click', function( _evt ){ + var _panel = $(this), _src = $(_evt.target || _evt.srcElement), _evtName; + if( _src && _src.length && _src.is("[eventtype]") ){ + _evtName = _src.attr('eventtype'); + //JC.log( _evtName, _panel.data('PanelInstace') ); + _evtName && _panel.data('PanelInstace') && _panel.data('PanelInstace').trigger( _evtName, _src, _evt ); + } + }); + + $(document).delegate('div.UPanel, div.JCPanel', 'click', function( _evt ){ + var _p = $(this), _ins = Panel.getInstance( _p ); + if( _ins && _ins.isClickClose() ){ + _evt.stopPropagation(); + } + }); + + $(document).on('click', function( _evt ){ + if( Panel.ignoreClick ) return; + $('div.UPanel, div.JCPanel').each( function(){ + var _p = $(this), _ins = Panel.getInstance( _p ); + if( _ins && _ins.isClickClose() && _ins.layout() && _ins.layout().is(':visible') ){ + _ins.hide(); + _ins.close(); + } + }); + }); + + $(document).on('keyup', function( _evt ){ + var _kc = _evt.keyCode; + switch( _kc ){ + case 27: + { + JC.hideAllPanel( 1 ); + break; + } + } + }); + var PANEL_ATTR_TYPE = { + 'alert': null + , 'confirm': null + , 'msgbox': null + , 'dialog.alert': null + , 'dialog.confirm': null + , 'dialog.msgbox': null + , 'panel': null + , 'dialog': null + }; + function rectVeiwportSize( _rect, _vp ){ + !_vp && ( _vp = docViewport() ); + var _r = { width: 0, height: 0 } + , _beginX = 0, _beginY = 0 + ; + + //JC.log( JSON.stringify( _rect ), '\n', JSON.stringify( _vp ) ); + + if( _rect.y < _vp.y && _rect.maxY > _vp.maxY ){ + _r.height = _vp.height; + }else if( _rect.y < _vp.y && _rect.maxY < _vp.maxY ){ + _r.height = _vp.height - ( _vp.maxY - _rect.maxY ); + }else if( _rect.y > _vp.y && _rect.maxY > _vp.maxY ){ + _r.height = _vp.maxY - _rect.y; + }else if( _rect.y > _vp.y && _rect.maxY < _vp.maxY ){ + _r.height = _rect.height; + } + + if( _rect.x < _vp.x && _rect.maxX > _vp.maxX ){ + _r.width = _vp.width; + }else if( _rect.x < _vp.x && _rect.maxX < _vp.maxX ){ + _r.width = _vp.width - ( _vp.maxX - _rect.maxX ); + }else if( _rect.x > _vp.x && _rect.maxX > _vp.maxX ){ + _r.width = _vp.maxX - _rect.x; + }else if( _rect.x > _vp.x && _rect.maxX < _vp.maxX ){ + _r.width = _rect.width; + } + + _r.realWidth = _r.width; + _r.realHeight = _r.height; + _r.width < 0 && ( _r.width = 0 ); + _r.height < 0 && ( _r.height = 0 ); + _r.rect = _rect; + _r.viewport = _vp; + + return _r; + } + /** + * 返回选择器的 矩形 位置 + */ + function selectorToRectangle( _selector, $ ){ + $ = $ || window.$; + _selector = $( _selector ); + var _offset = _selector.offset() + , _w = _selector.prop('offsetWidth') + , _h = _selector.prop('offsetHeight'); + + return { + x: _offset.left + , y: _offset.top + , width: _w + , height: _h + , maxX: _offset.left + _w + , maxY: _offset.top + _h + } + } + function docViewport( _win, _doc, $ ){ + $ = $ || window.$; + _win = $( _win || window ); + _doc = $( _doc || document ); + var _r = { + width: _win.width() + , height: _win.height() + , scrollTop: _doc.scrollTop() + , scrollLeft: _doc.scrollLeft() + }; + + _r.x = _r.scrollLeft; + _r.y = _r.scrollTop; + _r.maxX = _r.x + _r.width; + _r.maxY = _r.y + _r.height; + return _r; + } + + /** + * 从 HTML 属性 自动执行 popup + * @attr {string} paneltype 弹框类型, + * @attr {string} panelmsg 弹框提示 + * @attr {string} panelstatus 弹框状态, 0|1|2 + * @attr {function} panelcallback confirm 回调 + * @attr {function} panelcancelcallback cancel 回调 + */ + $(document).on( 'click', function( _evt ){ + var _p = $(_evt.target||_evt.srcElement) + , _paneltype = _p.attr('paneltype') + + , _panelmsg = _p.attr('panelmsg') + , _panelmsgBox = _p.is('[panelmsgbox]') + ? JC.f.parentSelector( _p, _p.attr('panelmsgbox') ) + : null + ; + + if( !(_paneltype && ( _panelmsg || ( _panelmsgBox && _panelmsgBox.length ) ) ) ) return; + + _paneltype = _paneltype.toLowerCase(); + if( !_paneltype in PANEL_ATTR_TYPE ) return; + + _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault(); + + var _panel + , _panelstatus = ( parseInt( _p.attr('panelstatus'), 10 ) || 0 ) + , _callback = _p.attr('panelcallback') + , _cancelcallback = _p.attr('panelcancelcallback') + , _closecallback= _p.attr('panelclosecallback') + + , _panelbutton = parseInt( _p.attr('panelbutton'), 10 ) || 0 + + , _panelheader = _p.attr('panelheader') || '' + , _panelheaderBox = _p.is('[panelheaderbox]') + ? JC.f.parentSelector( _p, _p.attr('panelheaderbox') ) + : null + + , _panelfooter = _p.attr('panelfooter') || '' + , _panelfooterBox = _p.is('[panelfooterbox]') + ? JC.f.parentSelector( _p, _p.attr('panelfooterbox') ) + : null + /** + * 隐藏关闭按钮 + */ + , _hideclose = _p.is('[panelhideclose]') + ? JC.f.parseBool( _p.attr('panelhideclose') ) + : false + ; + + _panelmsgBox && ( _panelmsg = JC.f.scriptContent( _panelmsgBox ) || _panelmsg ); + _panelheaderBox && _panelheaderBox.length + && ( _panelheader = JC.f.scriptContent( _panelheaderBox ) || _panelfooter ); + _panelfooterBox && _panelfooterBox.length + && ( _panelfooter = JC.f.scriptContent( _panelfooterBox ) || _panelfooter ); + + _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault(); + + ; + + _callback && ( _callback = window[ _callback ] ); + _closecallback && ( _closecallback = window[ _closecallback ] ); + + switch( _paneltype ){ + case 'alert': JC.alert && ( _panel = JC.alert( _panelmsg, _p, _panelstatus ) ); break; + case 'confirm': JC.confirm && ( _panel = JC.confirm( _panelmsg, _p, _panelstatus ) ); break; + case 'msgbox': JC.msgbox && ( _panel = JC.msgbox( _panelmsg, _p, _panelstatus ) ); break; + case 'dialog.alert': + { + JC.Dialog && JC.Dialog.alert + && ( _panel = JC.Dialog.alert( _panelmsg, _panelstatus ) ); + break; + } + case 'dialog.confirm': + { + JC.Dialog && JC.Dialog.confirm + && ( _panel = JC.Dialog.confirm( _panelmsg, _panelstatus ) ); + break; + } + case 'dialog.msgbox': + { + JC.Dialog && JC.Dialog.msgbox + && ( _panel = JC.Dialog.msgbox( _panelmsg, _panelstatus ) ); + break; + } + case 'panel': + case 'dialog': + { + var _padding = ''; + if( _paneltype == 'panel' ){ + _panel = new Panel( _panelheader, _panelmsg + Panel._getButton( _panelbutton ), _panelfooter ); + }else{ + if( !JC.Dialog ) return; + _panel = JC.Dialog( _panelheader, _panelmsg + Panel._getButton( _panelbutton ), _panelfooter ); + } + _panel.on( 'beforeshow', function( _evt, _ins ){ + !_panelheader && _ins.find( 'div.hd' ).hide(); + !_panelheader && _ins.find( 'div.ft' ).hide(); + Panel._fixWidth( _panelmsg, _panel ); + _hideclose && _ins.find('span.close').hide(); + }); + _paneltype == 'panel' && _panel.show( _p, 'top' ); + break; + } + } + + if( !_panel ) return; + + if( /msgbox/i.test( _paneltype ) ){ + _callback && _panel.on( 'close', _callback ); + }else{ + _callback && _panel.on( 'confirm', _callback ); + } + _closecallback && _panel.on( 'close', _closecallback ); + _cancelcallback && _panel.on( 'cancel', _cancelcallback ); + + _panel.triggerSelector( _p ); + }); + + return JC.Panel; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); + diff --git a/comps/Panel/Panel.js b/comps/Panel/Panel.js old mode 100644 new mode 100755 index 8984ecfdd..14a0c279a --- a/comps/Panel/Panel.js +++ b/comps/Panel/Panel.js @@ -1,2332 +1,26 @@ -//TODO: html popup add trigger ref -;(function($){ - window.Panel = JC.Panel = Panel; - /** - * 弹出层基础类 JC.Panel - *

        JC Project Site - * | API docs - * | demo link

        - *

        require: jQuery

        - *

        Panel Layout 可用的 html attribute

        - *
        - *
        panelclickclose = bool
        - *
        点击 Panel 外时, 是否关闭 panel
        - * - *
        panelautoclose = bool
        - *
        Panel 是否自动关闭, 默认关闭时间间隔 = 2000 ms
        - * - *
        panelautoclosems = int, default = 2000 ms
        - *
        自动关闭 Panel 的时间间隔
        - *
        - *

        a, button 可用的 html attribute( 自动生成弹框)

        - *
        - *
        paneltype = string, require
        - *
        - * 弹框类型: alert, confirm, msgbox, panel - *
        dialog.alert, dialog.confirm, dialog.msgbox, dialog - *
        - * - *
        panelmsg = string
        - *
        要显示的内容
        - * - *
        panelmsgBox = script selector
        - *
        要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
        - * - *
        panelstatus = int, default = 0
        - *
        - * 弹框状态: 0: 成功, 1: 失败, 2: 警告 - *
        类型不为 panel, dialog 时生效 - *
        - * - *
        panelcallback = function
        - *
        - * 点击确定按钮的回调, window 变量域 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - *
        - * - *
        panelcancelcallback = function
        - *
        - * 点击取消按钮的回调, window 变量域 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - *
        - * - *
        panelclosecallback = function
        - *
        - * 弹框关闭时的回调, window 变量域 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - *
        - * - *
        panelbutton = int, default = 0
        - *
        - * 要显示的按钮, 0: 无, 1: 确定, 2: 确定, 取消 - *
        类型为 panel, dialog 时生效 - *
        - * - *
        panelheader = string
        - *
        - * panel header 的显示内容 - *
        类型为 panel, dialog 时生效 - *
        - * - *
        panelheaderBox = script selector
        - *
        - * panel header 的显示内容 - *
        要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性 - *
        类型为 panel, dialog 时生效 - *
        - * - *
        panelfooterbox = script selector
        - *
        - * panel footer 的显示内容 - *
        要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性 - *
        类型为 panel, dialog 时生效 - *
        - * - *
        panelhideclose = bool, default = false
        - *
        - * 是否隐藏关闭按钮 - *
        类型为 panel, dialog 时生效 - *
        - *
        - * @namespace JC - * @class Panel - * @constructor - * @param {selector|string} _selector 自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers - * @param {string} _headers 定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys - * @param {string} _bodys 定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers - * @param {string} _footers 定义模板的 footer 文字 - * @version dev 0.1 - * @author qiushaowei | 75 team - * @date 2013-06-04 - * @example - - - - */ - function Panel( _selector, _headers, _bodys, _footers ){ - typeof _selector == 'string' && ( _selector = _selector.trim().replace( /[\r\n]+/g, '') ); - typeof _headers == 'string' && ( _headers = _headers.trim().replace( /[\r\n]+/g, '') ); - typeof _bodys == 'string' && ( _bodys = _bodys.trim().replace( /[\r\n]+/g, '') ); - - if( Panel.getInstance( _selector ) ) return Panel.getInstance( _selector ); - /** - * 存放数据的model层, see Panel.Model - * @property _model - * @private - */ - this._model = new Model( _selector, _headers, _bodys, _footers ); - /** - * 控制视图的view层, see Panel.View - * @property _view - * @private - */ - this._view = new View( this._model ); - - this._init(); - } - /** - * 从 selector 获取 Panel 的实例 - *
        如果从DOM初始化, 不进行判断的话, 会重复初始化多次 - * @method getInstance - * @param {selector} _selector - * @static - * @return {Panel instance} - */ - Panel.getInstance = - function( _selector ){ - if( typeof _selector == 'string' && !/调用 ins.autoClose() 时生效 - * @property autoCloseMs - * @type int - * @default 2000 - * @static - */ - Panel.autoCloseMs = 2000; - /** - * 修正弹框的默认显示宽度 - * @method _fixWidth - * @param {string} _msg 查显示的文本 - * @param {JC.Panel} _panel - * @param {int} _minWidth - * @param {int} _maxWidth - * @static - * @private - */ - Panel._fixWidth = - function( _msg, _panel, _minWidth, _maxWidth ){ - var _tmp = $('
        ' + _msg + '
        ').appendTo('body'), _w = _tmp.width() + 80; - _tmp.remove(); - - _minWidth = _minWidth || 200; - _maxWidth = _maxWidth || 500; - - _w > _maxWidth && ( _w = _maxWidth ); - _w < _minWidth && ( _w = _minWidth ); - - _panel.selector().css('width', _w); - }; - /** - * 获取 显示的 BUTTON - * @method _getButton - * @param {int} _type 0: 没有 BUTTON, 1: confirm, 2: confirm + cancel - * @static - * @private - */ - Panel._getButton = - function( _type ){ - var _r = []; - if( _type ){ - _r.push( '
        '); - if( _type >= 1 ){ - _r.push( '' ); - } - if( _type >= 2 ){ - _r.push( '' ); - } - _r.push( '
        '); - } - return _r.join(''); - }; - - Panel.prototype = { - /** - * 初始化Panel - * @method _init - * @private - */ - _init: - function(){ - var _p = this; - _p._view.getPanel().data('PanelInstace', _p); - - /** - * 初始化Panel 默认事件 - * @private - */ - _p._model.addEvent( 'close_default' - , function( _evt, _panel ){ _panel._view.close(); } ); - - _p._model.addEvent( 'show_default' - , function( _evt, _panel ){ _panel._view.show(); } ); - - _p._model.addEvent( 'hide_default' - , function( _evt, _panel ){ _panel._view.hide(); } ); - - _p._model.addEvent( 'confirm_default' - , function( _evt, _panel ){ _panel.trigger('close'); } ); - - _p._model.addEvent( 'cancel_default' - , function( _evt, _panel ){ _panel.trigger('close'); } ); - - _p._model.panelautoclose() && _p.autoClose(); - - return _p; - } - /** - * 为Panel绑定事件 - *
        内置事件类型有 show, hide, close, center, confirm, cancel - * , beforeshow, beforehide, beforeclose, beforecenter - *
        用户可通过 HTML eventtype 属性自定义事件类型 - * @method on - * @param {string} _evtName 要绑定的事件名 - * @param {function} _cb 要绑定的事件回调函数 - * @example - //绑定内置事件 - - - - //绑定自定义事件 - - - */ - , on: - function( _evtName, _cb ){ - _evtName && _cb && this._model.addEvent( _evtName, _cb ); - return this; - } - /** - * 显示 Panel - *
        Panel初始后, 默认是隐藏状态, 显示 Panel 需要显式调用 show 方法 - * @method show - * @param {int|selector} _position 指定 panel 要显示的位置, - *
        如果 _position 为 int: 0, 表示屏幕居中显示 - *
        如果 _position 为 selector: Paenl 的显示位置将基于 _position 的上下左右 - * @example - * panelInstace.show(); //默认显示 - * panelInstace.show( 0 ); //居中显示 - * panelInstace.show( _selector ); //位于 _selector 的上下左右 - */ - , show: - function( _position, _selectorDiretion ){ - var _p = this; - setTimeout( - function(){ - switch( typeof _position ){ - case 'number': - { - switch( _position ){ - case 0: _p.center(); break; - } - break; - } - case 'object': - { - _position = $(_position); - _position.length && _p._view.positionWith( _position, _selectorDiretion ); - - if( !_p._model.bindedPositionWithEvent ){ - _p._model.bindedPositionWithEvent = true; - - $(window).on('resize', changePosition ); - _p.on('close', function(){ - _p._model.bindedPositionWithEvent = false; - $(window).unbind('resize', changePosition); - }); - - function changePosition(){ - _p.positionWith( _position, _selectorDiretion ); - } - } - - break; - } - } - }, 10); - this.trigger('beforeshow', this._view.getPanel() ); - this.trigger('show', this._view.getPanel() ); - - return this; - } - /** - * 设置Panel的显示位置基于 _src 的左右上下 - * @method positionWith - * @param {selector} _src - * @param {string} _selectorDiretion 如果 _src 为 selector, _selectorDiretion 可以指定 top, 显示在上方 - */ - , positionWith: - function( _src, _selectorDiretion ){ - _src = $(_src ); - _src && _src.length && this._view.positionWith( _src, _selectorDiretion ); - return this; - } - /** - * 隐藏 Panel - *
        隐藏 Panel 设置 css display:none, 不会从DOM 删除 Panel - * @method hide - */ - , hide: - function(){ - this.trigger('beforehide', this._view.getPanel() ); - this.trigger('hide', this._view.getPanel() ); - return this; - } - /** - * 关闭 Panel - *
        关闭 Panel 是直接从 DOM 中删除 Panel - * @method close - */ - , close: - function(){ - JC.log('Panel.close'); - this.trigger('beforeclose', this._view.getPanel() ); - this.trigger('close', this._view.getPanel() ); - return this; - } - /** - * 判断点击页面时, 是否自动关闭 Panel - * @method isClickClose - * @return bool - */ - , isClickClose: - function(){ - return this._model.panelclickclose(); - } - /** - * 点击页面时, 添加自动隐藏功能 - * @method clickClose - * @param {bool} _removeAutoClose - */ - , clickClose: - function( _removeAutoClose ){ - _removeAutoClose && this.layout() && this.layout().removeAttr('panelclickclose'); - !_removeAutoClose && this.layout() && this.layout().attr('panelclickclose', true); - return this; - } - /** - * clickClose 的别名 - *
        这个方法的存在是为了向后兼容, 请使用 clickClose - */ - , addAutoClose: - function(){ - this.clickClose.apply( this, sliceArgs( arguments ) ); - return this; - } - /** - * 添加自动关闭功能 - * @method autoClose - * @param {bool} _removeAutoClose - */ - , autoClose: - function( _callback, _ms ){ - if( typeof _callback == 'number' ){ - _ms = _callback; - _callback = null; - } - var _p = this, _tm; - _ms = _p._model.panelautoclosems( _ms ); - - Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout ); - _p.on('close', function(){ - Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout ); - }); - Panel._autoCloseTimeout = - setTimeout( function(){ - _callback && _p.on( 'close', _callback ); - _p.close(); - }, _ms ); - - return this; - } - /** - * focus 到 button - *
        优先查找 input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit] - *
        input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button] - * @method focusButton - */ - , focusButton: function(){ this._view.focusButton(); return this; } - /** - * 从DOM清除Panel - *
        close 方法清除 Panel可以被用户阻止, 该方法不会被用户阻止 - * @method dispose - */ - , dispose: - function(){ - JC.log('Panel.dispose'); - this._view.close(); - return this; - } - /** - * 把 Panel 位置设为屏幕居中 - * @method center - */ - , center: - function(){ - this.trigger('beforecenter', this._view.getPanel() ); - this._view.center(); - this.trigger('center', this._view.getPanel() ); - return this; - } - /** - * 返回 Panel 的 jquery dom选择器对象 - *
        这个方法以后将会清除, 请使用 layout 方法 - * @method selector - * @return {selector} - */ - , selector: function(){ return this._view.getPanel(); } - /** - * 返回 Panel 的 jquery dom选择器对象 - * @method layout - * @return {selector} - */ - , layout: function(){ return this._view.getPanel(); } - /** - * 从 Panel 选择器中查找内容 - *
        添加这个方法是为了方便jquery 使用者的习惯 - * @method find - * @param {selector} _selector - * @return selector - */ - , find: function( _selector ){ return this.layout().find( _selector ); } - /** - * 触发 Panel 已绑定的事件 - *
        用户可以使用该方法主动触发绑定的事件 - * @method trigger - * @param {string} _evtName 要触发的事件名, 必填参数 - * @param {selector} _srcElement 触发事件的源对象, 可选参数 - * @example - * panelInstace.trigger('close'); - * panelInstace.trigger('userevent', sourceElement); - */ - , trigger: - function( _evtName, _srcElement ){ - JC.log( 'Panel.trigger', _evtName ); - - var _p = this, _evts = this._model.getEvent( _evtName ), _processDefEvt = true; - if( _evts && _evts.length ){ - _srcElement && (_srcElement = $(_srcElement) ) - && _srcElement.length && (_srcElement = _srcElement[0]); - - $.each( _evts, function( _ix, _cb ){ - if( _cb.call( _srcElement, _evtName, _p ) === false ) - return _processDefEvt = false; - }); - } - - if( _processDefEvt ){ - var _defEvts = this._model.getEvent( _evtName + '_default' ); - if( _defEvts && _defEvts.length ){ - $.each( _defEvts, function( _ix, _cb ){ - if( _cb.call( _srcElement, _evtName, _p ) === false ) - return false; - }); - } - } - return this; - } - /** - * 获取或者设置 Panel Header 的HTML内容 - *
        如果 Panel默认没有 Header的话, 使用该方法 _html 非空可动态创建一个Header - * @method header - * @param {string} _html - * @return {string} header 的HTML内容 - */ - , header: - function( _html ){ - if( typeof _html != 'undefined' ) this._view.getHeader( _html ); - var _selector = this._view.getHeader(); - if( _selector && _selector.length ) _html = _selector.html(); - return _html || ''; - } - /** - * 获取或者设置 Panel body 的HTML内容 - * @method body - * @param {string} _html - * @return {string} body 的HTML内容 - */ - , body: - function( _html ){ - if( typeof _html != 'undefined' ) this._view.getBody( _html ); - var _selector = this._view.getBody(); - if( _selector && _selector.length ) _html = _selector.html(); - return _html || ''; - } - /** - * 获取或者设置 Panel footer 的HTML内容 - *
        如果 Panel默认没有 footer的话, 使用该方法 _html 非空可动态创建一个footer - * @method footer - * @param {string} _html - * @return {string} footer 的HTML内容 - */ - , footer: - function( _html ){ - if( typeof _html != 'undefined' ) this._view.getFooter( _html ); - var _selector = this._view.getFooter(); - if( _selector && _selector.length ) _html = _selector.html(); - return _html || ''; - } - /** - * 获取或者设置 Panel 的HTML内容 - * @method panel - * @param {string} _html - * @return {string} panel 的HTML内容 - */ - , panel: - function( _html ){ - if( typeof _html != 'undefined' ) this._view.getPanel( _html ); - var _selector = this._view.getPanel(); - if( _selector && _selector.length ) _html = _selector.html(); - return _html || ''; - } - /** - * 获取 html popup/dialog 的触发 node - * @method triggerSelector - * @param {Selector} _setterSelector - * @return {Selector|null} - */ - , triggerSelector: - function( _setterSelector ){ - return this._model.triggerSelector( _setterSelector ); - } - } - /** - * Panel 显示前会触发的事件
        - * 这个事件在用户调用 _panelInstance.show() 时触发 - * @event beforeshow - * @type function - * @example - * panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something }); - */ - /** - * 显示Panel时会触发的事件 - * @event show - * @type function - * @example - * panelInstace.on( 'show', function( _evt, _panelInstance ){ do something }); - */ - /** - * Panel 隐藏前会触发的事件
        - *
        这个事件在用户调用 _panelInstance.hide() 时触发 - * @event beforehide - * @type function - * @example - * panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something }); - */ - /** - * Panel 隐藏时会触发的事件
        - *
        这个事件在用户调用 _panelInstance.hide() 时触发 - * @event hide - * @type function - * @example - * panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something }); - */ - /** - * Panel 关闭前会触发的事件
        - * 这个事件在用户调用 _panelInstance.close() 时触发 - * @event beforeclose - * @type function - * @example - * - * - */ - /** - * 关闭事件 - * @event close - * @type function - * @example - * - * - */ - /** - * Panel 居中显示前会触发的事件
        - * 这个事件在用户调用 _panelInstance.center() 时触发 - * @event beforecenter - * @type function - * @example - * panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something }); - */ - /** - * Panel 居中后会触发的事件 - * @event center - * @type function - * @example - * panelInstace.on( 'center', function( _evt, _panelInstance ){ do something }); - */ - /** - * Panel 点击确认按钮触发的事件 - * @event confirm - * @type function - * @example - * - * - */ - /** - * Panel 点击确取消按钮触发的事件 - * @event cancel - * @type function - * @example - * - * - */ - - /** - * 存储 Panel 的基础数据类 - *
        这个类为 Panel 的私有类 - * @class Model - * @namespace JC.Panel - * @constructor - * @param {selector|string} _selector 自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers - * @param {string} _headers 定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys - * @param {string} _bodys 定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers - * @param {string} _footers 定义模板的 footer 文字 - */ - function Model( _selector, _headers, _bodys, _footers ){ - /** - * panel 的 HTML 对象或者字符串 - *
        这是初始化时的原始数据 - * @property selector - * @type selector|string - */ - this.selector = _selector; - /** - * header 内容 - *
        这是初始化时的原始数据 - * @property headers - * @type string - */ - this.headers = _headers; - /** - * body 内容 - *
        这是初始化时的原始数据 - * @property bodys - * @type string - */ - this.bodys = _bodys; - /** - * footers 内容 - *
        这是初始化时的原始数据 - * @property footers - * @type string - */ - this.footers = _footers; - /** - * panel 初始化后的 selector 对象 - * @property panel - * @type selector - */ - this.panel; - /** - * 存储用户事件和默认事件的对象 - * @property _events - * @type Object - * @private - */ - this._events = {}; - this._init(); - } - - Model.prototype = { - /** - * Model 初始化方法 - * @method _init - * @private - * @return {Model instance} - */ - _init: - function(){ - var _p = this, _selector = typeof this.selector != 'undefined' ? $(this.selector) : undefined; - Panel.ignoreClick = true; - if( _selector && _selector.length ){ - this.selector = _selector; - JC.log( 'user tpl', this.selector.parent().length ); - if( !this.selector.parent().length ){ - _p.selector.appendTo( $(document.body ) ); - window.jcAutoInitComps && jcAutoInitComps( _p.selector ); - } - }else if( !_selector || _selector.length === 0 ){ - this.footers = this.bodys; - this.bodys = this.headers; - this.headers = this.selector; - this.selector = undefined; - } - setTimeout( function(){ Panel.ignoreClick = false; }, 1 ); - return this; - } - , triggerSelector: - function( _setterSelector ){ - typeof _setterSelector != 'undefined' - && ( this._triggerSelector = _setterSelector ) - ; - return this._triggerSelector; - } - /** - * 添加事件方法 - * @method addEvent - * @param {string} _evtName 事件名 - * @param {function} _cb 事件的回调函数 - */ - , addEvent: - function( _evtName, _cb ){ - if( !(_evtName && _cb ) ) return; - _evtName && ( _evtName = _evtName.toLowerCase() ); - if( !(_evtName in this._events ) ){ - this._events[ _evtName ] = [] - } - if( /\_default/i.test( _evtName ) ) this._events[ _evtName ].unshift( _cb ); - else this._events[ _evtName ].push( _cb ); - } - /** - * 获取事件方法 - * @method getEvent - * @param {string} _evtName 事件名 - * @return {array} 某类事件类型的所有回调 - */ - , getEvent: - function( _evtName ){ - return this._events[ _evtName ]; - } - , panelfocusbutton: - function(){ - var _r = Panel.focusButton; - if( this.panel.is( '[panelfocusbutton]' ) ){ - _r = parseBool( this.panel.attr('panelfocusbutton') ); - } - return _r; - } - , panelclickclose: - function(){ - var _r = Panel.clickClose; - if( this.panel.is( '[panelclickclose]' ) ){ - _r = parseBool( this.panel.attr('panelclickclose') ); - } - return _r; - } - , panelautoclose: - function(){ - var _r; - if( this.panel.is( '[panelautoclose]' ) ){ - _r = parseBool( this.panel.attr('panelautoclose') ); - } - return _r; - } - , panelautoclosems: - function( _ms ){ - var _r = Panel.autoCloseMs; - if( this.panel.is( '[panelautoclosems]' ) ){ - _r = parseInt( this.panel.attr('panelautoclosems'), 10 ); - } - typeof _ms == 'number' && ( _r = _ms ); - return _r; - } - }; - /** - * 存储 Panel 的基础视图类 - *
        这个类为 Panel 的私有类 - * @class View - * @namespace JC.Panel - * @constructor - * @param {Panel.Model} _model Panel的基础数据类, see Panel.Model - */ - function View( _model ){ - /** - * Panel的基础数据类, see Panel.Model - * @property _model - * @type Panel.Model - * @private - */ - this._model = _model; - /** - * 默认模板 - * @prototype _tpl - * @type string - * @private - */ - this._tpl = _deftpl; - - this._init(); - } - - View.prototype = { - /** - * View 的初始方法 - * @method _init - * @private - * @for View - */ - _init: - function(){ - if( !this._model.panel ){ - if( this._model.selector ){ - this._model.panel = this._model.selector; - }else{ - this._model.panel = $(this._tpl); - this._model.panel.appendTo(document.body); - window.jcAutoInitComps && jcAutoInitComps( this._model.panel ); - } - } - - this.getHeader(); - this.getBody(); - this.getFooter(); - - return this; - } - /** - * 设置Panel的显示位置基于 _src 的左右上下 - * @method positionWith - * @param {selector} _src - */ - , positionWith: - function( _src, _selectorDiretion ){ - if( !( _src && _src.length ) ) return; - this.getPanel().css( { 'left': '-9999px', 'top': '-9999px', 'display': 'block', 'position': 'absolute' } ); - var _soffset = _src.offset(), _swidth = _src.prop('offsetWidth'), _sheight = _src.prop('offsetHeight'); - var _lwidth = this.getPanel().prop('offsetWidth'), _lheight = this.getPanel().prop('offsetHeight'); - var _wwidth = $(window).width(), _wheight = $(window).height(); - var _stop = $(document).scrollTop(), _sleft = $(document).scrollLeft(); - var _x = _soffset.left + _sleft - , _y = _soffset.top + _sheight + 1; - - if( typeof _selectorDiretion != 'undefined' ){ - switch( _selectorDiretion ){ - case 'top': - { - _y = _soffset.top - _lheight - 1; - _x = _soffset.left + _swidth / 2 - _lwidth / 2; - break; - } - } - } - - var _maxY = _stop + _wheight - _lheight, _minY = _stop; - if( _y > _maxY ) _y = _soffset.top - _lheight - 1; - if( _y < _minY ) _y = _stop; - - var _maxX = _sleft + _wwidth - _lwidth, _minX = _sleft; - if( _x > _maxX ) _x = _sleft + _wwidth - _lwidth - 1; - if( _x < _minX ) _x = _sleft; - - this.getPanel().css( { 'left': _x + 'px', 'top': _y + 'px' } ); - } - /** - * 显示 Panel - * @method show - */ - , show: - function(){ - this.getPanel().css( { 'z-index': ZINDEX_COUNT++ } ).show(); - //this.focusButton(); - } - /** - * focus button - * @method focus button - */ - , focusButton: - function(){ - if( !this._model.panelfocusbutton() ) return; - var _control = this.getPanel().find( 'input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]' ); - !_control.length && ( _control = this.getPanel().find( 'input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]' ) ) - _control.length && $( _control[0] ).focus(); - } - /** - * 隐藏 Panel - * @method hide - */ - , hide: - function(){ - this.getPanel().hide(); - } - /** - * 关闭 Panel - * @method close - */ - , close: - function(){ - JC.log( 'Panel._view.close()'); - this.getPanel().remove(); - } - /** - * 获取 Panel 的 selector 对象 - * @method getPanel - * @return selector - */ - , getPanel: - function( _udata ){ - if( typeof _udata != 'undefined' ){ - this.getPanel().html( _udata ); - } - return this._model.panel; - } - /** - * 获取或设置Panel的 header 内容, see Panel.header - * @method getHeader - * @param {string} _udata - * @return string - */ - , getHeader: - function( _udata ){ - var _selector = this.getPanel().find('div.UPContent > div.hd'); - if( typeof _udata != 'undefined' ) this._model.headers = _udata; - if( typeof this._model.headers != 'undefined' ){ - if( !_selector.length ){ - this.getPanel().find('div.UPContent > div.bd') - .before( _selector = $('
        弹出框
        ') ); - } - _selector.html( this._model.headers ); - this._model.headers = undefined; - } - return _selector; - } - /** - * 获取或设置Panel的 body 内容, see Panel.body - * @method getBody - * @param {string} _udata - * @return string - */ - , getBody: - function( _udata ){ - var _selector = this.getPanel().find('div.UPContent > div.bd'); - if( typeof _udata != 'undefined' ) this._model.bodys = _udata; - if( typeof this._model.bodys!= 'undefined' ){ - _selector.html( this._model.bodys); - this._model.bodys = undefined; - } - return _selector; - } - /** - * 获取或设置Panel的 footer 内容, see Panel.footer - * @method getFooter - * @param {string} _udata - * @return string - */ - , getFooter: - function( _udata ){ - var _selector = this.getPanel().find('div.UPContent > div.ft'); - if( typeof _udata != 'undefined' ) this._model.footers = _udata; - if( typeof this._model.footers != 'undefined' ){ - if( !_selector.length ){ - this.getPanel().find('div.UPContent > div.bd') - .after( _selector = $('
        ')); - } - _selector.html( this._model.footers ); - this._model.footers = undefined; - } - return _selector; - } - /** - * 居中显示 Panel - * @method center - */ - , center: - function(){ - var _layout = this.getPanel(), _lw = _layout.width(), _lh = _layout.height() - , _x, _y, _winw = $(window).width(), _winh = $(window).height() - , _scrleft = $(document).scrollLeft(), _scrtop = $(document).scrollTop() - ; - - _layout.css( {'left': '-9999px', 'top': '-9999px'} ).show(); - _x = (_winw - _lw) / 2 + _scrleft; - _y = (_winh - _lh) / 2 + _scrtop; - if( (_winh - _lh - 100) > 300 ){ - _y -= 100; - } - JC.log( (_winh - _lh / 2 - 100) ) - - if( ( _y + _lh - _scrtop ) > _winh ){ - JC.log('y overflow'); - _y = _scrtop + _winh - _lh; - - } - - if( _y < _scrtop || _y < 0 ) _y = _scrtop; - - _layout.css( {left: _x+'px', top: _y+'px'} ); - - JC.log( _lw, _lh, _winw, _winh ); - } - }; - /** - * Panel 的默认模板 - * @private - */ - var _deftpl = - [ - '
        ' - ,'
        ' - ,'
        ' - ,' ' - ,'
        ' - ,'
        ' - ].join('') - /** - * 隐藏或者清除所有 Panel - *

        使用这个方法应当谨慎, 容易为DOM造成垃圾Panel

        - *
        注意: 这是个方法, 写成class是为了方便生成文档 - * @namespace JC - * @class hideAllPanel - * @constructor - * @static - * @param {bool} _isClose 从DOM清除/隐藏所有Panel(包刮 JC.alert, JC.confirm, JC.Panel, JC.Dialog) - *
        , true = 从DOM 清除, false = 隐藏, 默认 = false( 隐藏 ) - * @example - * JC.hideAllPanel(); //隐藏所有Panel - * JC.hideAllPanel( true ); //从DOM 清除所有Panel - */ - JC.hideAllPanel = - function( _isClose ){ - $('div.UPanel').each( function(){ - var _p = $(this), _ins = Panel.getInstance( _p ); - if( !_ins ) return; - _ins.hide(); - _isClose && _ins.close(); - }); - }; - /** - * 隐藏 或 从DOM清除所有 JC.alert/JC.confirm - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - * @namespace JC - * @class hideAllPopup - * @static - * @constructor - * @param {bool} _isClose 为真从DOM清除JC.alert/JC.confirm, 为假隐藏, 默认为false - * @example - * JC.hideAllPopup(); //隐藏所有JC.alert, JC.confirm - * JC.hideAllPopup( true ); //从 DOM 清除所有 JC.alert, JC.confirm - */ - JC.hideAllPopup = - function( _isClose ){ - $('body > div.UPanelPopup_identifer').each( function(){ - var _p = $(this), _ins = Panel.getInstance( _p ); - if( !_ins ) return; - _ins.hide(); - _isClose && _ins.close(); - }); - }; - - /** - * 监听Panel的所有点击事件 - *
        如果事件源有 eventtype 属性, 则会触发eventtype的事件类型 - * @event Panel click - * @private - */ - $(document).delegate( 'div.UPanel', 'click', function( _evt ){ - var _panel = $(this), _src = $(_evt.target || _evt.srcElement), _evtName; - if( _src && _src.length && _src.is("[eventtype]") ){ - _evtName = _src.attr('eventtype'); - JC.log( _evtName, _panel.data('PanelInstace') ); - _evtName && _panel.data('PanelInstace') && _panel.data('PanelInstace').trigger( _evtName, _src, _evt ); - } - }); - - $(document).delegate('div.UPanel', 'click', function( _evt ){ - var _p = $(this), _ins = Panel.getInstance( _p ); - if( _ins && _ins.isClickClose() ){ - _evt.stopPropagation(); - } - }); - - $(document).on('click', function( _evt ){ - if( Panel.ignoreClick ) return; - $('div.UPanel').each( function(){ - var _p = $(this), _ins = Panel.getInstance( _p ); - if( _ins && _ins.isClickClose() && _ins.layout() && _ins.layout().is(':visible') ){ - _ins.hide(); - _ins.close(); - } - }); - }); - - $(document).on('keyup', function( _evt ){ - var _kc = _evt.keyCode; - switch( _kc ){ - case 27: - { - JC.hideAllPanel( 1 ); - break; - } - } - }); - var PANEL_ATTR_TYPE = { - 'alert': null - , 'confirm': null - , 'msgbox': null - , 'dialog.alert': null - , 'dialog.confirm': null - , 'dialog.msgbox': null - , 'panel': null - , 'dialog': null - }; - /** - * 从 HTML 属性 自动执行 popup - * @attr {string} paneltype 弹框类型, - * @attr {string} panelmsg 弹框提示 - * @attr {string} panelstatus 弹框状态, 0|1|2 - * @attr {function} panelcallback confirm 回调 - * @attr {function} panelcancelcallback cancel 回调 - */ - $(document).on( 'click', function( _evt ){ - var _p = $(_evt.target||_evt.srcElement) - , _paneltype = _p.attr('paneltype') - - , _panelmsg = _p.attr('panelmsg') - , _panelmsgBox = _p.is('[panelmsgbox]') - ? parentSelector( _p, _p.attr('panelmsgbox') ) - : null - ; - - if( !(_paneltype && ( _panelmsg || ( _panelmsgBox && _panelmsgBox.length ) ) ) ) return; - - _paneltype = _paneltype.toLowerCase(); - if( !_paneltype in PANEL_ATTR_TYPE ) return; - - _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault(); - - var _panel - , _panelstatus = ( parseInt( _p.attr('panelstatus'), 10 ) || 0 ) - , _callback = _p.attr('panelcallback') - , _cancelcallback = _p.attr('panelcancelcallback') - , _closecallback= _p.attr('panelclosecallback') - - , _panelbutton = parseInt( _p.attr('panelbutton'), 10 ) || 0 - - , _panelheader = _p.attr('panelheader') || '' - , _panelheaderBox = _p.is('[panelheaderbox]') - ? parentSelector( _p, _p.attr('panelheaderbox') ) - : null - - , _panelfooter = _p.attr('panelfooter') || '' - , _panelfooterBox = _p.is('[panelfooterbox]') - ? parentSelector( _p, _p.attr('panelfooterbox') ) - : null - /** - * 隐藏关闭按钮 - */ - , _hideclose = _p.is('[panelhideclose]') - ? parseBool( _p.attr('panelhideclose') ) - : false - ; - - _panelmsgBox && ( _panelmsg = scriptContent( _panelmsgBox ) || _panelmsg ); - _panelheaderBox && _panelheaderBox.length - && ( _panelheader = scriptContent( _panelheaderBox ) || _panelfooter ); - _panelfooterBox && _panelfooterBox.length - && ( _panelfooter = scriptContent( _panelfooterBox ) || _panelfooter ); - - _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault(); - - ; - - _callback && ( _callback = window[ _callback ] ); - _closecallback && ( _closecallback = window[ _closecallback ] ); - - switch( _paneltype ){ - case 'alert': JC.alert && ( _panel = JC.alert( _panelmsg, _p, _panelstatus ) ); break; - case 'confirm': JC.confirm && ( _panel = JC.confirm( _panelmsg, _p, _panelstatus ) ); break; - case 'msgbox': JC.msgbox && ( _panel = JC.msgbox( _panelmsg, _p, _panelstatus ) ); break; - case 'dialog.alert': - { - JC.Dialog && JC.Dialog.alert - && ( _panel = JC.Dialog.alert( _panelmsg, _panelstatus ) ); - break; - } - case 'dialog.confirm': - { - JC.Dialog && JC.Dialog.confirm - && ( _panel = JC.Dialog.confirm( _panelmsg, _panelstatus ) ); - break; - } - case 'dialog.msgbox': - { - JC.Dialog && JC.Dialog.msgbox - && ( _panel = JC.Dialog.msgbox( _panelmsg, _panelstatus ) ); - break; - } - case 'panel': - case 'dialog': - { - var _padding = ''; - if( _paneltype == 'panel' ){ - _panel = new Panel( _panelheader, _panelmsg + Panel._getButton( _panelbutton ), _panelfooter ); - }else{ - if( !JC.Dialog ) return; - _panel = JC.Dialog( _panelheader, _panelmsg + Panel._getButton( _panelbutton ), _panelfooter ); - } - _panel.on( 'beforeshow', function( _evt, _ins ){ - !_panelheader && _ins.find( 'div.hd' ).hide(); - !_panelheader && _ins.find( 'div.ft' ).hide(); - Panel._fixWidth( _panelmsg, _panel ); - _hideclose && _ins.find('span.close').hide(); - }); - _paneltype == 'panel' && _panel.show( _p, 'top' ); - break; - } - } - - if( !_panel ) return; - - if( /msgbox/i.test( _paneltype ) ){ - _callback && _panel.on( 'close', _callback ); - }else{ - _callback && _panel.on( 'confirm', _callback ); - } - _closecallback && _panel.on( 'close', _closecallback ); - _cancelcallback && _panel.on( 'cancel', _cancelcallback ); - - _panel.triggerSelector( _p ); - }); - -}(jQuery)); -; - -;(function($){ - /** - * msgbox 提示 popup - *
        这个是不带蒙板 不带按钮的 popup 弹框 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        requires: jQuery, Panel

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC - * @class msgbox - * @extends JC.Panel - * @static - * @constructor - * @param {string} _msg 提示内容 - * @param {selector} _popupSrc 触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示 - * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 - * @param {function} _cb 弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @param {int} _closeMs 自动关闭的间隔, 单位毫秒, 默认 2000 - * @return JC.Panel - */ - JC.msgbox = - function( _msg, _popupSrc, _status, _cb, _closeMs ){ - if( typeof _popupSrc == 'number' ){ - _status = _popupSrc; - _popupSrc = null; - } - if( typeof _cb == 'number' ){ - _closeMs = _cb; - _cb = null; - } - var _ins = _logic.popup( JC.msgbox.tpl || _logic.tpls.msgbox, _msg, _popupSrc, _status ); - _cb && _ins.on('close', _cb ); - setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 ); - - return _ins; - }; - /** - * 自定义 JC.msgbox 的显示模板 - * @property tpl - * @type string - * @default undefined - * @static - */ - JC.msgbox.tpl; - /** - * alert 提示 popup - *
        这个是不带 蒙板的 popup 弹框 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        requires: jQuery, Panel

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC - * @class alert - * @extends JC.Panel - * @static - * @constructor - * @param {string} _msg 提示内容 - * @param {selector} _popupSrc 触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示 - * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 - * @param {function} _cb 点击弹框确定按钮的回调 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @return JC.Panel - */ - JC.alert = - function( _msg, _popupSrc, _status, _cb ){ - if( typeof _popupSrc == 'number' ){ - _status = _popupSrc; - _popupSrc = null; - } - return _logic.popup( JC.alert.tpl || _logic.tpls.alert, _msg, _popupSrc, _status, _cb ); - }; - /** - * 自定义 JC.alert 的显示模板 - * @property tpl - * @type string - * @default undefined - * @static - */ - JC.alert.tpl; - /** - * confirm 提示 popup - *
        这个是不带 蒙板的 popup 弹框 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        private property see: JC.alert - *

        requires: jQuery, Panel

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC - * @class confirm - * @extends JC.Panel - * @static - * @constructor - * @param {string} _msg 提示内容 - * @param {selector} _popupSrc 触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示 - * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 - * @param {function} _cb 点击弹框确定按钮的回调 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @param {function} _cancelCb 点击弹框取消按钮的回调 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @return JC.Panel - */ - JC.confirm = - function( _msg, _popupSrc, _status, _cb, _cancelCb ){ - if( typeof _popupSrc == 'number' ){ - _status = _popupSrc; - _popupSrc = null; - } - var _ins = _logic.popup( JC.confirm.tpl || _logic.tpls.confirm, _msg, _popupSrc, _status, _cb ); - _ins && _cancelCb && _ins.on( 'cancel', _cancelCb ); - return _ins; - }; - /** - * 自定义 JC.confirm 的显示模板 - * @property tpl - * @type string - * @default undefined - * @static - */ - JC.confirm.tpl; - /** - * 弹框逻辑处理方法集 - * @property _logic - * @for JC.alert - * @private - */ - var _logic = { - /** - * 弹框最小宽度 - * @property _logic.minWidth - * @for JC.alert - * @type int - * @default 180 - * @private - */ - minWidth: 180 - /** - * 弹框最大宽度 - * @property _logic.maxWidth - * @for JC.alert - * @type int - * @default 500 - * @private - */ - , maxWidth: 500 - /** - * 显示时 X轴的偏移值 - * @property _logic.xoffset - * @type number - * @default 9 - * @for JC.alert - * @private - */ - , xoffset: 9 - /** - * 显示时 Y轴的偏移值 - * @property _logic.yoffset - * @type number - * @default 3 - * @for JC.alert - * @private - */ - , yoffset: 3 - /** - * 设置弹框的唯一性 - * @method _logic.popupIdentifier - * @for JC.alert - * @private - * @param {JC.Panel} _panel - */ - , popupIdentifier: - function( _panel ){ - var _int; - if( !_panel ){ - $('body > div.UPanelPopup_identifer').each( function(){ - var _p = $(this), _ins = Panel.getInstance( _p ); - if( !_ins ) return; - _ins.hide(); - _ins.close(); - }); - //$('body > div.UPanelPopup_identifer').remove(); - $('body > div.UPanel_TMP').remove(); - }else{ - _panel.selector().addClass('UPanelPopup_identifer'); - _panel.selector().data('PopupInstance', _panel); - } - } - /** - * 弹框通用处理方法 - * @method _logic.popup - * @for JC.alert - * @private - * @param {string} _tpl 弹框模板 - * @param {string} _msg 弹框提示 - * @param {selector} _popupSrc 弹框事件源对象 - * @param {int} _status 弹框状态 - * @param {function} _cb confirm 回调 - * @return JC.Panel - */ - , popup: - function( _tpl, _msg, _popupSrc, _status, _cb ){ - if( !_msg ) return; - _logic.popupIdentifier(); - - _popupSrc && ( _popupSrc = $(_popupSrc) ); - - var _tpl = _tpl - .replace(/\{msg\}/g, _msg) - .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); - var _ins = new JC.Panel(_tpl); - _logic.popupIdentifier( _ins ); - _ins.selector().data('popupSrc', _popupSrc); - _logic.fixWidth( _msg, _ins ); - - _cb && _ins.on('confirm', _cb); - if( !_popupSrc ) _ins.center(); - - _ins.on('show_default', function(){ - JC.log('user show_default'); - if( _popupSrc && _popupSrc.length ){ - _logic.showEffect( _ins, _popupSrc, function(){ - _ins.focusButton(); - }); - return false; - } - }); - - _ins.on('close_default', function(){ - JC.log('user close_default'); - if( _popupSrc && _popupSrc.length ){ - _logic.hideEffect( _ins, _popupSrc, function(){ - _ins.selector().remove(); - _ins = null; - }); - }else{ - _ins.selector().remove(); - } - return false; - }); - - _ins.on('hide_default', function(){ - JC.log('user hide_default'); - if( _popupSrc && _popupSrc.length ){ - _logic.hideEffect( _ins, _popupSrc, function(){ - _ins.selector().hide(); - }); - return false; - }else{ - _ins.selector().hide(); - } - }); - - if( _popupSrc && _popupSrc.length )_ins.selector().css( { 'left': '-9999px', 'top': '-9999px' } ); - - _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ ); - _ins.show(); - - return _ins; - } - /** - * 隐藏弹框缓动效果 - * @method _logic.hideEffect - * @for JC.alert - * @private - * @param {JC.Panel} _panel - * @param {selector} _popupSrc - * @param {function} _doneCb 缓动完成后的回调 - */ - , hideEffect: - function( _panel, _popupSrc, _doneCb ){ - _popupSrc && ( _popupSrc = $(_popupSrc) ); - if( !(_popupSrc && _popupSrc.length ) ) { - _doneCb && _doneCb( _panel ); - return; - } - if( !( _panel && _panel.selector ) ) return; - - var _poffset = _popupSrc.offset(), _selector = _panel.selector(); - var _dom = _selector[0]; - - _dom.interval && clearInterval( _dom.interval ); - _dom.defaultWidth && _selector.width( _dom.defaultWidth ); - _dom.defaultHeight && _selector.height( _dom.defaultHeight ); - - var _pw = _popupSrc.width(), _sh = _selector.height(); - _dom.defaultWidth = _selector.width(); - _dom.defaultHeight = _selector.height(); - - var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() ); - var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh ); - _top = _top - _sh - _logic.yoffset; - - _selector.height(0); - _selector.css( { 'left': _left + 'px' } ); - - _dom.interval = - easyEffect( function( _curVal, _done ){ - _selector.css( { - 'top': _top + _curVal + 'px' - , 'height': _sh - _curVal + 'px' - }); - - if( _popupSrc && !_popupSrc.is(':visible') ){ - clearInterval( _dom.interval ); - _doneCb && _doneCb( _panel ); - } - - if( _sh === _curVal ) _selector.hide(); - _done && _doneCb && _doneCb( _panel ); - }, _sh ); - - } - /** - * 隐藏弹框缓动效果 - * @method _logic.showEffect - * @for JC.alert - * @private - * @param {JC.Panel} _panel - * @param {selector} _popupSrc - */ - , showEffect: - function( _panel, _popupSrc, _doneCb ){ - _popupSrc && ( _popupSrc = $(_popupSrc) ); - if( !(_popupSrc && _popupSrc.length ) ) return; - if( !( _panel && _panel.selector ) ) return; - - var _poffset = _popupSrc.offset(), _selector = _panel.selector(); - var _dom = _selector[0]; - - _dom.interval && clearInterval( _dom.interval ); - _dom.defaultWidth && _selector.width( _dom.defaultWidth ); - _dom.defaultHeight && _selector.height( _dom.defaultHeight ); - - var _pw = _popupSrc.width(), _sh = _selector.height(); - _dom.defaultWidth = _selector.width(); - _dom.defaultHeight = _selector.height(); - - var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() ); - var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh, _logic.xoffset ); - - _selector.height(0); - _selector.css( { 'left': _left + 'px' } ); - - JC.log( _top, _poffset.top ); - - if( _top > _poffset.top ){ - _dom.interval = - easyEffect( function( _curVal, _done ){ - _selector.css( { - 'top': _top - _sh - _logic.yoffset + 'px' - , 'height': _curVal + 'px' - }); - _done && _doneCb && _doneCb( _panel ); - }, _sh ); - - }else{ - _dom.interval = - easyEffect( function( _curVal, _done ){ - _selector.css( { - 'top': _top - _curVal - _logic.yoffset + 'px' - , 'height': _curVal + 'px' - }); - _done && _doneCb && _doneCb( _panel ); - }, _sh ); - } - - } - /** - * 设置 Panel 的默认X,Y轴 - * @method _logic.onresize - * @private - * @for JC.alert - * @param {selector} _panel - */ - , onresize: - function( _panel ){ - if( !_panel.selector().is(':visible') ) return; - var _selector = _panel.selector(), _popupSrc = _selector.data('popupSrc'); - if( !(_popupSrc && _popupSrc.length) ){ - _panel.center(); - }else{ - var _srcoffset = _popupSrc.offset(); - var _srcTop = _srcoffset.top - , _srcHeight = _popupSrc.height() - , _targetHeight = _selector.height() - , _yoffset = 0 - - , _srcLeft = _srcoffset.left - , _srcWidth = _popupSrc.width() - , _targetWidth = _selector.width() - , _xoffset = 0 - ; - - var _left = _logic.getLeft( _srcLeft, _srcWidth - , _targetWidth, _xoffset ) + _logic.xoffset; - var _top = _logic.getTop( _srcTop, _srcHeight - , _targetHeight, _yoffset ) - _targetHeight - _logic.yoffset; - - _selector.css({ - 'left': _left + 'px', 'top': _top + 'px' - }); - } - } - /** - * 取得弹框最要显示的 y 轴 - * @method _logic.getTop - * @for JC.alert - * @private - * @param {number} _scrTop 滚动条Y位置 - * @param {number} _srcHeight 事件源 高度 - * @param {number} _targetHeight 弹框高度 - * @param {number} _offset Y轴偏移值 - * @return {number} - */ - , getTop: - function( _srcTop, _srcHeight, _targetHeight, _offset ){ - var _r = _srcTop - , _scrTop = $(document).scrollTop() - , _maxTop = $(window).height() - _targetHeight; - - _r - _targetHeight < _scrTop && ( _r = _srcTop + _srcHeight + _targetHeight + _offset ); - - return _r; - } - /** - * 取得弹框最要显示的 x 轴 - * @method _logic.getLeft - * @for JC.alert - * @private - * @param {number} _scrTop 滚动条Y位置 - * @param {number} _srcHeight 事件源 高度 - * @param {number} _targetHeight 弹框高度 - * @param {number} _offset Y轴偏移值 - * @return {number} - */ - , getLeft: - function( _srcLeft, _srcWidth, _targetWidth, _offset ){ - _offset == undefined && ( _offset = 5 ); - var _r = _srcLeft + _srcWidth / 2 + _offset - _targetWidth / 2 - , _scrLeft = $(document).scrollLeft() - , _maxLeft = $(window).width() + _scrLeft - _targetWidth; - - _r > _maxLeft && ( _r = _maxLeft - 2 ); - _r < _scrLeft && ( _r = _scrLeft + 1 ); - - return _r; - } - /** - * 修正弹框的默认显示宽度 - * @method _logic.fixWidth - * @for JC.alert - * @private - * @param {string} _msg 查显示的文本 - * @param {JC.Panel} _panel - */ - , fixWidth: - function( _msg, _panel ){ - var _tmp = $('
        ' + _msg + '
        ').appendTo('body'), _w = _tmp.width() + 80; - _tmp.remove(); - _w > _logic.maxWidth && ( _w = _logic.maxWidth ); - _w < _logic.minWidth && ( _w = _logic.minWidth ); - - _panel.selector().css('width', _w); - } - /** - * 获取弹框的显示状态, 默认为0(成功) - * @method _logic.fixWidth - * @for JC.alert - * @private - * @param {int} _status 弹框状态: 0:成功, 1:失败, 2:警告 - * @return {int} - */ - , getStatusClass: - function ( _status ){ - var _r = 'UPanelSuccess'; - switch( _status ){ - case 0: _r = 'UPanelSuccess'; break; - case 1: _r = 'UPanelError'; break; - case 2: _r = 'UPanelAlert'; break; - } - return _r; - } - /** - * 保存弹框的所有默认模板 - * @property _logic.tpls - * @type Object - * @for JC.alert - * @private - */ - , tpls: { - /** - * msgbox 弹框的默认模板 - * @property _logic.tpls.msgbox - * @type string - * @private - */ - msgbox: - [ - '
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        {msg}
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ].join('') - /** - * alert 弹框的默认模板 - * @property _logic.tpls.alert - * @type string - * @private - */ - , alert: - [ - '
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        {msg}
        ' - ,'
        ' - ,'
        ' - ,' ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ].join('') - /** - * confirm 弹框的默认模板 - * @property _logic.tpls.confirm - * @type string - * @private - */ - , confirm: - [ - '
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        {msg}
        ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ].join('') - } - }; - /** - * 响应窗口改变大小 - */ - $(window).on('resize', function( _evt ){ - $('body > div.UPanelPopup_identifer').each( function(){ - var _p = $(this); - _p.data('PopupInstance') && _logic.onresize( _p.data('PopupInstance') ); - }); - }); -}(jQuery)); -; - -;(function($){ - var isIE6 = !!window.ActiveXObject && !window.XMLHttpRequest; - /** - * 带蒙板的会话弹框 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        requires: jQuery, Panel

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC - * @class Dialog - * @extends JC.Panel - * @static - * @constructor - * @param {selector|string} _selector 自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers - * @param {string} _headers 定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys - * @param {string} _bodys 定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers - * @param {string} _footers 定义模板的 footer 文字 - * @return JC.Panel - */ - var Dialog = window.Dialog = JC.Dialog = - function( _selector, _headers, _bodys, _footers ){ - if( _logic.timeout ) clearTimeout( _logic.timeout ); - - if( JC.Panel.getInstance( _selector ) ){ - _logic.timeout = setTimeout( function(){ - JC.Panel.getInstance( _selector ).show(0); - }, _logic.showMs ); - - return JC.Panel.getInstance( _selector ); - } - - _logic.dialogIdentifier(); - - var _ins = new JC.Panel( _selector, _headers, _bodys, _footers ); - _logic.dialogIdentifier( _ins ); - - _logic.showMask(); - _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ ); - - _ins.on('close_default', function( _evt, _panel){ - _logic.hideMask(); - }); - - _ins.on('hide_default', function( _evt, _panel){ - _logic.hideMask(); - }); - - _ins.on('show_default', function( _evt, _panel){ - _logic.showMask(); - - setTimeout( function(){ - _logic.showMask(); - _ins.selector().css( { 'z-index': window.ZINDEX_COUNT++, 'display': 'block' } ); - }, 1 ); - }); - - _logic.timeout = setTimeout( function(){ - _ins.show( 0 ); - }, _logic.showMs ); - - return _ins; - }; - /** - * 会话框 msgbox 提示 (不带按钮) - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        private property see: JC.Dialog - *

        requires: jQuery, Panel, Dialog

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC.Dialog - * @class msgbox - * @extends JC.Panel - * @static - * @constructor - * @param {string} _msg 提示内容 - * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 - * @param {function} _cb 弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @param {int} _closeMs 自动关闭的间隔, 单位毫秒, 默认 2000 - * @return JC.Panel - */ - JC.Dialog.msgbox = - function(_msg, _status, _cb, _closeMs ){ - if( !_msg ) return; - var _tpl = ( JC.Dialog.msgbox.tpl || _logic.tpls.msgbox ) - .replace(/\{msg\}/g, _msg) - .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); - var _ins = JC.Dialog(_tpl); - - _logic.fixWidth( _msg, _ins ); - _cb && _ins.on('close', _cb); - setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 ); - - return _ins; - }; - /** - * 自定义 JC.Dialog.alert 的显示模板 - * @property tpl - * @type string - * @default undefined - * @static - */ - JC.Dialog.msgbox.tpl; - /** - * 会话框 alert 提示 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        private property see: JC.Dialog - *

        requires: jQuery, Panel, Dialog

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC.Dialog - * @class alert - * @extends JC.Panel - * @static - * @constructor - * @param {string} _msg 提示内容 - * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 - * @param {function} _cb 点击弹框确定按钮的回调 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @return JC.Panel - */ - JC.Dialog.alert = - function(_msg, _status, _cb){ - if( !_msg ) return; - var _tpl = ( JC.Dialog.alert.tpl || _logic.tpls.alert ) - .replace(/\{msg\}/g, _msg) - .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); - var _ins = JC.Dialog(_tpl); - _logic.fixWidth( _msg, _ins ); - _cb && _ins.on('confirm', _cb); - - return _ins; - }; - /** - * 自定义 JC.Dialog.alert 的显示模板 - * @property tpl - * @type string - * @default undefined - * @static - */ - JC.Dialog.alert.tpl; - /** - * 会话框 confirm 提示 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - *

        private property see: JC.Dialog - *

        requires: jQuery, Panel, Dialog

        - *

        JC Project Site - * | API docs - * | demo link

        - * @namespace JC.Dialog - * @class confirm - * @extends JC.Panel - * @static - * @constructor - * @param {string} _msg 提示内容 - * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 - * @param {function} _cb 点击弹框确定按钮的回调 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @param {function} _cancelCb 点击弹框取消按钮的回调 -function( _evtName, _panelIns ){ - var _btn = $(this); -} - * @return JC.Panel - */ - JC.Dialog.confirm = - function(_msg, _status, _cb, _cancelCb ){ - if( !_msg ) return; - var _tpl = ( JC.Dialog.confirm.tpl || _logic.tpls.confirm ) - .replace(/\{msg\}/g, _msg) - .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); - var _ins = JC.Dialog(_tpl); - _logic.fixWidth( _msg, _ins ); - _cb && _ins.on('confirm', _cb); - _cancelCb && _ins.on( 'cancel', _cancelCb ); - - return _ins; - }; - /** - * 自定义 JC.Dialog.confirm 的显示模板 - * @property tpl - * @type string - * @default undefined - * @static - */ - JC.Dialog.confirm.tpl; - /** - * 显示或隐藏 蒙板 - *
        注意, 这是个方法, 写 @class 属性是为了生成文档 - * @namespace JC.Dialog - * @class mask - * @static - * @constructor - * @param {bool} _isHide 空/假 显示蒙板, 为真 隐藏蒙板 - */ - JC.Dialog.mask = - function( _isHide ){ - !_isHide && _logic.showMask(); - _isHide && _logic.hideMask(); - }; - /** - * 会话弹框逻辑处理方法集 - * @property _logic - * @for JC.Dialog - * @private - */ - var _logic = { - /** - * 延时处理的指针属性 - * @property _logic.timeout - * @type setTimeout - * @private - * @for JC.Dialog - */ - timeout: null - /** - * 延时显示弹框 - *
        延时是为了使用户绑定的 show 事件能够被执行 - * @property _logic.showMs - * @type int millisecond - * @private - * @for JC.Dialog - */ - , showMs: 10 - /** - * 弹框最小宽度 - * @property _logic.minWidth - * @for JC.Dialog - * @type int - * @default 180 - * @private - */ - , minWidth: 180 - /** - * 弹框最大宽度 - * @property _logic.maxWidth - * @for JC.Dialog - * @type int - * @default 500 - * @private - */ - , maxWidth: 500 - /** - * 设置会话弹框的唯一性 - * @method _logic.dialogIdentifier - * @for JC.Dialog - * @private - * @param {JC.Panel} _panel - */ - , dialogIdentifier: - function( _panel ){ - if( !_panel ){ - _logic.hideMask(); - $('body > div.UPanelDialog_identifer').each( function(){ - var _p = $(this), _ins = Panel.getInstance( _p ); - if( !_ins ) return; - _ins.hide(); - _ins.close(); - }); - $('body > div.UPanel_TMP').remove(); - }else{ - _panel.selector().addClass('UPanelDialog_identifer'); - _panel.selector().data('DialogInstance', _panel); - } - } - /** - * 显示蒙板 - * @method _logic.showMask - * @private - * @for JC.Dialog - */ - , showMask: - function(){ - var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); - if( !_mask.length ){ - $( _logic.tpls.mask ).appendTo('body'); - _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); - } - _iframemask.show(); _mask.show(); - - _logic.setMaskSizeForIe6(); - - _iframemask.css('z-index', window.ZINDEX_COUNT++ ); - _mask.css('z-index', window.ZINDEX_COUNT++ ); - } - /** - * 隐藏蒙板 - * @method _logic.hideMask - * @private - * @for JC.Dialog - */ - , hideMask: - function(){ - var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); - if( _mask.length ) _mask.hide(); - if( _iframemask.length ) _iframemask.hide(); - } - /** - * 窗口改变大小时, 改变蒙板的大小, - *
        这个方法主要为了兼容 IE6 - * @method _logic.setMaskSizeForIe6 - * @private - * @for JC.Dialog - */ - , setMaskSizeForIe6: - function(){ - var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae'); - if( !( _mask.length && _iframemask.length ) ) return; - - var _css = { - 'position': 'absolute' - , 'top': '0px' - , 'left': $(document).scrollLeft() + 'px' - , 'height': $(document).height() + 'px' - , 'width': $(window).width() + 'px' - }; - - _mask.css( _css ); - _iframemask.css( _css ); - } - /** - * 获取弹框的显示状态, 默认为0(成功) - * @method _logic.fixWidth - * @for JC.Dialog - * @private - * @param {int} _status 弹框状态: 0:成功, 1:失败, 2:警告 - * @return {int} - */ - , getStatusClass: - function ( _status ){ - var _r = 'UPanelSuccess'; - switch( _status ){ - case 0: _r = 'UPanelSuccess'; break; - case 1: _r = 'UPanelError'; break; - case 2: _r = 'UPanelAlert'; break; - } - return _r; - } - /** - * 修正弹框的默认显示宽度 - * @method _logic.fixWidth - * @for JC.Dialog - * @private - * @param {string} _msg 查显示的文本 - * @param {JC.Panel} _panel - */ - , fixWidth: - function( _msg, _panel ){ - var _tmp = $('
        ' + _msg + '
        ').appendTo('body'), _w = _tmp.width() + 80; - _w > _logic.maxWidth && ( _w = _logic.maxWidth ); - _w < _logic.minWidth && ( _w = _logic.minWidth ); - - _panel.selector().css('width', _w); - } - /** - * 保存会话弹框的所有默认模板 - * @property _logic.tpls - * @type Object - * @for JC.Dialog - * @private - */ - , tpls: { - /** - * msgbox 会话弹框的默认模板 - * @property _logic.tpls.msgbox - * @type string - * @private - */ - msgbox: - [ - '
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        {msg}
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ].join('') - /** - * alert 会话弹框的默认模板 - * @property _logic.tpls.alert - * @type string - * @private - */ - , alert: - [ - '
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        {msg}
        ' - ,'
        ' - ,'
        ' - ,' ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ].join('') - /** - * confirm 会话弹框的默认模板 - * @property _logic.tpls.confirm - * @type string - * @private - */ - , confirm: - [ - '
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        {msg}
        ' - ,'
        ' - ,'
        ' - ,' ' - ,' ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ,'
        ' - ].join('') - /** - * 会话弹框的蒙板模板 - * @property _logic.tpls.mask - * @type string - * @private - */ - , mask: - [ - '
        ' - , '' - ].join('') - } - }; - /** - * 响应窗口改变大小和滚动 - */ - $(window).on('resize scroll', function( _evt ){ - $('body > div.UPanelDialog_identifer').each( function(){ - var _p = $(this); - if( _p.data('DialogInstance') ){ - if( !_p.data('DialogInstance').selector().is(':visible') ) return; - if( _evt.type.toLowerCase() == 'resize' ) _p.data('DialogInstance').center(); - _logic.setMaskSizeForIe6(); - } - }); - }); - -}(jQuery)); +;(function(define, _win) { 'use strict'; + define( [ 'JC.Panel.default', 'JC.Panel.popup', 'JC.Dialog', 'JC.Dialog.popup' ], function(){ + /** + * 这个判断是为了向后兼容 JC 0.1 + * 使用 requirejs 的项目可以移除这段判断代码 + */ + JC.use + && JC.PATH + && JC.use([ + JC.PATH + 'comps/Panel/Panel.default.js' + , JC.PATH + 'comps/Panel/Panel.popup.js' + , JC.PATH + 'comps/Panel/Dialog.js' + , JC.PATH + 'comps/Panel/Dialog.popup.js' + ].join()) + ; + + return JC.Panel; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Panel/Panel.popup.js b/comps/Panel/Panel.popup.js new file mode 100755 index 000000000..37bf2b6ca --- /dev/null +++ b/comps/Panel/Panel.popup.js @@ -0,0 +1,589 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.Panel.default' ], function(){ + /** + * msgbox 提示 popup + *
        这个是不带蒙板 不带按钮的 popup 弹框 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Panel

        + * @namespace JC + * @class msgbox + * @extends JC.Panel + * @static + * @constructor + * @param {string} _msg 提示内容 + * @param {selector} _popupSrc 触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示 + * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 + * @param {function} _cb 弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @param {int} _closeMs 自动关闭的间隔, 单位毫秒, 默认 2000 + * @return JC.Panel + */ + JC.msgbox = + function( _msg, _popupSrc, _status, _cb, _closeMs ){ + if( typeof _popupSrc == 'number' ){ + _status = _popupSrc; + _popupSrc = null; + } + if( typeof _cb == 'number' ){ + _closeMs = _cb; + _cb = null; + } + var _ins = _logic.popup( JC.msgbox.tpl || _logic.tpls.msgbox, _msg, _popupSrc, _status ); + _cb && _ins.on('close', _cb ); + setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 ); + + return _ins; + }; + /** + * 自定义 JC.msgbox 的显示模板 + * @property tpl + * @type string + * @default undefined + * @static + */ + JC.msgbox.tpl; + /** + * alert 提示 popup + *
        这个是不带 蒙板的 popup 弹框 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Panel

        + * @namespace JC + * @class alert + * @extends JC.Panel + * @static + * @constructor + * @param {string} _msg 提示内容 + * @param {selector} _popupSrc 触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示 + * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 + * @param {function} _cb 点击弹框确定按钮的回调 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @return JC.Panel + */ + JC.alert = + function( _msg, _popupSrc, _status, _cb ){ + if( typeof _popupSrc == 'number' ){ + _status = _popupSrc; + _popupSrc = null; + } + return _logic.popup( JC.alert.tpl || _logic.tpls.alert, _msg, _popupSrc, _status, _cb ); + }; + /** + * 自定义 JC.alert 的显示模板 + * @property tpl + * @type string + * @default undefined + * @static + */ + JC.alert.tpl; + /** + * confirm 提示 popup + *
        这个是不带 蒙板的 popup 弹框 + *
        注意, 这是个方法, 写 @class 属性是为了生成文档 + *

        JC Project Site + * | API docs + * | demo link

        + *

        see also: JC.Panel

        + * @namespace JC + * @class confirm + * @extends JC.Panel + * @static + * @constructor + * @param {string} _msg 提示内容 + * @param {selector} _popupSrc 触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示 + * @param {int} _status 显示弹框的状态, 0: 成功, 1: 错误, 2: 警告 + * @param {function} _cb 点击弹框确定按钮的回调 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @param {function} _cancelCb 点击弹框取消按钮的回调 +
        function( _evtName, _panelIns ){
        +    var _btn = $(this);
        +}
        + * @return JC.Panel + */ + JC.confirm = + function( _msg, _popupSrc, _status, _cb, _cancelCb ){ + if( typeof _popupSrc == 'number' ){ + _status = _popupSrc; + _popupSrc = null; + } + var _ins = _logic.popup( JC.confirm.tpl || _logic.tpls.confirm, _msg, _popupSrc, _status, _cb ); + _ins && _cancelCb && _ins.on( 'cancel', _cancelCb ); + return _ins; + }; + /** + * 自定义 JC.confirm 的显示模板 + * @property tpl + * @type string + * @default undefined + * @static + */ + JC.confirm.tpl; + /** + * 弹框逻辑处理方法集 + * @property _logic + * @for JC.alert + * @private + */ + var _logic = { + /** + * 弹框最小宽度 + * @property _logic.minWidth + * @for JC.alert + * @type int + * @default 180 + * @private + */ + minWidth: 180 + /** + * 弹框最大宽度 + * @property _logic.maxWidth + * @for JC.alert + * @type int + * @default 500 + * @private + */ + , maxWidth: 500 + /** + * 显示时 X轴的偏移值 + * @property _logic.xoffset + * @type number + * @default 9 + * @for JC.alert + * @private + */ + , xoffset: 9 + /** + * 显示时 Y轴的偏移值 + * @property _logic.yoffset + * @type number + * @default 3 + * @for JC.alert + * @private + */ + , yoffset: 3 + /** + * 设置弹框的唯一性 + * @method _logic.popupIdentifier + * @for JC.alert + * @private + * @param {JC.Panel} _panel + */ + , popupIdentifier: + function( _panel ){ + var _int; + if( !_panel ){ + $('body > div.UPanelPopup_identifer').each( function(){ + var _p = $(this), _ins = Panel.getInstance( _p ); + if( !_ins ) return; + _ins.hide(); + _ins.close(); + }); + //$('body > div.UPanelPopup_identifer').remove(); + $('body > div.UPanel_TMP').remove(); + }else{ + _panel.selector().addClass('UPanelPopup_identifer'); + _panel.selector().data('PopupInstance', _panel); + } + } + /** + * 弹框通用处理方法 + * @method _logic.popup + * @for JC.alert + * @private + * @param {string} _tpl 弹框模板 + * @param {string} _msg 弹框提示 + * @param {selector} _popupSrc 弹框事件源对象 + * @param {int} _status 弹框状态 + * @param {function} _cb confirm 回调 + * @return JC.Panel + */ + , popup: + function( _tpl, _msg, _popupSrc, _status, _cb ){ + if( !_msg ) return; + _logic.popupIdentifier(); + + _popupSrc && ( _popupSrc = $(_popupSrc) ); + + var _tpl = _tpl + .replace(/\{msg\}/g, _msg) + .replace(/\{status\}/g, _logic.getStatusClass(_status||'') ); + var _ins = new JC.Panel(_tpl); + _logic.popupIdentifier( _ins ); + _ins.selector().data('popupSrc', _popupSrc); + _logic.fixWidth( _msg, _ins ); + + _cb && _ins.on('confirm', _cb); + if( !_popupSrc ) _ins.center(); + + _ins.on('show_default', function(){ + //JC.log('user show_default'); + if( _popupSrc && _popupSrc.length ){ + _logic.showEffect( _ins, _popupSrc, function(){ + _ins.focusButton(); + }); + return false; + } + }); + + _ins.on('close_default', function(){ + //JC.log('user close_default'); + if( _popupSrc && _popupSrc.length ){ + _logic.hideEffect( _ins, _popupSrc, function(){ + _ins.selector().remove(); + _ins = null; + }); + }else{ + _ins.selector().remove(); + } + return false; + }); + + _ins.on('hide_default', function(){ + //JC.log('user hide_default'); + if( _popupSrc && _popupSrc.length ){ + _logic.hideEffect( _ins, _popupSrc, function(){ + _ins.selector().hide(); + }); + return false; + }else{ + _ins.selector().hide(); + } + }); + + if( _popupSrc && _popupSrc.length )_ins.selector().css( { 'left': '-9999px', 'top': '-9999px' } ); + + _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ ); + _ins.show(); + + return _ins; + } + /** + * 隐藏弹框缓动效果 + * @method _logic.hideEffect + * @for JC.alert + * @private + * @param {JC.Panel} _panel + * @param {selector} _popupSrc + * @param {function} _doneCb 缓动完成后的回调 + */ + , hideEffect: + function( _panel, _popupSrc, _doneCb ){ + _popupSrc && ( _popupSrc = $(_popupSrc) ); + if( !(_popupSrc && _popupSrc.length ) ) { + _doneCb && _doneCb( _panel ); + return; + } + if( !( _panel && _panel.selector ) ) return; + + var _poffset = _popupSrc.offset(), _selector = _panel.selector(); + var _dom = _selector[0]; + + _dom.interval && clearInterval( _dom.interval ); + _dom.defaultWidth && _selector.width( _dom.defaultWidth ); + _dom.defaultHeight && _selector.height( _dom.defaultHeight ); + + var _pw = _popupSrc.width(), _sh = _selector.height(); + _dom.defaultWidth = _selector.width(); + _dom.defaultHeight = _selector.height(); + + var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() ); + var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh ); + _top = _top - _sh - _logic.yoffset; + + _selector.height(0); + _selector.css( { 'left': _left + 'px' } ); + + _dom.interval = + JC.f.easyEffect( function( _curVal, _done ){ + _selector.css( { + 'top': _top + _curVal + 'px' + , 'height': _sh - _curVal + 'px' + }); + + if( _popupSrc && !_popupSrc.is(':visible') ){ + clearInterval( _dom.interval ); + _doneCb && _doneCb( _panel ); + } + + if( _sh === _curVal ) _selector.hide(); + _done && _doneCb && _doneCb( _panel ); + }, _sh ); + + } + /** + * 隐藏弹框缓动效果 + * @method _logic.showEffect + * @for JC.alert + * @private + * @param {JC.Panel} _panel + * @param {selector} _popupSrc + */ + , showEffect: + function( _panel, _popupSrc, _doneCb ){ + _popupSrc && ( _popupSrc = $(_popupSrc) ); + if( !(_popupSrc && _popupSrc.length ) ) return; + if( !( _panel && _panel.selector ) ) return; + + var _poffset = _popupSrc.offset(), _selector = _panel.selector(); + var _dom = _selector[0]; + + _dom.interval && clearInterval( _dom.interval ); + _dom.defaultWidth && _selector.width( _dom.defaultWidth ); + _dom.defaultHeight && _selector.height( _dom.defaultHeight ); + + var _pw = _popupSrc.width(), _sh = _selector.height(); + _dom.defaultWidth = _selector.width(); + _dom.defaultHeight = _selector.height(); + + var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() ); + var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh, _logic.xoffset ); + + _selector.height(0); + _selector.css( { 'left': _left + 'px' } ); + + //JC.log( _top, _poffset.top ); + + if( _top > _poffset.top ){ + _dom.interval = + JC.f.easyEffect( function( _curVal, _done ){ + _selector.css( { + 'top': _top - _sh - _logic.yoffset + 'px' + , 'height': _curVal + 'px' + }); + _done && _doneCb && _doneCb( _panel ); + }, _sh ); + + }else{ + _dom.interval = + JC.f.easyEffect( function( _curVal, _done ){ + _selector.css( { + 'top': _top - _curVal - _logic.yoffset + 'px' + , 'height': _curVal + 'px' + }); + _done && _doneCb && _doneCb( _panel ); + }, _sh ); + } + + } + /** + * 设置 Panel 的默认X,Y轴 + * @method _logic.onresize + * @private + * @for JC.alert + * @param {selector} _panel + */ + , onresize: + function( _panel ){ + if( !_panel.selector().is(':visible') ) return; + var _selector = _panel.selector(), _popupSrc = _selector.data('popupSrc'); + if( !(_popupSrc && _popupSrc.length) ){ + _panel.center(); + }else{ + var _srcoffset = _popupSrc.offset(); + var _srcTop = _srcoffset.top + , _srcHeight = _popupSrc.height() + , _targetHeight = _selector.height() + , _yoffset = 0 + + , _srcLeft = _srcoffset.left + , _srcWidth = _popupSrc.width() + , _targetWidth = _selector.width() + , _xoffset = 0 + ; + + var _left = _logic.getLeft( _srcLeft, _srcWidth + , _targetWidth, _xoffset ) + _logic.xoffset; + var _top = _logic.getTop( _srcTop, _srcHeight + , _targetHeight, _yoffset ) - _targetHeight - _logic.yoffset; + + _selector.css({ + 'left': _left + 'px', 'top': _top + 'px' + }); + } + } + /** + * 取得弹框最要显示的 y 轴 + * @method _logic.getTop + * @for JC.alert + * @private + * @param {number} _scrTop 滚动条Y位置 + * @param {number} _srcHeight 事件源 高度 + * @param {number} _targetHeight 弹框高度 + * @param {number} _offset Y轴偏移值 + * @return {number} + */ + , getTop: + function( _srcTop, _srcHeight, _targetHeight, _offset ){ + var _r = _srcTop + , _scrTop = $(document).scrollTop() + , _maxTop = $(window).height() - _targetHeight; + + _r - _targetHeight < _scrTop && ( _r = _srcTop + _srcHeight + _targetHeight + _offset ); + + return _r; + } + /** + * 取得弹框最要显示的 x 轴 + * @method _logic.getLeft + * @for JC.alert + * @private + * @param {number} _scrTop 滚动条Y位置 + * @param {number} _srcHeight 事件源 高度 + * @param {number} _targetHeight 弹框高度 + * @param {number} _offset Y轴偏移值 + * @return {number} + */ + , getLeft: + function( _srcLeft, _srcWidth, _targetWidth, _offset ){ + _offset == undefined && ( _offset = 5 ); + var _r = _srcLeft + _srcWidth / 2 + _offset - _targetWidth / 2 + , _scrLeft = $(document).scrollLeft() + , _maxLeft = $(window).width() + _scrLeft - _targetWidth; + + _r > _maxLeft && ( _r = _maxLeft - 2 ); + _r < _scrLeft && ( _r = _scrLeft + 1 ); + + return _r; + } + /** + * 修正弹框的默认显示宽度 + * @method _logic.fixWidth + * @for JC.alert + * @private + * @param {string} _msg 查显示的文本 + * @param {JC.Panel} _panel + */ + , fixWidth: + function( _msg, _panel ){ + var _tmp = $('
        ' + _msg + '
        ').appendTo('body'), _w = _tmp.width() + 80; + _tmp.remove(); + _w > _logic.maxWidth && ( _w = _logic.maxWidth ); + _w < _logic.minWidth && ( _w = _logic.minWidth ); + + _panel.selector().css('width', _w); + } + /** + * 获取弹框的显示状态, 默认为0(成功) + * @method _logic.fixWidth + * @for JC.alert + * @private + * @param {int} _status 弹框状态: 0:成功, 1:失败, 2:警告 + * @return {int} + */ + , getStatusClass: + function ( _status ){ + var _r = 'UPanelSuccess'; + switch( _status ){ + case 0: _r = 'UPanelSuccess'; break; + case 1: _r = 'UPanelError'; break; + case 2: _r = 'UPanelAlert'; break; + } + return _r; + } + /** + * 保存弹框的所有默认模板 + * @property _logic.tpls + * @type Object + * @for JC.alert + * @private + */ + , tpls: { + /** + * msgbox 弹框的默认模板 + * @property _logic.tpls.msgbox + * @type string + * @private + */ + msgbox: + [ + '
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        {msg}
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ].join('') + /** + * alert 弹框的默认模板 + * @property _logic.tpls.alert + * @type string + * @private + */ + , alert: + [ + '
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        {msg}
        ' + ,'
        ' + ,'
        ' + ,' ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ].join('') + /** + * confirm 弹框的默认模板 + * @property _logic.tpls.confirm + * @type string + * @private + */ + , confirm: + [ + '
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        {msg}
        ' + ,'
        ' + ,'
        ' + ,' ' + ,' ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ].join('') + } + }; + /** + * 响应窗口改变大小 + */ + $(window).on('resize', function( _evt ){ + $('body > div.UPanelPopup_identifer').each( function(){ + var _p = $(this); + _p.data('PopupInstance') && _logic.onresize( _p.data('PopupInstance') ); + }); + }); + + return JC.Panel; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Panel/_demo/custom_dialog.html b/comps/Panel/_demo/custom_dialog.html old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/custom_panel.html b/comps/Panel/_demo/custom_panel.html old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/data/test.php b/comps/Panel/_demo/data/test.php old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/form_example.html b/comps/Panel/_demo/form_example.html old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/index.php b/comps/Panel/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/simple_dialog.html b/comps/Panel/_demo/simple_dialog.html old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/simple_panel.html b/comps/Panel/_demo/simple_panel.html old mode 100644 new mode 100755 diff --git a/comps/Panel/_demo/simple_panel_clickClose_false.html b/comps/Panel/_demo/simple_panel_clickClose_false.html old mode 100644 new mode 100755 diff --git a/comps/Panel/backup/20130817.7z b/comps/Panel/backup/20130817.7z deleted file mode 100644 index 6fcfdd0ab..000000000 Binary files a/comps/Panel/backup/20130817.7z and /dev/null differ diff --git a/comps/Panel/index.php b/comps/Panel/index.php old mode 100644 new mode 100755 diff --git a/comps/Panel/nodejs_merge.js b/comps/Panel/nodejs_merge.js old mode 100644 new mode 100755 index a988b78bc..8e988a72f --- a/comps/Panel/nodejs_merge.js +++ b/comps/Panel/nodejs_merge.js @@ -1,22 +1,30 @@ -var fs = require('fs'); +var _fs = require('fs'); -var dir = __dirname + '/'; +var _dir = __dirname + '/' + , _paths = [] + , _contents = [] + , _outputName = 'Panel.js' + ; -var path1 = dir + 'JC.Panel.js'; -var path2 = dir + 'JC.Popup.js'; -var path3 = dir + 'JC.Dialog.js'; + _paths.push( _dir + 'Panel.default.js' ); + _paths.push( _dir + 'Panel.popup.js' ); + _paths.push( _dir + 'Dialog.js' ); + _paths.push( _dir + 'Dialog.popup.js' ); -var outPath = dir + 'Panel.js'; +for( var i = 0, j = _paths.length; i < j; i++ ){ + if( ! _fs.existsSync( _paths[i] ) ) return; +} -if( !( fs.existsSync( path1 ) && fs.existsSync( path2 ) && fs.existsSync( path3 ) ) ) return; +for( var i = 0, j = _paths.length; i < j; i++ ){ + _contents.push( _fs.readFileSync( _paths[i], 'utf8') ); +} -var tmp = []; - tmp.push( fs.readFileSync( path1, 'utf8') ); - tmp.push( fs.readFileSync( path2, 'utf8') ); - tmp.push( fs.readFileSync( path3, 'utf8') ); +_fs.writeFileSync( _dir + _outputName, _contents.join(';\n') ); + +for( var i = 0, j = _paths.length; i < j; i++ ){ + _fs.unlinkSync( _paths[i] ); +} + +console.log( 'merge done: ' + _outputName ); -fs.writeFileSync( outPath, tmp.join(';\n\n') ); -fs.unlinkSync( path1 ); -fs.unlinkSync( path2 ); -fs.unlinkSync( path3 ); diff --git a/comps/Panel/res/default/images/cls.png b/comps/Panel/res/default/images/cls.png old mode 100644 new mode 100755 diff --git a/comps/Panel/res/default/images/status.gif b/comps/Panel/res/default/images/status.gif old mode 100644 new mode 100755 diff --git a/comps/Panel/res/default/style.css b/comps/Panel/res/default/style.css old mode 100644 new mode 100755 index d314df013..ed3d21dab --- a/comps/Panel/res/default/style.css +++ b/comps/Panel/res/default/style.css @@ -11,8 +11,8 @@ filter: alpha(opacity=35); } .UPanelMaskIframe{ - opacity: 0; - filter: alpha(opacity=0); + opacity: 0!important; + filter: alpha(opacity=0)!important; } div.UPanel, div.UPanel *{ diff --git a/comps/Panel/res/default/style.html b/comps/Panel/res/default/style.html old mode 100644 new mode 100755 diff --git a/comps/Placeholder/Placeholder.js b/comps/Placeholder/Placeholder.js old mode 100644 new mode 100755 index 73a1cb905..604ee4664 --- a/comps/Placeholder/Placeholder.js +++ b/comps/Placeholder/Placeholder.js @@ -1,9 +1,13 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ /** * Placeholder 占位符提示功能 + *

        + * require: + * JC.BaseMVC + *

        *

        JC Project Site * | API docs * | demo link

        - *

        require: jQuery

        * @namespace JC * @class Placeholder * @extends JC.BaseMVC @@ -13,9 +17,8 @@ * @author qiushaowei | 75 Team * @date 2013-10-19 */ -;(function($){ - JC.Placeholder = Placeholder; + JC.f.addAutoInit && JC.f.addAutoInit( Placeholder ); function Placeholder( _selector ){ _selector && ( _selector = $( _selector ) ); @@ -98,13 +101,13 @@ return _r; }; /** - * 更新所有 placeholder 实现的状态 + * 更新所有 placeholder 的状态 * @method update * @static */ Placeholder.update = function(){ - var _items = $( printf( '#{0} > div', Placeholder.Model._boxId ) ); + var _items = $( JC.f.printf( '#{0} > div', Placeholder.Model._boxId ) ); if( !_items.length ) return; _items.each( function(){ var _p = $(this), _ins = _p.data( 'CPHIns' ); @@ -210,7 +213,7 @@ , placeholder: function(){ if( !this._placeholder ){ - this._placeholder = $( printf( '
        ' + this._placeholder = $( JC.f.printf( '' , this.className() ) ) .appendTo( this.placeholderBox() ); @@ -225,7 +228,7 @@ function(){ var _r = $( '#' + Placeholder.Model._boxId ); if( !( _r && _r.length ) ){ - _r = $( printf( '
        ', Placeholder.Model._boxId ) ).appendTo( document.body ); + _r = $( JC.f.printf( '
        ', Placeholder.Model._boxId ) ).appendTo( document.body ); } return _r; } @@ -244,7 +247,7 @@ , _v = _p._model.selector().val().trim() , _holder = _p._model.placeholder() ; - if( _v ){ + if( _v || !_p.selector().is( ':visible' ) ){ _holder.hide(); return; } @@ -258,7 +261,6 @@ _holder.css( { 'left': _offset.left + 'px' , 'top': _offset.top + 1 + 'px' - , 'line-height': _h + 'px' } ); _holder.show(); @@ -333,6 +335,34 @@ ctrl.focus(); } } + /** + * inject jquery show, hide func, for Placeholder change event + */ + var _oldShow= $.fn.show, _oldHide = $.fn.hide, EVENT_BINDER = $( {} ); + $.fn.show = + function(){ + var _r = _oldShow.apply( this, arguments ), _p = this; + setTimeout( function(){ + EVENT_BINDER.trigger( 'show' ); + }, 1 ); + return _r; + }; + + $.fn.hide = + function(){ + var _r = _oldHide.apply( this, arguments ), _p = this; + setTimeout( function(){ + EVENT_BINDER.trigger( 'hide' ); + }, 1 ); + return _r; + }; + + EVENT_BINDER.on( 'show hide', function(){ + EVENT_BINDER.data('timer') && clearTimeout( EVENT_BINDER.data( 'timer' ) ); + EVENT_BINDER.data( 'timer', setTimeout( function(){ + Placeholder.update(); + }, 100 ) ); + }); $(document).ready( function(){ var _insAr = 0; @@ -341,4 +371,13 @@ ; }); -}(jQuery)); + return JC.Placeholder; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Placeholder/_demo/demo.html b/comps/Placeholder/_demo/demo.html old mode 100644 new mode 100755 index 9dc214189..6d939e7ed --- a/comps/Placeholder/_demo/demo.html +++ b/comps/Placeholder/_demo/demo.html @@ -60,12 +60,13 @@
        Placeholder 功能演示, html prop xplaceholder
        -
        +
        input: + 添加
        +
        + input: + + - 删除 + +
        +
        @@ -90,7 +105,7 @@ + + + diff --git a/comps/PopTips/_demo/index.php b/comps/PopTips/_demo/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/comps/PopTips/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/PopTips/index.php b/comps/PopTips/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/comps/PopTips/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/PopTips/res/default/style.css b/comps/PopTips/res/default/style.css new file mode 100755 index 000000000..0fa1d4f58 --- /dev/null +++ b/comps/PopTips/res/default/style.css @@ -0,0 +1,352 @@ +.CPT { + color:#DB7C22; + z-index:left_top1; + font-size:12px; + line-height:1.5; + zoom:1 +} +.CPT_shadow { + background-color:rgba(229, 169, left_top7, .15); + FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#26e5a96b, endColorstr=#26e5a96b); + border-radius:2px; + padding:2px; + zoom:1; + _display:inline +} +.CPT_container { + position:relative; + background-color:#FFFCEF; + border:1px solid #ffbb76; + border-radius:2px; + padding:5px 15px; + zoom:1; + _display:inline +} +.CPT:after, +.CPT_shadow:after, +.CPT_container:after { + visibility:hidden; + display:block; + font-size:0; + content:" "; + clear:both; + height:0 +} +a.CPT_close { + position:absolute; + right:3px; + top:3px; + border:1px solid #ffc891; + text-decoration:none; + border-radius:3px; + width:12px; + height:12px; + font-family:tahoma; + color:#dd7e00; + line-height:left_toppx; + *line-height:12px; + text-align:center; + font-size:14px; + background:#ffd7af; + background:-webkit-gradient(linear, left top, left bottom, from(#FFF0E1), to(#FFE7CD)); + background:-moz-linear-gradient(top, #FFF0E1, #FFE7CD); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0E1', endColorstr='#FFE7CD'); + background:-o-linear-gradient(top, #FFF0E1, #FFE7CD); + background:linear-gradient(top, #FFF0E1, #FFE7CD); + overflow:hidden +} +a.CPT_close:hover { + border:1px solid #ffb24c; + text-decoration:none; + color:#dd7e00; + background:#ffd7af; + background:-webkit-gradient(linear, left top, left bottom, from(#FFE5CA), to(#FFCC98)); + background:-moz-linear-gradient(top, #FFE5CA, #FFCC98); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFE5CA', endColorstr='#FFCC98'); + background:-o-linear-gradient(top, #FFE5CA, #FFCC98); + background:linear-gradient(top, #FFE5CA, #FFCC98) +} +.CPT_arrow { + position:absolute; + z-index:left_top; + *zoom:1 +} +.CPT_arrow em, +.CPT_arrow span { + position:absolute; + *zoom:1; + width:0; + height:0; + border-color:rgba(255, 255, 255, 0); + border-color:transparent\0; + *border-color:transparent; + _border-color:tomato; + _filter:chroma(color=tomato); + border-style:solid; + overflow:hidden; + top:0; + left:0 +} +.CPT_arrow_left_top { + left:-6px; + top:left_toppx +} +.CPT_arrow_left_top em { + top:0; + left:-1px; + border-right-color:#ffbb76; + border-width:6px 6px 6px 0 +} +.CPT_arrow_left_top span { + border-right-color:#FFFCEF; + border-width:6px 6px 6px 0 +} +.CPT_arrow_left { + left:-6px; + top:50% +} +.CPT_arrow_left em { + top:-6px; + left:-1px; + border-right-color:#ffbb76; + border-width:6px 6px 6px 0 +} +.CPT_arrow_left span { + top:-6px; + border-right-color:#FFFCEF; + border-width:6px 6px 6px 0 +} +.CPT_arrow_right_top { + top:left_toppx; + right:0 +} +.CPT_arrow_right_top em { + top:0; + left:1px; + border-left-color:#ffbb76; + border-width:6px 0 6px 6px +} +.CPT_arrow_right_top span { + border-left-color:#FFFCEF; + border-width:6px 0 6px 6px +} +.CPT_arrow_right { + top:50%; + right:0 +} +.CPT_arrow_right em { + top:-6px; + left:1px; + border-left-color:#ffbb76; + border-width:6px 0 6px 6px +} +.CPT_arrow_right span { + top:-6px; + border-left-color:#FFFCEF; + border-width:6px 0 6px 6px +} +.CPT_arrow_top_left em, +.CPT_arrow_top em, +.CPT_arrow_top_right em { + border-width:0 6px 6px; + border-bottom-color:#ffbb76; + top:-1px; + left:0 +} +.CPT_arrow_top_left span, +.CPT_arrow_top span, +.CPT_arrow_top_right span { + border-width:0 6px 6px; + border-bottom-color:#FFFCEF +} +.CPT_arrow_top_left { + left:14px; + top:-6px +} +.CPT_arrow_top_right { + right:28px; + top:-6px +} +.CPT_arrow_top { + left:50%; + top:-6px +} +.CPT_arrow_top em, +.CPT_arrow_top span { + left:-6px +} +.CPT_arrow_bottom_right em, +.CPT_arrow_bottom em, +.CPT_arrow_bottom_left em { + border-width:6px 6px 0; + border-top-color:#ffbb76; + top:1px; + left:0 +} +.CPT_arrow_bottom_right span, +.CPT_arrow_bottom span, +.CPT_arrow_bottom_left span { + border-width:6px 6px 0; + border-top-color:#FFFCEF +} +.CPT_arrow_bottom_right { + right:28px; + bottom:0 +} +.CPT_arrow_bottom { + left:50%; + bottom:0 +} +.CPT_arrow_bottom_left { + left:14px; + bottom:0 +} +.CPT_arrow_bottom em, +.CPT_arrow_bottom span { + left:-6px +} +:root .CPT_shadow { + FILTER:none\9 +} +.CPT_blue { + color:#4d4d4d +} +.CPT_blue .CPT_shadow { + background-color:rgba(0, 0, 0, .05); + FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0c000000, endColorstr=#0c000000) +} +.CPT_blue .CPT_container { + background-color:#F8FCFF; + border:1px solid #B9C8D3 +} +.CPT_blue .CPT_arrow_left_top em, +.CPT_blue .CPT_arrow_left em { + border-right-color:#B9C8D3 +} +.CPT_blue .CPT_arrow_top_left em, +.CPT_blue .CPT_arrow_top em, +.CPT_blue .CPT_arrow_top_right em { + border-bottom-color:#B9C8D3 +} +.CPT_blue .CPT_arrow_right_top em, +.CPT_blue .CPT_arrow_right em { + border-left-color:#B9C8D3 +} +.CPT_blue .CPT_arrow_bottom_right em, +.CPT_blue .CPT_arrow_bottom em, +.CPT_blue .CPT_arrow_bottom_left em { + border-top-color:#B9C8D3 +} +.CPT_blue .CPT_arrow_left_top span, +.CPT_blue .CPT_arrow_left span { + border-right-color:#F8FCFF +} +.CPT_blue .CPT_arrow_top_left span, +.CPT_blue .CPT_arrow_top span, +.CPT_blue .CPT_arrow_top_right span { + border-bottom-color:#F8FCFF +} +.CPT_blue .CPT_arrow_right_top span, +.CPT_blue .CPT_arrow_right span { + border-left-color:#F8FCFF +} +.CPT_blue .CPT_arrow_bottom_right span, +.CPT_blue .CPT_arrow_bottom span, +.CPT_blue .CPT_arrow_bottom_left span { + border-top-color:#F8FCFF +} +.CPT_white { + color:#333 +} +.CPT_white .CPT_shadow { + background-color:rgba(0, 0, 0, .05); + FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0c000000, endColorstr=#0c000000) +} +.CPT_white .CPT_container { + background-color:#fff; + border:1px solid #b1b1b1 +} +.CPT_white .CPT_arrow_left_top em, +.CPT_white .CPT_arrow_left em { + border-right-color:#b1b1b1 +} +.CPT_white .CPT_arrow_top_left em, +.CPT_white .CPT_arrow_top em, +.CPT_white .CPT_arrow_top_right em { + border-bottom-color:#b1b1b1 +} +.CPT_white .CPT_arrow_right_top em, +.CPT_white .CPT_arrow_right em { + border-left-color:#b1b1b1 +} +.CPT_white .CPT_arrow_bottom_right em, +.CPT_white .CPT_arrow_bottom em, +.CPT_white .CPT_arrow_bottom_left em { + border-top-color:#b1b1b1 +} +.CPT_white .CPT_arrow_left_top span, +.CPT_white .CPT_arrow_left span { + border-right-color:#fff +} +.CPT_white .CPT_arrow_top_left span, +.CPT_white .CPT_arrow_top span, +.CPT_white .CPT_arrow_top_right span { + border-bottom-color:#fff +} +.CPT_white .CPT_arrow_right_top span, +.CPT_white .CPT_arrow_right span { + border-left-color:#fff +} +.CPT_white .CPT_arrow_bottom_right span, +.CPT_white .CPT_arrow_bottom span, +.CPT_white .CPT_arrow_bottom_left span { + border-top-color:#fff +} + +.CPT_green { + color:#6fbd00 +} +.CPT_green .CPT_shadow { + background-color:rgba(0, 0, 0, .05); + FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0c000000, endColorstr=#0c000000) +} +.CPT_green .CPT_container { + background-color:#f2fbea; + border:1px solid #adde7b +} +.CPT_green .CPT_arrow_left_top em, +.CPT_green .CPT_arrow_left em { + border-right-color:#adde7b +} +.CPT_green .CPT_arrow_top_left em, +.CPT_green .CPT_arrow_top em, +.CPT_green .CPT_arrow_top_right em { + border-bottom-color:#adde7b +} +.CPT_green .CPT_arrow_right_top em, +.CPT_green .CPT_arrow_right em { + border-left-color:#adde7b +} +.CPT_green .CPT_arrow_bottom_right em, +.CPT_green .CPT_arrow_bottom em, +.CPT_green .CPT_arrow_bottom_left em { + border-top-color:#adde7b +} +.CPT_green .CPT_arrow_left_top span, +.CPT_green .CPT_arrow_left span { + border-right-color:#e8f8db +} +.CPT_green .CPT_arrow_top_left span, +.CPT_green .CPT_arrow_top span, +.CPT_green .CPT_arrow_top_right span { + border-bottom-color:#e8f8db +} +.CPT_green .CPT_arrow_right_top span, +.CPT_green .CPT_arrow_right span { + border-left-color:#e8f8db +} +.CPT_green .CPT_arrow_bottom_right span, +.CPT_green .CPT_arrow_bottom span, +.CPT_green .CPT_arrow_bottom_left span { + border-top-color:#e8f8db +} \ No newline at end of file diff --git a/comps/PopTips/res/default/style.html b/comps/PopTips/res/default/style.html new file mode 100755 index 000000000..56e6fa2c3 --- /dev/null +++ b/comps/PopTips/res/default/style.html @@ -0,0 +1,96 @@ + + + + +Open JQuery Components Library - suches + + + + +

        样式示例

        + +
        +
        yellow
        +
        +
        1.这个tip本来显示在右边
        2.但是右边会溢出
        3.可是左边也溢出了
        4.悲剧的是上边也溢出了
        +
        + +
        blue
        +
        +
        1.这个tip本来显示在右边
        2.但是右边会溢出
        3.可是左边也溢出了
        4.悲剧的是上边也溢出了
        +
        + +
        white
        +
        +
        1.这个tip本来显示在右边
        2.但是右边会溢出
        3.可是左边也溢出了
        4.悲剧的是上边也溢出了
        +
        + +
        green
        +
        +
        这个tips本来应该显示在下方
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        +
        + + +
        + +
        +
        +

        位置示例

        +
        +
        左上角
        +
        +
        CPT_arrow_left_top


        +
        +
        右上角
        +
        +
        CPT_arrow_right_top


        +
        +
        上居左
        +
        +
        CPT_arrow_top_left


        +
        +
        上居右
        +
        +
        CPT_arrow_top_right


        +
        +
        下居左
        +
        +
        CPT_arrow_7bottom_left


        +
        +
        下居右
        +
        +
        CPT_arrow_bottom_right


        +
        +
        + + + + diff --git a/comps/ServerSort/ServerSort.js b/comps/ServerSort/ServerSort.js new file mode 100755 index 000000000..e5bcc455e --- /dev/null +++ b/comps/ServerSort/ServerSort.js @@ -0,0 +1,378 @@ +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){ +/** + * 数据库全表排序逻辑 + * + *

        require: + * JC.BaseMVC + *

        + * + *

        JC Project Site + * | API docs + * | demo link

        + * + *

        页面只要引用本脚本, 默认会处理 [div|tr] class="js_compServerSort"

        + * + *

        可用的 HTML attribute

        + * + *
        + *
        cssUrl = url, default = location.href
        + *
        要翻页的URL
        + * + *
        cssSortName = string, default = sortby
        + *
        排序的字段名
        + * + *
        cssTypeName = string, default = sorttype
        + *
        排序的类型名: desc, asc
        + * + *
        cssItems = selector, default = |a[sortName]
        + *
        排序的具体字段选择器
        + * + *
        cssTypeEnum = string, default = desc,asc
        + *
        排序的种类
        + * + *
        cssClassEnum = string, default = js_cssDesc,js_cssAsc
        + *
        显示排序样式的 CSS class
        + * + *
        cssCurClassEnum= string, default = js_cssDesc_cur,js_cssAsc_cur
        + *
        显示当前排序字段样式的 CSS class
        + * + *
        cssResetUrlParams = string, default=page
        + *
        页面跳转时, 要重置的 URL 参数
        + * + *
        cssUrlFilter = function, window 变量域
        + *
        页面跳转前, 过滤 url 的回调 +
        function urlFilter( _url ){
        +    _url = JC.f.addUrlParams( _url, { rnd: JC.f.ts() } );
        +    return _url;
        +}
        + *
        + * + *
        cssDefaultSortName = string, default = first item[sortName]
        + *
        默认排序字段
        + * + *
        cssDefaultType = string, default = desc
        + *
        默认排序类型
        + *
        + * + * @namespace JC + * @class ServerSort + * @extends JC.BaseMVC + * @constructor + * @param {selector|string} _selector + * @version 2014-08-15 + * @author qiushaowei | 75 Team + * @example + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        序号关键词日均PV行业添加率平均出价日均点击率
        2关键词1000100020.003000
        1关键词1000100020.003000
        + */ + var _jdoc = $( document ), _jwin = $( window ); + + JC.ServerSort = ServerSort; + + function ServerSort( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( JC.BaseMVC.getInstance( _selector, ServerSort ) ) + return JC.BaseMVC.getInstance( _selector, ServerSort ); + + JC.BaseMVC.getInstance( _selector, ServerSort, this ); + + this._model = new ServerSort.Model( _selector ); + this._view = new ServerSort.View( this._model ); + + this._init(); + + //JC.log( ServerSort.Model._instanceName, 'all inited', new Date().getTime() ); + } + /** + * 初始化可识别的 ServerSort 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of ServerSortInstance} + */ + ServerSort.init = + function( _selector ){ + var _r = []; + _selector = $( _selector || document ); + + if( _selector.length ){ + if( _selector.hasClass( 'js_compServerSort' ) ){ + _r.push( new ServerSort( _selector ) ); + }else{ + _selector.find( 'div.js_compServerSort, tr.js_compServerSort' ).each( function(){ + _r.push( new ServerSort( this ) ); + }); + } + } + return _r; + }; + + JC.BaseMVC.build( ServerSort ); + + JC.f.extendObject( ServerSort.prototype, { + _beforeInit: + function(){ + //JC.log( 'ServerSort _beforeInit', new Date().getTime() ); + } + + , _initHanlderEvent: + function(){ + var _p = this; + + if( !( _p._model.items() && _p._model.items().length ) ) return; + + _p.on( 'inited', function(){ + _p.trigger( 'UPDATE_LAYOUT' ); + }); + + _p._model.items().on( 'click', function( _evt ){ + _evt.preventDefault(); + var _sp = $( this ) + , _preSortName = JC.f.getUrlParam( _p._model.sortName() ) + , _preType = JC.f.getUrlParam( _p._model.typeName() ) + , _sortName = _sp.attr( 'sortName' ) + , _sortType = _sp.attr( 'sortType' ) + , _nextType + ; + + _nextType = _preType; + if( _sortName == _p._model.defaultSortName() ){ + if( _nextType ){ + _sortType = _p._model.otherSortType( _nextType ); + }else{ + _sortType = _p._model.otherSortType( _p._model.defaultType() ); + } + }else{ + _sortType = _p._model.defaultType(); + } + //JC.log( _p._model.defaultSortName(), '-', _preSortName, '-', _sortName, '-', _sortType, '-', JC.f.ts() ); + _p.trigger( 'UPDATE', [ _sortName, _sortType, _preSortName, _preType ] ); + }); + + _p.on( 'UPDATE', function( _evt, _sortName, _sortType, _preSortName, _preType ){ + var _url = _p._model.url() + , _params = {} + , _resetUrlParams = _p._model.resetUrlParams() + , _tmpD + ; + + _params[ _p._model.sortName() ] = _sortName; + _params[ _p._model.typeName() ] = _sortType; + _url = JC.f.addUrlParams( _url, _params ); + + if( _resetUrlParams && _resetUrlParams.length ){ + $.each( _resetUrlParams, function( _k, _item ){ + if( !_item ) return; + if( JC.f.hasUrlParam( _url, _item ) ){ + _tmpD = {}; + _tmpD[ _item ] = 1; + _url = JC.f.addUrlParams( _url, _tmpD ); + } + }); + } + + _p._model.urlFilter() && ( _url = _p._model.urlFilter()( _url ) ); + + location.href = _url; + }); + + _p.on( 'UPDATE_LAYOUT', function( _evt ){ + var _defalutSortName = _p._model.defaultSortName() + , _defaultType = _p._model.defaultType() + , _curType = JC.f.getUrlParam( _p._model.typeName() ) || _defaultType + , _items = _p._model.items(); + ; + //JC.log( _defalutSortName, _defaultType, _curType ); + if( !( _items && _items.length ) ) return; + + $.each( _items, function( _k, _item ){ + _item = $( _item ); + var _sortName = _item.attr( 'sortName' ), _class; + + if( _sortName == _defalutSortName ){ + _class = [ + _p._model.classEnum()[ _p._model.typeIndexAt( _p._model.otherSortType( _curType ) ) ] + , _p._model.curClassEnum()[ _p._model.typeIndexAt( _p._model.otherSortType( _curType ) ) ] + ].join( ' ' ); + }else{ + _class = _p._model.classEnum()[ _p._model.typeIndexAt( _defaultType ) ]; + } + //JC.log( _k, _item, _class ); + + if( _class ){ + _item.removeClass( _p._model.classEnum().concat( _p._model.curClassEnum() ).join( ' ' ) ); + _item.addClass( _class ); + } + }); + }); + } + + , _inited: + function(){ + //JC.log( 'ServerSort _inited', new Date().getTime() ); + this.trigger( 'inited' ); + } + }); + + ServerSort.Model._instanceName = 'JCServerSort'; + JC.f.extendObject( ServerSort.Model.prototype, { + init: + function(){ + //JC.log( 'ServerSort.Model.init:', new Date().getTime() ); + } + + , urlFilter: function(){ return this.callbackProp( 'cssUrlFilter' ); } + + , typeIndexAt: + function( _type ){ + var _r = 0; + $.each( this.typeEnum(), function( _k, _item ){ + if( _item === _type ){ + _r = _k; + return false; + } + }); + return _r; + } + + , resetUrlParams: + function(){ + if( !this._resetUrlParams ){ + this._resetUrlParams = ( this.attrProp( 'cssResetUrlParams' ) || 'page' ).replace( /[\s]+/g, '' ); + this._resetUrlParams && ( this._resetUrlParams = this._resetUrlParams.split(',') ) + } + return this._resetUrlParams; + } + + , defaultType: + function(){ + return this.attrProp( 'cssDefaultType' ) || this.typeEnum()[0]; + } + + , otherSortType: + function( _type ){ + var _r; + if( _type ){ + $.each( this.typeEnum(), function( _k, _item ){ + if( _type != _item ){ + _r = _item; + return false; + } + }); + } + _r = _r || this.typeEnum()[0]; + return _r; + } + + , defaultSortName: + function(){ + if( typeof this._defalutSortName == 'undefined' ){ + this._defalutSortName = this.items().first().attr( 'sortName' ); + this.is( '[cssDefaultSortName]' ) + && ( this._defalutSortName = this.attrProp( 'cssDefaultSortName' ) || this._defalutSortName ); + + this._defalutSortName = JC.f.getUrlParam( this.sortName() ) || this._defalutSortName; + } + return this._defalutSortName; + } + + , items: + function(){ + if( typeof this._items == 'undefined' ){ + var _selector = this.attrProp( 'cssItems' ) || '|a[sortName]'; + this._items = JC.f.parentSelector( this.selector(), _selector ) || null; + } + return this._items; + } + + , url: function(){ return JC.f.urlDetect( this.attrProp( 'cssUrl' ) || 'URL' ); } + + , sortName: function(){ return this.attrProp( 'cssSortName' ) || 'sortby'; } + , typeName: function(){ return this.attrProp( 'cssTypeName' ) || 'sorttype'; } + + , typeEnum: + function(){ + if( !this._typeEnum ){ + this._typeEnum = ( this.attrProp( 'cssTypeEnum' ) || 'desc,asc' ).replace( /[\s]+/g, '' ).split( ',' ); + } + return this._typeEnum; + } + + , classEnum: + function(){ + if( !this._classEnum ){ + this._classEnum = ( this.attrProp( 'cssClassEnum' ) || 'js_cssDesc,js_cssAsc' ).replace( /[\s]+/g, '' ).split( ',' ); + } + return this._classEnum; + } + + , curClassEnum: + function(){ + if( !this._curClassEnum ){ + this._curClassEnum = ( this.attrProp( 'cssCurClassEnum' ) || 'js_cssDesc_cur,js_cssAsc_cur' ).replace( /[\s]+/g, '' ).split( ',' ); + } + return this._curClassEnum; + } + + }); + + JC.f.extendObject( ServerSort.View.prototype, { + init: + function(){ + //JC.log( 'ServerSort.View.init:', new Date().getTime() ); + } + }); + + _jdoc.ready( function(){ + ServerSort.autoInit && ServerSort.init(); + }); + + return JC.ServerSort; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/ServerSort/_demo/demo.defaultSortName.html b/comps/ServerSort/_demo/demo.defaultSortName.html new file mode 100755 index 000000000..6ae4bd390 --- /dev/null +++ b/comps/ServerSort/_demo/demo.defaultSortName.html @@ -0,0 +1,91 @@ + + + + + JC.ServerSort + + + + + + + + +

        JC.ServerSort 示例

        + back + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        序号关键词日均PV行业添加率平均出价日均点击率
        2关键词1000100020.003000
        1关键词1000100020.003000
        + + diff --git a/comps/ServerSort/_demo/demo.defaultType.html b/comps/ServerSort/_demo/demo.defaultType.html new file mode 100755 index 000000000..70b768249 --- /dev/null +++ b/comps/ServerSort/_demo/demo.defaultType.html @@ -0,0 +1,90 @@ + + + + + JC.ServerSort + + + + + + + +

        JC.ServerSort 示例

        + back + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        序号关键词日均PV行业添加率平均出价日均点击率
        2关键词1000100020.003000
        1关键词1000100020.003000
        + + diff --git a/comps/ServerSort/_demo/demo.html b/comps/ServerSort/_demo/demo.html new file mode 100755 index 000000000..3095a4dc4 --- /dev/null +++ b/comps/ServerSort/_demo/demo.html @@ -0,0 +1,95 @@ + + + + + JC.ServerSort + + + + + + + +

        JC.ServerSort 示例

        + back + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        序号关键词日均PV行业添加率平均出价日均点击率
        2关键词1000100020.003000
        1关键词1000100020.003000
        + + diff --git a/comps/ServerSort/_demo/index.php b/comps/ServerSort/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/ServerSort/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/ServerSort/index.php b/comps/ServerSort/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/ServerSort/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/ServerSort/res/default/images/down.png b/comps/ServerSort/res/default/images/down.png new file mode 100755 index 000000000..e0138d60e Binary files /dev/null and b/comps/ServerSort/res/default/images/down.png differ diff --git a/comps/ServerSort/res/default/images/down_red.png b/comps/ServerSort/res/default/images/down_red.png new file mode 100755 index 000000000..dad42397e Binary files /dev/null and b/comps/ServerSort/res/default/images/down_red.png differ diff --git a/comps/ServerSort/res/default/images/up.png b/comps/ServerSort/res/default/images/up.png new file mode 100755 index 000000000..8c18ac3b1 Binary files /dev/null and b/comps/ServerSort/res/default/images/up.png differ diff --git a/comps/ServerSort/res/default/images/up_red.png b/comps/ServerSort/res/default/images/up_red.png new file mode 100755 index 000000000..d1ceea727 Binary files /dev/null and b/comps/ServerSort/res/default/images/up_red.png differ diff --git a/comps/ServerSort/res/default/style.css b/comps/ServerSort/res/default/style.css new file mode 100755 index 000000000..11739b1de --- /dev/null +++ b/comps/ServerSort/res/default/style.css @@ -0,0 +1,28 @@ + +.js_compServerSort .js_cssDesc +, .js_compServerSort .js_cssAsc +, .js_compServerSort .js_cssDesc_cur +, .js_compServerSort .js_cssAsc_cur +{ + font: 12px/1.5 Tahoma,Helvetica,Arial,'宋体',sans-serif; + outline: none; + color: green; + vertical-align: middle; + padding-right: 10px!important; +} + +.js_compServerSort .js_cssDesc{ + background: transparent url( ./images/down.png ) no-repeat right 4px; +} + +.js_compServerSort .js_cssAsc { + background: transparent url( ./images/up.png ) no-repeat right 4px; +} + +.js_compServerSort .js_cssDesc_cur{ + background: transparent url( ./images/down_red.png ) no-repeat right 4px; +} + +.js_compServerSort .js_cssAsc_cur{ + background: transparent url( ./images/up_red.png ) no-repeat right 4px; +} diff --git a/comps/ServerSort/res/index.php b/comps/ServerSort/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/ServerSort/res/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/Slider/Slider.js b/comps/Slider/Slider.js old mode 100644 new mode 100755 index 368b69d04..9405fc7f8 --- a/comps/Slider/Slider.js +++ b/comps/Slider/Slider.js @@ -1,9 +1,12 @@ -;(function($){ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ window.Slider = JC.Slider = Slider; /** * Slider 划动菜单类 *
        页面加载完毕后, Slider 会查找那些有 class = js_autoSlider 的标签进行自动初始化 - *

        requires: jQuery

        + *

        require: + * jQuery + * , JC.common + *

        *

        JC Project Site * | API docs * | demo link

        @@ -74,9 +77,10 @@ + + +
        +
        TableFreeze example
        +
        +
        +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col01 + + 我的我的我的我的我的我的我的我的我的 + + col02 + + col04 +
        + col11 + + col14 +
        + col21 + + col22 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col42 + + col43 +
        +
        +
        +
        +
        +
        +
        +
        + */ + JC.TableFreeze = TableFreeze; + JC.f.addAutoInit && JC.f.addAutoInit( TableFreeze ); + + function TableFreeze( _selector ){ + _selector && ( _selector = $( _selector ) ); + + if( TableFreeze.getInstance( _selector ) ) return TableFreeze.getInstance( _selector ); + TableFreeze.getInstance( _selector, this ); + //JC.log( TableFreeze.Model._instanceName ); + + this._model = new TableFreeze.Model( _selector ); + this._view = new TableFreeze.View( this._model ); + + this._init(); + + //JC.log( 'TableFreeze:', new Date().getTime() ); + } + /** + * 获取或设置 TableFreeze 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {TableFreezeInstance} + */ + TableFreeze.getInstance = function ( _selector, _setter ) { + if( typeof _selector == 'string' && !/table'); + /** + *为了解决ie6下表格的宽度超出父容器的宽度,父容器的宽度会跟随表格的宽度 + */ + _p._model.alternateClass() && (_table.find('>tbody>tr:odd').addClass(_p._model.alternateClass())); + _p._model.sourceTable = _table.clone(); + _p._model.initcolnumWidth = _p._model.colnumWidth(_table); + _p._model.needProcess() && _table.detach(); + _p._model.initWidth = _p._model.selector().width(); + _p._model.tempWidth = _p._model.initWidth; + }, + + _initHanlderEvent: function () { + var _p = this, + _hoverClass; + + _p._model.beforeCreateTableCallback() + && _p._model.beforeCreateTableCallback().call( _p, _p.selector() ); + + _p._view.update(); + + _p._model.afterCreateTableCallback() + && _p._model.afterCreateTableCallback().call( _p, _p.selector() ); + + if ( _p._model.needHoverClass() ) { + _p._model.selector().addClass('needHoverClass'); + + if ( _p._model.needProcess() ) { + //_hoverClass = _p._model.hoverClass(); + _hoverClass = "compTFHover"; + //.js-fixed-table>table>tbody>tr,.js-roll-table>table>tbody>tr + $(document) + .delegate('tbody .CTF', 'mouseenter', function () { + var _sp = $(this), + _item = 'tbody .' + _sp.attr('data-ctf'), + _trs = _sp.parents('.js_compTableFreeze').find(_item); + + _trs.addClass(_hoverClass).attr('status', '1'); + + } ) + .delegate('tbody .CTF', 'mouseleave', function () { + var _sp = $(this), + _item = 'tbody .' + _sp.attr('data-ctf'), + _trs = _sp.parents('.js_compTableFreeze').find(_item); + + _trs.removeClass(_hoverClass); + + }); + + } + + } + }, + + _inited: function () { + JC.log('TableFreeze inited', new Date().getTime()); + }, + + update: function () { + var _p = this, + _selector = _p._model.selector(), + _currentWidth = _selector.width(), + _trs = _selector.find('.js-fixed-table>table>thead>tr,.js-fixed-table>table>tbody>tr,.js-roll-table>table>thead>tr,.js-roll-table>table>tbody>tr'); + + ( _currentWidth > _p._model.tempWidth ) && _trs.height('auto'); + _p._view.fixHeight(); + } + + }); + + TableFreeze.Model._instanceName = "TableFreeze"; + + JC.f.extendObject( TableFreeze.Model.prototype, { + init: function () { + }, + + sourceTable: '', + + initcolnumWidth: [], + + initWidth: 0, + + tempWidth: 0, + + /** + * 冻结类型:prev, both, last; 默认为prev + */ + freezeType: function () { + var _r = this.stringProp('freezeType') || 'prev' + + !( _r === 'prev' || _r === 'both' || _r === 'last' ) && ( _r = 'prev' ); + + return _r; + }, + + /** + * 冻结列数:num,num 默认为1 + */ + freezeCols: function () { + var _p = this, + _r = _p.attrProp('freezeCols'), + _type = _p.freezeType(), + _t = []; + + if ( !_r ) { + ( _type !== 'both' ) && ( _r = 1 ); + ( _type === 'both' ) && ( _r = [1, 1] ); + return _r; + } + + _t = _r.split(','); + _t[0] = + _t[0]; + _t[1] = + _t[1]; + + if ( _type === 'both' ) { + if ( _t[0] === 0 && _t[1] === 0 ) { + _r = 0; + } else { + _r = _t.slice(); + } + } else { + _r = _t[0]; + } + + return _r + }, + + /** + * 滚动区域的宽度默认120% + */ + scrollWidth: function () { + var _r = this.attrProp('scrollWidth'); + + !_r && ( _r = '120%' ); + + return _r; + }, + + /** + * tr 是否需要hover效果,默认为true + */ + needHoverClass: function () { + var _r = this.boolProp('needHoverClass'); + + ( typeof _r === 'undefined' ) && ( _r = true ); + + return _r; + }, + + // hoverClass: function () { + // var _r = this.attrProp('hoverClass'); + + // ( !_r ) && ( _r = 'compTFHover'); + + // return _r; + // }, + + /** + * tr的隔行换色 + */ + alternateClass: function () { + var _r = this.attrProp('alternateClass'); + + return _r; + }, + + colnum: function () { + var _table = this.sourceTable, + _tr = _table.find('tr:eq(0)'), + _col = _tr.find('>th, >td'), + _r = _col.length; + + _col.each( function () { + var _sp = $(this), + _colspan = _sp.prop('colspan'); + + ( _sp.prop('colspan') ) && ( _r += ( _colspan - 1 ) ); + + } ); + + return _r; + }, + + colnumWidth: function ( _table ) { + var _tr = _table.find('tr:eq(0)'), + _col = _tr.find('>th, >td'), + _r = []; + + _col.each( function () { + _r.push( $(this).prop('offsetWidth') ); + } ); + + return _r; + }, + + trElement: function ( _table ) { + var _thead = _table.find('>thead'), + _tbody = _table.find('>tbody'), + _theadTr, + _tbodyTr; + + if ( _thead.length ) { + _theadTr = _thead.find('>tr'); + } else { + _theadTr = _table.find('>tr:eq(0)'); + } + + if ( _tbody.length ) { + _tbodyTr = _tbody.find('>tr'); + } else { + _tbodyTr = _table.find('>tr:gt(0)'); + } + + return { + theadTr: _theadTr, + tbodyTr: _tbodyTr + } + + }, + + needProcess: function () { + + //Todo: 正则判断freezeCols的值是否合法 + + var _p = this, + _freezeCols = _p.freezeCols(), + _freezeType = _p.freezeType(), + _selector = _p.selector(), + //_table = _p.selector().find('>table'), + _table = _p.sourceTable, + _r = true; + + if ( _table.find('tr').length === 0 ) { + return false; + } + + //全部滚动,在这里处理滚动有耦合 + if ( _freezeCols === 0 ) { + _selector.css('overflow-x', 'auto') + .find('>table').css('width', _p.scrollWidth()); + return false; + } + + //全部冻结 + if ( _freezeType === 'both' && ( _freezeCols[0] + _freezeCols[1] >= _p.colnum() ) ) { + return false; + } + + return _r; + }, + + layout: function ( _freezeType ) { + var _sourceTable = this.sourceTable, + _tableObj = $(_sourceTable[0].cloneNode(false)), + _theadObj = $(_sourceTable.find('thead')[0].cloneNode(false)), + _tbodyObj = $(_sourceTable.find('tbody')[0].cloneNode(false)), + _leftClass = '', + _rightClass = '', + _midClass = '', + _secondTempTpl, + _thirdTempTpl, + _tpl; + + switch ( _freezeType ) { + case 'last': + _leftClass = "js-roll-table compTFLastRoll"; + _rightClass = "js-fixed-table compTFLastFixed"; + break; + + case 'both': + _leftClass = "js-fixed-table compTFBothFixed"; + _rightClass = "js-fixed-table compTFBothFixed"; + _midClass = "js-roll-table compTFBothRoll"; + break; + + case 'prev': + default: + _leftClass = "js-fixed-table compTFPrevFixed"; + _rightClass = "js-roll-table compTFPrevRoll"; + } + + _theadObj.html('{0}').appendTo(_tableObj); + _tbodyObj.html('{1}').appendTo(_tableObj); + _secondTempTpl = _tableObj.clone().find('thead').html("{2}").end().find('tbody').html("{3}").end(); + if ( !_midClass ) { + _tpl = '
        ' + _tableObj[0].outerHTML +'
        ' + + '
        ' + _secondTempTpl[0].outerHTML + '
        '; + } else { + _thirdTempTpl = _tableObj.clone().find('thead').html("{4}").end().find('tbody').html("{5}").end(); + _tpl = '
        ' + _tableObj[0].outerHTML + '
        ' + + '
        ' + _secondTempTpl[0].outerHTML + '
        ' + + '
        ' + _thirdTempTpl[0].outerHTML + '
        '; + } + + return _tpl; + }, + + creatTpl: function () { + var _p = this, + _table = _p.sourceTable, + _freezeType = _p.freezeType(), + _freezeCols = _p.freezeCols(), + _colNum = _p.colnum(), + _trElement = _p.trElement(_table), + _theadTr = _trElement.theadTr, + _tbodyTr = _trElement.tbodyTr, + _headerTr = _p.getTpl(_freezeType, _freezeCols, _theadTr, _colNum), + _bodyTr = _p.getTpl(_freezeType, _freezeCols, _tbodyTr, _colNum), + _layout = _p.layout(_freezeType), + _tpl; + + switch ( _freezeType ) { + case 'both': + { + _tpl = JC.f.printf(_layout, _headerTr.leftTr, _bodyTr.leftTr, _headerTr.midTr, + _bodyTr.midTr, _headerTr.rightTr, _bodyTr.rightTr); + break; + } + case 'last': + case 'prev': + { + _tpl = JC.f.printf(_layout, _headerTr.leftTr, _bodyTr.leftTr, + _headerTr.rightTr, _bodyTr.rightTr); + break; + } + } + + _p.selector().append(_tpl); + + }, + + getTpl: function ( _freezeType, _freezeCols, _trs, _colNum ) { + + var _tpl, + _sLeftTpl = [], + _sMidTpl = [], + _sRightTpl = [], + _col = _freezeCols, + _rcol = 0, + _mcol = 0, + _p = this; + + switch (_freezeType) { + case 'prev': + _sLeftTpl = _p.getTr( _trs, _col ); + _sRightTpl = _p.getTr( _trs, _colNum - _col ); + break; + case 'last': + _sLeftTpl = _p.getTr( _trs, _colNum - _col ); + _sRightTpl = _p.getTr( _trs, _col ); + break; + case 'both': + _col = _freezeCols[0]; + _rcol = _freezeCols[1]; + _mcol = _colNum - _col - _rcol; + _sLeftTpl = _p.getTr( _trs, _col ); + _sMidTpl = _p.getTr( _trs, _mcol ); + _sRightTpl = _p.getTr( _trs, _rcol ); + break; + } + + _tpl = { + leftTr: _sLeftTpl.join(''), + midTr: _sMidTpl.join(''), + rightTr: _sRightTpl.join('') + }; + + return _tpl; + }, + + getTr: function ( _trs, _col ) { + + var _row = {}, + _temp = [], + _p = this; + _trs.each( function (_ix) { + var _sp = $(this), + _clasname = 'CTF CTF' + _ix, + _leftTr = _sp[0].cloneNode(false), + _rightTr = _sp[0].cloneNode(false), + _midTr = _sp[0].cloneNode(false), + _tds = _sp.find('>th,>td'), + _leftTd = [], + _rightTd = [], + _midTd = [], + _cix = 0, + _mcix = 0, + _tr = _sp[0].cloneNode(false); + + _tds.each( function ( _six, _sitem ) { + + var _sp = $(this), + _colspan = _sp.attr('colspan'), + _rowspan = _sp.attr('rowspan'), + _obj = {}, + _key; + + if ( _cix >= _col ) { + return false; + } + + if ( typeof _rowspan != 'undefined' ) { + _rowspan = parseInt(_rowspan, 10); + + _obj = { + six: _six, + rowspan: _rowspan, + colspan: _colspan + }; + + for ( var i = 1; i < _rowspan; i++ ) { + + if (_colspan) { + _colspan = parseInt(_colspan, 10); + for (var j = 0; j < _colspan; j++) { + _six === 0 ? _row[(_ix + i) + ( _six + 1 + j ).toString()] = _obj: _row[(_ix + i) + ( _six + j ).toString()] = _obj; + } + } else { + _six === 0 ? _row[(_ix + i) + ( _six + 1 ).toString()] = _obj: _row[(_ix + i) + ( _six ).toString()] = _obj; + } + } + + } + + if ( typeof _colspan === 'undefined' ) { + _cix = _cix + 1; + } else { + _cix += parseInt(_colspan, 10); + } + + _key = _ix + (_six + 1).toString(); + + if ( _key in _row ) { + _cix = _cix + 1; + if (_row[_key].colspan) { + return; + } + } + + _sp.appendTo( _tr ); + + }); + + $(_tr).attr('data-ctf', 'CTF' + _ix).addClass(_clasname); + _temp.push($(_tr)[0].outerHTML); + } ); + + return _temp; + }, + + getSum: function ( _array ) { + var _sum = 1, + _len = _array.length; + + while ( _len-- ) { + _sum += _array.pop(); + } + + return _sum; + }, + + /** + * TableFreeze调用前的回调 + */ + beforeCreateTableCallback: function () { + var _p = this, + _selector = _p.selector(), + _key = 'beforeCreateTableCallback'; + + return _p.callbackProp(_selector, _key); + }, + + /** + * TableFreeze调用后的回调 + */ + afterCreateTableCallback: function () { + var _p = this, + _selector = _p.selector(), + _key = 'afterCreateTableCallback'; + + return _p.callbackProp(_selector, _key); + } + + }); + + JC.f.extendObject( TableFreeze.View.prototype, { + init: function () { + + }, + + update: function () { + var _p = this, + _selector = _p._model.selector(), + _needProcess = _p._model.needProcess(); + + if ( _needProcess ) { + _p._model.creatTpl(); + _p.fixWidth(); + //fix empty cell + _p.selector().find('td:empty').html(' '); + _p.fixHeight(); + } + + }, + + fixWidth: function () { + var _p = this, + _selector = _p.selector(), + _freezeType = _p._model.freezeType(), + _freezeCols = _p._model.freezeCols(), + _totalWidth = _p._model.initWidth, + _scrollWidth = _p._model.scrollWidth(), + _colWidth = _p._model.initcolnumWidth, + _colNum = _colWidth.length, + _leftWidth, + _rightWidth, + _midWidth; + + switch ( _freezeType ) { + case 'prev' : + { + _leftWidth = _p._model.getSum(_colWidth.slice(0, _freezeCols)); + _rightWidth = _totalWidth - _leftWidth; + + _selector.find('>.js-fixed-table').width(_leftWidth / _totalWidth * 100 + '%') + .end() + .find('>.js-roll-table').width(_rightWidth / _totalWidth * 100 + '%') + .find('>table').width(_scrollWidth); + + break; + } + + case 'last': + { + _rightWidth = _p._model.getSum(_colWidth.slice(_colNum - _freezeCols, _colNum)); + _leftWidth = _totalWidth - _rightWidth - 1; + + _selector.find('>.js-fixed-table').width(_rightWidth / _totalWidth * 100 + '%') + .end() + .find('>.js-roll-table').width(_leftWidth / _totalWidth * 100 + '%') + .find('>table').width(_scrollWidth); + + break; + } + + case 'both': + { + _leftWidth = _p._model.getSum(_colWidth.slice(0, _freezeCols[0])); + _rightWidth = _p._model.getSum(_colWidth.slice(_colNum - _freezeCols[1], _colNum)); + _midWidth = _totalWidth - _leftWidth - _rightWidth; + //_midWidth = 1 - _leftWidth - _rightWidth; + + _selector.find('>.js-fixed-table:eq(0)').width(_leftWidth / _totalWidth * 100 + '%') + .end() + .find('>.js-roll-table').width(_midWidth / _totalWidth * 100 + '%') + .find('>table').width(_scrollWidth) + .end() + .end() + .find('>.js-fixed-table:eq(1)').width(_rightWidth / _totalWidth * 100 + '%'); + + break; + } + } + + }, + + fixHeight: function () { + var _p = this, + _selector = _p._model.selector(), + _leftTrs = _selector.find('>.js-fixed-table:eq(0)>table>thead>tr, >.js-fixed-table:eq(0)>table>tbody>tr'), + _rightTrs = _selector.find('>.js-roll-table>table>thead>tr,>.js-roll-table>table>tbody>tr'), + _midTrs = _selector.find('>.js-fixed-table:eq(1)>table>thead>tr, >.js-fixed-table:eq(1)>table>tbody>tr'), + _freezeType = _p._model.freezeType(); + + _leftTrs.each( function ( _ix, _item ) { + var _sp = $(this), + _rightTr = _rightTrs.eq(_ix), + _midTr = _midTrs.eq(_ix), + _height = Math.max(_sp.prop('offsetHeight'), _rightTr.prop('offsetHeight')); + + if ( _freezeType === 'both' ) { + _height = Math.max(_height, _midTr.prop('offsetHeight')); + _midTr.height(_height); + } + + _sp.height(_height); + _rightTr.height(_height); + + } ); + + return; + }, + + highlight: function () { + console.log("highlight"); + } + + }); + + $(document).ready( function () { + var _insAr = 0, + _win= $( window ); + + TableFreeze.autoInit && ( _insAr = TableFreeze.init() ); + _win.on( 'resize', CTFResize ); + + function CTFResize() { + _win.off( 'resize', CTFResize ); + + $( 'div.js_compTableFreeze' ).each( function () { + var _ins = TableFreeze.getInstance( $( this ) ); + _ins && _ins.update() ; + _ins._model.tempWidth = _ins._model.selector().prop('offsetWidth'); + }); + + _win.data('CTFResizeTimeout') && clearTimeout(_win.data('CTFResizeTimeout')); + _win.data('CTFResizeTimeout', setTimeout(function () { + _win.off( 'resize', CTFResize ); + _win.on( 'resize', CTFResize ); + }, 80 )); + + } + + }); + + return JC.TableFreeze; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/TableFreeze/_demo/demo.html b/comps/TableFreeze/_demo/demo.html new file mode 100755 index 000000000..dae564749 --- /dev/null +++ b/comps/TableFreeze/_demo/demo.html @@ -0,0 +1,712 @@ + + + + + 表格列冻结demo + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + item5 +
        + 我的我的我的我的我的我的我的我的我的 + + col01 + + col02 + + col03 + + col04 + + col05 +
        + col10 + + col11 + + col12 + + col13 + + col14 + + col15 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 +
        + col30 + + col31 + + col32 + + col33 + + col34 + + col35 +
        + col40 + + col41 + + col42 + + col43 + + col44 + + col45 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + +
        + 我的我的我的我的我的我的我的我的我的 + + col01 + + 我的我的我的我的我的我的我的我的我的 + + col03 + + col04 + + 我的我的我的我的我的我的我的我的我的 +
        + col10 + + col11 + + col12 + + col13 + + col14 + + col15 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 +
        + col30 + + col31 + + col33 + + col34 + + col35 +
        + col40 + + col41 + + col43 + + col44 + + col45 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + col02 + + col03 + + col04 +
        + col10 + + col11 + + col12 + + col13 + + col14 +
        + col20 + + col21 + + col22 + + col23 + + col24 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col41 + + col42 + + col43 + + col44 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + col02 + + col03 + + col04 + + col00 + + col01 + + col02 + + col03 + + col04 +
        + col00 + + col01 + + col02 + + col03 + + col04 + + col10 + + col11 + + col12 + + col13 + + col14 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col00 + + col01 + + col02 + + col03 + + col04 +
        + col30 + + col31 + + col32 + + col33 + + col34 + + col00 + + col01 + + col02 + + col03 + + col04 +
        + col40 + + col41 + + col42 + + col43 + + col44 + + col00 + + col01 + + col02 + + col03 + + col04 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col01 + + 我的我的我的我的我的我的我的我的我的 + + col02 + + col04 +
        + col11 + + col14 +
        + col21 + + col22 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col42 + + col43 +
        +
        + +
        + + + + \ No newline at end of file diff --git a/comps/TableFreeze/_demo/demo.normal.html b/comps/TableFreeze/_demo/demo.normal.html new file mode 100755 index 000000000..24dedb5c4 --- /dev/null +++ b/comps/TableFreeze/_demo/demo.normal.html @@ -0,0 +1,1313 @@ + + + + + 表格列冻结demo + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + item5 +
        + 我的我的我的我的我的我的我的我的我的 + + col01 + + col02 + + col03 + + col04 + + col05 +
        + col10 + + col11 + + col12 + + col13 + + col14 + + col15 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 +
        + col30 + + col31 + + col32 + + col33 + + col34 + + col35 +
        + col40 + + col41 + + col42 + + col43 + + col44 + + col45 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + +
        + 我的我的我的我的我的我的我的我的我的 + + col01 + + 我的我的我的我的我的我的我的我的我的 + + col03 + + col04 + + 我的我的我的我的我的我的我的我的我的 +
        + col10 + + col11 + + col12 + + col13 + + col14 + + col15 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 +
        + col30 + + col31 + + col33 + + col34 + + col35 +
        + col40 + + col41 + + col43 + + col44 + + col45 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + +
        + 我的我的我的我的我的我的我的我的我的 + + col01 + + 我的我的我的我的我的我的我的我的我的 + + col03 + + col04 + + 我的我的我的我的我的我的我的我的我的 +
        + col10 + + col11 + + col12 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 +
        + col30 + + col31 + + col33 + + col34 + + col35 +
        + col40 + + col41 + + col43 + + col44 + + col45 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + +
        + 我的我的我的我的我的我的我的我的我的 + + col01 + + 我的我的我的我的我的我的我的我的我的 + + col03 + + col04 + + 我的我的我的我的我的我的我的我的我的 +
        + col10 + + col11 + + col12 + + col13 + + col14 + + col15 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 +
        + col30 + + col31 + + col33 + + col34 + + col35 +
        + col40 + + col41 + + col43 + + col44 + + col45 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + col02 + + col03 + + col04 +
        + col10 + + col11 + + col12 + + col13 + + col14 +
        + col20 + + col21 + + col22 + + col23 + + col24 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col41 + + col42 + + col43 + + col44 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + col02 + + col03 + + col04 +
        + col10 + + col11 + + col12 + + col13 + + col14 +
        + col20 + + col21 + + col22 + + col23 + + col24 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col41 + + col42 + + col43 + + col44 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + col02 + + col03 + + col04 +
        + col10 + + col11 + + col12 + + col13 + + col14 +
        + col20 + + col21 + + col22 + + col23 + + col24 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col41 + + col42 + + col43 + + col44 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + col02 + + col03 + + col04 +
        + col10 + + col11 + + col12 + + col13 + + col14 +
        + col20 + + col21 + + col22 + + col23 + + col24 +
        + col30 + + col31 + + col32 + + col33 + + col34 +
        + col40 + + col41 + + col42 + + col43 + + col44 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 + + item5 + + item6 + + item7 + + item8 + + item9 +
        + col00 + + col01 + + col02 + + col03 + + col04 + + col05 + + col06 + + col07 + + col08 + + col09 +
        + col10 + + col11 + + col12 + + col13 + + col14 + + col15 + + col16 + + col17 + + col18 + + col19 +
        + col20 + + col21 + + col22 + + col23 + + col24 + + col25 + + col26 + + col27 + + col28 + + col29 +
        + col30 + + col31 + + col32 + + col33 + + col34 + + col35 + + col36 + + col37 + + col38 + + col39 +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + item0 + + item1 + + item2 + + item3 + + item4 +
        + col00 + + col01 + + 我的我的我的我的我的我的我的我的我的 + + col02 + + col04 +
        + col00 + + col11 + + col12 + + col13 + + col14 +
        + col00 + + col11 + + col12 + + col13 + + col14 +
        + col00 + + col11 + + col12 + + col13 + + col14 +
        + col00 + + col11 + + col12 + + col13 + + col14 +
        +
        + +
        + + + + + + + diff --git a/comps/TableFreeze/_demo/index.php b/comps/TableFreeze/_demo/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/comps/TableFreeze/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/TableFreeze/index.php b/comps/TableFreeze/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/comps/TableFreeze/index.php @@ -0,0 +1,4 @@ + diff --git a/comps/TableFreeze/res/default/style.css b/comps/TableFreeze/res/default/style.css new file mode 100755 index 000000000..262eedb02 --- /dev/null +++ b/comps/TableFreeze/res/default/style.css @@ -0,0 +1,81 @@ +body{ + min-width: 1000px; + /*_width: 1000px;*/ +} +/*.js_compTableFreeze{ + overflow: hidden; +}*/ +.js_compTableFreeze table{ + width: 100%; +} +.js_compTableFreeze .js-roll-table, +.js_compTableFreeze .js-fixed-table{ + display: inline-block; + *display: inline; + *zoom:1; + vertical-align: top; +} +.js_compTableFreeze .js-roll-table{ + overflow-x:auto ; + overflow-y: hidden; + *padding-bottom: 15px; +} +.js_compTableFreeze .js-roll-table table{ + width: 120%; +} +.compTFEextraTd{ + padding: 0 !important; + border: 0 none !important; + vertical-align: top !important; + background:#fff !important; +} +.compTFPrevRoll{ + border-right: 1px solid #ddd !important; + margin-left: -1px; +} +.compTFPrevRoll table{ + /*margin-left: -1px;*/ +} +.compTFPrevRoll th, +.compTFPrevRoll td{ + border-right: 0 none !important; +} +.compTFLastRoll{ + border-left: 1px solid #ddd !important; +} + +.compTFLastRoll table{ + margin-left: -1px; +} +.compTFLastRoll th, +.compTFLastRoll td{ + border-right: 0 none !important; +} + +.compTFBothRoll table{ + margin-left: -1px; +} +.compTFBothRoll th, +.compTFBothRoll td{ + border-right: 0 none !important; +} +.compTFAllRoll{ + border-left: 1px solid #ddd !important; + border-right: 1px solid #ddd !important; +} +.compTFAllRoll table{ + margin-left: -1px; +} +.compTFAllRoll th, +.compTFAllRoll td{ + border-right: 0 none !important; +} +tr.compTFHover td, +tr.compTFHover th{ + background: #fffbdd!important; +} + +.needHoverClass tbody tr:hover td, +.needHoverClass tbody tr:hover th{ + background: #fffbdd!important; +}; \ No newline at end of file diff --git a/comps/Tips/Tips.js b/comps/Tips/Tips.js old mode 100644 new mode 100755 index 31a0a6c6c..609a0d316 --- a/comps/Tips/Tips.js +++ b/comps/Tips/Tips.js @@ -1,4 +1,4 @@ -;(function($){ +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ window.Tips = JC.Tips = Tips; /** * Tips 提示信息类 @@ -7,7 +7,10 @@ *
        如果要禁用自动初始化, 请把静态属性 Tips.autoInit 置为 false

        *

        注意: Tips 默认构造函数只处理单一标签 *
        , 如果需要处理多个标签, 请使用静态方法 Tips.init( _selector )

        - *

        requires: jQuery

        + *

        require: + * jQuery + * , JC.common + *

        *

        JC Project Site * | API docs * | demo link

        @@ -38,9 +41,9 @@ * @date 2013-06-23 * @example + + +
        @@ -45,7 +47,7 @@ if( _container && $(_container).length ){ _container = $(_container); if( Tree.getInstance( _container ) ) return Tree.getInstance( _container ); - _container.data( 'TreeIns', this ); + _container.data( Tree.Model._instanceName , this ); } /** * 树的数据模型引用 @@ -72,7 +74,7 @@ Tree.getInstance = function( _selector ){ _selector = $(_selector); - return _selector.data('TreeIns'); + return _selector.data( Tree.Model._instanceName ); }; /** * 树的数据过滤函数 @@ -118,7 +120,7 @@ init: function(){ this._view.init(); - this._view.treeRoot().data( 'TreeIns', this ); + this._view.treeRoot().data( Tree.Model._instanceName, this ); return this; } /** @@ -191,16 +193,24 @@ , event: function( _evtName ){ if( !_evtName ) return; return this._model.event( _evtName ); } /** * 获取或设置树的高亮节点 - *
        注意: 这个只是数据层面的设置, 不会影响视觉效果 - * @method highlight - * @param {selector} _item + * @method selectedItem + * @param {selector} _selector * @return selector */ + , selectedItem: + function( _selector ){ + return this._view.selectedItem( _selector ); + } , highlight: - function( _item ){ - return this._model.highlight( _item ); + function(){ + return this.selectedItem.apply( this, JC.f.sliceArgs( arguments ) ); } - } + }; + + Tree.Model = Model; + Tree.View = View; + + Tree.Model._instanceName = 'TreeIns'; /** * 树节点的点击事件 * @event click @@ -220,7 +230,7 @@ * @example _tree.on('RenderLabel', function( _data ){ var _node = $(this); - _node.html( printf( '{1}', _data[0], _data[1] ) ); + _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) ); }); */ @@ -262,7 +272,7 @@ * @type string * @private */ - this._id = 'tree_' + new Date().getTime() + '_'; + this._id = JC.f.printf( 'tree_{0}_{1}_', new Date().getTime(), Model._insCount++ ); /** * 树当前的高亮节点 * @property _highlight @@ -280,6 +290,8 @@ this._init(); } + + Model._insCount = 1; Model.prototype = { /** @@ -329,7 +341,11 @@ * @param {string} _id * @return selector */ - , child: function( _id ){ return this._data.data[ _id ]; } + , child: function( _id ){ + var _r = this._data.data[ _id ]; + !( _r && _r.length ) && ( _r = [] ); + return _r; + } /** * 判断原始数据的某个ID是否有子级节点 * @method hasChild @@ -369,7 +385,7 @@ */ , highlight: function( _highlight ){ - _highlight && ( this._highlight = _highlight ); + _highlight && ( this._highlight = $( _highlight ) ); return this._highlight; } }; @@ -401,6 +417,7 @@ init: function() { if( !( this._model.data() && this._model.root() ) ) return; + this._model.container().addClass( 'js_compTree' ); this._process( this._model.child( this._model.root()[0] ), this._initRoot() ); return this; } @@ -424,7 +441,6 @@ */ , _process: function( _data, _parentNode ){ - for( var i = 0, j = _data.length, _item, _isLast; i < j; i++ ){ _item = _data[i]; _isLast = i === j - 1; @@ -481,8 +497,8 @@ var _label = this._initLabel( _data ); - var _node = $( printf( '
      •  
      • ', _data[1], _last ) ); - _node.addClass( printf( 'folder_closed {0} folder', _last1 )); + var _node = $( JC.f.printf( '
      •  
      • ', _data[1], _last ) ); + _node.addClass( JC.f.printf( 'folder_closed {0} folder', _last1 )); _label.appendTo( _node ); var _r = $( '' ) @@ -506,7 +522,7 @@ var _label = this._initLabel( _data ); - var _node = $( printf( '
      •  
      • ', _data[1], _last ) ); + var _node = $( JC.f.printf( '
      •  
      • ', _data[1], _last ) ); _node.addClass( 'folder_closed file'); _label.appendTo( _node ); @@ -572,9 +588,7 @@ var lis = _tgr.parents('li'); - if( this._model.highlight() ) this._model.highlight().removeClass('highlight'); - _tgr.addClass( 'highlight' ); - this._model.highlight( _tgr ); + this.selectedItem( _tgr ); lis.each( function(){ var _sp = $(this), _child = _sp.find( '> span.folderRoot, > span.folder' ); @@ -584,6 +598,19 @@ } }); } + , selectedItem: + function( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return this._model.highlight(); + + if( this._model.highlight() ) { + this._model.highlight().removeClass('highlight').removeClass( 'selectedTreeNode' ); + } + _selector.addClass( 'highlight' ).addClass( 'selectedTreeNode' ); + + this._model.highlight( _selector ); + return _selector; + } /** * 关闭树的具体节点 * @method close @@ -611,21 +638,21 @@ * @default null */ Tree.lastHover = null; - $(document).delegate( 'ul.tree_wrap div.node_ctn', 'mouseenter', function(){ + $(document).delegate( '.js_compTree ul.tree_wrap div.node_ctn', 'mouseenter', function(){ if( Tree.lastHover ) Tree.lastHover.removeClass('ms_over'); $(this).addClass('ms_over'); Tree.lastHover = $(this); }); - $(document).delegate( 'ul.tree_wrap div.node_ctn', 'mouseleave', function(){ + $(document).delegate( '.js_compTree ul.tree_wrap div.node_ctn', 'mouseleave', function(){ if( Tree.lastHover ) Tree.lastHover.removeClass('ms_over'); }); /** * 捕获树文件标签的点击事件 */ - $(document).delegate( 'ul.tree_wrap div.node_ctn', 'click', function( _evt ){ + $(document).delegate( '.js_compTree ul.tree_wrap div.node_ctn', 'click', function( _evt ){ var _p = $(this) , _treeContainer = _p.parents( 'ul.tree_wrap' ) - , _treeIns = _treeContainer.data('TreeIns'); + , _treeIns = _treeContainer.data( Tree.Model._instanceName ); if( !_treeIns ) return; @@ -636,9 +663,7 @@ }); } - if( _treeIns.highlight() ) _treeIns.highlight().removeClass('highlight'); - _p.addClass('highlight'); - _treeIns.highlight( _p ); + _treeIns.selectedItem( _p ); var _events = _treeIns.event( 'change' ); if( _events && _events.length ){ @@ -650,15 +675,15 @@ /** * 捕获树文件夹图标的点击事件 */ - $(document).delegate( 'ul.tree_wrap span.folder, ul.tree_wrap span.folderRoot', 'click', function( _evt ){ + $(document).delegate( '.js_compTree ul.tree_wrap span.folder, ul.tree_wrap span.folderRoot', 'click', function( _evt ){ var _p = $(this), _pntLi = _p.parent('li'), _childUl = _pntLi.find( '> ul'); var _treeContainer = _p.parents( 'ul.tree_wrap' ) - , _treeIns = _treeContainer.data('TreeIns'); + , _treeIns = _treeContainer.data( Tree.Model._instanceName ); var _events = _treeIns.event( 'FolderClick' ); if( _events && _events.length ){ $.each( _events, function( _ix, _cb ){ - if( _cb.call( _p, _evt ) === false ) return false; + if( _cb.call( _p, _evt ) === false ) return false; }); } @@ -677,4 +702,13 @@ } }); -}(jQuery)); + return JC.Tree; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Tree/_demo/crm_select_tree.html b/comps/Tree/_demo/crm_select_tree.html old mode 100644 new mode 100755 diff --git a/comps/Tree/_demo/data/crm.css b/comps/Tree/_demo/data/crm.css old mode 100644 new mode 100755 diff --git a/comps/Tree/_demo/data/crm.js b/comps/Tree/_demo/data/crm.js old mode 100644 new mode 100755 index 0f9d509d9..70aa8edc0 --- a/comps/Tree/_demo/data/crm.js +++ b/comps/Tree/_demo/data/crm.js @@ -1,24 +1,28 @@ -$(document).ready( function(){ +;(function(define, _win) { 'use strict'; define( [ 'JC.Tree' ], function(){ +;( function( $ ){ window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001; - JC.Tree.dataFilter = + JC.Tree.dataFilter = JC.Tree.dataFilter || function( _data ){ var _r = {}; - if( _data ){ - if( _data.root.length > 2 ){ - _data.root.shift(); - _r.root = _data.root; - } + if( _data && _data.root && _data.root.length > 2 ){ + _data.root.shift(); + _r.root = _data.root; _r.data = {}; for( var k in _data.data ){ _r.data[ k ] = []; for( var i = 0, j = _data.data[k].length; i < j; i++ ){ - if( _data.data[k][i].length < 3 ) continue; + if( _data.data[k][i].length < 3 ) { + _r.data[k].push( _data.data[k][i] ); + continue; + } _data.data[k][i].shift(); _r.data[k].push( _data.data[k][i] ); } } + }else{ + _r = _data; } return _r; }; @@ -53,7 +57,7 @@ $(document).ready( function(){ }); _tree.on( 'RenderLabel', function( _data ){ var _node = $(this); - _node.html( printf( '{1}', _data[0], _data[1] ) ); + _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) ); }); _tree.init(); _tree.open(); @@ -71,5 +75,5 @@ $(document).ready( function(){ _treeNode.css( { 'top': _p.prop( 'offsetHeight' ) -2 + 'px', 'left': '-1px' } ); } }); - -}); +}(jQuery)); +});}(typeof define === 'function' && define.amd ? define : function (_require, _cb) { _cb && _cb(); }, this)); diff --git a/comps/Tree/_demo/data/data1.js b/comps/Tree/_demo/data/data1.js new file mode 100755 index 000000000..04c6fef3e --- /dev/null +++ b/comps/Tree/_demo/data/data1.js @@ -0,0 +1 @@ + {"data":{"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]},"root":["23","客户发展部"]} diff --git a/comps/Tree/_demo/index.php b/comps/Tree/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/Tree/_demo/simple_tree.html b/comps/Tree/_demo/simple_tree.html old mode 100644 new mode 100755 diff --git a/comps/Tree/index.php b/comps/Tree/index.php old mode 100644 new mode 100755 diff --git a/comps/Tree/res/blue/images/closed.gif b/comps/Tree/res/blue/images/closed.gif new file mode 100755 index 000000000..4641fa052 Binary files /dev/null and b/comps/Tree/res/blue/images/closed.gif differ diff --git a/comps/Tree/res/blue/images/closed_last.gif b/comps/Tree/res/blue/images/closed_last.gif new file mode 100755 index 000000000..963afb6f1 Binary files /dev/null and b/comps/Tree/res/blue/images/closed_last.gif differ diff --git a/comps/Tree/res/blue/images/open.gif b/comps/Tree/res/blue/images/open.gif new file mode 100755 index 000000000..77ce403b4 Binary files /dev/null and b/comps/Tree/res/blue/images/open.gif differ diff --git a/comps/Tree/res/blue/images/open_last.gif b/comps/Tree/res/blue/images/open_last.gif new file mode 100755 index 000000000..1c79f4a4b Binary files /dev/null and b/comps/Tree/res/blue/images/open_last.gif differ diff --git a/comps/Tree/res/blue/images/root.gif b/comps/Tree/res/blue/images/root.gif new file mode 100755 index 000000000..7393048b6 Binary files /dev/null and b/comps/Tree/res/blue/images/root.gif differ diff --git a/comps/Tree/res/blue/images/root_plus.gif b/comps/Tree/res/blue/images/root_plus.gif new file mode 100755 index 000000000..51e1330de Binary files /dev/null and b/comps/Tree/res/blue/images/root_plus.gif differ diff --git a/comps/Tree/res/blue/images/treeline.gif b/comps/Tree/res/blue/images/treeline.gif new file mode 100755 index 000000000..85b53954e Binary files /dev/null and b/comps/Tree/res/blue/images/treeline.gif differ diff --git a/comps/Tree/res/blue/images/treeline1.gif b/comps/Tree/res/blue/images/treeline1.gif new file mode 100755 index 000000000..1787b394d Binary files /dev/null and b/comps/Tree/res/blue/images/treeline1.gif differ diff --git a/comps/Tree/res/blue/images/treeline2.gif b/comps/Tree/res/blue/images/treeline2.gif new file mode 100755 index 000000000..72b3ae9c1 Binary files /dev/null and b/comps/Tree/res/blue/images/treeline2.gif differ diff --git a/comps/Tree/res/blue/style.css b/comps/Tree/res/blue/style.css new file mode 100755 index 000000000..910a2da6f --- /dev/null +++ b/comps/Tree/res/blue/style.css @@ -0,0 +1,28 @@ +.tree_wrap, .tree_wrap *{ + margin: 0; padding: 0; + } +.tree_wrap li{ list-style-type: none; } +.tree_wrap {text-align:left;line-height:24px; padding:8px 0; zoom:1;} + +.tree_wrap .highlight,.tree_wrap .ms_over a{background-color:#529dcb; color:#fff; line-height:18px; padding:0 4px 2px; border-radius:3px; display:inline-block;} +.tree_wrap .node_ctn a{ color:#999; } +.tree_wrap .highlight a{ color:#fff; } +.tree_wrap_inner ul { background:url(images/treeline.gif) repeat-y;} +.tree_wrap_inner li{ padding-left:24px; white-space:nowrap;} +.tree_wrap .node_ctn { display:inline;} +.tree_wrap .ms_over a,.tree_wrap .ms_over a:hover{ color:#fff;} + +.folder_open{} +.folder_img_open,.folder_img_root,.folder_img_root.folder_img_closed,.folder_img_loading,.folder_img_closed,.folder_img_bottom,.folder_img_last{ + width:24px; height:24px; display:-moz-inline-box;display:inline-block;cursor:pointer;} +.folder_img_open {background:url(images/open.gif) no-repeat center left;} +.folder_img_root {background:url(images/root.gif) no-repeat center left;} +.folder_img_root.folder_img_closed{ background:url(images/root_plus.gif) no-repeat;} +.folder_img_loading {background:url(images/loading.gif) no-repeat 3px 4px;} +.folder_img_closed {background:url(images/closed.gif) no-repeat center left;} +.folder_img_bottom{background:url(images/treeline1.gif) no-repeat center left;} +.folder_img_last{background:url(images/treeline2.gif) no-repeat center left;} +.folder_last .folder_img_open.folder_span_lst{background:url(images/open_last.gif) no-repeat center left;} +.folder_last .folder_img_closed.folder_span_lst{background:url(images/closed_last.gif) no-repeat center left;} +.tree_wrap_inner .folder_last .folder_ul_lst{ background:none;} +.tree_wrap span.file{ cursor: default; } diff --git a/comps/Tree/res/blue/style.html b/comps/Tree/res/blue/style.html new file mode 100755 index 000000000..2d8976761 --- /dev/null +++ b/comps/Tree/res/blue/style.html @@ -0,0 +1,67 @@ + + + + + 360 75 team + + + +
        + +
        + + + diff --git a/comps/Tree/res/default/images/closed.gif b/comps/Tree/res/default/images/closed.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/closed_last.gif b/comps/Tree/res/default/images/closed_last.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/open.gif b/comps/Tree/res/default/images/open.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/open_last.gif b/comps/Tree/res/default/images/open_last.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/root.gif b/comps/Tree/res/default/images/root.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/root_plus.gif b/comps/Tree/res/default/images/root_plus.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/treeline.gif b/comps/Tree/res/default/images/treeline.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/treeline1.gif b/comps/Tree/res/default/images/treeline1.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/images/treeline2.gif b/comps/Tree/res/default/images/treeline2.gif old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/style.css b/comps/Tree/res/default/style.css old mode 100644 new mode 100755 diff --git a/comps/Tree/res/default/style.html b/comps/Tree/res/default/style.html old mode 100644 new mode 100755 index 307694168..2d8976761 --- a/comps/Tree/res/default/style.html +++ b/comps/Tree/res/default/style.html @@ -4,14 +4,6 @@ 360 75 team - -
        diff --git a/comps/Valid/Valid.js b/comps/Valid/Valid.js old mode 100644 new mode 100755 index 1b07bdef3..c2c6b775f --- a/comps/Valid/Valid.js +++ b/comps/Valid/Valid.js @@ -1,10 +1,14 @@ //TODO: 错误提示 不占用页面宽高, 使用 position = absolute, date = 2013-08-03 //TODO: checkbox, radio 错误时, input 添加高亮显示 -;(function($){ +//TODO: daterange 支持一对多关系 +//TODO: datavalid 添加自定义 ajax 数据 和 方法 +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ /** * 表单验证 (单例模式) *
        全局访问请使用 JC.Valid 或 Valid - *

        requires: jQuery

        + *

        require: + * JC.common + *

        *

        JC Project Site * | API docs * | demo link

        @@ -27,6 +31,9 @@ *
        * 设置 表单所有控件的 em CSS display 显示类型 *
        + * + *
        ignoreAutoCheckEvent = bool, default = false
        + *
        是否禁用 自动 check 事件( focus, blur, change )
        *
        *

        Form Control的可用 html attribute

        *
        @@ -71,20 +78,25 @@ *
        maxlength = int(最大长度)
        *
        验证内容的最大长度, 但不验证为空的值
        * - *
        minvalue = [number|ISO date](最小值)
        + *
        minvalue = number|ISO date(最小值)
        *
        验证内容的最小值, 但不验证为空的值
        * - *
        maxvalue = [number|ISO date](最大值)
        + *
        maxvalue = number|ISO date(最大值)
        *
        验证内容的最大值, 但不验证为空的值
        * - *
        validitemcallback = function name
        + *
        validitemcallback = function
        *
        * 对一个 control 作检查后的回调, 无论正确与否都会触发, window 变量域 -function validItemCallback( _item, _isValid){ - JC.log( _item.attr('name'), _isValid ); -} +
        function validItemCallback( _selector, _isValid ){
        +}
        *
        * + *
        validHidden = bool, default = false
        + *
        是否验证隐藏的控件
        + * + *
        rangeCanEqual = bool, default = true
        + *
        nrange 和 daterange 的开始值和结束值是否可以相等
        + * *
        datatype: 常用数据类型
        *
        n: 检查是否为正确的数字
        *
        n-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], n-7.2 = 0.00 ~ 9999999.99
        @@ -96,6 +108,8 @@ *
        如果不指定 fromNEl, toNEl, 默认是从父节点下面找到 nrange, 按顺序定为 fromNEl, toNEl
        *
        *
        + *
        f: 检查是否为正确的数字, default: f-9.2
        + *
        f-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], f-7.2 = 0.00 ~ 9999999.99
        *
        d: 检查是否为正确的日期, YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD
        *
        * daterange: 检查两个control的日期范围 @@ -103,13 +117,14 @@ *
        html attr fromDateEl: 指定开始的 control
        *
        html attr toDateEl: 指定结束的 control
        *
        如果不指定 fromDateEl, toDateEl, 默认是从父节点下面找到 daterange, 按顺序定为 fromDateEl, toDateEl
        + *
        html attr datespan:, 指定开始与结束日期的时间跨度(JC.f.dateDetect)
        *
        * *
        time: 是否为正确的时间, hh:mm:ss
        *
        minute: 是否为正确的时间, hh:mm
        *
        * bankcard: 是否为正确的银行卡 - *
        格式为: d{15}, d{16}, d{17}, d{19} + *
        格式为: 9 ~ 25 位数字 *
        *
        * cnname: 中文姓名 @@ -117,12 +132,21 @@ *
        规则: 长度 2-32个字节, 非 ASCII 算2个字节 *
        *
        + * enname: 英文姓名 + *
        格式: 大小写字母 + 空格 + *
        规则: 长度 2-32个字节, 非 ASCII 算2个字节 + *
        + *
        + * allname: cnname | enname + *
        中文姓名和英文姓名的复合验证 + *
        + *
        * username: 注册用户名 *
        格式: a-zA-Z0-9_- *
        规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30 *
        *
        idnumber: 身份证号码, 15~18 位
        - *
        mobilecode: 手机号码, 11位, (13|14|15|16|18|19)[\d]{9}
        + *
        mobilecode: 手机号码, 11位, (13|14|15|16|17|18|19)[\d]{9}
        *
        mobile: mobilecode 的别名
        *
        mobilezonecode: 带 国家代码的手机号码, [+国家代码] [零]11位数字
        *
        phonecode: 电话号码, 7~8 位数字, [1-9][0-9]{6,7}
        @@ -184,6 +208,9 @@ * * * + *
        qq: 检查QQ号码, 5 ~ 11位数字
        + *
        qqall: 检查QQ号码, [ qq | email ]
        + * *
        subdatatype: 特殊数据类型, 以逗号分隔多个属性
        *
        *
        @@ -223,6 +250,7 @@ *
        uniquemsg: 值有重复的提示信息
        *
        uniqueIgnoreCase: 是否忽略大小写
        *
        uniqueIgnoreEmpty: 是否忽略空的值, 如果组中有空值也会被忽略
        + *
        processDisabled: 是否处理 disabled 但 visible 的node
        *
        unique-n 可以指定 N 个为一组的匹配, unique-2 = 2个一组, unique-3: 三个一组
        *
        *
        @@ -238,23 +266,40 @@ * {0} 代表 value * *
        + * datavalidCheckCallback: 验证内容正确与否的回调(优先级比 datavalidUrl 高) +
        window.datavalidCheckCallback =
        +function (){
        +    var _r = { 'errorno': 1, errmsg:'验证码错误' }, _sp = $( this ), _v = _sp.val().trim().toLowerCase();
        +
        +    if( _v && _v === window.CHECK_CODE ){
        +        _r.errorno = 0;
        +    }
        +
        +    return _r;
        +};
        +     *              
        + *
        datavalidNoCache: 是否禁止缓存, default = true
        + *
        datavalidAjaxType: ajax 请求类型, default = get
        + *
        datavalidRequestData: ajax 请求数据, json data
        + *
        * datavalidCallback: 请求 datavalidUrl 后调用的回调 -function datavalidCallback( _json ){ +<pre>function datavalidCallback( _json ){ var _selector = $(this); -}); +}); *
        + *
        * datavalidKeyupCallback: 每次 keyup 的回调 -function datavalidKeyupCallback( _evt ){ +<pre>function datavalidKeyupCallback( _evt ){ var _selector = $(this); -}); +}); *
        *
        * datavalidUrlFilter: 请求数据前对 url 进行操作的回调 -function datavalidUrlFilter( _url ){ +<pre>function datavalidUrlFilter( _url ){ var _selector = $(this); - _url = addUrlParams( _url, { 'xtest': 'customData' } ); + _url = JC.f.addUrlParams( _url, { 'xtest': 'customData' } ); return _url; -}); +}); *
        * * @@ -266,6 +311,41 @@ * * * + * + *
        + *
        + *
        ucheck: 用户自定义验证
        + *
        ucheckmsg: 验证出错的提示信息
        + *
        ucheckCallback: 用于验证的函数 window变量域 + * +
        function ucheck_n( _item ){
        +    var _r = false, _v = JC.f.parseFinance( _item.val() );
        +
        +    if( _v === 0 || ( _v >= 30 && _v >= 50 ) ){
        +        _r = true;
        +    }
        +    return _r;
        +}
        + *
        + *
        + *
        + *
        + *
        + *
        subdatatype = even: 数值必须为偶数
        + *
        + *
        + *
        + *
        + *
        subdatatype = odd: 数值必须为奇数
        + *
        + *
        + *
        exdatatype: 特殊数据类型, 以逗号分隔多个属性, 该类型只用于显示视觉效果, 不作为实际验证的判断
        + *
        + *
        + *
        datavalid: 判断 control 的值是否合法( 通过HTTP请求验证 )(只用于显示视觉效果, 不作为实际验证的判断)
        +
        其他参数与 subdatatype = datavalid 相同
        +
        +
        * * @namespace JC * @class Valid @@ -274,13 +354,14 @@ * @version 0.1, 2013-05-22 * @author qiushaowei | 75 team */ + window.JC = window.JC || {log:function(){}}; JC.Valid = window.Valid = Valid; function Valid(){ /** * 兼容函数式使用 */ - var _args = sliceArgs( arguments ); + var _args = JC.f.sliceArgs( arguments ); if( _args.length ){ return Valid.check.apply( null, _args ); } @@ -303,22 +384,22 @@ }); $([ this._view, this._model ] ).on(Model.TRIGGER, function( _evt, _evtName ){ - var _data = sliceArgs( arguments ).slice(2); + var _data = JC.f.sliceArgs( arguments ).slice(2); _p.trigger( _evtName, _data ); }); _p.on( Model.CORRECT, function( _evt ){ - var _data = sliceArgs( arguments ).slice(1); + var _data = JC.f.sliceArgs( arguments ).slice(1); _p._view.valid.apply( _p._view, _data ); }); _p.on( Model.ERROR, function( _evt ){ - var _data = sliceArgs( arguments ).slice(1); + var _data = JC.f.sliceArgs( arguments ).slice(1); _p._view.error.apply( _p._view, _data ); }); _p.on( Model.FOCUS_MSG, function( _evt ){ - var _data = sliceArgs( arguments ).slice(1); + var _data = JC.f.sliceArgs( arguments ).slice(1); _p._view.focusmsg.apply( _p._view, _data ); }); @@ -353,6 +434,8 @@ function( _item ){ var _p = this, _r = true, _item = $( _item ); + if( _item.prop( 'nodeName' ).toLowerCase() == 'object' ) return _r; + if( !_p._model.isAvalible( _item ) ) return _r; if( !_p._model.isValid( _item ) ) return _r; if( Valid.ignore( _item ) ) return _r; @@ -371,13 +454,26 @@ } } - if( !_p._model.reqmsg( _item ) ){ _r = false; return _r; } - if( !_p._model.lengthValid( _item ) ){ _r = false; return _r; } + if( !_p._model.reqmsg( _item ) ){ + _item.attr( 'datatypestatus', 'false' ); + return _r = false; + } + + if( !_p._model.lengthValid( _item ) ){ + _item.attr( 'datatypestatus', 'false' ); + return _r = false; + } //验证 datatype if( _dt && _p._model[ _dt ] && _item.val() ){ - if( !_p._model[ _dt ]( _item ) ){ _r = false; return _r; } + if( !_p._model[ _dt ]( _item ) ){ + _item.attr( 'datatypestatus', 'false' ); + return _r = false; + } } + + _item.attr( 'datatypestatus', 'true' ); + //验证子类型 var _subDtLs = _item.attr('subdatatype'); if( _subDtLs ){ @@ -400,22 +496,24 @@ , check: function(){ - var _p = this, _r = true, _items = sliceArgs( arguments ), i, j; + var _p = this, _r = true, _items = JC.f.sliceArgs( arguments ), i, j; $.each( _items, function( _ix, _item ){ _item = $(_item); Valid.isFormValid = false; if( _p._model.isForm( _item ) ){ Valid.isFormValid = true; - var _errorabort = _p._model.isErrorAbort( _item ), tmp; + var _errorabort = _p._model.isErrorAbort( _item ) + , _isIgnoreForm = Valid.ignore( _item ) + , tmp + ; for( i = 0, j = _item[0].length; i < j; i++ ){ - var _sitem = $( $(_item[0][i]) ); - if( !_p._model.isValid( _sitem ) ) continue; + var _sitem = $(_item[0][i]); + if( _isIgnoreForm && ! ( _sitem.val() || '' ).trim() ) continue; !_p.parse( _sitem ) && ( _r = false ); if( _errorabort && !_r ) break; } } else if( Valid.isFormControl( _item ) ) { - if( !_p._model.isValid( _item ) ) return; !_p.parse( _item ) && ( _r = false ); } else{ @@ -426,7 +524,7 @@ } , clearError: function(){ - var _items = sliceArgs( arguments ), _p = this; + var _items = JC.f.sliceArgs( arguments ), _p = this; $.each( _items, function( _ix, _item ){ $( _item ).each( function(){ var _item = $(this); @@ -465,7 +563,7 @@ * @return {boolean} */ Valid.checkAll = Valid.check = - function(){ return Valid.getInstance().check.apply( Valid.getInstance(), sliceArgs( arguments ) ); } + function(){ return Valid.getInstance().check.apply( Valid.getInstance(), JC.f.sliceArgs( arguments ) ); } /** * 这个方法是 Valid.check 的别名 * @method checkAll @@ -481,6 +579,30 @@ * @return {Valid instance} */ Valid.getInstance = function(){ !Valid._instance && new Valid(); return Valid._instance; }; + /** + * 检查是否需要延时 check + *
        以 html 属性 validCheckTimeout 定义, int 类型, type = ms + * @method checkTimeout + * @param {selector} _selector + * @param {int} _tm + * @static + * @return {Valid instance} + */ + Valid.checkTimeout = + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _tm = parseInt( _selector.attr( 'validCheckTimeout') ) || _tm; + var _dname = 'VALID_CHECK_TIMEOUT'; + if( _tm ){ + _selector.data( _dname ) && clearTimeout( _selector.data( _dname ) ); + _selector.data( _dname , setTimeout( function(){ + Valid.check( _selector ); + }, _tm )); + }else{ + Valid.check( _selector ); + } + }; /** * 判断/设置 selector 的数据是否合法 *
        通过 datavalid 属性判断 @@ -511,7 +633,7 @@ } }else{ if( _selector && _selector.length ){ - _r = parseBool( _selector.attr('datavalid') ); + _r = JC.f.parseBool( _selector.attr('datavalid') ); } } @@ -525,53 +647,122 @@ * @static */ Valid.isValid = function( _selector ){ return Valid.getInstance().isValid( _selector ); }; + /** + * 提供对各种显示状态 setTimeout 执行的正确性 控制逻辑 + */ + Valid.statusTimeout = { + valid: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_VALID ) && clearTimeout( _selector.data( Model.TIMEOUT_VALID ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_VALID, _tm ); + } + + , error: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_ERROR ) && clearTimeout( _selector.data( Model.TIMEOUT_ERROR ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_ERROR, _tm ); + } + + , focus: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_FOCUS ) && clearTimeout( _selector.data( Model.TIMEOUT_FOCUS ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_FOCUS, _tm ); + } + + , success: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_SUCCESS ) && clearTimeout( _selector.data( Model.TIMEOUT_SUCCESS ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_SUCCESS, _tm ); + } + , clear: + function( _selector ){ + for( var k in Valid.statusTimeout ){ + if( k == 'clear' ) continue; + Valid.statusTimeout[ k ]( _selector ); + } + } + }; /** * 把一个表单项的状态设为正确状态 * @method setValid - * @param {selector} _item + * @param {selector} _items * @param {int} _tm 延时 _tm 毫秒显示处理结果, 默认=150 * @static */ - Valid.setValid = function(_item, _tm){ return Valid.getInstance().trigger( Model.CORRECT, sliceArgs( arguments) ); }; + Valid.setValid = function(_items, _tm, _noStyle, _isUserSet){ + _items = $( _items ); + _items.each( function( _ix, _item ){ + _item = $(this); + Valid.statusTimeout.clear( _item ); + $( Valid.getInstance()._view ).trigger( 'setValid', [_item, _tm, _noStyle, _isUserSet] ); + }); + + return Valid.getInstance(); + }; /** * 把一个表单项的状态设为错误状态 * @method setError - * @param {selector} _item + * @param {selector} _items * @param {string} _msgAttr - 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 *
        如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateErrorMsg * @param {bool} _fullMsg - 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写 * @static */ Valid.setError = - function(_item, _msgAttr, _fullMsg){ - if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ - var _autoKey = 'autoGenerateErrorMsg'; - _item.attr( _autoKey, _msgAttr ); - _msgAttr = _autoKey; - } - return Valid.getInstance().trigger( Model.ERROR, sliceArgs( arguments) ); + function(_items, _msgAttr, _fullMsg){ + _items = $(_items); + + _items.each( function( _ix, _item ){ + _item = $(this); + Valid.statusTimeout.clear( _item ); + if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ + var _autoKey = 'autoGenerateErrorMsg'; + _item.attr( _autoKey, _msgAttr ); + _msgAttr = _autoKey; + } + $( Valid.getInstance()._view ).trigger( 'setError', [ _item, _msgAttr, _fullMsg ] ); + }); + return Valid.getInstance(); }; /** * 显示 focusmsg 属性的提示信息( 如果有的话 ) * @method setFocusMsg - * @param {selector} _item + * @param {selector} _items * @param {bool} _setHide * @param {string} _msgAttr - 显示指定需要读取的focusmsg信息属性名, 默认为 focusmsg, 通过该属性可以指定别的属性名 *
        如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateFocusMsg * @static */ Valid.focusmsg = Valid.setFocusMsg = - function( _item, _setHide, _msgAttr ){ - if( typeof _setHide == 'string' ){ - _msgAttr = _setHide; - _setHide = false; - } - if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ - var _autoKey = 'autoGenerateFocusMsg'; - _item.attr( _autoKey, _msgAttr ); - _msgAttr = _autoKey; - } - return Valid.getInstance().trigger( Model.FOCUS_MSG, [ _item, _setHide, _msgAttr ] ); + function( _items, _setHide, _msgAttr ){ + _items = $( _items ); + _items.each( function( _ix, _item ){ + _item = $( this ); + Valid.statusTimeout.clear( _item ); + if( typeof _setHide == 'string' ){ + _msgAttr = _setHide; + _setHide = false; + } + if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ + var _autoKey = 'autoGenerateFocusMsg'; + _item.attr( _autoKey, _msgAttr ); + _msgAttr = _autoKey; + } + Valid.getInstance().trigger( Model.FOCUS_MSG, [ _item, _setHide, _msgAttr ] ); + }); + return Valid.getInstance(); }; /** * focus 时,是否总是显示 focusmsg 提示信息 @@ -608,7 +799,7 @@ * JC.Valid.clearError( 'input.some' ); */ Valid.clearError = - function(){ return Valid.getInstance().clearError.apply( Valid.getInstance(), sliceArgs( arguments ) ); }; + function(){ return Valid.getInstance().clearError.apply( Valid.getInstance(), JC.f.sliceArgs( arguments ) ); }; /** * 验证发生错误时, 是否终止继续验证 *
        为真终止继续验证, 为假将验证表单的所有项, 默认为 false @@ -668,13 +859,13 @@ ? _item.removeAttr('ignoreprocess') : _item.attr('ignoreprocess', true) ; - _r = _delIgnore; + _r = !_delIgnore; }else{ _item.is( '[ignoreprocess]' ) && ( ( _item.attr('ignoreprocess') || '' ).trim() - ? ( _r = parseBool( _item.attr('ignoreprocess') ) ) + ? ( _r = JC.f.parseBool( _item.attr('ignoreprocess') ) ) : ( _r = true ) ) ; @@ -706,6 +897,14 @@ ; return _r; }; + /** + * 是否禁用 自动 check 事件( focus, blur, change ) + * @property ignoreAutoCheckEvent + * @type bool + * @default false + * @static + */ + Valid.ignoreAutoCheckEvent = false; function Model(){ this._init(); @@ -717,6 +916,11 @@ Model.CORRECT = 'ValidCorrect'; Model.FOCUS_MSG = 'ValidFocusMsg'; + Model.TIMEOUT_VALID = 'Valid_ValidTimeout'; + Model.TIMEOUT_ERROR = 'Valid_ErrorTimeout'; + Model.TIMEOUT_FOCUS = 'Valid_FocusTimeout'; + Model.TIMEOUT_SUCCESS = 'Valid_SuccessTimeout'; + Model.SELECTOR_ERROR = '~ em.error, ~ em.errormsg'; Model.CSS_ERROR = 'error errormsg'; @@ -730,8 +934,6 @@ } /** * 获取 _item 的检查类型 - * @method parseDatatype - * @private * @static * @param {selector|string} _item */ @@ -747,8 +949,6 @@ } /** * 获取 _item 的检查子类型, 所有可用的检查子类型位于 _logic.subdatatype 对象 - * @method parseSubdatatype - * @private * @static * @param {selector|string} _item */ @@ -762,10 +962,6 @@ } return _r.toLowerCase().replace(/\-.*/, ''); } - , isAvalible: - function( _item ){ - return ( _item.is(':visible') || this.isValidHidden( _item ) ) && !_item.is('[disabled]'); - } , isForm: function( _item ){ var _r; @@ -778,7 +974,7 @@ , isErrorAbort: function( _item ){ var _r = Valid.errorAbort; - _item.is('[errorabort]') && ( _r = parseBool( _item.attr('errorabort') ) ); + _item.is('[errorabort]') && ( _r = JC.f.parseBool( _item.attr('errorabort') ) ); return _r; } , isValid: @@ -799,33 +995,49 @@ , isAutoTrim: function( _item ){ _item = $( _item ); - var _r = Valid.autoTrim, _form = getJqParent( _item, 'form' ); - _form && _form.length && _form.is( '[validautotrim]' ) && ( _r = parseBool( _form.attr('validautotrim') ) ); - _item.is( '[validautotrim]' ) && ( _r = parseBool( _item.attr('validautotrim') ) ); + /* + //取form 的时候, 影响性能 + var _r = Valid.autoTrim, _form = $( _item.prop( 'form' ) ); + _form && _form.length && _form.is( '[validautotrim]' ) && ( _r = JC.f.parseBool( _form.attr('validautotrim') ) ); + _item.is( '[validautotrim]' ) && ( _r = JC.f.parseBool( _item.attr('validautotrim') ) ); + */ + var _r = Valid.autoTrim; + _item.is( '[validautotrim]' ) && ( _r = JC.f.parseBool( _item.attr('validautotrim') ) ); return _r; } , isReqmsg: function( _item ){ return _item.is('[reqmsg]'); } , isValidMsg: function( _item ){ _item = $( _item ); - var _r = Valid.showValidStatus, _form = getJqParent( _item, 'form' ); - _form && _form.length && _form.is( '[validmsg]' ) && ( _r = parseBool( _form.attr('validmsg') ) ); - _item.is( '[validmsg]' ) && ( _r = parseBool( _item.attr('validmsg') ) ); + var _r = Valid.showValidStatus, _form = JC.f.getJqParent( _item, 'form' ); + _form && _form.length && _form.is( '[validmsg]' ) && ( _r = JC.f.parseBool( _form.attr('validmsg') ) ); + _item.is( '[validmsg]' ) && ( _r = JC.f.parseBool( _item.attr('validmsg') ) ); return _r; } + , isAvalible: + function( _item ){ + return ( _item.is(':visible') || this.isValidHidden( _item ) ) && !_item.is('[disabled]'); + } + , isValidHidden: function( _item ){ var _r = false; _item.is( '[subdatatype]' ) && /hidden/i.test( _item.attr( 'subdatatype' ) ) + && _item.parent().is( ':visible' ) && ( _r = true ) ; + + _item.is( '[validHidden]' ) + && ( _r = JC.f.parseBool( _item.attr( 'validHidden' ) || 'false' ) ) + ; + return _r; } , validitemcallback: function( _item ){ _item = $( _item ); - var _r = Valid.itemCallback, _form = getJqParent( _item, 'form' ), _tmp; + var _r = Valid.itemCallback, _form = JC.f.getJqParent( _item, 'form' ), _tmp; _form &&_form.length && _form.is( '[validitemcallback]' ) && ( _tmp = _form.attr('validitemcallback') ) @@ -863,10 +1075,10 @@ _key && ( _key += _defKey ) && ( _key = _item.attr( _key ) ) - && ( _r = parentSelector( _item, _key ) ) + && ( _r = JC.f.parentSelector( _item, _key ) ) ; - !( _r && _r.length ) && ( _r = parentSelector( _item, _item.attr( _defKey ) ) ); + !( _r && _r.length ) && ( _r = JC.f.parentSelector( _item, _item.attr( _defKey ) ) ); return _r; } @@ -878,7 +1090,7 @@ switch( _datatype ){ default: { - return parseISODate( _item.attr('minvalue') ); + return JC.f.parseDate( _item.attr('minvalue'), _item, true ); } } }else{ @@ -892,11 +1104,11 @@ , maxvalue: function( _item, _isFloat ){ if( typeof _isFloat == 'string' ){ - var _datatype = _isFloat.toLowerCase().trim(); + var _datatype = _isFloat.toLowerCase().trim(), _r; switch( _datatype ){ default: { - return parseISODate( _item.attr('maxvalue') ); + return JC.f.parseDate( _item.attr('maxvalue'), _item, true ); } } }else{ @@ -910,8 +1122,6 @@ } /** * 检查内容的长度 - * @method lengthValid - * @private * @static * @param {selector} _item * @attr {string} datatype 数字类型 text|bytetext|richtext @@ -955,7 +1165,7 @@ _min && ( _len < _min ) && ( _r = false ); _max && ( _len > _max ) && ( _r = false ); - JC.log( 'lengthValid: ', _min, _max, _r, _val.length ); + //JC.log( 'lengthValid: ', _min, _max, _r, _val.length ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); @@ -964,8 +1174,6 @@ /** * 检查是否为正确的数字
        *
        默认范围 0 - Math.pow(10, 10) - * @method n - * @private * @static * @param {selector} _item * @attr {require} datatype - n | n-整数位数.小数位数 @@ -996,7 +1204,7 @@ _p.isMinvalue( _item ) && ( _min = _p.minvalue( _item, /\./.test( _item.attr('minvalue') ) ) || _min ); - if( /^[0]+$/.test( _valStr ) && _valStr.length > 1 ){ + if( /^[0]{2,}$/.test( _valStr ) ){ _r = false; } @@ -1008,7 +1216,82 @@ _n > _pow && ( _max = Math.pow( 10, _n ) ); }); - _p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) || _max ); + + //_p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) || _max ); + _p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) ); + + if( _val >= _min && _val <= _max ){ + typeof _n != 'undefined' + && typeof _f != 'undefined' + && ( _r = new RegExp( '^(?:\-|)(?:[\\d]{0,'+_n+'}|)(?:\\.[\\d]{1,'+_f+'}|)$' ).test( _valStr ) ); + + typeof _n != 'undefined' + && typeof _f == 'undefined' + && ( _r = new RegExp( '^(?:\-|)[\\d]{1,'+_n+'}$' ).test( _valStr ) ); + + typeof _n == 'undefined' + && typeof _f != 'undefined' + && ( _r = new RegExp( '^(?:\-|)\\.[\\d]{1,'+_f+'}$' ).test( _valStr ) ); + + typeof _f == 'undefined' && /\./.test( _valStr ) && ( _r = false ); + } else _r = false; + + //JC.log( 'n', _val, typeof _n, typeof _f, typeof _min, typeof _max, _min, _max ); + }else _r = false; + + !_r && !_noError && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + + return _r; + } + /** + * 检查是否为正确的整数或者浮点数
        + *
        默认范围 0 - Math.pow(10, 10) + * @static + * @param {selector} _item + * @attr {require} datatype - f | f-整数位数.小数位数 + * @attr {integer|optional} minvalue - 数值的下限 + * @attr {integer|optional} maxvalue - 数值的上限 + * + * @example +
        + +
        +
        + +
        +
        + +
        + * + */ + , f: + function( _item, _noError ){ + var _p = this, _r = true + , _valStr = _item.val().trim() + , _val = +_valStr + ,_min = 0 + , _pow = 10 + , _max = Math.pow( 10, _pow ) + , _n, _f, _tmp; + + _p.isMinvalue( _item ) && ( _min = _p.minvalue( _item, /\./.test( _item.attr('minvalue') ) ) || _min ); + + if( /^[0]{2,}$/.test( _valStr ) ){ + _r = false; + } + + if( _r && !isNaN( _val ) && _val >= _min ){ + _item.attr('datatype').replace( /^f[^\-]*\-(.*)$/, function( $0, $1 ){ + _tmp = $1.split('.'); + _n = parseInt( _tmp[0] ); + _f = parseInt( _tmp[1] ); + _n > _pow && ( _max = Math.pow( 10, _n ) ); + }); + + typeof _n == 'undefined' && ( _n = 10 ); + typeof _f == 'undefined' && ( _f = 2 ); + + _p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) ); if( _val >= _min && _val <= _max ){ typeof _n != 'undefined' @@ -1033,14 +1316,13 @@ return _r; } + /** * 检查两个输入框的数值 *
        数字格式为 0-pow(10,10) *
        带小数点使用 nrange-int.float, 例: nrange-1.2 nrange-2.2 *
        注意: 如果不显示指定 fromNEl, toNEl, * 将会从父级查找 datatype=nrange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略 - * @method nrange - * @private * @static * @param {selector} _item * @attr {require} datatype - nrange @@ -1060,7 +1342,7 @@ */ , nrange: function( _item ){ - var _p = this, _r = _p.n( _item ), _min, _max, _fromNEl, _toNEl, _items; + var _p = this, _r = _p.n( _item ), _min, _max, _fromNEl, _toNEl, _items, _tmp; if( _r ){ if( _item.is( '[fromNEl]' ) ) { @@ -1081,19 +1363,41 @@ } if( _fromNEl && _fromNEl.length || _toNEl && _toNEl.length ){ - JC.log( 'nrange', _fromNEl.length, _toNEl.length ); + //JC.log( 'nrange', _fromNEl.length, _toNEl.length ); _toNEl.val( $.trim( _toNEl.val() ) ); _fromNEl.val( $.trim( _fromNEl.val() ) ); + + if( _r && _toNEl && _toNEl.length && _toNEl.attr( 'subdatatype' ) && /\beven\b/.test( _toNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.even( _toNEl ) ); + } + if( _r && _toNEl && _toNEl.length && _toNEl.attr( 'subdatatype' ) && /\bodd\b/.test( _toNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.odd( _toNEl ) ); + } + if( _r && _fromNEl && _fromNEl.length && _fromNEl.attr( 'subdatatype' ) && /\beven\b/.test( _fromNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.even( _fromNEl ) ); + } + if( _r && _fromNEl && _fromNEl.length && _fromNEl.attr( 'subdatatype' ) && /\bodd\b/.test( _fromNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.odd( _fromNEl ) ); + } + if( !_r ){ + return false; + } if( _toNEl[0] != _fromNEl[0] && _toNEl.val().length && _fromNEl.val().length ){ _r && ( _r = _p.n( _toNEl, true ) ); _r && ( _r = _p.n( _fromNEl, true ) ); + _r && ( +_fromNEl.val() ) > ( +_toNEl.val() ) && ( _r = false ); - - JC.log( 'nrange:', +_fromNEl.val(), +_toNEl.val(), _r ); + + _r && ( _tmp = _fromNEl.attr( 'rangeCanEqual' ) || _toNEl.attr( 'rangeCanEqual' ) ) + && !JC.f.parseBool( _tmp ) + && ( JC.f.parseFinance( _fromNEl.val(), 10 ) === JC.f.parseFinance( _toNEl.val(), 10 ) ) + && ( _r = false ); + ; + //JC.log( 'nrange:', +_fromNEl.val(), +_toNEl.val(), _r ); _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _fromNEl ] ); _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _toNEl ] ); @@ -1107,12 +1411,10 @@ return _r; } + /** * 检查是否为合法的日期, *
        日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD - * @method d - * @private - * @static * @param {selector} _item * @attr {require} datatype - d * @attr {date string|optional} minvalue - 日期的下限 @@ -1122,12 +1424,14 @@ */ - , d: + , 'd': function( _item, _noError ){ - var _p = this, _val = $.trim( _item.val() ), _r = true, _date = parseISODate( _val ), _tmpDate; + var _p = this, _val = $.trim( _item.val() ), _r = true + , _date = JC.f.parseDate( _val, _item ), _tmpDate; if( _val && _date ){ + if( _p.isMinvalue( _item ) && ( _tmpDate = _p.minvalue( _item, 'd' ) ) ){ _date.getTime() < _tmpDate.getTime() && ( _r = false ); } @@ -1135,21 +1439,22 @@ if( _r && _p.isMaxvalue( _item ) && ( _tmpDate = _p.maxvalue( _item, 'd' ) ) ){ _date.getTime() > _tmpDate.getTime() && ( _r = false ); } + }else if( _val ){ + _r = false; } !_r && !_noError && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } - , 'date': function(){ return this.d.apply( this, sliceArgs( arguments ) ); } + , 'date': function(){ return this.d.apply( this, JC.f.sliceArgs( arguments ) ); } + , 'ddate': function(){ return this.d.apply( this, JC.f.sliceArgs( arguments ) ); } + /** * 检查两个输入框的日期 *
        日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD *
        注意: 如果不显示指定 fromDateEl, toDateEl, * 将会从父级查找 datatype=daterange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略 - * @method daterange - * @private - * @static * @param {selector} _item * @attr {require} datatype - daterange * @attr {selector|optional} fromDateEl - 起始日期选择器 @@ -1167,7 +1472,7 @@ */ , daterange: function( _item ){ - var _p = this, _r = _p.d( _item ), _min, _max, _fromDateEl, _toDateEl, _items; + var _p = this, _r = _p.d( _item ), _min, _max, _fromDateEl, _toDateEl, _items, _tmp, _datespan; if( _r ){ if( _item.is( '[fromDateEl]' ) ) { @@ -1188,20 +1493,36 @@ } if( _fromDateEl && _fromDateEl.length || _toDateEl && _toDateEl.length ){ - JC.log( 'daterange', _fromDateEl.length, _toDateEl.length ); + //JC.log( 'daterange', _fromDateEl.length, _toDateEl.length ); _toDateEl.val( $.trim( _toDateEl.val() ) ); _fromDateEl.val( $.trim( _fromDateEl.val() ) ); if( _toDateEl[0] != _fromDateEl[0] && _toDateEl.val().length && _fromDateEl.val().length ){ - _r && ( _r = _p.d( _toDateEl, true ) ) && ( _min = parseISODate( _fromDateEl.val() ) ); - _r && ( _r = _p.d( _fromDateEl, true ) ) && ( _max = parseISODate( _toDateEl.val() ) ); + _r && ( _r = _p.d( _toDateEl, true ) ) && ( _min = JC.f.parseDate( _fromDateEl.val(), _fromDateEl ) ); + _r && ( _r = _p.d( _fromDateEl, true ) ) && ( _max = JC.f.parseDate( _toDateEl.val(), _toDateEl ) ); _r && _min && _max && _min.getTime() > _max.getTime() && ( _r = false ); + if( _r && _min && _max ){ + _datespan = ( _fromDateEl.attr( 'datespan' ) || _toDateEl.attr( 'datespan' ) ); + if( _datespan && ( _datespan = JC.f.dateDetect( JC.f.formatISODate( _min ) + _datespan ) ) ){ + if( _max.getTime() > _datespan.getTime() ){ + _r = false; + } + } + } + + _r && ( _tmp = _fromDateEl.attr( 'rangeCanEqual' ) || _toDateEl.attr( 'rangeCanEqual' ) ) + && !JC.f.parseBool( _tmp ) + && _min && _max + && _min.getTime() == _max.getTime() + && ( _r = false ); + ; + _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _fromDateEl ] ); _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _toDateEl ] ); @@ -1213,11 +1534,9 @@ return _r; } + , 'drange': function(){ return this.daterange.apply( this, JC.f.sliceArgs( arguments ) ); } /** * 检查时间格式, 格式为 hh:mm:ss - * @method time - * @private - * @static * @param {selector} _item * @example
        @@ -1232,9 +1551,6 @@ } /** * 检查时间格式, 格式为 hh:mm - * @method minute - * @private - * @static * @param {selector} _item * @example
        @@ -1250,9 +1566,6 @@ /** * 检查银行卡号码 *
        格式为: d{15}, d{16}, d{17}, d{19} - * @method bankcard - * @private - * @static * @param {selector} _item * @example
        @@ -1267,8 +1580,9 @@ ; _item.val( _v ); var _dig = _v.replace( /[^\d]/g, '' ) - , _r = /^[1-9](?:[\d]{18}|[\d]{16}|[\d]{15}|[\d]{14})$/.test( _dig ) + , _r = /^[0-9](?:[\d]{24}|[\d]{23}|[\d]{22}|[\d]{21}|[\d]{20}|[\d]{19}|[\d]{18}|[\d]{17}|[\d]{16}|[\d]{15}|[\d]{14}|[\d]{13}|[\d]{12}|[\d]{11}|[\d]{10}|[\d]{9}|[\d]{8}|)$/.test( _dig ) ; + /^[0]+$/.test( _dig ) && ( _r = false ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } @@ -1276,9 +1590,6 @@ * 检查中文姓名 *
        格式: 汉字和大小写字母 *
        规则: 长度 2-32个字节, 非 ASCII 算2个字节 - * @method cnname - * @private - * @static * @param {selector} _item * @example
        @@ -1287,9 +1598,47 @@
        */ , cnname: + function( _item, _noStatus ){ + var _p = this + , _r = _p.bytelen( _item.val() ) <= 32 && /^[\u4e00-\u9fa5a-zA-Z.\u3002\u2022]{2,32}$/.test( _item.val() ); + !_noStatus && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查英文 + *
        格式: 大小写字母 + 空格 + *
        规则: 长度 2-32个字节, 非 ASCII 算2个字节 + * @param {selector} _item + * @example +
        + +
        + */ + , enname: + function( _item, _noStatus ){ + var _p = this + , _r = _p.bytelen( _item.val() ) <= 32 && /^[a-zA-Z ]{2,32}$/.test( _item.val() ); + !_noStatus && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查 英文名称/中文名称 + *
        allname = cnname + enname + *
        规则: 长度 2-32个字节, 非 ASCII 算2个字节 + * @param {selector} _item + * @example +
        + +
        + */ + , allname: function( _item ){ var _p = this - , _r = _p.bytelen( _item.val() ) < 32 && /^[\u4e00-\u9fa5a-zA-Z.\u3002\u2022]{2,32}$/.test( _item.val() ); + , _r = _p.bytelen( _item.val() ) <= 32 + && ( _p.cnname( _item, true ) || _p.enname( _item, true ) ) + ; !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } @@ -1297,9 +1646,6 @@ * 检查注册用户名 *
        格式: a-zA-Z0-9_- *
        规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30 - * @method username - * @private - * @static * @param {selector} _item * @example
        @@ -1316,9 +1662,6 @@ /** * 检查身份证号码
        * 目前只使用最简单的位数判断~ 有待完善 - * @method idnumber - * @private - * @static * @param {selector} _item * @example
        @@ -1332,11 +1675,43 @@ !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } + /** + * 检查QQ号码( 5 ~ 11位数字 ) + * @param {selector} _item + * @param {bool} _noError + * @example +
        + +
        + */ + , qq: + function( _item, _noError ){ + var _p = this, _r = /^[1-9][\d]{4,10}$/.test( _item.val() ); + !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查QQ号码( 数字号码|电子邮件 ) + *
        5 ~ 11位数字 + * @param {selector} _item + * @param {bool} _noError + * @example +
        + +
        + */ + , qqall: + function( _item, _noError ){ + var _p = this, _r = _p.qq( _item, true ) || _p.email( _item, true ); + !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } /** * 检查手机号码
        - * @method mobilecode - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1348,16 +1723,13 @@ */ , mobilecode: function( _item, _noError ){ - var _p = this, _r = /^(?:13|14|15|16|18|19)[\d]{9}$/.test( _item.val() ); + var _p = this, _r = /^(?:13|14|15|16|17|18|19)[\d]{9}$/.test( _item.val() ); !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查手机号码 *
        这个方法是 mobilecode 的别名 - * @method mobile - * @private - * @static * @param {selector} _item * @param {bool} _noError */ @@ -1368,9 +1740,6 @@ /** * 检查手机号码加强方法 *
        格式: [+国家代码] [零]11位数字 - * @method mobilezonecode - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1382,16 +1751,13 @@ */ , mobilezonecode: function( _item, _noError ){ - var _p = this, _r = /^(?:\+[0-9]{1,6} |)(?:0|)(?:13|14|15|16|18|19)\d{9}$/.test( _item.val() ); + var _p = this, _r = /^(?:\+[0-9]{1,6} |)(?:0|)(?:13|14|15|16|17|18|19)\d{9}$/.test( _item.val() ); !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查电话号码 *
        格式: 7/8位数字 - * @method phonecode - * @private - * @static * @param {selector} _item * @example
        @@ -1408,9 +1774,6 @@ /** * 检查电话号码 *
        格式: [区号]7/8位电话号码 - * @method phone - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1429,9 +1792,6 @@ /** * 检查电话号码 *
        格式: [+国家代码][ ][电话区号][ ]7/8位电话号码[#分机号] - * @method phoneall - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1450,9 +1810,6 @@ } /** * 检查电话区号 - * @method phonezone - * @private - * @static * @param {selector} _item * @example
        @@ -1473,9 +1830,6 @@ } /** * 检查电话分机号码 - * @method phoneext - * @private - * @static * @param {selector} _item * @example
        @@ -1492,9 +1846,6 @@ /** * 检查手机号码/电话号码 *
        这个方法是原有方法的混合验证 mobilecode + phone - * @method mobilephone - * @private - * @static * @param {selector} _item * @example
        @@ -1516,9 +1867,6 @@ /** * 检查手机号码/电话号码, 泛匹配 *
        这个方法是原有方法的混合验证 mobilezonecode + phoneall - * @method mobilephoneall - * @private - * @static * @param {selector} _item * @example
        @@ -1538,9 +1886,6 @@ } /** * 自定义正则校验 - * @method reg - * @private - * @static * @param {selector} _item * @attr {string} reg-pattern 正则规则 /规则/选项 * @example @@ -1554,7 +1899,7 @@ if( !_pattern ) _pattern = $.trim(_item.attr('datatype')).replace(/^reg(?:\-|)/i, ''); _pattern.replace( /^\/([\s\S]*)\/([\w]{0,3})$/, function( $0, $1, $2 ){ - JC.log( $1, $2 ); + //JC.log( $1, $2 ); _r = new RegExp( $1, $2 || '' ).test( _item.val() ); }); @@ -1565,9 +1910,6 @@ /** * 检查验证码
        * 格式: 为 0-9a-zA-Z, 长度 默认为4 - * @method vcode - * @private - * @static * @param {selector} _item * @attr {string} datatype vcode|vcode-[\d]+ * @example @@ -1583,25 +1925,19 @@ , vcode: function( _item ){ var _p = this, _r, _len = parseInt( $.trim(_item.attr('datatype')).replace( /^vcode(?:\-|)/i, '' ), 10 ) || 4; - JC.log( 'vcodeValid: ' + _len ); + //JC.log( 'vcodeValid: ' + _len ); _r = new RegExp( '^[0-9a-zA-Z]{'+_len+'}$' ).test( _item.val() ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查文本长度 - * @method text - * @private - * @static * @see length * @attr {string} datatype text */ , text: function(_item){ return true; } /** * 检查文本的字节长度 - * @method bytetext - * @private - * @static * @see length * @attr {string} datatype bytetext */ @@ -1609,18 +1945,12 @@ /** * 检查富文本的字节 *
        TODO: 完成富文本长度检查 - * @method richtext - * @private - * @static * @see length * @attr {string} datatype richtext */ , richtext: function(_item){ return true; } /** * 计算字符串的字节长度, 非 ASCII 0-255的字符视为两个字节 - * @method bytelen - * @private - * @static * @param {string} _s */ , bytelen: @@ -1629,9 +1959,6 @@ } /** * 检查URL - * @method url - * @private - * @static * @param {selector} _item * @example
        @@ -1642,16 +1969,14 @@ function( _item ){ var _p = this //, _r = /^((http|ftp|https):\/\/|)[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])$/.test( _item.val() ) - , _r = /^(?:htt(?:p|ps)\:\/\/|)((?:(?:(?:\w[\.\-\+]*))\w)*)((?:(?:(?:\w[\.\-\+]*){0,62})\w)+)\.([a-z]{2,6})(?:\/[\w\/\.\#\+\-\~\%\?\_\=\&]*|)$/i.test( _item.val() ) + //, _r = /^(?:htt(?:p|ps)\:\/\/|)((?:(?:(?:\w[\.\-\+]*))\w)*)((?:(?:(?:\w[\.\-\+]*){0,62})\w)+)\.([a-z]{2,6})(?:\/[\w\/\.\#\+\-\~\%\?\_\=\&]*|)$/i.test( _item.val() ) + , _r = /^(?:htt(?:p|ps)\:\/\/|)((?:(?:(?:\w[\.\-\+]*))\w)*)((?:(?:(?:\w[\.\-\+]*){0,62})\w)+)\.([a-z]{2,6})(?:\/[^\s<>]*|)$/i.test( _item.val() ) ; !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查域名 - * @method domain - * @private - * @static * @param {selector} _item
        @@ -1667,9 +1992,6 @@ } /** * 检查域名 - * @method stricdomain - * @private - * @static * @param {selector} _item
        @@ -1684,9 +2006,6 @@ } /** * 检查电子邮件 - * @method email - * @private - * @static * @param {selector} _item * @example
        @@ -1694,16 +2013,13 @@
        */ , email: - function( _item ){ + function( _item, _noError ){ var _p = this, _r = /^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test( _item.val() ); - !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查地区代码 - * @method countrycode - * @private - * @static * @param {selector} _item * @example
        @@ -1718,9 +2034,6 @@ } /** * 检查邮政编码 - * @method zipcode - * @private - * @static * @param {selector} _item * @example
        @@ -1735,9 +2048,6 @@ } /** * 纳税人识别号, 15, 18, 20位字符 - * @method taxcode - * @private - * @static * @param {selector} _item * @example
        @@ -1757,9 +2067,6 @@ /** * 此类型检查 2|N 个对象填写的值必须一致 * 常用于注意时密码验证/重置密码 - * @method reconfirm - * @private - * @static * @param {selector} _item * @example
        @@ -1792,7 +2099,7 @@ , _KEY = "ReconfirmValidTime" , _typeKey = 'reconfirm' ; - JC.log( _typeKey, new Date().getTime() ); + //JC.log( _typeKey, new Date().getTime() ); _p.isDatatarget( _item, _typeKey ) && (_target = _p.datatarget( _item, _typeKey ) ); !( _target && _target.length ) && ( _target = _p.samesubtypeitems( _item, _typeKey ) ); @@ -1822,6 +2129,9 @@ $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, $(this) ] ); }); } + + !_r && _item.attr( 'datatypestatus', 'false' ); + _r ? $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _item ] ) : $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'reconfirmmsg', true ] ) @@ -1845,9 +2155,6 @@ /** * 此类型检查 2|N个对象必须至少有一个是有输入内容的, *
        常用于 手机/电话 二填一 - * @method alternative - * @private - * @static * @param {selector} _item * @example
        @@ -1886,12 +2193,13 @@ , _dt = _p.parseDatatype( _item ) , _typeKey = 'alternative' ; - JC.log( _typeKey, new Date().getTime() ); + //JC.log( _typeKey, new Date().getTime() ); _p.isDatatarget( _item, _typeKey ) && (_target = _p.datatarget( _item, _typeKey ) ); !( _target && _target.length ) && ( _target = _p.samesubtypeitems( _item, _typeKey ) ); var _isReturn = false; + var _reqTarget; if( _target.length && !$.trim( _item.val() ) ){ var _hasVal = false; @@ -1925,7 +2233,7 @@ _p[ _sdt ]( $(this) ); }else if( !$(this).val() ){ $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, $(this) ] ); - var _reqTarget = parentSelector( $(this), $(this).attr( 'reqtargetdatatarget' ) ); + var _reqTarget = JC.f.parentSelector( $(this), $(this).attr( 'reqtargetdatatarget' ) ); _reqTarget && _reqTarget.length && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _reqTarget ] ) @@ -1940,7 +2248,7 @@ if( _item[0] == this ) return; var _sp = $(this), _reqTarget; if( _sp.is( '[alternativeReqTarget]' ) ){ - _reqTarget = parentSelector( _sp, _sp.attr('alternativeReqTarget') ); + _reqTarget = JC.f.parentSelector( _sp, _sp.attr('alternativeReqTarget') ); if( _reqTarget && _reqTarget.length ){ _reqTarget.each( function(){ var _ssp = $(this), _v = _ssp.val().trim(); @@ -1954,7 +2262,7 @@ }); if( _item.is( '[alternativeReqTarget]' ) ){ - _reqTarget = parentSelector( _item, _item.attr('alternativeReqTarget') ); + _reqTarget = JC.f.parentSelector( _item, _item.attr('alternativeReqTarget') ); if( _reqTarget && _reqTarget.length ){ _reqTarget.each( function(){ var _ssp = $(this), _v = _ssp.val().trim(); @@ -1985,6 +2293,7 @@ $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _item ] ); } }else{ + !_r && _item.attr( 'datatypestatus', 'false' ); $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'alternativemsg', true ] ); } @@ -1992,20 +2301,18 @@ } /** * 如果 _item 的值非空, 那么 reqtarget 的值也不能为空 - * @method reqtarget * @param {selector} _item - * @private - * @static */ , 'reqtarget': function( _item ){ var _p = this, _r = true , _v = _item.val().trim(), _tv - , _target = parentSelector( _item, _item.attr('reqtargetdatatarget') || _item.attr('datatarget') ) + , _target = JC.f.parentSelector( _item, _item.attr('reqtargetdatatarget') || _item.attr('datatarget') ) ; if( _v && _target && _target.length ){ _tv = _target.val().trim(); !_tv && ( _r = false ); + !_r && _item.attr( 'datatypestatus', 'false' ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _target, 'reqtargetmsg', true ] ); _r && _target.trigger('blur'); }else if( _target && _target.length ){ @@ -2015,11 +2322,70 @@ return _r; } /** + * 数值必须为偶数 + * @param {selector} _item + */ + , 'even': + function( _item ){ + var _p = this, _r = true + , _v = JC.f.parseFinance( _item.val().trim(), 9 ) || 0 + ; + + if( isNaN( _v ) ){ + _r = false; + }else if( _v % 2 !== 0 ){ + _r = false; + } + + !_r && JC.log( 'even:', _r, JC.f.gid() ); + + //!_r && _item.attr( 'datatypestatus', 'false' ); + !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'evenmsg', true ] ); + + return _r; + } + /** + * 数值必须为奇数 + * @param {selector} _item + */ + , 'odd': + function( _item ){ + var _p = this, _r = true + , _v = JC.f.parseFinance( _item.val().trim(), 9 ) || 0 + ; + + if( isNaN( _v ) ){ + _r = false; + }else if( _v % 2 === 0 ){ + _r = false; + } + + //!_r && _item.attr( 'datatypestatus', 'false' ); + !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'oddmsg', true ] ); + + return _r; + } + + + , ucheck: + function( _item ){ + var _r = true, _p = this; + this.ucheckCallback( _item ) && ( _r = this.ucheckCallback( _item )( _item ) ); + !_r && _item.attr( 'datatypestatus', 'false' ); + !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'ucheckmsg', true ] ); + return _r; + } + , ucheckCallback: + function( _item ){ + var _r; + if( _item && _item.length && _item.is( '[ucheckCallback]' ) ){ + _r = window[ _item.attr( 'ucheckCallback' ) ]; + } + return _r; + } + /** * N 个值必须保持唯一性, 不能有重复 - * @method unique * @param {selector} _item - * @private - * @static */ , 'unique': function( _item ){ @@ -2028,14 +2394,17 @@ , _len = _p.typeLen( _item.attr('subdatatype') )[0] , _KEY = "UniqueValidTime" , _typeKey = 'unique' - , _ignoreCase = parseBool( _item.attr('uniqueIgnoreCase') ) + , _ignoreCase = JC.f.parseBool( _item.attr('uniqueIgnoreCase') ) + , _errLs, _corLs ; - JC.log( _typeKey, new Date().getTime() ); + //JC.log( _typeKey, new Date().getTime() ); _p.isDatatarget( _item, _typeKey ) && (_target = _p.datatarget( _item, _typeKey ) ); !( _target && _target.length ) && ( _target = _p.samesubtypeitems( _item, _typeKey ) ); + //JC.log( _target && _target.length ? _target.length : 'null' ); + _errLs = []; _corLs = []; @@ -2044,12 +2413,21 @@ _tmp = {}; _target.each( function( _ix ){ var _sp = $(this); - if( ! _p.isAvalible( _sp ) ) return; + if( _sp.is('[processDisabled]') + && ( !_sp.attr('processDisabled') + || JC.f.parseBool( _sp.attr('processDisabled' ) ) + ) + ){ + if( !( _sp.is(':visible') || _p.isValidHidden( _sp ) ) ) return; + }else{ + if( ! _p.isAvalible( _sp ) ) return; + } if( _p.checkRepeatProcess( _sp, _KEY, true ) ) { _isReturn = true; //return false; } + //JC.log( _ix, _sp.val() ); if( _ix % _len === 0 ){ _group.push( [] ); @@ -2063,15 +2441,16 @@ $.each( _group, function( _ix, _items ){ var _tmpAr = [], _ignoreEmpty = false; $.each( _items, function( _six, _sitem ){ - var _tmpV, _ignore = parseBool( _sitem.attr('uniqueIgnoreEmpty') ); + var _tmpV, _ignore = JC.f.parseBool( _sitem.attr('uniqueIgnoreEmpty') ); _tmpV = $(_sitem).val().trim(); - _ignore && !_tmpV && _sitem.is(':visible') && ( _ignoreEmpty = true ); + _ignore && !_tmpV && ( _sitem.is(':visible') || _p.isValidHidden( _sitem ) ) && ( _ignoreEmpty = true ); _tmpAr.push( _tmpV ); }); + var _pureVal = _tmpAr.join(''), _compareVal = _tmpAr.join('####'); if( _ignoreEmpty ) return; - var _pureVal = _tmpAr.join(''), _compareVal = _tmpAr.join('IOU~IOU'); if( !_pureVal ) return; _ignoreCase && ( _compareVal = _compareVal.toLowerCase() ); + //JC.log( _compareVal ); if( _compareVal in _tmp ){ _tmp[ _compareVal ].push( _items ); @@ -2098,13 +2477,25 @@ //if( _isReturn ) return _r; $.each( _corLs, function( _ix, _sitem ){ - Valid.setValid( _sitem ); + var _dt = _p.parseDatatype( _sitem ) + if( _dt && _p[ _dt ] && _sitem.val() ){ + if( _p[ _dt ]( _sitem ) ){ + Valid.setValid( _sitem ); + } + }else{ + Valid.setValid( _sitem ); + } }); + !_r && _item.attr( 'datatypestatus', 'false' ); + !_r && _errLs.length && $.each( _errLs, function( _ix, _sitem ){ _sitem = $( _sitem ); + var _sv = ( _sitem.val() || '' ).trim(); if( _isReturn ) return false; - _sitem.val() + if( ! _sv ) return; + //JC.log('yyyyyyyyyyyyy', _sitem.data('JCValidStatus'), new Date().getTime() ); + _sv && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _sitem, 'uniquemsg', true ] ); } ); @@ -2115,12 +2506,20 @@ function( _item ){ var _r = true, _p = this; if( !Valid.isFormValid ) return _r; + if( !_item.is( '[datavalid]') ) return _r; - _r = parseBool( _item.attr('datavalid') ); + //JC.log( 'datavalid', new Date().getTime() ); - setTimeout( function(){ - !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'datavalidmsg', true ] ); - }, 1 ); + _r = JC.f.parseBool( _item.attr('datavalid') ); + + if( !_r ){ + !_r && _item.attr( 'datatypestatus', 'false' ); + Valid.statusTimeout.error( _item, + setTimeout( function(){ + $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'datavalidmsg', true ] ); + }, 1 ) + ); + } return _r; } @@ -2155,7 +2554,7 @@ } , findErrorEle: function( _item ){ - var _p = this, _selector = Model.SELECTOR_ERROR, _r = _item.find( _selector ); + var _p = this, _selector = Model.SELECTOR_ERROR, _r = _item.find( _selector ), _tmp; if( _item.attr('emel') && ( _tmp = _p.getElement( _item.attr('emel'), _item, _selector ) ).length ) _r = _tmp; return _r; @@ -2163,9 +2562,6 @@ /** * 获取 _selector 对象 *
        这个方法的存在是为了向后兼容qwrap, qwrap DOM参数都为ID - * @method getElement - * @private - * @static * @param {selector} _selector */ , getElement: @@ -2174,7 +2570,7 @@ _subselector = _subselector || Model.SELECTOR_ERROR; _selector = $( _item.parent().find( _subselector ) ); }else if( /^[\/\|\<\(]/.test( _selector ) ) { - _selector = parentSelector( _item, _selector ); + _selector = JC.f.parentSelector( _item, _selector ); }else if( /\./.test( _selector ) ) { return $( _selector ); }else if( /^[\w-]+$/.test( _selector ) ) { @@ -2186,9 +2582,6 @@ /** * 获取对应的错误信息, 默认的错误信息有 reqmsg, errmsg,
        * 注意: 错误信息第一个字符如果为空格的话, 将完全使用用户定义的错误信息, 将不会动态添加 请上传/选择/填写 - * @method errorMsg - * @private - * @static * @param {selector} _item * @param {string} _msgAttr - 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 * @param {bool} _fullMsg - 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写 @@ -2221,9 +2614,6 @@ /** * 检查内容是否为空, *
        如果声明了该属性, 那么 value 须不为空 - * @method reqmsg - * @private - * @static * @param {selector} _item * @example
        @@ -2242,7 +2632,7 @@ } !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'reqmsg' ] ); - JC.log( 'regmsgValid: ' + _r ); + //JC.log( 'regmsgValid: ' + _r ); return _r; } , sametypeitems: @@ -2286,13 +2676,13 @@ , focusmsgeverytime: function( _item ){ var _r = Valid.focusmsgEverytime; - _item.is( '[focusmsgeverytime]' ) && ( _r = parseBool( _item.attr('focusmsgeverytime') ) ); + _item.is( '[focusmsgeverytime]' ) && ( _r = JC.f.parseBool( _item.attr('focusmsgeverytime') ) ); return _r; } , validemdisplaytype: function( _item ){ _item && ( _item = $( _item ) ); - var _r = Valid.emDisplayType, _form = getJqParent( _item, 'form' ), _tmp; + var _r = Valid.emDisplayType, _form = JC.f.getJqParent( _item, 'form' ), _tmp; _form &&_form.length && _form.is( '[validemdisplaytype]' ) && ( _tmp = _form.attr('validemdisplaytype') ) @@ -2306,7 +2696,8 @@ return _r; } /** - * 这里需要优化检查, 目前会重复检查 + * 这里需要优化检查, 目前会重复检查(2次) + * */ , checkedType: function( _item, _type ){ @@ -2317,41 +2708,61 @@ , _items , _tmp , _ckLen = 1 + , _ckMaxLen = 0 , _count = 0 , _finder = _item , _pntIsLabel = _item.parent().prop('nodeName').toLowerCase() == 'label' - , _finderKey = _type + 'finder'; + , _finderKey = _type + 'finder' + , _KEY = 'checkedType_' + _type + , _isReturn ; - JC.log( _item.attr('name') + ', ' + _item.val() ); + if( _p.checkRepeatProcess( _item, _KEY, true ) && !_item.data( 'Last' + _type ) ) { + return !_item.data( 'isErrorVck' ); + } + //JC.log( 'checkedType', JC.f.gid() ); if( _item.is( '[datatarget]' ) ){ - _items = parentSelector( _item, _item.attr('datatarget') ); + _items = JC.f.parentSelector( _item, _item.attr('datatarget') ); _tmp = []; _items.each( function(){ var _sp = $(this); - _sp.is(':visible') + if( + ( _sp.is(':visible') || _p.isValidHidden( _sp ) ) && !_sp.prop('disabled') - && _tmp.push( _sp ); + ){ + _tmp.push( _sp ); + if( _p.checkRepeatProcess( _sp, _KEY, true ) ) { + _isReturn = true; + } + } + }); _items = $( _tmp ); }else{ if( _pntIsLabel ){ if( !_finder.is('[' + _finderKey + ']') ) _finder = _item.parent().parent(); - else _finder = parentSelector( _item, _item.attr( _finderKey ) ); - _tmp = parentSelector( _finder, '|input[datatype]' ); + else _finder = JC.f.parentSelector( _item, _item.attr( _finderKey ) ); + _tmp = JC.f.parentSelector( _finder, '|input[datatype]' ); } else{ - _tmp = parentSelector( _finder, '/input[datatype]' ); + _tmp = JC.f.parentSelector( _finder, '/input[datatype]' ); } _items = []; _tmp.each( function(){ var _sp = $(this); var _re = new RegExp( _type, 'i' ); - _re.test( _sp.attr('datatype') ) - && _sp.is(':visible') - && !_sp.prop('disabled') - && _items.push( _sp ); + + if( + _re.test( _sp.attr('datatype') ) + && ( _sp.is(':visible') || _p.isValidHidden( _sp ) ) + && !_sp.prop('disabled') + ){ + _items.push( _sp ); + if( _p.checkRepeatProcess( _sp, _KEY, true ) ) { + _isReturn = true; + } + } }); _items = $( _items ); } @@ -2367,9 +2778,10 @@ _items.length && $( _item = _items[ _items.length - 1 ] ).data('Last' + _type, true); if( _items.length ){ - _item.is( '[datatype]' ) - && _item.attr('datatype') - .replace( /[^\-]+?\-([\d]+)/, function( $0, $1 ){ _ckLen = parseInt( $1, 10 ) || _ckLen; } ); + if( _item.is( '[datatype]' ) && _item.attr( 'datatype' ) ){ + _item.attr('datatype').replace( /[^\-]+?\-([\d]+)/, function( $0, $1 ){ _ckLen = parseInt( $1, 10 ) || _ckLen; } ); + _item.attr('datatype').replace( /[^\-]+?\-[\d]+?(?:\.|\-)([\d]+)/, function( $0, $1 ){ _ckMaxLen = parseInt( $1, 10 ) || _ckMaxLen; } ); + } if( _items.length >= _ckLen ){ _items.each( function(){ @@ -2378,9 +2790,22 @@ if( _count < _ckLen ){ _r = false; + }else if( _ckMaxLen && _count > _ckMaxLen ){ + _r = false; } } + if( !_r ){ + _item.data( 'isErrorVck', true ); + _items.each( function(){ + $( this ).data( 'isErrorVck', true ); + }); + }else{ + _item.data( 'isErrorVck', false ); + _items.each( function(){ + $( this ).data( 'isErrorVck', false ); + }); + } !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); } @@ -2433,6 +2858,23 @@ ; return _r; } + + , ignoreAutoCheckEvent: + function( _item ){ + var _r = Valid.ignoreAutoCheckEvent, _form; + _item && ( _item = $( _item ) ); + if( _item && _item.length ){ + _form = JC.f.getJqParent( _item, 'form' ); + _form + && _form.length + && _form.is( '[ignoreAutoCheckEvent]' ) + && ( _r = JC.f.parseBool( _form.attr( 'ignoreAutoCheckEvent' ) ) ); + + _item.is( '[ignoreAutoCheckEvent]' ) + && ( _r = JC.f.parseBool( _item.attr( 'ignoreAutoCheckEvent' ) ) ); + } + return _r; + } }; function View( _model ){ @@ -2442,13 +2884,64 @@ View.prototype = { init: function() { + var _p = this; + + $(_p).on( 'setValid', function( _evt, _item, _tm, _noStyle, _hideFocusMsg ){ + var _tmp; + _item.removeClass( Model.CSS_ERROR ); + _item.find( + JC.f.printf( '~ em:not("em.focusmsg, em.validmsg, {0}")', Model.FILTER_ERROR ) ) + .css('display', _p._model.validemdisplaytype( _item ) + ); + _item.find( Model.SELECTOR_ERROR ).hide(); + _item.attr('emel') + && ( _tmp = _p._model.getElement( _item.attr('emel'), _item ) ) + && _tmp.hide(); + + typeof _noStyle == 'undefined' + && typeof _item.val() != 'object' + && !_item.val().trim() + && ( _noStyle = 1 ); + + _p.validMsg( _item, _noStyle, _hideFocusMsg ); + }); + + $( _p ).on( 'setError', function( _evt, _item, _msgAttr, _fullMsg ){ + var _msg = _p._model.errorMsg.apply( _p._model, [ _item, _msgAttr, _fullMsg ] ) + , _errEm + , _validEm + , _focusEm + , _tmp + ; + + _item.addClass( Model.CSS_ERROR ); + _item.find( JC.f.printf( '~ em:not({0})', Model.FILTER_ERROR ) ).hide(); + + if( _item.is( '[validel]' ) ){ + ( _validEm = _p._model.getElement( _item.attr( 'validel' ) , _item) ) + && _validEm.hide(); + } + if( _item.is( '[focusel]' ) ){ + ( _focusEm = _p._model.getElement( _item.attr( 'focusel' ) , _item) ) + && _focusEm.hide(); + } + if( _item.is( '[emEl]' ) ){ + ( _errEm = _p._model.getElement( _item.attr( 'emEl' ) , _item) ) + && _errEm.addClass( Model.CSS_ERROR ); + } + !( _errEm && _errEm.length ) && ( _errEm = _item.find( Model.SELECTOR_ERROR ) ); + if( !_errEm.length ){ + ( _errEm = $( JC.f.printf( '', Model.CSS_ERROR ) ) ).insertAfter( _item ); + } + !_msg.trim() && ( _msg = " " ); + _errEm.html( _msg ).css('display', _p._model.validemdisplaytype( _item ) ); + //JC.log( 'error:', _msg ); + }); + return this; } /** * 显示正确的视觉效果 - * @method valid - * @private - * @static * @param {selector} _item * @param {int} _tm * @param {bool} _noStyle @@ -2456,35 +2949,22 @@ , valid: function( _item, _tm, _noStyle ){ _item && ( _item = $(_item) ); - var _p = this, _tmp, _focusEm; + var _p = this, _tmp; _item.data( 'JCValidStatus', true ); //if( !_p._model.isValid( _item ) ) return false; - var _hideFocusMsg = !parseBool( _item.attr('validnoerror' ) ); - setTimeout(function(){ - _item.removeClass( Model.CSS_ERROR ); - _item.find( printf( '~ em:not("em.focusmsg, em.validmsg, {0}")', Model.FILTER_ERROR ) ).css('display', _p._model.validemdisplaytype( _item ) ); - _item.find( Model.SELECTOR_ERROR ).hide(); - _item.attr('emel') - && ( _tmp = _p._model.getElement( _item.attr('emel'), _item ) ) - && _tmp.hide(); - - typeof _noStyle == 'undefined' - && typeof _item.val() != 'object' - && !_item.val().trim() - && ( _noStyle = 1 ); + var _hideFocusMsg = !JC.f.parseBool( _item.attr('validnoerror' ) ); - _p.validMsg( _item, _noStyle, _hideFocusMsg ); - ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, true ); - - }, _tm || 150); + Valid.statusTimeout.valid( _item, + setTimeout(function(){ + $(_p).trigger( 'setValid', [ _item, _tm, _noStyle, _hideFocusMsg ] ); + ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, true ); + }, _tm || 150) + ); } , validMsg: function( _item, _noStyle, _hideFocusMsg ){ var _p = this, _msg = ( _item.attr('validmsg') || '' ).trim().toLowerCase(), _focusEm; - /* - */ - if( _p._model.isValidMsg( _item ) ){ if( _msg == 'true' || _msg == '1' ) _msg = ''; !_msg.trim() && ( _msg = ' ' ); //chrome bug, 内容为空会换行 @@ -2517,9 +2997,6 @@ } /** * 显示错误的视觉效果 - * @method error - * @private - * @static * @param {selector} _item * @param {string} _msgAttr - 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 * @param {bool} _fullMsg - 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写 @@ -2527,44 +3004,18 @@ , error: function( _item, _msgAttr, _fullMsg ){ _item && ( _item = $(_item) ); - var _p = this, arg = arguments; + var _p = this, arg = arguments, _tmp; //if( !_p._model.isValid( _item ) ) return true; if( _item.is( '[validnoerror]' ) ) return true; _item.data( 'JCValidStatus', false ); - setTimeout(function(){ - var _msg = _p._model.errorMsg.apply( _p._model, sliceArgs( arg ) ) - , _errEm - , _validEm - , _focusEm - ; + Valid.statusTimeout.error( _item, + setTimeout(function(){ + $(_p).trigger( 'setError', [ _item, _msgAttr, _fullMsg ] ); + ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, false); - _item.addClass( Model.CSS_ERROR ); - _item.find( printf( '~ em:not({0})', Model.FILTER_ERROR ) ).hide(); - - if( _item.is( '[validel]' ) ){ - ( _validEm = _p._model.getElement( _item.attr( 'validel' ) , _item) ) - && _validEm.hide(); - } - if( _item.is( '[focusel]' ) ){ - ( _focusEm = _p._model.getElement( _item.attr( 'focusel' ) , _item) ) - && _focusEm.hide(); - } - if( _item.is( '[emEl]' ) ){ - ( _errEm = _p._model.getElement( _item.attr( 'emEl' ) , _item) ) - && _errEm.addClass( Model.CSS_ERROR ); - } - !( _errEm && _errEm.length ) && ( _errEm = _item.find( Model.SELECTOR_ERROR ) ); - if( !_errEm.length ){ - ( _errEm = $( printf( '', Model.CSS_ERROR ) ) ).insertAfter( _item ); - } - !_msg.trim() && ( _msg = " " ); - _errEm.html( _msg ).css('display', _p._model.validemdisplaytype( _item ) ); - - JC.log( 'error:', _msg ); - - }, 150); - ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, false); + }, 150) + ); return false; } @@ -2574,7 +3025,7 @@ if( _item && ( _item = $( _item ) ).length && ( _item.is('[focusmsg]') || ( _msgAttr && _item.is( '[' + _msgAttr + ']') ) ) ){ - JC.log( 'focusmsg', new Date().getTime() ); + //JC.log( 'focusmsg', new Date().getTime() ); var _r, _p = this , _focusmsgem = _p._model.findFocusEle( _item ) @@ -2627,15 +3078,38 @@ * @private */ $(document).delegate( 'input[type=text], input[type=password], textarea', 'blur', function($evt){ - Valid.getInstance().trigger( Model.FOCUS_MSG, [ $(this), true ] ); - Valid.check( $(this) ); + var _p = $(this), _ins = Valid.getInstance(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p, true ] ); + Valid.checkTimeout( _p ); }); + /** + * 响应没有 type 的 文本框 + */ + $(document).delegate( 'input', 'blur', function( _evt ){ + var _p = $(this), _ins = Valid.getInstance(); + if( _p.attr( 'type' ) ) return; + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p, true ] ); + Valid.checkTimeout( _p ); + }); + $(document).delegate( 'input', 'focus', function($evt){ + var _p = $(this), _ins = Valid.getInstance(), _v = ( _p.val()||'').trim(); + if( _p.attr( 'type' ) ) return; + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p ] ); + !_v && Valid.setValid( _p ); + }); + /** * 响应表单子对象的 change 事件, 触发事件时, 检查并显示错误或正确的视觉效果 * @private */ - $(document).delegate( 'select, input[type=file], input[type=checkbox], input[type=radio]', 'change', function($evt){ - Valid.check( $(this) ); + $(document).delegate( 'select, input[type=file], input[type=checkbox], input[type=radio]', 'change', function($evt, _ignore){ + if( _ignore ) return; + var _p = $(this), _ins = Valid.getInstance(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + Valid.checkTimeout( _p ); }); /** * 响应表单子对象的 focus 事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息 @@ -2643,44 +3117,49 @@ */ $(document).delegate( 'input[type=text], input[type=password], textarea' +', select, input[type=file], input[type=checkbox], input[type=radio]', 'focus', function($evt){ - var _sp = $(this), _v = _sp.val().trim(); - Valid.getInstance().trigger( Model.FOCUS_MSG, [ $(this) ] ); - !_v && Valid.setValid( _sp ); + var _p = $(this), _ins = Valid.getInstance(), _v = ( _p.val() || '' ).trim(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p ] ); + !_v && Valid.setValid( _p ); }); /** * 响应表单子对象的 blur事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息 * @private */ $(document).delegate( 'select, input[type=file], input[type=checkbox], input[type=radio]', 'blur', function($evt){ - Valid.getInstance().trigger( Model.FOCUS_MSG, [ $(this), true ] ); + var _p = $(this), _ins = Valid.getInstance(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p, true ] ); }); $(document).delegate( 'input[type=hidden][subdatatype]', 'change', function( _evt ){ - var _sp = $(this), _isHidden = false, _tmp; - _sp.is( '[subdatatype]' ) && ( _isHidden = /hidden/i.test( _sp.attr('subdatatype') ) ); - if( _sp.data('HID_CHANGE_CHECK') ){ - _tmp = new Date().getTime() - _sp.data('HID_CHANGE_CHECK') ; + var _p = $(this), _ins = Valid.getInstance(), _isHidden = false, _tmp; + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _p.is( '[subdatatype]' ) && ( _isHidden = /hidden/i.test( _p.attr('subdatatype') ) ); + if( _p.data('HID_CHANGE_CHECK') ){ + _tmp = new Date().getTime() - _p.data('HID_CHANGE_CHECK') ; if( _tmp < 50 ){ return; } } - if( !_sp.val() ){ - //Valid.setValid( _sp ); + if( !_p.val() ){ + //Valid.setValid( _p ); return; } - _sp.data('HID_CHANGE_CHECK', new Date().getTime() ); - JC.log( 'hidden val', new Date().getTime(), _sp.val() ); - Valid.check( _sp ); + _p.data('HID_CHANGE_CHECK', new Date().getTime() ); + //JC.log( 'hidden val', new Date().getTime(), _p.val() ); + Valid.checkTimeout( $(this) ); }); /** - * 初始化 subdatatype = datavalid 相关事件 + * 初始化 [ subdatatype = datavalid | exdatatype = datavalid ] 相关事件 */ - $(document).delegate( 'input[type=text][subdatatype]', 'keyup', function( _evt ){ - var _sp = $(this); + $(document).delegate( 'input[type=text][subdatatype], input[type=text][exdatatype]', 'keyup', function( _evt ){ + var _sp = $(this), _isEx; - var _isDatavalid = /datavalid/i.test( _sp.attr('subdatatype') ); + var _isDatavalid = /datavalid/i.test( _sp.attr('exdatatype') || _sp.attr('subdatatype') ); if( !_isDatavalid ) return; if( _sp.prop('disabled') || _sp.prop('readonly') ) return; + _sp.attr( 'exdatatype' ) && ( _isEx = true ); Valid.dataValid( _sp, false, true ); var _keyUpCb; @@ -2692,11 +3171,18 @@ if( _sp.data( 'DataValidInited' ) ) return; _sp.data( 'DataValidInited', true ); _sp.data( 'DataValidCache', {} ); + !_sp.is( '[datavalidNoCache]' ) && _sp.attr( 'datavalidNoCache', true ); + + //JC.log( JC.f.parseBool( _sp.attr( 'datavalidNoCache' ) ) ); - _sp.on( 'DataValidUpdate', function( _evt, _v ){ + _sp.on( 'DataValidUpdate', function( _evt, _v, _data ){ var _tmp, _json; - if( !_sp.data( 'DataValidCache') ) return; - _json = _sp.data( 'DataValidCache' )[ _v ]; + if( JC.f.parseBool( _sp.attr( 'datavalidNoCache' ) ) ){ + _json = _data; + }else{ + if( !_sp.data( 'DataValidCache') ) return; + _json = _sp.data( 'DataValidCache' )[ _v ]; + } if( !_json ) return; _v === 'suchestest' && ( _json.data.errorno = 0 ); @@ -2707,11 +3193,20 @@ ; }); - _sp.on( 'blur', function( _evt, _ignoreProcess ){ - JC.log( 'datavalid', new Date().getTime() ); - if( _ignoreProcess ) return; - var _v = _sp.val().trim(), _tmp, _strData, _url = _sp.attr('datavalidurl'); + _sp.on( 'DataValidVerify', function( _evt, _ignoreStatus, _cb ){ + var _v = _sp.val().trim(), _tmp, _strData + , _url = _sp.attr('datavalidurl') + , _datavalidCheckCallback; if( !_v ) return; + + _sp.attr('datavalidCheckCallback') + && ( _datavalidCheckCallback = window[ _sp.attr('datavalidCheckCallback') ] ) + ; + if( _datavalidCheckCallback ){ + innerDone( _datavalidCheckCallback.call( _sp ) ); + return; + } + if( !_url ) return; _sp.data( 'DataValidTm' ) && clearTimeout( _sp.data( 'DataValidTm') ); @@ -2719,8 +3214,13 @@ , setTimeout( function(){ _v = _sp.val().trim(); if( !_v ) return; - if( !_sp.data('JCValidStatus') ) return; - _url = printf( _url, _v ); + _v = JC.f.encoder( _sp )( _v ); + + if( !_ignoreStatus ){ + if( !_sp.data('JCValidStatus') ) return; + } + + _url = JC.f.printf( _url, _v ); _sp.attr('datavalidUrlFilter') && ( _tmp = window[ _sp.attr('datavalidUrlFilter') ] ) && ( _url = _tmp.call( _sp, _url ) ) @@ -2729,16 +3229,53 @@ _sp.trigger( 'DataValidUpdate', _v ); return; } - $.get( _url ).done( function( _d ){ - _strData = _d; - try{ _d = $.parseJSON( _d ); } catch( ex ){ _d = { errorno: 1 }; } - _sp.data( 'DataValidCache' )[ _v ] = { 'key': _v, data: _d, 'text': _strData }; - _sp.trigger( 'DataValidUpdate', _v ); - }); + var _ajaxType = 'get', _requestData; + _sp.attr( 'datavalidAjaxType' ) && ( _ajaxType = _sp.attr( 'datavalidAjaxType' ) || _ajaxType ); + if( _sp.attr( 'datavalidRequestData' ) ){ + try{ _requestData = eval( '(' + _sp.attr('datavalidRequestData') + ')' ); }catch( ex ){} + } + _requestData = _requestData || {}; + + if( _ajaxType.toLowerCase() == 'post' ){ + $.post( _url, _requestData ).done( innerDone ); + }else{ + $.get( _url, _requestData ).done( innerDone ); + } }, 151) ); - + + function innerDone( _d ){ + _strData = _d; + if( typeof _d == 'string' ){ + try{ _d = $.parseJSON( _d ); } catch( ex ){ _d = { errorno: 1 }; } + } + + var _data = { 'key': _v, data: _d, 'text': _strData }; + + !JC.f.parseBool( _sp.attr( 'datavalidNoCache' ) ) + && ( _sp.data( 'DataValidCache' )[ _v ] = _data ); + + _sp.trigger( 'DataValidUpdate', [ _v, _data ] ); + + _cb && _cb.call( _sp, _data ); + } + + }); + + _sp.on( 'blur', function( _evt, _ignoreProcess ){ + //JC.log( 'datavalid', new Date().getTime() ); + if( _ignoreProcess ) return; + _sp.trigger( 'DataValidVerify' ); }); }); -}(jQuery)); + return JC.Valid; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/comps/Valid/_demo/checkbox.html b/comps/Valid/_demo/checkbox.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/data/handler.php b/comps/Valid/_demo/data/handler.php old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/errorAbort_form.html b/comps/Valid/_demo/errorAbort_form.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/form.autocomplete.html b/comps/Valid/_demo/form.autocomplete.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/hidden_valid.html b/comps/Valid/_demo/hidden_valid.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/ignore_test.html b/comps/Valid/_demo/ignore_test.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/index.php b/comps/Valid/_demo/index.php old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/radio.html b/comps/Valid/_demo/radio.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/setValid_setError.html b/comps/Valid/_demo/setValid_setError.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/simple_form.html b/comps/Valid/_demo/simple_form.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/subdatatype_alternative.html b/comps/Valid/_demo/subdatatype_alternative.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/subdatatype_datavalid.html b/comps/Valid/_demo/subdatatype_datavalid.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/subdatatype_reconfirm.html b/comps/Valid/_demo/subdatatype_reconfirm.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/subdatatype_reqtarget.html b/comps/Valid/_demo/subdatatype_reqtarget.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/subdatatype_unique.html b/comps/Valid/_demo/subdatatype_unique.html old mode 100644 new mode 100755 diff --git a/comps/Valid/_demo/subdatatype_unique_and_alternative.html b/comps/Valid/_demo/subdatatype_unique_and_alternative.html old mode 100644 new mode 100755 diff --git a/comps/Valid/index.php b/comps/Valid/index.php old mode 100644 new mode 100755 diff --git a/comps/Valid/res/default/images/error.gif b/comps/Valid/res/default/images/error.gif old mode 100644 new mode 100755 diff --git a/comps/Valid/res/default/images/ok.gif b/comps/Valid/res/default/images/ok.gif old mode 100644 new mode 100755 diff --git a/comps/Valid/res/default/images/warning.gif b/comps/Valid/res/default/images/warning.gif old mode 100644 new mode 100755 diff --git a/comps/Valid/res/default/style.css b/comps/Valid/res/default/style.css old mode 100644 new mode 100755 index 98c977a8b..7546c106c --- a/comps/Valid/res/default/style.css +++ b/comps/Valid/res/default/style.css @@ -7,7 +7,7 @@ em.error, em.errormsg, em.validmsg, em.focusmsg { } textarea.error, input.error, select.error { - background-color: #F0DC82;!important; + background-color: #F0DC82!important; } em.error, em.errormsg { diff --git a/comps/Valid/res/default/style.html b/comps/Valid/res/default/style.html old mode 100644 new mode 100755 diff --git a/comps/index.php b/comps/index.php old mode 100644 new mode 100755 diff --git a/deploy/JC.js b/deploy/JC.js new file mode 100755 index 000000000..8a2daec84 --- /dev/null +++ b/deploy/JC.js @@ -0,0 +1 @@ +window.Bizs=window.Bizs||{};(function(b){if(window.JC&&typeof JC.compsDir!="undefined"){return}window.JC&&JC.f&&JC.f.backward(1);window.JC=window.JC||{};var a={PATH:"/js",compsDir:"/comps/",bizsDir:"/bizs/",pluginsDir:"/plugins/",debug:false,use:function(l,o){if(!l){return}o&&b(document).ready(function(p){o(p)});var c=this,e=[],j=b.trim(l).split(/[\s]*?,[\s]*/),m=/\:\/\//,g=/(\\)\1|(\/)\2/g,h=/[\/\\]/,d=/^comps\./,k=/^Bizs\./,n=/^bizs\./,f=/^Plugins\./,i=/^plugins\./;j=JC._usePatch(j,"Form","AutoSelect");j=JC._usePatch(j,"Form","AutoChecked");j=JC._usePatch(j,"Form","FormFillUrl");j=JC._usePatch(j,"AjaxUpload","Panel");b.each(j,function(t,r){var q=!h.test(r),s,p=/^\//.test(r);if(q&&window.JC[r]){return}if(JC.FILE_MAP&&JC.FILE_MAP[r]){e.push(JC.FILE_MAP[r]);return}s=r;if(q){if(k.test(s)){s=printf("{0}{1}{2}/{2}.js",JC.PATH,JC.bizsDir,r.replace(k,""))}else{if(n.test(s)){s=printf("{0}{1}{2}.js",JC.PATH,JC.bizsDir,r.replace(n,""))}else{if(f.test(s)){s=printf("{0}{1}{2}/{2}.js",JC.PATH,JC.pluginsDir,r.replace(f,""))}else{if(i.test(s)){s=printf("{0}{1}{2}.js",JC.PATH,JC.pluginsDir,r.replace(i,""))}else{if(d.test(s)){s=printf("{0}{1}{2}.js",JC.PATH,JC.compsDir,r.replace(d,""))}else{s=printf("{0}{1}{2}/{2}.js",JC.PATH,JC.compsDir,r.replace(/^JC\./,""))}}}}}}!q&&!p&&(s=printf("{0}/{1}",JC.PATH,r));if(/\:\/\//.test(s)){s=s.split("://");s[1]=b.trim(s[1].replace(g,"$1$2"));s=s.join("://")}else{s=b.trim(s.replace(g,"$1$2"))}if(JC._USE_CACHE[s]){return}JC._USE_CACHE[s]=1;e.push(s)});!JC.enableNginxStyle&&JC._writeNormalScript(e);JC.enableNginxStyle&&JC._writeNginxScript(e)},_usePatch:function(m,n,g){var f,e,d,c,h;for(f=0,e=m.length;fm){e.push([])}e[e.length-1].push(d[g])}b.each(e,function(j,i){if(!i.length){return}document.write(printf(' + */ + window.Bizs.CommonModify = CommonModify; + + function CommonModify( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( CommonModify._instance ){ + //_selector && _selector.length && CommonModify._instance.process( _selector ); + return CommonModify._instance; + } + + if( !CommonModify._instance ){ + CommonModify._instance = this; + } + + this._model = new CommonModify.Model( _selector ); + this._view = new CommonModify.View( this._model ); + + this._init(); + + _selector && _selector.length && this.process( _selector ); + } + + CommonModify.prototype = { + _beforeInit: + function(){ + JC.log( 'CommonModify _beforeInit', new Date().getTime() ); + } + , _initHanlderEvent: + function(){ + var _p = this; + + _p.on('add', function( _evt, _newItem, _boxParent ){ + _p._model.cmaddcallback() + && _p._model.cmaddcallback().call( _p.selector(), _p, _newItem, _p._model.cmitem(), _boxParent ); + }); + + _p.on('del', function( _evt, _newItem, _boxParent ){ + _p._model.cmdelcallback() + && _p._model.cmdelcallback().call( _p.selector(), _p, _boxParent ); + }); + + _p.on('done', function( _evt, _newItem, _boxParent ){ + _p._model.cmdonecallback() + && _p._model.cmdonecallback().call( _p.selector(), _p, _boxParent ); + }); + + return _p; + + } + , _inited: + function(){ + JC.log( 'CommonModify _inited', new Date().getTime() ); + } + /** + * 获取 显示 CommonModify 的触发源选择器, 比如 a 标签 + * @method selector + * @return selector + */ + , selector: function(){ return this._model.selector(); } + /** + * 使用 jquery on 绑定事件 + * @method {string} on + * @param {string} _evtName + * @param {function} _cb + * @return CommonModifyInstance + */ + , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;} + /** + * 使用 jquery trigger 绑定事件 + * @method {string} trigger + * @param {string} _evtName + * @return CommonModifyInstance + */ + , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;} + + , process: + function( _selector ){ + if( !( _selector && ( _selector = $(_selector) ).length ) ) return this; + /** + * update current selector + */ + this._model.selector( _selector ); + + switch( this._model.action() ){ + case 'del': this._view.del(); break; + default: this._view.add(); break; + } + } + , cmitem: function(){ return this._model.cmitem(); } + } + /** + * 获取或设置 CommonModify 的实例 + * @method getInstance + * @param {selector} _selector + * @static + * @return {CommonModify instance} + */ + CommonModify.getInstance = + function(){ + !CommonModify._instance + && ( CommonModify._instance = new CommonModify() ); + return CommonModify._instance; + }; + CommonModify._instance = null; + /** + * 判断 selector 是否可以初始化 CommonModify + * @method isCommonModify + * @param {selector} _selector + * @static + * @return bool + */ + CommonModify.isCommonModify = + function( _selector ){ + var _r; + _selector + && ( _selector = $(_selector) ).length + && ( _r = _selector.is( '[CommonModifylayout]' ) ); + return _r; + }; + + CommonModify.doneCallback = null; + CommonModify.tplFilterCallback = null; + CommonModify.beforeAddCallback = null; + CommonModify.addCallback = null; + CommonModify.beforeDelCallabck = null; + CommonModify.delCallback = null; + + BaseMVC.buildModel( CommonModify ); + + CommonModify.Model.prototype = { + init: + function(){ + return this; + } + + , selector: + function( _setter ){ + _setter && ( _setter = $( _setter ) ) && ( this._selector = _setter ); + return this._selector; + } + , layout: function(){} + + , action: + function(){ + var _r = 'add', _tmp; + ( _tmp = this.selector().attr( 'cmaction' ) ) && ( _r = _tmp.toLowerCase() ); + return _r; + } + + , cmtemplate: + function(){ + var _r = '', _tmp; + _tmp = JC.f.parentSelector( this.selector(), this.selector().attr('cmtemplate') ); + !( _tmp && _tmp.length ) && ( _tmp = JC.f.parentSelector( this.selector(), this.selector().attr('cmtpl') ) ); + + this.selector() + && ( _tmp && _tmp.length ) + && ( _r = JC.f.scriptContent( _tmp ) ) + ; + return _r; + } + + , cmdonecallback: + function(){ + var _r = CommonModify.doneCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('cmdonecallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , cmtplfiltercallback: + function(){ + var _r = CommonModify.tplFilterCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('cmtplfiltercallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + + return _r; + } + + , cmAddedItemsSelector: + function(){ + var _r = this.selectorProp('cmAddedItemsSelector'); + return _r; + } + + , cmMaxItems: + function(){ + var _r = this.intProp( 'cmMaxItems' ); + return _r; + } + + , cmOutRangeMsg: + function(){ + var _r = JC.f.printf( this.attrProp( 'cmOutRangeMsg' ) ||'最多只能上传 {0}个文件!', this.cmMaxItems() ); + return _r; + } + + , cmaddcallback: + function(){ + var _r = CommonModify.addCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('cmaddcallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , cmdelcallback: + function(){ + var _r = CommonModify.delCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('cmdelcallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , cmbeforeaddcallabck: + function(){ + var _r = CommonModify.beforeAddCallback, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('cmbeforeaddcallabck') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , cmbeforedelcallback: + function(){ + var _r = CommonModify.beforeDelCallabck, _tmp; + + this.selector() + && ( _tmp = this.selector().attr('cmbeforedelcallback') ) + && ( _tmp = window[ _tmp ] ) + && ( _r = _tmp ) + ; + + return _r; + } + + , cmitem: + function(){ + var _r, _tmp; + this.selector() + && ( _tmp = this.selector().attr('cmitem') ) + && ( _r = JC.f.parentSelector( this.selector(), _tmp ) ) + ; + return _r; + } + + , cmappendtype: + function(){ + var _r = this.selector().attr('cmappendtype') || 'after'; + return _r; + } + }; + + BaseMVC.buildView( CommonModify ); + + CommonModify.View.prototype = { + init: + function() { + return this; + } + + , add: + function(){ + JC.log( 'Bizs.CommonModify view add', new Date().getTime() ); + var _p = this + , _tpl = _p._model.cmtemplate() + , _item = _p._model.cmitem() + , _boxParent = _item.parent() + , _newItem + , _maxItems = _p._model.cmMaxItems() + , _addedItems = _p._model.cmAddedItemsSelector() + ; + + if( _maxItems && _addedItems && _addedItems.length ){ + if( _addedItems.length >= _maxItems ){ + var _msg = _p._model.cmOutRangeMsg(); + if( JC.msgbox ){ + JC.msgbox( _msg, _p._model.selector(), 2 ); + }else{ + alert( _msg ); + } + return; + } + } + + if( _p._model.cmbeforeaddcallabck() + && _p._model.cmbeforeaddcallabck().call( _p._model.selector(), _item, _boxParent ) === false + ) return; + + _p._model.cmtplfiltercallback() + && ( _tpl = _p._model.cmtplfiltercallback().call( _p._model.selector(), _tpl, _item, _boxParent ) ); + + _tpl = _tpl.replace( /<([\d]+)>/g, "{$1}" ); + + JC.log( '_item:', _item, _item.length ); + + if( !( _tpl && _item && _item.length ) ) return; + _newItem = $( _tpl ); + + switch( _p._model.cmappendtype() ){ + case 'appendTo': _newItem.appendTo( _item ); break; + case 'before': _item.before( _newItem ); break; + default: _item.after( _newItem ); break; + } + + JC.f.autoInit && JC.f.autoInit( _newItem ); + + $( _p ).trigger( 'TriggerEvent', [ 'add', _newItem, _boxParent ] ); + $( _p ).trigger( 'TriggerEvent', [ 'done', _newItem, _boxParent ] ); + } + + , del: + function(){ + JC.log( 'Bizs.CommonModify view del', new Date().getTime() ); + var _p = this + , _item = _p._model.cmitem() + , _boxParent = _item.parent() + ; + + if( _p._model.cmbeforedelcallback() + && _p._model.cmbeforedelcallback().call( _p._model.selector(), _item, _boxParent ) === false + ) return; + + _item && _item.length && _item.remove(); + + $( _p ).trigger( 'TriggerEvent', [ 'del', _item, _boxParent ] ); + $( _p ).trigger( 'TriggerEvent', [ 'done', _item, _boxParent ] ); + } + }; + + BaseMVC.build( CommonModify ); + + $(document).delegate( 'a.js_autoCommonModify, button.js_autoCommonModify' + + ', a.js_bizsCommonModify, button.js_bizsCommonModify', 'click', function( _evt ){ + var _p = $( this ); + _p.prop( 'nodeName' ).toLowerCase() == 'a' && _evt.preventDefault(); + CommonModify.getInstance().process( _p ); + }); + + return Bizs.CommonModify; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/deploy/bizs/CommonModify/index.php b/deploy/bizs/CommonModify/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/CommonModify/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/CustomColumn/CustomColumn.js b/deploy/bizs/CustomColumn/CustomColumn.js new file mode 100755 index 000000000..942b3e1ab --- /dev/null +++ b/deploy/bizs/CustomColumn/CustomColumn.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.Panel","JC.Valid","Bizs.FormLogic"],function(){if(JC.use){!JC.Panel&&JC.use("JC.Panel");!JC.Valid&&JC.use("JC.Valid");!Bizs.FormLogic&&JC.use("Bizs.FormLogic")}var f=$(document),e=$(window);Bizs.CustomColumn=d;function d(g){g&&(g=$(g));if(JC.BaseMVC.getInstance(g,d)){return JC.BaseMVC.getInstance(g,d)}JC.BaseMVC.getInstance(g,d,this);this._model=new d.Model(g);this._view=new d.View(this._model);this._init();JC.log(d.Model._instanceName,"all inited",new Date().getTime())}d.init=function(g){var h=[];g=$(g||document);if(g.length){if(g.hasClass("js_bizCustomColumn")){h.push(new d(g))}else{g.find("a.js_bizCustomColumn, button.js_bizCustomColumn").each(function(){h.push(new d(this))})}}return h};d.ID_COUNT=1;window.BizsCustomColumnFormDoneCallback=function(g,j,i){var h=$(this),k;if(g.errorno){k=JC.alert(g.errmsg||"操作失败, 请重新尝试!",j,1)}else{k=JC.msgbox(g.errmsg||"操作成功",j,0,function(){JC.f.reloadPage(i._model.formAjaxDoneAction()||JC.f.urlDetect("URL"))})}};window.BizsCustomColumnFormAfterProcessCallback=function c(h,k){var j=$(this),n=JC.f.parentSelector(j,"div.UPanel"),i;if(!n){return}n=JC.Panel.getInstance(n);if(!n){return}i=n.CustomColumnIns;if(!i){return}var g=i._model.saveSelector(),l,m;if(g&&g.length){l=[];m=n.selector().find("input.js_typeItem:checked");i.trigger("update_selected_status");if(m.lengthi._model.maxCol()){return false}m.each(function(){l.push($(this).val().trim())});g.val(l.join(","))}};JC.BaseMVC.build(d);JC.f.extendObject(d.prototype,{_beforeInit:function(){JC.log("CustomColumn _beforeInit",new Date().getTime())},_initHanlderEvent:function(){var g=this;g.on("inited",function(){});g.on("showPopup",function(){g._view.showPopup()});g.on("hidePopup",function(){g.view.hidePopup()});g.on("panel_inited",function(h,i){g._model.currentPanel(i);i.CustomColumnIns=g});g.on("update_default",function(h,i){i.selector().find("input.js_typeItem").each(function(){var j=$(this),k=g._model.data()[j.attr("data-topIndex")].content[j.attr("data-subIndex")];if(k.isdefault){j.prop("checked",true)}else{j.prop("checked",false)}})});g.on("update_custom",function(h,i){i.selector().find("input.js_typeItem").each(function(){var j=$(this),k=g._model.data()[j.attr("data-topIndex")].content[j.attr("data-subIndex")];if(k.ison){j.prop("checked",true)}else{j.prop("checked",false)}})});g.on("update_selected_status",function(){var i=g._model.currentPanel(),h,j=i.find("em.js_bccErrEm");h=i.selector().find("input.js_typeItem:checked");if(h.lengthg._model.maxCol()){j.html("最多只能选择"+g._model.maxCol()+"个数据列!").show();return}j.hide()})},_inited:function(){JC.log("CustomColumn _inited",new Date().getTime());this.trigger("inited")},show:function(){this.trigger("showPopup")},hide:function(){this.trigger("hidePopup")},close:function(){this.trigger("hidePopup")}});d.Model._instanceName="JCCustomColumn";JC.f.extendObject(d.Model.prototype,{init:function(){JC.log("CustomColumn.Model.init:",new Date().getTime());this._gid="CustomColumnIns_"+d.ID_COUNT;d.ID_COUNT++},currentPanel:function(g){typeof g!="undefined"&&(this._currentPanel=g);return this._currentPanel},gid:function(){return this._gid},url:function(){var g=this.attrProp("data-query")||this.attrProp("data-url")||"?";return g},id:function(){var g=this.attrProp("pagename")||this.attrProp("data-id")||"";return g},name:function(){var g=this.attrProp("data-name")||"selectedItem";return g},data:function(){if(!this._data){this.is("[data-data]")&&(this._data=this.windowProp("data-data"));this.is("[data-scriptData]")&&(this._data=this.scriptDataProp("data-scriptData"))}return this._data},typeSelector:function(){return this.attrProp("data-typeSelector")||"js_selectType"},saveSelector:function(){if(this.is("[data-saveSelector]")){return this.selectorProp("data-saveSelector")}else{return this.selector().find("input.js_saveSelector")}},maxCol:function(){return this.intProp("data-maxCol")||20},minCol:function(){return this.intProp("data-minCol")||1},tpl:function(){if(!this._tpl){this.is("[data-tpl]")&&(this._tpl=this.scriptTplProp("data-tpl"))}return this._tpl},formDoneCallback:function(){var g="BizsCustomColumnFormDoneCallback";this.attrProp("data-formDoneCallback")&&this.windowProp("data-formDoneCallback")&&(g=this.attrProp("data-formDoneCallback"));return g},formAfterProcessCallback:function(){var g="BizsCustomColumnFormAfterProcessCallback";this.attrProp("data-formAfterProcessCallback")&&this.windowProp("data-formAfterProcessCallback")&&(g=this.attrProp("data-formAfterProcessCallback"));return g},isDefault:function(){var h=true,g=this;$.each(g.data(),function(j,i){$.each(i.content,function(k,l){if((l.ison&&!l.isdefault)||(!(l.ison||l.dftchk)&&l.isdefault)){return h=false}});if(!h){return false}});return h}});JC.f.extendObject(d.View.prototype,{init:function(){JC.log("CustomColumn.View.init:",new Date().getTime())},showPopup:function(){var g=this,i=g._model.tpl(),k,h=[],j=g._model.isDefault();$.each(g._model.data(),function(m,l){h.push("
        ");h.push("
        ");l.name&&(h.push(l.groupName));h.push("
        ");h.push("
        ");if(l.content){h.push("
          ");$.each(l.content,function(p,q){if(!q){return}var r="",o="",n="";q.isdefault&&(n="js_isDefaultItem");if(j){q.isdefault&&(r=' checked="checked" ')}else{q.ison&&(r=' checked="checked" ')}if(q.isdefault&&q.dftchk){(r+=' disabled="disabled" ');o=''}h.push(JC.f.printf('
        • ',o,q.name,q.title,g._model.name(),r,n,m,p))});h.push("
        ")}h.push("
        ");h.push("
        ")});i=JC.f.printKey(i,{id:g._model.id(),url:g._model.url(),content:h.join(""),formDoneCallback:g._model.formDoneCallback(),formAfterProcessCallback:g._model.formAfterProcessCallback()});k=JC.Dialog(i);g.trigger("panel_inited",[k]);if(j){k.find("input.js_defaultType").prop("checked",true)}else{k.find("input.js_customType").prop("checked",true)}k.find("input.js_customType").on("click",function(l){if(g._model.isDefault()){return false}g.trigger("update_custom",[k]);g.trigger("update_selected_status")});k.selector().delegate("input.js_selectType","change",function(){var l=$(this);if(l.val()!="default"){return}g.trigger("update_default",[k]);g.trigger("update_selected_status")});k.selector().delegate("input.js_typeItem","change",function(){var l=$(this),m=g._model.data()[l.attr("data-topIndex")].content[l.attr("data-subIndex")];if(l.prop("checked")){m.ison=true}else{m.ison=false}if(g._model.isDefault()){k.find("input.js_defaultType").prop("checked",true)}else{k.find("input.js_customType").prop("checked",true)}g.trigger("update_selected_status")})}});f.ready(function(){$(document).delegate("button.js_bizCustomColumn, a.js_bizCustomColumn","click",function(){var g=$(this),h=JC.BaseMVC.getInstance(g,d);if(!h){h=new d(g)}h&&h.show()})});return Bizs.CustomColumn})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/CustomColumn/index.php b/deploy/bizs/CustomColumn/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/deploy/bizs/CustomColumn/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/CustomColumn/res/default/style.css b/deploy/bizs/CustomColumn/res/default/style.css new file mode 100755 index 000000000..f62c1f794 --- /dev/null +++ b/deploy/bizs/CustomColumn/res/default/style.css @@ -0,0 +1 @@ +div.bcc_Panel-Asearch *{font-size:12px !important;font-family:Tahoma,Helvetica,Arial,'宋体',sans-serif}.bcc_UPanel-ft{height:46px;border-top:1px solid #efefef;background:#fafafa}.bcc_UPanel-btn{float:right;margin:7px 19px 0 0 !important}.bcc_Panel-flist{width:610px}.bcc_Panel-flist-con .frm-list{padding:10px 20px}div.UPanel .bcc_Panel-flist-con .bcc_data-box2{margin:0 20px 20px}.bcc_UPanel-key{width:880px}.bcc_UPanel-txt{width:310px}.bcc_UPanel-txt .Panel-flist-con{text-align:center;padding:20px;line-height:1.8}.bcc_Panel-Asearch{width:700px}.bcc_Asearch-con{padding:0 20px !important;min-height:100px}.bcc_Asearch-con dl{clear:both;padding:10px 0;color:#666}.bcc_Asearch-con dt{float:left;font-weight:bold;width:60px;padding:3px 0;display:none}.bcc_Asearch-con dd{overflow:hidden;zoom:1}.bcc_Asearch-con li{float:left;width:165px;height:20px;overflow:hidden;padding:3px 0}.bcc_Asearch-con li.cur{color:#999}div.UPanel .bcc_Diylist-hd{height:35px;line-height:35px;border-bottom:1px solid #edecec;padding:0 20px;background:#f0f0f0}div.UPanel .bcc_Diylist-hd span{font-size:14px !important;padding-right:10px}.bcc_Diylist-hd .cur{font-weight:bold}.bcc_Diylist-hd label{margin-right:12px} \ No newline at end of file diff --git a/deploy/bizs/CustomColumn/res/index.php b/deploy/bizs/CustomColumn/res/index.php new file mode 100755 index 000000000..8282e3fea --- /dev/null +++ b/deploy/bizs/CustomColumn/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/DMultiDate/DMultiDate.js b/deploy/bizs/DMultiDate/DMultiDate.js new file mode 100755 index 000000000..8de82e8ad --- /dev/null +++ b/deploy/bizs/DMultiDate/DMultiDate.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC","JC.Calendar"],function(){window.Bizs.DMultiDate=c;function c(d){if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.prototype={_beforeInit:function(){this._model.mddateEl().attr("ignoreInitCalendarDate","true").data("ignoreInitCalendarDate",true);c.Model._defaultMaxvalue=this._model.mddateEl().eq(0).attr("maxvalue")||"";c.Model._defaultMinvalue=this._model.mddateEl().eq(1).attr("minvalue")||""},_initHanlderEvent:function(){var d=this,m=c.Model._inscount++,k="Bizs.DMultiDate_update_start"+m,p="Bizs.DMultiDate_update_end"+m,o="Bizs.DMultiDate_show_start"+m,h="Bizs.DMultiDate_show_end"+m,g="Bizs.DMultiDate_hide_start"+m,r="Bizs.DMultiDate_hide_end"+m,j="Bizs.DMultiDate_layoutchange_start"+m,q="Bizs.DMultiDate_layoutchange_end"+m,n="Bizs.DMultiDate_clear_start"+m,l="Bizs.DMultiDate_clear_end"+m,f="parsedateweek",i="parsedatemonth",s="parsedateseason",e="parsedateyear";d._initDefaultData();d._model.calendarTypeEl().on("change",function(u,w){var t=$(this),v=t.val();if(v==="day"){v="date"}d._model.updatemddateElProp(v);if(v=="custom"||v=="customized"){d._model.lastIptBox().show()}else{d._model.lastIptBox().hide()}if(w){return}setTimeout(function(){d._model.setmddate("");d._model.setHiddenStartdate("");d._model.setHiddenEnddate("");Calendar.pickDate(d._model.mddateEl().eq(0)[0])},10)});d._model.mddateEl().eq(0).attr("calendarupdate",k).attr("calendarshow",o).attr("calendarhide",g).attr("calendarlayoutchange",j).attr("calendarclear",n);d._model.mddateEl().eq(1).attr("calendarupdate",p).attr("calendarshow",h).attr("calendarhide",r).attr("calendarlayoutchange",q).attr("calendarclear",l);window[k]=function(x,B,z){console.log("_updatestartcb",JC.f.formatISODate(x),JC.f.formatISODate(B));var t=d._model.mddateEl(),v=d._model.calendarType(),u=JC.f.cloneDate(x),w=c.Model._defaultMaxvalue,y;x=JC.f.formatISODate(x);w&&(w=JC.f.dateDetect(w));switch(v){case"week":y=d._model.weekrange();y&&u.setDate(u.getDate()+(y-1)*7+6);break;case"month":y=d._model.monthrange();if(y){u.setMonth(u.getMonth()+(y-1));u.setDate(JC.f.maxDayOfMonth(u))}break;case"season":y=d._model.seasonrange();if(y){u.setMonth(u.getMonth()+(y-1)*3+2);u.setDate(JC.f.maxDayOfMonth(u))}break;case"year":y=d._model.yearrange();y&&u.setYear(u.getFullYear()+y-1);break;case"custom":case"customized":y=d._model.dayrange();y&&u.setDate(u.getDate()+y-1);break;case"date":default:y=d._model.dayrange();y&&u.setDate(u.getDate()+y-1)}if(y){if(w&&(w.getTime()<=u.getTime())){u=w}t.eq(1).attr("maxvalue",JC.f.formatISODate(u)).attr("minvalue",x).attr("defaultdate",x)}d._model.setHiddenStartdate(x);var A=0;$.each(d._model.mddateEl(),function(D,C){if(!$(C).is(":hidden")){A++}});if(A==1){d._model.setHiddenEnddate(JC.f.formatISODate(B))}else{if(!d._model.mddateEl().eq(1).is("reqmsg")&&!d._model.hiddenEnddateEl().val()){d._model.setHiddenEnddate(JC.f.formatISODate(B))}}};window[p]=function(v,B,y){var t=d._model.mddateEl(),u=d._model.calendarType(),A=new Date(v.getFullYear(),v.getMonth(),v.getDate()),z=c.Model._defaultMinvalue,x,w=new Date(v.getFullYear(),v.getMonth(),v.getDate());z&&(z=JC.f.dateDetect(z));switch(u){case"week":x=d._model.weekrange();x&&A.setDate(A.getDate()-(x-1)*7);break;case"month":x=d._model.monthrange();x&&(A.setMonth(A.getMonth()-(x-1))&&w.setDate(JC.f.maxDayOfMonth(v)));break;case"season":x=d._model.seasonrange();x&&(A.setMonth(A.getMonth()-(x-1)*3));break;case"year":x=d._model.yearrange();x&&(A.setYear(A.getFullYear()-x+1));break;case"custom":case"customized":x=d._model.dayrange();x&&A.setDate(A.getDate()-x+1);break;case"date":default:x=d._model.dayrange();x&&A.setDate(A.getDate()-x+1)}if(x){if(z&&z.getTime()>A.getTime()){A=z}A=JC.f.formatISODate(A);t.eq(0).attr("maxvalue",JC.f.formatISODate(w)).attr("minvalue",A).attr("defaultdate",A)}d._model.setHiddenEnddate(JC.f.formatISODate(B));if(!d._model.mddateEl().eq(0).is("reqmsg")&&!d._model.hiddenStartdateEl().val()){d._model.setHiddenStartdate(JC.f.formatISODate(v))}};window[o]=function(){var t=$("body > div.UXCCalendar:visible");t.length&&JC.Tips&&JC.Tips.init(t.find("[title]"))};window[h]=function(){var t=$("body > div.UXCCalendar:visible");t.length&&JC.Tips&&JC.Tips.init(t.find("[title]"))};window[g]=function(){JC.Tips&&JC.Tips.hide();if(!d._model.hiddendateiso()){d._model.updateHiddenStartdate()}};window[r]=function(){JC.Tips&&JC.Tips.hide();if(!d._model.hiddendateiso()){d._model.updateHiddenEnddate()}};window[j]=function(){JC.Tips&&JC.Tips.hide();var t=$("body > div.UXCCalendar:visible");t.length&&JC.Tips&&JC.Tips.init(t.find("[title]"))};window[q]=function(){JC.Tips&&JC.Tips.hide();var t=$("body > div.UXCCalendar:visible");t.length&&JC.Tips&&JC.Tips.init(t.find("[title]"))};window[n]=function(u,v){var t=d._model.mddateEl().eq(1),x=c.Model._defaultMaxvalue,w=c.Model._defaultMinvalue;if(x){t.attr("maxvalue",x).attr("defaultdate",x)}else{t.removeAttr("maxvalue").removeAttr("defaultdate")}if(w){t.attr("minvalue",w)}else{t.removeAttr("minvalue")}};window[l]=function(){var t=d._model.mddateEl().eq(0),v=c.Model._defaultMaxvalue,u=c.Model._defaultMinvalue;if(v){t.attr("maxvalue",v)}else{t.removeAttr("maxvalue")}if(u){t.attr("minvalue",u).attr("defaultdate",u)}else{t.removeAttr("minvalue").removeAttr("defaultdate")}};window[f]=function(t){t=$.trim(t||"");var B={start:null,end:null},y;if(t){y=t.replace(/[^\d]+/g,"");t=t.split("W");if(y.length===8){B.start=JC.f.parseISODate(y);B.end=B.start;return B}else{if(y.length===16){B.start=JC.f.parseISODate(y.slice(0,8));B.end=JC.f.parseISODate(y.slice(8,16));return B}}var w,z,v,x,u,A;w=parseInt(t[0],10);z=parseInt(t[1],10);v=JC.f.pureDate(new Date(t[0]),0,1);x=JC.f.pureDate(new Date(t[1]),0,1);u=u||JC.f.weekOfYear(t[0],JC.Calendar.weekDayOffset);$(u).each(function(D,C){if(C.week===z){B.start=new Date();B.end=new Date();B.start.setTime(C.start);B.end.setTime(C.end);return false}})}return B};window[i]=function(x){x=$.trim(x||"");var w={start:null,end:null},v;if(x){v=x.replace(/[^\d]+/g,"");x=x.replace(/[^\d]+/g,"");if(v.length===8){w.start=JC.f.parseISODate(v);w.end=w.start;return w}else{if(v.length===16){w.start=JC.f.parseISODate(v.slice(0,8));w.end=JC.f.parseISODate(v.slice(8,16));return w}}var u=x.slice(0,4),t=parseInt(x.slice(4,6),10)-1;w.start=new Date(u,t,1);w.end=JC.f.cloneDate(w.start);w.end.setDate(JC.f.maxDayOfMonth(w.start))}return w};window[s]=function(A){A=$.trim(A||"");var y={start:null,end:null},w;if(A){w=A.replace(/[^\d]+/g,"");A=A.split("Q");if(w.length===8){y.start=JC.f.parseISODate(w);y.end=y.start;return y}else{if(w.length===16){y.start=JC.f.parseISODate(w.slice(0,8));y.end=JC.f.parseISODate(w.slice(8,16));return y}}var v=parseInt(A[0],10),u=parseInt(A[1],10),x=JC.f.pureDate(new Date(A[0]),0,1),z=JC.f.pureDate(new Date(A[1]),0,1),t=JC.f.seasonOfYear(A[0]);$(t).each(function(C,B){if(B.season===u){y.start=new Date();y.end=new Date();y.start.setTime(B.start);y.end.setTime(B.end);return false}})}return y};window[e]=function(v){v=$.trim(v||"");var u={start:null,end:null},t;if(v){v=v.replace(/[^\d]+/g,"");t=v.slice(0,4);u.start=new Date(t,0,1)}if(!u.start){u.start=new Date();u.end=new Date()}return u};d._model.calendarTypeEl().trigger("change",[true])},_initDefaultData:function(){if(this._model.mcIgnoreUrlFill()){return}var d=this,f=d._model.urlStartdate()||d._model.mddateEl().eq(0).val(),g=d._model.urlEnddate()||d._model.mddateEl().eq(1).val(),e=d._model.urlCalendarType()||d._model.calendarType();d._model.calendarTypeEl().val(e);d._model.updatemddateElProp(e);setTimeout(function(){d._model.setmddate(f,g);d._model.setHiddenStartdate(f);d._model.setHiddenEnddate(g)},200)},_inited:function(){}};c.getInstance=function(d,e){if(typeof d=="string"&&!/select")},mcIgnoreUrlFill:function(){return this.boolProp("mdIgnoreUrlFill")},calendarType:function(){return this.calendarTypeEl().val()},mddateEl:function(){var d=this,e=d.attrProp("mddateEl")||".js_multidate";return d.selector().find(e)},setmddate:function(e,d){var f=this.mddateEl();e&&(e=JC.f.dateFormat(JC.f.dateDetect(e),f.eq(0).attr("dateformat")));d&&(d=JC.f.dateFormat(JC.f.dateDetect(d),f.eq(1).attr("dateformat")));f.eq(0).val(e);f.eq(1).val(d)},updatemddateElProp:function(e){var d=this,f=d.mddateEl();f.attr("multidate",e);if(e==="date"){f.removeAttr("dateparse").removeAttr("dateformat").removeAttr("fulldateformat")}else{f.eq(0).attr("fulldateformat","{0}");f.eq(1).attr("fulldateformat","{0}");f.attr("dateformat",d.dateformartType(e)).attr("dateparse","parsedate"+e)}if(c.Model._defaultMinvalue){f.attr("minvalue",c.Model._defaultMinvalue)}else{f.removeAttr("minvalue")}if(c.Model._defaultMaxvalue){f.attr("maxvalue",c.Model._defaultMaxvalue).attr("defaultdate",c.Model._defaultMaxvalue)}else{f.removeAttr("maxvalue").removeAttr("defaultdate")}},dateformartType:function(d){var e;switch(d){case"week":e="YYWWK";break;case"month":e="YY-MM";break;case"season":e="YYQYQ";break;case"year":e="YY";break;case"date":default:e=""}return e},hiddenStartdateEl:function(){var d=this,e=d.attrProp("mdstartdate")||".js_startdate";return d.selector().find(e)},hiddenEnddateEl:function(){var d=this,e=d.attrProp("mdenddate")||".js_enddate";return d.selector().find(e)},setHiddenStartdate:function(e){var d=this,f=e;if(e){e=JC.f.parseDate(e,d.mddateEl().first());e&&(e=JC.f.dateFormat(e,d.hiddendateiso()?"":d.mddateEl().first().attr("dateformat")));!e&&(e=f)}d.hiddenStartdateEl().val(e)},setHiddenEnddate:function(e){var d=this,f=e;if(e){e=JC.f.parseDate(e,d.mddateEl().first());e&&(e=JC.f.dateFormat(e,d.hiddendateiso()?"":d.mddateEl().first().attr("dateformat")));!e&&(e=f)}d.hiddenEnddateEl().val(e)},updateHiddenStartdate:function(){var d=this,e=d.mddateEl().eq(0).val();if(!e){d.setHiddenStartdate("");return}d.setHiddenStartdate(e)},updateHiddenEnddate:function(){var d=this,e=d.mddateEl().eq(1).val();if(!e){d.setHiddenEnddate("");return}d.setHiddenEnddate(e)},urlCalendarType:function(){var d=this;return d.decodedata(JC.f.getUrlParam(d.calendarTypeEl().attr("name")||"")||"").toLowerCase()},urlStartdate:function(){var d=this;return d.decodedata(JC.f.getUrlParam(d.hiddenStartdateEl().attr("name")||"")||"")},urlEnddate:function(){var d=this;return d.decodedata(JC.f.getUrlParam(d.hiddenEnddateEl().attr("name")||"")||"")},decodedata:function(d){d=d.replace(/[\+]/g," ");try{d=decodeURIComponent(d)}catch(e){}return d},dayrange:function(){return this.intProp("mddayrange")},weekrange:function(){return this.intProp("mdweekrange")},monthrange:function(){return this.intProp("mdmonthrange")},seasonrange:function(){return this.intProp("mdseasonrange")},yearrange:function(){return this.intProp("mdyearrange")},hiddendateiso:function(){return this.boolProp("hiddendateiso")}};BaseMVC.buildView(c);c.View.prototype={init:function(){return this}};BaseMVC.build(c,"Bizs");$(document).ready(function(){JC.f.safeTimeout(function(){$(".js_autoDMultiDate").each(function(){new c($(this))})},null,"DMultiDatesdfasd",50)});return Bizs.DMultiDate})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/DMultiDate/index.php b/deploy/bizs/DMultiDate/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/DMultiDate/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/DisableLogic/DisableLogic.js b/deploy/bizs/DisableLogic/DisableLogic.js new file mode 100755 index 000000000..43a416851 --- /dev/null +++ b/deploy/bizs/DisableLogic/DisableLogic.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){window.Bizs.DisableLogic=e;JC.f.addAutoInit&&JC.f.addAutoInit(e);function e(f){if(e.getInstance(f)){return e.getInstance(f)}e.getInstance(f,this);JC.log("Bizs.DisableLogic:",new Date().getTime());this._model=new d(f);this._view=new c(this._model);this._init()}e.prototype={_init:function(){var f=this,g;f._initHandlerEvent();$([f._view,f._model]).on("BindEvent",function(h,j,i){f.on(j,i)});$([f._view,f._model]).on("TriggerEvent",function(h,j){var i=JC.f.sliceArgs(arguments).slice(2);f.trigger(j,i)});f._model.init();f._view.init();f._model.dltrigger().on("change",function(h){JC.log("dltrigger change",new Date().getTime());f._view.change(this)});(g=f._model.dltrigger(true))&&g.trigger("change");return f},_initHandlerEvent:function(){var f=this;f.on("DisableItem",function(h,g){f._model.dldisablecallback()&&f._model.dldisablecallback().call(f,g,f._model.selector())});f.on("EnableItem",function(h,g){f._model.dlenablecallback()&&f._model.dlenablecallback().call(f,g,f._model.selector())});f.on("ChangeDone",function(h,g){f._model.dldonecallback()&&f._model.dldonecallback().call(f,g,f._model.selector())})},selector:function(){return this._model.selector()},on:function(g,f){$(this).on(g,f);return this},trigger:function(g,f){$(this).trigger(g,f);return this}};e.getInstance=function(f,g){if(typeof f=="string"&&!/ diff --git a/deploy/bizs/DropdownTree/DropdownTree.js b/deploy/bizs/DropdownTree/DropdownTree.js new file mode 100755 index 000000000..b596c8d9a --- /dev/null +++ b/deploy/bizs/DropdownTree/DropdownTree.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC","JC.Tree"],function(){Bizs.DropdownTree=c;function c(d){d&&(d=$(d));if(JC.BaseMVC.getInstance(d,c)){return JC.BaseMVC.getInstance(d,c)}JC.BaseMVC.getInstance(d,c,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init();JC.log(c.Model._instanceName,"all inited",new Date().getTime())}c.init=function(d){var e=[];d=$(d||document);if(d&&d.length){if(d.hasClass("js_bizDropdownTree")){e.push(new c(d))}else{d.find("div.js_bizDropdownTree").each(function(){e.push(new c(this))})}}return e};BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var d=this;d.on("DropdownTreeSelected",function(g,h,f,e){d.hide()});d.on("INITED",function(){d.update()});d.on("INITED_STATUS",function(e,g){var h=d._model.bdtInput().val().trim(),f;typeof g!="undefined"&&(h=g);d._model.bdtInput().is("[name]")&&(h=JC.f.getUrlParam(d._model.bdtInput().attr("name"))||h);h&&(f=d._model.treeIns().getItem(h));if(!(h&&f&&f.length)){if(d._model.is("[bdtDefaultLabel]")){d._model.bdtLabel().html(d._model.bdtDefaultLabel())}if(d._model.is("[bdtDefaultValue]")){d._model.bdtInput().val(d._model.bdtDefaultValue());h=d._model.bdtDefaultValue()}}h&&d._model.bdtLabel().html(d._model.treeIns().getItem(h).attr("dataname"))&&(d._model.bdtInput().val(h),d._model.treeIns().selectedItem(d._model.treeIns().getItem(h)))});d.on("CLEAR_STATUS",function(){d._model.bdtInput().val("");d._model.bdtLabel().html("")})},_inited:function(){this.trigger("INITED")},show:function(){this._view.show();return this},hide:function(){this._view.hide();return this},toggle:function(){this._view.toggle();return this},update:function(e,f){var d;e&&(d=true);d&&this.trigger("CLEAR_STATUS");this._view.update(e,d);this.trigger("INITED_STATUS",[f]);return this},clear:function(){var d=this;if(d._model.is("[bdtDefaultLabel]")){d._model.bdtLabel().html(d._model.bdtDefaultLabel())}else{d._model.bdtLabel().html("")}if(d._model.is("[bdtDefaultValue]")){d._model.bdtInput().val(d._model.bdtDefaultValue())}else{d._model.bdtInput().val("")}return this},label:function(){return this._model.bdtLabel()},val:function(d){typeof d!="undefined"&&this.getItem(d).trigger("click");return this._model.bdtInput().val()}});c.Model._instanceName="DropdownTreeIns";JC.f.extendObject(c.Model.prototype,{init:function(){},bdtData:function(){return this.windowProp("bdtData")||{}},bdtDefaultLabel:function(){return this.attrProp("bdtDefaultLabel")},bdtDefaultValue:function(){return this.attrProp("bdtDefaultValue")},bdtTreeBox:function(){var d=this.selector().find("> .bdtTreeBox");return d},bdtLabel:function(){var d=this.selector().find("> .bdtLabel");return d},bdtInput:function(){var d=this.selector().find("> .bdtInput");return d},treeIns:function(d){this._treeIns=d||JC.Tree.getInstance(this.bdtTreeBox());return this._treeIns}});JC.f.extendObject(c.View.prototype,{init:function(){},update:function(f,e){var d=this;f=f||d._model.bdtData();if(e){}if((!d._model.treeIns())||e){d._model.bdtTreeBox().html("");d._model.bdtTreeBox().data(JC.Tree.Model._instanceName,null);d._model.treeIns(new JC.Tree(d._model.bdtTreeBox(),f));d._model.treeIns().on("click",function(){var g=$(this),i=g.attr("dataid"),h=g.attr("dataname");d._model.bdtLabel().html(h);d._model.bdtInput().val(i);$(d).trigger("TriggerEvent",["DropdownTreeSelected",i,h,g])});d._model.treeIns().on("RenderLabel",function(h){var g=$(this);g.html(JC.f.printf('{1}',h[0],h[1]))});d._model.treeIns().init();d._model.treeIns().open()}},show:function(){var d=this;JC.f.safeTimeout(setTimeout(function(){},50),d._model.selector(),"DropdownTreeUi");d.updateZIndex();d._model.selector().addClass("bdtBox-active");d._model.bdtTreeBox().show();d._model.bdtTreeBox().css({"z-index":ZINDEX_COUNT++})},hide:function(){var d=this;d._model.bdtTreeBox().hide();JC.f.safeTimeout(setTimeout(function(){d._model.selector().removeClass("bdtBox-active")},50),d._model.selector(),"DropdownTreeUi")},toggle:function(){this.updateZIndex();if(this._model.bdtTreeBox().is(":visible")){this.hide()}else{this.show()}},updateZIndex:function(){this._model.bdtTreeBox().css({"z-index":ZINDEX_COUNT++})}});JC.Tree.dataFilter=JC.Tree.dataFilter||function(g){var h={};if(g&&g.root&&g.root.length>2){g.root.shift();h.root=g.root;h.data={};for(var d in g.data){h.data[d]=[];for(var f=0,e=g.data[d].length;f .bdtTreeBox","click",function(d){d.stopPropagation()});return Bizs.DropdownTree})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/DropdownTree/index.php b/deploy/bizs/DropdownTree/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/deploy/bizs/DropdownTree/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/DropdownTree/res/default/index.php b/deploy/bizs/DropdownTree/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/deploy/bizs/DropdownTree/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/DropdownTree/res/default/style.css b/deploy/bizs/DropdownTree/res/default/style.css new file mode 100755 index 000000000..0bd478b8a --- /dev/null +++ b/deploy/bizs/DropdownTree/res/default/style.css @@ -0,0 +1 @@ +.bdtBox{width:260px;height:19px;overflow:hidden;border:1px solid #ccc;padding:1px 1px 0;margin:0;background:#fff;position:relative}.bdtBox-active{overflow:visible}.bdtBox .bdtLabel{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 0 0 3px;margin:0;line-height:18px;color:#444;margin-right:20px;cursor:pointer}.bdtBox .bdtIcon{position:absolute;display:block;right:1px;top:1px;width:17px;height:18px;background:url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat;overflow:hidden;padding:0;margin:0;font-size:0;line-height:0;float:right}.bdtBox:hover .bdtIcon{background-position:0 -18px}.bdtBox-disabled{border:1px solid #ddd;background:#f0f0f0}.bdtBox-disabled .bdtLabel{color:#666;cursor:default}.bdtBox-disabled:hover .bdtIcon{background-position:0 0}.bdtBox-disabled .bdtIcon{filter:alpha(opacity=70);opacity:.7}.bdtTreeBox{display:none;background:#fff;width:100%;border:1px solid #ccc;position:absolute;left:-1px;top:19px;overflow-x:auto}.bdtTreeBox .tree_wrap{padding-top:4px !important} \ No newline at end of file diff --git a/deploy/bizs/DropdownTree/res/index.php b/deploy/bizs/DropdownTree/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/deploy/bizs/DropdownTree/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/FormLogic/FormLogic.js b/deploy/bizs/FormLogic/FormLogic.js new file mode 100755 index 000000000..30ae5e60c --- /dev/null +++ b/deploy/bizs/FormLogic/FormLogic.js @@ -0,0 +1 @@ +(function(b,a){b("Bizs.FormLogic",["JC.BaseMVC","JC.Valid","JC.Panel","JC.FormFillUrl"],function(){Bizs.FormLogic=c;JC.f.addAutoInit&&JC.f.addAutoInit(c);function c(d){d&&(d=$(d));if(JC.BaseMVC.getInstance(d,c)){return JC.BaseMVC.getInstance(d,c)}JC.BaseMVC.getInstance(d,c,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.getInstance=function(d,e){return JC.BaseMVC.getInstance(d,c,e)};if(!b.amd&&JC.use){!JC.Valid&&JC.use("JC.Valid");!JC.Panel&&JC.use("JC.Panel");!JC.FormFillUrl&&JC.use("JC.FormFillUrl")}c.init=function(d){var e=[];d&&(d=$(d));if(!(d&&d.length)){return}if(d.prop("nodeName").toLowerCase()=="form"){e.push(new c(d))}else{d.find("form.js_bizsFormLogic, form.js_autoFormLogic").each(function(){e.push(new c(this))})}return e};c.popupCloseMs=2000;c.formSubmitType="";c.submitDisable=true;c.resetAfterSubmit=true;c.processErrorCb;c.GLOBAL_AJAX_CHECK;c.DATA_PARSE;c._currentIns;JC.BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var d=this,e=d._model.formType();d._view.initQueryVal();d.selector().on("submit",function(f){d._model.isSubmited(true);c._currentIns=d;var g,h=d.selector().data(c.Model.GENERIC_SUBMIT_BUTTON);h&&(h=$(h));if(h&&h.length){g=JC.f.parseBool(h.attr(c.Model.IGNORE_KEY));JC.Valid.ignore(d.selector(),!g)}else{JC.Valid.ignore(d.selector(),true)}if(d._model.formBeforeProcess()){if(d._model.formBeforeProcess().call(d.selector(),f,d)===false){return d._model.prevent(f)}}if(!g&&!JC.Valid.check(d.selector())){d._model.prevent(f);if(!d._model.checkDataValid()){d._view.dataValidError();return false}if(d._model.formProcessError()){d._model.formProcessError().call(d.selector(),f,d)}return false}if(d._model.formAfterProcess()){if(d._model.formAfterProcess().call(d.selector(),f,d)===false){return d._model.prevent(f)}}if(d.selector().data(c.Model.SUBMIT_CONFIRM_BUTTON)){d.trigger(c.Model.EVT_CONFIRM);return d._model.prevent(f)}if(d._model.formBeforeSubmit()){if(d._model.formBeforeSubmit().call(d.selector(),f,d)===false){return d._model.prevent(f)}}d.trigger(c.Model.PROCESS_DONE)});d.on(c.Model.INITED,function(f){d.trigger(c.Model.INIT_JSONP);d.trigger(c.Model.BIND_FORM)});d.on(c.Model.INIT_JSONP,function(f){if(!(e==c.Model.JSONP)){return}window[d._model.jsonpKey()]=d._model.jsonpCb()});d.on(c.Model.BIND_FORM,function(g){var i,h=d._model.formType(),f;if(!(h==c.Model.AJAX||h==c.Model.JSONP)){return}i=d._model.frame();i.on("load",function(l){if(d._model.formType()==c.Model.JSONP){return}var m=i.prop("contentWindow"),k=m.document.body,j=$("
        "+($.trim(k.innerHTML)||"")+"
        ").text();if(!d._model.isSubmited()){return}d.trigger(c.Model.AJAX_DONE,[j])})});d.on(c.Model.AJAX_DONE,function(g,k){d.trigger("HIDE_PROMPT");c.GLOBAL_AJAX_CHECK&&c.GLOBAL_AJAX_CHECK(k);var h=d._model.selector().find("button[type=reset], input[type=reset]");d._model.formSubmitDisable()&&d.trigger(c.Model.ENABLE_SUBMIT);d._model.dataParse()&&(k=d._model.dataParse()(k));var f,j,m=d._model.formAjaxResultType();if(Object.prototype.toString.call(k)=="[object Object]"){f=k}else{if(m=="json"){try{f=$.parseJSON(k)}catch(i){j=true;f=k}}}if(j){var l=JC.f.printf('服务端错误, 无法解析返回数据:

        {0}

        ',k);d.trigger("SHOW_POPUP",[d._model.formPopupType(),l,null,1]);return}f&&m=="json"&&"errorno" in f&&!parseInt(f.errorno,10)&&d._model.formResetAfterSubmit()&&h.length&&d.selector().trigger("reset");f=f||k||{};d._model.formAjaxDone()&&d._model.formAjaxDone().call(d._model.selector(),f,d._model.selector().data(c.Model.GENERIC_SUBMIT_BUTTON),d)});d.on(c.Model.PROCESS_DONE,function(f){d.trigger(c.Model.BEFORE_SUBMIT);d._model.formSubmitDisable()&&d.selector().find("input[type=submit], button[type=submit]").each(function(){!d._model.formIgnoreStatus()&&$(this).prop("disabled",true)})});d.on(c.Model.EVT_CONFIRM,function(f){var h=d.selector().data(c.Model.SUBMIT_CONFIRM_BUTTON);h&&(h=$(h));if(!(h&&h.length)){return}var i,g=d._model.formConfirmPopupType(h)||"dialog";g+=".confirm";i=d.triggerHandler("SHOW_POPUP",[g,d._model.formSubmitConfirm(h),h,2]);i.on("confirm",function(){d.selector().data(c.Model.SUBMIT_CONFIRM_BUTTON,null);d.selector().trigger("submit")});i.on("close",function(){d.selector().data(c.Model.SUBMIT_CONFIRM_BUTTON,null)})});d.selector().on("reset",function(f){if(d.selector().data(c.Model.RESET_CONFIRM_BUTTON)){d.trigger(c.Model.EVT_RESET,[f]);return d._model.prevent(f)}else{d._view.reset();d.trigger(c.Model.ENABLE_SUBMIT);d.trigger("FORM_RESET",[f])}});d.on(c.Model.ENABLE_SUBMIT,function(){d.selector().find("input[type=submit], button[type=submit]").each(function(){!d._model.formIgnoreStatus()&&$(this).prop("disabled",false)})});d.on(c.Model.EVT_RESET,function(g,f){var i=d.selector().data(c.Model.RESET_CONFIRM_BUTTON);i&&(i=$(i));if(!(i&&i.length)){return}var j,h=d._model.formConfirmPopupType(i)||"dialog";h+=".confirm";j=d.triggerHandler("SHOW_POPUP",[h,d._model.formResetConfirm(i),i,2]);j.on("confirm",function(){d.selector().data(c.Model.RESET_CONFIRM_BUTTON,null);d.selector().trigger("reset");d._view.reset();d.trigger(c.Model.ENABLE_SUBMIT);d.trigger("FORM_RESET",[f])});j.on("close",function(){d.selector().data(c.Model.RESET_CONFIRM_BUTTON,null)})});d.on(c.Model.BEFORE_SUBMIT,function(f){d.trigger("SHOW_PROMPT");if(d._model.formType()!="ajax"){JC.f.safeTimeout(function(){d.trigger("HIDE_PROMPT")},d,"hidePromptasdfasd",2000)}});d.on("SHOW_PROMPT",function(f){var g=d._model.submitPromptSelector();if(!(g&&g.length)){return}g.html(d._model.submitPromptMsg()).show()});d.on("HIDE_PROMPT",function(f){var g=d._model.submitPromptSelector();if(!(g&&g.length)){return}g.hide()});d.on("FORM_RESET",function(g,f){JC.f.safeTimeout(function(){d._model.formResetCallback()&&d._model.formResetCallback().call(d.selector(),f,d)},d,"asdfawerasdfase_reset",100)});d.on("SHOW_POPUP",function(f,g,l,k,i,h){g=(g||"").toLowerCase();var j;switch(g){case"dialog.confirm":j=JC.Dialog.confirm(l,i,h);break;case"popup.confirm":j=JC.confirm(l,k,i,h);break;case"popup.msgbox":j=JC.msgbox(l,k,i,h);break;case"dialog.msgbox":j=JC.Dialog.msgbox(l,i,h);break;case"popup":j=JC.alert(l,k,i,h);break;default:j=JC.Dialog.alert(l,i,h);break}return j})},_inited:function(){var d=this,e=d.selector().find("input[type=file][name]");e.length&&d.selector().attr("enctype","multipart/form-data")&&d.selector().attr("encoding","multipart/form-data");d._model.trigger(c.Model.INITED)}});c.Model._instanceName="FormLogic";c.Model.INITED="inited";c.Model.INIT_JSONP="init_jsonp";c.Model.GET="get";c.Model.POST="post";c.Model.AJAX="ajax";c.Model.JSONP="jsonp";c.Model.IFRAME="iframe";c.Model.SUBMIT_CONFIRM_BUTTON="SubmitButton";c.Model.RESET_CONFIRM_BUTTON="ResetButton";c.Model.GENERIC_SUBMIT_BUTTON="GenericSubmitButton";c.Model.GENERIC_RESET_BUTTON="GenericResetButton";c.Model.EVT_CONFIRM="ConfirmEvent";c.Model.EVT_RESET="ResetEvent";c.Model.INS_COUNT=1;c.Model.PROCESS_DONE="ProcessDone";c.Model.BEFORE_SUBMIT="FORMBEFORESUBMIT";c.Model.IGNORE_KEY="formSubmitIgnoreCheck";c.Model.BIND_FORM="BindFrame";c.Model.AJAX_DONE="AjaxDone";c.Model.ENABLE_SUBMIT="EnableSubmit";c.Model.SHOW_DATA_VALID_ERROR=true;JC.f.extendObject(c.Model.prototype,{init:function(){this.id();this.selector().addClass(c.Model._instanceName);this.selector().addClass(this.id());if(this.formType()==c.Model.JSONP){var d=this.attrProp("formAjaxAction")||this.attrProp("action")||"?";this.attrProp("action")&&(this.selector().attr("action",JC.f.addUrlParams(this.attrProp("action"),{callbackInfo:this.id()})),this.selector().attr("action",JC.f.addUrlParams(this.attrProp("action"),{callback:this.jsonpKey()})));this.attrProp("formAjaxAction")&&(this.selector().attr("formAjaxAction",JC.f.addUrlParams(this.attr("formAjaxAction"),{callbackInfo:this.id()})),this.selector().attr("formAjaxAction",JC.f.addUrlParams(this.attr("formAjaxAction"),{callback:this.jsonpKey()})))}},submitPromptSelector:function(){return this.selectorProp("formSubmitPromptSelector")},submitPromptMsg:function(d){var e="正在提交数据,请稍候...";e=this.attrProp("formSubmitPromptMsg")||e;d&&(e=this.attrProp(d,"formSubmitPromptMsg")||e);return e},showDataValidError:function(e){var d=this,f=c.Model.SHOW_DATA_VALID_ERROR;d.selector().is("[formShowDataValidError]")&&(f=JC.f.parseBool(d.attrProp("formShowDataValidError")));e&&e.is("[formShowDataValidError]")&&(f=JC.f.parseBool(e.attr("formShowDataValidError")));return f},formIgnoreStatus:function(){return this.boolProp("formIgnoreStatus")},checkDataValid:function(){var d=this,m=true,n=true,g,f;for(g=0,f=d.selector()[0].length;g1){j.val($(h[0]).val())}var i=j.is("[ignoreprocess]");j.attr("ignoreprocess",true);j.trigger("change");setTimeout(function(){!i&&j.removeAttr("ignoreprocess")},500)});JC.Valid&&JC.Valid.clearError(g)},50);JC.hideAllPopup(1)},dataValidError:function(){var d=this;$.each(this._model.dataValidItems(),function(i,f){var h=f.val().trim(),g=f.attr("datavalid");if(!(h&&g)){return}if(JC.f.parseBool(g)){return}if(d._model.showDataValidError(f)){var e=d._model.formPopupType()+".msgbox";d.triggerHandler("SHOW_POPUP",[e,d._model.datavalidFormLogicMsg(f),f,2]);JC.f.safeTimeout(function(){f.trigger("blur")},f,"FORMLOGIC_DATAVALID",10)}return false})}});$(document).delegate("input[formSubmitConfirm], button[formSubmitConfirm]","click",function(f){var e=$(this),d=JC.f.getJqParent(e,"form"),g=c.getInstance(d),h;if(d&&d.length){if(g){d.data(c.Model.SUBMIT_CONFIRM_BUTTON,null);if(e.is("[formConfirmCheckSelector]")){h=JC.f.parentSelector(e,e.attr("formConfirmCheckSelector"));if(!(h&&h.length)){return}}else{if(e.is("[formConfirmCheckCallback]")){h=window[e.attr("formConfirmCheckCallback")];if(h){if(!h.call(d,e,f,g)){return}}}}}d.data(c.Model.SUBMIT_CONFIRM_BUTTON,e)}});$(document).delegate("input[formResetConfirm], button[formResetConfirm]","click",function(f){var e=$(this),d=JC.f.getJqParent(e,"form");d&&d.length&&d.data(c.Model.RESET_CONFIRM_BUTTON,e)});$(document).delegate("input[type=reset], button[type=reset]","click",function(f){var e=$(this),d=JC.f.getJqParent(e,"form");d&&d.length&&d.data(c.Model.GENERIC_RESET_BUTTON,e)});$(document).delegate("input[type=submit], button[type=submit]","click",function(f){var e=$(this),d=JC.f.getJqParent(e,"form");d&&d.length&&d.data(c.Model.GENERIC_SUBMIT_BUTTON,e)});$(document).delegate("input[buttonClickBindSelector], button[buttonClickBindSelector]","click",function(f){var d=$(this),e=JC.f.parentSelector(d,d.attr("buttonClickBindSelector"));if(!(e&&e.length)){return}e.val(d.val()||"")});$(document).delegate("a[buttonReturnUrl], input[buttonReturnUrl], button[buttonReturnUrl]","click",function(f){var e=$(this),g=e.attr("buttonReturnUrl").trim(),j=e.is("[returnConfirm]")?e.attr("returnConfirm"):"",d=e.is("[popuptype]")?e.attr("popuptype"):"confirm",i=parseInt(e.is("[popupstatus]")?e.attr("popupstatus"):"2",10),h;if(!g){return}g=JC.f.urlDetect(g);e.prop("nodeName").toLowerCase()=="a"&&f.preventDefault();if(j){switch(d){case"dialog.confirm":h=JC.Dialog.confirm(j,i);break;default:h=JC.confirm(j,e,i);break}h.on("confirm",function(){JC.f.reloadPage(g)})}else{JC.f.reloadPage(g)}});c.frameTpl='';$(document).ready(function(){setTimeout(function(){c.autoInit&&c.init($(document))},1)});return Bizs.FormLogic})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/FormLogic/index.php b/deploy/bizs/FormLogic/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/FormLogic/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/FormLogic/res/default/style.css b/deploy/bizs/FormLogic/res/default/style.css new file mode 100755 index 000000000..d890b73b2 --- /dev/null +++ b/deploy/bizs/FormLogic/res/default/style.css @@ -0,0 +1 @@ +.js_formSubmitPormpt{border:1px solid #daecce;border-radius:3px;background:#f3f8ef;overflow:hidden;line-height:15px;color:#000;margin:5px;padding:5px 20px;display:none;color:green} \ No newline at end of file diff --git a/deploy/bizs/InputSelect/InputSelect.js b/deploy/bizs/InputSelect/InputSelect.js new file mode 100755 index 000000000..972d9a674 --- /dev/null +++ b/deploy/bizs/InputSelect/InputSelect.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){Bizs.InputSelect=d;JC.f.addAutoInit&&JC.f.addAutoInit(d);function d(e){e&&(e=$(e));if(JC.BaseMVC.getInstance(e,d)){return JC.BaseMVC.getInstance(e,d)}JC.BaseMVC.getInstance(e,d,this);this._model=new d.Model(e);this._view=new d.View(this._model);this._init()}d.init=function(e){var f=[];e=$(e||document);if(e.length){if(e.hasClass("js_bizInputSelect")){f.push(new d(e))}else{e.find(".js_bizInputSelect").each(function(){f.push(new d(this))})}}return f};BaseMVC.build(d);JC.f.extendObject(d.prototype,{_beforeInit:function(){var e=this;e._model.selector().addClass("IPTSEL-BOX").append('');if(e._model.iptselbox().length){e._model.iptselbox().addClass("IPTSEL-DROPDOWN");e._model.iptselboxheight()&&e._model.iptselbox().css({height:e._model.iptselboxheight()+"px","overflow-y":"auto"})}e._model.iptseloption().length&&e._model.iptseloption().addClass("IPTSEL-ITEM")},_initHanlderEvent:function(){var e=this;e._model.selector().data("visible",0);e._model.iptselipt().on("keyup",function(h,k){var f=$(this),j=f.val().trim(),i=h.keyCode,g=f.data("IgnoreTime");if(i){switch(i){case 38:case 40:h.preventDefault();case 37:case 39:return;case 27:e._hide();return}}});e._model.iptselipt().on("click",function(){if(e.selector().data("visible")){e._hide()}else{return}});e._model.iptselarrow().on("click",function(f){f.stopPropagation();if(e._model.dataurl()&&!e._model.dataready){e._model.ajaxdata()}e[e._model.selector().data("visible")?"_hide":"_show"]()});e._model.iptselipt().on("keydown",function(l){var f=l.keyCode,k=$(this),m,j,g=e._model.iptseloption(),i;f==38&&(j=true);switch(f){case 38:case 40:if(e._model.dataurl()){e._model.iptselarrow().trigger("click")}e._show();m=e._model.nextIndex(j);if(m>=0&&m暂无数据"}else{for(j=0;j";f.iptselbox().html(h);f.dataready=1}})},nextIndex:function(g){var h=this,f=h.iptseloption(),e=f.length;if(g){if(h.keyindex<=0){h.keyindex=e-1}else{h.keyindex--}}else{if(h.keyindex>=e-1){h.keyindex=0}else{h.keyindex++}}return h.keyindex},selectedIdentifier:function(f,e){this.preSelected&&this.preSelected.removeClass("active");f.addClass("active");e&&(this.keyindex=parseInt(f.data("keyindex")));this.preSelected=f},getKeyword:function(e){var f=e.data("label");try{f=decodeURIComponent(f)}catch(g){}return f},keyindex:-1,dataready:0,iptselitemselectedcallback:function(){var e=this;e.selector().is("[iptselitemselectedcallback]")&&(e._iptselselectedcallback=e.selector().attr("iptselitemselectedcallback"));return e._iptselselectedcallback?window[e._iptselselectedcallback]:null}});JC.f.extendObject(d.View.prototype,{init:function(){},show:function(){var e=this;e._model.iptselbox().show().css("z-index",window.ZINDEX_COUNT++)},hide:function(){var e=this;e._model.iptselbox().hide()}});var c=$(document);c.ready(function(){var e=0;d.autoInit&&(e=d.init())});return Bizs.InputSelect})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/InputSelect/index.php b/deploy/bizs/InputSelect/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/InputSelect/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/InputSelect/res/default/style.css b/deploy/bizs/InputSelect/res/default/style.css new file mode 100755 index 000000000..d9af10cef --- /dev/null +++ b/deploy/bizs/InputSelect/res/default/style.css @@ -0,0 +1 @@ +.IPTSEL-BOX{position:relative;width:180px;height:22px}.IPTSEL-INPUT{border:1px solid #ddd;width:178px}.IPTSEL-ARROW{position:absolute;display:block;right:0;top:1px;width:17px;height:18px;background:url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat;overflow:hidden;padding:0;margin:0;font-size:0;line-height:0}.IPTSEL-DROPDOWN{display:none;position:absolute;background:#FFF;border:1px solid #ddd;line-height:22px;list-style:none;width:178px}.IPTSEL-DROPDOWN ul{padding:0;margin:0}.IPTSEL-DROPDOWN li{list-style:none;cursor:default;padding:0 5px}.IPTSEL-DROPDOWN li.active{background:#eee}.SELECTBOX:hover .SELECTIcon{background-position:0 -18px} \ No newline at end of file diff --git a/deploy/bizs/InputSelect/res/index.php b/deploy/bizs/InputSelect/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/deploy/bizs/InputSelect/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/KillISPCache/KillISPCache.js b/deploy/bizs/KillISPCache/KillISPCache.js new file mode 100755 index 000000000..17f07c895 --- /dev/null +++ b/deploy/bizs/KillISPCache/KillISPCache.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){Bizs.KillISPCache=c;function c(d){if(c._instance){return c._instance}this._model=new c.Model(d);this._init()}c.prototype={_beforeInit:function(){JC.log("KillISPCache._beforeInit",new Date().getTime());this._model.processAjax()},process:function(e,f){e&&(e=$(e));if(!(e&&e.length)){return}var d=this;d._model.ignoreSameLinkText(f);d._model.selector(e);d._model.processLink();d._model.processForm();return this},ignoreUrl:function(d){return this._model.ignoreUrl(d)},ignoreSelector:function(d){return this._model.ignoreSelector(d)}};c.getInstance=function(){!c._instance&&(c._instance=new c());return c._instance};c.ignoreSameLinkText=true;c.randName="";c.ignoreUrl=function(d){return c.getInstance().ignoreUrl(d)};c.ignoreSelector=function(d){return c.getInstance().ignoreSelector(d)};JC.BaseMVC.buildModel(c);c.Model.prototype={init:function(){this._postfix=JC.f.printf("{0}_{1}_",new Date().getTime().toString(),Math.round(Math.random()*100000));this._count=1;this._ignoreSameLinkText=true;this._randName="isp";this._ignoreUrl=[];this._ignoreSelector=[]},ignoreUrl:function(d){if(typeof d=="string"){d=d.split(",")}d&&d.length&&(this._ignoreUrl=this._ignoreUrl.concat(d));return this._ignoreUrl},ignoreSelector:function(d){if(typeof d=="string"){d=d.split(",")}d&&d.length&&(this._ignoreSelector=this._ignoreSelector.concat(d));return this._ignoreSelector},processLink:function(){var d=this;this.selector().find("a[href]").each(function(){var e=$(this),h=(e.attr("href")||"").trim(),i=e.html().trim();if(/javascript\:/.test(h)||/^[\s]*\#/.test(h)){return}if(d.ignoreSameLinkText()&&h.trim()==e.html().trim()){return}var g=d.ignoreSelector(),f=false;$.each(g,function(k,j){if(e.is(j)){f=true;return false}});if(f){return}h=JC.f.addUrlParams(h,d.keyVal());e.attr("href",h);e.html(i)})},processForm:function(){var d=this;this.selector().find("form").each(function(){var e=$(this),g=(e.prop("method")||"").toLowerCase();if(g=="post"){return}var h=d.ignoreSelector(),f=false;$.each(h,function(j,i){if(e.is(i)){f=true;return false}});if(f){return}if(!e.find("input[name="+d.randName()+"]").length){$('').appendTo(e)}})},processAjax:function(){var d=this;$(document).ajaxSend(function(e,g,i){if(i.type=="POST"){return}var h=d.ignoreUrl(),f=false;$.each(h,function(m,l){var j=l.length,k=i.url.slice(0,j);if(l.toLowerCase()==k.toLowerCase()){f=true}});!f&&(i.url=JC.f.addUrlParams(i.url,d.keyVal()))})},ignoreSameLinkText:function(d){typeof d!="undefined"&&(c.ignoreSameLinkText=d);return c.ignoreSameLinkText},postfix:function(){return this._postfix+(this._count++)},randName:function(){return c.randName||this._randName},keyVal:function(){var d={};d[this.randName()]=this.postfix();return d}};JC.BaseMVC.build(c,"Bizs");$(document).ready(function(){setTimeout(function(){c.autoInit&&c.getInstance().process($(document))},100)});return Bizs.KillISPCache})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/KillISPCache/index.php b/deploy/bizs/KillISPCache/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/KillISPCache/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MoneyTips/MoneyTips.js b/deploy/bizs/MoneyTips/MoneyTips.js new file mode 100755 index 000000000..8fb909290 --- /dev/null +++ b/deploy/bizs/MoneyTips/MoneyTips.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){Bizs.MoneyTips=c;JC.f.addAutoInit&&JC.f.addAutoInit(c);function c(d){d&&(d=$(d));if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init();JC.log("MoneyTips inited",new Date().getTime())}c.getInstance=function(d,e){if(typeof d=="string"&&!/');this.selector().after(this._bmtDisplayLabel)}return this._bmtDisplayLabel},bmtPattern:function(){var d=this.attrProp("bmtPattern")||"{0}";return d}};BaseMVC.buildView(c);c.View.prototype={init:function(){},show:function(){this._model.bmtDisplayLabel().show()},hide:function(){this._model.bmtDisplayLabel().hide()},update:function(e){var d=this;if(!e){d.hide()}else{d._model.bmtDisplayLabel().html(JC.f.printf(d._model.bmtPattern(),e));d.show()}}};BaseMVC.build(c,"Bizs");$(document).ready(function(){var d=0;c.autoInit&&(d=c.init())&&c.format($("span.js_bmtLabel, label.js_bmtLabel"))});$(document).delegate("input.js_bizMoneyTips","focus click",function(d){!c.getInstance($(this))&&new c($(this))});return Bizs.MoneyTips})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MoneyTips/index.php b/deploy/bizs/MoneyTips/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/MoneyTips/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MoneyTips/res/default/style.css b/deploy/bizs/MoneyTips/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/deploy/bizs/MultiAutoComplete/MultiAutoComplete.js b/deploy/bizs/MultiAutoComplete/MultiAutoComplete.js new file mode 100755 index 000000000..2140d76ce --- /dev/null +++ b/deploy/bizs/MultiAutoComplete/MultiAutoComplete.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.AutoComplete","JC.AutoChecked","JC.Placeholder","JC.Panel"],function(){var d=$(document),c=$(window);JC.use&&(!JC.AutoComplete&&JC.use("JC.AutoComplete"),!JC.Placeholder&&JC.use("JC.Placeholder"),!JC.Panel&&JC.use("JC.Panel"));Bizs.MultiAutoComplete=e;function e(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,e)){return JC.BaseMVC.getInstance(f,e)}JC.BaseMVC.getInstance(f,e,this);this._model=new e.Model(f);this._view=new e.View(this._model);this._init();JC.log(e.Model._instanceName,"all inited",new Date().getTime())}Bizs.MultiAutoComplete.insCount=1;Bizs.MultiAutoComplete.AJAX_CACHE={};e.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.is("[defaultMultiAutomComplete]")){g.push(new e(f))}else{f.find("input[defaultMultiAutomComplete]").each(function(){g.push(new e(this))})}}return g};e.ajaxRandom=true;JC.BaseMVC.build(e);JC.f.extendObject(e.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var f=this;f.on("inited",function(){f.trigger("init_relationship");f.trigger("fix_id_callback");f.trigger("init_autoComplete");f.trigger("update_selector",[f.selector()]);f.trigger("init_user_input");f._model.ready(true);f.trigger("inited_done")});f.on("init_relationship",function(g){f._model.init_relationship()});f.on("fix_id_callback",function(g){f._model.fixIdCallback()});f.on("init_autoComplete",function(g){f._model.each(function(h){var i;h.hasClass("js_compAutoComplete")&&!(i=JC.BaseMVC.getInstance(h,JC.AutoComplete))&&(i=new JC.AutoComplete(h));i.on("after_inited",function(j){f.trigger("init_checked_status",[i])})})});f.on("update_selector",function(i,g,h){if(!(g&&g.length)){return}!h&&f.trigger("clear_selector",[g]);f.trigger("ajax_data",[g])});f.on("clear_selector",function(h,g){if(!f._model.ready()){return}f._model.clearData(g)});f.on("ajax_data",function(h,g,i){if(!g){return}f._model.ajax_data(g,i)});f.on("ajax_done",function(h,j,g,k,i){if(j&&j.errorno==0){f.trigger("update",[j,g,k,i])}else{f.trigger("ajax_error",[j,g,k])}});f.on("update",function(i,l,g,m,k){var j=JC.BaseMVC.getInstance(g,JC.AutoComplete),n,h;if(!j){return}h=f._model.macDefaultValue(g)||undefined;j.update(l.data,h);n=f._model.nextSelector(g);if(n&&n.length&&l.data.length){f.trigger("update_selector",[n,true])}else{!k&&f.trigger("all_updated");if(k){j._model.layoutPopup().find("span.cacMultiSelectBarTplLabel").hide()}else{j._model.layoutPopup().find("span.cacMultiSelectBarTplLabel").show()}}});f.on("all_updated",function(){f._model.checkLast()});f.on("init_user_input",function(g){f._model.each(function(h){h.on("focus",function(i){h.data("old_value",h.val())});h.on("blur",function(i){JC.f.safeTimeout(function(){var j=h.data("old_value"),l=h.val(),k;if(j!=l){k=f._model.nextSelector(h);k&&k.length&&f.trigger("update_selector",[k])}},h,"forMultiAutoCompleteSelectorBlur",200)})})});f.on("inited_done",function(){f._model.each(function(g){f.trigger("init_addtionBox",[g])})});f.on("init_addtionBox",function(h,g){var j=f._model.macAddtionBox(g),k,i;if(!(j&&j.length)){return}k=j.find(".js_macAddtionBoxList");if(!(k&&k.length)){return}i=JC.BaseMVC.getInstance(g,JC.AutoComplete);j.delegate(".js_macClearAddtionList","click",function(l){JC.confirm("是否清空内容",this,2,function(m){k.html("");j.hide()})});j.delegate(".js_macAddtionBoxItem","click",function(m){var l=$(this),n=l.attr("data-id"),o=l.attr("data-label");f._model.macAddtionItemRemoveCallback(g)&&f._model.macAddtionItemRemoveCallback(g).call(f,l,n,o,k,j);l.remove();f.trigger("update_list_box_status",[i,true])});f.trigger("update_list_box_status",[i,true])});f.on("update_list_box_status",function(h,i,j){var g=i.selector(),k=f._model.macAddtionBox(g),m;if(!(k&&k.length)){return}m=k.find(".js_macAddtionBoxList");if(!(m&&m.length)){return}var l=m.find(f._model.macAddtionBoxItemSelector(g));l.length?k.show():k.hide();!j&&f.trigger("update_checked_status",[i,true])});f.on("init_checked_status",function(h,i){var g=i.selector();if(g.is("macAddtionBox")){return}i.on("after_popup_show",function(j){});i.on("build_data",function(){f.trigger("update_checked_show_status",[i]);f.trigger("fixed_checkAll_status",[i])});i._model.layoutPopup().delegate("input[schecktype=all]","change",function(k){var j=$(this);i._model.layoutPopup().find("input[schecktype=item]").prop("checked",j.prop("checked"));f.trigger("update_checked_status",[i]);f.trigger("fixed_checkAll_status",[i])});g.on("cacItemClickHanlder",function(k,j,l){JC.f.safeTimeout(function(){var n=j.find("input[schecktype=item]"),m;if(!n.length){return}m={item:n};f.trigger("update_list_item",[n,l]);f.trigger("item_checked",[m,m.item.prop("checked")]);f.trigger("fixed_checkAll_status",[l])},l,"adfasdfasdf",50)})});f.on("fixed_checkAll_status",function(g,i){var h=true;i._model.layoutPopup().find("input[schecktype=item]").each(function(k){var j=$(this);if(!j.prop("checked")){h=false;return false}});i._model.layoutPopup().find("input[schecktype=all]").prop("checked",h)});f.on("update_list_item",function(h,o,k){var l={item:o};if(!l.item.length){return}var j=k.selector(),m=f._model.macAddtionBox(j),n,i,g;if(!(m&&m.length)){return}n=m.find(".js_macAddtionBoxList");if(!(n&&n.length)){return}if(f._model.macAddtionBoxWithId(j)){i=$(JC.f.printf("#macAddtionBoxItemId_{0}_{1}",f._model.insCount(),l.item.val()))}else{i=[];n.find(f._model.macAddtionBoxItemSelector(k.selector())+"[data-id]").each(function(){if($(this).data("id")==l.item.val()){i.push(this)}});i=jQuery(i)}if(l.item.prop("checked")){if(!i.length){f.trigger("add_list_item",[l.item,k,m,n]);g=true}}else{i.length&&i.remove()}JC.f.safeTimeout(function(){g&&f.trigger("sort_list_item",[n,k])},f,"SORT_LIST_ITEM",1000)});f.on("update_checked_status",function(g,n,p){if(!n){return}var k=n.selector(),o=f._model.macAddtionBox(k),q,n;if(!(o&&o.length)){return}q=o.find(".js_macAddtionBoxList");if(!(q&&q.length)){return}var j=n._model.layoutPopup().find("input[schecktype=item]"),l=n._model.layoutPopup().find("input[schecktype=all]"),i=q.find(f._model.macAddtionBoxItemSelector(n.selector()));if(!j.length){return}var m={},h={};i.each(function(){var r=$(this);m[r.attr("data-id")]={item:r}});j.each(function(s){var r=$(this),t;f.trigger("update_list_item",[r,n])});!p&&f.trigger("update_list_box_status",[n])});f.on("update_checked_show_status",function(g,m){if(!m){return}var k=m.selector(),n=f._model.macAddtionBox(k),p,m;if(!(n&&n.length)){return}p=n.find(".js_macAddtionBoxList");if(!(p&&p.length)){return}var j=m._model.layoutPopup().find("input[schecktype=item]"),l=m._model.layoutPopup().find("input[schecktype=all]"),i=p.find(f._model.macAddtionBoxItemSelector(m.selector()));if(!j.length){return}var o=true,h={};j.each(function(){var q=$(this);h[q.val()]={item:q}});i.each(function(){var q=$(this),r;if(q.attr("data-id") in h){f.trigger("item_checked",[h[q.attr("data-id")],true])}})});f.on("sort_list_item",function(g,j,h){var i=j.find(f._model.macAddtionBoxItemSelector(h.selector()));i.each(function(){var l=$(this),k=l.attr("data-id"),m=l.attr("data-label");i.each(function(){var p=$(this),n=p.attr("data-id"),o=p.attr("data-label");if(k==n){return}if(m.localeCompare(o)>0){p.after(l)}})})});f.on("add_list_item",function(g,p,j,k,o){var h=JC.f.getJqParent(p,"li"),i=j.selector(),l,n=f._model.macAddtionBoxItemTpl(i),m=h.attr("data-id"),q=h.attr("data-label");l=$(JC.f.printf(n,m,q,f._model.insCount()));l.appendTo(o);l.attr("data-id",m);l.attr("data-label",q);k.show()});f.on("item_checked",function(g,i,h){h?JC.f.getJqParent(i.item,"li").addClass("macDisable"):JC.f.getJqParent(i.item,"li").removeClass("macDisable");i.item.prop("checked",h)})},_inited:function(){this.trigger("inited")}});e.Model._instanceName="JCMultiAutoComplete";JC.f.extendObject(e.Model.prototype,{init:function(){this.insCount(e.insCount++)},insCount:function(f){typeof f!="undefined"&&(this._insCount=f);return this._insCount},macAddtionBoxWithId:function(f){return JC.f.parseBool(f.attr("macAddtionBoxWithId"))},macAddtionItemAddCallback:function(f){return this.callbackProp(f,"macAddtionItemAddCallback")},macAddtionItemRemoveCallback:function(f){return this.callbackProp(f,"macAddtionItemRemoveCallback")},macAddtionBoxItemSelector:function(f){return this.attrProp(f,"macAddtionBoxItemSelector")},macAddtionBoxItemTpl:function(f){return JC.f.scriptContent(this.selectorProp(f,"macAddtionBoxItemTpl"))},macAddtionBox:function(f){return this.selectorProp(f,"macAddtionBox")},ready:function(f){typeof f!="undefined"&&(this._ready=f);return this._ready},clearData:function(g){var f=this,i=f.nextSelector(g),h=JC.BaseMVC.getInstance(g,JC.AutoComplete);h&&h.clearAll();i&&f.clearData(i)},init_relationship:function(g,i){var f=this,g=g||f.selector(),h;i&&(g.data("prevSelector",i));if(g.is("[macTarget]")){h=JC.f.parentSelector(g,g.attr("macTarget"));if((h&&h.length)){g.data("nextSelector",h);f.init_relationship(h,g)}}else{f.lastSelecotr(g)}},fixIdCallback:function(){var f=this;f.each(function(g){!g.is("[macIdCallback]")&&g.attr("macIdCallback","MultiAutoCompleteIdCallback");!g.is("[cacDataFilter]")&&g.attr("cacDataFilter","MultiAutoCompleteDataFilter")})},firstSelector:function(){return this.selector()},lastSelecotr:function(f){f&&(this._lastSelecotr=f);return this._lastSelecotr},nextSelector:function(f){if(f){return $(f).data("nextSelector")}},prevSelector:function(f){if(f){return $(f).data("prevSelector")}},macAddtionUrl:function(f){return f.attr("macAddtionUrl")},checkLast:function(){var f=this,g=f.lastSelecotr(),i=f.prevSelector(g),h;while(i&&i.length){i.val()&&(h=true);if(h){break}i=f.prevSelector(i)}!h&&f.macAddtionUrl(g)&&f.ajax_data(g,true,f.macAddtionUrl(g))},ajax_data:function(h,j,l){var g=this,i=l||h.attr("macUrl"),k,f;if(!i){return}g.ajax_random(h)&&(i=JC.f.addUrlParams(i,{rnd:0}));k=g.prevSelector(h);if(k&&k.length){f=g.macDefaultValue(k);if(!f){!j&&g.trigger("all_updated");if(!j){return}}i=JC.f.printf(i,f)}if(i in e.AJAX_CACHE){g.trigger("ajax_done",[e.AJAX_CACHE[i],h,"",j])}else{$.get(i).done(function(n){var m=$.parseJSON(n);e.AJAX_CACHE[i]=m;g.trigger("ajax_done",[m,h,n,j])})}},ajax_random:function(f){var g=e.ajaxRandom;f.is("[macAjaxRandom]")&&(g=JC.f.parseBool(f.attr("macAjaxRandom")));return g},each:function(h,g){var f=this,i;g=g||f.selector();if(g&&g.length){h.call(f,g);i=f.nextSelector(g);i&&i.length&&f.each(h,i)}},macDefaultValue:function(f){var h=f.attr("macDefaultValue"),g;if(f.is("[cacIdSelector]")){g=JC.f.parentSelector(f,f.attr("cacIdSelector"));g&&g.length&&(h=g.val())}return h}});JC.f.extendObject(e.View.prototype,{init:function(){}});window.MultiAutoCompleteIdCallback=function(){};window.MultiAutoCompleteDataFilter=function(f){if(f.data&&f.data.length){f=f.data}$.each(f,function(h,g){g.length&&(f[h]={id:g[0],label:g[1]})});return f};d.ready(function(){JC.f.safeTimeout(function(){e.autoInit&&e.init()},null,"MultiAutoCompleteInit",5)});return Bizs.MultiAutoComplete})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiAutoComplete/index.php b/deploy/bizs/MultiAutoComplete/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/MultiAutoComplete/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MultiAutoComplete/res/default/btn.png b/deploy/bizs/MultiAutoComplete/res/default/btn.png new file mode 100755 index 000000000..a2240dca3 Binary files /dev/null and b/deploy/bizs/MultiAutoComplete/res/default/btn.png differ diff --git a/deploy/bizs/MultiAutoComplete/res/default/index.php b/deploy/bizs/MultiAutoComplete/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/deploy/bizs/MultiAutoComplete/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MultiAutoComplete/res/default/style.css b/deploy/bizs/MultiAutoComplete/res/default/style.css new file mode 100755 index 000000000..bc8b49d4a --- /dev/null +++ b/deploy/bizs/MultiAutoComplete/res/default/style.css @@ -0,0 +1 @@ +.js_macAddtionBox{font:12px/1.5 Tahoma,Helvetica,Arial,'宋体',sans-serif}.js_macAddtionBox .js_macClearAddtionList{font-weight:bold}.js_macAddtionBox a{text-decoration:none;cursor:pointer;color:#069300;outline:0}.js_macAddtionBoxItem{padding-right:5px}.js_macAddtionBoxItem:hover .AURemove{background-position:-172px -380px !important}.js_macAddtionBoxItem:hover .AURemove1{background-position:-75px -404px !important}.macDisable,.macDisable *{color:#bbb !important;cursor:default !important} \ No newline at end of file diff --git a/deploy/bizs/MultiChangeLogic/MultiChangeLogic.js b/deploy/bizs/MultiChangeLogic/MultiChangeLogic.js new file mode 100755 index 000000000..21afc6705 --- /dev/null +++ b/deploy/bizs/MultiChangeLogic/MultiChangeLogic.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){var e=$(document),d=$(window);JC.MultiChangeLogic=c;function c(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,c)){return JC.BaseMVC.getInstance(f,c)}JC.BaseMVC.getInstance(f,c,this);this._model=new c.Model(f);this._view=new c.View(this._model);this._init()}c.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.hasClass("js_bizsMultiChangeLogic")){g.push(new c(f))}else{f.find(".js_bizsMultiChangeLogic").each(function(){g.push(new c(this))})}}return g};JC.BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var g=this,f;g._model.bclTrigger().on("change",function(){var i=g._model.bclChangeCleanTarget(),h=$(this);if(i.length){$.each(i,function(){var j=$(this);if(/(input|textarea|select)/i.test(j.prop("nodeName").toLowerCase())){j.val("")}else{j.html("")}})}g.trigger("itemchange",[h])});g.on("itemchange",function(k,n){var l=n,h,j,m=g._model.isDisable(l),i=g._model.isDisplay(l);g._model.bclHideTarget().each(function(){var o=$(this);o[i?"show":"hide"]()});g._model.bclDisabledTarget().each(function(){var o=$(this);o.prop("disabled",m)});if(l.attr("bclselfdisplaytarget")){h=$(JC.f.parentSelector(n,l.attr("bclselfdisplaytarget")));$.each(h,function(){$(this).show()});if(l.attr("bclselfhidetarget")){j=$(JC.f.parentSelector(n,l.attr("bclselfhidetarget")));if(j.length){$.each(j,function(){var o=$(this);o.hide()})}}}if(l.attr("bclselfdisplayscript")){h=JC.f.scriptContent(l.attr("bclselfdisplayscript"));g._model.bclHideScriptBox()&&$(g._model.bclHideScriptBox()).html(h)}});g.on("checkboxchange",function(h,i){});if(g._model.bclTriggerChangeOnInit()){(f=g._model.bclTrigger(true))&&(!f.prop("disabled"))&&(f.trigger("change"))}},_inited:function(){JC.log("_inited:",new Date().getTime())}});c.Model._instanceName="MultiChangeLogic";JC.f.extendObject(c.Model.prototype,{init:function(){},bclTrigger:function(f){var g=$(JC.f.parentSelector(this.selector(),this.attrProp("bclTrigger")));if(f){$.each(g,function(){var h=$(this);if(h.prop("checked")||h.prop("selected")){g=h;return false}})}return g},bclDisabledTarget:function(){return $(JC.f.parentSelector(this.selector(),this.attrProp("bclDisabledTarget")))},bclHideTarget:function(){var f=$(JC.f.parentSelector(this.selector(),this.attrProp("bclHideTarget")));return f},bclChangeCleanTarget:function(){return $(JC.f.parentSelector(this.selector(),this.attrProp("bclChangeCleanTarget")))},bclTriggerChangeOnInit:function(){var g=true,f=this.selector().attr("bclTriggerChangeOnInit");f&&(g=this.boolProp("bclTriggerChangeOnInit"));return g},bclHideScriptBox:function(){return this.attrProp("bclHideScriptBox")},bclDelimiter:function(g){var f="||";this.selector().is("[bclDelimiter]")&&(f=this.selector().attr("bclDelimiter"));g&&g.is("[bclDelimiter]")&&(f=g.attr("bclDelimiter"));return f},bclDelimeterItem:function(f,g){return f.split(this.bclDelimiter(g))},isDisplay:function(k){var j=this,g=k,i,h=false,f;if(!g.length){return false}if(/(select)/i.test(g.prop("nodeName").toLowerCase())){i=g.find(":selected");if(!i.length){return false}if(g.attr("bcldisplay")){h=j.bclDelimeterItem(g.attr("bcldisplay"),g).indexOf(g.val())>-1}if(i.attr("bcldisplay")){h=JC.f.parseBool(i.attr("bcldisplay"))}}else{if(j.attrProp("bcldisplay")){h=j.bclDelimeterItem(j.attrProp("bcldisplay"),j.selector()).indexOf(g.val())>-1}f=g.attr("bcldisplay");f&&(h=JC.f.parseBool(f))}return h},isDisable:function(j){var i=this,f=j,h,g=false;if(!f.length){return false}if(/(select)/i.test(f.prop("nodeName").toLowerCase())){h=f.find(":selected");if(!h.length){return false}if(f.attr("bcldisabled")){g=i.bclDelimeterItem(f.attr("bcldisabled"),f).indexOf(f.val())>-1}if(h.attr("bcldisabled")){g=JC.f.parseBool(h.attr("bcldisabled"))}}else{if(i.attrProp("bcldisabled")){g=i.bclDelimeterItem(i.attrProp("bcldisabled"),i.selector()).indexOf(f.val())>-1}if(f.attr("bcldisabled")){g=JC.f.parseBool(f.attr("bcldisabled"))}}return g}});JC.f.extendObject(c.View.prototype,{init:function(){}});e.ready(function(){c.autoInit&&c.init()});return JC.MultiChangeLogic})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiDate/MultiDate.js b/deploy/bizs/MultiDate/MultiDate.js new file mode 100755 index 000000000..a5d33a3ce --- /dev/null +++ b/deploy/bizs/MultiDate/MultiDate.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC","JC.Calendar"],function(){window.Bizs.MultiDate=c;function c(d){if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.prototype={_beforeInit:function(){this._model.mdstartdate().attr("ignoreInitCalendarDate",true).data("ignoreInitCalendarDate",true);this._model.mdenddate().attr("ignoreInitCalendarDate",true).data("ignoreInitCalendarDate",true);JC.log("MultiDate _beforeInit",new Date().getTime())},_initHanlderEvent:function(){var d=this;$([d._view,d._model]).on("BindEvent",function(e,g,f){d.on(g,f)});$([d._view,d._model]).on("TriggerEvent",function(e,g){var f=JC.f.sliceArgs(arguments);f.shift();f.shift();d.trigger(g,f)});d._initDefaultValue();JC.f.safeTimeout(function(){d._initDefaultValue()},d.selector(),"as3asdfasew3asdf",201);d._initHandlerEvent();d.selector().trigger("change",[true])},_initDefaultValue:function(){var d=this,j=d._model.qstartdate(),k=d._model.qenddate(),i=d._model.mdCustomStartDate(),h=d._model.mdCustomEndDate(),g=d._model.qtype()||d._model.selector().val(),f=d._model.mdDefaultBox(),e=d._model.mdCustomBox();d._model.selector(d._model.qtype());d._model.mdstartdate(j);d._model.mdenddate(k);if(!d._model.mddate().attr("name")){if(j&&k){if(j==k){d._model.mddate(JC.f.formatISODate(JC.f.parseISODate(j)))}else{d._model.mddate(JC.f.printf("{0} 至 {1}",JC.f.formatISODate(JC.f.parseISODate(j)),JC.f.formatISODate(JC.f.parseISODate(k))))}}}else{d._model.mddate(d._model.qdate())}if(g!=="custom"&&d._model.mdlastdate()){d._model.setmaxdate(g)}i&&i.length&&i.val(j?JC.f.formatISODate(JC.f.parseISODate(j)):j);h&&h.length&&h.val(k?JC.f.formatISODate(JC.f.parseISODate(k)):k)},_initHandlerEvent:function(){var d=this;d._model.selector().on("change",function(g,j){var e=$(this),i=e.val().trim().toLowerCase(),h=d._model.mdDefaultBox(),f=d._model.mdCustomBox();if(i=="custom"){if(h&&f&&h.length&&f.length){h.hide();h.find("input").prop("disabled",true);f.find("input").prop("disabled",false);f.show()}}else{if(h&&f&&h.length&&f.length){f.hide();f.find("input").prop("disabled",true);h.find("input").prop("disabled",false);h.show()}if(d._model.mdlastdate()){d._model.setmaxdate(i)}if(j){return}d._model.settype(i);setTimeout(function(){JC.Calendar.pickDate(d._model.mddate()[0]);if(!d._model.setdefaulthiddendate()){d._model.mdstartdate("");d._model.mdenddate("")}},10)}})},_inited:function(){JC.log("MultiDate _inited",new Date().getTime())}};c.getInstance=function(d,e){if(typeof d=="string"&&!/ div.UXCCalendar:visible");i.length&&JC.Tips&&JC.Tips.init(i.find("[title]"))};d.mddate().attr("calendarshow",e);window[f]=function(){JC.Tips&&JC.Tips.hide();d.updateHiddenDate()};d.mddate().attr("calendarhide",f);window[h]=function(){JC.Tips&&JC.Tips.hide();var i=$("body > div.UXCCalendar:visible");i.length&&JC.Tips&&JC.Tips.init(i.find("[title]"))};d.mddate().attr("calendarlayoutchange",h);return d},mdDefaultBox:function(){return this.selectorProp("mdDefaultBox")},mdCustomBox:function(){return this.selectorProp("mdCustomBox")},mdCustomStartDate:function(){return this.selectorProp("mdCustomStartDate")},mdCustomEndDate:function(){return this.selectorProp("mdCustomEndDate")},selector:function(d){typeof d!="undefined"&&this.hastype(this.qtype())&&this._selector.val(d)&&this.settype(d);return this._selector},mdlastdate:function(){var d=this.selector().attr("mdlastdate");d=JC.f.parseBool(d);return d},mddate:function(d){var e=JC.f.parentSelector(this.selector(),this.selector().attr("mddate"));typeof d!="undefined"&&e.val(d);return e},mdstartdate:function(d){var e=JC.f.parentSelector(this.selector(),this.selector().attr("mdstartdate"));typeof d!="undefined"&&e.val(d.replace(/[^\d]/g,""));return e},mdenddate:function(d){var e=JC.f.parentSelector(this.selector(),this.selector().attr("mdenddate"));typeof d!="undefined"&&e.val(d.replace(/[^\d]/g,""));return e},setdefaulthiddendate:function(){return JC.f.parseBool(this.selector().attr("setdefaulthiddendate"))},qtype:function(){return this.decodedata(JC.f.getUrlParam(this.selector().attr("name")||"")||"").toLowerCase()},qdate:function(){return this.decodedata(JC.f.getUrlParam(this.mddate().attr("name")||"")||"").toLowerCase()},qstartdate:function(){return this.decodedata(JC.f.getUrlParam(this.mdstartdate().attr("name")||"")||"").toLowerCase()},qenddate:function(){return this.decodedata(JC.f.getUrlParam(this.mdenddate().attr("name")||"")||"").toLowerCase()},hastype:function(d){var e=false;this.selector().find("> option").each(function(){if($(this).val().trim()==d){e=true;return false}});return e},settype:function(d){this.mddate().val("").attr("multidate",d)},decodedata:function(d){d=d.replace(/[\+]/g," ");try{d=decodeURIComponent(d)}catch(e){}return d},updateHiddenDate:function(){var d=$.trim(this.mddate().val());if(!d){this.mdstartdate("");this.mdenddate("");return}d=d.replace(/[^\d]+/g,"");if(d.length==8){this.mdstartdate(d);this.mdenddate(d)}if(d.length==16){this.mdstartdate(d.slice(0,8));this.mdenddate(d.slice(8))}},setmaxdate:function(g){var e=this,i,h,d,f;switch(g){case"week":i=JC.f.dateDetect("now -1w");h=JC.f.formatISODate(JC.f.dayOfWeek(i).end);f=JC.f.formatISODate(JC.f.dayOfWeek(i).start)+"至"+h;break;case"month":i=JC.f.dateDetect("now -1m");h=JC.f.cloneDate(i);h.setDate(JC.f.maxDayOfMonth(i));h=JC.f.formatISODate(h);d=JC.f.cloneDate(i);d.setDate(1);f=JC.f.formatISODate(d)+"至"+h;break;case"season":i=JC.f.dayOfSeason(new Date()).q-2;i>0?i:0;h=JC.f.seasonOfYear(new Date().getFullYear())[i].end;h=JC.f.formatISODate(h);d=JC.f.formatISODate(JC.f.seasonOfYear(new Date().getFullYear())[i].start);f=d+"至"+h;break;case"date":h=new Date();h.setDate(h.getDate()-1);h=JC.f.formatISODate(h);f=h;break}e.mddate().attr("maxValue",h);if(e.setdefaulthiddendate()){setTimeout(function(){e.mddate().val(f)},30)}}};BaseMVC.buildView(c);c.View.prototype={init:function(){return this},hide:function(){},show:function(){}};BaseMVC.build(c,"Bizs");$(document).ready(function(){$("select.js_autoMultidate").each(function(){new c($(this))})});return Bizs.MultiDate})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiDate/index.php b/deploy/bizs/MultiDate/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/MultiDate/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MultiSelect/MultiSelect.js b/deploy/bizs/MultiSelect/MultiSelect.js new file mode 100755 index 000000000..81bdcb551 --- /dev/null +++ b/deploy/bizs/MultiSelect/MultiSelect.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){Bizs.MultiSelect=c;function c(e){e&&(e=$(e));if(JC.BaseMVC.getInstance(e,c)){return JC.BaseMVC.getInstance(e,c)}JC.BaseMVC.getInstance(e,c,this);this._model=new c.Model(e);this._view=new c.View(this._model);this._init()}c.init=function(e){var f=[];e=$(e||document);if(e&&e.length){if(e.hasClass("js_bizMultiSelect")){f.push(new c(e))}else{e.find("div.js_bizMultiSelect").each(function(){f.push(new c(this))})}}return f};c.dataFilter;BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){},_inited:function(){},show:function(){this._view.show();return this},hide:function(){this._view.hide();return this}});c.Model._instanceName="MultiSelectIns";c.Model.SHOW="SHOW";JC.f.extendObject(c.Model.prototype,{init:function(){},defaultLabel:function(){return this.attrProp("defaultLabel")},dataBindBox:function(){var e=this,f=e.attrProp("dataBindBox");return JC.f.parentSelector(e.selector(),f)},listBox:function(){return this.selector().find(".SELECTListBox")},ajaxUrl:function(){return this.attrProp("ajaxUrl")},ajaxData:function(){var e=this,h=e.ajaxUrl(),f=e.attrProp("dataname"),g=[],i=e.listBox();if(!h){return}g.push('
        • ');$.get(h,function(n){n=e.dataFilter($.parseJSON(n));var m=0,j=n.length,o="",k;for(m=0;m";g.push(o)}g.push("
        ");$(g.join(" ")).prependTo(i);JC.f.autoInit&&JC.f.autoInit(i)})},dataFilter:function(f){var e=this,g=e.callbackProp("dataFilter")||c.dataFilter;g&&(f=g(f));return f},dataList:function(){var e=this,f=e.listBox().find(">ul>li").not(".SELECTIgnore"),g=[];(f.length===0)&&e.ajaxUrl()&&e.ajaxData();f.each(function(){var h=$(this),j="",i=h.find("input");if(i.prop("checked")){j="
      • "+i.data("text")+"
      • ";g.push(j)}});return g},bindData:function(){var e=this,h=e.dataBindBox(),i=e.dataList(),f=i.length,j=e.defaultLabel(),g="";h.html("
          "+i.join(" ")+"
        ");g=f?"已选择"+f+"个"+j:"请选择"+j;e.selector().find(".SELECTLabel").html(g)}});JC.f.extendObject(c.View.prototype,{init:function(){},show:function(){var e=this,f=e._model.selector();JC.f.safeTimeout(setTimeout(function(){},50),f,"SELECTListBoxUi");f.addClass("SELECTBOX-active");e._model.listBox().show().css({"z-index":ZINDEX_COUNT++})},hide:function(){var e=this,f=e._model.selector();e._model.listBox().hide();JC.f.safeTimeout(setTimeout(function(){f.removeClass("SELECTBOX-active");e._model.bindData()},50),f,"SELECTListBoxUi")}});var d=$(document);d.ready(function(){var e=0;c.autoInit&&(e=c.init())});d.delegate(".js_bizMultiSelect","click",function(){var e=$(this),f;JC.f.safeTimeout(function(){f=JC.BaseMVC.getInstance(e,c);!f&&(f=new c(e));f.show()},e,"bizMultiSelectClick",50)});d.on("mousedown",function(){JC.f.safeTimeout(function(){$(".js_bizMultiSelect").each(function(){var e=JC.BaseMVC.getInstance($(this),c);e&&e.hide()})},null,"CLOSE_MULTI_SELECT")});d.delegate(".SELECTCloseBtn","mousedown",function(){var e=JC.BaseMVC.getInstance(JC.f.getJqParent($(this),".js_bizMultiSelect"),c);e&&e.hide()});d.delegate(".js_bizMultiSelect>.SELECTListBox","mousedown",function(e){e.stopPropagation()});return Bizs.MultiSelect})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiSelect/index.php b/deploy/bizs/MultiSelect/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/bizs/MultiSelect/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MultiSelect/res/default/style.css b/deploy/bizs/MultiSelect/res/default/style.css new file mode 100755 index 000000000..80176ed7e --- /dev/null +++ b/deploy/bizs/MultiSelect/res/default/style.css @@ -0,0 +1 @@ +.red{color:red}.SELECTBOX{width:260px;height:19px;overflow:hidden;border:1px solid #ccc;padding:1px 1px 0;margin:0;background:#fff;position:relative;font-size:12px}.SELECTBOX-active{overflow:visible}.SELECTBOX .SELECTLabel{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 0 0 3px;margin:0;line-height:18px;color:#444;margin-right:20px;cursor:pointer}.SELECTBOX .SELECTIcon{position:absolute;display:block;right:1px;top:1px;width:17px;height:18px;background:url(http://p5.qhimg.com/d/inn/6ec56c0d/sel-aro.png) no-repeat;overflow:hidden;padding:0;margin:0;font-size:0;line-height:0;float:right}.SELECTBOX:hover .SELECTIcon{background-position:0 -18px}.SELECTBOX-disabled{border:1px solid #ddd;background:#f0f0f0}.SELECTBOX-disabled .SELECTLabel{color:#666;cursor:default}.SELECTBOX-disabled:hover .SELECTIcon{background-position:0 0}.SELECTBOX-disabled .SELECTIcon{filter:alpha(opacity=70);opacity:.7}.SELECTListBox{display:none;background:#fff;width:100%;border:1px solid #ccc;position:absolute;left:-1px;top:19px;overflow-x:auto}.SELECTListBox ul{list-style:none;padding:0;margin:0;max-height:200px;overflow-y:scroll}.SELECTListBox li{padding:0;vertical-align:middle;float:none;display:block}.SELECTListBox li label{padding:4px 8px;display:block !important}.SELECTListBox li input{margin:0 3px 0 0;vertical-align:-3px}.SELECTClose{border-top:1px solid #ccc;text-align:right;padding:2px 10px} \ No newline at end of file diff --git a/deploy/bizs/MultiSelectTree/MultiSelectTree.js b/deploy/bizs/MultiSelectTree/MultiSelectTree.js new file mode 100755 index 000000000..26d9ca182 --- /dev/null +++ b/deploy/bizs/MultiSelectTree/MultiSelectTree.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common","JC.Tree"],function(){JC.use&&!JC.Tree&&JC.use("JC.Tree");Bizs.MultiSelectTree=c;function c(d,g,e,f){this._tree=new JC.Tree(d,g);this._getSelected=e;this._renderTpl=f}c.prototype={expandChild:function(e){var h=$(e.target);var d=h.attr("dataid");if(this._tree._model.hasChild(d)){this._tree._view.open(d);var g=this._tree._model.child(d);for(var f=0;f{1}',f[0],f[1]))});this._tree.on("change",this.update.bind(this));this._tree.init();return this._tree},tree:function(){return this._tree}};return JC.MultiSelectTree})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiSelectTree/res/default/images/closed.gif b/deploy/bizs/MultiSelectTree/res/default/images/closed.gif new file mode 100755 index 000000000..07b89a21c Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/closed.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/closed_last.gif b/deploy/bizs/MultiSelectTree/res/default/images/closed_last.gif new file mode 100755 index 000000000..71adab60a Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/closed_last.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/open.gif b/deploy/bizs/MultiSelectTree/res/default/images/open.gif new file mode 100755 index 000000000..319ccc9f4 Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/open.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/open_last.gif b/deploy/bizs/MultiSelectTree/res/default/images/open_last.gif new file mode 100755 index 000000000..cba44f082 Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/open_last.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/root.gif b/deploy/bizs/MultiSelectTree/res/default/images/root.gif new file mode 100755 index 000000000..14d302547 Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/root.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/root_plus.gif b/deploy/bizs/MultiSelectTree/res/default/images/root_plus.gif new file mode 100755 index 000000000..bb3ea2f44 Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/root_plus.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/treeline.gif b/deploy/bizs/MultiSelectTree/res/default/images/treeline.gif new file mode 100755 index 000000000..ce41c2ab3 Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/treeline.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/treeline1.gif b/deploy/bizs/MultiSelectTree/res/default/images/treeline1.gif new file mode 100755 index 000000000..cbf413392 Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/treeline1.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/images/treeline2.gif b/deploy/bizs/MultiSelectTree/res/default/images/treeline2.gif new file mode 100755 index 000000000..32bd0b78a Binary files /dev/null and b/deploy/bizs/MultiSelectTree/res/default/images/treeline2.gif differ diff --git a/deploy/bizs/MultiSelectTree/res/default/style.css b/deploy/bizs/MultiSelectTree/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/deploy/bizs/MultiUpload/MultiUpload.js b/deploy/bizs/MultiUpload/MultiUpload.js new file mode 100755 index 000000000..fe4b52db5 --- /dev/null +++ b/deploy/bizs/MultiUpload/MultiUpload.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.AjaxUpload"],function(){Bizs.MultiUpload=c;JC.use&&!JC.AjaxUpload&&JC.use("JC.AjaxUpload");function c(d){d&&(d=$(d));if(JC.BaseMVC.getInstance(d,c)){return JC.BaseMVC.getInstance(d,c)}JC.BaseMVC.getInstance(d,c,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init();JC.log(c.Model._instanceName,"all inited",new Date().getTime())}c.init=function(d){var e=[];d=$(d||document);if(d&&d.length){if(d.hasClass("js_bizMultiUpload")){e.push(new c(d))}else{d.find("div.js_bizMultiUpload").each(function(){e.push(new c(this))})}}return e};BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var d=this;d.on("inited",function(){d._model.saveAjaxUploadHandler();d._model.injectAjaxHandler();d.trigger("CheckItemLimit")});d.on("AjaxDone",function(g,f,h,j){var i=d._model.bmuTpl(),e=d._model.bmuBoxSelector();if(!(e&&e.length)){return}if(f.errorno){return}d._view.newItem(f,i,e)});d.on("ItemAdded",function(h,e,g,f){JC.f.safeTimeout(function(){d.trigger("CheckItemLimit")},d,"OnItemAdded",10);d._model.bmuItemAddedCallback()&&d._model.bmuItemAddedCallback().call(d,e,g,f)});d.on("ItemDeleted",function(e,f){d._model.bmuItemDeletedCallback()&&d._model.bmuItemDeletedCallback().call(d,f,d._model.bmuBoxSelector())});d.on("CheckItemLimit",function(){d._view.checkItemLimit()});d._model.bmuBoxSelector().delegate(d._model.bmuRemoveDelegate(),"click",function(){var e=JC.f.parentSelector(this,d._model.bmuRemoveItemParentSelector());e&&e.length&&e.remove();d.updateStatus();d.trigger("ItemDeleted",[this])})},_inited:function(){this.trigger("inited")},updateStatus:function(){this.trigger("CheckItemLimit");return this}});c.Model._instanceName="MultiUpload";c.Model._insCount=1;c.Model._handlerPrefix="bizMultiUploadHandler_";JC.f.extendObject(c.Model.prototype,{init:function(){this._id=c.Model._insCount++},bmuItemLimit:function(){return this.intProp("bmuItemLimit")},id:function(d){typeof d!="undefined"&&(this._id=d);return this._id},bmuBoxSelector:function(){var d=this._bmuBoxSelector||this.selectorProp("bmuBoxSelector");!(d&&d.length)&&(d=this.selector().find(".bmuBoxSelector"));if(!(d&&d.length)){d=this._bmuBoxSelector=$('
        ');this._bmuBoxSelector.appendTo(this.selector())}return d},bmuTplSelector:function(){var d=this.selectorProp("bmuTplSelector");!(d&&d.length)&&(d=this.selector().find(".bmuTplSelector"));return d},bmuTpl:function(){var e=['
        ','','',' ',"
        "].join(""),d=this.bmuTplSelector();d&&d.length&&(e=JC.f.scriptContent(d));return e},bmuAjaxUploadSelector:function(){var d=this.selectorProp("bmuAjaxUploadSelector");!(d&&d.length)&&(d=this.selector().find(".js_compAjaxUpload"));return d},ajaxUploadIns:function(){var d;this.bmuAjaxUploadSelector()&&this.bmuAjaxUploadSelector().length&&(d=JC.BaseMVC.getInstance(this.bmuAjaxUploadSelector(),JC.AjaxUpload));return d},bmuItemDelegate:function(){return this.attrProp("bmuItemDelegate")||">"},bmuItems:function(){return this.bmuBoxSelector().find(this.bmuItemDelegate())},bmuRemoveDelegate:function(){return this.attrProp("bmuRemoveDelegate")||".js_removeUploadItem"},bmuRemoveItemParentSelector:function(){return this.attrProp("bmuRemoveItemParentSelector")||"("},saveAjaxUploadHandler:function(){this._ajaxUploadDoneHandler=this.windowProp(this.bmuAjaxUploadSelector(),"cauUploadDoneCallback");this._ajaxUploadErrorHandler=this.windowProp(this.bmuAjaxUploadSelector(),"cauUploadErrorCallback")},ajaxUploadDoneHandler:function(){return this._ajaxUploadDoneHandler},ajaxUploadErrorHandler:function(){return this._ajaxUploadErrorHandler},injectAjaxHandler:function(){var e=this,d=c.Model._handlerPrefix,h=d+"done"+this.id(),g=d+"error"+this.id(),f=d+"cancel"+this.id();this.setAjaxUplaodHandler(h,"cauUploadDoneCallback",function(j,i){var k=this;e.ajaxUploadDoneHandler()&&e.ajaxUploadDoneHandler().call(k,j,i);e.trigger("AjaxDone",[j,i,k])});this.setAjaxUplaodHandler(g,"cauBeforeUploadErrCallback",function(){JC.f.safeTimeout(function(){e.trigger("CheckItemLimit")},e,"OnError",10)});this.setAjaxUplaodHandler(f,"cauCancelCallback",function(){JC.f.safeTimeout(function(){e.trigger("CheckItemLimit")},e,"OnCancel",10)})},setAjaxUplaodHandler:function(d,f,e){window[d]=e;this.bmuAjaxUploadSelector().attr(f,d)},bmuItemAddedCallback:function(){return this.callbackProp("bmuItemAddedCallback")},bmuItemDeletedCallback:function(){return this.callbackProp("bmuItemDeletedCallback")}});JC.f.extendObject(c.View.prototype,{init:function(){},newItem:function(f,g,e){JC.dir(f);g=JC.f.printf(g,f.data.url,f.data.name);var d=$(g);d.appendTo(e);this.trigger("ItemAdded",[d,f,e]);JC.f.autoInit&&JC.f.autoInit(d)},checkItemLimit:function(){var d=this,f=this._model.bmuItemLimit(),g,e=d._model.ajaxUploadIns();if(!f){return}g=d._model.bmuItems();g=g||[];if(!e){return}if(g.length>=f){e.disable()}else{e.enable()}}});$(document).ready(function(){c.autoInit&&JC.f.safeTimeout(function(){c.init()},null,"MultiUploadInit",2)});return Bizs.MultiUpload})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiUpload/index.php b/deploy/bizs/MultiUpload/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/deploy/bizs/MultiUpload/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/bizs/MultiUpload/res/default/style.css b/deploy/bizs/MultiUpload/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/deploy/bizs/MultiselectPanel/MultiselectPanel.js b/deploy/bizs/MultiselectPanel/MultiselectPanel.js new file mode 100755 index 000000000..c5bd681c9 --- /dev/null +++ b/deploy/bizs/MultiselectPanel/MultiselectPanel.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC","JC.Panel"],function(){var d=$(document),c=$(window);Bizs.MultiselectPanel=e;function e(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,e)){return JC.BaseMVC.getInstance(f,e)}JC.BaseMVC.getInstance(f,e,this);this._model=new e.Model(f);this._view=new e.View(this._model);this._init();JC.log(e.Model._instanceName,"all inited",new Date().getTime())}e.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.hasClass("js_bizMultiselectPanel")){g.push(new e(f))}else{f.find("input.js_bizMultiselectPanel, button.js_bizMultiselectPanel").each(function(){g.push(new e(this))})}}return g};JC.BaseMVC.build(e);JC.f.extendObject(e.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var f=this;f.on("inited",function(){f.trigger("init_top")});var g=new JC.Panel(f._model.panel());f._model.panelIns(g);g.on("close",function(h,i){i.hide();return false});g.on("hide",function(){JC.f.safeTimeout(function(){f.trigger("updateStatus")},f.selector(),"HIDE_PANEL",50)});g.on("beforeshow",function(){JC.hideAllPanel()});g.layout().on("click",function(h){JC.f.safeTimeout(function(){f.trigger("saveParentId")},f.selector(),"HIDE_PANEL",50)});if(f._model.popupHideButton()){g.offsetTop(-f.selector().prop("offsetHeight")-1)}f.selector().on("click",function(h){g.show(f.selector())});f.on("init_top",function(h){f._model.initTop();f.trigger("saveParentId")});f.on("updateTop",function(i,j,h){f._view.buildTop(j);f.trigger("saveParentId")});f.on("updateChild",function(i,j,k,h){f._view.buildChild(j,k);var l=f._model.getCkItem(j);f._view.topCk(j,l.prop("checked"))});g.layout().delegate("."+f._model.openClass(),"click",function(i){var h=$(this),j=h.data("id");h.addClass(f._model.closeClass()).removeClass(f._model.openClass());f._view.showChild(j);f.trigger("initChildBox",[j])});f.on("initChildBox",function(h,i){if(!f._model.getChildBox(i).data("inited")){f._model.getChildBox(i).data("inited",true);f._model.initChild(i)}});g.layout().delegate("."+f._model.closeClass(),"click",function(i){var h=$(this),j=h.data("id");h.addClass(f._model.openClass()).removeClass(f._model.closeClass());f._view.hideChild(j)});g.layout().delegate("input.js_bmspTopCk","change",function(i){var h=$(this),j=h.val();f._view.topCk(j,h.prop("checked"));h.prop("checked")&&f.trigger("initChildBox",[j])});g.layout().delegate("input.js_bmspChildCk","change",function(i){var h=$(this),j=h.val(),k=h.data("parentid");f._view.childCk(k,j)});f.on("updateStatus",function(i){var h=g.find("input.js_bmspChildCk:checked");if(h.length){f.selector().val(JC.f.printf(f._model.hasItemText(),h.length))}else{f.selector().val(f._model.noItemText())}f.trigger("saveParentId")});f.on("saveParentId",function(h){var k=f._model.saveTopIdSelector();if(k&&k.length){var l=f._model.panelIns().find("input.js_bmspTopCk:checked"),j=f._model.panelIns().find("input.js_bmspChildCk:checked"),i={},m=[];l.each(function(){var n=$(this).val();if(!(n in i)){m.push(n)}i[n]=""});j.each(function(){var n=$(this).data("parentid");if(!(n in i)){m.push(n)}i[n]=""});k.val(m.join(","))}})},_inited:function(){this.trigger("inited")}});e.Model._instanceName="JCMultiselectPanel";JC.f.extendObject(e.Model.prototype,{init:function(){},url:function(){return this.attrProp("bmspUrl")},childUrl:function(){return this.attrProp("bmspChildUrl")},popupHideButton:function(){return this.boolProp("bmspPopupHideButton")},panel:function(){return this.selectorProp("bmspPanel")},panelIns:function(f){typeof f!="undefined"&&(this._panelIns=f);return this._panelIns},panelBoxSelector:function(){return this.panelIns().find(this.attrProp("bmspPanelBoxSelector")||"js_bmspPanelBox")},topTpl:function(){return this.scriptTplProp("bmspTopTpl")},childTpl:function(){return this.scriptTplProp("bmspChildTpl")},childBox:function(f){return f.find(".js_bmspChildBox")},openClass:function(){return this.attrProp("bmspOpenClass")},closeClass:function(){return this.attrProp("bmspCloseClass")},openSelector:function(){return this.selectorProp("."+this.openClass())},closeSelector:function(){return this.selectorProp("."+this.closeClass())},saveTopIdSelector:function(){return this.selectorProp("bmspSaveTopIdSelector")},initTop:function(){var f=this,g;$.get(f.url()).done(function(h){g=$.parseJSON(h);g&&!g.errorno&&g.data&&f.trigger("updateTop",[g.data,h])})},initChild:function(g){var f=this,h;$.get(JC.f.printf(f.childUrl(),g)).done(function(i){h=$.parseJSON(i);h&&!h.errorno&&h.data&&f.trigger("updateChild",[g,h.data,i])})},getChildBox:function(f){return this.panelIns().find(JC.f.printf(".js_bmspChildBox[data-id={0}]",f))},getIcon:function(f){return this.panelIns().find(JC.f.printf(".js_bmspIcon[data-id={0}]",f))},getCkItem:function(f){return this.panelIns().find(JC.f.printf("input.js_bmspCkItem[value={0}]",f))},noItemText:function(){return this.attrProp("bmspNoItemText")},hasItemText:function(){return this.attrProp("bmspHasItemText")}});JC.f.extendObject(e.View.prototype,{init:function(){},buildTop:function(h){var f=this,i=f._model.panelBoxSelector(),g=f._model.topTpl(),j=[];$.each(h,function(l,k){j.push(JC.f.printf(g,k[0],k[1]))});i.html(j.join(""))},buildChild:function(h,i){var f=this,j=f._model.getChildBox(h),g=f._model.childTpl(),k=[];$.each(i,function(m,l){k.push(JC.f.printf(g,l[0],l[1],h))});j.html(k.join(""))},showChild:function(f){this._model.getChildBox(f).show()},hideChild:function(f){this._model.getChildBox(f).hide()},topCk:function(g,f){var h=this._model.getChildBox(g);h.find("input.js_bmspChildCk").prop("checked",f)},childCk:function(j,h){var f=this,i=this._model.getChildBox(j),g=f._model.getCkItem(j);if(i.find("input.js_bmspChildCk:not(:checked)").length){g.prop("checked",false)}else{g.prop("checked",true)}}});c.on("BMSP_AUTO_FILL_DEFAULT_DATA",function(h,g){var f,j,i;if(!(g&&g.length&&g.attr("bmspDefaultFillData")&&(i=window[g.attr("bmspDefaultFillData")]))&&i.parents){return}c.trigger("BMSP_AUTO_FILL",[g,i.parents,i.children])});c.on("BMSP_AUTO_FILL_URL_DATA",function(h,g){var f,i;if(!(g.attr("bmspAutoFillTopKey")&&(f=JC.f.getUrlParams(g.attr("bmspAutoFillTopKey")))&&f.length)){return}f=decodeURIComponent(f).split(",");i=JC.f.getUrlParams(g.attr("bmspAutoFillChildKey"));c.trigger("BMSP_AUTO_FILL",[g,f,i])});c.on("BMSP_AUTO_FILL",function(h,g,f,j){if(!(g&&g.length&&f&&f.length)){return}var k,i;i=JC.BaseMVC.getInstance(g,Bizs.MultiselectPanel)||new Bizs.MultiselectPanel(g);k=f.slice();i.on("updateTop",function(){if(f.length){var l=f.shift();i.trigger("initChildBox",[l]);i._model.getIcon(l).trigger("click");i.on("updateChild",function(){if(f.length){l=f.shift();i.trigger("initChildBox",[l]);i._model.getIcon(l).trigger("click")}else{if(k.length){if(j&&j.length){j&&j.length&&$.each(j,function(n,m){i._model.getCkItem(m).prop("checked",true)});$.each(k,function(n,m){i._view.childCk(m)});i.trigger("updateStatus")}k=[]}}})}})});d.ready(function(){d.delegate("input.js_bizMultiselectPanel","click",function(g){var f=$(this),h;if(!JC.BaseMVC.getInstance(f,Bizs.MultiselectPanel)){h=new Bizs.MultiselectPanel(f);h._model.panelIns().show(f)}});$("input.js_bizMultiselectPanel").each(function(){var f=$(this);if(f.attr("bmspDefaultFillData")&&window[f.attr("bmspDefaultFillData")]){c.trigger("BMSP_AUTO_FILL_DEFAULT_DATA",[f])}else{if(f.attr("bmspAutoFillTopKey")){c.trigger("BMSP_AUTO_FILL_URL_DATA",[f])}}})});return Bizs.MultiselectPanel})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/MultiselectPanel/res/default/style.css b/deploy/bizs/MultiselectPanel/res/default/style.css new file mode 100755 index 000000000..9adf628cb --- /dev/null +++ b/deploy/bizs/MultiselectPanel/res/default/style.css @@ -0,0 +1 @@ +.js_bmspPanelBox{border:0 solid #ddd;width:100%;height:279px;left:-1px;top:22px;background:#fff;z-index:1000;overflow:auto;padding:5px 10px}.js_bmspPanelBox dl{clear:both;padding:3px 0}.js_bmspPanelBox dt{float:left}.js_bmspIconOpen,.js_bmspIconClose{display:inline-block;width:9px;height:9px;cursor:pointer;vertical-align:middle;background:url(http://p7.qhimg.com/d/inn/7318fb3f/open.png)}.js_bmspIconClose{background:url(http://p4.qhimg.com/d/inn/fe78aa78/colos.png)}.js_bmspPanelBox dd{overflow:hidden;zoom:1;padding:5px 0 0 8px}.js_bmspPanelBox ul{border:1px solid #ccc;overflow:hidden;zoom:1;padding:5px 10px;display:none}.js_bmspPanelBox li{float:left;padding-right:12px;white-space:nowrap;list-style-type:none}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none} \ No newline at end of file diff --git a/deploy/bizs/TaskViewer/TaskViewer.js b/deploy/bizs/TaskViewer/TaskViewer.js new file mode 100755 index 000000000..8c4fc2f7e --- /dev/null +++ b/deploy/bizs/TaskViewer/TaskViewer.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){window.Bizs.TaskViewer=c;JC.f.addAutoInit&&JC.f.addAutoInit(c);function c(d){d&&(d=$(d));if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.getInstance=function(d,e){if(typeof d=="string"&&!/已选天数
        星期日期
        ',h="";for(g=0;g'+f.charAt(g%7)+""}e+="";return e},buildMonthTpl:function(){var e=this,q,l,g,k,m,f,h,n,o="",j="";for(q in e.allMonths){l=JC.f.dateDetect(e.allMonths[q]);m=l.getFullYear();k=l.getMonth();h=JC.f.maxDayOfMonth(l);o="";n=new Date(m,k,1).getDay();while(n--){o+=" ";if(n<=0){break}}j+=' '+m+"年"+(k+1)+"月"+o;for(g=1;g<=h;g++){f=new Date(m,k,g);j+=''+g+""}j+=""}return""+j+""},allDays:{},allMonths:{}});JC.f.extendObject(c.View.prototype,{init:function(){return this},layout:function(){var f=this,e='',d;e=e+f._model.buildMonthTpl();f._model.selector().append(e);d=f.fixLayout();f._model.selector().find(".COMP_task_view>thead").append(f._model.buildHeaderTpl(d));f.setSelected()},fixLayout:function(){var g=this,f=g.selector().find(".COMP_task_view>tbody>tr"),e=0,d=[];f.each(function(){d.push($(this).find("td").length)});e=Math.max.apply(Math,d);f.each(function(j){var m=$(this),h=m.find("td").length,k=0,n="";if(e>h){k=e-h;while(k--){n+=""}m.append(n)}});return e-2},setSelected:function(){var i=this,j=i._model.allDays,e=i._model.selector(),h=e.find(".COMP_task_view>tbody"),g=h.find(".date"),d=h.find("tr"),f;$.each(j,function(l,s){var n=0,q=0,k=0,m=0,p=0,r="",o=h.find("tr."+l);$.each(s,function(v,u){var x=JC.f.dateDetect(u.start).getTime(),t=JC.f.dateDetect(u.end).getTime(),w=u.type;o.find(".date").each(function(){var y=$(this),z=JC.f.dateDetect(y.data("date")).getTime();if(z>=x&&z<=t){y.addClass(w)}});n=o.find(".selected").length;q=o.find(".added").length;k=o.find(".deleted").length;p=n+k;m=p+q-k;if(q||k){r=''+m+'天'+p+"天"}else{r=""+n+"天"}o.find("td").eq(0).html(r)})})}});$(document).ready(function(){var d=0;c.autoInit&&(d=c.init())});return Bizs.TaskViewer})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/bizs/TaskViewer/res/default/style.css b/deploy/bizs/TaskViewer/res/default/style.css new file mode 100755 index 000000000..2dc221230 --- /dev/null +++ b/deploy/bizs/TaskViewer/res/default/style.css @@ -0,0 +1 @@ +.COMP_task_view{width:100%;border-spacing:0;border-collapse:collapse;border:0;width:100%;background:#fff}.COMP_task_view th,.COMP_task_view td{font-size:12px;font-weight:normal;text-align:center !important;padding:5px !important;border:1px solid #e4e4e4;color:#999;vertical-align:middle !important;line-height:1 !important}.COMP_task_view td{height:29px}.COMP_task_view_slash{border-top:30px #FFF solid;width:0;height:0;border-left:80px #f2f2f2 solid;position:relative}.COMP_task_view_counter{background:#e2eee2;color:#333}.COMP_task_view_date{background:#f2f2f2}.COMP_task_view_slash b{font-weight:normal;top:-25px;left:-30px}.COMP_task_view_slash em{top:-17px;left:-75px;font-style:normal}.COMP_task_view_slash b,.COMP_task_view_slash em{position:absolute}.COMP_task_view .selected{color:#fff;background:#029502;border-color:#7ab57a}.COMP_task_view .added{color:#fff;background:#fe7575;border-color:#f0b0b0}.COMP_task_view .deleted{color:#fff;background:#84c884;border-color:#b8d3b8;text-decoration:line-through}.COMP_task_view_counter span{display:block}.COMP_task_view .defaultDays{text-decoration:line-through}.COMP_task_view .updatedDays{color:#F00}td.COMP_task_view_date,td.COMP_task_view_counter,.COMP_task_view .weekend{color:#333}.COMP_task_view_counter span{display:block}.TaskViewerLabel{font-size:12px;margin:8px auto}.TaskViewerLabel button{border:0;background:transparent;width:16px;margin-right:4px;height:12px;margin-bottom:4px;vertical-align:middle}.TaskViewerLabel .lselected{color:#029502}.TaskViewerLabel .lselected button{background:#029502}.TaskViewerLabel label{margin-right:5px}.TaskViewerLabel .ladded{color:#fe7575}.TaskViewerLabel .ladded button{background:#fe7575}.TaskViewerLabel .ldeleted{color:#84c884;text-decoration:line-through}.TaskViewerLabel .ldeleted button{background:#84c884} \ No newline at end of file diff --git a/deploy/common.js b/deploy/common.js new file mode 100755 index 000000000..e843560e2 --- /dev/null +++ b/deploy/common.js @@ -0,0 +1 @@ +(function(b,a){b("JC.common",[],function(){window.JWIN=window.JWIN||$(window);window.JDOC=window.JDOC||$(document);!window.console&&(window.console={log:function(){window.status=Y(arguments).join(" ")}});!console.dir&&(console.dir=function(){});!console.error&&(console.error=function(){});window.JC=window.JC||{};JC.log=function(){JC.debug&&console.log(Y(arguments).join(" "))};JC.dir=function(){JC.debug&&$.each(Y(arguments),function(ah,ag){console.dir(ag)})};JC.error=function(){JC.debug&&$.each(Y(arguments),function(ah,ag){console.error(ag)})};JC.clear=function(){console.clear&&console.clear()};JC.PATH=JC.PATH||ae();window.Bizs=window.Bizs||{};JC.common=JC.f={addUrlParams:N,cloneDate:V,dateDetect:w,delUrlParam:u,delUrlParams:z,easyEffect:ad,filterXSS:X,formatISODate:y,funcName:l,getJqParent:r,getUrlParam:af,getUrlParams:M,hasUrlParam:q,urlHostName:E,httpRequire:P,isSameDay:Z,isSameWeek:k,isSameMonth:ac,isSameSeason:F,isSameYear:p,weekOfYear:R,seasonOfYear:c,dayOfWeek:x,dayOfSeason:o,jcAutoInitComps:n,autoInit:n,addAutoInit:A,_AUTO_INIT_DATA:{},maxDayOfMonth:O,mousewheelEvent:B,padChar:L,parentSelector:m,parseBool:s,parseFinance:t,parseISODate:D,parseDate:j,printf:h,printKey:aa,cloneObject:g,pureDate:d,reloadPage:i,removeUrlSharp:Q,relativePath:K,scriptContent:I,scriptPath:ae,sliceArgs:Y,urlDetect:ab,moneyFormat:U,dateFormat:H,extendObject:e,safeTimeout:J,encoder:T,fixPath:v,arrayId:W,docSize:G,winSize:C,gid:S,backward:function(ah){if(window.JC_BACKWARD||ah){for(var ag in JC.common){if(ag=="backward"){continue}window[ag]=window[ag]||JC.common[ag]}}},has_url_param:q,add_url_params:N,get_url_param:af,del_url_param:u,reload_page:i,parse_finance_num:t,pad_char_f:L,script_path_f:ae,ts:function(){return new Date().getTime()}};JC.f.backward();!String.prototype.trim&&(String.prototype.trim=function(){return $.trim(this)});!Array.prototype.indexOf&&(Array.prototype.indexOf=function(ag){var ah=-1;$.each(this,function(aj,ai){if(ai==ag){ah=aj;return false}});return ah});!Array.prototype.first&&(Array.prototype.first=function(){var ag;this.length&&(ag=this[0]);return ag});!Array.prototype.last&&(Array.prototype.last=function(){var ag;this.length&&(ag=this[this.length-1]);return ag});window.ZINDEX_COUNT=window.ZINDEX_COUNT||50001;function v(ag){if(/\\/.test(ag)){ag=ag.replace(/[\\]+/g,"\\")}else{ag=ag.replace(/[\/]+/g,"/")}return ag}function W(aj){var ak=[],ai={};for(var ah=0,ag=aj.length;ah-1&&(aj=ai.split("#")[1],ai=ai.split("#")[0]);for(var ag in ah){ai=u(ai,ag);ai.indexOf("?")>-1?ai+="&"+ag+"="+ah[ag]:ai+="?"+ag+"="+ah[ag]}aj&&(ai+="#"+aj);ai=X(ai.replace(/\?\&/g,"?"));return ai}function X(ag){ag&&(ag=ag.replace(//g,">"));return ag}function af(ah,ai){var al="",aj,ag,ak;!ai&&(ai=ah,ah=location.href);ah.indexOf("#")>-1&&(ah=ah.split("#")[0]);if(ah.indexOf("?")>-1){aj=ah.split("?")[1].split("&");for(ag=0;ag1){aj=aj[1];ag=aj.split("&");if(ag.length){for(ai=0,ah=ag.length;ai-1&&(am=ai.split("#")[1],ai=ai.split("#")[0]);if(ai.indexOf("?")>-1){an=ai.split("?")[1].split("&");ai=ai.split("?")[0];for(ah=0;ah=ag){return ai}ai=new Array(ag+1).join(ah)+ai;return ai.slice(ai.length-ag)}function y(ag,ah){ag=ag||new Date();typeof ah=="undefined"&&(ah="-");return[ag.getFullYear(),L(ag.getMonth()+1),L(ag.getDate())].join(ah)}function D(ag){if(!ag){return}ag=ag.replace(/[^\d]+/g,"");var ah;if(ag.length===8){ah=new Date(ag.slice(0,4),parseInt(ag.slice(4,6),10)-1,parseInt(ag.slice(6),10))}else{if(ag.length===6){ah=new Date(ag.slice(0,4),parseInt(ag.slice(4,6),10)-1,1)}}return ah}function j(ah,ag,aj){if(!ah){return null}var ai=D;ag&&!aj&&(ag=$(ag)).length&&ag.attr("dateParse")&&(ai=window[ag.attr("dateParse")]||ai);ah=ai(ah);ah&&ah.start&&(ah=ah.start);return ah}function d(ag){var ah;ag=ag||new Date();ah=new Date(ag.getFullYear(),ag.getMonth(),ag.getDate());return ah}function V(ag){var ah=new Date();ah.setTime(ag.getTime());return ah}function Z(ah,ag){return[ah.getFullYear(),ah.getMonth(),ah.getDate()].join()===[ag.getFullYear(),ag.getMonth(),ag.getDate()].join()}function ac(ah,ag){return[ah.getFullYear(),ah.getMonth()].join()===[ag.getFullYear(),ag.getMonth()].join()}function k(aj,ag){var ai=[],al=false,ak=0,ah;ai=R(aj.getFullYear());aj=aj.getTime();ag=ag.getTime();for(ak=0,ah=ai.length;ak=ai[ak].start&&aj<=ai[ak].end)&&(ag>=ai[ak].start&&ag<=ai[ak].end)){console.log(ak,aj,ai[ak]);return true}}return al}function F(aj,ah){var ag=[],al=false,ak=0,ai;if(!p(aj,ah)){return false}ag=c(aj.getFullYear());aj=aj.getTime();ah=ah.getTime();for(ak=0,ai=ag.length;ak=ag[ak].start&&aj<=ag[ak].end)&&(ah>=ag[ak].start&&ah<=ag[ak].end)){return true}}return al}function p(ah,ag){return ah.getFullYear()===ag.getFullYear()}function R(aj,ai){var al=[],ak,ah=1,ai=ai||0,aj=parseInt(aj,10),ag=new Date(aj,0,1);ag.getDay()>1&&ag.setDate(ag.getDate()-ag.getDay()+7);ag.getDay()===0&&ag.setDate(ag.getDate()+1);ai>0&&(ai=(new Date(2000,1,2)-new Date(2000,1,1))*ai);while(ag.getFullYear()<=aj){ak={week:ah++,start:null,end:null};ak.start=ag.getTime()+ai;ag.setDate(ag.getDate()+6);ak.end=ag.getTime()+ai;ag.setDate(ag.getDate()+1);if(ag.getFullYear()>aj){ag=new Date(ag.getFullYear(),0,1);if(ag.getDay()<2){break}}al.push(ak)}return al}function c(ag){var ah=[],ag=parseInt(ag,10);ah.push({start:d(new Date(ag,0,1)),end:d(new Date(ag,2,31)),season:1},{start:d(new Date(ag,3,1)),end:d(new Date(ag,5,30)),season:2},{start:d(new Date(ag,6,1)),end:d(new Date(ag,8,30)),season:3},{start:d(new Date(ag,9,1)),end:d(new Date(ag,11,31)),season:4});return ah}function x(ao,an){var ag={},ah=JC.f.weekOfYear(ao.getFullYear(),an),al=0,aj=ah.length,am=ao.getTime(),ai=JC.f.pureDate(new Date()),ak=JC.f.pureDate(new Date());for(al;al=ah[al].start&&am<=ah[al].end){ai.setTime(ah[al].start);ak.setTime(ah[al].end);ag.start=ai;ag.end=ak;ag.w=al+1;return ag}}}function o(ag){var aj=ag.getFullYear(),al=JC.f.seasonOfYear(aj),ai,ak={},ah,am=ag.getTime();for(ai=0;ai<4;ai++){if(am>=al[ai].start.getTime()&&am<=al[ai].end.getTime()){ak.start=al[ai].start;ak.end=al[ai].end;ak.q=ai+1;return ak}}}function O(ah){var ai,ag=new Date(ah.getFullYear(),ah.getMonth()+1);ag.setDate(ag.getDate()-1);ai=ag.getDate();return ai}function ae(){var ag=document.getElementsByTagName("script"),ag=ag[ag.length-1],ah=ag.getAttribute("src");if(/\//.test(ah)){ah=ah.split("/");ah.pop();ah=ah.join("/")+"/"}else{if(/\\/.test(ah)){ah=ah.split("\\");ah.pop();ah=ah.join("\\")+"/"}}return ah}function ad(ap,al,ah,ak,an){var aj=new Date(),ao,al=al||200,ah=ah||0,al=al-ah,am=0,ag,ak=ak||200,an=an||2;var ai=setInterval(function(){ao=new Date()-aj;am=ao/ak*al;am;if(am>=al){am=al;ag=true;clearInterval(ai)}ap&&ap(am+ah,ag,ao,ak,an,ah,al)},an);return ai}function s(ag){if(typeof ag=="string"){ag=ag.replace(/[\s]/g,"").toLowerCase();if(ag&&(ag=="false"||ag=="0"||ag=="null"||ag=="undefined")){ag=false}else{if(ag){ag=true}}}return !!ag}function B(aj,ah,ag){ag=ag||document;var ai=(/Firefox/i.test(navigator.userAgent))?"DOMMouseScroll":"mousewheel";ag.attachEvent&&(ai="on"+ai);if(ah){ag.detachEvent&&document.detachEvent(ai,aj);ag.removeEventListener&&document.removeEventListener(ai,aj)}else{ag.attachEvent&&document.attachEvent(ai,aj);ag.addEventListener&&document.addEventListener(ai,aj)}}function r(ag,ai){ag=$(ag);var ah;if(ai){while((ag=ag.parent()).length){if(ag.is(ai)){ah=ag;break}}}else{ah=ag.parent()}return ah}function m(an,aj,al){an&&(an=$(an));if(/\,/.test(aj)){var ah=[],am;aj=aj.split(",");$.each(aj,function(aq,ap){ap=ap.trim();am=m(an,ap,al);am&&am.length&&((am.each(function(){ah.push($(this))})))});return $(ah)}var ak=/^([\/]+)/,ai=/^([\|]+)/,ag=/^([<\(]+)/;if(ak.test(aj)){aj=aj.replace(ak,function(aq,ap){for(var at=0,ar=ap.length;at2){return ak}}ao=ao||0;ao+="";/^\-/.test(ao)&&(ag=true);ao=ao.replace(/[^\d\.]/g,"");var al=ao.split("."),ah=[];while(al[0].length>an){var am=al[0].slice(al[0].length-an,al[0].length);ah.push(am);al[0]=al[0].slice(0,al[0].length-an)}ah.push(al[0]);al[0]=ah.reverse().join(aj);if(ai){!al[1]&&(al[1]="");al[1]+=new Array(ai+1).join("0");al[1]=al[1].slice(0,ai)}else{al.length>1&&al.pop()}ap=al.join(".");ag&&(ap="-"+ap);return ap}function H(aj,ai){typeof aj=="string"&&(ai=aj,aj=new Date());!aj&&(aj=new Date());!ai&&(ai="YY-MM-DD");var al=ai,ak,ah=["january","february","march","april","may","june","july","august","september","october","november","december"],ag=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];al=al.replace(/YY/g,aj.getFullYear()).replace(/WK/g,function(){var ao=1,an=0,am;JC.Calendar&&(an=JC.Calendar.weekDayOffset);am=R(aj.getFullYear(),JC.Calendar.weekDayOffset);$(am).each(function(aq,ap){if(aj.getTime()>=ap.start&&aj.getTime()<=ap.end){ao=ap.week;return false}});return ao}).replace(/YQ/g,function(){var ao=1,an=0,am;am=c(aj.getFullYear());$(am).each(function(aq,ap){if(aj.getTime()>=ap.start&&aj.getTime()<=ap.end){ao=ap.season;return false}});return ao}).replace(/MM/g,L(aj.getMonth()+1)).replace(/DD/g,L(aj.getDate())).replace(/yy/g,function(am){ak=L(aj.getYear());return ak.slice(ak.length-2)}).replace(/mm/g,aj.getMonth()+1).replace(/dd/g,aj.getDate()).replace(/d/g,aj.getDate()).replace(/y/g,aj.getFullYear()).replace(/m/g,function(am){return ah[aj.getMonth()]}).replace(/M/g,function(am){return ag[aj.getMonth()]}).replace(/HH/g,L(aj.getHours())).replace(/h/g,aj.getHours()).replace(/NN/g,L(aj.getMinutes())).replace(/n/g,aj.getMinutes()).replace(/SS/g,L(aj.getSeconds())).replace(/s/g,aj.getSeconds());return al}function e(ag,aj,ai){typeof ai=="undefined"&&(ai=true);if(ag&&aj){for(var ah in aj){if(ai){ag[ah]=aj[ah]}else{if(!(ah in ag)){ag[ah]=aj[ah]}}}}return ag}function J(ah,aj,ag,ai){if(typeof ah=="undefined"){return}aj=$(aj||(window.TIMEOUT_HOST=window.TIMEOUT_HOST||{}));ag=ag||"NORMAL";typeof ah=="function"&&(ah=setTimeout(ah,ai||50));aj.data(ag)&&clearTimeout(aj.data(ag));aj.data(ag,ah)}function T(ag){ag&&(ag=$(ag));var ah;if(ag&&ag.length){ah=ag.attr("validEncoder")||"encodeURIComponent";ah=window[ah]||encodeURIComponent}else{ah=encodeURIComponent}return ah}function g(ai,ag){ag=ag||{};var ah,ak,aj;for(ah in ai){ag[ah]=ai[ah];switch(Object.prototype.toString.call(ag[ah])){case"[object Object]":ag[ah]=ag[ah].constructor===Object?g(ag[ah]):ag[ah];break;case"[object Array]":ag[ah]=ai[ah].slice();for(ak=0,aj=ag[ah].length;ak=i.length){d.openUI(i.last());return}var h=i[j],g=d.selector().find(JC.f.printf("div.node_ctn[data-id={0}]",h)),k;if(!(g&&g.length)){return}d._view.openFolder(h,function(){d.trigger("AT_OPEN_ALL_FOLDER",[i,++j])})});d.on("AT_PROCESS_ID",function(f,g){var h=[];typeof g!="string"&&(g=g.toString());g=(g||"").replace(/[\s]+/g,"");g&&(h=g.split(","));return h})},_inited:function(){this.trigger("inited")},open:function(e){var d=this;if(typeof e=="undefined"){d._view.openAll();return d}var f=d.triggerHandler("AT_PROCESS_ID",[e]);if(f.length){d.trigger("AT_OPEN_ALL_FOLDER",[f,0])}return d},openUI:function(d){if(typeof d=="undefined"){this._view.openAll();return this}this._view.openUI(d);return this},close:function(d){if(typeof d=="undefined"){this._view.closeAll();return this}this._view.close(d);return this},add:function(e,h,g,f){if(!e){return}var d=this;$.ajax({type:"POST",url:this._model.addUrl()||"",data:{parentId:e,data:h},dataType:"json",success:function(i){if(i){d._view.refreshNode(e);f&&f(i)}}})},refreshNode:function(d){this._view.refreshNode(d)},idPrefix:function(){return this._model.idPrefix()},getItem:function(d){var e;d&&(e=$("#"+this._model.id(d)));return e},selectedItem:function(d){return this._view.selectedItem(d)},highlight:function(){return this.selectedItem.apply(this,JC.f.sliceArgs(arguments))}});c.Model._instanceName="JCAjaxTreeIns";c.Model._insCount=1;JC.f.extendObject(c.Model.prototype,{init:function(){this._data;this._id=JC.f.printf("tree_{0}_{1}_",new Date().getTime(),c.Model._insCount++);this._highlight;this._events={}},parseInitData:function(){var d=this,e;if(d.is("[data-cajScriptData]")){e=d.scriptDataProp("data-cajScriptData")}else{if(d.is("[data-cajData]")){e=d.windowProp("data-cajData");e&&(e=$.parseJSON(JSON.stringify(e)))}}e&&(e.data=e.data||{});return e},idIndex:function(){if(typeof this._idIndex=="undefined"){this._idIndex=this.attrProp("data-idIndex")||1}return this._idIndex},nameIndex:function(){if(typeof this._nameIndex=="undefined"){this._nameIndex=this.attrProp("data-nameIndex")||2}return this._nameIndex},typeIndex:function(){if(typeof this._typeIndex=="undefined"){this._typeIndex=this.attrProp("data-typeIndex")||0}return this._typeIndex},selector:function(){return this._selector},id:function(d){return this._id+d},idPrefix:function(){return this._id},data:function(d){if(typeof d!="undefined"){this._data=d;c.dataFilter&&(this._data=c.dataFilter(this._data))}return this._data},root:function(){return this._data.root},child:function(d){var e=this._data.data[d];!(e&&e.length)&&(e=[]);return e},hasChild:function(d){return d in this._data.data},highlight:function(d){d&&(this._highlight=$(d));return this._highlight},urlArgName:function(){var d=this.attrProp("data-urlArgName")||"tree_node";return d},getNodeById:function(d){var e=null;if(d){e=$("#"+this.id(d))}return e},defaultOpenRoot:function(){var d=true;this.is("[data-defaultOpenRoot]")&&(d=this.boolProp("data-defaultOpenRoot"));return d},ajaxData:function(e,f){e=e||"";var d=JC.f.printf(this.data().url,e);$.ajax({type:"GET",url:d,dataType:"json",success:function(g){f&&f(g)}});return this},url:function(){return this.attrProp("data-cajUrl")||""},rootId:function(){return this.attrProp("data-rootId")||""},addUrl:function(){return this.attrProp("data-addUrl")||""}});JC.f.extendObject(c.View.prototype,{init:function(){return this},_process:function(k,l){var e=this;if(!(k&&k.length)){return}for(var h=0,f=k.length,g,d;h');i=this._initLabel(g);if(!(g[d._model.idIndex()] in (d._model.data().data||{}))){f=$('
      • ');e=$(' ')}else{f=$('
      • ');e=$(' ')}e.appendTo(f);i.appendTo(f);e.on("click",function(k){d.folderClick(g[d._model.idIndex()])});f.appendTo(j);j.appendTo(d._model.selector());this.selector(j);h=$('
          ');h.appendTo(f);return h},_initFolder:function(h,e,i){var d=this,g="",l="";i&&(g="folder_span_lst ",l="folder_last");var j=this._initLabel(e);var m=$(JC.f.printf(' ',e[d._model.nameIndex()],g));var f=$("
        • ");f.addClass(JC.f.printf("folder_closed {0} folder",l));m.appendTo(f);j.appendTo(f);var k=$('');$(m).on("click",function(n){d.folderClick(e[d._model.idIndex()])});k.appendTo(f);f.appendTo(h);this._process(this._model.child(e[d._model.idIndex()]),k)},_initFile:function(k,h,e){var d=this,g="folder_img_bottom ",i="";e&&(g="folder_img_last ",i="");var j=this._initLabel(h);var f=$(JC.f.printf('
        •  
        • ',h[d._model.nameIndex()],g));f.addClass("folder_closed file");j.appendTo(f);f.appendTo(k)},_initLabel:function(e){var d=this,f=$('
          ');f.attr("id",this._model.id(e[d._model.idIndex()])).attr("data-id",e[d._model.idIndex()]).attr("data-name",e[d._model.nameIndex()]).attr("data-type",e[d._model.typeIndex()]||"").data("nodeData",e);f.html(e[d._model.nameIndex()]||"没有标签");d.notification("renderItem",[f,e]);return f},openAll:function(){if(!this.selector()){return}this.selector().find("span.folder_img_closed").each(function(){$(this).trigger("click")})},closeAll:function(){if(!this.selector()){return}this.selector().find("span.folder_img_open, span.folder_img_root").each(function(){if($(this).hasClass("folder_img_closed")){return}$(this).trigger("click")})},openUI:function(f){var d=this;var e=d._model.getNodeById(f);if(!e.length){return}var g=e.parents("li");this.selectedItem(e);g.each(function(){var h=$(this),i=h.find("> span.folderRoot, > span.folder");if(i.length){if(i.hasClass("folder_img_open")){return}i.trigger("click")}})},selectedItem:function(d){d&&(d=$(d));if(!(d&&d.length)){return this._model.highlight()}if(this._model.highlight()){this._model.highlight().removeClass("highlight").removeClass("selectedAjaxTreeNode")}d.addClass("highlight").addClass("selectedAjaxTreeNode");this._model.highlight(d);return d},close:function(f){var d=this;var e=d._model.getNodeById(f);if(!e.length){return}var g=e.parent("li").find("> span.folderRoot, > span.folder");if(g.length){if(g.hasClass("folder_img_closed")){return}g.trigger("click")}},nodeImgClick:function(g){var e=this,h=e._model.getNodeById(g),d=h.siblings("span"),i=h.parent("li"),k=i.find("> ul");var f=JC.f.getJqParent(h,"div.js_compAjaxTree"),j=f.data(c.Model._instanceName);if(!j){return}if(d.hasClass("folder_img_open")){d.removeClass("folder_img_open").addClass("folder_img_closed");k.hide()}else{if(d.hasClass("folder_img_closed")){d.addClass("folder_img_open").removeClass("folder_img_closed");k.show()}}if(i.hasClass("folder_closed")){i.addClass("folder_open").removeClass("folder_closed")}else{if(i.hasClass("folder_open")){i.removeClass("folder_open").addClass("folder_closed")}}},folderClick:function(e){var d=this,h=d._model,f=h.getNodeById(e),g=f.parent("li");if(g.hasClass("folder_open")){d.nodeImgClick(e)}else{d.openFolder(e)}},openFolder:function(i,l){var d=this,h=d._model,k=h.getNodeById(i),j=k.parent("li"),f=k.siblings("span"),e=k.siblings("ul"),g=(k.attr("data-type")||"file");if(g=="file"){l&&l();return}if(e.data("inited")||e.children("li").length>0){d.nodeImgClick(i);l&&l()}else{f.removeClass("folder_img_closed");d.showDataLoading(k);e.data("inited",true);if(!h.data().url){d.hideDataLoading(k);return}d._model.ajaxData(i,function(m){j.addClass("folder_open").removeClass("folder_closed");d.hideDataLoading(k);d._process(m.data,e.show());l&&l()})}},refreshNode:function(e){var d=this,i=d._model,f=i.getNodeById(e),h=f.siblings("ul"),g=f.parent("li");f.closest("li").children("ul").children().remove();d._model.ajaxData(e,function(j){g.addClass("folder_open").removeClass("folder_closed");d.hideDataLoading(f);d._process(j.data,h.show())})},showDataLoading:function(d){d.siblings("span").removeClass("folder_img_closed").addClass("folder_img_loading")},hideDataLoading:function(d){d.siblings("span").removeClass("folder_img_loading").addClass("folder_img_open")}});c.lastHover=null;JDOC.delegate(".js_compAjaxTree ul.ajtree_wrap div.node_ctn","mouseenter",function(){if(c.lastHover){c.lastHover.removeClass("ms_over")}$(this).addClass("ms_over");c.lastHover=$(this)});JDOC.delegate(".js_compAjaxTree ul.ajtree_wrap div.node_ctn","mouseleave",function(){if(c.lastHover){c.lastHover.removeClass("ms_over")}});JDOC.delegate(".js_compAjaxTree ul.ajtree_wrap div.node_ctn a[href]","click",function(h){var e=$(this),d=(e.attr("href")||"").trim().replace(/[\s]+/g,""),k,i,g,j,f;if(/^(javascript\:|#)/.test(d)){return}i=JC.f.getJqParent(e,"div.node_ctn");if(!(i&&i.length)){return}g=JC.f.getJqParent(e,".js_compAjaxTree");if(!(g&&g.length)){return}j=JC.BaseMVC.getInstance(g,JC.AjaxTree);if(!j){return}k=JWIN.triggerHandler("AJAXTREE_GET_PARENT_LIST",[i]);f={};f[j._model.urlArgName()]=k.join(",");e.attr("href",JC.f.addUrlParams(d,f))});JWIN.on("AJAXTREE_GET_PARENT_LIST",function(f,g,h){h=h||[];g=$(g);var d,e;h.unshift(g.attr("data-id"));d=JC.f.getJqParent(g,"ul");if(d&&d.length&&(d.is(".folder_ul_lst")||d.is(".ajtree_wrap_inner"))){e=d.prev("div.node_ctn");if(e&&e.length){JWIN.trigger("AJAXTREE_GET_PARENT_LIST",[e,h])}}return h});JDOC.delegate(".js_compAjaxTree ul.ajtree_wrap div.node_ctn","click",function(f){var d=$(this),e=JC.f.getJqParent(d,".js_compAjaxTree"),j=e.data(c.Model._instanceName),h,g,i=true;if(!j){return}j.open(d.attr("data-id"));if(e.data("AT_PRESELECTED_ID")==d.attr("data-id")){}else{e.data("AT_PRESELECTED_ID",d.attr("data-id"));e.trigger("change",[d,d.data("nodeData"),e])}});JDOC.ready(function(){JC.f.safeTimeout(function(){c.autoInit&&c.init()},null,"JCAjaxTreeInit",1)});return JC.AjaxTree})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/AjaxTree/index.php b/deploy/comps/AjaxTree/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/AjaxTree/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AjaxTree/res/blue/images/closed.gif b/deploy/comps/AjaxTree/res/blue/images/closed.gif new file mode 100755 index 000000000..4641fa052 Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/closed.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/closed_last.gif b/deploy/comps/AjaxTree/res/blue/images/closed_last.gif new file mode 100755 index 000000000..963afb6f1 Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/closed_last.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/open.gif b/deploy/comps/AjaxTree/res/blue/images/open.gif new file mode 100755 index 000000000..77ce403b4 Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/open.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/open_last.gif b/deploy/comps/AjaxTree/res/blue/images/open_last.gif new file mode 100755 index 000000000..1c79f4a4b Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/open_last.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/root.gif b/deploy/comps/AjaxTree/res/blue/images/root.gif new file mode 100755 index 000000000..7393048b6 Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/root.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/root_plus.gif b/deploy/comps/AjaxTree/res/blue/images/root_plus.gif new file mode 100755 index 000000000..51e1330de Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/root_plus.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/treeline.gif b/deploy/comps/AjaxTree/res/blue/images/treeline.gif new file mode 100755 index 000000000..85b53954e Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/treeline.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/treeline1.gif b/deploy/comps/AjaxTree/res/blue/images/treeline1.gif new file mode 100755 index 000000000..1787b394d Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/treeline1.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/images/treeline2.gif b/deploy/comps/AjaxTree/res/blue/images/treeline2.gif new file mode 100755 index 000000000..72b3ae9c1 Binary files /dev/null and b/deploy/comps/AjaxTree/res/blue/images/treeline2.gif differ diff --git a/deploy/comps/AjaxTree/res/blue/style.css b/deploy/comps/AjaxTree/res/blue/style.css new file mode 100755 index 000000000..8070658e0 --- /dev/null +++ b/deploy/comps/AjaxTree/res/blue/style.css @@ -0,0 +1 @@ +.tree_wrap,.tree_wrap *{margin:0;padding:0}.tree_wrap li{list-style-type:none}.tree_wrap{text-align:left;line-height:24px;padding:8px 0;zoom:1}.tree_wrap .highlight,.tree_wrap .ms_over a{background-color:#529dcb;color:#fff;line-height:18px;padding:0 4px 2px;border-radius:3px;display:inline-block}.tree_wrap .node_ctn a{color:#999}.tree_wrap .highlight a{color:#fff}.tree_wrap_inner ul{background:url(images/treeline.gif) repeat-y}.tree_wrap_inner li{padding-left:24px;white-space:nowrap}.tree_wrap .node_ctn{display:inline}.tree_wrap .ms_over a,.tree_wrap .ms_over a:hover{color:#fff}.folder_img_open,.folder_img_root,.folder_img_root.folder_img_closed,.folder_img_loading,.folder_img_closed,.folder_img_bottom,.folder_img_last{width:24px;height:24px;display:-moz-inline-box;display:inline-block;cursor:pointer}.folder_img_open{background:url(images/open.gif) no-repeat center left}.folder_img_root{background:url(images/root.gif) no-repeat center left}.folder_img_root.folder_img_closed{background:url(images/root_plus.gif) no-repeat}.folder_img_loading{background:url(images/loading.gif) no-repeat 3px 4px}.folder_img_closed{background:url(images/closed.gif) no-repeat center left}.folder_img_bottom{background:url(images/treeline1.gif) no-repeat center left}.folder_img_last{background:url(images/treeline2.gif) no-repeat center left}.folder_last .folder_img_open.folder_span_lst{background:url(images/open_last.gif) no-repeat center left}.folder_last .folder_img_closed.folder_span_lst{background:url(images/closed_last.gif) no-repeat center left}.tree_wrap_inner .folder_last .folder_ul_lst{background:0}.tree_wrap span.file{cursor:default} \ No newline at end of file diff --git a/deploy/comps/AjaxTree/res/blue/style.html b/deploy/comps/AjaxTree/res/blue/style.html new file mode 100755 index 000000000..2d8976761 --- /dev/null +++ b/deploy/comps/AjaxTree/res/blue/style.html @@ -0,0 +1,67 @@ + + + + + 360 75 team + + + +
          + +
          + + + diff --git a/deploy/comps/AjaxTree/res/default/images/closed.gif b/deploy/comps/AjaxTree/res/default/images/closed.gif new file mode 100755 index 000000000..07b89a21c Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/closed.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/closed_last.gif b/deploy/comps/AjaxTree/res/default/images/closed_last.gif new file mode 100755 index 000000000..71adab60a Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/closed_last.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/loading.gif b/deploy/comps/AjaxTree/res/default/images/loading.gif new file mode 100755 index 000000000..f9c2eee79 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/loading.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/open.gif b/deploy/comps/AjaxTree/res/default/images/open.gif new file mode 100755 index 000000000..319ccc9f4 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/open.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/open_last.gif b/deploy/comps/AjaxTree/res/default/images/open_last.gif new file mode 100755 index 000000000..cba44f082 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/open_last.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/root.gif b/deploy/comps/AjaxTree/res/default/images/root.gif new file mode 100755 index 000000000..14d302547 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/root.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/root_plus.gif b/deploy/comps/AjaxTree/res/default/images/root_plus.gif new file mode 100755 index 000000000..bb3ea2f44 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/root_plus.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/treeline.gif b/deploy/comps/AjaxTree/res/default/images/treeline.gif new file mode 100755 index 000000000..ce41c2ab3 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/treeline.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/treeline1.gif b/deploy/comps/AjaxTree/res/default/images/treeline1.gif new file mode 100755 index 000000000..cbf413392 Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/treeline1.gif differ diff --git a/deploy/comps/AjaxTree/res/default/images/treeline2.gif b/deploy/comps/AjaxTree/res/default/images/treeline2.gif new file mode 100755 index 000000000..32bd0b78a Binary files /dev/null and b/deploy/comps/AjaxTree/res/default/images/treeline2.gif differ diff --git a/deploy/comps/AjaxTree/res/default/style.css b/deploy/comps/AjaxTree/res/default/style.css new file mode 100755 index 000000000..0545b87bc --- /dev/null +++ b/deploy/comps/AjaxTree/res/default/style.css @@ -0,0 +1 @@ +.ajtree_wrap,.ajtree_wrap *{margin:0;padding:0}.ajtree_wrap li{list-style-type:none}.ajtree_wrap{text-align:left;line-height:24px;padding:8px 0;zoom:1}.ajtree_wrap .highlight,.ajtree_wrap .ms_over a{background-color:#46b51d;color:#fff;line-height:18px;padding:0 4px 2px;border-radius:3px;display:inline-block}.ajtree_wrap .node_ctn a{color:#999}.ajtree_wrap .highlight a{color:#fff}.ajtree_wrap_inner ul{background:url(images/treeline.gif) repeat-y}.ajtree_wrap_inner li{padding-left:24px;white-space:nowrap}.ajtree_wrap .node_ctn{display:inline}.ajtree_wrap .ms_over a,.ajtree_wrap .ms_over a:hover{color:#fff}.folder_img_open,.folder_img_root,.folder_img_root.folder_img_closed,.folder_img_loading,.folder_img_closed,.folder_img_bottom,.folder_img_last{width:24px;height:24px;display:-moz-inline-box;display:inline-block;cursor:pointer}.folder_img_open{background:url(images/open.gif) no-repeat center left}.folder_img_root{background:url(images/root.gif) no-repeat center left}.folder_img_root.folder_img_closed{background:url(images/root_plus.gif) no-repeat}.folder_img_loading{background:url(images/loading.gif) no-repeat 3px 4px}.folder_img_closed{background:url(images/closed.gif) no-repeat center left}.folder_img_bottom{background:url(images/treeline1.gif) no-repeat center left}.folder_img_last{background:url(images/treeline2.gif) no-repeat center left}.folder_last .folder_img_open.folder_span_lst{background:url(images/open_last.gif) no-repeat center left}.folder_last .folder_img_closed.folder_span_lst{background:url(images/closed_last.gif) no-repeat center left}.ajtree_wrap_inner .folder_last .folder_ul_lst{background:0}.ajtree_wrap span.file{cursor:default} \ No newline at end of file diff --git a/deploy/comps/AjaxTree/res/default/style.html b/deploy/comps/AjaxTree/res/default/style.html new file mode 100755 index 000000000..2d8976761 --- /dev/null +++ b/deploy/comps/AjaxTree/res/default/style.html @@ -0,0 +1,67 @@ + + + + + 360 75 team + + + +
          + +
          + + + diff --git a/deploy/comps/AjaxUpload/AjaxUpload.js b/deploy/comps/AjaxUpload/AjaxUpload.js new file mode 100755 index 000000000..64c3a481a --- /dev/null +++ b/deploy/comps/AjaxUpload/AjaxUpload.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC","JC.Panel"],function(){JC.AjaxUpload=c;JC.f.addAutoInit&&JC.f.addAutoInit(c);function c(d){if(c.getInstance(d)){return c.getInstance(d)}if(!d.hasClass("js_compAjaxUpload")){return c.init(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);JC.log("AjaxUpload init",new Date().getTime());this._init()}c.getInstance=function(d,e){if(typeof d=="string"&&!/清除',' 查看'].join(""),d;this.is("[cauViewFileBoxItemTpl]")&&(d=this.selectorProp("cauViewFileBoxItemTpl"))&&d.length&&(e=JC.f.scriptContent(d));return e}});JC.f.extendObject(c.View.prototype,{init:function(){var d=this;$(d).on("update_viewFileBox",function(f,e,g){var h=d._model.cauViewFileBox(),i;if(!(h&&h.length)){return}i=d._model.cauViewFileBoxItemTpl();i=JC.f.printf(i,e,g);h.html(i)});$(d).on("clear_viewFileBox",function(){var e=d._model.cauViewFileBox();if(!(e&&e.length)){return}e.html("")});$(d).on("UpdateDefaultStatus",function(f){var g=d._model.cauStatusLabel(),e=d._model.cauDisplayLabel();d.updateChange();d._model.frame().show();g&&g.length&&g.hide();e&&e.length&&e.hide();(d._model.selector().attr("type")||"").toLowerCase()!="hidden"&&d._model.selector().show();$(d).trigger("clear_viewFileBox");d.trigger("UploadComplete")});$(d).on("CAUUpdate",function(h,f){var e=d._model.cauDisplayLabel(),i="",g="";if(typeof f!="undefined"){g=f.data[d._model.cauValueKey()];i=f.data[d._model.cauLabelKey()];d._model.selector().val(g);d._model.cauSaveLabelSelector()&&d._model.cauSaveLabelSelector().val(i)}if(d._model.cauDisplayLabelCallback()){i=d._model.cauDisplayLabelCallback().call(d._model.selector(),f,i,g)}else{i=JC.f.printf('{1}',g,i)}e&&e.length&&e.html(i)})},loadFrame:function(){var d=this,f=d._model.framePath(),e=d._model.frame();e.attr("src",f);e.on("load",function(){d.trigger("FrameLoad")});d._model.cauButtonAfter()?d.selector().after(e):d.selector().before(e)},beforeUpload:function(){var d=this,e=d._model.cauStatusLabel();this.updateChange(null,true);if(e&&e.length){d._model.selector().hide();d._model.frame().hide();e.show()}},updateChange:function(g,i){var d=this,j=d._model.cauStatusLabel(),f=d._model.cauDisplayLabel(),e,h;if(j&&j.length&&!i){d._model.selector().show();d._model.frame().show();j.hide()}if(f&&f.length){f.html("")}d._model.selector().val("");d._model.cauSaveLabelSelector()&&d._model.cauSaveLabelSelector().val("");if(g&&("errorno" in g)&&!g.errorno){$(d).trigger("CAUUpdate",[g]);e=g.data[d._model.cauLabelKey()];h=g.data[d._model.cauValueKey()];d._model.selector().val()&&d._model.selector().is(":visible")&&d._model.selector().prop("type").toLowerCase()=="text"&&d._model.selector().trigger("blur");$(d).trigger("update_viewFileBox",[e,h]);if(f&&f.length){d._model.selector().hide();if(d._model.is("[cauHideButton]")){d._model.cauHideButton()&&d._model.frame().hide()}else{d._model.frame().hide()}f.show();return}}},updateLayout:function(e,f,g){if(!(e&&f)){return}var d=this;d._model.frame().css({width:e+"px",height:f+"px"})},errUpload:function(e){var d=this,f=d._model.callbackProp("cauBeforeUploadErrCallback"),g=d._model.callbackProp("cauUploadErrCallback");f&&f.call(d._model.selector(),e);if(g){g.call(d._model.selector(),e,d._model.frame())}else{var h=e&&e.errmsg?e.errmsg:"上传失败, 请重试!";JC.Dialog?JC.Dialog.alert(h,1):alert(h)}},errFileExt:function(f){var d=this,e=d._model.callbackProp("cauFileExtErrCallback");if(e){e.call(d._model.selector(),d._model.cauFileExt(),f,d._model.frame())}else{var g=JC.f.printf('类型错误, 允许上传的文件类型: {0}

          {1}

          ',d._model.cauFileExt(),f);JC.Dialog?JC.Dialog.alert(g,1):alert(g)}},errFileSize:function(f){var d=this,e=d._model.callbackProp("cauFileExtErrCallback");if(e){e.call(d._model.selector(),d._model.cauFileSize(),f,d._model.frame())}else{var g=JC.f.printf('文件大小错误, 允许上传的文件大小为: {0}

          {1}

          ',d._model.cauFileSize(),f);JC.Dialog?JC.Dialog.alert(g,1):alert(g)}},errFatalError:function(e){var d=this,f=d._model.callbackProp("cauFatalErrorCallback");if(f){f.call(d._model.selector(),e,d._model.frame())}else{var g=JC.f.printf('服务端错误, 无法解析返回数据:

          {0}

          ',e);JC.Dialog?JC.Dialog.alert(g,1):alert(g)}},disable:function(){var e=this,d=e._model.swfu();d&&(d.setButtonDisabled(true))},enable:function(){var e=this,d=e._model.swfu();d&&(d.setButtonDisabled(false))}});$.event.special.AjaxUploadShowEvent={show:function(d){if(d.handler){d.handler()}}};c.frameTpl=JC.f.printf('',"width: 84px; height: 24px;cursor: pointer; vertical-align: middle;");$(document).ready(function(){c.autoInit&&c.init()});return JC.AjaxUpload})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/AjaxUpload/frame/blue.html b/deploy/comps/AjaxUpload/frame/blue.html new file mode 100755 index 000000000..891f3f767 --- /dev/null +++ b/deploy/comps/AjaxUpload/frame/blue.html @@ -0,0 +1,239 @@ + + + + + Open JQuery Components Library - suches + + + + + + + + + + + + + + + diff --git a/deploy/comps/AjaxUpload/frame/default.html b/deploy/comps/AjaxUpload/frame/default.html new file mode 100755 index 000000000..83aff2e8f --- /dev/null +++ b/deploy/comps/AjaxUpload/frame/default.html @@ -0,0 +1,285 @@ + + + + + Open JQuery Components Library - suches + + + + + + +
          + + + + + + + + diff --git a/deploy/comps/AjaxUpload/index.php b/deploy/comps/AjaxUpload/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/AjaxUpload/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AjaxUpload/res/blue/XPButtonUploadText_61x22.png b/deploy/comps/AjaxUpload/res/blue/XPButtonUploadText_61x22.png new file mode 100755 index 000000000..df7aa6eab Binary files /dev/null and b/deploy/comps/AjaxUpload/res/blue/XPButtonUploadText_61x22.png differ diff --git a/deploy/comps/AjaxUpload/res/blue/btn.png b/deploy/comps/AjaxUpload/res/blue/btn.png new file mode 100755 index 000000000..b08783d69 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/blue/btn.png differ diff --git a/deploy/comps/AjaxUpload/res/blue/g_61x27.png b/deploy/comps/AjaxUpload/res/blue/g_61x27.png new file mode 100755 index 000000000..870abb496 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/blue/g_61x27.png differ diff --git a/deploy/comps/AjaxUpload/res/blue/index.php b/deploy/comps/AjaxUpload/res/blue/index.php new file mode 100755 index 000000000..fae971333 --- /dev/null +++ b/deploy/comps/AjaxUpload/res/blue/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AjaxUpload/res/blue/style.css b/deploy/comps/AjaxUpload/res/blue/style.css new file mode 100755 index 000000000..ef6f7d8e8 --- /dev/null +++ b/deploy/comps/AjaxUpload/res/blue/style.css @@ -0,0 +1 @@ +.AUBtn{display:inline-block;height:30px;border:0;cursor:pointer;border-radius:3px;overflow:hidden;background:url(btn.png) no-repeat;background-color:#529dcb;box-shadow:0 1px 2px #efefef;vertical-align:middle;color:#000;outline:0}.AUBtn:hover{color:#000}.AUBtn-g3,.AUBtn-g1,.AUBtn-g2{border:1px solid #529dcb;border-top:1px solid #529dcb;border-bottom:1px solid #529dcb}.AUBtn-w3,.AUBtn-w2,.AUBtn-w1{border:1px solid #d2d2d2;border-top:1px solid #dfdfdf}.AUBtn-w3,.AUBtn-w2,.AUBtn-w1,.AUBtn-g1,.AUBtn-g2,.AUBtn-g3{padding:0 15px;*padding:0}.AUBtn-w1{height:24px;background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w1:hover{background-position:0 -99px}.AUBtn-w2{height:27px;background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w2:hover{background-position:0 -99px}.AUBtn-w3{background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w3:hover{background-position:0 -99px}.AUBtn-g1{height:24px;color:#fff}.AUBtn-g1:hover{height:24px;background-position:0 -33px;color:#fff}.AUBtn-g2{height:27px;color:#fff}.AUBtn-g2:hover{background-position:0 -33px;color:#fff}.AUBtn-g3{color:#fff;margin-right:5px}.AUBtn-g3:hover{background-position:0 -33px;color:#fff}.AUBtn-g3[disabled],.AUBtn-g1[disabled],.AUBtn-g2[disabled]{background-position:0 -158px !important;color:#bbb !important}.AUBtn-w3[disabled],.AUBtn-w1[disabled],.AUBtn-w2[disabled]{background-position:0 -210px !important;color:#888 !important}.AUProgress{border:1px solid #ccc;background:transparent !important;width:85px;vertical-align:middle;padding:0 !important;margin:0 !important;outline:0;height:10px;overflow:hidden}.AUProgress .AUPercent{display:block;background:#74cc50;width:0;height:8px}.AUCancelProgress,.AUClose{display:inline-block;height:21px;width:21px;border:0;cursor:pointer;overflow:hidden;background:url(btn.png) no-repeat;vertical-align:middle;margin-top:1px;margin-left:2px;outline:0;background-position:0 -260px}.AUCancelProgress:hover,.AUClose{background-position:0 -290px}.AURemove{display:inline-block;width:15px;height:15px;border:0;cursor:pointer;overflow:hidden;background:url(btn.png) no-repeat;background-color:#fff;box-shadow:0 1px 2px #efefef;vertical-align:middle;color:#000;outline:0;background-position:-146px -380px !important}.AURemove:hover{background-position:-172px -380px !important}.AURemove1{background-position:-75px -429px !important}.AURemove1:hover{background-position:-75px -404px !important} \ No newline at end of file diff --git a/deploy/comps/AjaxUpload/res/blue/style.html b/deploy/comps/AjaxUpload/res/blue/style.html new file mode 100755 index 000000000..09bf8f6cd --- /dev/null +++ b/deploy/comps/AjaxUpload/res/blue/style.html @@ -0,0 +1,50 @@ + + + + +iframe upload - suches template + + + + +
          +
          input button 样式, green
          + +
          + +
          +
          + +
          +
          + +
          +
          + +
          +
          input button 样式, white
          + +
          + +
          + +
          + +
          +
          + +
          +
          + + + + + diff --git a/deploy/comps/AjaxUpload/res/blue/transparent.png b/deploy/comps/AjaxUpload/res/blue/transparent.png new file mode 100755 index 000000000..aeacb4ef1 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/blue/transparent.png differ diff --git a/deploy/comps/AjaxUpload/res/blue/w_61x27.png b/deploy/comps/AjaxUpload/res/blue/w_61x27.png new file mode 100755 index 000000000..b998c2558 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/blue/w_61x27.png differ diff --git a/deploy/comps/AjaxUpload/res/default/XPButtonUploadText_61x22.png b/deploy/comps/AjaxUpload/res/default/XPButtonUploadText_61x22.png new file mode 100755 index 000000000..df7aa6eab Binary files /dev/null and b/deploy/comps/AjaxUpload/res/default/XPButtonUploadText_61x22.png differ diff --git a/deploy/comps/AjaxUpload/res/default/btn.png b/deploy/comps/AjaxUpload/res/default/btn.png new file mode 100755 index 000000000..a2240dca3 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/default/btn.png differ diff --git a/deploy/comps/AjaxUpload/res/default/g_61x27.png b/deploy/comps/AjaxUpload/res/default/g_61x27.png new file mode 100755 index 000000000..870abb496 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/default/g_61x27.png differ diff --git a/deploy/comps/AjaxUpload/res/default/index.php b/deploy/comps/AjaxUpload/res/default/index.php new file mode 100755 index 000000000..fae971333 --- /dev/null +++ b/deploy/comps/AjaxUpload/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AjaxUpload/res/default/style.css b/deploy/comps/AjaxUpload/res/default/style.css new file mode 100755 index 000000000..76d0871d2 --- /dev/null +++ b/deploy/comps/AjaxUpload/res/default/style.css @@ -0,0 +1 @@ +.AUBtn{display:inline-block;height:30px;border:0;cursor:pointer;border-radius:3px;overflow:hidden;background:url(btn.png) no-repeat;background-color:#5dcb30;box-shadow:0 1px 2px #efefef;vertical-align:middle;color:#000;outline:0}.AUBtn:hover{color:#000}.AUBtn-g3,.AUBtn-g1,.AUBtn-g2{border:1px solid #50ad1d;border-top:1px solid #54bf1a;border-bottom:1px solid #4c9a20}.AUBtn-w3,.AUBtn-w2,.AUBtn-w1{border:1px solid #d2d2d2;border-top:1px solid #dfdfdf}.AUBtn-w3,.AUBtn-w2,.AUBtn-w1,.AUBtn-g1,.AUBtn-g2,.AUBtn-g3{padding:0 15px;*padding:0}.AUBtn-w1{height:24px;background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w1:hover{background-position:0 -99px}.AUBtn-w2{height:27px;background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w2:hover{background-position:0 -99px}.AUBtn-w3{background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w3:hover{background-position:0 -99px}.AUBtn-g1{height:24px;color:#fff}.AUBtn-g1:hover{height:24px;background-position:0 -33px;color:#fff}.AUBtn-g2{height:27px;color:#fff}.AUBtn-g2:hover{background-position:0 -33px;color:#fff}.AUBtn-g3{color:#fff;margin-right:5px}.AUBtn-g3:hover{background-position:0 -33px;color:#fff}.AUBtn-g3[disabled],.AUBtn-g1[disabled],.AUBtn-g2[disabled]{background-position:0 -158px !important;color:#bbb !important}.AUBtn-w3[disabled],.AUBtn-w1[disabled],.AUBtn-w2[disabled]{background-position:0 -210px !important;color:#888 !important}.AUProgress{border:1px solid #ccc;background:transparent !important;width:85px;vertical-align:middle;padding:0 !important;margin:0 !important;outline:0;height:10px;overflow:hidden}.AUProgress .AUPercent{display:block;background:#74cc50;width:0;height:8px}.AUCancelProgress,.AUClose{display:inline-block;height:21px;width:21px;border:0;cursor:pointer;overflow:hidden;background:url(btn.png) no-repeat;vertical-align:middle;margin-top:1px;margin-left:2px;outline:0;background-position:0 -260px}.AUCancelProgress:hover,.AUClose{background-position:0 -290px}.AURemove{display:inline-block;width:15px;height:15px;border:0;cursor:pointer;overflow:hidden;background:url(btn.png) no-repeat;background-color:#fff;box-shadow:0 1px 2px #efefef;vertical-align:middle;color:#000;outline:0;background-position:-146px -380px !important}.AURemove:hover{background-position:-172px -380px !important}.AURemove1{background-position:-75px -429px !important}.AURemove1:hover{background-position:-75px -404px !important} \ No newline at end of file diff --git a/deploy/comps/AjaxUpload/res/default/style.html b/deploy/comps/AjaxUpload/res/default/style.html new file mode 100755 index 000000000..09bf8f6cd --- /dev/null +++ b/deploy/comps/AjaxUpload/res/default/style.html @@ -0,0 +1,50 @@ + + + + +iframe upload - suches template + + + + +
          +
          input button 样式, green
          + +
          + +
          +
          + +
          +
          + +
          +
          + +
          +
          input button 样式, white
          + +
          + +
          + +
          + +
          +
          + +
          +
          + + + + + diff --git a/deploy/comps/AjaxUpload/res/default/transparent.png b/deploy/comps/AjaxUpload/res/default/transparent.png new file mode 100755 index 000000000..aeacb4ef1 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/default/transparent.png differ diff --git a/deploy/comps/AjaxUpload/res/default/w_61x27.png b/deploy/comps/AjaxUpload/res/default/w_61x27.png new file mode 100755 index 000000000..b998c2558 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/default/w_61x27.png differ diff --git a/deploy/comps/AjaxUpload/res/green/XPButtonUploadText_61x22.png b/deploy/comps/AjaxUpload/res/green/XPButtonUploadText_61x22.png new file mode 100755 index 000000000..df7aa6eab Binary files /dev/null and b/deploy/comps/AjaxUpload/res/green/XPButtonUploadText_61x22.png differ diff --git a/deploy/comps/AjaxUpload/res/green/btn.png b/deploy/comps/AjaxUpload/res/green/btn.png new file mode 100755 index 000000000..a2240dca3 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/green/btn.png differ diff --git a/deploy/comps/AjaxUpload/res/green/g_61x27.png b/deploy/comps/AjaxUpload/res/green/g_61x27.png new file mode 100755 index 000000000..870abb496 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/green/g_61x27.png differ diff --git a/deploy/comps/AjaxUpload/res/green/index.php b/deploy/comps/AjaxUpload/res/green/index.php new file mode 100755 index 000000000..fae971333 --- /dev/null +++ b/deploy/comps/AjaxUpload/res/green/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AjaxUpload/res/green/style.css b/deploy/comps/AjaxUpload/res/green/style.css new file mode 100755 index 000000000..76d0871d2 --- /dev/null +++ b/deploy/comps/AjaxUpload/res/green/style.css @@ -0,0 +1 @@ +.AUBtn{display:inline-block;height:30px;border:0;cursor:pointer;border-radius:3px;overflow:hidden;background:url(btn.png) no-repeat;background-color:#5dcb30;box-shadow:0 1px 2px #efefef;vertical-align:middle;color:#000;outline:0}.AUBtn:hover{color:#000}.AUBtn-g3,.AUBtn-g1,.AUBtn-g2{border:1px solid #50ad1d;border-top:1px solid #54bf1a;border-bottom:1px solid #4c9a20}.AUBtn-w3,.AUBtn-w2,.AUBtn-w1{border:1px solid #d2d2d2;border-top:1px solid #dfdfdf}.AUBtn-w3,.AUBtn-w2,.AUBtn-w1,.AUBtn-g1,.AUBtn-g2,.AUBtn-g3{padding:0 15px;*padding:0}.AUBtn-w1{height:24px;background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w1:hover{background-position:0 -99px}.AUBtn-w2{height:27px;background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w2:hover{background-position:0 -99px}.AUBtn-w3{background-position:0 -66px;background-color:#f1f1f1}.AUBtn-w3:hover{background-position:0 -99px}.AUBtn-g1{height:24px;color:#fff}.AUBtn-g1:hover{height:24px;background-position:0 -33px;color:#fff}.AUBtn-g2{height:27px;color:#fff}.AUBtn-g2:hover{background-position:0 -33px;color:#fff}.AUBtn-g3{color:#fff;margin-right:5px}.AUBtn-g3:hover{background-position:0 -33px;color:#fff}.AUBtn-g3[disabled],.AUBtn-g1[disabled],.AUBtn-g2[disabled]{background-position:0 -158px !important;color:#bbb !important}.AUBtn-w3[disabled],.AUBtn-w1[disabled],.AUBtn-w2[disabled]{background-position:0 -210px !important;color:#888 !important}.AUProgress{border:1px solid #ccc;background:transparent !important;width:85px;vertical-align:middle;padding:0 !important;margin:0 !important;outline:0;height:10px;overflow:hidden}.AUProgress .AUPercent{display:block;background:#74cc50;width:0;height:8px}.AUCancelProgress,.AUClose{display:inline-block;height:21px;width:21px;border:0;cursor:pointer;overflow:hidden;background:url(btn.png) no-repeat;vertical-align:middle;margin-top:1px;margin-left:2px;outline:0;background-position:0 -260px}.AUCancelProgress:hover,.AUClose{background-position:0 -290px}.AURemove{display:inline-block;width:15px;height:15px;border:0;cursor:pointer;overflow:hidden;background:url(btn.png) no-repeat;background-color:#fff;box-shadow:0 1px 2px #efefef;vertical-align:middle;color:#000;outline:0;background-position:-146px -380px !important}.AURemove:hover{background-position:-172px -380px !important}.AURemove1{background-position:-75px -429px !important}.AURemove1:hover{background-position:-75px -404px !important} \ No newline at end of file diff --git a/deploy/comps/AjaxUpload/res/green/style.html b/deploy/comps/AjaxUpload/res/green/style.html new file mode 100755 index 000000000..09bf8f6cd --- /dev/null +++ b/deploy/comps/AjaxUpload/res/green/style.html @@ -0,0 +1,50 @@ + + + + +iframe upload - suches template + + + + +
          +
          input button 样式, green
          + +
          + +
          +
          + +
          +
          + +
          +
          + +
          +
          input button 样式, white
          + +
          + +
          + +
          + +
          +
          + +
          +
          + + + + + diff --git a/deploy/comps/AjaxUpload/res/green/transparent.png b/deploy/comps/AjaxUpload/res/green/transparent.png new file mode 100755 index 000000000..aeacb4ef1 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/green/transparent.png differ diff --git a/deploy/comps/AjaxUpload/res/green/w_61x27.png b/deploy/comps/AjaxUpload/res/green/w_61x27.png new file mode 100755 index 000000000..b998c2558 Binary files /dev/null and b/deploy/comps/AjaxUpload/res/green/w_61x27.png differ diff --git a/deploy/comps/AjaxUpload/res/index.php b/deploy/comps/AjaxUpload/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/deploy/comps/AjaxUpload/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AutoChecked/AutoChecked.js b/deploy/comps/AutoChecked/AutoChecked.js new file mode 100755 index 000000000..92a3048b6 --- /dev/null +++ b/deploy/comps/AutoChecked/AutoChecked.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common"],function(){JC.Form&&(JC.Form.initCheckAll=c);JC.AutoChecked=c;JC.f.addAutoInit&&JC.f.addAutoInit(c);function c(f){f=$(f);if(!(f&&f.length)){return}if(f.prop("nodeName").toLowerCase()!="input"){return c.init(f)}if(c.getInstance(f)){return c.getInstance(f)}c.getInstance(f,this);this._model=new e(f);this._view=new d(this._model);this._init()}c.init=function(g){g=$(g);if(!(g&&g.length)){return}var h=g.find("input[type=checkbox][checktype][checkfor]"),f;h.each(function(){f=$(this);if(!c.isAutoChecked(f)){return}if(c.getInstance(f)){c.getInstance(f).update();return}new c(f)})};c.prototype={_init:function(){var f=this;f._initHandlerEvent();$([f._view,f._model]).on("BindEvent",function(g,i,h){f.on(i,h)});$([f._view,f._model]).on("TriggerEvent",function(g,i){var h=JC.f.sliceArgs(arguments);h.shift();h.shift();f.trigger(i,h)});f._model.init();f._view.init();f._view.itemChange();return f},_initHandlerEvent:function(){var f=this;f.selector().on("change",function(){f.trigger(f._model.checktype())});f.on("all",function(){f._view.allChange()});f.on("inverse",function(){f._view.inverseChange()});if(!(f._model.checktype()=="inverse"&&f._model.hasCheckAll())){$(f._model.delegateElement()).delegate(f._model.delegateSelector(),"click",function(g){if(c.isAutoChecked($(this))){return}f._view.itemChange()})}},update:function(){this._view.itemChange();return this},selector:function(){return this._model.selector()},on:function(g,f){$(this).on(g,f);return this},trigger:function(g,f){$(this).trigger(g,f);return this}};c.getInstance=function(f,g){if(typeof f=="string"&&!/ diff --git a/deploy/comps/AutoChecked/res/default/style.css b/deploy/comps/AutoChecked/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/deploy/comps/AutoComplete/AutoComplete.js b/deploy/comps/AutoComplete/AutoComplete.js new file mode 100755 index 000000000..8d2aa721e --- /dev/null +++ b/deploy/comps/AutoComplete/AutoComplete.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){JC.AutoComplete=c;var e=$(document),d=$(window);function c(f){f&&(f=$(f));if(c.getInstance(f)){return c.getInstance(f)}c.getInstance(f,this);this._model=new c.Model(f);this._view=new c.View(this._model);this._init();JC.log("AutoComplete inited",new Date().getTime())}c.getInstance=function(f,g){if(typeof f=="string"&&!/{1}');this.is("[cacListItemTpl]")&&(f=JC.f.scriptContent(this.selectorProp("cacListItemTpl")));return f},cacItemClickHanlder:function(){return this.callbackProp("cacItemClickHanlder")},cacBeforeShowHandler:function(){return this.callbackProp("cacBeforeShowHandler")},popup:function(){var f=this,g=f.selector().data("AC_panel");!g&&(g=this.selectorProp("cacPopup"));if(!(g&&g.length)){g=$(JC.f.printf('
            {1}
          ',' style="position:absolute;"','
        • '+f.cacNoDataText()+"
        • "));f.selector().data("AC_panel",g);f.cacMultiSelect()?g.appendTo(f.layoutPopup()):g.appendTo(document.body)}if(!this._inited){this._inited=true;g.css({width:f.cacBoxWidth()+"px"})}return g},layoutPopup:function(){if(!this._layoutPopup){if(this.cacMultiSelect()){this._layoutPopup=$('
          ');this._layoutPopup.appendTo(document.body)}else{this._layoutPopup=this.popup()}}return this._layoutPopup},initPopupData:function(f){this.initData=f},verifyKey:function(){if(!this.cacStrictData()){return}var g=this,m=this.selector().val().trim(),k=[],f=g.selector().is("[cacIdKey]"),l;if(!m){g.selector().val("");g.setIdSelectorData();return}if(m){var j=g.cacIdVal(),i,h;$.each(g.initData,function(p,o){if(f){var n=o.label.trim();if(n===m){l=true;!h&&g.setIdSelectorData(o.id);h=true}if(n===m&&!j){g.setIdSelectorData(j=o.id)}if(n===m&&o.id===j){k.push(o);!i&&(g.setIdSelectorData(o.id));i=true;l=true;return false}}else{if(o.label.trim()==m){k.push(o);l=true}}})}if(!l){g.selector().val("");g.setIdSelectorData()}},cache:function(f){if(!(f in this._cache)){this._cache[f]=this.keyData(f)||this.initData}return this._cache[f]},clearCache:function(){this._cache={}},dataItems:function(){var f=this,h=f.listItems(),g=[];h.each(function(k,j){var i=$(this);g.push({id:i.attr(f.cacIdKey())||"",label:i.attr(f.cacLabelKey())})});return g},noCache:function(){var f=c.AJAX_NO_CACHE;this.is("[cacNoCache]")&&(f=this.boolProp("cacNoCache"));return f},ajaxData:function(g,h){var f=this,g=g||f.attrProp("cacAjaxDataUrl");if(!g){return}if(!f.noCache()&&(g in c.Model.AJAX_CACHE)){$(f).trigger("TriggerEvent",[c.Model.UPDATE,c.Model.AJAX_CACHE[g],h]);return}$.get(g).done(function(i){i=$.parseJSON(i);i=f.cacDataFilter(i);c.Model.AJAX_CACHE[g]=i;$(f).trigger("TriggerEvent",[c.Model.UPDATE,c.Model.AJAX_CACHE[g],h]);f.clearCache();f.trigger(c.Model.UPDATE_LIST)})},keyData:function(f){var h=this,g=h.initData,l=0,k=h.cacCasesensitive(),n=f.toLowerCase(),j=[[],[],[],[]],i=[];for(l=0;l0){j[g[l].tag=2].push(g[l])}else{if(!k&&m.indexOf(n)>0){j[g[l].tag=3].push(g[l])}}}}}$.each(j,function(p,o){i=i.concat(o)});return i},setSelectorData:function(g){g&&(g=$(g));if(!(g&&g.length)){return}var f=this,i=g.attr(f.cacLabelKey()).trim(),h=g.attr(f.cacIdKey()).trim();f.selector().val(i);f.selector().attr("cacIdVal",h);f.setIdSelectorData(h)},setIdSelectorData:function(g){var f=this;if(!(f.cacIdSelector()&&f.cacIdSelector().length)){return}if(typeof g!="undefined"){f.cacIdSelector().val(g);f.selector().attr("cacIdVal",g)}else{f.cacIdSelector().val("");f.selector().attr("cacIdVal","")}},listItems:function(){var f;this.popup()&&this.popup().length&&(f=this.popup().find(this.cacSubItemsSelector()));return f},selectedItem:function(){var f;this.listItems().each(function(){var g=$(this);if(g.hasClass(c.Model.CLASS_ACTIVE)){f=g;return false}});return f},keyupTimeout:function(f){this._keyupTimeout&&clearTimeout(this._keyupTimeout);this._keyupTimeout=f},keydownTimeout:function(f){this._keydownTimeout&&clearTimeout(this._keydownTimeout);this._keydownTimeout=f},blurTimeout:function(f){this._blurTimeout&&clearTimeout(this._blurTimeout);this._blurTimeout=f},cacDataFilter:function(g){var f=this,h=f.callbackProp("cacDataFilter")||c.dataFilter;h&&(g=h(g));if(f.cacFixHtmlEntity()){$.each(g,function(j,i){i.label&&(i.label=$("

          "+i.label+"

          ").text())})}return g},cacNoDataText:function(){var f=this.attrProp("cacNoDataText")||"数据加载中, 请稍候...";return f},cacValidCheckTimeout:function(){var f=this.intProp("cacValidCheckTimeout")||c.validCheckTimeout||1;return f},cacStrictData:function(){var f=this.boolProp("cacStrictData");return f},cacFixHtmlEntity:function(){var f=c.fixHtmlEntity;this.selector().is("[cacFixHtmlEntity]")&&(f=this.boolProp("cacFixHtmlEntity"));return f},cacLabelKey:function(){var f=this.attrProp("cacLabelKey")||"data-label";return f},cacIdKey:function(f){typeof f!="undefined"&&(this.selector().attr("cacIdKey",f));var g=this.attrProp("cacIdKey")||this.cacLabelKey();return g},cacIdVal:function(){var f=this,g=f.attrProp("cacIdVal");f.cacIdSelector()&&f.cacIdSelector().length&&(g=f.cacIdSelector().val());g=(g||"").trim();return g},cacIdSelector:function(){var f=this.selectorProp("cacIdSelector");return f},cacPreventEnter:function(){var f;f=this.selector().is("[cacPreventEnter]")&&JC.f.parseBool(this.selector().attr("cacPreventEnter"));return f},cacBoxWidth:function(){var f=0||this.intProp("cacBoxWidth");!f&&(f=this.selector().width());return f},cacCasesensitive:function(){return this.boolProp("cacCasesensitive")},cacSubItemsSelector:function(){var f=this.attrProp("cacSubItemsSelector")||"li";f+="["+this.cacLabelKey()+"]";return f},cacMultiSelect:function(){return this.boolProp("cacMultiSelect")},cacMultiSelectBarTpl:function(){var g='',f;this.is("[cacMultiSelectBarTpl]")&&(f=this.selectorProp("cacMultiSelectBarTpl"))&&f.length&&(g=JC.f.scriptContent(f));return g}});JC.f.extendObject(c.View.prototype,{init:function(){var f=this;f._model.listItems().each(function(g){$(this).attr("data-index",g)}).removeClass(c.Model.CLASS_ACTIVE).first().addClass(c.Model.CLASS_ACTIVE)},build:function(h){var f=this,i=0,j=[];if(h.length==0){f.hide();f._model.popup().html(JC.f.printf('
        • {0}
        • ',f._model.cacNoDataText()))}else{var g=f._model.listItemTpl();for(;i{0}',f._model.cacMultiSelectBarTpl())).appendTo(f._model.layoutPopup())},hide:function(){var f=this;f._model.layoutPopup().hide()},show:function(){var f=this,g=f._model.selector().offset(),l=f._model.selector().prop("offsetHeight"),i=f._model.selector().prop("offsetWidth");f._model.layoutPopup().css({top:g.top+l+"px",left:g.left+"px"});var k,m=f._model.selector().val().trim(),h=f._model.cacIdVal(),j=f._model.cacLabelKey()!=f._model.cacIdKey();f._model.listItems().each(function(){var n=$(this),p=n.attr(f._model.cacLabelKey()),o=n.attr(f._model.cacIdKey());n.removeClass(c.Model.CLASS_ACTIVE);if(m==p){if(j&&h){h==o&&n.addClass(c.Model.CLASS_ACTIVE);k=n}else{n.addClass(c.Model.CLASS_ACTIVE);k=n}}});if(!k){f._model.listItems().first().addClass(c.Model.CLASS_ACTIVE)}f._model.layoutPopup().show();f.trigger("after_popup_show")},updateList:function(h){var f=this,j,l=[],k=f._model.selector().val().trim(),g=f._model.cacIdVal(),i;if((!k)||h){i=f._model.initData}else{i=f._model.cache(k,g)}i&&f.build(i)},currentIndex:function(g){var f=this,j=f._model.popup(),i=f._model.listItems(),h=-1;if(!i.length){return}i.each(function(l){var k=$(this);if(k.hasClass(c.Model.CLASS_ACTIVE)){h=l;return false}});if(h<0){h=g?0:i.length-1}else{h=g?h+1:h-1;if(h<0){h=i.length-1}else{if(h>=i.length){h=0}}}return h},updateListIndex:function(g){var f=this,h=f.currentIndex(g);f.updateIndex(h)},updateIndex:function(g,i){var f=this,h=f._model.listItems();f.removeActiveClass();$(h[g]).addClass(c.Model.CLASS_ACTIVE);!i&&f.setScroll(g)},setScroll:function(i){var f=this,l=f._model.listItems().eq(i),g=l.position();if(!g){return}var j=l.position().top+l.height(),h=f._model.popup().innerHeight(),k=f._model.popup().scrollTop();j=j+k;if(i==-1){f._model.selector().focus();f._model.listItems().removeClass(c.Model.CLASS_ACTIVE)}else{f._model.listItems().removeClass(c.Model.CLASS_ACTIVE);l.addClass(c.Model.CLASS_ACTIVE);if(j>h){f._model.popup().scrollTop(j-h)}if(l.position().top<0){f._model.popup().scrollTop(0)}}c.Model.SCROLL_TIMEOUT&&clearTimeout(c.Model.SCROLL_TIMEOUT);c.Model.SCROLL_TIMEOUT=setTimeout(function(){c.Model.isScroll=false},500)},removeActiveClass:function(){this._model.listItems().removeClass(c.Model.CLASS_ACTIVE)}});$.event.special[c.Model.REMOVE]={remove:function(f){if(f.handler){f.handler()}}};$(window).on("resize",function(f){$("input.js_compAutoComplete").each(function(){var g=c.getInstance($(this));g&&g.fixPosition()})});$(document).on("click",function(){c.hideAllPopup()});$(document).delegate("input.js_compAutoComplete","focus",function(f){!c.getInstance(this)&&new c(this)});return JC.AutoComplete})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/AutoComplete/index.php b/deploy/comps/AutoComplete/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/deploy/comps/AutoComplete/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AutoComplete/res/default/index.php b/deploy/comps/AutoComplete/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/deploy/comps/AutoComplete/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AutoComplete/res/default/style.css b/deploy/comps/AutoComplete/res/default/style.css new file mode 100755 index 000000000..1a3199e90 --- /dev/null +++ b/deploy/comps/AutoComplete/res/default/style.css @@ -0,0 +1 @@ +.AC_layoutBox a,.AC_box a{text-decoration:none;color:#333}.AC_layoutBox,.AC_box{max-height:300px;overflow-y:auto;border:1px solid #ccc;padding:0;margin:-1px 0 0;list-style:none;background:#fff;display:none;position:absolute}.AC_layoutBox{max-height:325px;overflow-y:visible;margin:-1px 0 0;display:none}.AC_layoutBox .AC_box{max-height:300px;border:none !important;padding:0;margin:0;display:block !important;position:static !important}.AC_box li{line-height:24px;text-indent:3px}.AC_box li.AC_active{background:#eee}.AC_fakebox{border-color:#4d90fe}.AC_listItem{clear:both;cursor:pointer}.AC_addtionItem{font-size:13px;text-align:right;border-top:1px dashed #ccc;padding:0;margin:2px 4px;padding-right:0 !important}.AC_addtionItem div{margin-top:4px}.AC_customAdd{font-size:13px;text-align:right;padding-right:5px;float:right}.AC_control{color:#999 !important;cursor:pointer}.AC_noData{padding-left:5px}.AC_center{text-align:center} \ No newline at end of file diff --git a/deploy/comps/AutoComplete/res/index.php b/deploy/comps/AutoComplete/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/deploy/comps/AutoComplete/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AutoFixed/AutoFixed.js b/deploy/comps/AutoFixed/AutoFixed.js new file mode 100755 index 000000000..f4d860924 --- /dev/null +++ b/deploy/comps/AutoFixed/AutoFixed.js @@ -0,0 +1 @@ +(function(b,a){b("JC.AutoFixed",["JC.BaseMVC"],function(){var d=$(document),c=$(window);JC.AutoFixed=e;function e(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,e)){return JC.BaseMVC.getInstance(f,e)}JC.BaseMVC.getInstance(f,e,this);this._model=new e.Model(f);this._view=new e.View(this._model);this._init()}e.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.hasClass("js_compAutoFixed")){g.push(new e(f))}else{f.find("div.js_compAutoFixed, ul.js_compAutoFixed, dl.js_compAutoFixed").each(function(){g.push(new e(this))})}}return g};e.INIT_DELAY=0;JC.BaseMVC.build(e);JC.f.extendObject(e.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var f=this;f.on("inited",function(){var i=JDOC.scrollTop(),h=f._model.defaultStyle().top;if(JDOC.scrollTop()>0){f.trigger("UPDATE_POSITION",[i,h])}});f._model.saveDefault();if(f._model.fixAnchor()){JDOC.delegate("a[href]","click",function(j){var i=$(this),h=i.attr("href")||"";if(!/^[#]/.test(h)){return}JC.f.safeTimeout(function(){JDOC.scrollTop(JDOC.scrollTop()-f.selector().height())},null,f._model.gid(),1)})}JWIN.on("scroll",function(i){var j=JDOC.scrollTop(),h=f._model.defaultStyle().gtop;f.trigger("UPDATE_POSITION",[j,h])});JWIN.on("resize",function(j){var m=f._model.cloneItem(),o,l,i,h,k,n;if(!m){f._model.normalClass()&&f.selector().removeClass(f._model.normalClass())&&f.selector().addClass(f._model.normalClass());o=f.selector().width()}else{i=f._model.defaultStyle();h=JC.f.winSize();l=i.height;if(l+f._model.fixedTopPx()>h.height){l=h.height-f._model.fixedTopPx()}if(f._model.defaultStyle().right!="auto"){f.selector().css({right:JC.f.winSize().width-(m.offset().left+m.width()),height:l});return}o=m.width();n={width:o,height:l,left:m.offset().left};if(i.right!="auto"){n.right=h.width-(m.offset().left+m.width())}else{n.left=m.offset().left}f.selector().css(n)}f._model.defaultStyle().width=o});f.on("UPDATE_POSITION",function(i,j,h){if((j)>(h-f._model.fixedTopPx())){f.trigger("FIXED",[j,h])}else{f.trigger("UN_FIXED",[j,h])}});f.on("FIXED",function(i,m,j){var o=f._model.defaultStyle(),p=0,n,l=JC.f.winSize(),k,h;if(f._model.cloneItem()){return}if(f._model.fixedLock()){return}f._model.fixedLock(true);f._model.unfixedLock(false);if(o.left!=o.gleft){p=o.gleft}else{p=o.left}k=o.height;if(k+f._model.fixedTopPx()>l.height){k=l.height-f._model.fixedTopPx()}f.trigger("CLONE_ITEM");h=f._model.cloneItem();n={position:"fixed",top:f._model.fixedTopPx(),height:k,width:o.width};if(o.right!="auto"){n.right=l.width-(h.offset().left+h.width())}else{n.left=p;n.left=h.offset().left}f.selector().css(n);f._model.normalClass()&&f.selector().removeClass(f._model.normalClass());f._model.fixedClass()&&f.selector().addClass(f._model.fixedClass())});f.on("UN_FIXED",function(j,l,i){if(f._model.unfixedLock()){return}f._model.unfixedLock(true);f._model.fixedLock(false);var h=f._model.defaultStyle(),k;f.trigger("UN_CLONE_ITEM");k={position:h.position,top:h.top,height:h.height};if(h.right!="auto"){k.right=h.right}else{k.left=h.left}f.selector().css(k);f._model.fixedClass()&&f.selector().removeClass(f._model.fixedClass());f._model.normalClass()&&f.selector().addClass(f._model.normalClass())});f.on("CLONE_ITEM",function(){if(f._model.cloneItem()){return}var i=$("
          "),h=f._model.defaultStyle();i.css({visibility:"hidden",height:h.height,overflow:"hidden",position:h.position,right:h.right,width:h.width});f._model.cloneItemClass()&&i.addClass(f._model.cloneItemClass());i.html("");f._model.cloneItem(i);f.selector().after(i)});f.on("UN_CLONE_ITEM",function(){f._model.cloneItem(null)});if(f._model.highlightTrigger()&&f._model.highlightTrigger().length){var g=JC.f.ts();f._model.highlightTrigger().on("click",function(){g=JC.f.ts();var h=f._model.findTargetAnchorAndLayout($(this))||{};f.trigger("setCurHighlight",[this,h.layout])});f.on("setCurHighlight",function(h,j,i){j=$(j);if(!(j&&j.length)){return}f._model.lastHighlightItem()&&f._model.lastHighlightItem().removeClass(f._model.highlightClass());j.addClass(f._model.highlightClass());f._model.lastHighlightItem(j);if(i&&i.length){f._model.lastHighlightLayout()&&f._model.lastHighlightLayout().removeClass(f._model.highlightLayoutClass());i.addClass(f._model.highlightLayoutClass());f._model.lastHighlightLayout(i)}});JWIN.on("scroll",function(i){if(JC.f.ts()-g<200){return}var k=JDOC.scrollTop(),h,j;f._model.highlightTrigger().each(function(){var n=$(this),m=n.attr("href").replace(/^\#/,""),l;if(!m){return}l=$(JC.f.printf("a[name={0}]",m)).first();if(!l.length){return}j=f._model.anchorOffset(l);if(j.top>k){h=n;return false}});j=j||{};if(h){f.trigger("setCurHighlight",[h,j.layout])}})}},_inited:function(){this.trigger("inited")}});e.Model._instanceName="JCAutoFixed";JC.f.extendObject(e.Model.prototype,{init:function(){},findTargetAnchorAndLayout:function(f){var k=$(f),h=k.attr("href").replace(/^\#/,""),g,i,j=null;if(!h){return j}g=$(JC.f.printf("a[name={0}]",h)).first();if(!g.length){return j}j={trigger:k,target:g,layout:this.highlightAnchorLayout(g)};return j},gid:function(){!this._gid&&(this._gid=JC.f.gid());return this._gid},lastHighlightLayout:function(f){f&&(this._lastHighlightLayout=f);return this._lastHighlightLayout},highlightLayoutClass:function(){return this.attrProp("data-highlightLayoutClass")||this.highlightClass()||"cur"},lastHighlightItem:function(f){f&&(this._lastHighlightItem=f);return this._lastHighlightItem},highlightClass:function(){return this.attrProp("data-highlightClass")||"cur"},highlightTrigger:function(){return this.selectorProp("data-highlightTrigger")},anchorOffset:function(f){var h=f.offset(),i=this.highlightAnchorLayout(f),g;if(i&&i.length){h=i.offset();h.top+=i.height()}h.layout=i;return h},highlightAnchorLayout:function(f){var g;if(this.is("[data-highlightAnchorLayout]")){g=JC.f.parentSelector(f,this.attrProp("data-highlightAnchorLayout"))}return g},defaultStyle:function(){var f={position:"static",left:0,top:0,right:0,bottom:0,width:0,height:0,gleft:0,gtop:0,winSize:JC.f.winSize()};return this._defaultStyle||f},fixedLock:function(f){typeof f!="undefined"&&(this._fixedLock=f);return this._fixedLock},unfixedLock:function(f){typeof f!="undefined"&&(this._unfixedLock=f);return this._unfixedLock},saveDefault:function(){var f=this,i=f.defaultStyle(),h=f.selector().position(),g=f.selector().offset();i.owidth=f.selector().css("width");i.gleft=g.left;i.gtop=g.top;i.position=f.selector().css("position");i.left=h.left;i.top=h.top;i.width=f.selector().width();i.height=f.selector().height();i.right=f.selector().css("right");i.bottom=f.selector().css("bottom");f._defaultStyle=i},fixedTopPx:function(){typeof this._fixedTopPx=="undefined"&&(this._fixedTopPx=this.floatProp("data-fixedTopPx"));return this._fixedTopPx},fixAnchor:function(){return this.boolProp("data-fixAnchor")},fixedClass:function(){return this.attrProp("data-fixedClass")},normalClass:function(){return this.attrProp("data-normalClass")},cloneItemClass:function(){return this.attrProp("data-cloneItemClass")},cloneItem:function(f){if(typeof f!="undefined"){if(!f&&this._cloneItem){this._cloneItem.remove()}this._cloneItem=f}return this._cloneItem}});JC.f.extendObject(e.View.prototype,{init:function(){}});d.ready(function(){JC.f.safeTimeout(function(){if(JC.AutoFixed.INIT_DELAY){JC.f.safeTimeout(function(){e.autoInit&&e.init()},null,"AutoFixedasdfasefasedf",JC.AutoFixed.INIT_DELAY)}else{e.autoInit&&e.init()}},null,"AutoFixed23asdfa",1)});return JC.AutoFixed})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/AutoFixed/index.php b/deploy/comps/AutoFixed/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/AutoFixed/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AutoFixed/res/default/style.css b/deploy/comps/AutoFixed/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/deploy/comps/AutoFixed/res/default/style.html b/deploy/comps/AutoFixed/res/default/style.html new file mode 100755 index 000000000..721dc5b03 --- /dev/null +++ b/deploy/comps/AutoFixed/res/default/style.html @@ -0,0 +1,11 @@ + + + + +suches template + + + + + + diff --git a/deploy/comps/AutoSelect/AutoSelect.js b/deploy/comps/AutoSelect/AutoSelect.js new file mode 100755 index 000000000..330c6baca --- /dev/null +++ b/deploy/comps/AutoSelect/AutoSelect.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common"],function(){JC.AutoSelect=h;JC.Form&&(JC.Form.initAutoSelect=h);JC.f.addAutoInit&&JC.f.addAutoInit(h);function h(i){var j=[];i&&(i=$(i));if(h.isSelect(i)){j.push(new d(i))}else{if(i&&i.length){i.find("select[defaultselect]").each(function(){j.push(new d($(this)))})}}return j}var g={isSelect:function(i){var j;i&&(i=$(i))&&i.is("select")&&i.is("[defaultselect]")&&(j=true);return j},hideEmpty:false,dataFilter:null,beforeInited:null,inited:null,change:null,allChanged:null,triggerInitChange:true,randomurl:false,processUrl:null,ignoreInitRequest:false,getInstance:function(i,j){var k;i&&(i=$(i))&&(typeof j!="undefined"&&i.data("SelectIns",j),k=i.data("SelectIns"));return k},removeItems:function(j){var k=j.find("> option:not([defaultoption])"),i=k.length;k.remove();return i}};for(var c in g){h[c]=g[c]}function d(i){if(h.getInstance(i)){return h.getInstance(i)}h.getInstance(i,this);this._model=new f(i);this._view=new e(this._model,this);this._init()}d.prototype={_init:function(){var i=this;$.each(i._model.items(),function(k,j){h.getInstance($(j),i)});i._model.beforeInited()&&i.on("SelectBeforeInited",i._model.beforeInited());i.on("SelectInited",function(){if(i._model.isInited()){return}var j=i._model.first();while(i._model.next(j)){j.on("change",i._responeChange);j=i._model.next(j)}if(i._model.items().length){$(i._model.items()[i._model.items().length-1]).on("change",function(k){i.trigger("SelectAllChanged")})}i._model.isInited(true);i._model.inited()&&i._model.inited().call(i,i._model.items())});i.on("SelectChange",function(k,j){i._model.change(j)&&i._model.change(j).call(j,k,i)});i._model.allChanged()&&i.on("SelectAllChanged",function(j){i._model.allChanged().call(i,i._model.items())});i.trigger("SelectBeforeInited");if(i._model.selectignoreinitrequest()){i._model.triggerInitChange()&&i._model.first().trigger("change");i.trigger("SelectAllChanged");i.trigger("SelectInited")}else{i._update(i._model.first(),i._firstInitCb)}return i},on:function(i,j){$(this).on(i,j);return this},trigger:function(j,i){$(this).trigger(j,i);return this},first:function(){return this._model.first()},last:function(){return this._model.last()},items:function(){return this._model.items()},isFirst:function(i){return this._model.isFirst(i)},isLast:function(i){return this._model.isLast(i)},isInited:function(){return this._model.isInited()},data:function(i){return this._model.data(i)},update:function(k){if(!(k&&k.length)){return this}if(typeof k=="string"){var j=k.replace(/[\s]+/g,"").trim();if(!j){return this}k=j.split(",")}var i=this,l=i._model.items();if(!(l&&l.length)){return}$.each(k,function(n,m){if(!l[n]){return}$(l[n]).attr("selectvalue",(m.toString()||"").trim())});i._update(i._model.first(),i._changeCb);return this},_responeChange:function(k,m){var j=$(this),i=h.getInstance(j),l=i._model.next(j),n=j.val();if(m){return}if(!(l&&l.length)){i.trigger("SelectChange")}else{i._update(l,i._changeCb,n)}},_update:function(j,l,k,i){if(this._model.isStatic(j)){this._updateStatic(j,l,k)}else{if(this._model.isAjax(j)){this._updateAjax(j,l,k,i)}else{this._updateNormal(j,l,k)}}return this},_updateAjax:function(m,q,p,o){var i=this,j,k=i._model.next(m),l,n;if(i._model.isFirst(m)){typeof p=="undefined"&&(p=i._model.selectparentid(m)||"");if(typeof p!="undefined"){l=i._model.selecturl(m,p);n=i._model.token(true);if(i._model.selectCacheData()&&f.ajaxCache(l)){setTimeout(function(){j=f.ajaxCache(l);i._view.update(m,j,p);q&&q.call(i,m,j,n)},10)}else{setTimeout(function(){$.get(l,function(r){r=f.ajaxCache(l,$.parseJSON(r));i._view.update(m,r,p);q&&q.call(i,m,r,n)})},10)}}}else{if(typeof o!="undefined"&&o!=i._model.token()){return}l=i._model.selecturl(m,p);if(i._model.selectCacheData()&&f.ajaxCache(l)){j=f.ajaxCache(l);i._processData(o,m,q,j,p)}else{$.get(l,function(r){r=$.parseJSON(r);i._processData(o,m,q,f.ajaxCache(l,r,p))})}}return this},_processData:function(k,j,n,m,l){var i=this;setTimeout(function(){if(typeof k!="undefined"&&k!=i._model.token()){return}i._view.update(j,m,l);n&&n.call(i,j,m,k)},10)},_changeCb:function(k,m,j){var i=this,l=i._model.next(k),n=i._model.token();if(typeof j!="undefined"){if(j!==n){return}}i.trigger("SelectChange",[k]);k.trigger("change",[true]);if(i._model.isLast(k)){}if(l&&l.length){i._update(l,i._changeCb,k.val(),j)}return this},_firstInitCb:function(j,l){var i=this,k=i._model.next(j);if(!i._model.isInited()){i._model.triggerInitChange()&&j.trigger("change",[true])}i.trigger("SelectChange",[j]);if(k&&k.length){i._update(k,i._firstInitCb,j.val())}if(i._model.isLast(j)){i.trigger("SelectAllChanged");!i._model.isInited()&&i.trigger("SelectInited")}return this},_updateStatic:function(j,m,k){var i=this,l,n=false;if(i._model.isFirst(j)){typeof k=="undefined"&&(k=i._model.selectparentid(j)||i._model.selectvalue(j)||"");if(i._model.hasVal(j,k)){j.val(k);n=true}else{if(typeof k!="undefined"){l=i._model.datacb(j)(k)}}}else{l=i._model.datacb(j)(k)}!n&&i._view.update(j,l,k);m&&m.call(i,j,l);return this},_updateNormal:function(j,n,l){var i=this,m;if(i._model.isFirst(j)){var k=i._model.next(j);typeof l=="undefined"&&(l=i._model.selectvalue(j)||j.val()||"");if(i._model.hasVal(j,l)){j.val(l)}if(k&&k.length){i._update(k,n,l);return this}}else{m=i._model.datacb(j)(l)}i._view.update(j,m,l);n&&n.call(i,j,m);return this}};function f(i){this._selector=i;this._items=[];this._isInited=false;this._init()}f._ajaxCache={};f.ajaxCache=function(i,j){j&&(f._ajaxCache[i]=j);return f._ajaxCache[i]};f.prototype={_init:function(){this._findAllItems(this._selector);this._initRelationship();return this},token:function(i){typeof this._token=="undefined"&&(this._token=0);i&&(this._token++);return this._token},selectCacheData:function(){var i=true;this.first().is("[selectCacheData]")&&(i=JC.f.parseBool(this.first().attr("selectCacheData")));return i},_findAllItems:function(i){this._items.push(i);i.is("[selecttarget]")&&this._findAllItems(JC.f.parentSelector(i,i.attr("selecttarget")))},_initRelationship:function(){this._selector.data("FirstSelect",true);if(this._items.length>1){this._items[this._items.length-1].data("LastSelect",true);for(var j=0;j{1}',r[0],r[1],q))}$(m.join("")).appendTo(o);if(this._model.hasVal(o,t)){o.val(t)}this._control.trigger("SelectItemUpdated",[o,l])},hideItem:function(i){i.hide();while(i=this._model.next(i)){i.hide()}}};$(document).ready(function(i){setTimeout(function(){h(document.body)},200)});return JC.AutoSelect})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/AutoSelect/index.php b/deploy/comps/AutoSelect/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/AutoSelect/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/AutoSelect/res/default/style.css b/deploy/comps/AutoSelect/res/default/style.css new file mode 100755 index 000000000..e69de29bb diff --git a/deploy/comps/BaseMVC/BaseMVC.js b/deploy/comps/BaseMVC/BaseMVC.js new file mode 100755 index 000000000..9230c3909 --- /dev/null +++ b/deploy/comps/BaseMVC/BaseMVC.js @@ -0,0 +1 @@ +(function(define,_win){define(["JC.common"],function(){window.BaseMVC=JC.BaseMVC=BaseMVC;function BaseMVC(_selector){throw new Error("JC.BaseMVC is an abstract class, can't initialize!");if(BaseMVC.getInstance(_selector)){return BaseMVC.getInstance(_selector)}BaseMVC.getInstance(_selector,this);this._model=new BaseMVC.Model(_selector);this._view=new BaseMVC.View(this._model);this._init()}BaseMVC.prototype={_init:function(){var _p=this;$([_p._view,_p._model]).on("BindEvent",function(_evt,_evtName,_cb){_p.on(_evtName,_cb)});$([_p._view,_p._model]).on("TriggerEvent",function(_evt,_evtName){var _data=JC.f.sliceArgs(arguments).slice(2);return _p.triggerHandler(_evtName,_data)});_p._beforeInit();_p._initHanlderEvent();_p._model.init();_p._view&&_p._view.init();_p._inited();return _p},_beforeInit:function(){},_initHanlderEvent:function(){},_inited:function(){},selector:function(){return this._model.selector()},on:function(_evtName,_cb){$(this).on(_evtName,_cb);return this},trigger:function(_evtName,_data){$(this).trigger(_evtName,_data);return this},triggerHandler:function(_evtName,_data){return $(this).triggerHandler(_evtName,_data)},notification:function(_evtName,_args){this._model.notification(_evtName,_args)},notificationHandler:function(_evtName,_args){return this._model.notificationHandler(_evtName,_args)}};BaseMVC.getInstance=function(_selector,_staticClass,_classInstance){typeof _selector=="string"&&!/ diff --git a/deploy/comps/Calendar/Calendar.js b/deploy/comps/Calendar/Calendar.js new file mode 100755 index 000000000..c4d0fce93 --- /dev/null +++ b/deploy/comps/Calendar/Calendar.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common"],function(){window.Calendar=JC.Calendar=e;JC.f.addAutoInit&&JC.f.addAutoInit(e);function e(f){if(e.getInstance(f)){return e.getInstance(f)}e.getInstance(f,this);var g=e.type(f);switch(g){case"week":this._model=new e.WeekModel(f);this._view=new e.WeekView(this._model);break;case"month":this._model=new e.MonthModel(f);this._view=new e.MonthView(this._model);break;case"season":this._model=new e.SeasonModel(f);this._view=new e.SeasonView(this._model);break;case"year":this._model=new e.YearModel(f);this._view=new e.YearView(this._model);break;case"monthday":this._model=new e.MonthDayModel(f);this._view=new e.MonthDayView(this._model);break;default:this._model=new e.Model(f);this._view=new e.View(this._model);break}this._init()}e.prototype={_init:function(){var f=this;f._initHanlderEvent();$([f._view,f._model]).on("BindEvent",function(g,i,h){f.on(i,h)});$([f._view,f._model]).on("TriggerEvent",function(g,i){var h=JC.f.sliceArgs(arguments).slice(2);f.trigger(i,h)});f._model.init();f._view.init();return f},_initHanlderEvent:function(){var f=this;f.on(e.Model.INITED,function(g){f._model.calendarinited()&&f._model.calendarinited().call(f._model.selector(),f._model.layout(),f)});f.on(e.Model.SHOW,function(g){f._model.calendarshow()&&f._model.calendarshow().call(f._model.selector(),f._model.selector(),f)});f.on(e.Model.HIDE,function(g){f._model.calendarhide()&&f._model.calendarhide().call(f._model.selector(),f._model.selector(),f)});f.on(e.Model.UPDATE,function(g){if(!f._model.selector()){return}f._model.selector().blur();f._model.selector().trigger("change");var k=[],t=f._model.selector().val().trim(),h,n,q,r,p,s;if(t){q=t.split(",");for(var m=0,l=q.length;m10&&(g=(f%10!==0?e.cnUnit.charAt(0):"")+g);f>19&&(g=e.cnUnit.charAt(Math.floor(f/10))+g);return g};e.position=function(f){e.getInstance(f)&&e.getInstance(f).updatePosition()};e.setPosition=e.position;e.init=e.initTrigger=function(f){f.each(function(){var i=$(this),h=(i.prop("nodeName")||"").toLowerCase(),l,g;if(h!="input"&&h!="textarea"){e.initTrigger(f.find("input[type=text], textarea"));return}g=$.trim(i.attr("datatype")||"").toLowerCase();if(!(g=="date"||g=="week"||g=="month"||g=="season"||g=="year"||g=="daterange"||g=="monthday"||$.trim(i.attr("multidate")||""))){return}var k=i.find("+ input.UXCCalendar_btn");if(!k.length){i.after(k=$(''))}(l=(i.attr("minvalue")||""))&&(l=JC.f.dateDetect(l))&&i.attr("minvalue",JC.f.formatISODate(l));(l=(i.attr("maxvalue")||""))&&(l=JC.f.dateDetect(l))&&i.attr("maxvalue",JC.f.formatISODate(l));if(!(JC.f.parseBool(i.attr("ignoreInitCalendarDate"))||JC.f.parseBool(i.data("ignoreInitCalendarDate")))){(l=i.val().trim())&&(l=JC.f.dateDetect(l))&&i.val(JC.f.formatISODate(l));if(i.is("[dateFormat]")||i.is("[fullDateFormat]")){var j=e.getInstance(f);!j&&(j=new e(f));j.updateSelector(f);j.updateFormat(i)}if((i.attr("datatype")||"").toLowerCase()=="monthday"||(i.attr("multidate")||"").toLowerCase()=="monthday"){if(!i.is("[placeholder]")){var m=new Date();i.attr("defaultdate")&&(m=JC.f.parseISODate(i.attr("defaultdate"))||m);i.val().trim()&&(m=JC.f.parseISODate(i.val().replace(/[^d]/g,"").slice(0,8))||m);m&&i.attr("placeholder",JC.f.printf("{0}年 {1}月",m.getFullYear(),m.getMonth()+1))}}}k.data(e.Model.INPUT,i)})};e.fixDefaultDate=function(f){f&&(f=$(f));if(!(f&&f.length)){return}var g;g=f.val().trim();if(g){g=g.replace(e.Model.REG_REMOVE_NOT_DIGITAL,"").replace(e.Model.REG_REMOVE_ALL_ZERO,"");!g&&f.val("")}g=(f.attr("minvalue")||"").trim();if(g){g=g.replace(e.Model.REG_REMOVE_NOT_DIGITAL,"").replace(e.Model.REG_REMOVE_ALL_ZERO,"");!g&&f.removeAttr("minvalue")}g=(f.attr("maxvalue")||"").trim();if(g){g=g.replace(e.Model.REG_REMOVE_NOT_DIGITAL,"").replace(e.Model.REG_REMOVE_ALL_ZERO,"");!g&&f.removeAttr("maxvalue")}};e.updateMultiYear=function(g,h){var i,f;i=g.getDate();g.setDate(1);g.setFullYear(g.getFullYear()+h);f=JC.f.maxDayOfMonth(g);i>f&&(i=f);g.setDate(i);return g};e.updateMultiMonth=function(g,h){var i,f;i=g.getDate();g.setDate(1);g.setMonth(g.getMonth()+h);f=JC.f.maxDayOfMonth(g);i>f&&(i=f);g.setDate(i);return g};e.clone=function(g,h){var f;if(g){for(f in d.prototype){g.prototype[f]=d.prototype[f]}}if(h){for(f in c.prototype){h.prototype[f]=c.prototype[f]}}};function d(f){this._selector=f}e.Model=d;e.Model.INPUT="CalendarInput";e.Model.INITED="CalendarInited";e.Model.SHOW="CalendarShow";e.Model.HIDE="CalendarHide";e.Model.UPDATE="CalendarUpdate";e.Model.CLEAR="CalendarClear";e.Model.CANCEL="CalendarCancel";e.Model.LAYOUT_CHANGE="CalendarLayoutChange";e.Model.UPDATE_MULTISELECT="CalendarUpdateMultiSelect";e.Model.REG_REMOVE_ALL_ZERO=/^[0]+$/;e.Model.REG_REMOVE_NOT_DIGITAL=/[^\d]+/g;d.prototype={init:function(){return this},selector:function(f){typeof f!="undefined"&&(this._selector=f);return this._selector},layout:function(){var g=$("#UXCCalendar");if(!g.length){g=$(e.tpl||this.tpl).hide();g.attr("id","UXCCalendar").hide().appendTo(document.body);var f=$(['','','','','','','','','','','',''].join("")).appendTo(g.find("select.UMonth"))}return g},startYear:function(g){var f=e.defaultDateSpan,h=g.date.getFullYear();this.selector().is("[calendardatespan]")&&(f=parseInt(this.selector().attr("calendardatespan"),10));return h-f},endYear:function(g){var f=e.defaultDateSpan,h=g.date.getFullYear();this.selector().is("[calendardatespan]")&&(f=parseInt(this.selector().attr("calendardatespan"),10));return h+f},currentcanselect:function(){var f=true;this.selector().is("[currentcanselect]")&&(f=JC.f.parseBool(this.selector().attr("currentcanselect")));return f},year:function(){return parseInt(this.layout().find("select.UYear").val(),10)||1},month:function(){return parseInt(this.layout().find("select.UMonth").val(),10)||0},day:function(){var g,f=new Date();g=this.layout().find("td.cur > a[date], td.cur > a[dstart]");if(g.length){f.setTime(g.attr("date")||g.attr("dstart"))}return f.getDate()},defaultDate:function(){var f=this,g={date:null,minvalue:null,maxvalue:null,enddate:null,multidate:null};f.selector()&&(g=f.multiselect()?f.defaultMultiselectDate(g):f.defaultSingleSelectDate(g));if(f.dateParse(f.selector())){f.selector().is("[minvalue]")&&(g.minvalue=(f.dateParse(f.selector())(f.selector().attr("minvalue"))).start);f.selector().is("[maxvalue]")&&(g.maxvalue=(f.dateParse(f.selector())(f.selector().attr("maxvalue"))).start)}else{f.selector().is("[minvalue]")&&(g.minvalue=JC.f.parseISODate(f.selector().attr("minvalue")));f.selector().is("[maxvalue]")&&(g.maxvalue=JC.f.parseISODate(f.selector().attr("maxvalue")))}g.minvalue&&(g.minvalue=JC.f.pureDate(g.minvalue));g.maxvalue&&(g.maxvalue=JC.f.pureDate(g.maxvalue));g.date&&g.minvalue&&g.minvalue.getTime()>g.date.getTime()&&(g.date=JC.f.cloneDate(g.minvalue));g.date&&g.maxvalue&&g.maxvalue.getTime()g&&(h=g);i.date.setDate(h);return i},multiLayoutDate:function(){var f=this,l=f.defaultDate(),k=f.year(),j=f.month(),i=f.day(),m=new Date(k,j,1),g=JC.f.maxDayOfMonth(m),h=f.layout().find("select.UMonth");l.multidate=[];f.layout().find("td.cur").each(function(){var n=$(this);var p=n.find("> a[dstart]"),o=new Date(),q=new Date();o.setTime(p.attr("dstart"));q.setTime(p.attr("dend"));l.multidate.push({start:o,end:q})});l.date=new Date(k,j,1);l.date.enddate=new Date(k,j,g);if(h.length){l.date.setMonth(j);l.enddate.setMonth(j)}$.each(l.multidate,function(o,n){n.start.setFullYear(k);n.end.setFullYear(k);if(h.length){n.start.setMonth(j);n.end.setMonth(j)}});return l},selectedDate:function(){var h,g,f;g=this.layout().find("td.cur");g.length&&!g.hasClass("unable")&&(f=g.find("a[date]"))&&(h=new Date(),h.setTime(f.attr("date")));return h},multiselectDate:function(){var f=[];return f},calendarinited:function(){var h=this.selector(),g=e.layoutInitedCallback,f;h&&h.attr("calendarinited")&&(f=window[h.attr("calendarinited")])&&(g=f);return g},calendarshow:function(){var h=this.selector(),g=e.layoutShowCallback,f;h&&h.attr("calendarshow")&&(f=window[h.attr("calendarshow")])&&(g=f);return g},calendarhide:function(){var h=this.selector(),g=e.layoutHideCallback,f;h&&h.attr("calendarhide")&&(f=window[h.attr("calendarhide")])&&(g=f);return g},calendarupdate:function(h){var i=this.selector(),g,f;i&&i.attr("calendarupdate")&&(f=window[i.attr("calendarupdate")])&&(g=f);return g},calendarclear:function(){var h=this.selector(),g,f;h&&h.attr("calendarclear")&&(f=window[h.attr("calendarclear")])&&(g=f);return g},calendarcancel:function(){var h=this.selector(),g,f;h&&h.attr("calendarcancel")&&(f=window[h.attr("calendarcancel")])&&(g=f);return g},calendarlayoutchange:function(){var h=this.selector(),g,f;h&&h.attr("calendarlayoutchange")&&(f=window[h.attr("calendarlayoutchange")])&&(g=f);return g},multiselect:function(){var f;this.selector().is("[multiselect]")&&(f=JC.f.parseBool(this.selector().attr("multiselect")));return f},calendarupdatemultiselect:function(h){var i=this.selector(),g,f;i&&i.attr("calendarupdatemultiselect")&&(f=window[i.attr("calendarupdatemultiselect")])&&(g=f);return g},updateFormat:function(g){g&&(g=$(g));if(!(g&&g.length)){return}var f=this,h=(g.attr("datetype")||g.attr("multidate")||"").toLowerCase().trim(),l=g.val().trim(),j=f.dateParse(g),i,m,k;if(!l){return}if(h=="date"&&!g.attr("fullDateFormat")){g.attr("fullDateFormat","{0}")}if(j){switch(h){case"date":break;case"week":case"month":case"season":case"year":k=j(l);g.val(f.fullFormat(f.dateFormat(k.start,g),f.dateFormat(k.end,g),g));break}}else{switch(h){case"date":i=JC.f.parseISODate(l);g.val(f.dateFormat(i,g)||l);break}}},dateFormat:function(h,g){g=g||this.selector();var i="",f=g.attr("dateFormat")||"YY-MM-DD";h&&(i=JC.f.dateFormat(h,f));return i},fullFormat:function(g,h,f){f=f||this.selector();var j="",i=f.attr("fullDateFormat")||"{0} 至 {1}";if(g&&h){j=JC.f.printf(i,this.dateFormat(g,f),this.dateFormat(h,f))}else{if(g){j=JC.f.printf(i,this.dateFormat(g,f))}else{if(h){j=JC.f.printf(i,this.dateFormat(h,f))}}}return j},dateParse:function(f){var g;f&&f.attr("dateParse")&&(g=window[f.attr("dateParse")]);return g},tpl:['
          ','
          ',' ',' ',' ',' ',' ',' ',"
          ",'
           
          '," "," "," "," "," "," "," "," "," "," "," ","
          ",' '," "," "," ","
          ",'
          ',' ',' ',' ',"
          ","
          "].join("")};function c(f){this._model=f}e.View=c;c.prototype={init:function(){return this},hide:function(){this._model.layout().hide()},show:function(){var f=this._model.defaultDate();this._buildLayout(f);this._buildDone()},updateLayout:function(f){typeof f=="undefined"&&(f=this._model.layoutDate());if(f.minvalue||f.maxvalue){if(f.minvalue&&f.date.getTime()f.maxvalue.getTime()){f.date=JC.f.cloneDate(f.maxvalue)}}this._buildLayout(f);this._buildDone()},updateYear:function(h){if(typeof h=="undefined"||h==0){return}var i=this._model.layoutDate(),f;if(i.minvalue||i.maxvalue){var g;f=JC.f.cloneDate(i.date);f.setFullYear(f.getFullYear()+h);if(i.minvalue){if(f.getFullYear()i.maxvalue.getFullYear()){h=0;f=JC.f.cloneDate(i.maxvalue);g=true}else{if(new Date(f.getFullYear(),f.getMonth(),1).getTime()>new Date(i.maxvalue.getFullYear(),i.maxvalue.getMonth(),1).getTime()){h=0;f=JC.f.cloneDate(i.maxvalue);g=true}}}if(!g){f=null}else{}}this._model.multiselect()?this.updateMultiYear(h,f):this.updateSingleYear(h,f)},updateSingleYear:function(h,g){var j=this._model.layoutDate();if(g){j.date=g}else{var i=j.date.getDate(),f;j.date.setDate(1);j.date.setFullYear(j.date.getFullYear()+h);f=JC.f.maxDayOfMonth(j.date);i>f&&(i=f);j.date.setDate(i)}this._buildLayout(j);this._buildDone()},updateMultiYear:function(h,g){var j=this._model.layoutDate();j.date=g||j.date;var i,f;JC.Calendar.updateMultiYear(j.date,h);JC.Calendar.updateMultiYear(j.enddate,h);if(j.multidate){$.each(j.multidate,function(l,k){JC.Calendar.updateMultiYear(k.start,h);JC.Calendar.updateMultiYear(k.end,h)})}this._buildLayout(j);this._buildDone()},updateMonth:function(j){if(typeof j=="undefined"||j==0){return}var m=this._model.layoutDate(),h;if(m.minvalue||m.maxvalue){h=JC.f.cloneDate(m.date);h.setDate(1);h.setMonth(h.getMonth()+j);var i=m.minvalue?JC.f.cloneDate(m.minvalue):null,k=m.maxvalue?JC.f.cloneDate(m.maxvalue):null,f;i&&i.setDate(1);k&&k.setDate(1);if(i){if(h.getTime()k.getTime()){j=0;h=JC.f.cloneDate(m.maxvalue);f=true}if(new Date(h.getFullYear(),h.getMonth(),1).getTime()>new Date(m.maxvalue.getFullYear(),m.maxvalue.getMonth(),1).getTime()){j=0;h=JC.f.cloneDate(m.maxvalue);f=true}}if(!f){h=null}else{var g=JC.f.maxDayOfMonth(h),l=m.date.getDate();l>g&&(l=g);h.setDate(l)}}this._model.multiselect()?this.updateMultiMonth(j,h):this.updateSingleMonth(j,h)},updateMultiMonth:function(h,g){var j=this._model.layoutDate(),i,f;if(g){j.date=g;h=0}else{JC.Calendar.updateMultiMonth(j.date,h);JC.Calendar.updateMultiMonth(j.enddate,h);if(j.multidate){$.each(j.multidate,function(l,k){JC.Calendar.updateMultiMonth(k.start,h);JC.Calendar.updateMultiMonth(k.end,h)})}}this._buildLayout(j);this._buildDone()},updateSingleMonth:function(h,g){var j=this._model.layoutDate();if(g){j.date=g}else{var i=j.date.getDate(),f;j.date.setDate(1);j.date.setMonth(j.date.getMonth()+h);f=JC.f.maxDayOfMonth(j.date);i>f&&(i=f);j.date.setDate(i)}this._buildLayout(j);this._buildDone()},updateSelected:function(i){var f=this,g,h;if(!i){g=this._model.selectedDate()}else{i=$(i);h=JC.f.getJqParent(i,"td");if(h&&h.hasClass("unable")){return}g=new Date();g.setTime(i.attr("date"))}if(!g){return}f._model.selector().val(f._model.dateFormat(g));$(f).trigger("TriggerEvent",[JC.Calendar.Model.UPDATE,"date",g,g]);e.hide()},updatePosition:function(){var h=this,f=h._model.selector(),s=h._model.layout();if(!(f&&s&&f.length&&s.length)){return}s.css({left:"-9999px",top:"-9999px","z-index":ZINDEX_COUNT++}).show();var q=s.width(),j=s.height(),r=f.width(),k=f.height(),p=f.offset(),n,l,g=$(window).width(),m=$(window).height(),o=$(document).scrollLeft(),i=$(document).scrollTop();n=p.left;l=p.top+k+5;if((l+j-i)>m){l=p.top-j-3;lg){n=g-q+o-5}no){s=true}if(o&&u>o){break}if(m&&u{0}',u,u===x?" selected":""))}if(s){y.unshift(JC.f.printf('',B," selected"))}$(y.join("")).appendTo(k.find("select.UYear").html(""));y=[];for(u=0;u<12;u++){v=e.getCnNum(u+1);f=new Date(B,u,1);if(l&&f.getTime()>l.getTime()){break}if(r&&f.getTime(){2}月',u,u===n?" selected":"",v))}if(!y.length){v=e.getCnNum(z.date.getMonth()+1);y.push(JC.f.printf('',z.date.getMonth()," selected",v))}$(y.join("")).appendTo(k.find("select.UMonth").html(""))},_buildBody:function(n){var h=this,v=h._model.layout();var u=JC.f.maxDayOfMonth(n.date),p=n.date.getDay()||7,t=p+u,k=6,g=[],j,f,r,m,o;var l=new Date(n.date.getFullYear(),n.date.getMonth(),1);var q=l.getDay()||7;if(q<2){l.setDate(-(q-1+6))}else{l.setDate(-(q-2))}var s=new Date();if(n.maxvalue&&!h._model.currentcanselect()){n.maxvalue.setDate(n.maxvalue.getDate()-1)}g.push("");for(m=1;m<=42;m++){o=[];if(l.getDay()===0||l.getDay()==6){o.push("weekend")}if(!JC.f.isSameMonth(n.date,l)){o.push("other")}if(n.minvalue&&l.getTime()n.maxvalue.getTime()){o.push("unable")}if(JC.f.isSameDay(l,s)){o.push("today")}if(JC.f.isSameDay(n.date,l)){o.push("cur")}g.push('','',l.getDate(),"");l.setDate(l.getDate()+1);if(m%7===0&&m!=42){g.push("")}}g.push("");v.find("table.UTableBorder tbody").html($(g.join("")))},_buildFooter:function(f){}};$(document).delegate("body > div.UXCCalendar select.UYear, body > div.UXCCalendar select.UMonth","change",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateLayout()});$(document).delegate("body > div.UXCCalendar button.UNextYear","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateYear(1)});$(document).delegate("body > div.UXCCalendar button.UPreYear","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateYear(-1)});$(document).delegate("map[name=UXCCalendar_Year] area","click",function(g){g.preventDefault();var f=$(this),h=e.getInstance(e.lastIpt);f.attr("action")&&h&&(f.attr("action").toLowerCase()=="up"&&h.updateYear(1),f.attr("action").toLowerCase()=="down"&&h.updateYear(-1))});$(document).delegate("map[name=UXCCalendar_Month] area","click",function(g){g.preventDefault();var f=$(this),h=e.getInstance(e.lastIpt);f.attr("action")&&h&&(f.attr("action").toLowerCase()=="up"&&h.updateMonth(1),f.attr("action").toLowerCase()=="down"&&h.updateMonth(-1))});$(document).delegate("body > div.UXCCalendar button.UNextMonth","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateMonth(1)});$(document).delegate("body > div.UXCCalendar button.UPreMonth","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateMonth(-1)});$(document).delegate("div.UXCCalendar table a[date], div.UXCCalendar table a[dstart]","click",function(f){f.preventDefault();e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateSelected($(this))});$(document).delegate("body > div.UXCCalendar button.UConfirm","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).updateSelected()});$(document).delegate("body > div.UXCCalendar button.UClear","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).clear()});$(document).delegate("body > div.UXCCalendar button.UCancel","click",function(f){e.getInstance(e.lastIpt)&&e.getInstance(e.lastIpt).cancel()});$(document).delegate("input.UXCCalendar_btn","click",function(g){var f=$(this),h;if(!f.data(e.Model.INPUT)){h=f.prev("input[type=text], textarea");h.length&&f.data(e.Model.INPUT,h)}f.data(e.Model.INPUT)&&!f.data(e.Model.INPUT).is("[disabled]")&&e.pickDate(f.data(e.Model.INPUT))});$(document).delegate("body > div.UXCCalendar","click",function(f){f.stopPropagation()});$(document).ready(function(f){JC.f.safeTimeout(function(g){if(!e.autoInit){return}e.initTrigger($(document))},null,"CalendarInitTrigger",200);$(window).on("scroll resize",function(g){var h=e.getInstance(e.lastIpt);h&&h.visible()&&h.updatePosition()});$(document).on("click",function(g){var h=g.target||g.srcElement;if(e.domClickFilter){if(e.domClickFilter($(h))===false){return}}if(e.isCalendar(g.target||g.targetElement)){return}if(h&&(h.nodeName.toLowerCase()!="input"&&h.nodeName.toLowerCase()!="button"&&h.nodeName.toLowerCase()!="textarea")){e.hide();return}JC.f.safeTimeout(function(){if(e.lastIpt&&e.lastIpt.length&&h==e.lastIpt[0]){return}e.hide()},null,"CalendarClickHide",100)})});$(document).delegate(["input[datatype=date]","input[datatype=daterange]","input[multidate=date]","input[multidate=daterange]"].join(),"focus",function(f){e.pickDate(this)});$(document).delegate(["button[datatype=date]","button[datatype=daterange]","button[multidate=date]","button[multidate=daterange]"].join(),"click",function(f){e.pickDate(this)});$(document).delegate(["textarea[datatype=date]","textarea[datatype=daterange]","textarea[multidate=date]","textarea[multidate=daterange]"].join(),"click",function(f){e.pickDate(this)});return JC.Calendar})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window));(function(b,a){b(["JC.Calendar.date"],function(){JC.Calendar.weekTpl="";JC.Calendar.weekDayOffset=0;function d(e){this._selector=e}JC.Calendar.WeekModel=d;function c(e){this._model=e}JC.Calendar.WeekView=c;JC.Calendar.clone(d,c);JC.f.extendObject(d.prototype,{layout:function(){var e=$("#UXCCalendar_week");if(!e.length){e=$(JC.Calendar.weekTpl||this.tpl).hide();e.attr("id","UXCCalendar_week").hide().appendTo(document.body)}return e},tpl:['
          ','
          ',' ',' ',' ',"
          ",' '," ","
          ",'
          ',' ',' ',' ',"
          ","
          "].join(""),month:function(){var g=0,f,e=new Date();(f=this.layout().find("td.cur a[dstart]")).length&&(e=new Date())&&(e.setTime(f.attr("dstart")));g=e.getMonth();return g},selectedDate:function(){var g,f,e;f=this.layout().find("td.cur");f.length&&!f.hasClass("unable")&&(e=f.find("a[dstart]"))&&(g={start:new Date(),end:new Date()},g.start.setTime(e.attr("dstart")),g.end.setTime(e.attr("dend")));return g},singleLayoutDate:function(){var f=this,i=f.defaultDate(),h=this.day(),g,e=f.layout().find("td.cur > a[week]");i.date.setDate(1);i.date.setFullYear(this.year());i.date.setMonth(this.month());g=JC.f.maxDayOfMonth(i.date);h>g&&(h=g);i.date.setDate(h);e.length&&(i.curweek=parseInt(e.attr("week"),10));return i}});JC.f.extendObject(c.prototype,{_buildBody:function(A){var C=this,p=A.date,k=C._model.layout(),y=new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate()).getTime(),l=JC.f.weekOfYear(p.getFullYear(),JC.Calendar.weekDayOffset),x=JC.f.weekOfYear(p.getFullYear()+1,JC.Calendar.weekDayOffset),m=0,z=[],g,r,q,n,w,h=p.getFullYear(),f=Math.ceil(l.length/8),t=JC.Calendar.lastIpt,e=JC.f.parseBool(t.attr("currentcanselect")),B,o=A.minvalue?JC.f.cloneDate(A.minvalue):null,v=A.maxvalue?JC.f.cloneDate(A.maxvalue):null;if(v&&e){B=v.getDay();if(B>0){v.setDate(v.getDate()+(7-B))}else{}}if(o&&e){B=o.getDay();if(B>0){o.setDate(o.getDate()-B+1)}else{o.setDate(o.getDate()-6)}}z.push("");for(var u=1,s=f*8;u<=s;u++){r=l[u-1];if(!r){r=x[m++];h=p.getFullYear()+1}n=JC.f.pureDate(new Date());w=JC.f.pureDate(new Date());n.setTime(r.start);w.setTime(r.end);q=JC.f.printf("{0}年 第{1}周\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})",h,JC.Calendar.getCnNum(r.week),JC.f.formatISODate(n),JC.f.formatISODate(w),JC.Calendar.cnWeek.charAt(n.getDay()%7),JC.Calendar.cnWeek.charAt(w.getDay()%7));g=[];if(o&&n.getTime()v.getTime()){g.push("unable")}if(A.curweek){if(r.week==A.curweek&&p.getFullYear()==n.getFullYear()){g.push("cur")}}else{if(p.getTime()>=n.getTime()&&p.getTime()<=w.getTime()){g.push("cur")}}if(y>=n.getTime()&&y<=w.getTime()){g.push("today")}z.push(JC.f.printf('{1}',g.join(" "),r.week,q,n.getTime(),w.getTime(),A.date.getTime()));if(u%8===0&&u!=s){z.push("")}}z.push("");k.find("table.UTableBorder tbody").html($(z.join("")))},updateSelected:function(i){var e=this,f,h,g;if(!i){g=this._model.selectedDate();g&&(f=g.start,h=g.end)}else{i=$(i);g=JC.f.getJqParent(i,"td");if(g&&g.hasClass("unable")){return}f=new Date();h=new Date();f.setTime(i.attr("dstart"));h.setTime(i.attr("dend"))}if(!(f&&h)){return}e._model.selector().val(e._model.fullFormat(e._model.dateFormat(f),e._model.dateFormat(h)));$(e).trigger("TriggerEvent",[JC.Calendar.Model.UPDATE,"week",f,h]);JC.Calendar.hide()}});$(document).delegate(["input[datatype=week]","input[multidate=week]"].join(),"focus",function(e){Calendar.pickDate(this)});$(document).delegate(["button[datatype=week]","button[multidate=week]"].join(),"click",function(e){Calendar.pickDate(this)});$(document).delegate(["textarea[datatype=week]","textarea[multidate=week]"].join(),"click",function(e){Calendar.pickDate(this)});return JC.Calendar})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window));(function(b,a){b(["JC.Calendar.date"],function(){JC.Calendar.monthTpl="";function c(e){this._selector=e}JC.Calendar.MonthModel=c;function d(e){this._model=e}JC.Calendar.MonthView=d;JC.Calendar.clone(c,d);JC.f.extendObject(c.prototype,{layout:function(){var e=$("#UXCCalendar_month");if(!e.length){e=$(JC.Calendar.monthTpl||this.tpl).hide();e.attr("id","UXCCalendar_month").hide().appendTo(document.body)}return e},tpl:['
          ','
          ',' ',' ',' ',"
          ",' '," ","
          ",'
          ',' ',' ',' ',"
          ","
          "].join(""),month:function(){var g=0,f,e;(f=this.layout().find("td.cur a[dstart]")).length&&(e=new Date())&&(e.setTime(f.attr("dstart")),g=e.getMonth());return g},selectedDate:function(){var g,f,e;f=this.layout().find("td.cur");f.length&&!f.hasClass("unable")&&(e=f.find("a[dstart]"))&&(g={start:new Date(),end:new Date()},g.start.setTime(e.attr("dstart")),g.end.setTime(e.attr("dend")));return g},multiselectDate:function(){var e=this,j=[],f,h,g,i;e.layout().find("td.cur").each(function(){f=$(this);h=f.find("> a[dstart]");if(f.hasClass("unable")){return}g=new Date();i=new Date();g.setTime(h.attr("dstart"));i.setTime(h.attr("dend"));j.push({start:g,end:i})});return j}});JC.f.extendObject(d.prototype,{_buildBody:function(A){var B=this,p=A.date,l=B._model.layout(),y=new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate()).getTime(),n=0,z=[],g,r,q,x,s,h=p.getFullYear(),f=4,u=JC.Calendar.lastIpt,e=JC.f.parseBool(u.attr("currentcanselect")),m=A.multidate?A.multidate.slice():null,o=A.minvalue?JC.f.cloneDate(A.minvalue):null,w=A.maxvalue?JC.f.cloneDate(A.maxvalue):null;if(w&&e){w.setDate(JC.f.maxDayOfMonth(w))}if(o&&e){o.setDate(1)}z.push("");for(var v=1,t=12;v<=t;v++){x=new Date(h,v-1,1);s=new Date(h,v-1,JC.f.maxDayOfMonth(x));q=JC.f.printf("{0}年 {1}月\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})",h,JC.Calendar.getCnNum(v),JC.f.formatISODate(x),JC.f.formatISODate(s),JC.Calendar.cnWeek.charAt(x.getDay()%7),JC.Calendar.cnWeek.charAt(s.getDay()%7));g=[];if(o&&x.getTime()w.getTime()){g.push("unable")}if(m){$.each(m,function(j,i){if(x.getTime()>=i.start.getTime()&&x.getTime()<=i.end.getTime()){g.push("cur");m.splice(j,1);return false}})}else{if(p.getTime()>=x.getTime()&&p.getTime()<=s.getTime()){g.push("cur")}}if(y>=x.getTime()&&y<=s.getTime()){g.push("today")}var k=JC.Calendar.cnUnit.charAt(v%10);v>10&&(k="十"+k);z.push(JC.f.printf('{2}月',g.join(" "),q,k,x.getTime(),s.getTime(),v));if(v%3===0&&v!=t){z.push("")}}z.push("");l.find("table.UTableBorder tbody").html($(z.join("")))},updateSelected:function(k){var e=this,f,j,g,i,h;if(!k){if(e._model.multiselect()){g=this._model.multiselectDate();if(!g.length){return}h=[];$.each(g,function(m,l){h.push(i=e._model.fullFormat(e._model.dateFormat(l.start),e._model.dateFormat(l.end)))});i=h.join(",")}else{g=this._model.selectedDate();g&&(f=g.start,j=g.end);f&&j&&(i=e._model.fullFormat(e._model.dateFormat(f),e._model.dateFormat(j)))}}else{k=$(k);g=JC.f.getJqParent(k,"td");if(g&&g.hasClass("unable")){return}if(e._model.multiselect()){g.toggleClass("cur");return}f=new Date();j=new Date();f.setTime(k.attr("dstart"));j.setTime(k.attr("dend"));i=e._model.fullFormat(e._model.dateFormat(f),e._model.dateFormat(j))}if(!i){return}e._model.selector().val(i);$(e).trigger("TriggerEvent",[JC.Calendar.Model.UPDATE,"month",f,j]);JC.Calendar.hide()}});$(document).delegate(["input[datatype=month]","input[multidate=month]"].join(),"focus",function(e){Calendar.pickDate(this)});$(document).delegate(["button[datatype=month]","button[multidate=month]"].join(),"click",function(e){Calendar.pickDate(this)});$(document).delegate(["textarea[datatype=month]","textarea[multidate=month]"].join(),"click",function(e){Calendar.pickDate(this)});return JC.Calendar})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window));(function(b,a){b(["JC.Calendar.date"],function(){JC.Calendar.seasonTpl="";function d(e){this._selector=e}JC.Calendar.SeasonModel=d;function c(e){this._model=e}JC.Calendar.SeasonView=c;JC.Calendar.clone(d,c);JC.f.extendObject(d.prototype,{layout:function(){var e=$("#UXCCalendar_season");if(!e.length){e=$(JC.Calendar.seasonTpl||this.tpl).hide();e.attr("id","UXCCalendar_season").hide().appendTo(document.body)}return e},tpl:['
          ','
          ',' ',' ',' ',"
          ",' '," ","
          ",'
          ',' ',' ',' ',"
          ","
          "].join(""),month:function(){var g=0,f,e;(f=this.layout().find("td.cur a[dstart]")).length&&(e=new Date())&&(e.setTime(f.attr("dstart")),g=e.getMonth());return g},selectedDate:function(){var g,f,e;f=this.layout().find("td.cur");f.length&&!f.hasClass("unable")&&(e=f.find("a[dstart]"))&&(g={start:new Date(),end:new Date()},g.start.setTime(e.attr("dstart")),g.end.setTime(e.attr("dend")));return g}});JC.f.extendObject(c.prototype,{_buildBody:function(B){var C=this,p=B.date,m=C._model.layout(),z=new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate()).getTime(),n=0,A=[],h,t,s,o,y,k=p.getFullYear(),g=4,v=JC.Calendar.lastIpt,f=JC.f.parseBool(v.attr("currentcanselect")),q=B.minvalue?JC.f.cloneDate(B.minvalue):null,x=B.maxvalue?JC.f.cloneDate(B.maxvalue):null,e;if(x&&f){var e=x.getMonth()+1,r;if(e%3!==0){x.setDate(1);x.setMonth(e+(3-(e%3)-1))}x.setDate(JC.f.maxDayOfMonth(x))}if(q&&f){e=q.getMonth()+1,r;q.setDate(1);q.setMonth(q.getMonth()-(3-e%3))}A.push("");for(var w=1,u=4;w<=u;w++){o=new Date(k,w*3-3,1);y=new Date(k,w*3-1,1);y.setDate(JC.f.maxDayOfMonth(y));var l=JC.Calendar.cnUnit.charAt(w%10);w>10&&(l="十"+l);s=JC.f.printf("{0}年 第{1}季度\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})",k,JC.Calendar.getCnNum(w),JC.f.formatISODate(o),JC.f.formatISODate(y),JC.Calendar.cnWeek.charAt(o.getDay()%7),JC.Calendar.cnWeek.charAt(y.getDay()%7));h=[];if(q&&o.getTime()x.getTime()){h.push("unable")}if(p.getTime()>=o.getTime()&&p.getTime()<=y.getTime()){h.push("cur")}if(z>=o.getTime()&&z<=y.getTime()){h.push("today")}A.push(JC.f.printf('{2}季度',h.join(" "),s,l,o.getTime(),y.getTime(),w));if(w%2===0&&w!=u){A.push("")}}A.push("");m.find("table.UTableBorder tbody").html($(A.join("")))},updateSelected:function(i){var e=this,f,h,g;if(!i){g=this._model.selectedDate();g&&(f=g.start,h=g.end)}else{i=$(i);g=JC.f.getJqParent(i,"td");if(g&&g.hasClass("unable")){return}f=new Date();h=new Date();f.setTime(i.attr("dstart"));h.setTime(i.attr("dend"))}if(!(f&&h)){return}e._model.selector().val(e._model.fullFormat(e._model.dateFormat(f),e._model.dateFormat(h)));$(e).trigger("TriggerEvent",[JC.Calendar.Model.UPDATE,"season",f,h]);JC.Calendar.hide()}});$(document).delegate(["input[datatype=season]","input[multidate=season]"].join(),"focus",function(e){Calendar.pickDate(this)});$(document).delegate(["button[datatype=season]","button[multidate=season]"].join(),"click",function(e){Calendar.pickDate(this)});$(document).delegate(["textarea[datatype=season]","textarea[multidate=season]"].join(),"click",function(e){Calendar.pickDate(this)});return JC.Calendar})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window));(function(b,a){b(["JC.Calendar.date"],function(){JC.Calendar.yearTpl="";function d(e){this._selector=e}JC.Calendar.YearModel=d;function c(e){this._model=e}JC.Calendar.YearView=c;JC.Calendar.clone(d,c);JC.f.extendObject(d.prototype,{layout:function(){var e=$("#UXCCalendar_year");if(!e.length){e=$(JC.Calendar.yearTpl||this.tpl).hide();e.attr("id","UXCCalendar_year").hide().appendTo(document.body)}return e},tpl:['
          \n',' \n'," \n"," \n",' \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n",' \n"," \n"," \n","
          \n',' \n',"
          \n',' \n',"
          \n",'
          \n',' \n',' \n',' \n',"
          \n","
          \n"].join(""),selectedDate:function(){var g,f,e;f=this.layout().find("td.cur");f.length&&!f.hasClass("unable")&&(e=f.find("a[dstart]"))&&(g={start:new Date(),end:new Date()},g.start.setTime(e.attr("dstart")),g.end.setTime(e.attr("dend")));return g}});JC.f.extendObject(c.prototype,{_buildBody:function(r){var u=this,t=u._model.selector(),n=t.val().trim(),v=n.replace(/[^\d]+/g,""),h=r.date,p=new Date().getFullYear(),i=u._model.layout(),q=i.find("tbody > tr > td"),s=q.length-1,m,j,g,e=JC.f.parseBool(t.attr("currentcanselect")),k,f,o,l;v&&(v=v.slice(0,4));!v&&(v=p);g=h.getFullYear();m=g-Math.floor(s/2);if(r.minvalue&&e){r.minvalue.setFullYear(r.minvalue.getFullYear()-1)}if(r.maxvalue&&e){r.maxvalue.setFullYear(r.maxvalue.getFullYear()+1)}q.each(function(x,w){w=$(w);if(x==0||x==s){}else{k=JC.f.printf("{0}年",m);f=[];o=new Date(m,0,1);l=new Date(m,11,31);if(r.minvalue&&o.getFullYear()<=r.minvalue.getFullYear()){f.push("unable")}if(r.maxvalue&&l.getFullYear()>=r.maxvalue.getFullYear()){f.push("unable")}v&&v==m&&f.push("cur");p==m&&f.push("today");w.html(JC.f.printf('{3}',k,o.getTime(),l.getTime(),m));w.prop("className",f.join(" "))}m++})},updateSelected:function(i){var e=this,f,h,g;if(!i){g=this._model.selectedDate();g&&(f=g.start,h=g.end)}else{i=$(i);g=JC.f.getJqParent(i,"td");if(g&&g.hasClass("unable")){return}f=new Date();h=new Date();f.setTime(i.attr("dstart"));h.setTime(i.attr("dend"))}if(!(f&&h)){return}e._model.selector().val(e._model.fullFormat(e._model.dateFormat(f),e._model.dateFormat(h)));$(e).trigger("TriggerEvent",[JC.Calendar.Model.UPDATE,"year",f,h]);JC.Calendar.hide()},updateYear:function(f){if(typeof f=="undefined"||f==0){return}var g=this._model.layoutDate(),e;this._model.multiselect()?this.updateMultiYear(f):this.updateSingleYear(f)},updateSingleYear:function(l){if(!l){return}var g=this._model.layoutDate(),k=this._model.layout().find("a[dstart]"),j=k.first(),f=k.last(),e=new Date(),o=new Date(),n=17,i;if(l>0){e.setTime(f.attr("dstart"));o.setTime(f.attr("dend"));g.date=e;g.enddate=o;g.date.setFullYear(g.date.getFullYear()+n);g.enddate.setFullYear(g.enddate.getFullYear()+n)}else{e.setTime(j.attr("dstart"));o.setTime(j.attr("dend"));g.date=e;g.enddate=o;g.date.setFullYear(g.date.getFullYear()-n);g.enddate.setFullYear(g.enddate.getFullYear()-n)}var h=g.date.getFullYear()-n+1,m=g.date.getFullYear()+n-1;if(g.minvalue&&g.minvalue.getFullYear()>m){return}if(g.maxvalue&&g.maxvalue.getFullYear()一月','','','','','','','','','','',''].join("")).appendTo(g.find("select.UMonth"))}return g},tpl:['
          ','
          ',' ',' ',' ',' '," {0}",' ',' ',"
          ",' '," ","
          ",'
          ',' ',' ',' ',"
          ","
          "].join(""),multiselect:function(){return true},multiselectDate:function(){var f=this,j=[],h,i,g;f.layout().find("input.js_JCCalendarCheckbox[dstart]").each(function(){h=$(this);if(!h.prop("checked")){return}g=new Date();g.setTime(h.attr("dstart"));j.push(g)});return j},ccPreserveDisabled:function(){var f=true;this.selector().is("[ccPreserveDisabled]")&&(f=JC.f.parseBool(this.selector().attr("ccPreserveDisabled")));return f},calendarclear:function(){var f=this,j=this.selector(),h,g;j&&j.attr("calendarclear")&&(g=window[j.attr("calendarclear")])&&(h=g);if(f.ccPreserveDisabled()){var k=f.layout().find("input[date]"),i=[];k.each(function(){var m=$(this),l;if(!(m.is(":disabled")&&m.is(":checked"))){return}l=new Date();l.setTime(m.attr("date"));i.push(JC.f.formatISODate(l))});j.val(i.join(","))}return h},fixedDate:function(h){var f=this,g=JC.Calendar.lastIpt,i;g&&!g.is("[defaultdate]")&&(i=JC.f.cloneDate(h.multidate[0].start),g.attr("defaultdate",JC.f.formatISODate(i)))}});JC.f.extendObject(d.prototype,{init:function(){var f=this;$(f).on("MonthDayToggle",function(g,h){var i=f._model.findItemByTimestamp(h.attr("dstart"));if(i.atd.hasClass("unable")){return}i.input.prop("checked",i.atd.hasClass("cur"));f._model.fixCheckall()});$(f).on("MonthDayInputToggle",function(g,h){var i=f._model.findItemByTimestamp(h.attr("dstart"));if(!i.atd){$(f).trigger("MonthDayToggleAll",[h]);return}if(i.atd.hasClass("unable")){return}i.atd[i.input.prop("checked")?"addClass":"removeClass"]("cur");f._model.fixCheckall()});$(f).on("MonthDayToggleAll",function(g,j){var i=f._model.layout().find("a[dstart]"),h=j.prop("checked");if(!i.length){return}i.each(function(){var k=$(this),l=JC.f.getJqParent(k,"td");if(l.hasClass("unable")){return}l[h?"addClass":"removeClass"]("cur");$(f).trigger("MonthDayToggle",[k])})});return this},updateSelected:function(n){var f=this,h,m,j,l,k;if(!n){j=this._model.multiselectDate();if(!j.length){return}k=[];for(var g=0;g星期');f.push('日期');p.push('
          ",d.Model._boxId)).appendTo(document.body)}return g},position:function(){var f=this,h=f.selector().offset().left,g=f.selector().offset().top+f.selector().prop("offsetHeight"),k,j,i=$(window);if((i.outerHeight()+i.scrollTop())<(g+f.layout().height())){j=f.selector().offset().top-f.layout().height();(j>=0)&&(g=j)}else{g=f.selector().offset().top+f.selector().prop("offsetHeight")}if((i.outerWidth()+i.scrollLeft())<(h+f.layoutBox().outerWidth(true))){k=f.selector().offset().left+f.selector().outerWidth()-f.layoutBox().outerWidth(true);(k>=0)&&(h=k)}else{h=f.selector().offset().left}f.layoutBox().css({left:h,top:g})},setSelected:function(i){var f=this,j=$(i),h=JC.f.getJqParent(j,"td"),g=j.data("date");f.layoutBox().find(".CDC_date_body>tbody>tr>td").removeClass("selected_date");h.addClass("selected_date").data("date");f.selector().val(g)},clear:function(){var f=this;f.layoutBox().find(".CDC_date_body>tbody>tr>td").removeClass("selected_date");f.selector().val("")},fixTable:function(){var f=this,i=f.layoutBox().find(".CDC_date_body"),h='       ',g=0;i.each(function(l){var k=$(this),j=k.find("tbody>tr").length;(j>g)&&(g=j)});i.each(function(){var k=$(this),j=k.find("tbody>tr").length;(jtbody>tr>td>a:not(".disabled")',"click",function(f){var g=d.getInstance(d.lastSrc);g&&g.trigger(d.Model.SETDATE,[$(this)]);g&&g.trigger(d.Model.HIDDEN)});e.delegate('#CompDCalendar .CDC_month_body>tbody>tr>td>a:not(".disabled")',"click",function(f){var g=d.getInstance(d.lastSrc);g&&g.trigger(d.Model.DATEVIEW,[$(this)])});e.delegate('#CompDCalendar .CDC_year_body>tbody>tr>td>a:not(".disabled")',"click",function(f){var g=d.getInstance(d.lastSrc);g&&g.trigger(d.Model.MONTHVIEW,[$(this)])});e.delegate("#CompDCalendar .CDC_clear","click",function(f){var g=d.getInstance(d.lastSrc);g&&g.trigger(d.Model.CLEAR,[$(this)])});$(window).on("resize scroll",function(){JC.f.safeTimeout(function(){d.update()},null,"DCalendarResize",20)});e.ready(function(){d.init(true)});return JC.DCalendar})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/DCalendar/DCalendar.js b/deploy/comps/DCalendar/DCalendar.js new file mode 100755 index 000000000..6f94b8f26 --- /dev/null +++ b/deploy/comps/DCalendar/DCalendar.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.DCalendar.date"],function(){JC.use&&JC.PATH&&JC.use([JC.PATH+"comps/DCalendar/DCalendar.date.js"].join());return JC.DCalendar})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/DCalendar/index.php b/deploy/comps/DCalendar/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/DCalendar/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/DCalendar/res/default/style.css b/deploy/comps/DCalendar/res/default/style.css new file mode 100755 index 000000000..af2b309c3 --- /dev/null +++ b/deploy/comps/DCalendar/res/default/style.css @@ -0,0 +1 @@ +input.CDCalendar_icon{background:#fff url(http://p15.qhimg.com/t01e94709749feffaa0.png) 98% -84px no-repeat;padding-right:30px}.CDCalendar_bounding_box{position:relative;color:#404040;font:12px/1.5 Arial;z-index:10000}.CDCalendar_bounding_box .CDC_container{background-color:#FFF;zoom:1;box-shadow:2px 2px 3px rgba(0,0,0,0.3);filter:progid:DXImageTransform.Microsoft.Shadow(color=#808080,direction=135,strength=2)\9}.CDCalendar_bounding_box .CDC_content_box{position:relative;zoom:1;padding:5px 30px 15px 30px;border:1px solid #bec2c4;letter-spacing:-0.31em;*letter-spacing:normal;word-spacing:-0.43em}.CDCalendar_bounding_box .CDC_arrow a{position:absolute;top:50%;width:20px;height:38px;cursor:pointer;margin-top:-19px;text-indent:-99999px;background:#FFF url(http://p16.qhimg.com/t01868ddffc722b2d90.png) 0 0 no-repeat}.CDCalendar_bounding_box .CDC_arrow a.CDC_close_btn{top:10px;right:10px;width:17px;height:17px;margin:0;background-position:-40px 0}.CDCalendar_bounding_box .CDC_arrow a.CDC_prev_btn{left:10px;background-position:0 0}.CDCalendar_bounding_box .CDC_arrow a.CDC_next_btn{right:10px;background-position:-20px 0}.CDCalendar_bounding_box .CDC_arrow a.CDC_prev_btn_disabled{left:10px;cursor:default;background-position:0 -38px}.CDCalendar_bounding_box .CDC_arrow a.CDC_next_btn_disabled{right:10px;cursor:default;background-position:-20px -38px}.CDCalendar_bounding_box .CDC_arrow .CDC_clear{left:2.5%;top:10px;z-index:5;margin-top:0;background:url(http://p17.qhimg.com/t01eaf1c7e4bef9bbff.gif) no-repeat;width:16px;height:16px}.CDCalendar_bounding_box .CDC_content_box .CDC_inner{position:relative;background-color:#FFF;display:inline-block;padding:0 10px;zoom:1;*display:inline;letter-spacing:normal;word-spacing:normal;vertical-align:top;_vertical-align:baseline}.CDCalendar_bounding_box .CDC_content_box .CDC_inner h4{margin:0;padding:0;font-size:12px;line-height:25px;text-align:center;border-bottom:1px solid #e4e4e4;font-weight:700}.CDCalendar_bounding_box .CDC_content_box .CDC_inner h4 a{text-decoration:none;color:#333}.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_header_tools a{margin-right:15px;display:inline-block;*display:inline;*zoom:1;margin-top:3px;color:#5792dc;text-decoration:none}.CDCalendar_bounding_box .CDC_content_box .CDC_inner h4 a:hover,.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_header_tools a:hover{color:#5792dc}.CDCalendar_bounding_box .CDC_content_box .CDC_inner table{border-spacing:0;border-collapse:collapse}.CDCalendar_bounding_box .CDC_content_box .CDC_inner table.CDC_date_body{width:182px;height:165px}.CDCalendar_bounding_box .CDC_content_box .CDC_inner table th{height:22px;font-weight:400;border-bottom:1px solid #e4e4e4}.CDCalendar_bounding_box .CDC_content_box .CDC_inner table td{padding:0;width:25px;vertical-align:middle;font-weight:700;text-align:center;border:1px solid #e5e5e5}.CDCalendar_bounding_box td a{width:25px;display:block;color:#404040;text-decoration:none}.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_month_body td,.CDCalendar_bounding_box .CDC_content_box .CDC_month_body a{width:62px;height:62px;line-height:62px}.CDCalendar_bounding_box .CDC_content_box .CDC_inner .CDC_year_body td,.CDCalendar_bounding_box .CDC_content_box .CDC_year_body a{width:53px;height:40px;line-height:40px}.CDCalendar_bounding_box td a.weekend{color:#6fae6c}.CDCalendar_bounding_box td a.weekend:hover,.CDCalendar_bounding_box td a:hover,.CDCalendar_bounding_box td.selected_date a,.CDCalendar_bounding_box td.selected_range a:hover{color:#FFF;background-color:#5792dc}.CDCalendar_bounding_box td.end_date a,.CDCalendar_bounding_box td a.disabled{color:#dcdcdc !important;background-color:transparent}.CDCalendar_bounding_box td a.disabled:hover{color:#dcdcdc;cursor:default;background-color:transparent !important}.CDCalendar_bounding_box td .today{color:red}.CDCalendar_bounding_box td.selected_date .today,.CDCalendar_bounding_box td .today:hover{background-position:-31px -270px} \ No newline at end of file diff --git a/deploy/comps/DCalendar/res/default/style.html b/deploy/comps/DCalendar/res/default/style.html new file mode 100755 index 000000000..cba94eb35 --- /dev/null +++ b/deploy/comps/DCalendar/res/default/style.html @@ -0,0 +1,884 @@ + + + + + Document + + + + + +

          showtype = float

          +
          +
          +
          +
          +
          + close + prev + next + clear +
          +
          +
          +
          +

          2014年3月

          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + + + + + + + + + + + 1 +
          + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 +
          + 9 + + 10 + + 11 + + 12 + + 13 + + 14 + + 15 +
          + 16 + + 17 + + 18 + + 19 + + 20 + + 21 + + 22 +
          + 23 + + 24 + + 25 + + 26 + + 27 + + 28 + + 29 +
          + 30 + + 31 + + + + + + + + + + +
          +
          +
          +
          +

          2014年4月

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + + + 1 + + 2 + + 3 + + 4 + + 5 +
          + 6 + + 7 + + 8 + + 9 + + 10 + + 11 + + 12 +
          + 13 + + 14 + + 15 + + 16 + + 17 + + 18 + + 19 +
          + 20 + + 21 + + 22 + + 23 + + 24 + + 25 + + 26 +
          + 27 + + 28 + + 29 + + 30 + + + + + + +
          + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          +
          +
          +

          showtype = block

          +
          +
          +
          +
          +
          + close + prev + next + clear +
          +
          +
          +
          +

          2014年3月

          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + + + + + + + + + + + 1 +
          + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 +
          + 9 + + 10 + + 11 + + 12 + + 13 + + 14 + + 15 +
          + 16 + + 17 + + 18 + + 19 + + 20 + + 21 + + 22 +
          + 23 + + 24 + + 25 + + 26 + + 27 + + 28 + + 29 +
          + 30 + + 31 + + + + + + + + + + +
          +
          +
          +
          +

          2014年4月

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + + + 1 + + 2 + + 3 + + 4 + + 5 +
          + 6 + + 7 + + 8 + + 9 + + 10 + + 11 + + 12 +
          + 13 + + 14 + + 15 + + 16 + + 17 + + 18 + + 19 +
          + 20 + + 21 + + 22 + + 23 + + 24 + + 25 + + 26 +
          + 27 + + 28 + + 29 + + 30 + + + + + + +
          + + + + + + + + + + + + + +
          +
          +
          +
          +
          +
          + +

          +
          +
          +
          +
          + close + prev + next + clear +
          +
          + +
          +
          +

          2013年

          +
          + + +
          +
          +
          +
          +
          +

          +
          +
          +
          +
          + close + prev + next + clear +
          +
          + +
          +
          +

          2013年12月24日

          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          2012201220122012201320132013
          2013201320132013201320132013
          2012201220122013201320132013
          2013201320132013201320132013
          +
          + +
          +
          +
          +
          +
          + + + \ No newline at end of file diff --git a/deploy/comps/Drag/Drag.js b/deploy/comps/Drag/Drag.js new file mode 100755 index 000000000..264f97ab6 --- /dev/null +++ b/deploy/comps/Drag/Drag.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){JC.Drag=d;JC.f.addAutoInit&&JC.f.addAutoInit(d);var i=$(document),h=$(window);function d(j){j&&(j=$(j));if(JC.BaseMVC.getInstance(j,d)){return JC.BaseMVC.getInstance(j,d)}JC.BaseMVC.getInstance(j,d,this);this._model=new d.Model(j);this._view=new d.View(this._model);this._init()}JC.BaseMVC.build(d);JC.f.extendObject(d.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var j=this;j.on(d.Model.DRAG_INITED,function(k){j._model.defaultCSSPosition(j._model.dragTarget().css("position"));j._model.defaultCSSZIndex(j._model.dragTarget().css("z-index"));j._model.defaultCSSCursor(j._model.dragTarget().css("cursor"));j._model.selector().css({cursor:"move"});j._model.dragInitedCb()&&j._model.dragInitedCb().call(j,j.selector(),j.dragTarget());j.notification("DRAG_INITED",[j,j.selector(),j.dragTarget()])});j.on("INIT_INDEX",function(){if(!j._model.dropPush()){return}var k=j._model.dropFor(true);if(!(k&&k.length)){return}JC.log(k.length);k.each(function(m,l){$(l).data("dragIndex",m)})});j.selector().on("mousedown",function(l,k){l=k||l;j._model._selectedDropBox=null;if(j._model.boolProp(d.Model.DISABLE_DRAG)){return}if(j._model.boolProp(d.Model.IGNORE_DRAG)){return}if(j._model.dropPush()){}d.cleanDragData();if(j._model.dragBeforeCb()&&j._model.dragBeforeCb().call(j,j._model.dragTarget(),j.selector())===false){return}if(j.notificationHandler("DRAG_BEFORE",[j,j.selector(),j._model.dragTarget(),j._model.dragMovingTarget()])===false){return}j.notification("DRAG_DOWN");j.trigger(d.Model.DRAG_BEFORE);j._model.relativeParent(true);j._model.isDropFor()&&(j._model.dragMovingTarget(true),j._model.dropFor(true));d.dragInfo(j,l);j.trigger(d.Model.DRAG_BEGIN,[l,d.dragInfo()]);i.off("mouseup",d.defaultMouseUp);i.off("mousemove",d.defaultMouseMove);h.off("scroll",d.defaultScroll);i.on("mouseup",d.defaultMouseUp);i.on("mousemove",d.defaultMouseMove);h.on("scroll",d.defaultScroll);return false});j.selector()[0].onselectstart=function(){return false};j.on(d.Model.DRAG_BEFORE,function(k){});j.on(d.Model.DRAG_BEGIN,function(k,l){j._model.dragTarget().css("z-index",window.ZINDEX_COUNT++);d.draggingItem(j._model.dragTarget());j._model.dragBeginCb()&&j._model.dragBeginCb().call(j,j.selector(),j._model.dragTarget(),j._model.dragMovingTarget());j.notification("DRAG_BEGIN",[j,j.selector(),j._model.dragTarget(),j._model.dragMovingTarget()])});j.on(d.Model.DRAG_DONE,function(k,l){j._view.dropDone(l);j._view.clean(l);j._model.clean(l);d.draggingItem(null);j._model.dragDoneCb()&&j._model.dragDoneCb().call(j,j.selector(),j._model.dragTarget());j.notification("DRAG_DONE",[j,j.selector(),j._model.dragTarget()]);j._model.dragTarget().removeClass(d.Model.CLASS_CURRENT_DRAG_ITEM);j.trigger(d.Model.DRAG_AFTER);d.cleanDragData()});j.on(d.Model.DRAGGING_MOVING,function(n,o,m,k,l){j._model.dragMovingCb()&&j._model.dragMovingCb().call(j,j.selector(),j.dragTarget(),j.dragMovingTarget(),o,m,k);j.notification("DRAG_MOVING",[j,j.selector(),j.dragTarget(),j.dragMovingTarget(),o,m,k])});j.on(d.Model.DRAG_AFTER,function(k){j._model.dragAfterCb()&&j._model.dragAfterCb().call(j,j._model.dragTarget(),j.selector());j.notification("DRAG_AFTER",[j,j._model.dragTarget(),j.selector()])});j.on(d.Model.TRIGGER_DRAG,function(l,k){j.selector().trigger("mousedown",[k||l])})},_inited:function(){this.trigger(d.Model.DRAG_INITED)},dragTarget:function(){return this._model.dragTarget()},dragMovingTarget:function(){return this._model.dragMovingTarget()},dragIn:function(){return this._model.dragIn()},_updatePosition:function(){this._view.updatePosition.apply(this._view,JC.f.sliceArgs(arguments));return this}});d.init=function(j){var k=[];j=$(j||document);if(j&&j.length){if(j.hasClass("js_compDrag")){!j.is("["+d.Model.IGNORE_DRAG+"]")&&k.push(new d(j))}else{j.find("div.js_compDrag, button.js_compDrag").each(function(){!j.is("["+d.Model.IGNORE_DRAG+"]")&&k.push(new d(this))})}}return k};d.dragInfo=function(k,j){if(k&&j){d._dragInfo={ins:k,evt:j,offset:k._model.position(j)}}return d._dragInfo};d.draggingItem=function(j){if(typeof j!="undefined"){d._draggingItem&&d._draggingItem.data(d.Model.DRAGGING_ITEM,false);j&&j.data(d.Model.DRAGGING_ITEM,true);d._draggingItem=j}return d._draggingItem};d.cleanDragData=function(){i.off("mousemove",d.defaultMouseMove);i.off("mouseup",d.defaultMouseUp);h.off("scroll",d.defaultScroll);d._dragInfo=null;d.draggingItem(null)};d.defaultMouseMove=function(m){if(!d.dragInfo()){return}var k=d.dragInfo(),j=k.ins,l=k.offset,o,n;if(!j){return}o=m.pageX-l.x;n=m.pageY-l.y;o<=l.minX&&(o=l.minX);n<=l.minY&&(n=l.minY);o>=l.maxX&&(o=l.maxX);n>=l.maxY&&(n=l.maxY);o-=k.offset.relativeFixX;n-=k.offset.relativeFixY;j._updatePosition(o,n,l);j.trigger(d.Model.DRAGGING_MOVING,[o,n,m,l])};d.defaultMouseUp=function(k){var j=d.dragInfo();if(j&&j.ins){j.ins.notification("DRAG_UP");j.ins.trigger(d.Model.DRAG_DONE,j)}d.cleanDragData()};d.defaultScroll=function(j){var k=d.dragInfo();if(!(k&&k.ins)){return}var q=k.ins.dragIn().scrollLeft(),o=k.ins.dragIn().scrollTop(),r=k.ins.dragMovingTarget().position(),p,n,m=q-k.offset.scrollX,l=o-k.offset.scrollY;p=r.left+m;n=r.top+l;p-=k.offset.relativeFixX;n-=k.offset.relativeFixY;k.ins._updatePosition(p,n,r);k.offset.scrollX=q;k.offset.scrollY=o;k.offset.maxX+=m;k.offset.maxY+=l};d.Model._instanceName="JCDragIns";d.Model.DRAG_INITED="JCDragInited";d.Model.DRAG_BEFORE="JCDragBefore";d.Model.DRAG_BEGIN="JCDragBegin";d.Model.DRAG_DONE="JCDragDone";d.Model.DRAG_AFTER="JCDragAfter";d.Model.DRAGGING_ITEM="JCDraggingItem";d.Model.DRAGGING_MOVING="JCDraggingMoving";d.Model.DROP_DONE="JCDropDone";d.Model.DROP_DONE_AFTER="JCDropDoneAfter";d.Model.DISABLE_DRAG="disableDrag";d.Model.DISABLE_DROP="disableDrop";d.Model.IGNORE_DRAG="ignoreDrog";d.Model.TRIGGER_DRAG="JCTriggerDrag";d.Model.CLASS_CURRENT="JCCurrentDropBox";d.Model.CLASS_MOVING="JCMovingDropBox";d.Model.CLASS_CURRENT_DRAG_ITEM="JCCurrentDragItem";JC.f.extendObject(d.Model.prototype,{init:function(){},defaultCSSPosition:function(j){typeof j!="undefined"&&(this._defaultCSSPosition=j);return this._defaultCSSPosition},defaultCSSZIndex:function(j){typeof j!="undefined"&&(this._defaultCSSZIndex=j);return this._defaultCSSZIndex},defaultCSSCursor:function(j){typeof j!="undefined"&&(this._defaultCSSCursor=j);return this._defaultCSSCursor},dragTarget:function(){var j=this;if(!j._dragTarget){j._dragTarget=j.selectorProp("dragTarget");!(j._dragTarget&&j._dragTarget.length)&&(j._dragTarget=j.selector())}return j._dragTarget},dragMovingTarget:function(n){var j=this,k=j.isDropFor();if(k&&n){j._dragMovingTarget&&j._dragMovingTarget.remove();j._dragMovingTarget=null}if(!j._dragMovingTarget){j._dragMovingTarget=j.dragTarget();if(k){var l=j.dragTarget().position(),m=JC.f.gid();j._dragMovingTarget=j.dragTarget().clone();j._dragMovingTarget.css({position:"absolute",left:l.left+"px",top:l.top+"px","z-index":window.ZINDEX_COUNT++});j.dragTarget().data("gid",m);j._dragMovingTarget.data("gid",m);j.dragTarget().addClass(d.Model.CLASS_CURRENT_DRAG_ITEM);j._dragMovingTarget.attr(d.Model.DISABLE_DROP,true).attr(d.Model.IGNORE_DRAG,true).addClass(d.Model.CLASS_MOVING)}}k&&n&&j.dragTarget().after(j._dragMovingTarget);return j._dragMovingTarget},isDropFor:function(){typeof this._isDropFor=="undefined"&&(this._isDropFor=this.is("[dropFor]")&&JC.f.parseBool(this.attrProp("dropFor")));return this._isDropFor},dropFor:function(j){(!this._dropFor=="undefined"||j)&&(this._dropFor=this.selectorProp("dropFor"));return this._dropFor},relativeParent:function(k){if(!this._relativeParent=="undefined"||k){this._relativeParent=null;var j=this.dragTarget();while((j=$(j.parent())).length){if(/body|html/i.test(j.prop("nodeName"))){break}if((j.css("position")||"").toLowerCase()=="relative"){this._relativeParent=j;break}}}return this._relativeParent},dropSwap:function(){return this.boolProp("dropSwap")},dropPush:function(){return this.boolProp("dropPush")},selectedDropBox:function(m,l){var k=this,o=k.dropFor(),j=d.dragInfo();if(!j){return null}if(typeof m!="undefined"&&typeof l!="undefined"&&o&&o.length){k._selectedDropBox=null;if(o&&o.length){var q=[],n=e(m,l,j.offset.width,j.offset.height);o.each(function(){var r=$(this);if(r.is("["+d.Model.DISABLE_DROP+"]")){return}var s=r.position(),t=e(s.left,s.top,r.prop("offsetWidth"),r.prop("offsetHeight"));if(g(n,t)){t.selector=r;q.push(t)}});if(q.length){var p;$.each(q,function(s,r){r.dist=f(c(n),c(r));if(!s){p=r;return}r.dist'),k=l.clone();j._model.dragTarget().after(l);m.after(k);k.after(j._model.dragTarget());l.after(m);l.remove();k.remove()}else{if(j._model.dropPush){j.trigger("INIT_INDEX");var l=$(''),k=l.clone();if(j._model.dragTarget().data("dragIndex")>m.data("dragIndex")){m.before(j._model.dragTarget())}else{m.after(j._model.dragTarget())}}else{j._model.dragTarget().appendTo(m)}}j._model.dropDoneAfterCb()&&j._model.dropDoneAfterCb().call(j._model.selector(),j._model.dragTarget(),m);j.notification("DROP_DONE_AFTER",[j._model.selector(),j._model.dragTarget(),m]);j.trigger(d.Model.DROP_DONE_AFTER)}},clean:function(k){var j=this;if(j._model.isDropFor()){j._model.dragMovingTarget()&&j._model.dragMovingTarget().remove();j._model.selectedDropBox()&&j._model.selectedDropBox().removeClass(d.Model.CLASS_CURRENT)}}});function g(k,j){return !(j.left>k.right||j.rightk.bottom||j.bottom diff --git a/deploy/comps/Drag/res/default/index.php b/deploy/comps/Drag/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/deploy/comps/Drag/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/Drag/res/default/style.css b/deploy/comps/Drag/res/default/style.css new file mode 100755 index 000000000..ad8c5a505 --- /dev/null +++ b/deploy/comps/Drag/res/default/style.css @@ -0,0 +1 @@ +.JCDrag{position:absolute}.JCCurrentDropBox,.JCCurrentDropBox *{color:#000 !important;background:#f0dc82 !important}.JCMovingDropBox,.JCMovingDropBox *{color:#000 !important;background:#fff !important}.JCMovingDropBox{opacity:.35;filter:alpha(opacity = 35)} \ No newline at end of file diff --git a/deploy/comps/Drag/res/index.php b/deploy/comps/Drag/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/deploy/comps/Drag/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/DragSelect/DragSelect.js b/deploy/comps/DragSelect/DragSelect.js new file mode 100755 index 000000000..e59898f8e --- /dev/null +++ b/deploy/comps/DragSelect/DragSelect.js @@ -0,0 +1 @@ +(function(define,_win){define(["JC.BaseMVC"],function(){var _jdoc=$(document),_jwin=$(window);JC.DragSelect=DragSelect;function DragSelect(_selector){_selector&&(_selector=$(_selector));if(JC.BaseMVC.getInstance(_selector,DragSelect)){return JC.BaseMVC.getInstance(_selector,DragSelect)}JC.BaseMVC.getInstance(_selector,DragSelect,this);this._model=new DragSelect.Model(_selector);this._view=new DragSelect.View(this._model);this._init();JC.log(DragSelect.Model._instanceName,"all inited",new Date().getTime())}DragSelect.init=function(_selector){var _r=[];_selector=$(_selector||document);if(_selector.length){if(_selector.hasClass("js_compDragSelect")){_r.push(new DragSelect(_selector))}else{_selector.find("div.js_compDragSelect").each(function(){_r.push(new DragSelect(this))})}}return _r};DragSelect.RECT=function(){if(!(DragSelect._RECT&&DragSelect._RECT.length)){DragSelect._RECT=$(DragSelect.RECT_TPL);DragSelect._RECT.appendTo(document.body)}return DragSelect._RECT};DragSelect.RECT_TPL='';DragSelect.DEFAULT_MOUSEUP=function(_evt){var _d=DragSelect.DRAG_DATA();if(!_d){return}var _p=_d.ins;_p.trigger("SELECT_DONE",[_p._model.offset(_evt)])};DragSelect.DEFAULT_MOUSEMOVE=function(_evt){var _d=DragSelect.DRAG_DATA();if(!_d){return}var _p=_d.ins,_newPoint=_p._model.offset(_evt);_p._view.updateRect(_newPoint);_p.trigger("SELECT_MOVE",[_newPoint])};DragSelect.DEFAULT_SELECT_EVENT=function(){return false};DragSelect.DRAG_DATA=function(_setter){typeof _setter!="undefined"&&(DragSelect._DRAG_DATA=_setter);return DragSelect._DRAG_DATA};DragSelect.MIN_RECT={width:20,height:20};JC.BaseMVC.build(DragSelect);JC.f.extendObject(DragSelect.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var _p=this,_ditems;if(!_p._model.config()){JC.log("JC.DragSelect config data not found!");return}_p.on("inited",function(){_ditems=_p._model.delegateItems();if(!_ditems.length){return}_p.selector().delegate(_ditems.join(","),"click",function(_evt){});$.each(_ditems,function(_k,_item){_p.selector().delegate(_item,"mousedown",function(_evt){var _sp=$(this);_p.trigger("SELECT_START",[_sp,_evt,_item])})})});_p.on("SELECT_START",function(_evt,_sp,_srcEvt,_type){var _d;_p.trigger("CLEAR_EVENT");_p.trigger("REMOVE_ALL_REALTIME_EFFECT");_d=_p._model.initDragData(_sp,_type);if(!_d){return}_d.ins=_p;_d.downPoint=_p._model.offset(_srcEvt);_p._view.showRect();_p.trigger("BIND_EVENT")});_p.on("BIND_EVENT",function(_evt){_jdoc.on("mousemove",DragSelect.DEFAULT_MOUSEMOVE);_jdoc.on("mouseup",DragSelect.DEFAULT_MOUSEUP);!_p._model.enableTextSelectable()&&_jdoc.on("selectstart",DragSelect.DEFAULT_SELECT_EVENT)});_p.on("CLEAR_EVENT",function(_evt){_jdoc.off("mousemove",DragSelect.DEFAULT_MOUSEMOVE);_jdoc.off("mouseup",DragSelect.DEFAULT_MOUSEUP);_jdoc.off("selectstart",DragSelect.DEFAULT_SELECT_EVENT);_p._model.realtimeEffect()&&_p.trigger("REMOVE_ALL_REALTIME_EFFECT");_p.trigger("CLEAR_DATA")});_p.on("SELECT_DONE",function(_evt,_newPoint){_p._view.updateRect(_newPoint);var _rectSize=selectorToRectangle(DragSelect.RECT());if(_p._model.rectIsOutsize(_rectSize)){}else{_p.trigger("PROCESSS_SELECT",[_rectSize,DragSelect.DRAG_DATA()])}_p._view.hideRect();_p.trigger("CLEAR_EVENT")});_p.on("PROCESSS_SELECT",function(_evt,_rectSize,_params){if(!DragSelect.RECT().is(":visible")){return}var _selectedItems=_p._model.getSelectItems(_rectSize,_params.type);if(!_selectedItems.length){return}if(_params.data){$.each(_selectedItems,function(_k,_item){_params.data.addClass&&_item.addClass(_params.data.addClass);_params.data.removeClass&&_item.removeClass(_params.data.removeClass)});_params.data.callback&&_params.data.callback.call(_p.selector(),_selectedItems,_params.type,_p)}_p._model.callback()&&_p._model.callback().call(_p.selector(),_selectedItems,_params.type,_p)});_p.on("SELECT_MOVE",function(_evt,_newPoint){if(_p._model.realtimeEffect()){_p.trigger("REALTIME_EFFECT",[_newPoint])}});_p.on("REALTIME_EFFECT",function(_evt,_newPoint){if(!DragSelect.RECT().is(":visible")){return}if(!_p._model.realtimeClass(DragSelect.DRAG_DATA().data)){return}var _rectSize=selectorToRectangle(DragSelect.RECT()),_params=DragSelect.DRAG_DATA(),_realtimeClass=_p._model.realtimeClass(DragSelect.DRAG_DATA().data);_p.trigger("REMOVE_REALTIME_EFFECT",_realtimeClass);if(_p._model.rectIsOutsize(_rectSize)){_p._model.preRealtimeItems([]);return}var _selectedItems=_p._model.getSelectItems(_rectSize,_params.type);$.each(_selectedItems,function(_k,_item){_item.addClass(_realtimeClass)});_p._model.preRealtimeItems(_selectedItems)});_p.on("REMOVE_REALTIME_EFFECT",function(_evt,_class,_items){_items=_items||_p._model.preRealtimeItems();_items&&_class&&$.each(_items,function(_ix,_item){_item.removeClass(_class)})});_p.on("REMOVE_ALL_REALTIME_EFFECT",function(){_p._model.realtimeClass()&&_p._model.allItems().removeClass(_p._model.realtimeClass());$.each(_p._model.config(),function(_k,_item){_item.data&&_item.data.realtimeClass&&_p._model.items(_k).removeClass(_items.data.realtimeClass)})});_p.on("CLEAR_DATA",function(_evt){DragSelect.DRAG_DATA(null)})},clearCache:function(){this.trigger("CLEAR_DATA")},_inited:function(){this.trigger("inited")}});DragSelect.Model._instanceName="JCDragSelect";DragSelect.Model.UNI_COUNT=1;DragSelect.Model.BEFORE_FIND_PREFIX="beforeSelected";JC.f.extendObject(DragSelect.Model.prototype,{init:function(){this._itemsCache={}},enableTextSelectable:function(){return this.boolProp("cdsEnableTextSelectable")},realtimeClass:function(_data){var _r=this.config().realtimeClass||this.attrProp("cdsRealtimeClass");_data&&_data.realtimeClass&&(_r=_data.realtimeClass);return _r||""},items:function(_type){var _r;!_r&&(_r=this.selector().find(_type));return _r},allItems:function(){var _r;!_r&&(_r=this.selector().find(this.delegateItems().join(",")));return _r},enableCache:function(){return this.boolProp("cdsEnableCache")},preRealtimeItems:function(_setter){typeof _setter!="undefined"&&(this._preRealtimeItems=_setter);return this._preRealtimeItems},realtimeEffect:function(){return this.boolProp("cdsRealtimeEffect")},getSelectItems:function(_rect,_type){var _p=this,_r=[],_items=_p.items(_type),_filter;$.each(_items,function(_k,_item){_item=$(_item);var _itemRect=selectorToRectangle(_item);if(intersectRect(_rect,_itemRect)){if(_filter=_p.itemFilter(_type)){if(_filter.call(_p.selector(),_item,_type,_p.config().items[_type],_p.config())===false){return}}_r.push(_item)}});return _r},itemFilter:function(_type){var _r=this.callbackProp("cdsItemFilter");this.config().itemFilter&&(_r=this.config().itemFilter);this.config().items&&this.config().items[_type]&&this.config().items[_type].itemFilter&&(_r=(this.config().items[_type].itemFilter));return _r},callback:function(){var _r=this.config().callback||this.callbackProp("cdsCallback");return _r},initDragData:function(_selector,_k){var _p=this,_itemData=_p.config().items[_k];if(!_itemData){return}return DragSelect.DRAG_DATA({type:_k,data:_itemData})},config:function(){if(!this._config){this._config=eval("("+(JC.f.scriptContent(this.selectorProp("cdsConfig")))+")")}return this._config},delegateItems:function(){var _r=[];$.each(this.config().items,function(_k,_item){_r.push(_k)});return _r},offset:function(_evt){var _r={x:_evt.pageX,y:_evt.pageY};return _r},rectMinWidth:function(){return this.intProp("cdsRectMinWidth")},rectMinHeight:function(){return this.intProp("cdsRectMinHeight")},rectMinSize:function(){var _p=this;return{width:_p.rectMinWidth()||DragSelect.MIN_RECT.width,height:_p.rectMinHeight()||DragSelect.MIN_RECT.height}},rectIsOutsize:function(_rectSize){var _p=this,_r,_minSize=_p.rectMinSize();_minSize.width>_rectSize.width&&_minSize.height>_rectSize.height&&(_r=true);return _r}});JC.f.extendObject(DragSelect.View.prototype,{init:function(){},showRect:function(){DragSelect.RECT().css({left:"-9999px"}).show()},updateRect:function(_newPoint){if(!(DragSelect.DRAG_DATA()&&DragSelect.RECT().is(":visible"))){return}var _p=this,_downPoint=DragSelect.DRAG_DATA().downPoint,_rect=DragSelect.RECT(),_size;if(!_downPoint){return}_size=pointToRect(_downPoint,_newPoint);_rect.css(_size)},hideRect:function(){var _p=this;DragSelect.RECT().hide()}});function intersectRect(r1,r2){return !(r2.x>(r1.x+r1.width)||(r2.x+r2.width)(r1.y+r1.height)||(r2.y+r2.height) diff --git a/deploy/comps/DragSelect/res/default/style.css b/deploy/comps/DragSelect/res/default/style.css new file mode 100755 index 000000000..1fd569e28 --- /dev/null +++ b/deploy/comps/DragSelect/res/default/style.css @@ -0,0 +1 @@ +.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.js_compDragSelect_rect{position:absolute;border:1px solid #aac4db;background:#0a246a;opacity:.5;filter:alpha(opacity = 50)}.js_compDragSelect .js_cdsRealtimeEffect,.js_compDragSelect td.js_cdsRealtimeEffect{background:#f0dc82 !important;color:#000 !important} \ No newline at end of file diff --git a/deploy/comps/DragSelect/res/default/test.css b/deploy/comps/DragSelect/res/default/test.css new file mode 100755 index 000000000..84188c86a --- /dev/null +++ b/deploy/comps/DragSelect/res/default/test.css @@ -0,0 +1 @@ +.js_compDragSelect .js_cdsSelecteClass,.js_compDragSelect .js_cdsSelecteClass *{background:#f0dc82 !important;color:#000 !important}.js_compDragSelect .js_pos_canSelect{background:#c1e0fe !important;color:#61b0ff !important}.js_compDragSelect .js_pos_selected{background:#008000 !important;color:#f2f2f2 !important}.js_compDragSelect .js_pos_locked{background:#ccc !important;color:#000 !important}.js_compDragSelect .js_pos_unlocked{background:#eee !important;color:#000 !important} \ No newline at end of file diff --git a/deploy/comps/DragSelect/res/index.php b/deploy/comps/DragSelect/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/deploy/comps/DragSelect/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/FChart/FChart.js b/deploy/comps/FChart/FChart.js new file mode 100755 index 000000000..91eff43c4 --- /dev/null +++ b/deploy/comps/FChart/FChart.js @@ -0,0 +1 @@ +(function(define,_win){define("JC.FChart",["JC.BaseMVC","swfobject","plugins.json2","jquery.mousewheel"],function(){JC.use&&!window.swfobject&&JC.use("plugins.swfobject");JC.use&&!window.JSON&&JC.use("plugins.jsons");JC.use&&!jQuery.event.special.mousewheel&&JC.use("plugins.jquery.mousewheel");var _jdoc=$(document),_jwin=$(window);JC.FChart=FChart;function FChart(_selector){_selector&&(_selector=$(_selector));if(JC.BaseMVC.getInstance(_selector,FChart)){return JC.BaseMVC.getInstance(_selector,FChart)}JC.BaseMVC.getInstance(_selector,FChart,this);this._model=new FChart.Model(_selector);this._view=new FChart.View(this._model);this._init()}FChart.init=function(_selector){var _r=[];_selector=$(_selector||document);if(_selector.length){if(_selector.hasClass("js_compFChart")){_r.push(new FChart(_selector))}else{_selector.find("div.js_compFChart").each(function(){_r.push(new FChart(this))})}}return _r};JC.BaseMVC.build(FChart);JC.f.extendObject(FChart.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var _p=this;_p.on("inited",function(){var _data=_p._model.parseInitData();if(_data){_p.trigger(FChart.Model.UPDATE_CHART_DATA,[_data])}_p._model.height()&&_p.selector().css({height:_p._model.height()});if(!_p._model.chartScroll()||_p._model.type().toLowerCase()=="map"){_p.selector().on("mousewheel",function(_evt){var _swf=$("#"+_p.gid());if(_evt.deltaY&&_swf&&_swf.prop("apiReady")&&_swf.prop("updateMouseWheel")){_swf[0].updateMouseWheel(_evt.deltaY)}return false})}});_p.on(FChart.Model.UPDATE_CHART_DATA,function(_evt,_data){_p.trigger(FChart.Model.CLEAR);_p._view.update(_data);_p._model.chartSize({width:_p._model.width(),height:_p._model.height()})});_p.on(FChart.Model.CLEAR,function(_evt){_p.trigger(FChart.Model.CLEAR_STATUS);_p._view&&_p._view.clear()});_p._model.chartSize({width:_p._model.width(),height:_p._model.height()})},_inited:function(){this.trigger("inited")},update:function(_data){this.trigger(FChart.Model.UPDATE_CHART_DATA,_data);return this},gid:function(){return this._model.gid()}});FChart.Model._instanceName="JCFChart";FChart.Model.INS_COUNT=1;FChart.Model.CLEAR="clear";FChart.Model.CLEAR_STATUS="clear_status";FChart.Model.UPDATE_CHART_DATA="update_data";FChart.Model.SWF_FILE_MAP=null;FChart.Model.FLASH_PATH="{0}/swf/{1}.swf?{2}";FChart.Model.VERSION="fchart";JC.pathPostfix&&(FChart.Model.VERSION="v="+JC.pathPostfix);window.requirejs&&window.requirejs.s&&window.requirejs.s.contexts&&window.requirejs.s.contexts._&&window.requirejs.s.contexts._.config&&window.requirejs.s.contexts._.config.urlArgs&&(FChart.Model.VERSION=window.requirejs.s.contexts._.config.urlArgs);FChart.Model.TYPE_MAP={line:"CurveGram",curvegram:"CurveGram",bar:"Histogram",histogram:"Histogram",vbar:"VHistogram",hbar:"VHistogram",vhistogram:"VHistogram",column:"ZHistogram",zbar:"ZHistogram",zhistogram:"ZHistogram",hcolumn:"VZHistogram",mix:"MixChart",map:"Map",trend:"Trend",Trend:"Trend",pie:"PieGraph",piegraph:"PieGraph",dount:"Dount",ddount:"DDount",ndount:"NDount",stack:"Stack",hstack:"HStack",rate:"Rate"};JC.f.extendObject(FChart.Model.prototype,{init:function(){this._gid="jchart_gid_"+(FChart.Model.INS_COUNT++);this.afterInit&&this.afterInit()},chartScroll:function(){var _r=true;this.is("[chartScroll]")&&(_r=this.boolProp("chartScroll"));return _r},parseInitData:function(){var _p=this,_data;if(_p.selector().attr("chartScriptData")){_data=_p.selectorProp("chartScriptData").html()}else{if(_p.selector().is("[chartDataVar]")){_data=_p.windowProp("chartDataVar");_data&&(_data=JSON.stringify(_data))}}if(_data){_data=_data.replace(/^[\s]*?\/\/[\s\S]*?[\r\n]/gm,"");_data=_data.replace(/[\r\n]/g,"");_data=_data.replace(/\}[\s]*?,[\s]*?\}$/g,"}}");_data=eval("("+_data+")")}return _data},data:function(_data){typeof _data!="undefined"&&(this._data=_data);return this._data},gid:function(){return this._gid},width:function(){if(typeof this._width=="undefined"){this._width=this.selector().prop("offsetWidth");this.is("[chartWidth]")&&(this._width=this.intProp("chartWidth")||this._width)}return this._width},height:function(){if(typeof this._height=="undefined"){this._height=this.selector().prop("offsetHeight")||400;this.is("[chartHeight]")&&(this._height=this.intProp("chartHeight")||this._height)}return this._height},sourceWidth:function(){if(typeof this._sourceWidth=="undefined"){this.is("[chartWidth]")&&(this._sourceWidth=this.intProp("chartWidth")||this._sourceWidth)}return this._sourceWidth||"100%"},chartSize:function(_setter){typeof _setter!="undefined"&&(this._chartSize=_setter);return this._chartSize},stage:function(){},stageCorner:function(){return 18},clear:function(){var _p=this,_k;for(_k in _p){if(/^\_/.test(_k)){if(_k=="_selector"){continue}if(_k=="_gid"){continue}_p[_k]=undefined}}_p.afterClear&&_p.afterClear()},clearStatus:function(){},chartType:function(){var _r="";this.data()&&this.data().chart&&this.data().chart.type&&(_r=this.data().chart.type);return(_r||"").toString().toLowerCase()},typeMap:function(_type){return FChart.Model.TYPE_MAP[_type]},type:function(){return this.typeMap(this.chartType())||""},path:function(){var _path=JC.FCHART_PATH;if(!_path){if(JC.use){_path=JC.PATH+"/comps/FChart/"}else{_path=JC.PATH+"/modules/JC.FChart/0.1/"}}var _p=this,_r=JC.f.printf(_p.attrProp("chartPath")||FChart.Model.FLASH_PATH,_path,_p.type(),FChart.Model.VERSION);_r=this.checkFileMap()||_r;return _r},checkFileMap:function(){var _r="";if(window.FCHART_SWF_FILE_MAP){this.chartType() in window.FCHART_SWF_FILE_MAP&&(_r=window.FCHART_SWF_FILE_MAP[this.chartType()]);this.type() in window.FCHART_SWF_FILE_MAP&&(_r=window.FCHART_SWF_FILE_MAP[this.type()])}if(JC.FCHART_SWF_FILE_MAP){this.chartType() in JC.FCHART_SWF_FILE_MAP&&(_r=JC.FCHART_SWF_FILE_MAP[this.chartType()]);this.type() in JC.FCHART_SWF_FILE_MAP&&(_r=JC.FCHART_SWF_FILE_MAP[this.type()])}if(FChart.Model.SWF_FILE_MAP){this.chartType() in FChart.Model.SWF_FILE_MAP&&(_r=FChart.Model.SWF_FILE_MAP[this.chartType()]);this.type() in FChart.Model.SWF_FILE_MAP&&(_r=FChart.Model.SWF_FILE_MAP[this.type()])}_r&&(_r=JC.f.printf("{0}?v={1}",_r,FChart.Model.VERSION));return _r}});JC.f.extendObject(FChart.View.prototype,{init:function(){var _p=this},draw:function(_data){if(!this._model.type()){return}var _p=this,_path=_p._model.path(),_fpath=_path.replace(/([^\:]|)[\/]+/g,"$1/"),_element=$("#"+_p._model.gid()),_dataStr=JSON.stringify(_data);if(!$("#"+_p._model.gid()).length){_element=$(JC.f.printf('',_p._model.gid()));_element.appendTo(_p.selector())}var _flashVar={chart:encodeURIComponent(_dataStr)},_flashParams={wmode:"transparent",allowScriptAccess:"always"},_flashAttrs={id:_p._model.gid(),name:_p._model.gid()};swfobject.embedSWF(_fpath,_p._model.gid(),_p._model.sourceWidth(),_p._model.height(),"10","",_flashVar,_flashParams,_flashAttrs)},width:function(){return this._model.width()},height:function(){return this._model.height()},stage:function(){return this._model.stage()},selector:function(){return this._model.selector()},clear:function(){var _p=this;if(!_p._model._stage){return}$(_p._model._stage.canvas).remove();_p._model._stage=undefined},clearStatus:function(){},update:function(_data){var _p=this;_p.clear();_p._model.clear();_p._model.data(_data);_p.draw(_data)}});_jdoc.ready(function(){JC.f.safeTimeout(function(){FChart.autoInit&&FChart.init()},null,"winFCHARTInit",1)});return JC.FChart})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/FChart/res/default/default_color.html b/deploy/comps/FChart/res/default/default_color.html new file mode 100755 index 000000000..152ee5955 --- /dev/null +++ b/deploy/comps/FChart/res/default/default_color.html @@ -0,0 +1,59 @@ + + + + +suches template + + +

          default

          +
            +
          1.           
          2. +
          3.           
          4. +
          5.           
          6. +
          7.           
          8. +
          9.           
          10. +
          11.           
          12. +
          13.           
          14. +
          15.           
          16. +
          17.           
          18. +
          19.           
          20. +
          + +

          mix

          +
            +
          1.           
          2. +
          3.           
          4. +
          5.           
          6. +
          7.           
          8. +
          9.           
          10. +
          11.           
          12. +
          13.           
          14. +
          15.           
          16. +
          17.           
          18. +
          19.           
          20. +
          21.           
          22. +
          + +

          ext

          +
            +
          1.           
          2. +
          3.           
          4. +
          5.           
          6. + +
          7.           
          8. +
          9.           
          10. + +
          11.           
          12. +
          13.           
          14. + +
          15.           
          16. +
          17.           
          18. +
          19.           
          20. + +
          21.           
          22. + +
          + + + + diff --git a/deploy/comps/FChart/res/default/style.css b/deploy/comps/FChart/res/default/style.css new file mode 100755 index 000000000..188fa687a --- /dev/null +++ b/deploy/comps/FChart/res/default/style.css @@ -0,0 +1 @@ +.js_jchart{position:relative}.js_jchart svg{position:absolute;top:0;left:0}.js_jchart .jcc_pointer{cursor:pointer !important}.js_jchart .jcc_title{font-weight:bold !important;font-size:14px !important}.js_jchart .jcc_subtitle{font-size:12px !important}.js_jchart .jcc_vtitle{font-size:14px !important}.js_jchart .jcc_credit{color:#909090 !important} \ No newline at end of file diff --git a/deploy/comps/FChart/swf/CurveGram.swf b/deploy/comps/FChart/swf/CurveGram.swf new file mode 100755 index 000000000..f2ec6e46a Binary files /dev/null and b/deploy/comps/FChart/swf/CurveGram.swf differ diff --git a/deploy/comps/FChart/swf/DDount.swf b/deploy/comps/FChart/swf/DDount.swf new file mode 100755 index 000000000..8d9a500f8 Binary files /dev/null and b/deploy/comps/FChart/swf/DDount.swf differ diff --git a/deploy/comps/FChart/swf/Dount.swf b/deploy/comps/FChart/swf/Dount.swf new file mode 100755 index 000000000..e9bcf8b86 Binary files /dev/null and b/deploy/comps/FChart/swf/Dount.swf differ diff --git a/deploy/comps/FChart/swf/HStack.swf b/deploy/comps/FChart/swf/HStack.swf new file mode 100755 index 000000000..682ccc326 Binary files /dev/null and b/deploy/comps/FChart/swf/HStack.swf differ diff --git a/deploy/comps/FChart/swf/Histogram.swf b/deploy/comps/FChart/swf/Histogram.swf new file mode 100755 index 000000000..2a8f0c8de Binary files /dev/null and b/deploy/comps/FChart/swf/Histogram.swf differ diff --git a/deploy/comps/FChart/swf/Map.swf b/deploy/comps/FChart/swf/Map.swf new file mode 100755 index 000000000..b96986ac4 Binary files /dev/null and b/deploy/comps/FChart/swf/Map.swf differ diff --git a/deploy/comps/FChart/swf/MixChart.swf b/deploy/comps/FChart/swf/MixChart.swf new file mode 100755 index 000000000..a6255fa76 Binary files /dev/null and b/deploy/comps/FChart/swf/MixChart.swf differ diff --git a/deploy/comps/FChart/swf/NDount.swf b/deploy/comps/FChart/swf/NDount.swf new file mode 100755 index 000000000..344e86486 Binary files /dev/null and b/deploy/comps/FChart/swf/NDount.swf differ diff --git a/deploy/comps/FChart/swf/PieGraph.swf b/deploy/comps/FChart/swf/PieGraph.swf new file mode 100755 index 000000000..0aa3c5a1f Binary files /dev/null and b/deploy/comps/FChart/swf/PieGraph.swf differ diff --git a/deploy/comps/FChart/swf/Rate.swf b/deploy/comps/FChart/swf/Rate.swf new file mode 100755 index 000000000..6043c96ab Binary files /dev/null and b/deploy/comps/FChart/swf/Rate.swf differ diff --git a/deploy/comps/FChart/swf/Stack.swf b/deploy/comps/FChart/swf/Stack.swf new file mode 100755 index 000000000..35d92a533 Binary files /dev/null and b/deploy/comps/FChart/swf/Stack.swf differ diff --git a/deploy/comps/FChart/swf/Trend.swf b/deploy/comps/FChart/swf/Trend.swf new file mode 100755 index 000000000..a20cd8ef2 Binary files /dev/null and b/deploy/comps/FChart/swf/Trend.swf differ diff --git a/deploy/comps/FChart/swf/VHistogram.swf b/deploy/comps/FChart/swf/VHistogram.swf new file mode 100755 index 000000000..818ba6952 Binary files /dev/null and b/deploy/comps/FChart/swf/VHistogram.swf differ diff --git a/deploy/comps/FChart/swf/VZHistogram.swf b/deploy/comps/FChart/swf/VZHistogram.swf new file mode 100755 index 000000000..76b44084b Binary files /dev/null and b/deploy/comps/FChart/swf/VZHistogram.swf differ diff --git a/deploy/comps/FChart/swf/ZHistogram.swf b/deploy/comps/FChart/swf/ZHistogram.swf new file mode 100755 index 000000000..1a9fa3743 Binary files /dev/null and b/deploy/comps/FChart/swf/ZHistogram.swf differ diff --git a/deploy/comps/FChart/swf/expressInstall.swf b/deploy/comps/FChart/swf/expressInstall.swf new file mode 100755 index 000000000..0fbf8fca9 Binary files /dev/null and b/deploy/comps/FChart/swf/expressInstall.swf differ diff --git a/deploy/comps/Fixed/Fixed.js b/deploy/comps/Fixed/Fixed.js new file mode 100755 index 000000000..3f7d6f790 --- /dev/null +++ b/deploy/comps/Fixed/Fixed.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common"],function(){window.Fixed=JC.Fixed=c;function c(f){if(c.getInstance(f)){return c.getInstance(f)}c.getInstance(f,this);this._model=new e(f);this._view=new d(this._model);this._init()}c.prototype={_init:function(){$([this._view,this._model]).on("BindEvent",function(f,h,g){_p.on(h,g)});$([this._view,this._model]).on("TriggerEvent",function(f,h){var g=JC.f.sliceArgs(arguments);g.shift();g.shift();_p.trigger(h,g)});this._model.init();this._view.init();JC.log("Fixed init:",new Date().getTime());return this},show:function(){this._view.show();return this},hide:function(){this._view.hide();return this},layout:function(){return this._model.layout()},on:function(g,f){$(this).on(g,f);return this},trigger:function(g,f){$(this).trigger(g,f);return this}};c.getInstance=function(f,g){if(typeof f=="string"&&!/r&&(m=r);if(l==m){return}q=mm?l:m;j=l>m?m:l;if(!h._model.fixedeffect(k)){$(document).scrollTop(m);return}c.interval(JC.f.easyEffect(function(t,s){q&&(t=g-t+j);$(document).scrollTop(t)},g,j,h._model.fixeddurationms(k),h._model.fixedstepms(k)))},_initFixedSupport:function(){var g=this,f=g._model.layout().width(),k=g._model.layout().height(),i=$(window).width(),j=$(window).height(),h;if(g._model.isFixedCenter()){g._updateFixedSupport()}else{g._model.isFixedTop()&&g._model.layout().css("top",g._model.fixedtop()+"px");g._model.isFixedRight()&&g._model.layout().css("right",g._model.fixedright()+"px");g._model.isFixedBottom()&&g._model.layout().css("bottom",g._model.fixedbottom()+"px");g._model.isFixedLeft()&&g._model.layout().css("left",g._model.fixedleft()+"px")}g._model.layout().css("position","fixed")},_updateFixedSupport:function(){var g=this,n,m,h=$(document).scrollLeft(),i=g._model.layout().width(),k=g._model.layout().height(),f=$(window).width(),j=$(window).height(),l;if(g._model.isFixedCenter()){l=g._model.fixedcenter();n=f/2-i/2+l[0];m=j/2-k/2+l[1];g._model.layout().css("left",n+"px");g._model.layout().css("top",m+"px")}},_initFixedUnsupport:function(){var f=this;f._model.layout().css("position","absolute");f._updateFixedUnsupport();$(window).on("scroll resize",function(){f._updateFixedUnsupport()})},_updateFixedUnsupport:function(){var h=this,o,f,n,p,i=$(document).scrollTop(),j=$(document).scrollLeft(),k=h._model.layout().width(),m=h._model.layout().height(),g=$(window).width(),l=$(window).height();if(h._model.isFixedTop()){o=h._model.fixedtop()+i;h._model.layout().css("top",o+"px")}if(h._model.isFixedRight()){f=g-h._model.fixedright()-k+j;h._model.layout().css("left",f+"px")}if(h._model.isFixedBottom()){n=i+l-h._model.fixedbottom()-m;h._model.layout().css("top",n+"px")}if(h._model.isFixedLeft()){p=j+h._model.fixedleft();h._model.layout().css("left",p+"px")}},hide:function(){},show:function(){}};window.jQuery&&jQuery.support&&(jQuery.support.isFixed=(function(i){try{var f,m=i(document.documentElement),g=i("
          x
          ").appendTo(m),j=m[0].style.height,n=window,o=i(n),h=o.scrollLeft(),l=o.scrollTop();m.height(screen.height*2+"px");n.scrollTo(0,100);f=g[0].getBoundingClientRect().top===100;m.height(j);g.remove();n.scrollTo(h,l);return f}catch(k){alert(k.message)}})(jQuery));$(document).ready(function(){if(!c.autoInit){return}$(["div.js_autoFixed","dl.js_autoFixed","ul.js_autoFixed","ol.js_autoFixed","button.js_autoFixed","a.js_autoFixed"].join()).each(function(){new c($(this))})});return JC.Fixed})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/Fixed/index.php b/deploy/comps/Fixed/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/Fixed/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/Fixed/res/default/images/top.gif b/deploy/comps/Fixed/res/default/images/top.gif new file mode 100755 index 000000000..8b4dad1ff Binary files /dev/null and b/deploy/comps/Fixed/res/default/images/top.gif differ diff --git a/deploy/comps/Fixed/res/default/style.css b/deploy/comps/Fixed/res/default/style.css new file mode 100755 index 000000000..df86c2b30 --- /dev/null +++ b/deploy/comps/Fixed/res/default/style.css @@ -0,0 +1 @@ +.JCTop{background:transparent url('images/top.gif') no-repeat left top;width:48px;height:46px;cursor:pointer;border:0;display:none} \ No newline at end of file diff --git a/deploy/comps/Fixed/res/default/style.html b/deploy/comps/Fixed/res/default/style.html new file mode 100755 index 000000000..1c8e6407f --- /dev/null +++ b/deploy/comps/Fixed/res/default/style.html @@ -0,0 +1,38 @@ + + + + +JC.Fixed - JC Project - JQuery Components Library - suches + + + + +
          +
          JC.Fixed 默认样式
          +
          + + +
          +
          + + + diff --git a/deploy/comps/FlowChart/FlowChart.js b/deploy/comps/FlowChart/FlowChart.js new file mode 100755 index 000000000..3ef318c1a --- /dev/null +++ b/deploy/comps/FlowChart/FlowChart.js @@ -0,0 +1 @@ +(function(define,_win){define(["Raphael","JC.BaseMVC","JC.PopTips"],function(){var _jdoc=$(document),_jwin=$(window);var isIE=!!window.ActiveXObject;JC.FlowChart=FlowChart;if(JC.use){!window.Raphael&&(JC.use("plugins.raphael"));!JC.PopTips&&(JC.use("JC.PopTips"))}function FlowChart(_selector){_selector&&(_selector=$(_selector));if(JC.BaseMVC.getInstance(_selector,FlowChart)){return JC.BaseMVC.getInstance(_selector,FlowChart)}JC.BaseMVC.getInstance(_selector,FlowChart,this);this._model=new FlowChart.Model(_selector);this._view=new FlowChart.View(this._model);this._init()}FlowChart.init=function(_selector){var _r=[];_selector=$(_selector||document);if(_selector.length){if(_selector.hasClass("js_compFlowChart")){_r.push(new FlowChart(_selector))}else{_selector.find("div.js_compFlowChart").each(function(){_r.push(new FlowChart(this))})}}return _r};JC.BaseMVC.build(FlowChart);JC.f.extendObject(FlowChart.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var _p=this;_p.on("inited",function(){if(!_p._model.chartData()){return}_p._view.draw();_p.notification(JC.FlowChart.Model.INITED,[_p,_p._model.data()])})},_inited:function(){this.trigger("inited")}});FlowChart.Model._instanceName="JCFlowChart";FlowChart.Model.INITED="cfc_inited";FlowChart.Model.ITEM_INITED="cfc_nodeInited";FlowChart.Model.BEFORE_INIT_ITEM="cfc_beforeInitItem";JC.f.extendObject(FlowChart.Model.prototype,{init:function(){},data:function(){if(typeof this._data=="undefined"&&this.is("[data-FlowChart]")){this._data=eval("("+this.scriptTplProp("data-FlowChart")+")")}return this._data},chartData:function(){return this.data().chart},colorsData:function(){return this.data().colors},initGrid:function(){var _p=this;_p._grid={data:[],idColumnIndex:{},idColumnIndexList:[],row:{},idMap:{},columnIndexMap:{},maxColumn:0,rowIndexPad:0,offsetRowIndex:10000};_p.initIdColumnIndex(_p.chartData(),_p.chartData().id,0,0,0);_p.initColumnIndexMap();_p.initColumnRelationship();_p.fixLastColumn();_p.initColumnRelationship();_p.initRowIndex();_p.fixNodesRowIndex();_p.fixTargetNodesRowIndex();_p.fixRealRowIndex();_p.fixFirstLastRowIndex();_p.createItems();_p.calcRealPosition();JC.dir(_p.gridIdColumnIndexMap())},fixLastColumn:function(){var _p=this,_max=_p.gridMaxColumn(),_list;if(_max<1){return}_list=_p.gridIdColumnIndexMap()[_max];if(_list.length<2){return}for(var i=_list.length-1;i>=0;i--){var _item=_list[i];if(!(_item.nodes&&_item.nodes.length)&&(_item.pid&&_item.pid.length>1)){_list.splice(i,1);_item.columnIndex=_max+1;_p.gridMaxColumn(_item.columnIndex);_p.gridIdColumnIndexMap()[_p.gridMaxColumn()]=[_item];break}}},grid:function(){return this._grid},gridIdColumnIndex:function(){return this.grid().idColumnIndex},gridIdColumnIndexList:function(){return this.grid().idColumnIndexList},gridIdColumnIndexMap:function(){return this.grid().columnIndexMap},gridRow:function(){return this.grid().row},gridIdMap:function(_id){if(typeof _id!="undefined"){return this.grid().idMap[_id]}return this.grid().idMap},gridOffsetRowIndex:function(){return this.grid().offsetRowIndex},gridHeight:function(){return 40},gridWidth:function(){return 120},lineWidth:function(){return 75},childLineWidth:function(){return 40},parentLineWidth:function(){return 25},itemHtmlPattern:function(_item){var _r="{0}";("tipsHtml" in _item)&&_item.tipsHtml&&(_r=this.tipsTpl());return _r},tipsTpl:function(){if(!this._tipsTpl){this._tipsTpl=FlowChart.TIPS_TPL;this._tipsTpl=this.scriptTplProp("cfcTipsTpl")||this._tipsTpl}return this._tipsTpl},createItems:function(){var _p=this,_sx=0,_sy=0;_p._items={};_p._columnWidth=[];for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i],_maxWidth=_p.gridWidth();$.each(_rowList,function(_k,_item){var _html,_itemHtmlPatter;_p.notification(JC.FlowChart.Model.BEFORE_INIT_ITEM,[_item,_rowList,_p.data()]);_html=JC.f.printf('
          {0}
          ',_item.name,_p.getStatus(_item));_itemHtmlPatter=JC.f.printf(_p.itemHtmlPattern(_item),_html,_item.tipsHtml,_p.getStatus(_item));var _node=$(_itemHtmlPatter),_tmpWidth;_node.addClass(JC.f.printf("js_cfcItem js_cfcItemStatus_{0}",_p.getStatus(_item)));_node.css({position:"absolute"});_node.appendTo(_p.box());_node.data("nodeData",_item);_p._items[_item.id]=_node;_tmpWidth=_node.width();_tmpWidth>_maxWidth&&(_maxWidth=_tmpWidth)});if(i===0){_maxWidth=Math.ceil(_p._items[_p.chartData().id].width()+30)}_p._columnWidth.push(_maxWidth)}},getStatus:function(_itemData){var _r=0;("status" in _itemData)&&(_r=_itemData.status);return _r},calcRealPosition:function(){var _p=this,_sx=0,_sy=0,_countX=0;_p._columnX=[];_p._minX=_sx;_p._maxX=0;_p._minY=0;_p._maxY=0;for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i];$.each(_rowList,function(_k,_item){var _x=_sx,_y=_sy;_x+=_countX;_y+=_item.rowIndex*_p.gridHeight();_y<_p._minY&&(_p._minY=_y);(_y+_p.gridHeight()/2)>_p._maxY&&(_p._maxY=(_y+_p.gridHeight()/2));_item.x=_x;_item.y=_y});_p._maxX=_sx+_countX+_p.columnWidth(i);_p._columnX.push(_sx+_countX);_countX+=Math.max(_p.gridWidth(),_p.columnWidth(i))+_p.lineWidth();if(_p.listHasChildline(_rowList)){_countX+=_p.childLineWidth()}if(_p.listHasParentline(_rowList)){_countX+=_p.parentLineWidth()}}},minX:function(){return this._minX},minY:function(){return this._minY},maxX:function(){return this._maxX},maxY:function(){return this._maxY},items:function(){return this._items},item:function(_id){return this._items[_id]},columnWidth:function(_ix){if(typeof _ix!=undefined){return this._columnWidth[_ix]||0}return this._columnWidth},columnX:function(_ix){if(typeof _ix!=undefined){return this._columnX[_ix]||0}return this._columnX},fixFirstLastRowIndex:function(){var _p=this;_p._maxRowY=0;if(_p.gridMaxColumn()<2){return}for(var i=0;i<_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i];$.each(_rowList,function(_k,_item){_item.rowIndex>_p._maxRowY&&(_p._maxRowY=_item.rowIndex)})}var _fcol=_p.gridIdColumnIndexMap()[0],_first,_last,_lcol=_p.gridIdColumnIndexMap()[_p.gridMaxColumn()-1];if(_fcol&&_fcol.length){var _fdata=_fcol[0];if(_fdata.nodes&&_fdata.nodes.length){_first=_fdata.nodes.first();_last=_fdata.nodes.last();_fdata.rowIndex=_first.rowIndex+(_last.rowIndex-_first.rowIndex)/2}}},fixNodesRowIndex:function(){var _p=this;for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i],_nextList=_p.gridIdColumnIndexMap()[i+1];$.each(_rowList,function(_k,_item){var _preItem=_rowList[_k-1],_nextItem=_rowList[_k+1],_oldIx=_item.rowIndex,_nodes=_item.nodes,_pid=_item.pid,_pitem=_p.gridIdMap(_pid)||{},_fdata,_ldata,_fitem,_litem,_midY,_spaceY,_minY,_maxY;if(_nodes&&_nodes.length){if(_nodes.length>1){_fdata=_nodes.first();_ldata=_nodes.last();_midY=_fdata.rowIndex+(_ldata.rowIndex-_fdata.rowIndex)/2;_spaceY=_oldIx-_midY;_minY=_fdata.rowIndex+_spaceY;_maxY=_ldata.rowIndex+_spaceY;if(_spaceY===0){return}if(_fdata.prev&&_minY<=_fdata.prev.rowIndex){_spaceY=_fdata.prev.rowIndex+1-_minY;_minY+=_spaceY;_maxY+=_spaceY;_p.fixItemDataAndNext(_fdata,_minY-_fdata.rowIndex);_p.fixItemDataAndNext(_item,_spaceY);_p.fixItemParentDataAndNext(_item,_spaceY)}else{if(_ldata.next&&_maxY>=_ldata.next.rowIndex){_p.fixItemDataAndNext(_fdata,_maxY-_ldata.rowIndex)}else{_p.fixItemDataAndNext(_fdata,_spaceY)}}}else{_fdata=_nodes.first();if(_item.rowIndex===_fdata.rowIndex){return}_maxY=Math.max(_item.rowIndex,_fdata.rowIndex);if(_item.rowIndex>_fdata.rowIndex){_p.fixItemDataAndNext(_fdata,_item.rowIndex-_fdata.rowIndex)}else{if(_item.rowIndex<_fdata.rowIndex){_p.fixItemDataAndNext(_item,_fdata.rowIndex-_item.rowIndex);var _newIx=_item.rowIndex;_p.fixItemParentDataAndNext(_item,_newIx-_oldIx)}else{}}}}})}},fixTargetNodesRowIndex:function(){var _p=this;for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i],_nextList=_p.gridIdColumnIndexMap()[i+1];$.each(_rowList,function(_k,_item){var _preItem=_rowList[_k-1],_nextItem=_rowList[_k+1],_oldIx=_item.rowIndex,_nodes=_item.nodes,_pid=_item.pid,_fdata,_ldata,_fitem,_litem,_midY,_spaceY,_minY,_maxY;if(_pid&&_pid.length){if(_pid.length>1){_fdata=_p.gridIdMap(_pid.first());_ldata=_p.gridIdMap(_pid.last());_midY=_fdata.rowIndex+(_ldata.rowIndex-_fdata.rowIndex)/2;if(_item.prev&&_item.prev.rowIndex>=_midY){}else{if(_item.next&&_item.next.rowIndex<=_midY){_p.fixItemDataAndNext(_item,_midY-_item.rowIndex)}else{_spaceY=_midY-_item.rowIndex;_item.rowIndex=_midY;_p.fixItemChildDataAndNext(_item,_spaceY)}}}else{_fdata=_p.gridIdMap(_pid.first());if(_fdata.targetNode){if(_item.next&&_fdata.rowIndex>=_item.next.rowIndex){_spaceY=_fdata.rowIndex-_item.rowIndex;_p.fixItemDataAndNext(_item,_spaceY)}else{_spaceY=_fdata.rowIndex-_item.rowIndex;_item.rowIndex=_fdata.rowIndex;_p.fixItemChildDataAndNext(_item,_spaceY)}}}}})}},fixItemChildDataAndNext:function(_item,_spaceY){var _p=this,_nextSpaceY,_newIx;if(!(_item&&_item.nodes&&_item.nodes.length)){return}$.each(_item.nodes,function(_k,_sitem){_sitem.rowIndex+=_spaceY;_p.fixItemChildDataAndNext(_sitem,_spaceY)})},fixItemParentDataAndNext:function(_item,_spaceY,_isRealY){var _p=this,_nextSpaceY,_newIx;if(!(_item&&_item.pid&&_item.pid.length)){return}var _pitem=_p.gridIdMap(_item.pid.first()),_fdata,_ldata,_midY;if(!(_pitem)){return}_p.fixItemDataAndNext(_pitem,_spaceY);_p.fixItemParentDataAndNext(_pitem,_spaceY,_isRealY)},fixItemDataAndNext:function(_node,_spaceY){while(_node){_node.rowIndex+=_spaceY;_node=_node.next}},fixRealRowIndex:function(){var _p=this,_sx=0,_sy=0,_minY=0;for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i];$.each(_rowList,function(_k,_item){var _rowIx=_item.rowIndex-_p.gridOffsetRowIndex();_item.rowIndex=_rowIx;_rowIx<_minY&&(_minY=_rowIx)})}if(_minY<0){_minY=Math.abs(_minY);for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i];$.each(_rowList,function(_k,_item){_item.rowIndex+=_minY})}}},initRowIndex:function(){var _p=this;for(var i=0;i<=_p.gridMaxColumn();i++){var _rowList=_p.gridIdColumnIndexMap()[i],_preList=_p.gridIdColumnIndexMap()[i-1],_len=_rowList.length,_preLen=_preList?_preList.length:0;_preList&&(_preList=_preList.slice().reverse());if(i===0){$.each(_rowList,function(_k,_item){_item.rowIndex=_p.gridOffsetRowIndex()});continue}var _minRowIndex=_p.gridOffsetRowIndex(),_maxRowIndex=_p.gridOffsetRowIndex(),_itemIndexLen=1,_startIndex=_p.gridOffsetRowIndex();if(_rowList.length>1){_itemIndexLen=_rowList.length*2}_startIndex=_startIndex-(_itemIndexLen/2);_startIndex+=1;$.each(_rowList,function(_k,_item){_item.rowIndex=_startIndex+_k*2})}},gridMaxColumn:function(_setter){typeof _setter!="undefined"&&(this.grid().maxColumn=_setter);return this.grid().maxColumn},gridRowIndexPad:function(_setter){typeof _setter!="undefined"&&(this.grid().rowIndexPad=_setter);return this.grid().rowIndexPad},initColumnIndexMap:function(){var _p=this;$.each(_p.gridIdColumnIndexList(),function(_k,_item){if(_item.columnIndex in _p.gridIdColumnIndexMap()){_p.gridIdColumnIndexMap()[_item.columnIndex].push(_item)}else{_p.gridIdColumnIndexMap()[_item.columnIndex]=[_item]}})},initColumnRelationship:function(){var _p=this;$.each(_p.gridIdColumnIndexMap(),function(_ix,_list){$.each(_list,function(_k,_item){var _prev=_list[_k-1];_item.prev=_prev;_prev&&(_prev.next=_item);_item.next=null})})},initIdColumnIndex:function(_data,_id,_ix,_processSelf,_count){var _p=this,_childIx=_ix+1,_targetNodeIx=_childIx+1;if(("columnIndex" in _data)&&_ix<_data.columnIndex){_ix=_data.columnIndex}if(!(_id in _p.gridIdMap())){_p.gridIdColumnIndexList().push(_data)}_data.id=_id;_data.pid=_data.pid||[];_data.columnIndex=_ix;_p.gridIdColumnIndex()[_id]=_data;_p.gridIdMap()[_id]=_data;_data.zindex=_count++;_ix>_p.gridMaxColumn()&&_p.gridMaxColumn(_ix);if(_data.nodes&&_data.nodes.length){var _targetNodes={};$.each(_data.nodes,function(_k,_item){_item.pid=_item.pid||[];_item.pid.push(_id);if(("targetNode" in _item)&&_p.chartData().targetNodes&&(_item.targetNode in _p.chartData().targetNodes)){_targetNodes[_item.targetNode]=_item.targetNode;_p.chartData().targetNodes[_item.targetNode].pid=_p.chartData().targetNodes[_item.targetNode].pid||[];_p.chartData().targetNodes[_item.targetNode].pid.push(_item.id)}_p.initIdColumnIndex(_item,_item.id,_childIx,false,_count)});$.each(_targetNodes,function(_k,_item){_p.initIdColumnIndex(_p.chartData().targetNodes[_k],_k,_targetNodeIx,true,_count)})}if(_processSelf&&("targetNode" in _data)&&_p.chartData().targetNodes&&(_data.targetNode in _p.chartData().targetNodes)){_p.chartData().targetNodes[_data.targetNode].pid=_p.chartData().targetNodes[_data.targetNode].pid||[];_p.chartData().targetNodes[_data.targetNode].pid.push(_id);_p.initIdColumnIndex(_p.chartData().targetNodes[_data.targetNode],_data.targetNode,_childIx,true,_count)}},buildLayout:function(){var _p=this;_p._container=$('
          ');_p._layout=$('
          ');_p._raphaelPlaceholder=$('
          ');_p._box=$('
          ');_p._raphaelPlaceholder.appendTo(_p._layout);_p._box.appendTo(_p._layout);_p._layout.appendTo(_p._container);_p._container.appendTo(_p.selector())},layout:function(){return this._layout},box:function(){return this._box},raphaelPlaceholder:function(){return this._raphaelPlaceholder},width:function(){return Math.abs(this._maxX-this._minX)},height:function(){return Math.abs(this._maxY-this._minY+5)},listHasChildline:function(_list){var _r=false;$.each(_list,function(_k,_item){if((_item.nodes&&_item.nodes.length>1)){_r=true;return false}});return _r},listHasParentline:function(_list){var _r=false,_tmp={};$.each(_list,function(_k,_item){if(_item.targetNode in _tmp){_r=true;return false}if(_item.targetNode&&!(_item.targetNode in _tmp)){_tmp[_item.targetNode]=1}});return _r},colors:function(){var _p=this;if(!_p._colors){_p._colors=_p._buildInColors;if(_p.colorsData()){$.each(_p.colorsData(),function(_k,_item){if(_k in _p._colors){if($.isPlainObject(_item)){JC.f.extendObject(_p._colors[_k],_item)}}else{_p._colors[_k]=_item}})}}return _p._colors},_buildInColors:{line:{stroke:"#E1E1E1","stroke-width":2},icon:{stroke:"#E1E1E1","stroke-width":2,fill:"#F2F2F2"}}});JC.f.extendObject(FlowChart.View.prototype,{init:function(){},draw:function(){var _p=this,_st,_et;if(!(_p._model.chartData()&&_p._model.chartData().name)){return}_st=JC.f.ts();_p._model.buildLayout();_p._model.initGrid();_p._model.layout().css({height:Math.abs(_p._model.maxY())+"px"});_p.showGrid();_p.showLine();JC.PopTips.init(_p.selector());_et=JC.f.ts()},showLine:function(){var _p=this,_rh,_raphael,_y=Math.abs(_p._model.minY()),_ypad=0;_rh=_raphael=Raphael(_p._model.raphaelPlaceholder()[0],_p._model.width(),_p._model.height());!isIE&&(_ypad=1);for(var i=0;i<=_p._model.gridMaxColumn();i++){var _rowList=_p._model.gridIdColumnIndexMap()[i],_hasChildline=_p._model.listHasChildline(_rowList),_hasParentline=_p._model.listHasParentline(_rowList),_columnX=_p._model.columnX(i),_preColumnX=_p._model.columnX(i-1),_columnWidth=_p._model.columnWidth(i),_preColumnWidth=_p._model.columnWidth(i-1),_startX=_columnX+_columnWidth,_realStartX,_lineWidth=_p._model.lineWidth(),_xpad=0;if(_hasParentline){_lineWidth+=_p._model.childLineWidth()}if(_hasChildline){_lineWidth+=_p._model.parentLineWidth()}$.each(_rowList,function(_k,_item){var _node=_p._model.item(_item.id),_pid=_item.pid,_nodes=_item.nodes,_subitem,_realStartX,_realY,_fitem,_litem,_fnode,_lnode,_ex,_sx,_sy,_ey,_tmpX,_midY,_tmpY,_tmpY1,_tmpY2,_endX,_sdata,_snode,_path;if(!(_pid||_nodes)){return}if(_pid&&_pid.length){_fitem=_p._model.gridIdMap(_pid.first());_fnode=_p._model.item(_fitem.id);if(_pid.length>1){_realStartX=_preColumnX+_preColumnWidth+_p._model.parentLineWidth();_litem=_p._model.gridIdMap(_pid.last());_lnode=_p._model.item(_litem.id);_midY=_item.y+Math.abs(_p._model.minY())+_node.outerHeight()/2+_ypad;_tmpY1=_fitem.y+Math.abs(_p._model.minY())+_fnode.outerHeight()/2+_ypad;_tmpY2=_litem.y+Math.abs(_p._model.minY())+_lnode.outerHeight()/2+_ypad;_endX=_item.x-18;_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}M{5} {6}L{7} {8}","",_realStartX,_tmpY1,_realStartX,_tmpY2,_realStartX,_midY,_endX,_midY)).attr(_p._model.colors().line);$.each(_pid,function(_sk,_sitem){_sdata=_p._model.gridIdMap(_sitem);_snode=_p._model.item(_sdata.id);_tmpY=_sdata.y+Math.abs(_p._model.minY())+_snode.outerHeight()/2+_ypad;_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}","",_sdata.x,_tmpY,_realStartX,_tmpY)).attr(_p._model.colors().line)});_rh.JCTriangle(16,_endX,_midY,_p._model.colors().icon)}else{if(_fitem&&_pid.length===1&&("targetNode" in _fitem)){_realStartX=_preColumnX+_fnode.outerWidth();_realY=_fitem.y+_fnode.outerHeight()/2;_item.y=_fitem.y;_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}","",_realStartX,_realY+_ypad,_item.x-18,_realY+_ypad)).attr(_p._model.colors().line);_rh.JCTriangle(16,_item.x-18,_realY+_ypad,_p._model.colors().icon)}}}if(_nodes&&_nodes.length){if(_nodes.length>1){_sx=_item.x+_node.outerWidth();_fitem=_nodes.first();_litem=_nodes.last();_fnode=_p._model.item(_fitem.id);_lnode=_p._model.item(_litem.id);_ex=_fitem.x;_realStartX=_ex-_p._model.childLineWidth();_midY=_item.y+Math.abs(_p._model.minY())+_node.outerHeight()/2+_ypad;_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}","",_sx,_midY,_realStartX-18,_midY)).attr(_p._model.colors().line);_rh.JCTriangle(16,_realStartX-18,_midY,_p._model.colors().icon);_tmpY1=_fitem.y+Math.abs(_p._model.minY())+_fnode.outerHeight()/2+_ypad;_tmpY2=_litem.y+Math.abs(_p._model.minY())+_lnode.outerHeight()/2+_ypad;_endX=_item.x-18;_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}","",_realStartX,_tmpY1,_realStartX,_tmpY2)).attr(_p._model.colors().line);$.each(_nodes,function(_sk,_sitem){_sdata=_sitem;_snode=_p._model.item(_sdata.id);_tmpY=_sdata.y+Math.abs(_p._model.minY())+_snode.outerHeight()/2+_ypad;_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}","",_realStartX,_tmpY,_sdata.x,_tmpY)).attr(_p._model.colors().line)})}if(_nodes.length===1){_realStartX=_columnX+_node.outerWidth();_realY=_item.y+_node.outerHeight()/2;_subitem=_nodes[0];_rh.path(JC.f.printf("{0}M{1} {2}L{3} {4}","",_realStartX,_realY+_y+_ypad,_subitem.x-18,_realY+_y+_ypad)).attr(_p._model.colors().line);_rh.JCTriangle(16,_subitem.x-18,_realY+_y+_ypad,_p._model.colors().icon)}}})}},showGrid:function(){var _p=this;for(var i=0;i<=_p._model.gridMaxColumn();i++){var _rowList=_p._model.gridIdColumnIndexMap()[i];$.each(_rowList,function(_k,_item){var _node=_p._model.item(_item.id);_node.css({left:_item.x+"px",top:_item.y+"px"});_p.notification(JC.FlowChart.Model.ITEM_INITED,[_node,_item,_rowList,_p._model.data()])})}}});FlowChart.TIPS_TPL=['","{0}",' + + + + + +
          +
          JC LunarCalendar 默认模板 1234567890
          +
          +
          +
          + + + + + + + + +
          + + + + + + + + + + +
          + + + + + + + + + + + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          123344567
          891011121314
          151617181920
          21
          22232425262728
          29303132
          333435
          36373839404142
          +
          +
          +
          +
          + + + diff --git a/deploy/comps/NumericStepper/NumericStepper.js b/deploy/comps/NumericStepper/NumericStepper.js new file mode 100755 index 000000000..8844566bd --- /dev/null +++ b/deploy/comps/NumericStepper/NumericStepper.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){var d=$(document),c=$(window);JC.NumericStepper=e;function e(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,e)){return JC.BaseMVC.getInstance(f,e)}JC.BaseMVC.getInstance(f,e,this);this._model=new e.Model(f);this._view=new e.View(this._model);this._init();JC.log(e.Model._instanceName,"all inited",new Date().getTime())}e.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.hasClass("js_compNumericStepper")){g.push(new e(f))}else{f.find("div.js_compNumericStepper, span.js_compNumericStepper").each(function(){g.push(new e(this))})}}return g};e.redoMs=100;e.timeoutMs=500;e.defaultMouseUp=function(f){if(!e._currentIns){return}JC.f.safeTimeout(null,e._currentIns._model.cnsTarget(),e.Model.REDO_TM_NAME);e.Model.interval&&clearInterval(e.Model.interval)};e._currentIns;JC.BaseMVC.build(e);JC.f.extendObject(e.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var f=this;f._model.cnsMinusButton()&&(f._model.cnsMinusButton().on("mousedown",function(g){e._currentIns=f;f.trigger(e.Model.CALC,[e.Model.CALC_MINUS]);JC.f.safeTimeout(function(){e.Model.interval&&clearInterval(e.Model.interval);e.Model.interval=setInterval(function(){f.trigger(e.Model.CALC,[e.Model.CALC_MINUS])},f._model.cnsRedoMs())},f._model.cnsTarget(),e.Model.REDO_TM_NAME,f._model.cnsTimeoutMs());c.on("mouseup",e.defaultMouseUp)}),f._model.cnsMinusButton().each(function(){BaseMVC.getInstance($(this),e,f)}));f._model.cnsPlusButton()&&(f._model.cnsPlusButton().on("mousedown",function(g){e._currentIns=f;f.trigger(e.Model.CALC,[e.Model.CALC_PLUS]);JC.f.safeTimeout(function(){e.Model.interval&&clearInterval(e.Model.interval);e.Model.interval=setInterval(function(){f.trigger(e.Model.CALC,[e.Model.CALC_PLUS])},f._model.cnsRedoMs())},f._model.cnsTarget(),e.Model.REDO_TM_NAME,f._model.cnsTimeoutMs());c.on("mouseup",e.defaultMouseUp)}),f._model.cnsPlusButton().each(function(){BaseMVC.getInstance($(this),e,f)}));f.on(e.Model.CALC,function(i,k){if(!(f._model.cnsTarget()&&f._model.cnsTarget().length)){return}var n=f._model.val(),m=n,l=f._model.step(),g=f._model.fixed(),h=f._model.minvalue(),j=f._model.maxvalue();switch(k){case e.Model.CALC_MINUS:m-=l;f._model.isMinvalue()&&mj&&(m=j);break}if(m===n){return}if(f._model.cnsBeforeChangeCb()&&f._model.cnsBeforeChangeCb().call(f._model.cnsTarget(),m,n,f)===false){return}f._model.cnsTarget().val(JC.f.parseFinance(m,g).toFixed(g));f._model.cnsChangeCb()&&f._model.cnsChangeCb().call(f._model.cnsTarget(),m,n,f)})},_inited:function(){this._view.initStyle()},plus:function(){this.trigger(e.Model.CALC,[e.Model.CALC_PLUS]);return this},minus:function(){this.trigger(e.Model.CALC,[e.Model.CALC_MINUS]);return this}});e.Model._instanceName="JCNumericStepper";e.Model.CALC="calc";e.Model.CALC_MINUS="minus";e.Model.CALC_PLUS="plus";e.Model.CLASS_ICON="cnsIcon";e.Model.CLASS_MINUS="cnsMinus";e.Model.CLASS_PLUS="cnsPlus";e.Model.REDO_TM_NAME="cnsTm";JC.f.extendObject(e.Model.prototype,{init:function(){},cnsTarget:function(){return this.selectorProp("cnsTarget")},cnsMinusButton:function(){return this.selectorProp("cnsMinusButton")},cnsPlusButton:function(){return this.selectorProp("cnsPlusButton")},cnsBeforeChangeCb:function(){return this.callbackProp("cnsBeforeChangeCb")||e.beforeChangeCb},cnsChangeCb:function(){return this.callbackProp("cnsChangeCb")||e.changeCb},cnsRedoMs:function(){return this.intProp("cnsRedoMs")||e.redoMs},cnsTimeoutMs:function(){return this.intProp("cnsTimeoutMs")||e.timeoutMs},isMinvalue:function(){return this.cnsTarget().is("[minvalue]")},isMaxvalue:function(){return this.cnsTarget().is("[maxvalue]")},val:function(){return this.getVal(this.cnsTarget().val())},minvalue:function(){return this.getVal(this.cnsTarget().attr("minvalue"))},maxvalue:function(){return this.getVal(this.cnsTarget().attr("maxvalue"))},step:function(){return this.getVal(this.cnsTarget().attr("step"))||1},fixed:function(){return this.getVal(this.cnsTarget().attr("fixed"))||0},getVal:function(f){var g=0;f&&(f=f.toString().trim());if(f){if(/\./.test(f)){g=JC.f.parseFinance(f,f.split(".")[1].length||this.fixed())}else{g=parseInt(f,10)||0}}return g}});JC.f.extendObject(e.View.prototype,{init:function(){},initStyle:function(){var f=this;f._model.cnsMinusButton()&&f._model.cnsMinusButton().addClass(e.Model.CLASS_ICON).addClass(e.Model.CLASS_MINUS);f._model.cnsPlusButton()&&f._model.cnsPlusButton().addClass(e.Model.CLASS_ICON).addClass(e.Model.CLASS_PLUS)}});d.ready(function(){});$(document).delegate("div.js_compNumericStepper, span.js_compNumericStepper","mouseenter",function(g){var f=$(this),h=JC.BaseMVC.getInstance(f,e);!h&&(new e(f))});$(document).delegate("div.js_compNumericStepper .cnsIcon, span.js_compNumericStepper .cnsIcon","click",function(g){var f=$(this),h=JC.BaseMVC.getInstance(f,e);if(!h){var i=JC.f.getJqParent(f,".js_compNumericStepper");if(!(i&&i.length)){return}h=new e(i);f.hasClass("cnsPlus")?h.plus():h.minus()}});return JC.NumericStepper})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/NumericStepper/index.php b/deploy/comps/NumericStepper/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/deploy/comps/NumericStepper/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/NumericStepper/res/default/images/minus_20x20.png b/deploy/comps/NumericStepper/res/default/images/minus_20x20.png new file mode 100755 index 000000000..8a3c89d9d Binary files /dev/null and b/deploy/comps/NumericStepper/res/default/images/minus_20x20.png differ diff --git a/deploy/comps/NumericStepper/res/default/images/minus_22x22.png b/deploy/comps/NumericStepper/res/default/images/minus_22x22.png new file mode 100755 index 000000000..42653c1a4 Binary files /dev/null and b/deploy/comps/NumericStepper/res/default/images/minus_22x22.png differ diff --git a/deploy/comps/NumericStepper/res/default/images/minus_32x32.png b/deploy/comps/NumericStepper/res/default/images/minus_32x32.png new file mode 100755 index 000000000..4c6ee7d28 Binary files /dev/null and b/deploy/comps/NumericStepper/res/default/images/minus_32x32.png differ diff --git a/deploy/comps/NumericStepper/res/default/images/plus_20x20.png b/deploy/comps/NumericStepper/res/default/images/plus_20x20.png new file mode 100755 index 000000000..baf69750d Binary files /dev/null and b/deploy/comps/NumericStepper/res/default/images/plus_20x20.png differ diff --git a/deploy/comps/NumericStepper/res/default/images/plus_22x22.png b/deploy/comps/NumericStepper/res/default/images/plus_22x22.png new file mode 100755 index 000000000..db1d13ee6 Binary files /dev/null and b/deploy/comps/NumericStepper/res/default/images/plus_22x22.png differ diff --git a/deploy/comps/NumericStepper/res/default/images/plus_32x32.png b/deploy/comps/NumericStepper/res/default/images/plus_32x32.png new file mode 100755 index 000000000..8d19a9455 Binary files /dev/null and b/deploy/comps/NumericStepper/res/default/images/plus_32x32.png differ diff --git a/deploy/comps/NumericStepper/res/default/index.php b/deploy/comps/NumericStepper/res/default/index.php new file mode 100755 index 000000000..f2ebbe146 --- /dev/null +++ b/deploy/comps/NumericStepper/res/default/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/NumericStepper/res/default/style.css b/deploy/comps/NumericStepper/res/default/style.css new file mode 100755 index 000000000..020982606 --- /dev/null +++ b/deploy/comps/NumericStepper/res/default/style.css @@ -0,0 +1 @@ +.js_compNumericStepper .cnsIcon{width:20px;height:20px;border:0;vertical-align:middle;cursor:pointer;padding:0;margin:0;border:0}.js_compNumericStepper .cnsMinus{background:transparent url(./images/minus_20x20.png) no-repeat}.js_compNumericStepper .cnsPlus{background:transparent url(./images/plus_20x20.png) no-repeat} \ No newline at end of file diff --git a/deploy/comps/NumericStepper/res/default/style.html b/deploy/comps/NumericStepper/res/default/style.html new file mode 100755 index 000000000..df067d66a --- /dev/null +++ b/deploy/comps/NumericStepper/res/default/style.html @@ -0,0 +1,32 @@ + + + + +suches template + + + + +
          +
          JC.NumericStepper 默认样式
          +
          + + + + + +
          +
          + + + diff --git a/deploy/comps/NumericStepper/res/index.php b/deploy/comps/NumericStepper/res/index.php new file mode 100755 index 000000000..dabaae9fc --- /dev/null +++ b/deploy/comps/NumericStepper/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/Paginator/Paginator.js b/deploy/comps/Paginator/Paginator.js new file mode 100755 index 000000000..42dca2d22 --- /dev/null +++ b/deploy/comps/Paginator/Paginator.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){JC.Paginator=c;JC.f.addAutoInit&&JC.f.addAutoInit(c);function c(d){d&&(d=$(d));if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.getInstance=function(d,e){if(typeof d=="string"&&!/Math.ceil(d._model.totalRecords/d._model.perPage())){h=1}d.trigger("GOTOPAGE",[h,f])});d.on("RENDER",function(f){d._view.updatePaginatorView();d._view.updateContentView()});d.on("PREVPAGE",function(){d._model.prevPage()});d.on("NEXTPAGE",function(){d._model.nextPage()});d.on("GOTOPAGE",function(g,f){d._model.currentPage=f;d._view.updateContentView();d._view.updatePaginatorView()});d.on("UPDATEVIEW",function(g,f){setTimeout(function(){d._view.paginatedView(f);d._model.selector().attr("perPage",f);d._view.updateContentView()},20)});d.on("FLIPPED",function(g,f){d._model.flipped()&&d._model.flipped().call(d,d.selector(),f)})},_inited:function(){}});c.Model._instanceName="Paginator";JC.f.extendObject(c.Model.prototype,{paginatortype:function(){return this.attrProp("paginatortype")||"ajax"},paginatorUi:function(){var e=this,d=e.attrProp("paginatorui")||".page";return e.selector().find(d)},paginatorContent:function(){var e=this,d=e.attrProp("paginatorcontent")||"tbody";return e.selector().find(d)},paginatorUiTpl:function(){return'共{0}页,{1}条记录上一页{2}下一页每页显示到第页'},currentPage:1,perPage:function(){return(this.intProp("perPage")||10)},perPageOption:function(){var e=this.attrProp("perpageitems")||"10|20|50",f,d,h="",g="";e=e.split("|");d=e.length;for(f=0;f"+e[f]+""}return h},midRange:function(){return(this.intProp("midRange")||5)},totalRecords:function(){return this.intProp("totalrecords")},prevPage:function(){var d=this;if(d.currentPage===1){return}d.currentPage--;d.trigger("RENDER")},nextPage:function(){var e=this,d=Math.ceil(e.totalRecords()/e.perPage());if(e.currentPage===d){return}e.currentPage++;e.trigger("RENDER")},flipped:function(){var d=this,e=d.selector(),f="flipped";return d.callbackProp(e,f)}});JC.f.extendObject(c.View.prototype,{init:function(){},paginatedView:function(e){var k=this,j=k._model.paginatorUi(),d=k._model.paginatorUiTpl(),e=e||k._model.perPage(),h=Math.ceil(k._model.totalRecords()/e),l="",f,g=k._model.currentPage;for(f=1;fk._model.midRange())?(''+f+""):(''+f+"");if(h>k._model.midRange()){(f===1)&&(l+='...');(f===h-1)&&(l+='...')}}l+=''+h+"";d=JC.f.printf(d,h,k._model.totalRecords(),l);j.html(d).find(".js_perpage").val(e);j.find(".js_page").eq(g-1).addClass("cur")},updateContentView:function(){var g=this,f=g._model.currentPage,e=g._model.perPage(),h=(f-1)*e,d=h+e;g._model.paginatorContent().find("tr").hide().slice(h,d).show();g.trigger("FLIPPED")},updatePaginatorView:function(){var f=this,n=f._model.currentPage,d=f._model.paginatorUi(),m=d.find(".js_firstBreak"),k=d.find(".js_lastBreak"),l=Math.ceil(f._model.totalRecords()/f._model.perPage()),j=f._model.midRange(),g=Math.ceil(j/2),i=l-j,e,h;e=(n-g)>0?Math.min((n-g),i):0;e=Math.max(e-1,0);h=e+j;d.find(".js_page").not(":first").not(":last").addClass("dn").slice(e,h).removeClass("dn");d.find(".js_page").eq(n-1).addClass("cur").siblings().removeClass("cur");m[n-g>1?"show":"hide"]();k[n+g>=l?"hide":"show"]();if(n===1){d.find(".js_prevpage").prop("disabled",true).addClass("disabled")}else{d.find(".js_prevpage").prop("disabled",false).removeClass("disabled")}if(n===l){d.find(".js_nextpage").prop("disabled",true).addClass("disabled")}else{d.find(".js_nextpage").prop("disabled",false).removeClass("disabled")}}});$(document).ready(function(){var d=0;c.autoInit&&(d=c.init())});return JC.Paginator})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/Paginator/res/default/style.css b/deploy/comps/Paginator/res/default/style.css new file mode 100755 index 000000000..348952c35 --- /dev/null +++ b/deploy/comps/Paginator/res/default/style.css @@ -0,0 +1 @@ +.js_compPaginator tbody tr{display:none}.js_compPaginator .page{margin-top:15px;clear:both;overflow:hidden;zoom:1;color:#999;text-align:right}.js_compPaginator .page a,.js_compPaginator .page .cur{display:inline-block;height:24px;line-height:24px;border:1px solid #dedcdc;padding:0 8px;vertical-align:middle;margin:0 2px;text-decoration:none;color:#999}.js_compPaginator .page .cur{background:#eaeaea;color:#333;font-weight:bold;border:1px solid silver}.js_compPaginator .page .disabled{border:0 none;cursor:default}.js_compPaginator .page .dn{display:none} \ No newline at end of file diff --git a/deploy/comps/Panel/Panel.js b/deploy/comps/Panel/Panel.js new file mode 100755 index 000000000..25a087120 --- /dev/null +++ b/deploy/comps/Panel/Panel.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common"],function(){window.Panel=JC.Panel=g;function g(k,m,n,l){typeof k=="string"&&(k=k.trim().replace(/[\r\n]+/g,""));typeof m=="string"&&(m=m.trim().replace(/[\r\n]+/g,""));typeof n=="string"&&(n=n.trim().replace(/[\r\n]+/g,""));if(typeof k=="string"&&//i.test(k)){m='
          '+JC.f.filterXSS(k)+"
          ";k="错误:内容不能包含 HTML 和 BODY 标签"}if(g.getInstance(k)){return g.getInstance(k)}this._model=new j(k,m,n,l);this._view=new i(this._model);this._init()}g.getInstance=function(k){if(typeof k=="string"&&!/'+p+"
          ").appendTo("body"),k=l.width()+80;l.remove();m=m||200;n=n||500;k>n&&(k=n);k ');if(k>=1){l.push('')}if(k>=2){l.push('')}l.push("
          ")}return l.join("")};g.prototype={_init:function(){var k=this;k._view.getPanel().data("PanelInstace",k);k._model.addEvent("close_default",function(l,m){m._view.close()});k._model.addEvent("show_default",function(l,m){m._view.show()});k._model.addEvent("hide_default",function(l,m){m._view.hide()});k._model.addEvent("confirm_default",function(l,m){m.trigger("close")});k._model.addEvent("cancel_default",function(l,m){m.trigger("close")});k._model.panelautoclose()&&k.autoClose();return k},on:function(l,k){l&&k&&this._model.addEvent(l,k);return this},show:function(l,m){var k=this;setTimeout(function(){switch(typeof l){case"number":switch(l){case 0:k.center();break}break;case"object":l=$(l);l.length&&k._view.positionWith(l,m);if(!k._model.bindedPositionWithEvent){k._model.bindedPositionWithEvent=true;var n=function(){if(!k._view.getPanel().is(":visible")){return}k.positionWith(l,m)};$(window).off("resize",n);$(window).on("resize",n);k.on("close",function(){k._model.bindedPositionWithEvent=false;$(window).off("resize",n)})}break}},10);this.trigger("beforeshow",this._view.getPanel());this.trigger("show",this._view.getPanel());return this},positionWith:function(l,k){l=$(l);l&&l.length&&this._view.positionWith(l,k);return this},hide:function(){this.trigger("beforehide",this._view.getPanel());this.trigger("hide",this._view.getPanel());return this},close:function(){this.trigger("beforeclose",this._view.getPanel());this.trigger("close",this._view.getPanel());return this},isClickClose:function(){return this._model.panelclickclose()},clickClose:function(k){k&&this.layout()&&this.layout().removeAttr("panelclickclose");!k&&this.layout()&&this.layout().attr("panelclickclose",true);return this},addAutoClose:function(){this.clickClose.apply(this,JC.f.sliceArgs(arguments));return this},autoClose:function(l,n){if(typeof l=="number"){n=l;l=null}var k=this,m;n=k._model.panelautoclosems(n);g._autoCloseTimeout&&clearTimeout(g._autoCloseTimeout);k.on("close",function(){g._autoCloseTimeout&&clearTimeout(g._autoCloseTimeout)});g._autoCloseTimeout=setTimeout(function(){l&&k.on("close",l);k.close()},n);return this},focusButton:function(){this._view.focusButton();return this},dispose:function(){this._view.close();return this},center:function(){this.trigger("beforecenter",this._view.getPanel());this._view.center();this.trigger("center",this._view.getPanel());return this},selector:function(){return this._view.getPanel()},layout:function(){return this._view.getPanel()},find:function(k){return this.layout().find(k)},trigger:function(m,p){var k=this,o=this._model.getEvent(m),l=true;if(o&&o.length){p&&(p=$(p))&&p.length&&(p=p[0]);$.each(o,function(r,q){if(q.call(p,m,k)===false){return l=false}})}if(l){var n=this._model.getEvent(m+"_default");if(n&&n.length){$.each(n,function(r,q){if(q.call(p,m,k)===false){return false}})}}return this},header:function(l){if(typeof l!="undefined"){this._view.getHeader(l)}var k=this._view.getHeader();if(k&&k.length){l=k.html()}return l||""},body:function(l){if(typeof l!="undefined"){this._view.getBody(l)}var k=this._view.getBody();if(k&&k.length){l=k.html()}return l||""},footer:function(l){if(typeof l!="undefined"){this._view.getFooter(l)}var k=this._view.getFooter();if(k&&k.length){l=k.html()}return l||""},panel:function(l){if(typeof l!="undefined"){this._view.getPanel(l)}var k=this._view.getPanel();if(k&&k.length){l=k.html()}return l||""},triggerSelector:function(k){return this._model.triggerSelector(k)},offsetTop:function(k){return this._model.offsetTop(k)},offsetLeft:function(k){return this._model.offsetLeft(k)}};function j(k,m,n,l){this.selector=k;this.headers=m;this.bodys=n;this.footers=l;this.panel;this._events={};this._init()}j.prototype={_init:function(){var k=this,l=typeof this.selector!="undefined"?$(this.selector):undefined;g.ignoreClick=true;if(l&&l.length){this.selector=l;if(!this.selector.parent().length){k.selector.appendTo($(document.body));JC.f.autoInit&&JC.f.autoInit(k.selector)}}else{if(!l||l.length===0){this.footers=this.bodys;this.bodys=this.headers;this.headers=this.selector;this.selector=undefined}}setTimeout(function(){g.ignoreClick=false},1);return this},offsetTop:function(k){typeof k!="undefined"&&(this._offsetTop=k);return this._offsetTop||0},offsetLeft:function(k){typeof k!="undefined"&&(this._offsetLeft=k);return this._offsetLeft||0},triggerSelector:function(k){typeof k!="undefined"&&(this._triggerSelector=k);return this._triggerSelector},addEvent:function(l,k){if(!(l&&k)){return}l&&(l=l.toLowerCase());if(!(l in this._events)){this._events[l]=[]}if(/\_default/i.test(l)){this._events[l].unshift(k)}else{this._events[l].push(k)}},getEvent:function(k){return this._events[k]},panelfocusbutton:function(){var k=g.focusButton;if(this.panel.is("[panelfocusbutton]")){k=JC.f.parseBool(this.panel.attr("panelfocusbutton"))}return k},panelclickclose:function(){var k=g.clickClose;if(this.panel.is("[panelclickclose]")){k=JC.f.parseBool(this.panel.attr("panelclickclose"))}return k},panelautoclose:function(){var k;if(this.panel.is("[panelautoclose]")){k=JC.f.parseBool(this.panel.attr("panelautoclose"))}return k},panelautoclosems:function(k){var l=g.autoCloseMs;if(this.panel.is("[panelautoclosems]")){l=parseInt(this.panel.attr("panelautoclosems"),10)}typeof k=="number"&&(l=k);return l},panelfixed:function(){var k=g.FIXED;if(this.panel.is("[panelfixed]")){k=JC.f.parseBool(this.panel.attr("panelfixed"))}return k}};function i(k){this._model=k;this._tpl=c;this._init()}i.prototype={_init:function(){if(!this._model.panel){if(this._model.selector){this._model.panel=this._model.selector}else{this._model.panel=$(this._tpl);this._model.panel.appendTo(document.body);JC.f.autoInit&&JC.f.autoInit(this._model.panel)}}this.getHeader();this.getBody();this.getFooter();return this},positionWith:function(m,q){if(!(m&&m.length)){return}this.getPanel().css({left:"-9999px",top:"-9999px",display:"block",position:"absolute"});var y=m.offset(),z=m.prop("offsetWidth"),o=m.prop("offsetHeight");var v=this.getPanel().prop("offsetWidth"),s=this.getPanel().prop("offsetHeight");var l=$(window).width(),n=$(window).height();var r=$(document).scrollTop(),p=$(document).scrollLeft();var u=y.left+p,t=y.top+o+1;if(typeof q!="undefined"){switch(q){case"top":t=y.top-s-1;u=y.left+z/2-v/2;break}}t+=this._model.offsetTop();u+=this._model.offsetLeft();var w=r+n-s,A=r;if(t>w){t=y.top-s-1}if(tx){u=p+l-v-1}if(u div.hd");if(typeof k!="undefined"){this._model.headers=k}if(typeof this._model.headers!="undefined"){if(!l.length){this.getPanel().find("div.UPContent > div.bd").before(l=$('
          弹出框
          '))}l.html(this._model.headers);this._model.headers=undefined}return l},getBody:function(k){var l=this.getPanel().find("div.UPContent > div.bd");if(typeof k!="undefined"){this._model.bodys=k}if(typeof this._model.bodys!="undefined"){l.html(this._model.bodys);this._model.bodys=undefined}return l},getFooter:function(k){var l=this.getPanel().find("div.UPContent > div.ft");if(typeof k!="undefined"){this._model.footers=k}if(typeof this._model.footers!="undefined"){if(!l.length){this.getPanel().find("div.UPContent > div.bd").after(l=$('
          '))}l.html(this._model.footers);this._model.footers=undefined}return l},center:function(){var o=this.getPanel(),y=o.width(),l=o.height(),z,x,q=$(window).width(),u=$(window).height(),n=$(document).scrollLeft(),m=$(document).scrollTop(),w,D=this,r=0;if(D._model.panelfixed()){o.css({left:"-9999px",top:"-9999px"}).show();if(u>l){r=(u-l)/2;r>200&&(r=200)}o.css({position:"fixed",left:"0px",right:"0px",margin:"auto",top:r});return}if(window.parent&&window.parent!=window){try{var k=window.parent,B=k.window.$,t=k.window,p=k.document,v=B(t),s=B(p);window.PANEL_WIN_ID="frame"+JC.f.ts();s.find("iframe").each(function(){var E=B(this),H=E.attr("src"),F=JC.f.relativePath(H,t.location.href).trim(),G=(location.href+"").trim();if(G.indexOf(F)>-1&&E.prop("contentWindow").PANEL_WIN_ID==window.PANEL_WIN_ID){w=E;return false}});if(w&&w.length){var C=d(f(w,B),e(v,s,B));q=C.width;u=C.height;m=C.rect.height-u;if(m>(C.viewport.maxY)){m=C.viewport.y+C.rect.y}}}catch(A){}}o.css({left:"-9999px",top:"-9999px"}).show();z=(q-y)/2+n;x=(u-l)/2+m;if((u-l-100)>300){x-=100}if((x+l-m)>u){x=m+u-l}if(x','
          ','
          ',' ',"
          ","
          "].join("");JC.hideAllPanel=function(k){$("div.UPanel").each(function(){var l=$(this),m=g.getInstance(l);if(!m){return}m.hide();k&&m.close()})};JC.hideAllPopup=function(k){$("body > div.UPanelPopup_identifer").each(function(){var l=$(this),m=g.getInstance(l);if(!m){return}m.hide();k&&m.close()})};$(document).delegate("div.UPanel, div.JCPanel","click",function(k){var m=$(this),n=$(k.target||k.srcElement),l;if(n&&n.length&&n.is("[eventtype]")){l=n.attr("eventtype");l&&m.data("PanelInstace")&&m.data("PanelInstace").trigger(l,n,k)}});$(document).delegate("div.UPanel, div.JCPanel","click",function(l){var k=$(this),m=g.getInstance(k);if(m&&m.isClickClose()){l.stopPropagation()}});$(document).on("click",function(k){if(g.ignoreClick){return}$("div.UPanel, div.JCPanel").each(function(){var l=$(this),m=g.getInstance(l);if(m&&m.isClickClose()&&m.layout()&&m.layout().is(":visible")){m.hide();m.close()}})});$(document).on("keyup",function(k){var l=k.keyCode;switch(l){case 27:JC.hideAllPanel(1);break}});var h={alert:null,confirm:null,msgbox:null,"dialog.alert":null,"dialog.confirm":null,"dialog.msgbox":null,panel:null,dialog:null};function d(m,n){!n&&(n=e());var o={width:0,height:0},l=0,k=0;if(m.yn.maxY){o.height=n.height}else{if(m.yn.y&&m.maxY>n.maxY){o.height=n.maxY-m.y}else{if(m.y>n.y&&m.maxYn.maxX){o.width=n.width}else{if(m.xn.x&&m.maxX>n.maxX){o.width=n.maxX-m.x}else{if(m.x>n.x&&m.maxX div.UPanelPopup_identifer").each(function(){var f=$(this),g=Panel.getInstance(f);if(!g){return}g.hide();g.close()});$("body > div.UPanel_TMP").remove()}else{e.selector().addClass("UPanelPopup_identifer");e.selector().data("PopupInstance",e)}},popup:function(e,i,h,g,f){if(!i){return}c.popupIdentifier();h&&(h=$(h));var e=e.replace(/\{msg\}/g,i).replace(/\{status\}/g,c.getStatusClass(g||""));var d=new JC.Panel(e);c.popupIdentifier(d);d.selector().data("popupSrc",h);c.fixWidth(i,d);f&&d.on("confirm",f);if(!h){d.center()}d.on("show_default",function(){if(h&&h.length){c.showEffect(d,h,function(){d.focusButton()});return false}});d.on("close_default",function(){if(h&&h.length){c.hideEffect(d,h,function(){d.selector().remove();d=null})}else{d.selector().remove()}return false});d.on("hide_default",function(){if(h&&h.length){c.hideEffect(d,h,function(){d.selector().hide()});return false}else{d.selector().hide()}});if(h&&h.length){d.selector().css({left:"-9999px",top:"-9999px"})}d.selector().css("z-index",window.ZINDEX_COUNT++);d.show();return d},hideEffect:function(e,g,f){g&&(g=$(g));if(!(g&&g.length)){f&&f(e);return}if(!(e&&e.selector)){return}var m=g.offset(),h=e.selector();var j=h[0];j.interval&&clearInterval(j.interval);j.defaultWidth&&h.width(j.defaultWidth);j.defaultHeight&&h.height(j.defaultHeight);var i=g.width(),d=h.height();j.defaultWidth=h.width();j.defaultHeight=h.height();var l=c.getLeft(m.left,i,h.width());var k=c.getTop(m.top,g.height(),d);k=k-d-c.yoffset;h.height(0);h.css({left:l+"px"});j.interval=JC.f.easyEffect(function(n,o){h.css({top:k+n+"px",height:d-n+"px"});if(g&&!g.is(":visible")){clearInterval(j.interval);f&&f(e)}if(d===n){h.hide()}o&&f&&f(e)},d)},showEffect:function(e,g,f){g&&(g=$(g));if(!(g&&g.length)){return}if(!(e&&e.selector)){return}var m=g.offset(),h=e.selector();var j=h[0];j.interval&&clearInterval(j.interval);j.defaultWidth&&h.width(j.defaultWidth);j.defaultHeight&&h.height(j.defaultHeight);var i=g.width(),d=h.height();j.defaultWidth=h.width();j.defaultHeight=h.height();var l=c.getLeft(m.left,i,h.width());var k=c.getTop(m.top,g.height(),d,c.xoffset);h.height(0);h.css({left:l+"px"});if(k>m.top){j.interval=JC.f.easyEffect(function(n,o){h.css({top:k-d-c.yoffset+"px",height:n+"px"});o&&f&&f(e)},d)}else{j.interval=JC.f.easyEffect(function(n,o){h.css({top:k-n-c.yoffset+"px",height:n+"px"});o&&f&&f(e)},d)}},onresize:function(d){if(!d.selector().is(":visible")){return}var g=d.selector(),e=g.data("popupSrc");if(!(e&&e.length)){d.center()}else{var h=e.offset();var m=h.top,p=e.height(),k=g.height(),o=0,f=h.left,i=e.width(),l=g.width(),j=0;var q=c.getLeft(f,i,l,j)+c.xoffset;var n=c.getTop(m,p,k,o)-k-c.yoffset;g.css({left:q+"px",top:n+"px"})}},getTop:function(i,g,d,f){var j=i,h=$(document).scrollTop(),e=$(window).height()-d;j-dd&&(i=d-2);i'+g+"
          ").appendTo("body"),d=e.width()+80;e.remove();d>c.maxWidth&&(d=c.maxWidth);d','
          ','
          ',"
          ",'
          ','
          {msg}
          ',"
          ","
          ","
          ","
          ","
          "].join(""),alert:['
          ','
          ','
          ',"
          ",'
          ','
          {msg}
          ',"
          ",'
          ',' ',"
          ","
          ","
          ","
          ","
          "].join(""),confirm:['
          ','
          ','
          ',"
          ",'
          ','
          {msg}
          ',"
          ",'
          ',' ',' ',"
          ","
          ","
          ","
          ","
          "].join("")}};$(window).on("resize",function(d){$("body > div.UPanelPopup_identifer").each(function(){var e=$(this);e.data("PopupInstance")&&c.onresize(e.data("PopupInstance"))})});return JC.Panel})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window));(function(b,a){b(["JC.Panel.default"],function(){var e=!!window.ActiveXObject&&!window.XMLHttpRequest;var c=window.Dialog=JC.Dialog=function(f,i,j,h){if(d.timeout){clearTimeout(d.timeout)}var g;if(g=JC.Panel.getInstance(f)){d.timeout=setTimeout(function(){g.show(0)},d.showMs);return g}if(!JC.Dialog.MULTI_MASK){d.dialogIdentifier()}g=new JC.Panel(f,i,j,h);d.dialogIdentifier(g);d.showMask();g.selector().css("z-index",window.ZINDEX_COUNT++);!g.selector().is("[panelclickclose]")&&g.selector().attr("panelclickclose",false);g.on("close_default",function(k,l){d.hideMask()});g.on("hide_default",function(k,l){d.hideMask()});g.on("show_default",function(k,l){d.showMask();setTimeout(function(){d.showMask();g.selector().css({"z-index":window.ZINDEX_COUNT,display:"block"});window.ZINDEX_COUNT+=2},1)});window.ZINDEX_COUNT++;d.timeout=setTimeout(function(){g.show(0)},d.showMs);return g};c.DISPLAY_LIST=[];JC.Dialog.MULTI_MASK=true;JC.Dialog.mask=function(f){!f&&d.showMask();f&&d.hideMask()};var d={dialogIdentifier:function(f){if(!f){d.hideMask();$("body > div.UPanelDialog_identifer").each(function(){var g=$(this),h=Panel.getInstance(g);if(!h){return}h.hide();h.close()});$("body > div.UPanel_TMP").remove()}else{f.selector().addClass("UPanelDialog_identifer");f.selector().data("DialogInstance",f);c.DISPLAY_LIST.push(f)}},hideMask:function(){var g,f;if(!JC.Dialog.MULTI_MASK){g=$("#UPanelMask");f=$("#UPanelMaskIfrmae");g.length&&g.hide();f.length&&f.hide();return}JC.f.safeTimeout(function(){g=$("#UPanelMask");f=$("#UPanelMaskIfrmae");var m,l=1,n,k;if(!(g.length||f.length)){return}for(var h=c.DISPLAY_LIST.length-1;h>=0;h--){var j=c.DISPLAY_LIST[h];if(j&&j.selector()&&j.selector().parent().length&&j.selector().is(":visible")&&j.selector().offset().left>=-10){m=j;break}}if(m){n=m.selector().css("z-index")||0;k=n-1;if(k>0){g.length&&g.css({"z-index":k});f.length&&f.css({"z-index":k})}else{g.length&&g.hide();f.length&&f.hide()}}else{g.length&&g.hide();f.length&&f.hide()}},null,"JC.Dialogasdfaweasdfase",1)},showMask:function(){var g=$("#UPanelMask"),f=$("#UPanelMaskIfrmae");if(!g.length){$(d.tpls.mask).appendTo("body");g=$("#UPanelMask"),f=$("#UPanelMaskIfrmae")}f.show();g.show();d.setMaskSizeForIe6();f.css("z-index",window.ZINDEX_COUNT++);g.css("z-index",window.ZINDEX_COUNT++)},timeout:null,showMs:10,setMaskSizeForIe6:function(){var h=$("#UPanelMask"),g=$("#UPanelMaskIfrmae");if(!(h.length&&g.length)){return}var f={position:"absolute",top:"0px",left:$(document).scrollLeft()+"px",height:$(document).height()+"px",width:$(window).width()+"px"};h.css(f);g.css(f)},tpls:{mask:['
          ',''].join("")}};$(window).on("resize scroll",function(f){$("body > div.UPanelDialog_identifer").each(function(){var g=$(this);if(g.data("DialogInstance")){if(!g.data("DialogInstance").selector().is(":visible")){return}if(f.type.toLowerCase()=="resize"){g.data("DialogInstance").center()}d.setMaskSizeForIe6()}})});return JC.Dialog})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window));(function(b,a){b(["JC.Dialog"],function(){JC.Dialog.msgbox=function(i,h,g,f){if(!i){return}var e=(JC.Dialog.msgbox.tpl||c.tpls.msgbox).replace(/\{msg\}/g,i).replace(/\{status\}/g,c.getStatusClass(h||""));var d=JC.Dialog(e);c.fixWidth(i,d);g&&d.on("close",g);setTimeout(function(){d.autoClose(f)},1);return d};JC.Dialog.msgbox.tpl;JC.Dialog.alert=function(h,g,f){if(!h){return}var e=(JC.Dialog.alert.tpl||c.tpls.alert).replace(/\{msg\}/g,h).replace(/\{status\}/g,c.getStatusClass(g||""));var d=JC.Dialog(e);c.fixWidth(h,d);f&&d.on("confirm",f);return d};JC.Dialog.alert.tpl;JC.Dialog.confirm=function(i,h,g,d){if(!i){return}var f=(JC.Dialog.confirm.tpl||c.tpls.confirm).replace(/\{msg\}/g,i).replace(/\{status\}/g,c.getStatusClass(h||""));var e=JC.Dialog(f);c.fixWidth(i,e);g&&e.on("confirm",g);d&&e.on("cancel",d);return e};JC.Dialog.confirm.tpl;var c={minWidth:180,maxWidth:500,getStatusClass:function(d){var e="UPanelSuccess";switch(d){case 0:e="UPanelSuccess";break;case 1:e="UPanelError";break;case 2:e="UPanelAlert";break}return e},fixWidth:function(g,f){var e=$('
          '+g+"
          ").appendTo("body"),d=e.width()+80;d>c.maxWidth&&(d=c.maxWidth);d','
          ','
          ',"
          ",'
          ','
          {msg}
          ',"
          ","
          ","
          ","
          ","
          "].join(""),alert:['
          ','
          ','
          ',"
          ",'
          ','
          {msg}
          ',"
          ",'
          ',' ',"
          ","
          ","
          ","
          ","
          "].join(""),confirm:['
          ','
          ','
          ',"
          ",'
          ','
          {msg}
          ',"
          ",'
          ',' ',' ',"
          ","
          ","
          ","
          ","
          "].join("")}};return JC.Dialog})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/Panel/index.php b/deploy/comps/Panel/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/Panel/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/Panel/nodejs_merge.js b/deploy/comps/Panel/nodejs_merge.js new file mode 100755 index 000000000..8e988a72f --- /dev/null +++ b/deploy/comps/Panel/nodejs_merge.js @@ -0,0 +1,30 @@ +var _fs = require('fs'); + +var _dir = __dirname + '/' + , _paths = [] + , _contents = [] + , _outputName = 'Panel.js' + ; + + _paths.push( _dir + 'Panel.default.js' ); + _paths.push( _dir + 'Panel.popup.js' ); + _paths.push( _dir + 'Dialog.js' ); + _paths.push( _dir + 'Dialog.popup.js' ); + +for( var i = 0, j = _paths.length; i < j; i++ ){ + if( ! _fs.existsSync( _paths[i] ) ) return; +} + +for( var i = 0, j = _paths.length; i < j; i++ ){ + _contents.push( _fs.readFileSync( _paths[i], 'utf8') ); +} + +_fs.writeFileSync( _dir + _outputName, _contents.join(';\n') ); + +for( var i = 0, j = _paths.length; i < j; i++ ){ + _fs.unlinkSync( _paths[i] ); +} + +console.log( 'merge done: ' + _outputName ); + + diff --git a/deploy/comps/Panel/res/default/images/cls.png b/deploy/comps/Panel/res/default/images/cls.png new file mode 100755 index 000000000..55e3c97f4 Binary files /dev/null and b/deploy/comps/Panel/res/default/images/cls.png differ diff --git a/deploy/comps/Panel/res/default/images/status.gif b/deploy/comps/Panel/res/default/images/status.gif new file mode 100755 index 000000000..18f29eda7 Binary files /dev/null and b/deploy/comps/Panel/res/default/images/status.gif differ diff --git a/deploy/comps/Panel/res/default/style.css b/deploy/comps/Panel/res/default/style.css new file mode 100755 index 000000000..bfb7ada29 --- /dev/null +++ b/deploy/comps/Panel/res/default/style.css @@ -0,0 +1 @@ +.UPanelMask,.UPanelMaskIframe{position:fixed;width:100%;height:100%;top:0;left:0;background:#000;z-index:40000;opacity:.35;filter:alpha(opacity=35)}.UPanelMaskIframe{opacity:0 !important;filter:alpha(opacity=0) !important}div.UPanel,div.UPanel *{font-family:sans-serif;font-size:14px;padding:0;margin:0}div.UPanel{position:absolute;border:1px solid #acacac;background:#fff;overflow:hidden;z-index:50000;left:-9999px;top:-9999px;zoom:1;box-shadow:0 0 3px #b3b3b3}div.UPanelDialog_identifer{border:1px solid #fff;box-shadow:0 0 3px #fff}div.UPanel select,div.UPanel input,div.UPanel button{cursor:pointer}div.UPanel .UButton{text-align:center;margin:5px 0 0}div.UPanel .UButton button{padding:0 4px;margin:0 4px}div.UPanel .UPContent{position:relative}div.UPanel .UPContent .hd{height:34px;line-height:34px;border-bottom:1px solid #e8e8e8;border-top:1px solid #fff;background:#fbfbfb;padding:0 10px;cursor:default}div.UPanel .UPContent .bd{padding:15px 15px 15px;word-break:break-all;word-wrap:break-word}div.UPanel .UPContent .ft{height:28px;line-height:28px;text-align:center;border-top:1px solid #e8e8e8;border-bottom:1px solid #fff;background:#fbfbfb;padding:0 10px;cursor:default}div.UPanel .UPContent span.close{position:absolute;top:10px;cursor:pointer;right:10px;width:15px;height:15px;background:url(images/cls.png) no-repeat}div.UPanelPopup{width:200px}div.UPanelPopup .bd{padding:10px 10px 10px !important;line-height:24px}div.UPanelPopup .UPopupContent{min-height:30px;height:auto !important;height:30px}div.UPanelPopup button.UIcon{padding:0 !important;margin:0 !important;border:0 !important;width:19px;height:19px;margin-right:12px !important;position:absolute;*top:10px;*left:10px;_top:10px;_left:0;margin-top:2px !important;*margin-top:0 !important}div.UPanelPopup div.UText{text-indent:28px}div.UPanelPopup div.UText button.UPlaceholder{float:left;width:28px;visibility:hidden;display:none}div.UPanelSuccess button.UIcon{background:#fff url('images/status.gif') no-repeat -29px 0 !important}div.UPanelError button.UIcon{background:#fff url('images/status.gif') no-repeat -0px 0 !important}div.UPanelAlert button.UIcon{background:#fff url('images/status.gif') no-repeat -58px 0 !important} \ No newline at end of file diff --git a/deploy/comps/Panel/res/default/style.html b/deploy/comps/Panel/res/default/style.html new file mode 100755 index 000000000..35098ce1d --- /dev/null +++ b/deploy/comps/Panel/res/default/style.html @@ -0,0 +1,213 @@ + + + + + 360 75 team + + + + + +
          +

          Panel 默认样式

          +
          +
          +
          +
          +

          panel 1

          +
          + +
          +
          +
          test title
          +
          test content
          +
          test content test content test content
          +
          test content test content test content test content test content test content test content test content test content
          +
          test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content
          +
          test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content test content
          +
          +
          + +
          + test footer +
          + + +
          +
          +
          + + + + +
          +
          +
          +
          +
          +
          +
          asdfasdfasdfasdfssdfa
          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          asdfasdfasdfasdfssdfasdfasdfasdfasdfsadfasdsadfasdfasdfasdfasdfasdfasdfsadfasdfasdfasdfasdf
          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
          +
          +
          + +
          +
          +
          +
          +
          +
          + + + + + +
          +
          +
          +
          +
          +
          +
          asdfasdfasdfasdfssdfa
          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          asdfasdfasdfasdfssdfasdfasdfasdfasdfsadfasdsadfasdfasdfasdfasdfasdfasdfsadfasdfasdfasdfasdf
          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
          +
          +
          + +
          +
          +
          +
          +
          +
          + + + + +
          +
          +
          +
          +
          +
          +
          asdfasdfasdfasdfssdfa
          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          asdfasdfasdfasdfssdfasdfasdfasdfasdfsadfasdsadfasdfasdfasdfasdfasdfasdfsadfasdfasdfasdfasdf
          +
          +
          + +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +
          一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
          +
          +
          + +
          +
          +
          +
          +
          +
          + + +
          + + + + + diff --git a/deploy/comps/Placeholder/Placeholder.js b/deploy/comps/Placeholder/Placeholder.js new file mode 100755 index 000000000..1a9de8697 --- /dev/null +++ b/deploy/comps/Placeholder/Placeholder.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){JC.Placeholder=d;JC.f.addAutoInit&&JC.f.addAutoInit(d);function d(h){h&&(h=$(h));if(d.isSupport){h&&h.is("[xplaceholder]")&&h.attr("placeholder",h.attr("xplaceholder"));return}if(d.getInstance(h)){return d.getInstance(h)}d.getInstance(h,this);this._model=new d.Model(h);this._view=new d.View(this._model);this._init();JC.log("Placeholder:",new Date().getTime())}d.getInstance=function(h,i){if(typeof h=="string"&&!/ div",d.Model._boxId));if(!h.length){return}h.each(function(){var i=$(this),j=i.data("CPHIns");if(!j){return}j.update()})};d.className="xplaceholder";d.isSupport="placeholder" in $('')[0];d.prototype={_beforeInit:function(){},_initHanlderEvent:function(){var h=this;h._model.selector().on("focus",function(i){h._view.hide()});h._model.selector().on("blur",function(i){h._view.show()});h._model.selector().on("placeholder_remove",function(i){h._model.placeholder().remove();d.Model._removeTm&&clearTimeout(d.Model._removeTm);d.Model._removeTm=setTimeout(function(){d.update()},1)});h.on("CPHUpdate",function(i){h._view.update()});h.on("CPHInitedPlaceholder",function(i){var j=h._model.placeholder();j.on("click",function(k){h._model.selector().trigger("focus");g(h._model.selector()[0],h._model.selector().val().length)});j.data("CPHIns",h)})},_inited:function(){var h=$(this);h.trigger("CPHUpdate")},update:function(){this._view.update()}};BaseMVC.buildModel(d);d.Model._instanceName="Placeholder";d.Model._boxId="XPlaceHolderBox";d.Model.prototype={init:function(){},className:function(){var h=this.attrProp("cphClassName")||d.className;return h},text:function(){var h=this.attrProp("xplaceholder")||this.attrProp("placeholder")||"";return h},placeholder:function(){if(!this._placeholder){this._placeholder=$(JC.f.printf('',this.className())).appendTo(this.placeholderBox());$(this).trigger("TriggerEvent",["CPHInitedPlaceholder"])}this._placeholder.html(this.text());return this._placeholder},placeholderBox:function(){var h=$("#"+d.Model._boxId);if(!(h&&h.length)){h=$(JC.f.printf('
          ',d.Model._boxId)).appendTo(document.body)}return h}};BaseMVC.buildView(d);d.View.prototype={init:function(){},update:function(){var h=this,j=h._model.selector().val().trim(),l=h._model.placeholder();if(j||!h.selector().is(":visible")){l.hide();return}var i=h._model.selector().offset(),k=h._model.selector().prop("offsetHeight"),m=l.prop("offsetHeight");l.css({left:i.left+"px",top:i.top+1+"px"});l.show()},hide:function(){var h=this;h._model.placeholder().hide()},show:function(){var h=this,i=h._model.selector().val().trim();if(i){return}this.update();h._model.placeholder().show()}};BaseMVC.build(d);$.event.special.placeholder_remove={remove:function(h){if(h.handler){h.handler()}}};$(window).on("resize",function(){d.update()});function g(h,p){if(h.setSelectionRange){h.focus();h.setSelectionRange(p,p)}else{if(h.createTextRange){var q=h.createTextRange();var k=p;var n=p;var j=0;var l=0;var r=h.value;for(var m=0;m=n&&m>=0;m--){var o=r.charAt(m);if(o!="\n"){l++}}q.moveStart("character",j);q.moveEnd("character",-l);q.select();h.focus()}}}var c=$.fn.show,e=$.fn.hide,f=$({});$.fn.show=function(){var i=c.apply(this,arguments),h=this;setTimeout(function(){f.trigger("show")},1);return i};$.fn.hide=function(){var i=e.apply(this,arguments),h=this;setTimeout(function(){f.trigger("hide")},1);return i};f.on("show hide",function(){f.data("timer")&&clearTimeout(f.data("timer"));f.data("timer",setTimeout(function(){d.update()},100))});$(document).ready(function(){var h=0;d.autoInit&&(h=d.init())});return JC.Placeholder})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/Placeholder/index.php b/deploy/comps/Placeholder/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/Placeholder/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/Placeholder/res/default/style.css b/deploy/comps/Placeholder/res/default/style.css new file mode 100755 index 000000000..0215d919a --- /dev/null +++ b/deploy/comps/Placeholder/res/default/style.css @@ -0,0 +1 @@ +.xplaceholder{color:#aaa !important;position:absolute;font:14px/1.5 arial,sans-serif;padding-left:5px;overflow:hidden;white-space:nowrap} \ No newline at end of file diff --git a/deploy/comps/Placeholder/res/default/style.html b/deploy/comps/Placeholder/res/default/style.html new file mode 100755 index 000000000..755fb4785 --- /dev/null +++ b/deploy/comps/Placeholder/res/default/style.html @@ -0,0 +1,28 @@ + + + + + JC Project - JQuery Components Library - suches + + + + +
          +
          +
          Placeholder 默认样式
          +
          + +
          +
          +
          + +
          +
          请输入内容
          +
          + + + diff --git a/deploy/comps/PopTips/PopTips.js b/deploy/comps/PopTips/PopTips.js new file mode 100755 index 000000000..066f186aa --- /dev/null +++ b/deploy/comps/PopTips/PopTips.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){JC.PopTips=c;function c(d){d&&(d=$(d));if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.getInstance=function(d,e){if(typeof d=="string"&&!/div",c.Model._boxId));if(!d.length){return}d.each(function(){var e=$(this),f=e.data("CPopTipsIns");if(!f){return}if(f._model.layout().is(":visible")&&f._model.layout().offset().left>=-200){f.update()}})},BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var d=this;d.on("CPopTipsUpdate",function(i){d._model.beforeShowCallback()&&d._model.beforeShowCallback().call(d,d.selector())});var h=null,e=null,f=null,g=null;if(d._model.triggerType()=="hover"){d._model.selector().on("mouseenter",function(){clearTimeout(f);clearTimeout(g);clearTimeout(h);clearTimeout(e);h=setTimeout(function(){d._view.update();d._view.show()},50)}).on("mouseleave",function(){clearTimeout(f);clearTimeout(g);clearTimeout(h);clearTimeout(e);e=setTimeout(function(){d._view.hide()},200)});d._model.layout().on("mouseenter",function(){clearTimeout(f);clearTimeout(g);clearTimeout(h);clearTimeout(e);f=setTimeout(function(){d._view.update();d._view.show()},50)}).on("mouseleave",function(){clearTimeout(f);clearTimeout(g);clearTimeout(h);clearTimeout(e);g=setTimeout(function(){d._view.hide()},200)})}d.on("update_layout",function(k,j){var i;try{i=$.parseJSON(j);if(i&&"errorno" in i&&!i.errorno&&i.data){j=i.data}}catch(l){}d._model.layout().find(".js_cpt_ajax_ph").html(j)});if(d._model.triggerType()=="click"){d._model.selector().on("click",function(i){if(d._model.layout().is(":visible")&&d._model.layout().offset().left>=-200){d._view.hide()}else{d._view.update();d._view.show()}})}},_inited:function(){var d=$(this);d.trigger("CPopTipsUpdate")},update:function(){this._view.update();return this}});c.Model._instanceName="PopTips";c.Model._boxId="CPTBox";JC.f.extendObject(c.Model.prototype,{init:function(){var d=this},baseTpl:'',theme:function(){var d=this.stringProp("theme");!d&&(d="yellow");return d},contents:function(){var d=this.attrProp("content")||this.attrProp("title");!d&&(d=this.selector().text());return d},htmlContents:function(){var e,d=JC.f.parentSelector(this.selector(),this.attrProp("htmlContent"));e=JC.f.scriptContent(d);return e},ajaxContent:function(){var d=this;this.is("[ajaxContent]")&&$.get(this.attrProp("ajaxContent")).done(function(e){d.trigger("update_layout",[e])})},arrowPosition:function(){var d=this.stringProp("arrowPosition");!d&&(d="left");return d},arrowPositionOffset:function(){var e=this.stringProp("arrowPositionOffset"),d=this.arrowPosition();if(d==="left"||d==="right"){if(e!="top"){e=""}}if(d==="top"||d==="bottom"){if(e!="left"||e!="right"){e=""}}return e},offsetXY:function(){var f=this.attrProp("offsetXY").split(","),e=parseInt(f[0],10)||0,d=parseInt(f[1],10)||0;return{x:e,y:d}},triggerType:function(){var d=this.stringProp("triggerType");!d&&(d="hover");return d},layout:function(){var d=this,e=d.baseTpl;if(!this._layout){if(d.htmlContents()){this._layout=$(JC.f.printf(e,d.theme(),d.arrowPosition(),d.htmlContents(),'style="width:'+d.layoutWidth()+";height:"+d.layoutHeight()+';"',d.layoutMinWidth(),d.layoutMinHeight())).appendTo(this.layoutBox())}else{if(this.is("[ajaxContent]")){this._layout=$(JC.f.printf(e,d.theme(),d.arrowPosition(),'
          加载中...
          ','style="width:'+d.layoutWidth()+";height:"+d.layoutHeight()+';"',d.layoutMinWidth(),d.layoutMinHeight())).appendTo(this.layoutBox());d.ajaxContent()}else{this._layout=$(JC.f.printf(e,d.theme(),d.arrowPosition(),d.contents(),'style="width:'+d.layoutWidth()+";height:"+d.layoutHeight()+';"',d.layoutMinWidth(),d.layoutMinHeight())).appendTo(this.layoutBox())}}this._layout.css({left:"-10000px"}).show()}return this._layout},layoutWidth:function(){var d=this.intProp("popTipsWidth");d&&(d=d+"px");!d&&(d="auto");return d},layoutMinWidth:function(){var d=this.intProp("popTipsMinWidth");d&&(d=d+"px");!d&&(d="auto");return d},layoutHeight:function(){var d=this.intProp("popTipsHeight");d&&(d=d+"px");!d&&(d="auto");return d},layoutMinHeight:function(){var d=this.intProp("popTipsMinHeight");d&&(d=d+"px");!d&&(d="auto");return d},layoutBox:function(){var d=$("#"+c.Model._boxId);if(!(d&&d.length)){d=$(JC.f.printf('
          ',c.Model._boxId)).appendTo(document.body)}return d},calcPosOffset:function(h,e,g,i){var j={},d=this,f=d.selector(),e={top:f.offset().top+d.offsetXY().y,left:f.offset().left+d.offsetXY().x,width:f.prop("offsetWidth"),height:f.prop("offsetHeight")},g=d.layout().outerWidth(),i=d.layout().outerHeight();switch(h){case"top":j={top:e.top+e.height+5,left:e.left+e.width/2-g/2};break;case"right":j={top:e.top+e.height/2-i/2,left:e.left-g-5};break;case"bottom":j={top:e.top-i-5,left:e.left+e.width/2-g/2};break;case"left":j={top:e.top+e.height/2-i/2,left:e.left+e.width+5};break}j.width=g;j.height=i;return j},offSet:function(d){this.layout().css({top:d.top+"px",left:d.left+"px"})},changePosition:function(f,g){var d=this,e;e=d.calcPosOffset(f);d.changeArrow(g);if((g==="top")||(g==="bottom")){d.offSet(e)}return e},changeArrow:function(e){var d=this;d.layout().find("div.CPT_arrow")[0].className="CPT_arrow CPT_arrow_"+e},setPosition:function(l,i){var u=this,o,e,h=$(window),d=h.outerHeight(),t=h.outerWidth(),j=h.scrollTop(),k=h.scrollLeft(),n=t+k,m=d+j,g=l.width+l.left,f=l.top+l.height,q=u.arrowPositionOffset(),s,r=JC.f.winSize(),p;q&&(q="_"+q);if(i==="bottom"){if(l.tops.maxViewportX){j="right";n=x._model.calcPosOffset(j,JC.f.cloneObject(i))}if(n.lefts.maxViewportY){j="bottom";n=x._model.calcPosOffset(j,JC.f.cloneObject(i))}x._model.setPosition(n,j);x._model.layout().data("CPopTipsIns",x)},show:function(){var d=this},hide:function(){var d=this;d._model.layout().css({left:"-10000px"});d._model.afterHideCallback()&&d._model.afterHideCallback().call(d,d.selector())}});$(document).ready(function(){var d=0;c.autoInit&&(d=c.init())});$(window).on("resize",function(){JC.f.safeTimeout(function(){c.update()},null,"PopTipsResize",20)});return JC.PopTips})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/PopTips/index.php b/deploy/comps/PopTips/index.php new file mode 100755 index 000000000..3785f0da2 --- /dev/null +++ b/deploy/comps/PopTips/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/PopTips/res/default/style.css b/deploy/comps/PopTips/res/default/style.css new file mode 100755 index 000000000..15e341ba1 --- /dev/null +++ b/deploy/comps/PopTips/res/default/style.css @@ -0,0 +1 @@ +.CPT{color:#db7c22;z-index:left_top1;font-size:12px;line-height:1.5;zoom:1}.CPT_shadow{background-color:rgba(229,169,left_top7,.15);FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#26e5a96b,endColorstr=#26e5a96b);border-radius:2px;padding:2px;zoom:1;_display:inline}.CPT_container{position:relative;background-color:#fffcef;border:1px solid #ffbb76;border-radius:2px;padding:5px 15px;zoom:1;_display:inline}.CPT:after,.CPT_shadow:after,.CPT_container:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}a.CPT_close{position:absolute;right:3px;top:3px;border:1px solid #ffc891;text-decoration:none;border-radius:3px;width:12px;height:12px;font-family:tahoma;color:#dd7e00;line-height:left_toppx;*line-height:12px;text-align:center;font-size:14px;background:#ffd7af;background:-webkit-gradient(linear,left top,left bottom,from(#fff0e1),to(#ffe7cd));background:-moz-linear-gradient(top,#fff0e1,#ffe7cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0E1',endColorstr='#FFE7CD');background:-o-linear-gradient(top,#fff0e1,#ffe7cd);background:linear-gradient(top,#fff0e1,#ffe7cd);overflow:hidden}a.CPT_close:hover{border:1px solid #ffb24c;text-decoration:none;color:#dd7e00;background:#ffd7af;background:-webkit-gradient(linear,left top,left bottom,from(#ffe5ca),to(#ffcc98));background:-moz-linear-gradient(top,#ffe5ca,#ffcc98);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFE5CA',endColorstr='#FFCC98');background:-o-linear-gradient(top,#ffe5ca,#ffcc98);background:linear-gradient(top,#ffe5ca,#ffcc98)}.CPT_arrow{position:absolute;z-index:left_top;*zoom:1}.CPT_arrow em,.CPT_arrow span{position:absolute;*zoom:1;width:0;height:0;border-color:rgba(255,255,255,0);border-color:transparent\0;*border-color:transparent;_border-color:tomato;_filter:chroma(color=tomato);border-style:solid;overflow:hidden;top:0;left:0}.CPT_arrow_left_top{left:-6px;top:left_toppx}.CPT_arrow_left_top em{top:0;left:-1px;border-right-color:#ffbb76;border-width:6px 6px 6px 0}.CPT_arrow_left_top span{border-right-color:#fffcef;border-width:6px 6px 6px 0}.CPT_arrow_left{left:-6px;top:50%}.CPT_arrow_left em{top:-6px;left:-1px;border-right-color:#ffbb76;border-width:6px 6px 6px 0}.CPT_arrow_left span{top:-6px;border-right-color:#fffcef;border-width:6px 6px 6px 0}.CPT_arrow_right_top{top:left_toppx;right:0}.CPT_arrow_right_top em{top:0;left:1px;border-left-color:#ffbb76;border-width:6px 0 6px 6px}.CPT_arrow_right_top span{border-left-color:#fffcef;border-width:6px 0 6px 6px}.CPT_arrow_right{top:50%;right:0}.CPT_arrow_right em{top:-6px;left:1px;border-left-color:#ffbb76;border-width:6px 0 6px 6px}.CPT_arrow_right span{top:-6px;border-left-color:#fffcef;border-width:6px 0 6px 6px}.CPT_arrow_top_left em,.CPT_arrow_top em,.CPT_arrow_top_right em{border-width:0 6px 6px;border-bottom-color:#ffbb76;top:-1px;left:0}.CPT_arrow_top_left span,.CPT_arrow_top span,.CPT_arrow_top_right span{border-width:0 6px 6px;border-bottom-color:#fffcef}.CPT_arrow_top_left{left:14px;top:-6px}.CPT_arrow_top_right{right:28px;top:-6px}.CPT_arrow_top{left:50%;top:-6px}.CPT_arrow_top em,.CPT_arrow_top span{left:-6px}.CPT_arrow_bottom_right em,.CPT_arrow_bottom em,.CPT_arrow_bottom_left em{border-width:6px 6px 0;border-top-color:#ffbb76;top:1px;left:0}.CPT_arrow_bottom_right span,.CPT_arrow_bottom span,.CPT_arrow_bottom_left span{border-width:6px 6px 0;border-top-color:#fffcef}.CPT_arrow_bottom_right{right:28px;bottom:0}.CPT_arrow_bottom{left:50%;bottom:0}.CPT_arrow_bottom_left{left:14px;bottom:0}.CPT_arrow_bottom em,.CPT_arrow_bottom span{left:-6px}:root .CPT_shadow{FILTER:none\9}.CPT_blue{color:#4d4d4d}.CPT_blue .CPT_shadow{background-color:rgba(0,0,0,.05);FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0c000000,endColorstr=#0c000000)}.CPT_blue .CPT_container{background-color:#f8fcff;border:1px solid #b9c8d3}.CPT_blue .CPT_arrow_left_top em,.CPT_blue .CPT_arrow_left em{border-right-color:#b9c8d3}.CPT_blue .CPT_arrow_top_left em,.CPT_blue .CPT_arrow_top em,.CPT_blue .CPT_arrow_top_right em{border-bottom-color:#b9c8d3}.CPT_blue .CPT_arrow_right_top em,.CPT_blue .CPT_arrow_right em{border-left-color:#b9c8d3}.CPT_blue .CPT_arrow_bottom_right em,.CPT_blue .CPT_arrow_bottom em,.CPT_blue .CPT_arrow_bottom_left em{border-top-color:#b9c8d3}.CPT_blue .CPT_arrow_left_top span,.CPT_blue .CPT_arrow_left span{border-right-color:#f8fcff}.CPT_blue .CPT_arrow_top_left span,.CPT_blue .CPT_arrow_top span,.CPT_blue .CPT_arrow_top_right span{border-bottom-color:#f8fcff}.CPT_blue .CPT_arrow_right_top span,.CPT_blue .CPT_arrow_right span{border-left-color:#f8fcff}.CPT_blue .CPT_arrow_bottom_right span,.CPT_blue .CPT_arrow_bottom span,.CPT_blue .CPT_arrow_bottom_left span{border-top-color:#f8fcff}.CPT_white{color:#333}.CPT_white .CPT_shadow{background-color:rgba(0,0,0,.05);FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0c000000,endColorstr=#0c000000)}.CPT_white .CPT_container{background-color:#fff;border:1px solid #b1b1b1}.CPT_white .CPT_arrow_left_top em,.CPT_white .CPT_arrow_left em{border-right-color:#b1b1b1}.CPT_white .CPT_arrow_top_left em,.CPT_white .CPT_arrow_top em,.CPT_white .CPT_arrow_top_right em{border-bottom-color:#b1b1b1}.CPT_white .CPT_arrow_right_top em,.CPT_white .CPT_arrow_right em{border-left-color:#b1b1b1}.CPT_white .CPT_arrow_bottom_right em,.CPT_white .CPT_arrow_bottom em,.CPT_white .CPT_arrow_bottom_left em{border-top-color:#b1b1b1}.CPT_white .CPT_arrow_left_top span,.CPT_white .CPT_arrow_left span{border-right-color:#fff}.CPT_white .CPT_arrow_top_left span,.CPT_white .CPT_arrow_top span,.CPT_white .CPT_arrow_top_right span{border-bottom-color:#fff}.CPT_white .CPT_arrow_right_top span,.CPT_white .CPT_arrow_right span{border-left-color:#fff}.CPT_white .CPT_arrow_bottom_right span,.CPT_white .CPT_arrow_bottom span,.CPT_white .CPT_arrow_bottom_left span{border-top-color:#fff}.CPT_green{color:#6fbd00}.CPT_green .CPT_shadow{background-color:rgba(0,0,0,.05);FILTER:progid:DXImageTransform.Microsoft.Gradient(startColorstr=#0c000000,endColorstr=#0c000000)}.CPT_green .CPT_container{background-color:#f2fbea;border:1px solid #adde7b}.CPT_green .CPT_arrow_left_top em,.CPT_green .CPT_arrow_left em{border-right-color:#adde7b}.CPT_green .CPT_arrow_top_left em,.CPT_green .CPT_arrow_top em,.CPT_green .CPT_arrow_top_right em{border-bottom-color:#adde7b}.CPT_green .CPT_arrow_right_top em,.CPT_green .CPT_arrow_right em{border-left-color:#adde7b}.CPT_green .CPT_arrow_bottom_right em,.CPT_green .CPT_arrow_bottom em,.CPT_green .CPT_arrow_bottom_left em{border-top-color:#adde7b}.CPT_green .CPT_arrow_left_top span,.CPT_green .CPT_arrow_left span{border-right-color:#e8f8db}.CPT_green .CPT_arrow_top_left span,.CPT_green .CPT_arrow_top span,.CPT_green .CPT_arrow_top_right span{border-bottom-color:#e8f8db}.CPT_green .CPT_arrow_right_top span,.CPT_green .CPT_arrow_right span{border-left-color:#e8f8db}.CPT_green .CPT_arrow_bottom_right span,.CPT_green .CPT_arrow_bottom span,.CPT_green .CPT_arrow_bottom_left span{border-top-color:#e8f8db} \ No newline at end of file diff --git a/deploy/comps/PopTips/res/default/style.html b/deploy/comps/PopTips/res/default/style.html new file mode 100755 index 000000000..56e6fa2c3 --- /dev/null +++ b/deploy/comps/PopTips/res/default/style.html @@ -0,0 +1,96 @@ + + + + +Open JQuery Components Library - suches + + + + +

          样式示例

          + +
          +
          yellow
          +
          +
          1.这个tip本来显示在右边
          2.但是右边会溢出
          3.可是左边也溢出了
          4.悲剧的是上边也溢出了
          +
          + +
          blue
          +
          +
          1.这个tip本来显示在右边
          2.但是右边会溢出
          3.可是左边也溢出了
          4.悲剧的是上边也溢出了
          +
          + +
          white
          +
          +
          1.这个tip本来显示在右边
          2.但是右边会溢出
          3.可是左边也溢出了
          4.悲剧的是上边也溢出了
          +
          + +
          green
          +
          +
          这个tips本来应该显示在下方
          xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          +
          + + +
          + +
          +
          +

          位置示例

          +
          +
          左上角
          +
          +
          CPT_arrow_left_top


          +
          +
          右上角
          +
          +
          CPT_arrow_right_top


          +
          +
          上居左
          +
          +
          CPT_arrow_top_left


          +
          +
          上居右
          +
          +
          CPT_arrow_top_right


          +
          +
          下居左
          +
          +
          CPT_arrow_7bottom_left


          +
          +
          下居右
          +
          +
          CPT_arrow_bottom_right


          +
          +
          + + + + diff --git a/deploy/comps/ServerSort/ServerSort.js b/deploy/comps/ServerSort/ServerSort.js new file mode 100755 index 000000000..f93f63213 --- /dev/null +++ b/deploy/comps/ServerSort/ServerSort.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){var e=$(document),d=$(window);JC.ServerSort=c;function c(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,c)){return JC.BaseMVC.getInstance(f,c)}JC.BaseMVC.getInstance(f,c,this);this._model=new c.Model(f);this._view=new c.View(this._model);this._init()}c.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.hasClass("js_compServerSort")){g.push(new c(f))}else{f.find("div.js_compServerSort, tr.js_compServerSort").each(function(){g.push(new c(this))})}}return g};JC.BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var f=this;if(!(f._model.items()&&f._model.items().length)){return}f.on("inited",function(){f.trigger("UPDATE_LAYOUT")});f._model.items().on("click",function(i){i.preventDefault();var h=$(this),j=JC.f.getUrlParam(f._model.sortName()),k=JC.f.getUrlParam(f._model.typeName()),l=h.attr("sortName"),m=h.attr("sortType"),g;g=k;if(l==f._model.defaultSortName()){if(g){m=f._model.otherSortType(g)}else{m=f._model.otherSortType(f._model.defaultType())}}else{m=f._model.defaultType()}f.trigger("UPDATE",[l,m,j,k])});f.on("UPDATE",function(g,n,k,o,l){var j=f._model.url(),m={},i=f._model.resetUrlParams(),h;m[f._model.sortName()]=n;m[f._model.typeName()]=k;j=JC.f.addUrlParams(j,m);if(i&&i.length){$.each(i,function(q,p){if(!p){return}if(JC.f.hasUrlParam(j,p)){h={};h[p]=1;j=JC.f.addUrlParams(j,h)}})}f._model.urlFilter()&&(j=f._model.urlFilter()(j));location.href=j});f.on("UPDATE_LAYOUT",function(h){var k=f._model.defaultSortName(),i=f._model.defaultType(),g=JC.f.getUrlParam(f._model.typeName())||i,j=f._model.items();if(!(j&&j.length)){return}$.each(j,function(n,m){m=$(m);var o=m.attr("sortName"),l;if(o==k){l=[f._model.classEnum()[f._model.typeIndexAt(f._model.otherSortType(g))],f._model.curClassEnum()[f._model.typeIndexAt(f._model.otherSortType(g))]].join(" ")}else{l=f._model.classEnum()[f._model.typeIndexAt(i)]}if(l){m.removeClass(f._model.classEnum().concat(f._model.curClassEnum()).join(" "));m.addClass(l)}})})},_inited:function(){this.trigger("inited")}});c.Model._instanceName="JCServerSort";JC.f.extendObject(c.Model.prototype,{init:function(){},urlFilter:function(){return this.callbackProp("cssUrlFilter")},typeIndexAt:function(f){var g=0;$.each(this.typeEnum(),function(i,h){if(h===f){g=i;return false}});return g},resetUrlParams:function(){if(!this._resetUrlParams){this._resetUrlParams=(this.attrProp("cssResetUrlParams")||"page").replace(/[\s]+/g,"");this._resetUrlParams&&(this._resetUrlParams=this._resetUrlParams.split(","))}return this._resetUrlParams},defaultType:function(){return this.attrProp("cssDefaultType")||this.typeEnum()[0]},otherSortType:function(f){var g;if(f){$.each(this.typeEnum(),function(i,h){if(f!=h){g=h;return false}})}g=g||this.typeEnum()[0];return g},defaultSortName:function(){if(typeof this._defalutSortName=="undefined"){this._defalutSortName=this.items().first().attr("sortName");this.is("[cssDefaultSortName]")&&(this._defalutSortName=this.attrProp("cssDefaultSortName")||this._defalutSortName);this._defalutSortName=JC.f.getUrlParam(this.sortName())||this._defalutSortName}return this._defalutSortName},items:function(){if(typeof this._items=="undefined"){var f=this.attrProp("cssItems")||"|a[sortName]";this._items=JC.f.parentSelector(this.selector(),f)||null}return this._items},url:function(){return JC.f.urlDetect(this.attrProp("cssUrl")||"URL")},sortName:function(){return this.attrProp("cssSortName")||"sortby"},typeName:function(){return this.attrProp("cssTypeName")||"sorttype"},typeEnum:function(){if(!this._typeEnum){this._typeEnum=(this.attrProp("cssTypeEnum")||"desc,asc").replace(/[\s]+/g,"").split(",")}return this._typeEnum},classEnum:function(){if(!this._classEnum){this._classEnum=(this.attrProp("cssClassEnum")||"js_cssDesc,js_cssAsc").replace(/[\s]+/g,"").split(",")}return this._classEnum},curClassEnum:function(){if(!this._curClassEnum){this._curClassEnum=(this.attrProp("cssCurClassEnum")||"js_cssDesc_cur,js_cssAsc_cur").replace(/[\s]+/g,"").split(",")}return this._curClassEnum}});JC.f.extendObject(c.View.prototype,{init:function(){}});e.ready(function(){c.autoInit&&c.init()});return JC.ServerSort})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/ServerSort/index.php b/deploy/comps/ServerSort/index.php new file mode 100755 index 000000000..3ba30b348 --- /dev/null +++ b/deploy/comps/ServerSort/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/ServerSort/res/default/images/down.png b/deploy/comps/ServerSort/res/default/images/down.png new file mode 100755 index 000000000..e0138d60e Binary files /dev/null and b/deploy/comps/ServerSort/res/default/images/down.png differ diff --git a/deploy/comps/ServerSort/res/default/images/down_red.png b/deploy/comps/ServerSort/res/default/images/down_red.png new file mode 100755 index 000000000..dad42397e Binary files /dev/null and b/deploy/comps/ServerSort/res/default/images/down_red.png differ diff --git a/deploy/comps/ServerSort/res/default/images/up.png b/deploy/comps/ServerSort/res/default/images/up.png new file mode 100755 index 000000000..8c18ac3b1 Binary files /dev/null and b/deploy/comps/ServerSort/res/default/images/up.png differ diff --git a/deploy/comps/ServerSort/res/default/images/up_red.png b/deploy/comps/ServerSort/res/default/images/up_red.png new file mode 100755 index 000000000..d1ceea727 Binary files /dev/null and b/deploy/comps/ServerSort/res/default/images/up_red.png differ diff --git a/deploy/comps/ServerSort/res/default/style.css b/deploy/comps/ServerSort/res/default/style.css new file mode 100755 index 000000000..8203536bf --- /dev/null +++ b/deploy/comps/ServerSort/res/default/style.css @@ -0,0 +1 @@ +.js_compServerSort .js_cssDesc,.js_compServerSort .js_cssAsc,.js_compServerSort .js_cssDesc_cur,.js_compServerSort .js_cssAsc_cur{font:12px/1.5 Tahoma,Helvetica,Arial,'宋体',sans-serif;outline:0;color:green;vertical-align:middle;padding-right:10px !important}.js_compServerSort .js_cssDesc{background:transparent url(./images/down.png) no-repeat right 4px}.js_compServerSort .js_cssAsc{background:transparent url(./images/up.png) no-repeat right 4px}.js_compServerSort .js_cssDesc_cur{background:transparent url(./images/down_red.png) no-repeat right 4px}.js_compServerSort .js_cssAsc_cur{background:transparent url(./images/up_red.png) no-repeat right 4px} \ No newline at end of file diff --git a/deploy/comps/ServerSort/res/index.php b/deploy/comps/ServerSort/res/index.php new file mode 100755 index 000000000..27c70390a --- /dev/null +++ b/deploy/comps/ServerSort/res/index.php @@ -0,0 +1,4 @@ + diff --git a/deploy/comps/Slider/Slider.js b/deploy/comps/Slider/Slider.js new file mode 100755 index 000000000..a308735fd --- /dev/null +++ b/deploy/comps/Slider/Slider.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.common"],function(){window.Slider=JC.Slider=e;function e(g){g&&(g=$(g));if(e.getInstance(g)){return e.getInstance(g)}e.getInstance(g,this);JC.log("Slider constructor",new Date().getTime());this._model=new f(g);switch(this._model.direction()){case"vertical":this._view=new c(this._model,this);break;default:this._view=new d(this._model,this);break}this._init()}e.prototype={_init:function(){var g=this;g._initControl();g.on("cleartinterval",function(){g._model.clearInterval();g._view.setPagePosition()});g.on("cleartimeout",function(){g._model.clearTimeout()});g._initAutoMove();g._model.initedcb()&&g.on("inited",g._model.initedcb());g.trigger("inited");return this},on:function(h,g){$(this).on(h,g);return this},trigger:function(g){$(this).trigger(g);return this},move:function(g){this._view.move(g);return this},moveTo:function(g){this._view.moveTo(g);return this},totalpage:function(){return this._model.totalpage()},pointer:function(){return this._model.pointer()},page:function(g){return this._model.page(g)},layout:function(){return this._model.layout()},find:function(g){return this._model.layout().find(g)},_initControl:function(){switch(this._model.direction()){case"vertical":this._initVerticalControl();break;default:this._initHorizontalControl();break}},_initHorizontalControl:function(){var g=this;g._model.leftbutton()&&g._model.leftbutton().on("click",function(h){g.trigger("cleartimeout");g.trigger("movetoleft");g._view.move(1)}).on("mouseenter",function(){g.trigger("controlover")}).on("mouseleave",function(){g.trigger("controlout")});g._model.rightbutton()&&g._model.rightbutton().on("click",function(h){g.trigger("cleartimeout");g.trigger("movetoright");g._view.move()}).on("mouseenter",function(){g.trigger("controlover")}).on("mouseleave",function(){g.trigger("controlout")})},_initVerticalControl:function(){var g=this},_initAutoMove:function(){var g=this;if(!g._model.automove()){return}g.on("beforemove",function(h,j,i){g.trigger("cleartimeout")});g.on("movedone",function(h,j,i){if(g._model.controlover()){return}g.trigger("automove")});g._model.layout().on("mouseenter",function(h){g.trigger("cleartimeout");g.trigger("mouseenter")});g._model.layout().on("mouseleave",function(h){g.trigger("cleartimeout");g.trigger("mouseleave");g._view.setPagePosition();g.trigger("automove")});g.on("controlover",function(){g.trigger("cleartimeout");g._model.controlover(true)});g.on("controlout",function(){g.trigger("automove");g._model.controlover(false)});g.on("movetoleft",function(){g._model.moveDirection(false)});g.on("movetoright",function(){g._model.moveDirection(true)});$(g).on("automove",function(){g._model.timeout(setTimeout(function(){g._view.moveTo(g._model.automoveNewPointer())},g._model.automovems()))});g.trigger("automove");return this}};e.autoInit=true;e.init=function(h){var g=[];h&&(h=$(h));if(h&&h.length){if(e.isSlider(h)){if(e.getInstance(h)){return[e.getInstance(h)]}g.push(new e(h))}else{h.find("div.js_autoSlider, dl.js_autoSlider, ul.js_autoSlider, ol.js_autoSlider").each(function(){if(e.isSlider(this)){if(e.getInstance($(this))){g.push(e.getInstance($(this)));return}g.push(new e($(this)))}})}}return g};e.getInstance=function(g,h){h&&g&&$(g).data("SliderIns",h);return g?$(g).data("SliderIns"):null};e.isSlider=function(g){g&&(g=$(g));return g&&(g.is("[sliderwidth]")||g.is("[sliderheight]"))};function f(g){this._layout=g;this._moveDirection=true;this._interval;this._timeout;this._init()}f.prototype={_init:function(){this.subitems();this.totalpage();JC.log(JC.f.printf("w:{0}, h:{1}, iw:{2}, ih:{3}, dr:{4}, si:{6}, hi:{5}, totalpage:{7}",this.width(),this.height(),this.itemwidth(),this.itemheight(),this.direction(),this.howmanyitem(),this.subitems().length,this.totalpage()));return this},layout:function(){return this._layout},leftbutton:function(){return this._layout.is("[sliderleft]")?$(this._layout.attr("sliderleft")):null},rightbutton:function(){return this._layout.is("[sliderright]")?$(this._layout.attr("sliderright")):null},direction:function(){return this._layout.attr("sliderdirection").toLowerCase()||"horizontal"},moveDirection:function(g){typeof g!="undefined"&&(this._moveDirection=g);JC.log("moveDirection",this._moveDirection);return this._moveDirection},howmanyitem:function(){return parseInt(this._layout.attr("sliderhowmanyitem"),10)||1},width:function(){return parseInt(this._layout.attr("sliderwidth"),10)||800},height:function(){return parseInt(this._layout.attr("sliderheight"),10)||230},itemwidth:function(){return parseInt(this._layout.attr("slideritemwidth"),10)||160},itemheight:function(){return parseInt(this._layout.attr("slideritemheight"),10)||230},loop:function(){return JC.f.parseBool(this._layout.attr("sliderloop"))},stepms:function(){return parseInt(this._layout.attr("sliderstepms"),10)||10},durationms:function(){return parseInt(this._layout.attr("sliderdurationms"),10)||300},automovems:function(){return parseInt(this._layout.attr("sliderautomovems"),10)||2000},automove:function(){return JC.f.parseBool(this._layout.attr("sliderautomove"))},defaultpage:function(){return parseInt(this._layout.attr("sliderdefaultpage"),10)||0},subitems:function(){if(this._layout.is("[slidersubitems]")){this._subitems=this._layout.find(this._layout.attr("slidersubitems"))}else{this._subitems=this._layout.children()}return this._subitems},totalpage:function(){this.subitems();if(this.howmanyitem()>1){this._totalpage=Math.ceil(this._subitems.length/this.howmanyitem())}else{this._totalpage=this._subitems.length}return this._totalpage},page:function(k){this.subitems();!k&&(k=0);k<0&&(k=0);k>=this.totalpage()&&(k=this.totalpage()-1);k*=this.howmanyitem();var j=[];for(var g=k,h=0;h=this.totalpage()&&(h=0)}else{h<0&&(h=0);h>=this.totalpage()&&(h=this.totalpage()-1)}return h},automoveNewPointer:function(){var g=this.pointer();if(this.moveDirection()){g++}else{g--}if(this.loop()){if(g>=this.totalpage()){g=0}else{if(g<0){g=this.totalpage()-1}}}else{if(g>=this.totalpage()){g=this.totalpage()-2;this.moveDirection(false)}else{if(g<0){g=1;this.moveDirection(true)}}}return g},interval:function(g){typeof g!="undefined"&&(this._interval=g);return this._interval},clearInterval:function(){this.interval()&&clearInterval(this.interval())},timeout:function(g){typeof g!="undefined"&&(this._timeout=g);return this._timeout},clearTimeout:function(){this.timeout()&&clearTimeout(this.timeout())},controlover:function(g){typeof g!="undefined"&&(this._controlover=g);return this._controlover},initedcb:function(){this._layout.is("[sliderinitedcb]")&&window[this._layout.attr("sliderinitedcb")]&&(this._initedcb=window[this._layout.attr("sliderinitedcb")]);return this._initedcb}};function d(g,h){this._model=g;this._slider=h;this._itemspace=(this._model.width()-Math.floor(this._model.width()/this._model.itemwidth())*this._model.itemwidth())/(this._model.totalpage()-1);this._itemspace=parseInt(this._itemspace);this._init()}d.prototype={_init:function(){this.setPagePosition(this._model.pointer());return this},move:function(i){var g=this;i=!!i;JC.log("HorizontalView move, is backwrad",i,this._model.pointer());var h=this._model.newpointer(i);JC.log(JC.f.printf("is backwrad: {0}, pointer:{1}, new pointer:{2}",i,this._model.pointer(),h));this.moveTo(h)},moveTo:function(j){var g=this;if(!this._model.loop()){if(j<=this._model.pointer()&&this._model.pointer()===0){$(this._slider).trigger("outmin");return}if(j>=this._model.pointer()&&this._model.pointer()>=this._model.totalpage()-1){$(this._slider).trigger("outmax");return}}j=this._model.fixpointer(j);var l=this._model.pointer();if(j===l){return}var k=this._model.page(l),i=this._model.page(j);var h=k.concat(i);this._setNewPagePosition(k,i,l,j);g._model.pointer(j)},_setNewPagePosition:function(n,j,m,l){var h=this,g,i=n.concat(j),k;$(this._slider).trigger("cleartinterval");if(m diff --git a/deploy/comps/Slider/res/hslider/images/scroll.png b/deploy/comps/Slider/res/hslider/images/scroll.png new file mode 100755 index 000000000..1f1f904c7 Binary files /dev/null and b/deploy/comps/Slider/res/hslider/images/scroll.png differ diff --git a/deploy/comps/Slider/res/hslider/style.css b/deploy/comps/Slider/res/hslider/style.css new file mode 100755 index 000000000..a19b98757 --- /dev/null +++ b/deploy/comps/Slider/res/hslider/style.css @@ -0,0 +1 @@ +.clearfix{zoom:1}.clearfix:after{content:".";display:block;visibility:hidden;height:0;clear:both}.hslide_wra,.hslide_wra *{margin:0;padding:0}.hslide_wra img{border:0}.hslide_wra{border-collapse:collapse}.hslide_wra td{vertical-align:middle}.hslide_wra .hslide_left a,.hslide_wra .hslide_right a{background:url(images/scroll.png) no-repeat scroll -30px 0 transparent;width:30px;height:50px;display:block;overflow:hidden;text-indent:-9999px}.hslide_wra .hslide_right a{background-position:0 0}.hslide_wra .hslide_left a:hover{background-position:-95px 0}.hslide_wra .hslide_right a:hover{background-position:-60px 0}.hslide_wra .hslide_list{overflow:hidden;position:relative}.hslide_wra .hslide_list dd{position:absolute} \ No newline at end of file diff --git a/deploy/comps/Slider/res/hslider/style.html b/deploy/comps/Slider/res/hslider/style.html new file mode 100755 index 000000000..f3a00fa7e --- /dev/null +++ b/deploy/comps/Slider/res/hslider/style.html @@ -0,0 +1,155 @@ + + + + + JC Project - JQuery Components Library - suches + + + + + + + + + + +
          + 左边滚动 + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          + + + 立春 + + +
          +
          +
          + 右边滚动 +
          + + + diff --git a/deploy/comps/StepControl/StepControl.js b/deploy/comps/StepControl/StepControl.js new file mode 100755 index 000000000..38abbc553 --- /dev/null +++ b/deploy/comps/StepControl/StepControl.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC","JC.Valid"],function(){var e=$(document),d=$(window);JC.StepControl=c;function c(f){f&&(f=$(f));if(JC.BaseMVC.getInstance(f,c)){return JC.BaseMVC.getInstance(f,c)}JC.BaseMVC.getInstance(f,c,this);this._model=new c.Model(f);this._view=new c.View(this._model);this._init();JC.log(c.Model._instanceName,"all inited",new Date().getTime())}c.init=function(f){var g=[];f=$(f||document);if(f.length){if(f.hasClass("js_compStepControl")){g.push(new c(f))}else{f.find("div.js_compStepControl").each(function(){g.push(new c(this))})}}return g};JC.BaseMVC.build(c);JC.f.extendObject(c.prototype,{_beforeInit:function(){},_initHanlderEvent:function(){var f=this;f.on("inited",function(){f.trigger("show_index");f._model.cscInitedCallback()&&f._model.cscInitedCallback().call(f,f.selector())});f._model.cscItems().each(function(h,g){g=$(g);g.delegate(".js_cscNext","click",function(){var i=$(this);f.trigger("next_index",[g,i])});g.delegate(".js_cscPrev","click",function(){var i=$(this);f.trigger("prev_index",[g,i])})});f.on("prev_index",function(h,i,g){JC.log("prev_index",JC.f.ts());var k=f._model.cscValidCallback(g)||f._model.cscValidCallback(i),l,j;j=f._model.cscIndex()-1;if(j>=0){f.trigger("show_index",[f._model.cscIndex(j)])}});f.on("next_index",function(h,j,g){if(!(j)){return}JC.log("next_index",JC.f.ts());var l=f._model.cscValidCallback(g)||f._model.cscValidCallback(j),m,k,i;if(g&&(g.attr("type").toLowerCase()=="button"||g.attr("type").toLowerCase()=="input")){if(l){m=l().call(f,g,j)}else{m=JC.Valid(j)}}else{m=true}JC.log("_canNext",m,JC.f.ts());if(!m){return}k=f._model.cscIndex()+1;JC.log(k,f._model.maxIndex(),f._model.cscIndex());if(k<=f._model.maxIndex()){f.trigger("show_index",[f._model.cscIndex(k)])}});f.on("show_index",function(h,g){var j=f._model.cscIndex(),k=f._model.cscItems(),i=f._model.cscLabels();typeof g!="undefined"&&(j=g);k&&k.length&&k.hide().eq(j).show();i&&i.length&&i.removeClass(f._model.cscActiveClass()).eq(j).addClass(f._model.cscActiveClass())})},_inited:function(){this.trigger("inited")},prev:function(){var f=this,g=f._model.current(".js_cscPrev");if(g.item){f.trigger("prev_index",[g.item,g.button])}return this},next:function(){var f=this,g=f._model.current(".js_cscNext");if(g.item){f.trigger("next_index",[g.item,g.button])}return this},first:function(){this.trigger("show_index",[this._model.cscIndex(0)]);return this},last:function(){var f;this._model.cscItems()&&this._model.cscItems().length&&(f=this._model.cscItems().length-1);typeof f!="undefined"&&this.trigger("show_index",[this._model.cscIndex(f)]);return this}});c.Model._instanceName="JCStepControl";JC.f.extendObject(c.Model.prototype,{init:function(){var f=this;f.cscIndex(f.cscDefaultIndex()||0)},next:function(){var f=this,i=this.cscIndex()+1,k={item:null,label:null,button:null,selector:f.selector()},j=f.cscItems(),g=f.cscLabels(),h;if(j[i]){k.item=$(j[i]);h=k.item.find(".js_cscNext");h.length&&(k.button=h)}g&&g.length&&g[i]&&(k.label=$(g[i]));return k},prev:function(){var f=this,h=this.cscIndex()-1,j={item:null,label:null,selector:f.selector()},i=f.cscItems(),g=f.cscLabels();i[h]&&(j.item=$(i[h]));g&&g.length&&g[h]&&(j.label=$(g[h]));return j},current:function(g){g=g||".js_cscNext";var f=this,j=this.cscIndex(),l={item:null,label:null,button:null,selector:f.selector()},k=f.cscItems(),h=f.cscLabels(),i;if(k[j]){l.item=$(k[j]);i=l.item.find(g);i.length&&(l.button=i)}h&&h.length&&h[j]&&(l.label=$(h[j]));return l},maxIndex:function(){var f=this.cscItems().length-1;f<0&&(f=0);return f},cscIndex:function(f){typeof f!="undefined"&&(this._cscIndex=f);return this._cscIndex},cscValidCallback:function(f){if(!f){return null}return this.callbackProp(f,"cscValidCallback")},cscInitedCallback:function(){return this.callbackProp("cscInitedCallback")},cscItems:function(){return this.selectorProp("cscItems")},cscLabels:function(){return this.selectorProp("cscLabels")},cscActiveClass:function(){return this.attrProp("cscActiveClass")},cscDefaultIndex:function(){return this.intProp("cscDefaultIndex")||0}});JC.f.extendObject(c.View.prototype,{init:function(){}});e.ready(function(){setTimeout(function(){c.autoInit&&c.init()},1)});return JC.StepControl})}(typeof define==="function"&&define.amd?define:function(b,a,c){typeof b=="function"&&(c=b);typeof a=="function"&&(c=a);c&&c()},window)); \ No newline at end of file diff --git a/deploy/comps/Suggest/Suggest.js b/deploy/comps/Suggest/Suggest.js new file mode 100755 index 000000000..84c14f822 --- /dev/null +++ b/deploy/comps/Suggest/Suggest.js @@ -0,0 +1 @@ +(function(b,a){b(["JC.BaseMVC"],function(){window.Suggest=JC.Suggest=c;JC.use&&!window.JSON&&JC.use("plugins.json2");function c(d){d&&(d=$(d));if(c.getInstance(d)){return c.getInstance(d)}c.getInstance(d,this);c._allIns.push(this);this._model=new c.Model(d);this._view=new c.View(this._model);this._init()}c.getInstance=function(d,e){return JC.BaseMVC.getInstance(d,c,e)};c.isSuggest=function(d){var e;d&&(d=$(d)).length&&(e=d.is("[sugurl]")||d.is("sugstaticdatacb"));return e};c.autoInit=true;c.layoutTpl="";c.layoutTpl="";c.dataFilter;c._allIns=[];c._hideOther=function(f){for(var e=0,d=c._allIns.length;e=0&&l1){if(d._model.idSelector().val()){var h;$.each(g,function(k,j){if(j.id==d._model.idSelector().val()){h=true;return false}});if(!h){d._model.idSelector().val(g.first().id)}}else{d._model.idSelector().val(g.first().id)}}else{d._model.idSelector().val(g.first().id)}});if(d._model.sugautoposition()){$(window).on("resize",function(){if(d._model.layout().is(":visible")){d._view.show()}})}}});JC.BaseMVC.build(c);c.Model._instanceName="SuggestInstace";JC.f.extendObject(c.Model.prototype,{init:function(){this._id="Suggest_"+new Date().getTime();this.initValue=this.selector().val().trim();return this},selector:function(){return this._selector},suglayouttpl:function(){var d=this,f=c.layoutTpl||d.layoutTpl,e;(e=d.selector().attr("suglayouttpl"))&&(f=e);return f},layoutTpl:'',layout:function(){var d=this;!d._layout&&d.selector().is("[suglayout]")&&(d._layout=JC.f.parentSelector(d.selector(),d.selector().attr("suglayout")));!d._layout&&(d._layout=$(d.suglayouttpl()),d._layout.hide(),d._layout.appendTo(document.body),(d._sugautoposition=true));!d._layout.hasClass("js_sugLayout")&&d._layout.addClass("js_sugLayout");if(d.sugwidth()){d._layout.css({width:d.sugwidth()+"px"})}d._layout.css({width:d._layout.width()+d.sugoffsetwidth()+"px"});return d._layout},sugautoposition:function(){this.layout().is("sugautoposition")&&(this._sugautoposition=JC.f.parseBool(this.layout().attr("sugautoposition")));return this._sugautoposition},sugwidth:function(){this.selector().is("[sugwidth]")&&(this._sugwidth=parseInt(this.selector().attr("sugwidth")));!this._sugwidth&&(this._sugwidth=this.sugplaceholder().width());return this._sugwidth},sugoffsetleft:function(){this.selector().is("[sugoffsetleft]")&&(this._sugoffsetleft=parseInt(this.selector().attr("sugoffsetleft")));!this._sugoffsetleft&&(this._sugoffsetleft=0);return this._sugoffsetleft},sugoffsettop:function(){this.selector().is("[sugoffsettop]")&&(this._sugoffsettop=parseInt(this.selector().attr("sugoffsettop")));!this._sugoffsettop&&(this._sugoffsettop=0);return this._sugoffsettop},sugoffsetwidth:function(){this.selector().is("[sugoffsetwidth]")&&(this._sugoffsetwidth=parseInt(this.selector().attr("sugoffsetwidth")));!this._sugoffsetwidth&&(this._sugoffsetwidth=0);return this._sugoffsetwidth},_dataCallback:function(d){$(this).trigger("TriggerEvent",["SuggestUpdate",d])},sugdatacallback:function(){var d=this;this.selector().is("[sugdatacallback]")&&(this._sugdatacallback=this.selector().attr("sugdatacallback"));!this._sugdatacallback&&(this._sugdatacallback=d._id+"_cb");!window[this._sugdatacallback]&&(window[this._sugdatacallback]=function(e){d._dataCallback(e)});return this._sugdatacallback},sugurl:function(d){d=encodeURIComponent(d);this.selector().is("[sugurl]")&&(this._sugurl=this.selector().attr("sugurl"));!this.selector().is("[sugurl]")&&(this._sugurl="?word={0}&callback={1}");this._sugurl=JC.f.printf(this._sugurl,d,this.sugdatacallback());return this._sugurl},sugneedscripttag:function(){this._sugneedscripttag=true;this.selector().is("[sugneedscripttag]")&&(this._sugneedscripttag=JC.f.parseBool(this.selector().attr("sugneedscripttag")));return this._sugneedscripttag},getData:function(h){var e=this,f=this.sugurl(h),g,d="script_"+e._id;JC.log(f,new Date().getTime());if(this.sugneedscripttag()){$("#"+d).remove();g=JC.f.printf(' + + + + +
          +

          Message:

          +

          +
          + + diff --git a/deploy/plugins/aesDemo/aes-js-php.php b/deploy/plugins/aesDemo/aes-js-php.php new file mode 100755 index 000000000..182bc3df9 --- /dev/null +++ b/deploy/plugins/aesDemo/aes-js-php.php @@ -0,0 +1,16 @@ + + + + + +AES JavaScript+PHP test harness (server-side decrypt) + + + +
          $_POST: 
          +
          Plaintext: 
          + + \ No newline at end of file diff --git a/deploy/plugins/aesDemo/aes.class.php b/deploy/plugins/aesDemo/aes.class.php new file mode 100755 index 000000000..78167b751 --- /dev/null +++ b/deploy/plugins/aesDemo/aes.class.php @@ -0,0 +1,166 @@ + 6 && $i%$Nk == 4) { + $temp = self::subWord($temp); + } + for ($t=0; $t<4; $t++) $w[$i][$t] = $w[$i-$Nk][$t] ^ $temp[$t]; + } + return $w; + } + + private static function subWord($w) { // apply SBox to 4-byte word w + for ($i=0; $i<4; $i++) $w[$i] = self::$sBox[$w[$i]]; + return $w; + } + + private static function rotWord($w) { // rotate 4-byte word w left by one byte + $tmp = $w[0]; + for ($i=0; $i<3; $i++) $w[$i] = $w[$i+1]; + $w[3] = $tmp; + return $w; + } + + // sBox is pre-computed multiplicative inverse in GF(2^8) used in subBytes and keyExpansion [§5.1.1] + private static $sBox = array( + 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76, + 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0, + 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15, + 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75, + 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84, + 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf, + 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8, + 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2, + 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73, + 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb, + 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79, + 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08, + 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a, + 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e, + 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf, + 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16); + + // rCon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [§5.2] + private static $rCon = array( + array(0x00, 0x00, 0x00, 0x00), + array(0x01, 0x00, 0x00, 0x00), + array(0x02, 0x00, 0x00, 0x00), + array(0x04, 0x00, 0x00, 0x00), + array(0x08, 0x00, 0x00, 0x00), + array(0x10, 0x00, 0x00, 0x00), + array(0x20, 0x00, 0x00, 0x00), + array(0x40, 0x00, 0x00, 0x00), + array(0x80, 0x00, 0x00, 0x00), + array(0x1b, 0x00, 0x00, 0x00), + array(0x36, 0x00, 0x00, 0x00) ); + +} +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +?> \ No newline at end of file diff --git a/deploy/plugins/aesDemo/aesctr.class.php b/deploy/plugins/aesDemo/aesctr.class.php new file mode 100755 index 000000000..aa559e2f2 --- /dev/null +++ b/deploy/plugins/aesDemo/aesctr.class.php @@ -0,0 +1,165 @@ +>> operator nor unsigned ints + * + * @param a number to be shifted (32-bit integer) + * @param b number of bits to shift a to the right (0..31) + * @return a right-shifted and zero-filled by b bits + */ + private static function urs($a, $b) { + $a &= 0xffffffff; $b &= 0x1f; // (bounds check) + if ($a&0x80000000 && $b>0) { // if left-most bit set + $a = ($a>>1) & 0x7fffffff; // right-shift one bit & clear left-most bit + $a = $a >> ($b-1); // remaining right-shifts + } else { // otherwise + $a = ($a>>$b); // use normal right-shift + } + return $a; + } + +} +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +?> \ No newline at end of file diff --git a/deploy/plugins/aesDemo/demo.php b/deploy/plugins/aesDemo/demo.php new file mode 100755 index 000000000..618ec650f --- /dev/null +++ b/deploy/plugins/aesDemo/demo.php @@ -0,0 +1,44 @@ + + + + + +AES in PHP test harness + + +
          + + + + + + + + + + + + + + + + + +
          Password:
          Plaintext:
          +
          +

          ms

          + + \ No newline at end of file diff --git a/deploy/plugins/base64.js b/deploy/plugins/base64.js new file mode 100755 index 000000000..1fad88250 --- /dev/null +++ b/deploy/plugins/base64.js @@ -0,0 +1 @@ +(function(p){if(p.Base64){return}var e="2.1.1";var q;if(typeof module!=="undefined"&&module.exports){q=require("buffer").Buffer}var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var c=function(z){var y={};for(var x=0,w=z.length;x>>6)+t(128|w&63):t(224|w>>>12&15)+t(128|w>>>6&63)+t(128|w&63)}else{var w=65536+(x.charCodeAt(0)-55296)*1024+(x.charCodeAt(1)-56320);return t(240|w>>>18&7)+t(128|w>>>12&63)+t(128|w>>>6&63)+t(128|w&63)}};var i=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;var g=function(w){return w.replace(i,v)};var o=function(z){var y=[0,2,1][z.length%3],w=z.charCodeAt(0)<<16|(z.length>1?z.charCodeAt(1):0)<<8|(z.length>2?z.charCodeAt(2):0),x=[n.charAt(w>>>18),n.charAt(w>>>12&63),y>=2?"=":n.charAt(w>>>6&63),y>=1?"=":n.charAt(w&63)];return x.join("")};var j=p.btoa||function(w){return w.replace(/[\s\S]{1,3}/g,o)};var m=q?function(w){return new q(w).toString("base64")}:function(w){return j(g(w))};var f=function(w,x){return !x?m(w):m(w).replace(/[+\/]/g,function(y){return y=="+"?"-":"_"}).replace(/=/g,"")};var s=function(w){return f(w,true)};var d=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g");var r=function(y){switch(y.length){case 4:var w=(7&y.charCodeAt(0))<<18|(63&y.charCodeAt(1))<<12|(63&y.charCodeAt(2))<<6|63&y.charCodeAt(3),x=w-65536;return t((x>>>10)+55296)+t((x&1023)+56320);case 3:return t((15&y.charCodeAt(0))<<12|(63&y.charCodeAt(1))<<6|63&y.charCodeAt(2));default:return t((31&y.charCodeAt(0))<<6|63&y.charCodeAt(1))}};var b=function(w){return w.replace(d,r)};var a=function(A){var w=A.length,y=w%4,z=(w>0?c[A.charAt(0)]<<18:0)|(w>1?c[A.charAt(1)]<<12:0)|(w>2?c[A.charAt(2)]<<6:0)|(w>3?c[A.charAt(3)]:0),x=[t(z>>>16),t(z>>>8&255),t(z&255)];x.length-=[0,0,2,1][y];return x.join("")};var h=p.atob||function(w){return w.replace(/[\s\S]{1,4}/g,a)};var u=q?function(w){return new q(w,"base64").toString()}:function(w){return b(h(w))};var k=function(w){return u(w.replace(/[-_]/g,function(x){return x=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))};p.Base64={VERSION:e,atob:h,btoa:j,fromBase64:k,toBase64:f,utob:g,encode:f,encodeURI:s,btou:b,decode:k};if(typeof Object.defineProperty==="function"){var l=function(w){return{value:w,enumerable:false,writable:true,configurable:true}};p.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",l(function(){return k(this)}));Object.defineProperty(String.prototype,"toBase64",l(function(w){return f(this,w)}));Object.defineProperty(String.prototype,"toBase64URI",l(function(){return f(this,true)}))}}})(this); \ No newline at end of file diff --git a/deploy/plugins/jquery.form.js b/deploy/plugins/jquery.form.js new file mode 100755 index 000000000..3c185bb7b --- /dev/null +++ b/deploy/plugins/jquery.form.js @@ -0,0 +1,11 @@ +/*! + * jQuery Form Plugin + * version: 3.36.0-2013.06.16 + * @requires jQuery v1.5 or later + * Copyright (c) 2013 M. Alsup + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses. + * https://github.com/malsup/form#copyright-and-license + */ +;(function(i){var l={};l.fileapi=i("").get(0).files!==undefined;l.formdata=window.FormData!==undefined;var j=!!i.fn.prop;i.fn.attr2=function(){if(!j){return this.attr.apply(this,arguments)}var a=this.prop.apply(this,arguments);if((a&&a.jquery)||typeof a==="string"){return a}return this.attr.apply(this,arguments)};i.fn.ajaxSubmit=function(X){if(!this.length){k("ajaxSubmit: skipping submit process - no element selected");return this}var Y,P,V,T=this;if(typeof X=="function"){X={success:X}}Y=X.type||this.attr2("method");P=X.url||this.attr2("action");V=(typeof P==="string")?i.trim(P):"";V=V||window.location.href||"";if(V){V=(V.match(/^([^#]+)/)||[])[1]}X=i.extend(true,{url:V,success:i.ajaxSettings.success,type:Y||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},X);var J={};this.trigger("form-pre-serialize",[this,X,J]);if(J.veto){k("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(X.beforeSerialize&&X.beforeSerialize(this,X)===false){k("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var U=X.traditional;if(U===undefined){U=i.ajaxSettings.traditional}var M=[];var L,I=this.formToArray(X.semantic,M);if(X.data){X.extraData=X.data;L=i.param(X.data,U)}if(X.beforeSubmit&&X.beforeSubmit(I,this,X)===false){k("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[I,this,X,J]);if(J.veto){k("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var b=i.param(I,U);if(L){b=(b?(b+"&"+L):L)}if(X.type.toUpperCase()=="GET"){X.url+=(X.url.indexOf("?")>=0?"&":"?")+b;X.data=null}else{X.data=b}var e=[];if(X.resetForm){e.push(function(){T.resetForm()})}if(X.clearForm){e.push(function(){T.clearForm(X.includeHidden)})}if(!X.dataType&&X.target){var W=X.success||function(){};e.push(function(n){var m=X.replaceTarget?"replaceWith":"html";i(X.target)[m](n).each(W,arguments)})}else{if(X.success){e.push(X.success)}}X.success=function(n,s,m){var p=X.context||this;for(var r=0,o=e.length;r0;var Q="multipart/form-data";var c=(T.attr("enctype")==Q||T.attr("encoding")==Q);var d=l.fileapi&&l.formdata;k("fileAPI :"+d);var O=(S||c)&&!d;var q;if(X.iframe!==false&&(X.iframe||O)){if(X.closeKeepAlive){i.get(X.closeKeepAlive,function(){q=f(I)})}else{q=f(I)}}else{if((S||c)&&d){q=K(I)}else{q=i.ajax(X)}}T.removeData("jqxhr").data("jqxhr",q);for(var R=0;R');z.css({position:"absolute",top:"-1000px",left:"-1000px"})}w=z[0];y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(ad){var ac=(ad==="timeout"?"timeout":"aborted");k("aborting upload... "+ac);this.aborted=1;try{if(w.contentWindow.document.execCommand){w.contentWindow.document.execCommand("Stop")}}catch(ab){}z.attr("src",r.iframeSrc);y.error=ac;if(r.error){r.error.call(r.context,y,ac,ad)}if(am){i.event.trigger("ajaxError",[y,r,ac])}if(r.complete){r.complete.call(r.context,y,ac)}}};am=r.global;if(am&&0===i.active++){i.event.trigger("ajaxStart")}if(am){i.event.trigger("ajaxSend",[y,r])}if(r.beforeSend&&r.beforeSend.call(r.context,y,r)===false){if(r.global){i.active--}H.reject();return H}if(y.aborted){H.reject();return H}x=B.clk;if(x){m=x.name;if(m&&!x.disabled){r.extraData=r.extraData||{};r.extraData[m]=x.value;if(x.type=="image"){r.extraData[m+".x"]=B.clk_x;r.extraData[m+".y"]=B.clk_y}}}var s=1;var v=2;function u(ab){var ac=null;try{if(ab.contentWindow){ac=ab.contentWindow.document}}catch(ad){k("cannot get iframe.contentWindow document: "+ad)}if(ac){return ac}try{ac=ab.contentDocument?ab.contentDocument:ab.document}catch(ad){k("cannot get iframe.contentDocument: "+ad);ac=ab.document}return ac}var D=i("meta[name=csrf-token]").attr("content");var E=i("meta[name=csrf-param]").attr("content");if(E&&D){r.extraData=r.extraData||{};r.extraData[E]=D}function ap(){var af=T.attr2("target"),ah=T.attr2("action");B.setAttribute("target",n);if(!Y){B.setAttribute("method","POST")}if(ah!=r.url){B.setAttribute("action",r.url)}if(!r.skipEncodingOverride&&(!Y||/post/i.test(Y))){T.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(r.timeout){t=setTimeout(function(){an=true;o(s)},r.timeout)}function ae(){try{var au=u(w).readyState;k("state = "+au);if(au&&au.toLowerCase()=="uninitialized"){setTimeout(ae,50)}}catch(at){k("Server abort: ",at," (",at.name,")");o(v);if(t){clearTimeout(t)}t=undefined}}var ag=[];try{if(r.extraData){for(var ab in r.extraData){if(r.extraData.hasOwnProperty(ab)){if(i.isPlainObject(r.extraData[ab])&&r.extraData[ab].hasOwnProperty("name")&&r.extraData[ab].hasOwnProperty("value")){ag.push(i('').val(r.extraData[ab].value).appendTo(B)[0])}else{ag.push(i('').val(r.extraData[ab]).appendTo(B)[0])}}}}if(!r.iframeTarget){z.appendTo("body");if(w.attachEvent){w.attachEvent("onload",o)}else{w.addEventListener("load",o,false)}}setTimeout(ae,15);try{B.submit()}catch(ad){var ac=document.createElement("form").submit;ac.apply(B)}}finally{B.setAttribute("action",ah);if(af){B.setAttribute("target",af)}else{T.removeAttr("target")}i(ag).remove()}}if(r.forceSync){ap()}else{setTimeout(ap,10)}var aj,ai,al=50,A;function o(af){if(y.aborted||A){return}ai=u(w);if(!ai){k("cannot access response document");af=v}if(af===s&&y){y.abort("timeout");H.reject(y,"timeout");return}else{if(af==v&&y){y.abort("server abort");H.reject(y,"error","server abort");return}}if(!ai||ai.location.href==r.iframeSrc){if(!an){return}}if(w.detachEvent){w.detachEvent("onload",o)}else{w.removeEventListener("load",o,false)}var ah="success",ad;try{if(an){throw"timeout"}var av=r.dataType=="xml"||ai.XMLDocument||i.isXMLDoc(ai);k("isXml="+av);if(!av&&window.opera&&(ai.body===null||!ai.body.innerHTML)){if(--al){k("requeing onLoad callback, DOM not available");setTimeout(o,250);return}}var ac=ai.body?ai.body:ai.documentElement;y.responseText=ac?ac.innerHTML:null;y.responseXML=ai.XMLDocument?ai.XMLDocument:ai;if(av){r.dataType="xml"}y.getResponseHeader=function(aq){var ar={"content-type":r.dataType};return ar[aq]};if(ac){y.status=Number(ac.getAttribute("status"))||y.status;y.statusText=ac.getAttribute("statusText")||y.statusText}var ay=(r.dataType||"").toLowerCase();var ae=/(json|script|text)/.test(ay);if(ae||r.textarea){var ag=ai.getElementsByTagName("textarea")[0];if(ag){y.responseText=ag.value;y.status=Number(ag.getAttribute("status"))||y.status;y.statusText=ag.getAttribute("statusText")||y.statusText}else{if(ae){var ax=ai.getElementsByTagName("pre")[0];var ab=ai.getElementsByTagName("body")[0];if(ax){y.responseText=ax.textContent?ax.textContent:ax.innerText}else{if(ab){y.responseText=ab.textContent?ab.textContent:ab.innerText}}}}}else{if(ay=="xml"&&!y.responseXML&&y.responseText){y.responseXML=p(y.responseText)}}try{aj=G(y,ay,r)}catch(aw){ah="parsererror";y.error=ad=(aw||ah)}}catch(aw){k("error caught: ",aw);ah="error";y.error=ad=(aw||ah)}if(y.aborted){k("upload aborted");ah=null}if(y.status){ah=(y.status>=200&&y.status<300||y.status===304)?"success":"error"}if(ah==="success"){if(r.success){r.success.call(r.context,aj,"success",y)}H.resolve(y.responseText,"success",y);if(am){i.event.trigger("ajaxSuccess",[y,r])}}else{if(ah){if(ad===undefined){ad=y.statusText}if(r.error){r.error.call(r.context,y,ah,ad)}H.reject(y,"error",ad);if(am){i.event.trigger("ajaxError",[y,r,ad])}}}if(am){i.event.trigger("ajaxComplete",[y,r])}if(am&&!--i.active){i.event.trigger("ajaxStop")}if(r.complete){r.complete.call(r.context,y,ah)}A=true;if(r.timeout){clearTimeout(t)}setTimeout(function(){if(!r.iframeTarget){z.remove()}y.responseXML=null},100)}var p=i.parseXML||function(ac,ab){if(window.ActiveXObject){ab=new ActiveXObject("Microsoft.XMLDOM");ab.async="false";ab.loadXML(ac)}else{ab=(new DOMParser()).parseFromString(ac,"text/xml")}return(ab&&ab.documentElement&&ab.documentElement.nodeName!="parsererror")?ab:null};var F=i.parseJSON||function(ab){return window["eval"]("("+ab+")")};var G=function(ab,ad,ae){var af=ab.getResponseHeader("content-type")||"",ag=ad==="xml"||!ad&&af.indexOf("xml")>=0,ac=ag?ab.responseXML:ab.responseText;if(ag&&ac.documentElement.nodeName==="parsererror"){if(i.error){i.error("parsererror")}}if(ae&&ae.dataFilter){ac=ae.dataFilter(ac,ad)}if(typeof ac==="string"){if(ad==="json"||!ad&&af.indexOf("json")>=0){ac=F(ac)}else{if(ad==="script"||!ad&&af.indexOf("javascript")>=0){i.globalEval(ac)}}}return ac};return H}};i.fn.ajaxForm=function(b){b=b||{};b.delegation=b.delegation&&i.isFunction(i.fn.on);if(!b.delegation&&this.length===0){var a={s:this.selector,c:this.context};if(!i.isReady&&a.s){k("DOM not ready, queuing ajaxForm");i(function(){i(a.s,a.c).ajaxForm(b)});return this}k("terminating; zero elements found by selector"+(i.isReady?"":" (DOM not ready)"));return this}if(b.delegation){i(document).off("submit.form-plugin",this.selector,g).off("click.form-plugin",this.selector,h).on("submit.form-plugin",this.selector,b,g).on("click.form-plugin",this.selector,b,h);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",b,g).bind("click.form-plugin",b,h)};function g(a){var b=a.data;if(!a.isDefaultPrevented()){a.preventDefault();i(this).ajaxSubmit(b)}}function h(b){var c=b.target;var e=i(c);if(!(e.is("[type=submit],[type=image]"))){var f=e.closest("[type=submit]");if(f.length===0){return}c=f[0]}var d=this;d.clk=c;if(c.type=="image"){if(b.offsetX!==undefined){d.clk_x=b.offsetX;d.clk_y=b.offsetY}else{if(typeof i.fn.offset=="function"){var a=e.offset();d.clk_x=b.pageX-a.left;d.clk_y=b.pageY-a.top}else{d.clk_x=b.pageX-c.offsetLeft;d.clk_y=b.pageY-c.offsetTop}}}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},100)}i.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};i.fn.formToArray=function(B,z){var C=[];if(this.length===0){return C}var f=this[0];var c=B?f.getElementsByTagName("*"):f.elements;if(!c){return C}var a,b,d,A,e,E,n;for(a=0,E=c.length;a=9)?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice,j,b;if(c.event.fixHooks){for(var e=d.length;e;){c.event.fixHooks[d[--e]]=c.event.mouseHooks}}var f=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener){for(var m=k.length;m;){this.addEventListener(k[--m],l,false)}}else{this.onmousewheel=l}c.data(this,"mousewheel-line-height",f.getLineHeight(this));c.data(this,"mousewheel-page-height",f.getPageHeight(this))},teardown:function(){if(this.removeEventListener){for(var m=k.length;m;){this.removeEventListener(k[--m],l,false)}}else{this.onmousewheel=null}c.removeData(this,"mousewheel-line-height");c.removeData(this,"mousewheel-page-height")},getLineHeight:function(m){var i=c(m),n=i["offsetParent" in c.fn?"offsetParent":"parent"]();if(!n.length){n=c("body")}return parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(i){return c(i).height()},settings:{adjustOldDeltas:true,normalizeOffset:true}};c.fn.extend({mousewheel:function(i){return i?this.bind("mousewheel",i):this.trigger("mousewheel")},unmousewheel:function(i){return this.unbind("mousewheel",i)}});function l(i){var o=i||window.event,u=h.call(arguments,1),w=0,q=0,p=0,t=0,s=0,r=0;i=c.event.fix(o);i.type="mousewheel";if("detail" in o){p=o.detail*-1}if("wheelDelta" in o){p=o.wheelDelta}if("wheelDeltaY" in o){p=o.wheelDeltaY}if("wheelDeltaX" in o){q=o.wheelDeltaX*-1}if("axis" in o&&o.axis===o.HORIZONTAL_AXIS){q=p*-1;p=0}w=p===0?q:p;if("deltaY" in o){p=o.deltaY*-1;w=p}if("deltaX" in o){q=o.deltaX;if(p===0){w=q*-1}}if(p===0&&q===0){return}if(o.deltaMode===1){var v=c.data(this,"mousewheel-line-height");w*=v;p*=v;q*=v}else{if(o.deltaMode===2){var n=c.data(this,"mousewheel-page-height");w*=n;p*=n;q*=n}}t=Math.max(Math.abs(p),Math.abs(q));if(!b||t=1?"floor":"ceil"](w/b);q=Math[q>=1?"floor":"ceil"](q/b);p=Math[p>=1?"floor":"ceil"](p/b);if(f.settings.normalizeOffset&&this.getBoundingClientRect){var m=this.getBoundingClientRect();s=i.clientX-m.left;r=i.clientY-m.top}i.deltaX=q;i.deltaY=p;i.deltaFactor=b;i.offsetX=s;i.offsetY=r;i.deltaMode=0;u.unshift(i,w,q,p);if(j){clearTimeout(j)}j=setTimeout(g,200);return(c.event.dispatch||c.event.handle).apply(this,u)}function g(){b=null}function a(m,i){return f.settings.adjustOldDeltas&&m.type==="mousewheel"&&i%120===0}})); \ No newline at end of file diff --git a/deploy/plugins/json2.js b/deploy/plugins/json2.js new file mode 100755 index 000000000..ecb44b93d --- /dev/null +++ b/deploy/plugins/json2.js @@ -0,0 +1 @@ +if(typeof JSON!=="object"){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i>16)+(e>>16)+(h>>16);return g<<16|h&65535}function L(d,c){return d<>>32-c}function K(b,l,k,j,i,c){return M(L(M(M(l,b),M(j,c)),i),k)}function J(i,d,n,m,l,k,j){return K(d&n|~d&m,i,d,l,k,j)}function I(i,d,n,m,l,k,j){return K(d&m|n&~m,i,d,l,k,j)}function H(i,d,n,m,l,k,j){return K(d^n^m,i,d,l,k,j)}function G(i,d,n,m,l,k,j){return K(n^(d|~m),i,d,l,k,j)}function F(P,O){P[O>>5]|=128<>>9<<4)+14]=O;var t,s,r,q,h,g=1732584193,f=-271733879,e=-1732584194,b=271733878;for(t=0;t>5]>>>d%32&255)}return f}function D(e){var d,f=[];f[(e.length>>2)-1]=undefined;for(d=0;d>5]|=(e.charCodeAt(d/8)&255)<16&&(m=F(m,i.length*8));for(n=0;n<16;n+=1){l[n]=m[n]^909522486,k[n]=m[n]^1549556828}return j=F(l.concat(D(h)),512+h.length*8),E(F(k.concat(j),640))}function A(g){var f="0123456789abcdef",j="",i,h;for(h=0;h>>4&15)+f.charAt(i&15)}return j}function z(b){return unescape(encodeURIComponent(b))}function y(b){return C(z(b))}function x(b){return A(y(b))}function w(d,c){return B(z(d),z(c))}function v(d,c){return A(w(d,c))}function u(e,d,f){return d?f?w(d,e):v(d,e):f?y(e):x(e)}"use strict",typeof define=="function"&&define.amd?define(function(){return u}):N.md5=u})(this); \ No newline at end of file diff --git a/deploy/plugins/raphael.js b/deploy/plugins/raphael.js new file mode 100755 index 000000000..245631df7 --- /dev/null +++ b/deploy/plugins/raphael.js @@ -0,0 +1 @@ +(function(i){var e="0.4.2",j="hasOwnProperty",b=/[\.\/]/,a="*",g=function(){},f=function(m,l){return m-l},d,h,k={n:{}},c=function(m,C){m=String(m);var v=k,s=h,w=Array.prototype.slice.call(arguments,2),y=c.listeners(m),x=0,u=false,p,o=[],t={},q=[],n=d,A=[];d=m;h=0;for(var r=0,B=y.length;r';a8=a7.firstChild;a8.style.behavior="url(#default#VML)";if(!(a8&&typeof a8.adj=="object")){return(bi.type=bn)}a7=null}bi.svg=!(bi.vml=bi.type=="VML");bi._Paper=bJ;bi.fn=ao=bJ.prototype=bi.prototype;bi._id=0;bi._oid=0;bi.is=function(d,b){b=aj.call(b);if(b=="finite"){return !B[bw](+d)}if(b=="array"){return d instanceof Array}return(b=="null"&&d===null)||(b==typeof d&&d!==null)||(b=="object"&&d===Object(d))||(b=="array"&&Array.isArray&&Array.isArray(d))||aM.call(d).slice(8,-1).toLowerCase()==b};function bl(g){if(typeof g=="function"||Object(g)!==g){return g}var d=new g.constructor;for(var b in g){if(g[bw](b)){d[b]=bl(g[b])}}return d}bi.angle=function(E,S,g,R,d,i){if(d==null){var b=E-g,bO=S-R;if(!b&&!bO){return 0}return(180+aI.atan2(-bO,-b)*180/ag+360)%360}else{return bi.angle(E,S,d,i)-bi.angle(g,R,d,i)}};bi.rad=function(b){return b%360*ag/180};bi.deg=function(b){return b*180/ag%360};bi.snapTo=function(d,E,b){b=bi.is(b,"finite")?b:10;if(bi.is(d,u)){var g=d.length;while(g--){if(ak(d[g]-E)<=b){return d[g]}}}else{d=+d;var R=E%d;if(Rd-b){return E-R+d}}return E};var aQ=bi.createUUID=(function(b,d){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(b,d).toUpperCase()}})(/[xy]/g,function(g){var d=aI.random()*16|0,b=g=="x"?d:(d&3|8);return b.toString(16)});bi.setWindow=function(b){bc("raphael.setWindow",bi,a5.win,b);a5.win=b;a5.doc=a5.win.document;if(bi._engine.initWin){bi._engine.initWin(a5.win)}};var J=function(g){if(bi.vml){var b=/^\s+|\s+$/g;var R;try{var S=new ActiveXObject("htmlfile");S.write("");S.close();R=S.body}catch(bO){R=createPopup().document.body}var d=R.createTextRange();J=H(function(i){try{R.style.color=k(i).replace(b,bn);var bP=d.queryCommandValue("ForeColor");bP=((bP&255)<<16)|(bP&65280)|((bP&16711680)>>>16);return"#"+("000000"+bP.toString(16)).slice(-6)}catch(bQ){return"none"}})}else{var E=a5.doc.createElement("i");E.title="Rapha\xebl Colour Picker";E.style.display="none";a5.doc.body.appendChild(E);J=H(function(i){E.style.color=i;return a5.doc.defaultView.getComputedStyle(E,bn).getPropertyValue("color")})}return J(g)},az=function(){return"hsb("+[this.h,this.s,this.b]+")"},bm=function(){return"hsl("+[this.h,this.s,this.l]+")"},w=function(){return this.hex},G=function(R,E,d){if(E==null&&bi.is(R,"object")&&"r" in R&&"g" in R&&"b" in R){d=R.b;E=R.g;R=R.r}if(E==null&&bi.is(R,a)){var i=bi.getRGB(R);R=i.r;E=i.g;d=i.b}if(R>1||E>1||d>1){R/=255;E/=255;d/=255}return[R,E,d]},N=function(R,E,d,S){R*=255;E*=255;d*=255;var i={r:R,g:E,b:d,hex:bi.rgb(R,E,d),toString:w};bi.is(S,"finite")&&(i.opacity=S);return i};bi.color=function(b){var d;if(bi.is(b,"object")&&"h" in b&&"s" in b&&"b" in b){d=bi.hsb2rgb(b);b.r=d.r;b.g=d.g;b.b=d.b;b.hex=d.hex}else{if(bi.is(b,"object")&&"h" in b&&"s" in b&&"l" in b){d=bi.hsl2rgb(b);b.r=d.r;b.g=d.g;b.b=d.b;b.hex=d.hex}else{if(bi.is(b,"string")){b=bi.getRGB(b)}if(bi.is(b,"object")&&"r" in b&&"g" in b&&"b" in b){d=bi.rgb2hsl(b);b.h=d.h;b.s=d.s;b.l=d.l;d=bi.rgb2hsb(b);b.v=d.b}else{b={hex:"none"};b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1}}}b.toString=w;return b};bi.hsb2rgb=function(S,bQ,bO,i){if(this.is(S,"object")&&"h" in S&&"s" in S&&"b" in S){bO=S.b;bQ=S.s;S=S.h;i=S.o}S*=360;var E,bP,d,g,b;S=(S%360)/60;b=bO*bQ;g=b*(1-ak(S%2-1));E=bP=d=bO-b;S=~~S;E+=[b,g,0,0,g,b][S];bP+=[g,b,b,g,0,0][S];d+=[0,0,g,b,b,g][S];return N(E,bP,d,i)};bi.hsl2rgb=function(bO,bQ,E,i){if(this.is(bO,"object")&&"h" in bO&&"s" in bO&&"l" in bO){E=bO.l;bQ=bO.s;bO=bO.h}if(bO>1||bQ>1||E>1){bO/=360;bQ/=100;E/=100}bO*=360;var S,bP,d,g,b;bO=(bO%360)/60;b=2*bQ*(E<0.5?E:1-E);g=b*(1-ak(bO%2-1));S=bP=d=E-b/2;bO=~~bO;S+=[b,g,0,0,g,b][bO];bP+=[g,b,b,g,0,0][bO];d+=[0,0,g,b,b,g][bO];return N(S,bP,d,i)};bi.rgb2hsb=function(bP,bO,d){d=G(bP,bO,d);bP=d[0];bO=d[1];d=d[2];var R,E,i,bQ;i=bI(bP,bO,d);bQ=i-ai(bP,bO,d);R=(bQ==0?null:i==bP?(bO-d)/bQ:i==bO?(d-bP)/bQ+2:(bP-bO)/bQ+4);R=((R+360)%6)*60/360;E=bQ==0?0:bQ/i;return{h:R,s:E,b:i,toString:az}};bi.rgb2hsl=function(d,bO,bR){bR=G(d,bO,bR);d=bR[0];bO=bR[1];bR=bR[2];var bS,R,bQ,bP,E,i;bP=bI(d,bO,bR);E=ai(d,bO,bR);i=bP-E;bS=(i==0?null:bP==d?(bO-bR)/i:bP==bO?(bR-d)/i+2:(d-bO)/i+4);bS=((bS+360)%6)*60/360;bQ=(bP+E)/2;R=(i==0?0:bQ<0.5?i/(2*bQ):i/(2-2*bQ));return{h:bS,s:R,l:bQ,toString:bm}};bi._path2string=function(){return this.join(",").replace(aN,"$1")};function c(E,g){for(var b=0,d=E.length;b=1000&&delete R[bO.shift()];bO.push(S);R[S]=i[bs](d,E);return b?b(R[S]):R[S]}return g}var D=bi._preload=function(g,d){var b=a5.doc.createElement("img");b.style.cssText="position:absolute;left:-9999em;top:-9999em";b.onload=function(){d.call(this);this.onload=null;a5.doc.body.removeChild(this)};b.onerror=function(){a5.doc.body.removeChild(this)};a5.doc.body.appendChild(b);b.src=g};function h(){return this.hex}bi.getRGB=H(function(b){if(!b||!!((b=k(b)).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:h}}if(b=="none"){return{r:-1,g:-1,b:-1,hex:"none",toString:h}}!(ax[bw](b.toLowerCase().substring(0,2))||b.charAt()=="#")&&(b=J(b));var E,d,g,S,i,bP,bO,R=b.match(Z);if(R){if(R[2]){S=bK(R[2].substring(5),16);g=bK(R[2].substring(3,5),16);d=bK(R[2].substring(1,3),16)}if(R[3]){S=bK((bP=R[3].charAt(3))+bP,16);g=bK((bP=R[3].charAt(2))+bP,16);d=bK((bP=R[3].charAt(1))+bP,16)}if(R[4]){bO=R[4][l](bf);d=bM(bO[0]);bO[0].slice(-1)=="%"&&(d*=2.55);g=bM(bO[1]);bO[1].slice(-1)=="%"&&(g*=2.55);S=bM(bO[2]);bO[2].slice(-1)=="%"&&(S*=2.55);R[1].toLowerCase().slice(0,4)=="rgba"&&(i=bM(bO[3]));bO[3]&&bO[3].slice(-1)=="%"&&(i/=100)}if(R[5]){bO=R[5][l](bf);d=bM(bO[0]);bO[0].slice(-1)=="%"&&(d*=2.55);g=bM(bO[1]);bO[1].slice(-1)=="%"&&(g*=2.55);S=bM(bO[2]);bO[2].slice(-1)=="%"&&(S*=2.55);(bO[0].slice(-3)=="deg"||bO[0].slice(-1)=="\xb0")&&(d/=360);R[1].toLowerCase().slice(0,4)=="hsba"&&(i=bM(bO[3]));bO[3]&&bO[3].slice(-1)=="%"&&(i/=100);return bi.hsb2rgb(d,g,S,i)}if(R[6]){bO=R[6][l](bf);d=bM(bO[0]);bO[0].slice(-1)=="%"&&(d*=2.55);g=bM(bO[1]);bO[1].slice(-1)=="%"&&(g*=2.55);S=bM(bO[2]);bO[2].slice(-1)=="%"&&(S*=2.55);(bO[0].slice(-3)=="deg"||bO[0].slice(-1)=="\xb0")&&(d/=360);R[1].toLowerCase().slice(0,4)=="hsla"&&(i=bM(bO[3]));bO[3]&&bO[3].slice(-1)=="%"&&(i/=100);return bi.hsl2rgb(d,g,S,i)}R={r:d,g:g,b:S,toString:h};R.hex="#"+(16777216|S|(g<<8)|(d<<16)).toString(16).slice(1);bi.is(i,"finite")&&(R.opacity=i);return R}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:h}},bi);bi.hsb=H(function(i,g,d){return bi.hsb2rgb(i,g,d).hex});bi.hsl=H(function(g,d,b){return bi.hsl2rgb(g,d,b).hex});bi.rgb=H(function(E,i,d){return"#"+(16777216|d|(i<<8)|(E<<16)).toString(16).slice(1)});bi.getColor=function(d){var g=this.getColor.start=this.getColor.start||{h:0,s:1,b:d||0.75},b=this.hsb2rgb(g.h,g.s,g.b);g.h+=0.075;if(g.h>1){g.h=0;g.s-=0.2;g.s<=0&&(this.getColor.start={h:0,s:1,b:g.b})}return b.hex};bi.getColor.reset=function(){delete this.start};function am(E,bO){var S=[];for(var g=0,b=E.length;b-2*!bO>g;g+=2){var R=[{x:+E[g-2],y:+E[g-1]},{x:+E[g],y:+E[g+1]},{x:+E[g+2],y:+E[g+3]},{x:+E[g+4],y:+E[g+5]}];if(bO){if(!g){R[0]={x:+E[b-2],y:+E[b-1]}}else{if(b-4==g){R[3]={x:+E[0],y:+E[1]}}else{if(b-2==g){R[2]={x:+E[0],y:+E[1]};R[3]={x:+E[2],y:+E[3]}}}}}else{if(b-4==g){R[3]=R[2]}else{if(!g){R[0]={x:+E[g],y:+E[g+1]}}}}S.push(["C",(-R[0].x+6*R[1].x+R[2].x)/6,(-R[0].y+6*R[1].y+R[2].y)/6,(R[1].x+6*R[2].x-R[3].x)/6,(R[1].y+6*R[2].y-R[3].y)/6,R[2].x,R[2].y])}return S}bi.parsePathString=function(b){if(!b){return null}var g=aR(b);if(g.arr){return aY(g.arr)}var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},d=[];if(bi.is(b,u)&&bi.is(b[0],u)){d=aY(b)}if(!d.length){k(b).replace(bg,function(R,E,bP){var bO=[],S=E.toLowerCase();bP.replace(ap,function(bR,bQ){bQ&&bO.push(+bQ)});if(S=="m"&&bO.length>2){d.push([E][av](bO.splice(0,2)));S="l";E=E=="m"?"l":"L"}if(S=="r"){d.push([E][av](bO))}else{while(bO.length>=i[S]){d.push([E][av](bO.splice(0,i[S])));if(!i[S]){break}}}})}d.toString=bi._path2string;g.arr=aY(d);return d};bi.parseTransformString=H(function(d){if(!d){return null}var g={r:3,s:4,t:2,m:6},b=[];if(bi.is(d,u)&&bi.is(d[0],u)){b=aY(d)}if(!b.length){k(d).replace(ac,function(E,i,bO){var S=[],R=aj.call(i);bO.replace(ap,function(bQ,bP){bP&&S.push(+bP)});b.push([i][av](S))})}b.toString=bi._path2string;return b});var aR=function(d){var b=aR.ps=aR.ps||{};if(b[d]){b[d].sleep=100}else{b[d]={sleep:100}}setTimeout(function(){for(var g in b){if(b[bw](g)&&g!=d){b[g].sleep--;!b[g].sleep&&delete b[g]}}});return b[d]};bi.findDotsAtSegment=function(d,b,b5,b3,S,E,bQ,bO,bY){var bV=1-bY,b0=aS(bV,3),b1=aS(bV,2),bS=bY*bY,bP=bS*bY,bU=b0*d+b1*3*bY*b5+bV*3*bY*bY*S+bP*bQ,bR=b0*b+b1*3*bY*b3+bV*3*bY*bY*E+bP*bO,bZ=d+2*bY*(b5-d)+bS*(S-2*b5+d),bX=b+2*bY*(b3-b)+bS*(E-2*b3+b),b4=b5+2*bY*(S-b5)+bS*(bQ-2*S+b5),b2=b3+2*bY*(E-b3)+bS*(bO-2*E+b3),bW=bV*d+bY*b5,bT=bV*b+bY*b3,i=bV*S+bY*bQ,g=bV*E+bY*bO,R=(90-aI.atan2(bZ-b4,bX-b2)*180/ag);(bZ>b4||bX=d.x&&b<=d.x2&&g>=d.y&&g<=d.y2};bi.isBBoxIntersect=function(g,d){var b=bi.isPointInsideBBox;return b(d,g.x,g.y)||b(d,g.x2,g.y)||b(d,g.x,g.y2)||b(d,g.x2,g.y2)||b(g,d.x,d.y)||b(g,d.x2,d.y)||b(g,d.x,d.y2)||b(g,d.x2,d.y2)||(g.xd.x||d.xg.x)&&(g.yd.y||d.yg.y)};function aC(b,S,R,E,i){var g=-3*S+9*R-9*E+3*i,d=b*g+6*S-12*R+6*E;return b*d-3*S+3*R}function bb(bZ,R,bY,g,bX,d,bU,b,bR){if(bR==null){bR=1}bR=bR>1?1:bR<0?0:bR;var bS=bR/2,bT=12,bO=[-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],bW=[0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],E=0;for(var bV=0;bVS){i/=2;R+=(EbI(b,bV)||bI(bT,bR)bI(bQ,bP)){return}var bO=(i*bR-bT*g)*(b-bV)-(i-g)*(b*bP-bQ*bV),S=(i*bR-bT*g)*(bQ-bP)-(bT-bR)*(b*bP-bQ*bV),E=(i-g)*(bQ-bP)-(bT-bR)*(b-bV);if(!E){return}var bU=bO/E,bS=S/E,R=+bU.toFixed(2),d=+bS.toFixed(2);if(R<+ai(i,g).toFixed(2)||R>+bI(i,g).toFixed(2)||R<+ai(b,bV).toFixed(2)||R>+bI(b,bV).toFixed(2)||d<+ai(bT,bR).toFixed(2)||d>+bI(bT,bR).toFixed(2)||d<+ai(bQ,bP).toFixed(2)||d>+bI(bQ,bP).toFixed(2)){return}return{x:bU,y:bS}}function aV(d,b){return aP(d,b)}function aL(d,b){return aP(d,b,1)}function aP(b5,b4,b3){var E=bi.bezierBBox(b5),d=bi.bezierBBox(b4);if(!bi.isBBoxIntersect(E,d)){return b3?0:[]}var bY=bb.apply(0,b5),bX=bb.apply(0,b4),bP=bI(~~(bY/5),1),bO=bI(~~(bX/5),1),bV=[],bU=[],g={},b6=b3?0:[];for(var b0=0;b0=0&&bR<=1.001&&bQ>=0&&bQ<=1.001){if(b3){b6++}else{b6.push({x:R.x,y:R.y,t1:ai(bR,1),t2:ai(bQ,1)})}}}}}return b6}bi.pathIntersection=function(d,b){return bE(d,b)};bi.pathIntersectionNumber=function(d,b){return bE(d,b,1)};function bE(g,b,bZ){g=bi._path2curve(g);b=bi._path2curve(b);var bX,S,bW,E,bU,bO,d,bR,b3,b2,b4=bZ?0:[];for(var bV=0,bP=g.length;bV1){ck=aI.sqrt(ck);b4=ck*b4;b2=ck*b2}var g=b4*b4,cd=b2*b2,cf=(bQ==E?-1:1)*aI.sqrt(ak((g*cd-g*b9*b9-cd*ca*ca)/(g*b9*b9+cd*ca*ca))),bZ=cf*b4*b9/b2+(bV+bU)/2,bY=cf*-b2*ca/b4+(cq+cp)/2,bP=aI.asin(((cq-bY)/b2).toFixed(9)),bO=aI.asin(((cp-bY)/b2).toFixed(9));bP=bVbO){bP=bP-ag*2}if(!E&&bO>bP){bO=bO-ag*2}}else{bP=bX[0];bO=bX[1];bZ=bX[2];bY=bX[3]}var bT=bO-bP;if(ak(bT)>b1){var b0=bO,b3=bU,bR=cp;bO=bP+b1*(E&&bO>bP?1:-1);bU=bZ+b4*aI.cos(bO);cp=bY+b2*aI.sin(bO);b8=ab(bU,cp,b4,b2,bW,0,E,b3,bR,[bO,b0,bZ,bY])}bT=bO-bP;var S=aI.cos(bP),co=aI.sin(bP),R=aI.cos(bO),cn=aI.sin(bO),cb=aI.tan(bT/4),ce=4/3*b4*cb,cc=4/3*b2*cb,cl=[bV,cq],cj=[bV+ce*co,cq-cc*S],ci=[bU+ce*cn,cp-cc*R],cg=[bU,cp];cj[0]=2*cl[0]-cj[0];cj[1]=2*cl[1]-cj[1];if(bX){return[cj,ci,cg][av](b8)}else{b8=[cj,ci,cg][av](b8).join()[l](",");var b6=[];for(var ch=0,b7=b8.length;ch"1e12"&&(bO=0.5);ak(S)>"1e12"&&(S=0.5);if(bO>0&&bO<1){g=bL(i,d,R,E,bX,bW,bT,bQ,bO);bU.push(g.x);bR.push(g.y)}if(S>0&&S<1){g=bL(i,d,R,E,bX,bW,bT,bQ,S);bU.push(g.x);bR.push(g.y)}bV=(bW-2*E+d)-(bQ-2*bW+E);bS=2*(E-d)-2*(bW-E);bP=d-E;bO=(-bS+aI.sqrt(bS*bS-4*bV*bP))/2/bV;S=(-bS-aI.sqrt(bS*bS-4*bV*bP))/2/bV;ak(bO)>"1e12"&&(bO=0.5);ak(S)>"1e12"&&(S=0.5);if(bO>0&&bO<1){g=bL(i,d,R,E,bX,bW,bT,bQ,bO);bU.push(g.x);bR.push(g.y)}if(S>0&&S<1){g=bL(i,d,R,E,bX,bW,bT,bQ,S);bU.push(g.x);bR.push(g.y)}return{min:{x:ai[bs](0,bU),y:ai[bs](0,bR)},max:{x:bI[bs](0,bU),y:bI[bs](0,bR)}}}),bk=bi._path2curve=H(function(bX,bS){var bQ=!bS&&aR(bX);if(!bS&&bQ.curve){return aY(bQ.curve)}var E=p(bX),bT=bS&&p(bS),bU={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},S=function(b0,b1,bY){var i,b2,bZ={T:1,Q:1};if(!b0){return["C",b1.x,b1.y,b1.x,b1.y,b1.x,b1.y]}!(b0[0] in bZ)&&(b1.qx=b1.qy=null);switch(b0[0]){case"M":b1.X=b0[1];b1.Y=b0[2];break;case"A":b0=["C"][av](ab[bs](0,[b1.x,b1.y][av](b0.slice(1))));break;case"S":if(bY=="C"||bY=="S"){i=b1.x*2-b1.bx;b2=b1.y*2-b1.by}else{i=b1.x;b2=b1.y}b0=["C",i,b2][av](b0.slice(1));break;case"T":if(bY=="Q"||bY=="T"){b1.qx=b1.x*2-b1.qx;b1.qy=b1.y*2-b1.qy}else{b1.qx=b1.x;b1.qy=b1.y}b0=["C"][av](z(b1.x,b1.y,b1.qx,b1.qy,b0[1],b0[2]));break;case"Q":b1.qx=b0[1];b1.qy=b0[2];b0=["C"][av](z(b1.x,b1.y,b0[1],b0[2],b0[3],b0[4]));break;case"L":b0=["C"][av](aW(b1.x,b1.y,b0[1],b0[2]));break;case"H":b0=["C"][av](aW(b1.x,b1.y,b0[1],b1.y));break;case"V":b0=["C"][av](aW(b1.x,b1.y,b1.x,b0[1]));break;case"Z":b0=["C"][av](aW(b1.x,b1.y,b1.X,b1.Y));break}return b0},b=function(bY,bZ){if(bY[bZ].length>7){bY[bZ].shift();var b0=bY[bZ];while(b0.length){bY.splice(bZ++,0,["C"][av](b0.splice(0,6)))}bY.splice(bZ,1);bV=bI(E.length,bT&&bT.length||0)}},g=function(b2,b1,bZ,bY,b0){if(b2&&b1&&b2[b0][0]=="M"&&b1[b0][0]!="M"){b1.splice(b0,0,["M",bY.x,bY.y]);bZ.bx=0;bZ.by=0;bZ.x=b2[b0][1];bZ.y=b2[b0][2];bV=bI(E.length,bT&&bT.length||0)}};for(var bP=0,bV=bI(E.length,bT&&bT.length||0);bPR){if(d&&!bV.start){bT=aO(bS,bR,g[1],g[2],g[3],g[4],g[5],g[6],R-bQ);E+=["C"+bT.start.x,bT.start.y,bT.m.x,bT.m.y,bT.x,bT.y];if(S){return E}bV.start=E;E=["M"+bT.x,bT.y+"C"+bT.n.x,bT.n.y,bT.end.x,bT.end.y,g[5],g[6]].join();bQ+=bO;bS=+g[5];bR=+g[6];continue}if(!b&&!d){bT=aO(bS,bR,g[1],g[2],g[3],g[4],g[5],g[6],R-bQ);return{x:bT.x,y:bT.y,alpha:bT.alpha}}}bQ+=bO;bS=+g[5];bR=+g[6]}E+=g.shift()+g}bV.end=E;bT=b?bQ:d?bV:bi.findDotsAtSegment(bS,bR,g[0],g[1],g[2],g[3],g[4],g[5],1);bT.alpha&&(bT={x:bT.x,y:bT.y,alpha:bT.alpha});return bT}};var bG=aD(1),by=aD(),aB=aD(0,1);bi.getTotalLength=bG;bi.getPointAtLength=by;bi.getSubpath=function(d,i,g){if(this.getTotalLength(d)-g<0.000001){return aB(d,i).end}var b=aB(d,g,1);return i?aB(b,i).end:b};aq.getTotalLength=function(){var b=this.getPath();if(!b){return}if(this.node.getTotalLength){return this.node.getTotalLength()}return bG(b)};aq.getPointAtLength=function(b){var d=this.getPath();if(!d){return}return by(d,b)};aq.getPath=function(){var d,b=bi._getPath[this.type];if(this.type=="text"||this.type=="set"){return}if(b){d=b(this)}return d};aq.getSubpath=function(g,d){var b=this.getPath();if(!b){return}return bi.getSubpath(b,g,d)};var aG=bi.easing_formulas={linear:function(b){return b},"<":function(b){return aS(b,1.7)},">":function(b){return aS(b,0.48)},"<>":function(bO){var i=0.48-bO/1.04,g=aI.sqrt(0.1734+i*i),b=g-i,S=aS(ak(b),1/3)*(b<0?-1:1),R=-g-i,E=aS(ak(R),1/3)*(R<0?-1:1),d=S+E+0.5;return(1-d)*3*d*d+d*d*d},backIn:function(d){var b=1.70158;return d*d*((b+1)*d-b)},backOut:function(d){d=d-1;var b=1.70158;return d*d*((b+1)*d+b)+1},elastic:function(b){if(b==!!b){return b}return aS(2,-10*b)*aI.sin((b-0.075)*(2*ag)/0.3)+1},bounce:function(i){var d=7.5625,g=2.75,b;if(i<(1/g)){b=d*i*i}else{if(i<(2/g)){i-=(1.5/g);b=d*i*i+0.75}else{if(i<(2.5/g)){i-=(2.25/g);b=d*i*i+0.9375}else{i-=(2.625/g);b=d*i*i+0.984375}}}return b}};aG.easeIn=aG["ease-in"]=aG["<"];aG.easeOut=aG["ease-out"]=aG[">"];aG.easeInOut=aG["ease-in-out"]=aG["<>"];aG["back-in"]=aG.backIn;aG["back-out"]=aG.backOut;var bF=[],bH=aT.requestAnimationFrame||aT.webkitRequestAnimationFrame||aT.mozRequestAnimationFrame||aT.oRequestAnimationFrame||aT.msRequestAnimationFrame||function(b){setTimeout(b,16)},at=function(){var bO=+new Date,bW=0;for(;bW1&&!b2.next){for(b4 in d){if(d[bw](b4)){b0[b4]=b2.totalOrigin[b4]}}b2.el.attr(b0);T(b2.anim,b2.el,b2.anim.percents[0],null,b2.totalOrigin,b2.repeat-1)}if(b2.next&&!b2.stop){T(b2.anim,b2.el,b2.next,null,b2.totalOrigin,b2.repeat)}}}bi.svg&&S&&S.paper&&S.paper.safari();bF.length&&bH(at)},a1=function(b){return b>255?255:b<0?0:b};aq.animateWith=function(d,E,g,b,bO,bT){var S=this;if(S.removed){bT&&bT.call(S);return S}var bR=g instanceof f?g:bi.animation(g,b,bO,bT),bQ,bP;T(bR,S,bR.percents[0],null,S.attr());for(var R=0,bS=bF.length;Rb1){return b1}while(b2bX){b2=bZ}else{b1=bZ}bZ=(b1-b2)/2+b2}return bZ}return g(bU,1/(200*bO))}aq.onAnimation=function(b){b?bc.on("raphael.anim.frame."+this.id,b):bc.unbind("raphael.anim.frame."+this.id);return this};function f(E,g){var d=[],i={};this.ms=g;this.times=1;if(E){for(var b in E){if(E[bw](b)){i[bM(b)]=E[b];d.push(bM(b))}}d.sort(bu)}this.anim=i;this.top=d[d.length-1];this.percents=d}f.prototype.delay=function(d){var b=new f(this.anim,this.ms);b.times=this.times;b.del=+d||0;return b};f.prototype.repeat=function(d){var b=new f(this.anim,this.ms);b.del=this.del;b.times=aI.floor(bI(d,0))||1;return b};function T(b6,g,b,b4,bO,bS){b=bM(b);var cd,S,bR,ce=[],bY,bX,R,b0=b6.ms,b5={},E={},bU={};if(b4){for(b9=0,bT=bF.length;b9b4*b6.top){b=b6.percents[b9];bX=b6.percents[b9-1]||0;b0=b0/b6.top*(b-bX);bY=b6.percents[b9+1];cd=b6.anim[b];break}else{if(b4){g.attr(b6.anim[b6.percents[b9]])}}}if(!cd){return}if(!S){for(var b2 in cd){if(cd[bw](b2)){if(bo[bw](b2)||g.paper.customAttributes[bw](b2)){b5[b2]=g.attr(b2);(b5[b2]==null)&&(b5[b2]=bq[b2]);E[b2]=cd[b2];switch(bo[b2]){case bj:bU[b2]=(E[b2]-b5[b2])/b0;break;case"colour":b5[b2]=bi.getRGB(b5[b2]);var b3=bi.getRGB(E[b2]);bU[b2]={r:(b3.r-b5[b2].r)/b0,g:(b3.g-b5[b2].g)/b0,b:(b3.b-b5[b2].b)/b0};break;case"path":var bP=bk(b5[b2],E[b2]),bW=bP[1];b5[b2]=bP[0];bU[b2]=[];for(b9=0,bT=b5[b2].length;b90.5)*2-1);bQ(cg-0.5,2)+bQ(ce-0.5,2)>0.25&&(ce=bO.sqrt(0.25-bQ(cg-0.5,2))*cq+0.5)&&ce!=0.5&&(ce=ce.toFixed(5)-0.00001*cq)}return bZ});cm=cm.split(/\s*\-\s*/);if(ck=="linear"){var cf=cm.shift();cf=-bV(cf);if(isNaN(cf)){return null}var cd=[0,0,bO.cos(bi.rad(cf)),bO.sin(bi.rad(cf))],cl=1/(ca(b0(cd[2]),b0(cd[3]))||1);cd[2]*=cl;cd[3]*=cl;if(cd[2]<0){cd[0]=-cd[2];cd[2]=0}if(cd[3]<0){cd[1]=-cd[3];cd[3]=0}}var cj=bi._parseDots(cm);if(!cj){return null}S=S.replace(/[\(\)\s,\xb0#]/g,"_");if(ci.gradient&&S!=ci.gradient.id){E.defs.removeChild(ci.gradient);delete ci.gradient}if(!ci.gradient){cb=bR(ck+"Gradient",{id:S});ci.gradient=cb;bR(cb,ck=="radial"?{fx:cg,fy:ce}:{x1:cd[0],y1:cd[1],x2:cd[2],y2:cd[3],gradientTransform:ci.matrix.invert()});E.defs.appendChild(cb);for(var ch=0,cn=cj.length;ch1?cc.opacity/100:cc.opacity});case"stroke":cc=bi.getRGB(cm);co.setAttribute(cn,cc.hex);cn=="stroke"&&cc[i]("opacity")&&bR(co,{"stroke-opacity":cc.opacity>1?cc.opacity/100:cc.opacity});if(cn=="stroke"&&ck._.arrows){"startString" in ck._.arrows&&g(ck,ck._.arrows.startString);"endString" in ck._.arrows&&g(ck,ck._.arrows.endString,1)}break;case"gradient":(ck.type=="circle"||ck.type=="ellipse"||b9(cm).charAt()!="r")&&b(ck,cm);break;case"opacity":if(cl.gradient&&!cl[i]("stroke-opacity")){bR(co,{"stroke-opacity":cm>1?cm/100:cm})}case"fill-opacity":if(cl.gradient){E=bi._g.doc.getElementById(co.getAttribute("fill").replace(/^url\(#|\)$/g,bZ));if(E){cf=E.getElementsByTagName("stop");bR(cf[cf.length-1],{"stop-opacity":cm})}break}default:cn=="font-size"&&(cm=bY(cm,10)+"px");var cg=cn.replace(/(\-.)/g,function(cu){return cu.substring(1).toUpperCase()});co.style[cg]=cm;ck._.dirty=1;co.setAttribute(cn,cm);break}}}bX(ck,cs);co.style.visibility=ci},b8=1.2,bX=function(E,cd){if(E.type!="text"||!(cd[i]("text")||cd[i]("font")||cd[i]("font-size")||cd[i]("x")||cd[i]("y"))){return}var ci=E.attrs,cb=E.node,ck=cb.firstChild?bY(bi._g.doc.defaultView.getComputedStyle(cb.firstChild,bZ).getPropertyValue("font-size"),10):10;if(cd[i]("text")){ci.text=cd.text;while(cb.firstChild){cb.removeChild(cb.firstChild)}var cc=b9(cd.text).split("\n"),S=[],cg;for(var ce=0,cj=cc.length;ce"));var cq=cE.getBoundingClientRect();cO.W=cL.w=(cq.right-cq.left)/cz;cO.H=cL.h=(cq.bottom-cq.top)/cz;cO.X=cL.x;cO.Y=cL.y+cO.H/2;("x" in cH||"y" in cH)&&(cO.path.v=bi.format("m{0},{1}l{2},{1}",b9(cL.x*d),b9(cL.y*d),b9(cL.x*d)+1));var cp=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var cG=0,cI=cp.length;cG0.25&&(cs=bQ.sqrt(0.25-ch(cu-0.5,2))*((cs>0.5)*2-1)+0.5);cm=cu+bT+cs}return bY});cn=cn.split(/\s*\-\s*/);if(cl=="linear"){var S=cn.shift();S=-bV(S);if(isNaN(S)){return null}}var ck=bi._parseDots(cn);if(!ck){return null}E=E.shape||E.node;if(ck.length){E.removeChild(cq);cq.on=true;cq.method="none";cq.color=ck[0].color;cq.color2=ck[ck.length-1].color;var cr=[];for(var cg=0,cp=ck.length;cg')}}catch(E){cd=function(ch){return S.createElement("<"+ch+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}};bi._engine.initWin(bi._g.win);bi._engine.create=function(){var cg=bi._getContainer.apply(0,arguments),E=cg.container,cm=cg.height,cn,S=cg.width,cl=cg.x,ck=cg.y;if(!E){throw new Error("VML container not found.")}var ci=new bi._Paper,cj=ci.canvas=bi._g.doc.createElement("div"),ch=cj.style;cl=cl||0;ck=ck||0;S=S||512;cm=cm||342;ci.width=S;ci.height=cm;S==+S&&(S+="px");cm==+cm&&(cm+="px");ci.coordsize=d*1000+bT+d*1000;ci.coordorigin="0 0";ci.span=bi._g.doc.createElement("span");ci.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";cj.appendChild(ci.span);ch.cssText=bi.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",S,cm);if(E==1){bi._g.doc.body.appendChild(cj);ch.left=cl+"px";ch.top=ck+"px";ch.position="absolute"}else{if(E.firstChild){E.insertBefore(cj,E.firstChild)}else{E.appendChild(cj)}}ci.renderfix=function(){};return ci};bi.prototype.clear=function(){bi.eve("raphael.clear",this);this.canvas.innerHTML=bY;this.span=bi._g.doc.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas.appendChild(this.span);this.bottom=this.top=null};bi.prototype.remove=function(){bi.eve("raphael.remove",this);this.canvas.parentNode.removeChild(this.canvas);for(var E in this){this[E]=typeof this[E]=="function"?bi._removedFactory(E):null}return true};var b6=bi.st;for(var bP in bU){if(bU[R](bP)&&!b6[R](bP)){b6[bP]=(function(E){return function(){var S=arguments;return this.forEach(function(cg){cg[E].apply(cg,S)})}})(bP)}}})();aE.was?(a5.win.Raphael=bi):(Raphael=bi);return bi})); \ No newline at end of file diff --git a/deploy/plugins/rate/.gitignore b/deploy/plugins/rate/.gitignore new file mode 100755 index 000000000..4c8b8eb6f --- /dev/null +++ b/deploy/plugins/rate/.gitignore @@ -0,0 +1,2 @@ +*.zip +.DS_Store diff --git a/deploy/plugins/rate/README.md b/deploy/plugins/rate/README.md new file mode 100755 index 000000000..1edf72aef --- /dev/null +++ b/deploy/plugins/rate/README.md @@ -0,0 +1,131 @@ +# jQuery Raty - A Star Rating Plugin - [wbotelhos.com/raty](http://wbotelhos.com/raty) + +jQuery Raty is a plugin that generates a customizable star rating. + +## Version + +``` +@version 2.5.2 +@since 2010.06.11 +@author Washington Botelho +@documentation wbotelhos.com/raty +@twitter twitter.com/wbotelhos +``` + +## Required Files + ++ jquery.raty.min.js ++ star-on.png ++ star-off.png + +## Options + +```js +cancel : false // Creates a cancel button to cancel the rating. +cancelHint : 'Cancel this rating!' // The cancel's button hint. +cancelOff : 'cancel-off.png' // Icon used on active cancel. +cancelOn : 'cancel-on.png' // Icon used inactive cancel. +cancelPlace : 'left' // Cancel's button position. +click : undefined // Callback executed on rating click. +half : false // Enables half star selection. +halfShow : true // Enables half star display. +hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'] // Hints used on each star. +iconRange : undefined // Object list with position and icon on and off to do a mixed icons. +mouseout : undefined // Callback executed on mouseout. +mouseover : undefined // Callback executed on mouseover. +noRatedMsg : 'Not rated yet!' // Hint for no rated elements when it's readOnly. +number : 5 // Number of stars that will be presented. +numberMax : 20 // Max of star the option number can creates. +path : '' // A global locate where the icon will be looked. +precision : false // Enables the selection of a precision score. +readOnly : false // Turns the rating read-only. +round : { down: .25, full: .6, up: .76 } // Included values attributes to do the score round math. +score : undefined // Initial rating. +scoreName : 'score' // Name of the hidden field that holds the score value. +single : false // Enables just a single star selection. +size : 16 // The size of the icons that will be used. +space : true // Puts space between the icons. +starHalf : 'star-half.png' // The name of the half star image. +starOff : 'star-off.png' // Name of the star image off. +starOn : 'star-on.png' // Name of the star image on. +target : undefined // Element selector where the score will be displayed. +targetFormat: '{score}' // Template to interpolate the score in. +targetKeep : false // If the last rating value will be keeped after mouseout. +targetText : '' // Default text setted on target. +targetType : 'hint' // Option to choose if target will receive hint o 'score' type. +width : undefined // Manually adjust the width for the project. +``` + +## Usage + +```html +
          +``` + +```js +$('#star').raty(); +``` + +```html +
          +
          +
          +``` + +```js +$('.star').raty(); +``` + +## Functions + +```js +$('#star').raty('score'); // Get the current score. + +$('#star').raty('score', number); // Set the score. + +$('#star').raty('click', number); // Click on some star. + +$('.star').raty('readOnly', boolean); // Change the read-only state. + +$('#star').raty('cancel', boolean); // Cancel the rating. The last param force the click callback. + +$('#star').raty('reload'); // Reload the rating with the current configuration. + +$('#star').raty('set', { option: value }); // Reset the rating with new configurations. + +$('#star').raty('reload'); // Destroy the bind and give you the raw element. +``` + +## Contributors + ++ Andreas Köberle ++ Armin Primadi ++ Daniel Faria ++ Douwe Maan ++ Eric Wendelin ++ Francisco Souza ++ Gabriel Benz ++ hpgihan ++ janapol ++ jeongee ++ joe1chen ++ Murat GUZEL ++ Olle Jonsson ++ packowitz ++ Toni Uebernickel + +## Licence + +The MIT License + +Copyright (c) 2010 Washington Botelho + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## Donate + +You can do it via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X8HEP2878NDEG&item_name=jQuery%20Raty). Thanks! (: diff --git a/deploy/plugins/rate/changelog.md b/deploy/plugins/rate/changelog.md new file mode 100755 index 000000000..d54b53a8c --- /dev/null +++ b/deploy/plugins/rate/changelog.md @@ -0,0 +1,214 @@ +# jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty + +## 2.5.2 + +### Fixes + +The read-only indicator was not removing after the reset of configuration, blocking the `click` and `score` functions. + +## 2.5.1 + +### News + ++ Added function `destroy` to rollback to original object before the bind; ++ Added option `mouseout` to handle things on mouse out; ++ The `number` option can be setted via callback; (by muratguzel) ++ The `readOnly` and `scoreName` option can be setted via callback; (by aprimadi) ++ You can avoid the width style setting the option `width` to false. + +### Changes + ++ Extracted the limit of stars to the option `numberMax`; ++ The `hints` options can receives three values: + - empty string: receives an empty string as hint; + - null: receives the score value as hint; + - undefined: receives the default hint. ++ The `noRatedMsg` option value was change to "Not rated yet!"; ++ The `score` argument of `click` callback now is number instead string; ++ The `score` argument of `mouseover` callback now is number instead string; ++ The option `mouseover` no longer will trigger on mouseout. Use `mouseout`; ++ When `precision` is enabled, `half` becomes enabled and `targetType` is changed to 'score'; ++ When `readOnly` is true, the cursor style will be removed instead to use the default. + +### Fixes + ++ The `click` function was not yielding the event. ++ The `path` always was prepend avoiding absolute or different path for each icon; ++ The `readOnly` function no more unbinds external binds; ++ The `readonly` was not removed on readOnly becames disabled; ++ The `reload` function now is chainable; ++ The `set` function now is chainable. ++ The `targetKeep` was keepping the template even without score; + +## 2.4.5 + ++ Now the error messages is displayed in place of stars to be more visible; ++ Fixed the 'score' function to handle undefined score when we have no vote; ++ Fixed the mouseover function to handle undefined score when we have no vote; + - For cancel button we get 'null' to know when mouse over it; ++ Fixed multiple mouseout actions on cancel function and mouseout bind; ++ Fixed functions that was not applying not continuing to apply if someone was invalid; ++ Fixed the flag that indicates read-only or not. + +## 2.4.0 + ++ Added the function 'reload' to reload the rating with the current configuration; ++ Added the function 'set' to reload the rating applying new configurations; ++ Added the option 'mouseover' to handle a callback on mouseover the stars; (by packowitz) ++ Fixed error when 'start' options receives a string number (by eskimoblood); ++ Fixed multiples events when readOnly is applied more then time by public function; (by janapol) ++ Now attribute 'hintList' is called just of 'hints'; ++ Now attribute 'start' is called as 'score' to make more sense; ++ Now the method 'start' is called as 'score' too. + +## 2.1.0 + ++ Now Raty keeps the state of the elements and no longer depends on ID for each one: + - The score no longer has ID; + - The stars images no longer has ID; + - The stars images no longer has class. ++ Added function 'score' to recover the current score. + +## 2.0.0 + ++ Added option 'halfShow' to just display and separate from the option to vote 'half'; ++ Added option 'targetText' to choose default value when there is no score or targetKepp is off; ++ Added option 'precision' to be able rating with precision values, without star representation; ++ Added option 'space' to be able take off the spaces between the star; ++ Added option 'round' to customize the visual rounding of values; ++ Added option 'targetFormat' to customize the target with a template; ++ Added option 'single' to present only the selected star; (suggestion by newcube) ++ Fixed bug in IE 7 that returns void instead undefined when there is no an attribute; ++ Fixed bug that not set custom width when 'readOnly' is enabled; ++ Fixed bug that not set back the hints after disable read only option; ++ Fixed bug that not create cancel button when starts with 'readOnly'; ++ Fixed the function cancel() to set the right hint on target score; ++ Fixed the functions start() and click() to set the value on target when 'target' option is enabled; ++ Fixed the functions start() and click() not to be executed when 'readOnly' is enabled; ++ Fixed the 'target' option to work with 'half' and 'precision' option; ++ Fixed the index number given to Raty binded by class without id; (by "Remember me, please?") ++ Refactored the code to make it cleanner and faster; ++ Changed the class of the cancel button to 'raty-cancel' to avoid CSS conflicts; ++ Now is possible to use 'start' option as callback function to get start value; (by hpgihan) ++ Now the scope of click callback is the raty element as DOM, not jQuery selection, to follow the usual; ++ Now the field score is set to readonly when 'readOnly' is enabled; ++ Now attribute 'iconRange' is represented as a list of object with option to choose starOn and starOff; ++ Now we using the best pratice to build the plugin; ++ Now the plugin is under test with Jasmine and Jasmine jQuery. + +## 1.4.3 + ++ Now public function return the context to be able the chaining; ++ Fixed: the option 'readOnly' brokes the plugin; ++ Prevented the processing of the set of classes in public function. + +## 1.4.0 + ++ Added attribute 'target' to choose a element to display the score when the mouse is on the star; ++ Added attribute 'targetKeep' to keep the selected value on the target element; ++ Added attribute 'targetType' to choose what display in the target element: hint or number; ++ New function called $.fn.raty.cancel() to cancel the rating; ++ Now the action of cancel removes the score value instead set it to zero; ++ Using mouseover when the half star is disabled to avoid to waste actions trigger; ++ Now is possible pass a empty string in the $.fn.raty.start() to cancel the rating; ++ Public functions without specify ID or class is no longer supported. + +## 1.3.3 + ++ Fixed the icon presentation when the start attribute is setted and the iconRange is enabled; ++ Now the click function receives the event as argument. (by Eric Wendelin) + +## 1.3.2 + ++ Fixed: the last Raty configuration will not be applied in others targets Raty anymore; ++ Now is possible to use the element as identifier like div.star on direct actions. + +## 1.3.0 + ++ Added attribute size for to choose the size of the icons that will be used; ++ Added attribute width for to choose the container width of the stars; ++ Changed the name of the attribute showCancel to just cancel. + +## 1.2.1 + ++ Fixed half star when click function is enabled. + +## 1.2.0 + ++ Added support to half star selection; ++ Changed the name of the attribute onClick to just click; ++ Changed the name of the attribute showHalf to half, because of the selection support. + +## 1.0.1 + ++ Fixed the ID's auto generation to work in IE6 and IE7. + +## 1.0.0 + ++ Now you can pass a optionally ID or a class to be the target of the public function's actions; ++ Fixed the read-only that wasn't begin applied by the public function readOnly. + +## 0.9 + ++ Improved the selector to accept bind by class name; ++ Now if you don't pass a ID for the element, then it will be created; ++ Now the hint list will be applied even if the quantity are less than the stars. + +## 0.8 + ++ Added iconRange attribute. Now you can set custom icons for especific ranges; ++ Fixed the cancel button that didn't hidden when using the public function readOnly. + +## 0.7 + ++ Added noRatedMsg attribute. A hint for no rated elements when it's read-only; ++ Avoided negative star number in public function start; ++ Avoided a number bigger than the number of star in public function start; ++ Fixed the public function start when the star are read-only and is not passed a start value; ++ Fixed the half star function on it is made by public function start. + +## 0.6 + ++ Now you can use the key "this" to refer the star element itself in the onClick handler; ++ Fixed the reference context when using public functions or local functions; ++ When the stars are read-only, all titles are transformed in the corresponding title score; ++ Avoided negative star number; ++ Avoided more than 20 stars. But it's can be changed in the script if you need. + +## 0.5 + ++ Now you can put a cancel button to cancel your rating; ++ Choose the cancel image off; ++ Choose the cancel image on; ++ Choose the left or right side position for the cancel button; ++ Change the hint of the cancel button. + +## 0.4 + ++ Added support to display half star. + +## 0.3 + ++ Fixed some mistakes to work on IE browser. + +## 0.2 + ++ Added the public function click, that do the click on a star; ++ Was removed the execution of the onClick when used the function start; ++ Added onClick function that enable a callback when a star is clicked. + +## 0.1 + ++ Change the path of images; ++ Change the name image files; ++ Choose the number of stars that will be presented; ++ Choose a hint information of each star; ++ Start with a default score; ++ Set the stars read-only; ++ Choose the name of the hidden score field. + +## known Bugs + ++ On versions before 1.6 if a attribute not exists, then empty string is returned instead undefined; ++ On 1.5.2 the opt.click callback is never called, because this version always returns undefined to .call() and .apply(); ++ On 1.5.2 the attribute readonly is setted with empty value as following readonly="". diff --git a/deploy/plugins/rate/demo.html b/deploy/plugins/rate/demo.html new file mode 100755 index 000000000..559014e14 --- /dev/null +++ b/deploy/plugins/rate/demo.html @@ -0,0 +1,44 @@ + + + + + + + + + JQuery Raty + + + + + + + + + + + + + +
          + +
          +
          +
          + + + + +
          + + diff --git a/deploy/plugins/rate/demo/css/application.css b/deploy/plugins/rate/demo/css/application.css new file mode 100755 index 000000000..e14e7c698 --- /dev/null +++ b/deploy/plugins/rate/demo/css/application.css @@ -0,0 +1 @@ +@CHARSET 'UTF-8';@IMPORT url('normalize.css');@IMPORT url('common.css');@IMPORT url('pygments.css');@IMPORT url('font-awesome.css');@IMPORT url('demo.css'); \ No newline at end of file diff --git a/deploy/plugins/rate/demo/css/common.css b/deploy/plugins/rate/demo/css/common.css new file mode 100755 index 000000000..cb1016f77 --- /dev/null +++ b/deploy/plugins/rate/demo/css/common.css @@ -0,0 +1 @@ +a{color:#277da8;text-decoration:none}a:hover{color:#48a5d4}body{background:url('http://wbotelhos.com/images/background.png') #e7e7e7;font:normal 10px/1.6 'Helvetica Neue','Lucida Grande',Helvetica,Arial,sans-serif}footer{font-size:1.3em;margin:0 auto;overflow:auto;padding-bottom:15px;padding-top:10px;text-align:center;width:1100px}h2{border-bottom:1px solid #dedede;clear:right;color:#444;font-size:2.6em;letter-spacing:.5px;line-height:1.3em;padding-bottom:3px}h2 a{color:#444}h3{color:#555;font-size:1.6em;letter-spacing:.5px}ul{margin-left:0;padding-left:22px}ul li{font-size:1.3em}blockquote{background:url('http://wbotelhos.com/images/quote.gif') no-repeat;border-radius:4px;margin-left:0;padding-left:22px}blockquote p{font-size:1.3em !important;padding-left:10px;padding-top:5px}code{background-color:#f8f8f8;border:1px solid #eaeaea;border-radius:3px;margin:0 2px;padding:1px 5px;white-space:nowrap}pre{background-color:#f8f8f8;border:1px solid #eaeaea;border-radius:3px;color:#393939;font-family:menlo,monospace,serif;font-size:1.3em;padding:10px 10px;text-shadow:none}#wrapper{margin:0 auto;width:87%}#wrapper #container{margin-bottom:30px;width:100%}article>p{font-size:1.5em}.option div{color:#444;font:bold 1.4em verdana;margin-top:12px;letter-spacing:.7px}.option div span{color:#888;font:1em arial}.option p{color:#444;font-size:1.2em;letter-spacing:.4px;margin-top:5px;text-align:left}.function p{color:#444;font-size:1.2em;letter-spacing:.4px;margin-left:3px;margin-top:-8px;text-align:left}.demo{margin-bottom:10px}.highlight{clear:both}header{height:160px}header #logo{display:inline-block}header #logo h1{line-height:2em;margin-bottom:0;margin-top:18px}header #logo h1 a{color:#3b3b3b;font-size:3em;letter-spacing:-3px;line-height:1em;text-shadow:2px 2px #FFF}header #logo h1 a:hover{color:#000}header #logo p{color:#999;font-size:1.7em;font-weight:bold;margin-left:10px;margin-top:10px;text-shadow:1px 1px 1px #FFF}header nav{float:right;margin-top:20px}header nav li{display:inline-block;padding:0 7px 14px;text-align:center;width:105px}header nav li a{background-color:#d7d7d7;border-radius:4px;color:#333;display:block;font:15px helvetica;letter-spacing:.4px;padding:5px 0 2px 6px}header nav li a:hover{background-color:#BBB;color:#333}header nav li a i{font-size:1.5em;left:-20px;position:relative;top:3px}header nav li a.download{background-color:#e7d785}header nav li a.download:hover{background-color:#e3d070}.author{background-color:#fdfdfd;border-bottom:1px solid #f1f1f1;border-radius:5px;border-top:1px solid #f1f1f1;height:auto;margin:50px auto 0;overflow:auto;padding:10px;width:75%;vertical-align:middle}.author img{background-color:#EEE;display:inline-block;height:80px;width:80px;vertical-align:middle}.author .biography{color:#555;display:inline-block;font-size:1.2em;letter-spacing:.3px;margin-top:2px;padding-left:7px;padding-right:7px;width:calc(98% - 80px - 7px - 7px - 6px);vertical-align:middle}.author .biography p{margin:0}.author .social{display:inline-block;width:2%;vertical-align:middle}.author .social a{background-color:#EEE;background-repeat:no-repeat;border-radius:3px;display:block;height:16px;margin-bottom:5px;width:16px}.author .social a:last-child{margin-bottom:0}.author .social a.facebook{background-image:url('http://wbotelhos.com/images/facebook.png')}.author .social a.github{background-image:url('http://wbotelhos.com/images/github.png')}.author .social a.linkedin{background-image:url('http://wbotelhos.com/images/linkedin.png')}.author .social a.twitter{background-image:url('http://wbotelhos.com/images/twitter.png')} \ No newline at end of file diff --git a/deploy/plugins/rate/demo/css/demo.css b/deploy/plugins/rate/demo/css/demo.css new file mode 100755 index 000000000..9909039ae --- /dev/null +++ b/deploy/plugins/rate/demo/css/demo.css @@ -0,0 +1 @@ +.demo input,.demo textarea,.demo select{border:1px solid #999;border-radius:5px;color:#333;display:inline-block;height:27px;font-size:1.5em;text-align:center;width:135px;vertical-align:middle}.demo input:focus,.demo textarea:focus,.demo select:focus{border:1px solid #95bdd4}.demo input:hover,.demo textarea:hover,.demo select:hover{border:1px solid #bdbdbd}.demo textarea{resize:none;height:27px}.demo select{text-align:left}.demo .target-demo{display:inline-block;vertical-align:middle}.demo div.hint{background-color:#f8f8f8;border-radius:5px;color:#333;display:inline-block;height:27px;font-size:1.5em;text-align:center;width:135px;vertical-align:middle}.demo label{color:#444;font-size:1.7em;letter-spacing:.7px;margin-right:5px;padding-left:6px;vertical-align:middle}.demo a.run{font-size:1.5em;margin-left:5px;letter-spacing:.7px;vertical-align:middle} \ No newline at end of file diff --git a/deploy/plugins/rate/demo/css/font-awesome.css b/deploy/plugins/rate/demo/css/font-awesome.css new file mode 100755 index 000000000..5015e173e --- /dev/null +++ b/deploy/plugins/rate/demo/css/font-awesome.css @@ -0,0 +1 @@ +@font-face{font-family:'FontAwesome';src:url('../font/fontawesome-webfont.ttf') format('truetype');font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:FontAwesome;font-weight:normal;font-style:normal;display:inline-block;text-decoration:inherit}a [class^="icon-"],a [class*=" icon-"]{display:inline-block;text-decoration:inherit}.icon-large:before{vertical-align:middle;font-size:1.3333333333333333em}.btn [class^="icon-"],.nav-tabs [class^="icon-"],.btn [class*=" icon-"],.nav-tabs [class*=" icon-"]{line-height:.9em}li [class^="icon-"],li [class*=" icon-"]{display:inline-block;width:1.25em;text-align:center}li .icon-large:before,li .icon-large:before{width:1.875em}ul.icons{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.icons li [class^="icon-"],ul.icons li [class*=" icon-"]{width:.8em}ul.icons li .icon-large:before,ul.icons li .icon-large:before{vertical-align:initial}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up:before{content:"\f087"}.icon-thumbs-down:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope-alt:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-user-md:before{content:"\f200"}.icon-apple-logo:before{content:"\f500"}.icon-windows-8:before{content:"\f501"}.icon-js-fiddle:before{content:"\f502"}.icon-skype:before{content:"\f503"}.icon-youtube-sign:before{content:"\f504"}.icon-youtube:before{content:"\f505"}.icon-vimeo-sign:before{content:"\f506"}.icon-vimeo:before{content:"\f507"}.icon-lastfm-sign:before{content:"\f508"}.icon-lastfm:before{content:"\f509"}.icon-rss-sign:before{content:"\f50a"}.icon-reddit:before{content:"\f50b"}.icon-delicious-sign:before{content:"\f50c"}.icon-wordpress-sign:before{content:"\f50d"}.icon-wordpress:before{content:"\f50e"}.icon-git-fork:before{content:"\f50f"}.icon-blogger-sign:before{content:"\f510"}.icon-blogger:before{content:"\f511"}.icon-tumblr-sign:before{content:"\f512"}.icon-tumblr:before{content:"\f513"}.icon-flickr-sign:before{content:"\f514"}.icon-flickr:before{content:"\f515"}.icon-picasa-sign:before{content:"\f516"}.icon-picasa:before{content:"\f517"}.icon-amazon-sign:before{content:"\f518"}.icon-amazon:before{content:"\f519"}.icon-yelp-sign:before{content:"\f51a"}.icon-yelp:before{content:"\f51b"}.icon-soundcloud:before{content:"\f51c"}.icon-spotify:before{content:"\f51d"}.icon-yahoo-sign:before{content:"\f520"}.icon-yahoo:before{content:"\f521"}.icon-evernote-sign:before{content:"\f522"}.icon-evernote:before{content:"\f523"}.icon-google-sign:before{content:"\f524"}.icon-google:before{content:"\f525"}.icon-hacker-news:before{content:"\f526"}.icon-map:before{content:"\f529"}.icon-bus-sign:before{content:"\f52a"}.icon-bike-sign:before{content:"\f52b"}.icon-car-sign:before{content:"\f52c"}.icon-taxi-sign:before{content:"\f52d"}.icon-truck-sign:before{content:"\f52e"}.icon-handicap-sign:before{content:"\f52f"} \ No newline at end of file diff --git a/deploy/plugins/rate/demo/css/normalize.css b/deploy/plugins/rate/demo/css/normalize.css new file mode 100755 index 000000000..86fd6c000 --- /dev/null +++ b/deploy/plugins/rate/demo/css/normalize.css @@ -0,0 +1 @@ +/*! normalize.css v2.0.1 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0} \ No newline at end of file diff --git a/deploy/plugins/rate/demo/css/pygments.css b/deploy/plugins/rate/demo/css/pygments.css new file mode 100755 index 000000000..f7b7f0af5 --- /dev/null +++ b/deploy/plugins/rate/demo/css/pygments.css @@ -0,0 +1 @@ +.highlight .nd{color:#707a7c}.highlight .c1{color:#228b22}.highlight .hll{background-color:#ffc}.highlight .c{color:#080;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{color:navy;font-weight:bold}.highlight .cm{color:#080;font-style:italic}.highlight .cp{color:teal}.highlight .cs{color:#080;font-weight:bold}.highlight .gd{color:#000;background-color:#fdd}.highlight .ge{font-style:italic}.highlight .gr{color:#a00}.highlight .gh{color:#999}.highlight .gi{color:#000;background-color:#dfd}.highlight .go{color:#888}.highlight .gp{color:#555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaa}.highlight .gt{color:#a00}.highlight .kc{color:navy;font-weight:bold}.highlight .kd{color:navy;font-weight:bold}.highlight .kn{color:navy;font-weight:bold}.highlight .kp{color:navy;font-weight:bold}.highlight .kr{color:navy;font-weight:bold}.highlight .kt{color:navy;font-weight:bold}.highlight .m{color:#00f}.highlight .s{color:#00f}.highlight .na{color:red}.highlight .nt{color:navy;font-weight:bold}.highlight .ow{font-weight:bold}.highlight .w{color:#bbb}.highlight .mf{color:#00f}.highlight .mh{color:#00f}.highlight .mi{color:#00f}.highlight .mo{color:#00f}.highlight .sb{color:#00f}.highlight .sc{color:purple}.highlight .sd{color:#00f}.highlight .s2{color:#00f}.highlight .se{color:#00f}.highlight .sh{color:#00f}.highlight .si{color:#00f}.highlight .sx{color:#00f}.highlight .sr{color:#00f}.highlight .s1{color:#00f}.highlight .ss{color:#00f}.highlight .il{color:#00f} \ No newline at end of file diff --git a/deploy/plugins/rate/demo/font/fontawesome-webfont.ttf b/deploy/plugins/rate/demo/font/fontawesome-webfont.ttf new file mode 100755 index 000000000..dbf022e3c Binary files /dev/null and b/deploy/plugins/rate/demo/font/fontawesome-webfont.ttf differ diff --git a/deploy/plugins/rate/demo/img/0.png b/deploy/plugins/rate/demo/img/0.png new file mode 100755 index 000000000..49afdad8a Binary files /dev/null and b/deploy/plugins/rate/demo/img/0.png differ diff --git a/deploy/plugins/rate/demo/img/1.png b/deploy/plugins/rate/demo/img/1.png new file mode 100755 index 000000000..1d42b3673 Binary files /dev/null and b/deploy/plugins/rate/demo/img/1.png differ diff --git a/deploy/plugins/rate/demo/img/2.png b/deploy/plugins/rate/demo/img/2.png new file mode 100755 index 000000000..cb3d54d06 Binary files /dev/null and b/deploy/plugins/rate/demo/img/2.png differ diff --git a/deploy/plugins/rate/demo/img/3.png b/deploy/plugins/rate/demo/img/3.png new file mode 100755 index 000000000..3f73eaa14 Binary files /dev/null and b/deploy/plugins/rate/demo/img/3.png differ diff --git a/deploy/plugins/rate/demo/img/4.png b/deploy/plugins/rate/demo/img/4.png new file mode 100755 index 000000000..069628265 Binary files /dev/null and b/deploy/plugins/rate/demo/img/4.png differ diff --git a/deploy/plugins/rate/demo/img/5.png b/deploy/plugins/rate/demo/img/5.png new file mode 100755 index 000000000..0156c266e Binary files /dev/null and b/deploy/plugins/rate/demo/img/5.png differ diff --git a/deploy/plugins/rate/demo/img/cancel-custom-off.png b/deploy/plugins/rate/demo/img/cancel-custom-off.png new file mode 100755 index 000000000..bc6a3fa43 Binary files /dev/null and b/deploy/plugins/rate/demo/img/cancel-custom-off.png differ diff --git a/deploy/plugins/rate/demo/img/cancel-custom-on.png b/deploy/plugins/rate/demo/img/cancel-custom-on.png new file mode 100755 index 000000000..a727eceab Binary files /dev/null and b/deploy/plugins/rate/demo/img/cancel-custom-on.png differ diff --git a/deploy/plugins/rate/demo/img/cancel-off-big.png b/deploy/plugins/rate/demo/img/cancel-off-big.png new file mode 100755 index 000000000..4708dae1f Binary files /dev/null and b/deploy/plugins/rate/demo/img/cancel-off-big.png differ diff --git a/deploy/plugins/rate/demo/img/cancel-on-big.png b/deploy/plugins/rate/demo/img/cancel-on-big.png new file mode 100755 index 000000000..a01f0a3de Binary files /dev/null and b/deploy/plugins/rate/demo/img/cancel-on-big.png differ diff --git a/deploy/plugins/rate/demo/img/cookie-half.png b/deploy/plugins/rate/demo/img/cookie-half.png new file mode 100755 index 000000000..deee1574d Binary files /dev/null and b/deploy/plugins/rate/demo/img/cookie-half.png differ diff --git a/deploy/plugins/rate/demo/img/cookie-off.png b/deploy/plugins/rate/demo/img/cookie-off.png new file mode 100755 index 000000000..119edb2b7 Binary files /dev/null and b/deploy/plugins/rate/demo/img/cookie-off.png differ diff --git a/deploy/plugins/rate/demo/img/cookie-on.png b/deploy/plugins/rate/demo/img/cookie-on.png new file mode 100755 index 000000000..f5d8443b3 Binary files /dev/null and b/deploy/plugins/rate/demo/img/cookie-on.png differ diff --git a/deploy/plugins/rate/demo/img/off.png b/deploy/plugins/rate/demo/img/off.png new file mode 100755 index 000000000..e95b8c5b1 Binary files /dev/null and b/deploy/plugins/rate/demo/img/off.png differ diff --git a/deploy/plugins/rate/demo/img/on.png b/deploy/plugins/rate/demo/img/on.png new file mode 100755 index 000000000..d22fde8ba Binary files /dev/null and b/deploy/plugins/rate/demo/img/on.png differ diff --git a/deploy/plugins/rate/demo/img/star-half-big.png b/deploy/plugins/rate/demo/img/star-half-big.png new file mode 100755 index 000000000..191bc886a Binary files /dev/null and b/deploy/plugins/rate/demo/img/star-half-big.png differ diff --git a/deploy/plugins/rate/demo/img/star-off-big.png b/deploy/plugins/rate/demo/img/star-off-big.png new file mode 100755 index 000000000..7f8b1e1e3 Binary files /dev/null and b/deploy/plugins/rate/demo/img/star-off-big.png differ diff --git a/deploy/plugins/rate/demo/img/star-on-big.png b/deploy/plugins/rate/demo/img/star-on-big.png new file mode 100755 index 000000000..9f7d095df Binary files /dev/null and b/deploy/plugins/rate/demo/img/star-on-big.png differ diff --git a/deploy/plugins/rate/demo/js/jquery.min.js b/deploy/plugins/rate/demo/js/jquery.min.js new file mode 100755 index 000000000..01ec66bda --- /dev/null +++ b/deploy/plugins/rate/demo/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/ +(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e){return this}if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n){return !n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n)){for(i in n){b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i])}}return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2]){return r.find(e)}this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++){if(null!=(o=arguments[u])){for(i in o){e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r))}}}return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body){return setTimeout(b.ready)}b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e)){return !1}try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf")){return !1}}catch(n){return !1}var r;for(r in e){}return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e){return !1}return !0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e){return null}"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n){return null}try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++){if(r=t.apply(e[i],n),r===!1){break}}}else{for(i in e){if(r=t.apply(e[i],n),r===!1){break}}}}else{if(a){for(;o>i;i++){if(r=t.call(e[i],i,e[i]),r===!1){break}}}else{for(i in e){if(r=t.call(e[i],i,e[i]),r===!1){break}}}}return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g){return g.call(t,e,n)}for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++){if(n in t&&t[n]===e){return n}}}return -1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r){for(;r>o;o++){e[i++]=n[o]}}else{while(n[o]!==t){e[i++]=n[o++]}}return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++){r=!!t(e[o],o),n!==r&&i.push(e[o])}return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a){for(;o>i;i++){r=t(e[i],i,n),null!=r&&(s[s.length]=r)}}else{for(i in e){r=t(e[i],i,n),null!=r&&(s[s.length]=r)}}return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r){b.access(e,n,u,r[u],!0,a,s)}}else{if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n)){for(;l>u;u++){n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)))}}}return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n){if(n=b.Deferred(),"complete"===o.readyState){setTimeout(b.ready)}else{if(o.addEventListener){o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1)}else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}}}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++){if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1){u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return !u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return !l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return !!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1){for(s=Array(r),u=Array(r),l=Array(r);r>t;t++){n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i}}return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
          a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length){return{}}s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in {submit:!0,change:!0,focusin:!0}){d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1}return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
          t
          ",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
          ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t){return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++){delete o[t[r]]}if(!(n?$:b.isEmptyObject)(o)){return}}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType){return !1}var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return !t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++){i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]))}b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else{r=t}}return r}function $(e){var t;for(t in e){if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t){return !1}}return !0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--){r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u))}return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e)){return this.each(function(t){b(this).addClass(e.call(this,t,this.className))})}if(u){for(t=(e||"").match(w)||[];s>a;a++){if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++]){0>r.indexOf(" "+i+" ")&&(r+=i+" ")}n.className=b.trim(r)}}}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e)){return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))})}if(u){for(t=(e||"").match(w)||[];s>a;a++){if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++]){while(r.indexOf(" "+i+" ")>=0){r=r.replace(" "+i+" "," ")}}n.className=e?b.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++]){u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}}else{(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")}})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++){if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0){return !0}}return !1},val:function(e){var n,r,i,o=this[0];if(arguments.length){return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set" in r&&r.set(this,o,"value")!==t||(this.value=o))})}if(o){return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get" in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return !t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++){if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o){return t}a.push(t)}}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u){return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get" in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set" in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType){while(n=o[i++]){r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)}}},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s){return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set" in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get" in o&&null!==(i=o.get(e,n))?i:e[n]}},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return !0}function ot(){return !1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--){s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0}e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--){if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--){a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a))}u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else{for(d in c){b.event.remove(e,d+t[l],n,r,!0)}}}b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode){h.push(l),f=l}f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped()){n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault()}if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped()){(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type)){for(;l!=this;l=l.parentNode||this){if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++){i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i)}o.length&&s.push({elem:l,handlers:o})}}}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando]){return e}var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--){n=r[t],e[n]=a[n]}return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus){try{return this.focus(),!1}catch(e){}}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e){this.on(a,n,r,e[a],o)}return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1){i=ot}else{if(!i){return this}}return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj){return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if("object"==typeof e){for(o in e){this.off(o,n,e[o])}return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++){if(this[t]===e){return t}}return -1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++]){n.push(t)}return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return !1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e){return n}if(1!==(s=t.nodeType)&&9!==s){return[]}if(!d&&!r){if(i=J.exec(e)){if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode){return n}if(o.id===a){return n.push(o),n}}else{if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a){return n.push(o),n}}}else{if(i[2]){return H.apply(n,q.call(t.getElementsByTagName(e),0)),n}if((a=i[3])&&T.getByClassName&&t.getElementsByClassName){return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}}}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--){l[u]=g+dt(l[u])}m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v){try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
          ",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++]){1===n.nodeType&&r.push(n)}return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t){while(t=t.parentNode){if(t===e){return !0}}}return !1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t){return u=!0,0}if(!o||!a){return e===n?-1:t===n?1:o?-1:a?1:0}if(o===a){return ut(e,t)}r=e;while(r=r.parentNode){s.unshift(r)}r=t;while(r=r.parentNode){l.unshift(r)}while(s[i]===l[i]){i++}return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t))){try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType){return n}}catch(r){}}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++){t===e[r-1]&&(i=n.push(r))}while(i--){e.splice(n[i],1)}}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r){return r}if(n){while(n=n.nextSibling){if(n===t){return -1}}}return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--){n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent){return e.textContent}for(e=e.firstChild;e;e=e.nextSibling){n+=o(e)}}else{if(3===i||4===i){return e.nodeValue}}}else{for(;t=e[r];r++){n+=o(t)}}return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return !0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return !!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g]){if(s?p.nodeName.toLowerCase()===y:1===p.nodeType){return !1}}h=g="only"===e&&!h&&"nextSibling"}return !0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop()){if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}}else{if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N){f=l[1]}else{while(p=++d&&p&&p[g]||(f=d=0)||h.pop()){if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t)){break}}}}return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--){i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--){(o=a[s])&&(e[s]=!(t[s]=o))}}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do{if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang){return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-")}}while((t=t.parentNode)&&1===t.nodeType);return !1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType){return !1}}return !0},parent:function(e){return !i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2){e.push(n)}return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2){e.push(n)}return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;){e.push(r)}return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;){e.push(r)}return e})}};for(n in {radio:!0,checkbox:!0,file:!0,password:!0,image:!0}){i.pseudos[n]=lt(n)}for(n in {submit:!0,reset:!0}){i.pseudos[n]=ct(n)}function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c){return t?0:c.slice(0)}s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter){!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length))}if(!n){break}}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++){r+=e[t].value}return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i]){if(1===t.nodeType||o){return e(t,n,r)}}}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i]){if((1===t.nodeType||o)&&e(t,n,s)){return !0}}}else{while(t=t[i]){if(1===t.nodeType||o){if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r){return u===!0}}else{if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0){return !0}}}}}}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--){if(!e[i](t,n,r)){return !1}}return !0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++){(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s))}return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--){(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}}if(o){if(i||e){if(i){l=[],c=y.length;while(c--){(p=y[c])&&l.push(m[c]=p)}i(null,y=[],l,u)}c=y.length;while(c--){(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}}else{y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)}})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return !a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++){if(n=i.relative[e[u].type]){f=[ht(gt(f),n)]}else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++){if(i.relative[e[r].type]){break}}return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||0.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++]){if(m(h,u,c)){f.push(h);break}}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++]){m(x,y,u,c)}if(s){if(v>0){while(b--){x[b]||y[b]||(y[b]=L.call(f))}}y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--){o=vt(t[n]),o[x]?r.push(o):i.push(o)}o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++){st(e,t[r],n)}return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t){return n}e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type]){break}if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e){return H.apply(n,q.call(r,0)),n}break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e){return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++){if(b.contains(r[t],this)){return !0}}}))}for(n=[],t=0;i>t;t++){b.find(e,this[t],n)}return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++){if(b.contains(this,n[t])){return !0}}})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return !!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r))){1===o.nodeType&&i.push(o),o=o[n]}return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling){1===e.nodeType&&e!==t&&n.push(e)}return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t)){return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n})}if(t.nodeType){return b.grep(e,function(e){return e===t===n})}if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t)){return b.filter(t,r,!n)}t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement){while(t.length){n.createElement(t.pop())}}return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
          ","
          "],area:[1,"",""],param:[1,"",""],thead:[1,"","
          "],tr:[2,"","
          "],col:[2,"","
          "],td:[3,"","
          "],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
          ","
          "]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(t){b(this).wrapAll(e.call(this,t))})}if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType){e=e.firstChild}return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++){(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)))}return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild){e.removeChild(e.firstChild)}e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t){return 1===n.nodeType?n.innerHTML.replace(gt,""):t}if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++){n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e)}n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g)){return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)})}if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++){o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c)}if(a){for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++){o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")))}}l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++){b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s){for(r=0,i=s[n].length;i>r;r++){b.event.add(t,n,s[n][r])}}}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events){b.removeEvent(t,r,i.handle)}t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++){n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get())}return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s){for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++){!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n))}}return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e))){for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a){r[a]&&Ft(i,r[a])}}if(t){if(n){for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++){_t(i,r[a])}}else{_t(e,o)}}return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++){if(o=e[h],o||0===o){if("object"===b.type(o)){b.merge(d,o.nodeType?[o]:o)}else{if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--){s=s.lastChild}if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--){b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)}}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild){s.removeChild(s.firstChild)}s=f.lastChild}else{d.push(t.createTextNode(o))}}}}s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++]){if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++]){kt.test(o.type||"")&&n.push(o)}}}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++){if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events){for(r in a.events){f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle)}}l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e){return t}var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--){if(t=en[i]+n,t in e){return t}}return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++){r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))))}for(a=0;s>a;a++){r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"))}return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++){a[n[s]]=b.css(e,n[s],!1,o)}return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t){return s&&"get" in s&&(o=s.get(e,!1,i))!==t?o:l[n]}if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set" in s&&(r=s.set(e,r,i))===t))){try{l[n]=r}catch(c){}}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get" in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t){a[o]=e.style[o],e.style[o]=t[o]}i=n.apply(e,r||[]);for(o in t){e.style[o]=a[o]}return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2){"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)))}return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i)){return i}r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b(" + + + + + + diff --git a/docs/how_to_developing_comps.html b/docs/how_to_developing_comps.html old mode 100644 new mode 100755 diff --git a/docs/requirejs_compatibility.txt b/docs/requirejs_compatibility.txt old mode 100644 new mode 100755 index a2602f108..48a3021a9 --- a/docs/requirejs_compatibility.txt +++ b/docs/requirejs_compatibility.txt @@ -1,3 +1,22 @@ ;(function(define, _win) { 'use strict'; define( [ 'JC.common', 'JC.BaseMVC' ], function(){ +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); -});}(typeof define === 'function' && define.amd ? define : function (_require, _cb) { _cb && _cb(); }, this)); + +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){ +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +); diff --git a/docs_api/api.js b/docs_api/api.js index 216fe02db..52e24deb6 100644 --- a/docs_api/api.js +++ b/docs_api/api.js @@ -1,44 +1,79 @@ YUI.add("yuidoc-meta", function(Y) { Y.YUIDoc = { meta: { "classes": [ - ".window", + ".Bizs", + ".JC", + "JC.AjaxTree", "JC.AjaxUpload", "JC.AutoChecked", + "JC.AutoComplete", + "JC.AutoFixed", "JC.AutoSelect", "JC.BaseMVC", "JC.BaseMVC.Model", - "JC.Bizs", "JC.Calendar", + "JC.DCalendar", "JC.Dialog", "JC.Dialog.alert", "JC.Dialog.confirm", "JC.Dialog.mask", "JC.Dialog.msgbox", + "JC.Drag", + "JC.DragSelect", + "JC.FChart", "JC.Fixed", + "JC.FlowChart", "JC.Form", + "JC.FormFillUrl", + "JC.FrameUtil", + "JC.ImageCutter", "JC.LunarCalendar", + "JC.NumericStepper", + "JC.Paginator", "JC.Panel", "JC.Placeholder", + "JC.PopTips", + "JC.ServerSort", "JC.Slider", + "JC.StepControl", "JC.Suggest", "JC.Tab", + "JC.TableFreeze", "JC.Tips", "JC.Tree", "JC.Valid", "JC.alert", + "JC.common", "JC.confirm", + "JC.f", "JC.hideAllPanel", "JC.hideAllPopup", "JC.msgbox", "window.Bizs.ActionLogic", + "window.Bizs.AutoSelectComplete", + "window.Bizs.ChangeLogic", "window.Bizs.CommonModify", + "window.Bizs.CustomColumn", + "window.Bizs.DMultiDate", "window.Bizs.DisableLogic", + "window.Bizs.DropdownTree", "window.Bizs.FormLogic", + "window.Bizs.InputSelect", "window.Bizs.KillISPCache", + "window.Bizs.MoneyTips", + "window.Bizs.MultiAutoComplete", + "window.Bizs.MultiChangeLogic", "window.Bizs.MultiDate", - "window.JC", - "window.UXC", - "window.jQuery" + "window.Bizs.MultiSelect", + "window.Bizs.MultiSelectTree", + "window.Bizs.MultiUpload", + "window.Bizs.MultiselectPanel", + "window.Bizs.TaskViewer", + "window.JSON", + "window.Raphael", + "window.jQuery", + "window.jQuery.mousewheel", + "window.swfobject" ], "modules": [], "allModules": [] diff --git a/docs_api/assets/css/cssgrids-min.css b/docs_api/assets/css/cssgrids-min.css new file mode 100644 index 000000000..346a4c254 --- /dev/null +++ b/docs_api/assets/css/cssgrids-min.css @@ -0,0 +1,2 @@ +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +.yui3-g{letter-spacing:-0.31em;*letter-spacing:normal;*word-spacing:-0.43em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.yui3-g{word-spacing:-0.43em}.yui3-u{display:inline-block;zoom:1;*display:inline;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.yui3-u-1,.yui3-u-1-2,.yui3-u-1-3,.yui3-u-2-3,.yui3-u-1-4,.yui3-u-3-4,.yui3-u-1-5,.yui3-u-2-5,.yui3-u-3-5,.yui3-u-4-5,.yui3-u-1-6,.yui3-u-5-6,.yui3-u-1-8,.yui3-u-3-8,.yui3-u-5-8,.yui3-u-7-8,.yui3-u-1-12,.yui3-u-5-12,.yui3-u-7-12,.yui3-u-11-12,.yui3-u-1-24,.yui3-u-5-24,.yui3-u-7-24,.yui3-u-11-24,.yui3-u-13-24,.yui3-u-17-24,.yui3-u-19-24,.yui3-u-23-24{display:inline-block;zoom:1;*display:inline;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.yui3-u-1{display:block}.yui3-u-1-2{width:50%}.yui3-u-1-3{width:33.33333%}.yui3-u-2-3{width:66.66666%}.yui3-u-1-4{width:25%}.yui3-u-3-4{width:75%}.yui3-u-1-5{width:20%}.yui3-u-2-5{width:40%}.yui3-u-3-5{width:60%}.yui3-u-4-5{width:80%}.yui3-u-1-6{width:16.656%}.yui3-u-5-6{width:83.33%}.yui3-u-1-8{width:12.5%}.yui3-u-3-8{width:37.5%}.yui3-u-5-8{width:62.5%}.yui3-u-7-8{width:87.5%}.yui3-u-1-12{width:8.3333%}.yui3-u-5-12{width:41.6666%}.yui3-u-7-12{width:58.3333%}.yui3-u-11-12{width:91.6666%}.yui3-u-1-24{width:4.1666%}.yui3-u-5-24{width:20.8333%}.yui3-u-7-24{width:29.1666%}.yui3-u-11-24{width:45.8333%}.yui3-u-13-24{width:54.1666%}.yui3-u-17-24{width:70.8333%}.yui3-u-19-24{width:79.1666%}.yui3-u-23-24{width:95.8333%}#yui3-css-stamp.cssgrids{display:none} diff --git a/docs_api/assets/css/images/sprite.png b/docs_api/assets/css/images/sprite.png new file mode 100644 index 000000000..321bc3f25 Binary files /dev/null and b/docs_api/assets/css/images/sprite.png differ diff --git a/docs_api/assets/css/prettify-min.css b/docs_api/assets/css/prettify-min.css new file mode 100644 index 000000000..d44b3a228 --- /dev/null +++ b/docs_api/assets/css/prettify-min.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/docs_api/assets/css/tabview.css b/docs_api/assets/css/tabview.css new file mode 100644 index 000000000..0daf3e8de --- /dev/null +++ b/docs_api/assets/css/tabview.css @@ -0,0 +1,2 @@ +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +.yui3-tab-panel{display:none}.yui3-tab-panel-selected{display:block}.yui3-tabview-list,.yui3-tab{margin:0;padding:0;list-style:none}.yui3-tabview{position:relative}.yui3-tabview,.yui3-tabview-list,.yui3-tabview-panel,.yui3-tab,.yui3-tab-panel{zoom:1}.yui3-tab{display:inline-block;*display:inline;vertical-align:bottom;cursor:pointer}.yui3-tab-label{display:block;display:inline-block;padding:6px 10px;position:relative;text-decoration:none;vertical-align:bottom}.yui3-skin-sam .yui3-tabview-list{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui3-skin-sam .yui3-tab{margin:0 .2em 0 0;padding:1px 0 0;zoom:1}.yui3-skin-sam .yui3-tab-selected{margin-bottom:-1px}.yui3-skin-sam .yui3-tab-label{background:#d8d8d8 url(http://p4.qhimg.com/d/inn/5ee31427/sprite.png) repeat-x;border:solid #a3a3a3;border-width:1px 1px 0 1px;color:#000;cursor:pointer;font-size:85%;padding:.3em .75em;text-decoration:none}.yui3-skin-sam .yui3-tab-label:hover,.yui3-skin-sam .yui3-tab-label:focus{background:#bfdaff url(http://p4.qhimg.com/d/inn/5ee31427/sprite.png) repeat-x left -1300px;outline:0}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:focus,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:hover{background:#2647a0 url(http://p4.qhimg.com/d/inn/5ee31427/sprite.png) repeat-x left -1400px;color:#fff}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{padding:.4em .75em}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{border-color:#243356}.yui3-skin-sam .yui3-tabview-panel{background:#edf5ff}.yui3-skin-sam .yui3-tabview-panel{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}#yui3-css-stamp.skin-sam-tabview{display:none} diff --git a/docs_api/assets/css/widget.css b/docs_api/assets/css/widget.css new file mode 100644 index 000000000..f19f60df2 --- /dev/null +++ b/docs_api/assets/css/widget.css @@ -0,0 +1,2 @@ +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important}#yui3-css-stamp.skin-sam-widget-base{display:none} diff --git a/docs_api/assets/js/comps1.js b/docs_api/assets/js/comps1.js new file mode 100644 index 000000000..f027c9653 --- /dev/null +++ b/docs_api/assets/js/comps1.js @@ -0,0 +1,41 @@ +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("oop",function(e,t){function a(t,n,i,s,o){if(t&&t[o]&&t!==e)return t[o].call(t,n,i);switch(r.test(t)){case 1:return r[o](t,n,i);case 2:return r[o](e.Array(t,0,!0),n,i);default:return e.Object[o](t,n,i,s)}}var n=e.Lang,r=e.Array,i=Object.prototype,s="_~yuim~_",o=i.hasOwnProperty,u=i.toString;e.augment=function(t,n,r,i,s){var a=t.prototype,f=a&&n,l=n.prototype,c=a||t,h,p,d,v,m;return s=s?e.Array(s):[],f&&(p={},d={},v={},h=function(e,t){if(r||!(t in a))u.call(e)==="[object Function]"?(v[t]=e,p[t]=d[t]=function(){return m(this,e,arguments)}):p[t]=e},m=function(e,t,r){for(var i in v)o.call(v,i)&&e[i]===d[i]&&(e[i]=v[i]);return n.apply(e,s),t.apply(e,r)},i?e.Array.each(i,function(e){e in l&&h(l[e],e)}):e.Object.each(l,h,null,!0)),e.mix(c,p||l,r,i),f||n.apply(c,s),t},e.aggregate=function(t,n,r,i){return e.mix(t,n,r,i,0,!0)},e.extend=function(t,n,r,s){(!n||!t)&&e.error("extend failed, verify dependencies");var o=n.prototype,u=e.Object(o);return t.prototype=u,u.constructor=t,t.superclass=o,n!=Object&&o.constructor==i.constructor&&(o.constructor=n),r&&e.mix(u,r,!0),s&&e.mix(t,s,!0),t},e.each=function(e,t,n,r){return a(e,t,n,r,"each")},e.some=function(e,t,n,r){return a(e,t,n,r,"some")},e.clone=function(t,r,i,o,u,a){if(!n.isObject(t))return t;if(e.instanceOf(t,YUI))return t;var f,l=a||{},c,h=e.each;switch(n.type(t)){case"date":return new Date(t);case"regexp":return t;case"function":return t;case"array":f=[];break;default:if(t[s])return l[t[s]];c=e.guid(),f=r?{}:e.Object(t),t[s]=c,l[c]=t}return!t.addEventListener&&!t.attachEvent&&h(t,function(n,a){(a||a===0)&&(!i||i.call(o||this,n,a,this,t)!==!1)&&a!==s&&a!="prototype"&&(this[a]=e.clone(n,r,i,o,u||t,l))},f),a||(e.Object.each(l,function(e,t){if(e[s])try{delete e[s]}catch(n){e[s]=null}},this),l=null),f},e.bind=function(t,r){var i=arguments.length>2?e.Array(arguments,2,!0):null;return function(){var s=n.isString(t)?r[t]:t,o=i?i.concat(e.Array(arguments,0,!0)):arguments;return s.apply(r||s,o)}},e.rbind=function(t,r){var i=arguments.length>2?e.Array(arguments,2,!0):null;return function(){var s=n.isString(t)?r[t]:t,o=i?e.Array(arguments,0,!0).concat(i):arguments;return s.apply(r||s,o)}}},"3.9.1",{requires:["yui-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("event-custom-base",function(e,t){e.Env.evt={handles:{},plugins:{}};var n=0,r=1,i={objs:null,before:function(t,r,i,s){var o=t,u;return s&&(u=[t,s].concat(e.Array(arguments,4,!0)),o=e.rbind.apply(e,u)),this._inject(n,o,r,i)},after:function(t,n,i,s){var o=t,u;return s&&(u=[t,s].concat(e.Array(arguments,4,!0)),o=e.rbind.apply(e,u)),this._inject(r,o,n,i)},_inject:function(t,n,r,i){var s=e.stamp(r),o,u;return r._yuiaop||(r._yuiaop={}),o=r._yuiaop,o[i]||(o[i]=new e.Do.Method(r,i),r[i]=function(){return o[i].exec.apply(o[i],arguments)}),u=s+e.stamp(n)+i,o[i].register(u,n,t),new e.EventHandle(o[i],u)},detach:function(e){e.detach&&e.detach()},_unload:function(e,t){}};e.Do=i,i.Method=function(e,t){this.obj=e,this.methodName=t,this.method=e[t],this.before={},this.after={}},i.Method.prototype.register=function(e,t,n){n?this.after[e]=t:this.before[e]=t},i.Method.prototype._delete=function(e){delete this.before[e],delete this.after[e]},i.Method.prototype.exec=function(){var t=e.Array(arguments,0,!0),n,r,s,o=this.before,u=this.after,a=!1;for(n in o)if(o.hasOwnProperty(n)){r=o[n].apply(this.obj,t);if(r)switch(r.constructor){case i.Halt:return r.retVal;case i.AlterArgs:t=r.newArgs;break;case i.Prevent:a=!0;break;default:}}a||(r=this.method.apply(this.obj,t)),i.originalRetVal=r,i.currentRetVal=r;for(n in u)if(u.hasOwnProperty(n)){s=u[n].apply(this.obj,t);if(s&&s.constructor==i.Halt)return s.retVal;s&&s.constructor==i.AlterReturn&&(r=s.newRetVal,i.currentRetVal=r)}return r},i.AlterArgs=function(e,t){this.msg=e,this.newArgs=t},i.AlterReturn=function(e,t){this.msg=e,this.newRetVal=t},i.Halt=function(e,t){this.msg=e,this.retVal=t},i.Prevent=function(e){this.msg=e},i.Error=i.Halt;var s=e.Array,o="after",u=["broadcast","monitored","bubbles","context","contextFn","currentTarget","defaultFn","defaultTargetOnly","details","emitFacade","fireOnce","async","host","preventable","preventedFn","queuable","silent","stoppedFn","target","type"],a=s.hash(u),f=Array.prototype.slice,l=9,c="yui:log",h=function(e,t,n){var r;for(r in t)a[r]&&(n||!(r in e))&&(e[r]=t[r]);return e};e.CustomEvent=function(t,n){this._kds=e.CustomEvent.keepDeprecatedSubs,n=n||{},this.id=e.stamp(this),this.type=t,this.context=e,this.logSystem=t==c,this.silent=this.logSystem,this._kds&&(this.subscribers={}),this._subscribers=[],this._kds&&(this.afters={}),this._afters=[],this.preventable=!0,this.bubbles=!0,this.signature=l,this.applyConfig(n,!0)},e.CustomEvent.keepDeprecatedSubs=!1,e.CustomEvent.mixConfigs=h,e.CustomEvent.prototype={constructor:e.CustomEvent,hasSubs:function(e){var t=this._subscribers.length,n=this._afters.length,r=this.sibling;return r&&(t+=r._subscribers.length,n+=r._afters.length),e?e=="after"?n:t:t+n},monitor:function(e){this.monitored=!0;var t=this.id+"|"+this.type+"_"+e,n=f.call(arguments,0);return n[0]=t,this.host.on.apply(this.host,n)},getSubs:function(){var e=this._subscribers,t=this._afters,n=this.sibling;return e=n?e.concat(n._subscribers):e.concat(),t=n?t.concat(n._afters):t.concat(),[e,t]},applyConfig:function(e,t){h(this,e,t)},_on:function(t,n,r,i){var s=new e.Subscriber(t,n,r,i);return this.fireOnce&&this.fired&&(this.async?setTimeout(e.bind(this._notify,this,s,this.firedWith),0):this._notify(s,this.firedWith)),i==o?this._afters.push(s):this._subscribers.push(s),this._kds&&(i==o?this.afters[s.id]=s:this.subscribers[s.id]=s),new e.EventHandle(this,s)},subscribe:function(e,t){var n=arguments.length>2?f.call(arguments,2):null;return this._on(e,t,n,!0)},on:function(e,t){var n=arguments.length>2?f.call(arguments,2):null;return this.monitored&&this.host&&this.host._monitor("attach",this,{args:arguments}),this._on(e,t,n,!0)},after:function(e,t){var n=arguments.length>2?f.call(arguments,2):null;return this._on(e,t,n,o)},detach:function(e,t){if(e&&e.detach)return e.detach();var n,r,i=0,s=this._subscribers,o=this._afters;for(n=s.length;n>=0;n--)r=s[n],r&&(!e||e===r.fn)&&(this._delete(r,s,n),i++);for(n=o.length;n>=0;n--)r=o[n],r&&(!e||e===r.fn)&&(this._delete(r,o,n),i++);return i},unsubscribe:function(){return this.detach.apply(this,arguments)},_notify:function(e,t,n){var r;return r=e.notify(t,this),!1===r||this.stopped>1?!1:!0},log:function(e,t){},fire:function(){if(this.fireOnce&&this.fired)return!0;var e=f.call(arguments,0);return this.fired=!0,this.fireOnce&&(this.firedWith=e),this.emitFacade?this.fireComplex(e):this.fireSimple(e)},fireSimple:function(e){this.stopped=0,this.prevented=0;if(this.hasSubs()){var t=this.getSubs();this._procSubs(t[0],e),this._procSubs(t[1],e)}return this._broadcast(e),this.stopped?!1:!0},fireComplex:function(e){return e[0]=e[0]||{},this.fireSimple(e)},_procSubs:function(e,t,n){var r,i,s;for(i=0,s=e.length;i-1?e:t+d+e}),w=e.cached(function(e,t){var n=e,r,i,s;return p.isString(n)?(s=n.indexOf(m),s>-1&&(i=!0,n=n.substr(m.length)),s=n.indexOf(v),s>-1&&(r=n.substr(0,s),n=n.substr(s+1),n=="*"&&(n=null)),[r,t?b(n,t):n,i,n]):n}),E=function(t){var n=p.isObject(t)?t:{};this._yuievt=this._yuievt||{id:e.guid(),events:{},targets:{},config:n,chain:"chain"in n?n.chain:e.config.chain,bubbling:!1,defaults:{context:n.context||this,host:this,emitFacade:n.emitFacade,fireOnce:n.fireOnce,queuable:n.queuable,monitored:n.monitored,broadcast:n.broadcast,defaultTargetOnly:n.defaultTargetOnly,bubbles:"bubbles"in n?n.bubbles:!0}}};E.prototype={constructor:E,once:function(){var e=this.on.apply(this,arguments);return e.batch(function(e){e.sub&&(e.sub.once=!0)}),e},onceAfter:function(){var e=this.after.apply(this,arguments);return e.batch(function(e){e.sub&&(e.sub.once=!0)}),e},parseType:function(e,t){return w(e,t||this._yuievt.config.prefix)},on:function(t,n,r){var i=this._yuievt,s=w(t,i.config.prefix),o,u,a,l,c,h,d,v=e.Env.evt.handles,g,y,b,E=e.Node,S,x,T;this._monitor("attach",s[1],{args:arguments,category:s[0],after:s[2]});if(p.isObject(t))return p.isFunction(t)?e.Do.before.apply(e.Do,arguments):(o=n,u=r,a=f.call(arguments,0),l=[],p.isArray(t)&&(T=!0),g=t._after,delete t._after,e.each(t,function(e,t){p.isObject(e)&&(o=e.fn||(p.isFunction(e)?e:o),u=e.context||u);var n=g?m:"";a[0]=n+(T?e:t),a[1]=o,a[2]=u,l.push(this.on.apply(this,a))},this),i.chain?this:new e.EventHandle(l));h=s[0],g=s[2],b=s[3];if(E&&e.instanceOf(this,E)&&b in E.DOM_EVENTS)return a=f.call(arguments,0),a.splice(2,0,E.getDOMNode(this)),e.on.apply(e,a);t=s[1];if(e.instanceOf(this,YUI)){y=e.Env.evt.plugins[t],a=f.call(arguments,0),a[0]=b,E&&(S=a[2],e.instanceOf(S,e.NodeList)?S=e.NodeList.getDOMNodes(S):e.instanceOf(S,E)&&(S=E.getDOMNode(S)),x=b in E.DOM_EVENTS,x&&(a[2]=S));if(y)d=y.on.apply(e,a);else if(!t||x)d=e.Event._attach(a)}return d||(c=i.events[t]||this.publish(t),d=c._on(n,r,arguments.length>3?f.call(arguments,3):null,g?"after":!0)),h&&(v[h]=v[h]||{},v[h][t]=v[h][t]||[],v[h][t].push(d)),i.chain?this:d},subscribe:function(){return this.on.apply(this,arguments)},detach:function(t,n,r){var i=this._yuievt.events,s,o=e.Node,u=o&&e.instanceOf(this,o);if(!t&&this!==e){for(s in i)i.hasOwnProperty(s)&&i[s].detach(n,r);return u&&e.Event.purgeElement(o.getDOMNode(this)),this}var a=w(t,this._yuievt.config.prefix),l=p.isArray(a)?a[0]:null,c=a?a[3]:null,h,d=e.Env.evt.handles,v,m,g,y,b=function(e,t,n){var r=e[t],i,s;if(r)for(s=r.length-1;s>=0;--s)i=r[s].evt,(i.host===n||i.el===n)&&r[s].detach()};if(l){m=d[l],t=a[1],v=u?e.Node.getDOMNode(this):this;if(m){if(t)b(m,t,v);else for(s in m)m.hasOwnProperty(s)&&b(m,s,v);return this}}else{if(p.isObject(t)&&t.detach)return t.detach(),this;if(u&&(!c||c in o.DOM_EVENTS))return g=f.call(arguments,0),g[2]=o.getDOMNode(this),e.detach.apply(e,g),this}h=e.Env.evt.plugins[c];if(e.instanceOf(this,YUI)){g=f.call(arguments,0);if(h&&h.detach)return h.detach.apply(e,g),this;if(!t||!h&&o&&t in o.DOM_EVENTS)return g[0]=t,e.Event.detach.apply(e.Event,g),this}return y=i[a[1]],y&&y.detach(n,r),this},unsubscribe:function(){return this.detach.apply(this,arguments)},detachAll:function(e){return this.detach(e)},unsubscribeAll:function(){return this.detachAll.apply(this,arguments)},publish:function(t,n){var r,i,s,o,u=this._yuievt,a=u.config.prefix;return p.isObject(t)?(s={},e.each(t,function(e,t){s[t]=this.publish(t,e||n)},this),s):(t=a?b(t,a):t,r=u.events,i=r[t],this._monitor("publish",t,{args:arguments}),i?n&&i.applyConfig(n,!0):(o=u.defaults,i=new e.CustomEvent(t,o),n&&i.applyConfig(n,!0),r[t]=i),r[t])},_monitor:function(e,t,n){var r,i,s;if(t){typeof t=="string"?(s=t,i=this.getEvent(t,!0)):(i=t,s=t.type);if(this._yuievt.config.monitored&&(!i||i.monitored)||i&&i.monitored)r=s+"_"+e,n.monitored=e,this.fire.call(this,r,n)}},fire:function(e){var t=p.isString(e),n=t?e:e&&e.type,r=this._yuievt,i=r.config.prefix,s,o,u,a=t?f.call(arguments,1):arguments;n=i?b(n,i):n,s=this.getEvent(n,!0),u=this.getSibling(n,s),u&&!s&&(s=this.publish(n)),this._monitor("fire",s||n,{args:a});if(!s){if(r.hasTargets)return this.bubble({type:n},a,this);o=!0}else s.sibling=u,o=s.fire.apply(s,a);return r.chain?this:o},getSibling:function(e,t){var n;return e.indexOf(d)>-1&&(e=y(e),n=this.getEvent(e,!0),n&&(n.applyConfig(t),n.bubbles=!1,n.broadcast=0)),n},getEvent:function(e,t){var n,r;return t||(n=this._yuievt.config.prefix,e=n?b(e,n):e),r=this._yuievt.events,r[e]||null},after:function(t,n){var r=f.call(arguments,0);switch(p.type(t)){case"function":return e.Do.after.apply(e.Do,arguments);case"array":case"object":r[0]._after=!0;break;default:r[0]=m+t}return this.on.apply(this,r)},before:function(){return this.on.apply(this,arguments)}},e.EventTarget=E,e.mix(e,E.prototype),E.call(e,{bubbles:!1}),YUI.Env.globalEvents=YUI.Env.globalEvents||new E,e.Global=YUI.Env.globalEvents},"3.9.1",{requires:["oop"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("dom-core",function(e,t){var n="nodeType",r="ownerDocument",i="documentElement",s="defaultView",o="parentWindow",u="tagName",a="parentNode",f="previousSibling",l="nextSibling",c="contains",h="compareDocumentPosition",p=[],d=function(){var t=e.config.doc.createElement("div"),n=t.appendChild(e.config.doc.createTextNode("")),r=!1;try{r=t.contains(n)}catch(i){}return r}(),v={byId:function(e,t){return v.allById(e,t)[0]||null},getId:function(e){var t;return e.id&&!e.id.tagName&&!e.id.item?t=e.id:e.attributes&&e.attributes.id&&(t=e.attributes.id.value),t},setId:function(e,t){e.setAttribute?e.setAttribute("id",t):e.id=t},ancestor:function(e,t,n,r){var i=null;return n&&(i=!t||t(e)?e:null),i||v.elementByAxis(e,a,t,null,r)},ancestors:function(e,t,n,r){var i=e,s=[];while(i=v.ancestor(i,t,n,r)){n=!1;if(i){s.unshift(i);if(r&&r(i))return s}}return s},elementByAxis:function(e,t,n,r,i){while(e&&(e=e[t])){if((r||e[u])&&(!n||n(e)))return e;if(i&&i(e))return null}return null},contains:function(e,t){var r=!1;if(!t||!e||!t[n]||!e[n])r=!1;else if(e[c]&&(t[n]===1||d))r=e[c](t);else if(e[h]){if(e===t||!!(e[h](t)&16))r=!0}else r=v._bruteContains(e,t);return r},inDoc:function(e,t){var n=!1,s;return e&&e.nodeType&&(t||(t=e[r]),s=t[i],s&&s.contains&&e.tagName?n=s.contains(e):n=v.contains(s,e)),n},allById:function(t,n){n=n||e.config.doc;var r=[],i=[],s,o;if(n.querySelectorAll)i=n.querySelectorAll('[id="'+t+'"]');else if(n.all){r=n.all(t);if(r){r.nodeName&&(r.id===t?(i.push(r),r=p):r=[r]);if(r.length)for(s=0;o=r[s++];)(o.id===t||o.attributes&&o.attributes.id&&o.attributes.id.value===t)&&i.push(o)}}else i=[v._getDoc(n).getElementById(t)];return i},isWindow:function(e){return!!(e&&e.scrollTo&&e.document)},_removeChildNodes:function(e){while(e.firstChild)e.removeChild(e.firstChild)},siblings:function(e,t){var n=[],r=e;while(r=r[f])r[u]&&(!t||t(r))&&n.unshift(r);r=e;while(r=r[l])r[u]&&(!t||t(r))&&n.push(r);return n},_bruteContains:function(e,t){while(t){if(e===t)return!0;t=t.parentNode}return!1},_getRegExp:function(e,t){return t=t||"",v._regexCache=v._regexCache||{},v._regexCache[e+t]||(v._regexCache[e+t]=new RegExp(e,t)),v._regexCache[e+t]},_getDoc:function(t){var i=e.config.doc;return t&&(i=t[n]===9?t:t[r]||t.document||e.config.doc),i},_getWin:function(t){var n=v._getDoc(t);return n[s]||n[o]||e.config.win},_batch:function(e,t,n,r,i,s){t=typeof t=="string"?v[t]:t;var o,u=0,a,f;if(t&&e)while(a=e[u++])o=o=t.call(v,a,n,r,i,s),typeof o!="undefined"&&(f||(f=[]),f.push(o));return typeof f!="undefined"?f:e},generateID:function(t){var n=t.id;return n||(n=e.stamp(t),t.id=n),n}};e.DOM=v},"3.9.1",{requires:["oop","features"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("dom-base",function(e,t){var n=e.config.doc.documentElement,r=e.DOM,i="tagName",s="ownerDocument",o="",u=e.Features.add,a=e.Features.test;e.mix(r,{getText:n.textContent!==undefined?function(e){var t="";return e&&(t=e.textContent),t||""}:function(e){var t="";return e&&(t=e.innerText||e.nodeValue),t||""},setText:n.textContent!==undefined?function(e,t){e&&(e.textContent=t)}:function(e,t){"innerText"in e?e.innerText=t:"nodeValue"in e&&(e.nodeValue=t)},CUSTOM_ATTRIBUTES:n.hasAttribute?{htmlFor:"for",className:"class"}:{"for":"htmlFor","class":"className"},setAttribute:function(e,t,n,i){e&&t&&e.setAttribute&&(t=r.CUSTOM_ATTRIBUTES[t]||t,e.setAttribute(t,n,i))},getAttribute:function(e,t,n){n=n!==undefined?n:2;var i="";return e&&t&&e.getAttribute&&(t=r.CUSTOM_ATTRIBUTES[t]||t,i=e.getAttribute(t,n),i===null&&(i="")),i},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(e){var t="",n;return e&&e[i]&&(n=r.VALUE_GETTERS[e[i].toLowerCase()],n?t=n(e):t=e.value),t===o&&(t=o),typeof t=="string"?t:""},setValue:function(e,t){var n;e&&e[i]&&(n=r.VALUE_SETTERS[e[i].toLowerCase()],n?n(e,t):e.value=t)},creators:{}}),u("value-set","select",{test:function(){var t=e.config.doc.createElement("select");return t.innerHTML="",t.value="2",t.value&&t.value==="2"}}),a("value-set","select")||(r.VALUE_SETTERS.select=function(e,t){for(var n=0,i=e.getElementsByTagName("option"),s;s=i[n++];)if(r.getValue(s)===t){s.selected=!0;break}}),e.mix(r.VALUE_GETTERS,{button:function(e){return e.attributes&&e.attributes.value?e.attributes.value.value:""}}),e.mix(r.VALUE_SETTERS,{button:function(e,t){var n=e.attributes.value;n||(n=e[s].createAttribute("value"),e.setAttributeNode(n)),n.value=t}}),e.mix(r.VALUE_GETTERS,{option:function(e){var t=e.attributes;return t.value&&t.value.specified?e.value:e.text},select:function(e){var t=e.value,n=e.options;return n&&n.length&&(e.multiple||e.selectedIndex>-1&&(t=r.getValue(n[e.selectedIndex]))),t}});var f,l,c;e.mix(e.DOM,{hasClass:function(t,n){var r=e.DOM._getRegExp("(?:^|\\s+)"+n+"(?:\\s+|$)");return r.test(t.className)},addClass:function(t,n){e.DOM.hasClass(t,n)||(t.className=e.Lang.trim([t.className,n].join(" ")))},removeClass:function(t,n){n&&l(t,n)&&(t.className=e.Lang.trim(t.className.replace(e.DOM._getRegExp("(?:^|\\s+)"+n+"(?:\\s+|$)")," ")),l(t,n)&&c(t,n))},replaceClass:function(e,t,n){c(e,t),f(e,n)},toggleClass:function(e,t,n){var r=n!==undefined?n:!l(e,t);r?f(e,t):c(e,t)}}),l=e.DOM.hasClass,c=e.DOM.removeClass,f=e.DOM.addClass;var h=/<([a-z]+)/i,r=e.DOM,u=e.Features.add,a=e.Features.test,p={},d=function(t,n){var r=e.config.doc.createElement("div"),i=!0;r.innerHTML=t;if(!r.firstChild||r.firstChild.tagName!==n.toUpperCase())i=!1;return i},v=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*"}catch(n){return!1}return t.firstChild&&t.firstChild.nodeName==="TBODY"}}),u("innerhtml-div","tr",{test:function(){return d("","tr")}}),u("innerhtml-div","script",{test:function(){return d("","script")}}),a("innerhtml","table")||(p.tbody=function(t,n){var i=r.create(m+t+g,n),s=e.DOM._children(i,"tbody")[0];return i.children.length>1&&s&&!v.test(t)&&s.parentNode.removeChild(s),i}),a("innerhtml-div","script")||(p.script=function(e,t){var n=t.createElement("div");return n.innerHTML="-"+e,n.removeChild(n.firstChild),n},p.link=p.style=p.script),a("innerhtml-div","tr")||(e.mix(p,{option:function(e,t){return r.create('",t)},tr:function(e,t){return r.create(""+e+"",t)},td:function(e,t){return r.create(""+e+"",t)},col:function(e,t){return r.create(""+e+"",t)},tbody:"table"}),e.mix(p,{legend:"fieldset",th:p.td,thead:p.tbody,tfoot:p.tbody,caption:p.tbody,colgroup:p.tbody,optgroup:p.option})),r.creators=p,e.mix( +e.DOM,{setWidth:function(t,n){e.DOM._setSize(t,"width",n)},setHeight:function(t,n){e.DOM._setSize(t,"height",n)},_setSize:function(e,t,n){n=n>0?n:0;var r=0;e.style[t]=n+"px",r=t==="height"?e.offsetHeight:e.offsetWidth,r>n&&(n-=r-n,n<0&&(n=0),e.style[t]=n+"px")}})},"3.9.1",{requires:["dom-core"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("selector-native",function(e,t){(function(e){e.namespace("Selector");var t="compareDocumentPosition",n="ownerDocument",r={_types:{esc:{token:"\ue000",re:/\\[:\[\]\(\)#\.\'\>+~"]/gi},attr:{token:"\ue001",re:/(\[[^\]]*\])/g},pseudo:{token:"\ue002",re:/(\([^\)]*\))/g}},useNative:!0,_escapeId:function(e){return e&&(e=e.replace(/([:\[\]\(\)#\.'<>+~"])/g,"\\$1")),e},_compare:"sourceIndex"in e.config.doc.documentElement?function(e,t){var n=e.sourceIndex,r=t.sourceIndex;return n===r?0:n>r?1:-1}:e.config.doc.documentElement[t]?function(e,n){return e[t](n)&4?-1:1}:function(e,t){var r,i,s;return e&&t&&(r=e[n].createRange(),r.setStart(e,0),i=t[n].createRange(),i.setStart(t,0),s=r.compareBoundaryPoints(1,i)),s},_sort:function(t){return t&&(t=e.Array(t,0,!0),t.sort&&t.sort(r._compare)),t},_deDupe:function(e){var t=[],n,r;for(n=0;r=e[n++];)r._found||(t[t.length]=r,r._found=!0);for(n=0;r=t[n++];)r._found=null,r.removeAttribute("_found");return t},query:function(t,n,i,s){n=n||e.config.doc;var o=[],u=e.Selector.useNative&&e.config.doc.querySelector&&!s,a=[[t,n]],f,l,c,h=u?e.Selector._nativeQuery:e.Selector._bruteQuery;if(t&&h){!s&&(!u||n.tagName)&&(a=r._splitQueries(t,n));for(c=0;f=a[c++];)l=h(f[0],f[1],i),i||(l=e.Array(l,0,!0)),l&&(o=o.concat(l));a.length>1&&(o=r._sort(r._deDupe(o)))}return i?o[0]||null:o},_replaceSelector:function(t){var n=e.Selector._parse("esc",t),i,s;return t=e.Selector._replace("esc",t),s=e.Selector._parse("pseudo",t),t=r._replace("pseudo",t),i=e.Selector._parse("attr",t),t=e.Selector._replace("attr",t),{esc:n,attrs:i,pseudos:s,selector:t}},_restoreSelector:function(t){var n=t.selector;return n=e.Selector._restore("attr",n,t.attrs),n=e.Selector._restore("pseudo",n,t.pseudos),n=e.Selector._restore("esc",n,t.esc),n},_replaceCommas:function(t){var n=e.Selector._replaceSelector(t),t=n.selector;return t&&(t=t.replace(/,/g,"\ue007"),n.selector=t,t=e.Selector._restoreSelector(n)),t},_splitQueries:function(t,n){t.indexOf(",")>-1&&(t=e.Selector._replaceCommas(t));var r=t.split("\ue007"),i=[],s="",o,u,a;if(n){n.nodeType===1&&(o=e.Selector._escapeId(e.DOM.getId(n)),o||(o=e.guid(),e.DOM.setId(n,o)),s='[id="'+o+'"] ');for(u=0,a=r.length;u-1&&e.Selector.pseudos&&e.Selector.pseudos.checked)return e.Selector.query(t,n,r,!0);try{return n["querySelector"+(r?"":"All")](t)}catch(i){return e.Selector.query(t,n,r,!0)}},filter:function(t,n){var r=[],i,s;if(t&&n)for(i=0;s=t[i++];)e.Selector.test(s,n)&&(r[r.length]=s);return r},test:function(t,r,i){var s=!1,o=!1,u,a,f,l,c,h,p,d,v;if(t&&t.tagName)if(typeof r=="function")s=r.call(t,t);else{u=r.split(","),!i&&!e.DOM.inDoc(t)&&(a=t.parentNode,a?i=a:(c=t[n].createDocumentFragment(),c.appendChild(t),i=c,o=!0)),i=i||t[n],h=e.Selector._escapeId(e.DOM.getId(t)),h||(h=e.guid(),e.DOM.setId(t,h));for(p=0;v=u[p++];){v+='[id="'+h+'"]',l=e.Selector.query(v,i);for(d=0;f=l[d++];)if(f===t){s=!0;break}if(s)break}o&&c.removeChild(t)}return s},ancestor:function(t,n,r){return e.DOM.ancestor(t,function(t){return e.Selector.test(t,n)},r)},_parse:function(t,n){return n.match(e.Selector._types[t].re)},_replace:function(t,n){var r=e.Selector._types[t];return n.replace(r.re,r.token)},_restore:function(t,n,r){if(r){var i=e.Selector._types[t].token,s,o;for(s=0,o=r.length;s-1?(s=t,t=t.split(n),e.Object.setValue(i,t,r)):typeof i[t]!="undefined"&&(i[t]=r),r},c.DEFAULT_GETTER=function(t){var r=this._stateProxy,i;return t.indexOf&&t.indexOf(n)>-1?i=e.Object.getValue(r,t.split(n)):typeof r[t]!="undefined"&&(i=r[t]),i},e.mix(c.prototype,{DATA_PREFIX:"data-",toString:function(){var e=this[u]+": not bound to a node",t=this._node,n,i,s;return t&&(n=t.attributes,i=n&&n.id?t.getAttribute("id"):null,s=n&&n.className?t.getAttribute("className"):null,e=t[r],i&&(e+="#"+i),s&&(e+="."+s.replace(" ",".")),e+=" "+this[u]),e},get:function(e){var t;return this._getAttr?t=this._getAttr(e):t=this._get(e),t?t=c.scrubVal(t,this):t===null&&(t=null),t},_get:function(e){var t=c.ATTRS[e],n;return t&&t.getter?n=t.getter.call(this):c.re_aria.test(e)?n=this._node.getAttribute(e,2):n=c.DEFAULT_GETTER.apply(this,arguments),n},set:function(e,t){var n=c.ATTRS[e];return this._setAttr?this._setAttr.apply(this,arguments):n&&n.setter?n.setter.call(this,t,e):c.re_aria.test(e)?this._node.setAttribute(e,t):c.DEFAULT_SETTER.apply(this,arguments),this},setAttrs:function(t){return this._setAttrs?this._setAttrs(t):e.Object.each(t,function(e,t){this.set(t,e)},this),this},getAttrs:function(t){var n={};return this._getAttrs?this._getAttrs(t):e.Array.each(t,function(e,t){n[e]=this.get(e)},this),n},compareTo:function(e){var t=this._node;return e&&e._node&&(e=e._node),t===e},inDoc:function(e){var t=this._node;e=e?e._node||e:t[s];if(e.documentElement)return l.contains(e.documentElement,t)},getById:function(t){var n=this._node,r=l.byId(t,n[s]);return r&&l.contains(n,r)?r=e.one(r):r=null,r},ancestor:function(t,n,r){return arguments.length===2&&(typeof n=="string"||typeof n=="function")&&(r=n),e.one(l.ancestor(this._node,h(t),n,h(r)))},ancestors:function(t,n,r){return arguments.length===2&&(typeof n=="string"||typeof n=="function")&&(r=n),e.all(l.ancestors(this._node,h(t),n,h(r)))},previous:function(t,n){return e.one(l.elementByAxis(this._node,"previousSibling",h(t),n))},next:function(t,n){return e.one(l.elementByAxis(this._node,"nextSibling",h(t),n))},siblings:function(t){return e.all(l.siblings(this._node,h(t)))},one:function(t){return e.one(e.Selector.query(t,this._node,!0))},all:function(t){var n=e.all(e.Selector.query(t,this._node));return n._query=t,n._queryRoot=this._node,n},test:function(t){return e.Selector.test(this._node,t)},remove:function(e){var t=this._node;return t&&t.parentNode&&t.parentNode.removeChild(t),e&&this.destroy(),this},replace:function(e){var t=this._node;return typeof e=="string"&&(e=c.create(e)),t.parentNode.replaceChild(c.getDOMNode(e),t),this},replaceChild:function(t,n){return typeof t=="string"&&(t=l.create(t)),e.one(this._node.replaceChild(c.getDOMNode(t),c.getDOMNode(n)))},destroy:function(t){var n=e.config.doc.uniqueID?"uniqueID":"_yuid",r;this.purge(),this.unplug&&this.unplug(),this.clearData(),t&&e.NodeList.each(this.all("*"),function(t){r=c._instances[t[n]],r?r.destroy():e.Event.purgeElement(t)}),this._node=null,this._stateProxy=null,delete c._instances[this._yuid]},invoke:function(e,t,n,r,i,s){var o=this._node,u;return t&&t._node&&(t=t._node),n&&n._node&&(n=n._node),u=o[e](t,n,r,i,s),c.scrubVal(u,this)},swap:e.config.doc.documentElement.swapNode?function(e){this._node.swapNode(c.getDOMNode(e))}:function(e){e=c.getDOMNode(e);var t=this._node,n=e.parentNode,r=e.nextSibling;return r===t?n.insertBefore(t,e):e===t.nextSibling?n.insertBefore(e,t):(t.parentNode.replaceChild(e,t),l.addHTML(n,t,r)),this},hasMethod:function(e){var t=this._node;return!(!(t&&e in t&&typeof t[e]!="unknown")||typeof t[e]!="function"&&String(t[e]).indexOf("function")!==1)},isFragment:function(){return this.get("nodeType")===11},empty:function(){return this.get("childNodes").remove().destroy(!0),this},getDOMNode:function(){return this._node}},!0),e.Node=c,e.one=c.one;var p=function(t){var n=[];t&&(typeof t=="string"?(this._query=t,t=e.Selector.query(t)):t.nodeType||l.isWindow(t)?t=[t]:t._node?t=[t._node]:t[0]&&t[0]._node?(e.Array.each(t,function(e){ +e._node&&n.push(e._node)}),t=n):t=e.Array(t,0,!0)),this._nodes=t||[]};p.NAME="NodeList",p.getDOMNodes=function(e){return e&&e._nodes?e._nodes:e},p.each=function(t,n,r){var i=t._nodes;i&&i.length&&e.Array.each(i,n,r||t)},p.addMethod=function(t,n,r){t&&n&&(p.prototype[t]=function(){var t=[],i=arguments;return e.Array.each(this._nodes,function(s){var o=s.uniqueID&&s.nodeType!==9?"uniqueID":"_yuid",u=e.Node._instances[s[o]],a,f;u||(u=p._getTempNode(s)),a=r||u,f=n.apply(a,i),f!==undefined&&f!==u&&(t[t.length]=f)}),t.length?t:this})},p.importMethod=function(t,n,r){typeof n=="string"?(r=r||n,p.addMethod(n,t[n])):e.Array.each(n,function(e){p.importMethod(t,e)})},p._getTempNode=function(t){var n=p._tempNode;return n||(n=e.Node.create("
          "),p._tempNode=n),n._node=t,n._stateProxy=t,n},e.mix(p.prototype,{_invoke:function(e,t,n){var r=n?[]:this;return this.each(function(i){var s=i[e].apply(i,t);n&&r.push(s)}),r},item:function(t){return e.one((this._nodes||[])[t])},each:function(t,n){var r=this;return e.Array.each(this._nodes,function(i,s){return i=e.one(i),t.call(n||i,i,s,r)}),r},batch:function(t,n){var r=this;return e.Array.each(this._nodes,function(i,s){var o=e.Node._instances[i[u]];return o||(o=p._getTempNode(i)),t.call(n||o,o,s,r)}),r},some:function(t,n){var r=this;return e.Array.some(this._nodes,function(i,s){return i=e.one(i),n=n||i,t.call(n,i,s,r)})},toFrag:function(){return e.one(e.DOM._nl2frag(this._nodes))},indexOf:function(t){return e.Array.indexOf(this._nodes,e.Node.getDOMNode(t))},filter:function(t){return e.all(e.Selector.filter(this._nodes,t))},modulus:function(t,n){n=n||0;var r=[];return p.each(this,function(e,i){i%t===n&&r.push(e)}),e.all(r)},odd:function(){return this.modulus(2,1)},even:function(){return this.modulus(2)},destructor:function(){},refresh:function(){var t,n=this._nodes,r=this._query,i=this._queryRoot;return r&&(i||n&&n[0]&&n[0].ownerDocument&&(i=n[0].ownerDocument),this._nodes=e.Selector.query(r,i)),this},size:function(){return this._nodes.length},isEmpty:function(){return this._nodes.length<1},toString:function(){var e="",t=this[u]+": not bound to any nodes",n=this._nodes,i;return n&&n[0]&&(i=n[0],e+=i[r],i.id&&(e+="#"+i.id),i.className&&(e+="."+i.className.replace(" ",".")),n.length>1&&(e+="...["+n.length+" items]")),e||t},getDOMNodes:function(){return this._nodes}},!0),p.importMethod(e.Node.prototype,["destroy","empty","remove","set"]),p.prototype.get=function(t){var n=[],r=this._nodes,i=!1,s=p._getTempNode,o,u;return r[0]&&(o=e.Node._instances[r[0]._yuid]||s(r[0]),u=o._get(t),u&&u.nodeType&&(i=!0)),e.Array.each(r,function(r){o=e.Node._instances[r._yuid],o||(o=s(r)),u=o._get(t),i||(u=e.Node.scrubVal(u,o)),n.push(u)}),i?e.all(n):n},e.NodeList=p,e.all=function(e){return new p(e)},e.Node.all=e.all;var d=e.NodeList,v=Array.prototype,m={concat:1,pop:0,push:0,shift:0,slice:1,splice:1,unshift:0};e.Object.each(m,function(t,n){d.prototype[n]=function(){var r=[],i=0,s,o;while(typeof (s=arguments[i++])!="undefined")r.push(s._node||s._nodes||s);return o=v[n].apply(this._nodes,r),t?o=e.all(o):o=e.Node.scrubVal(o),o}}),e.Array.each(["removeChild","hasChildNodes","cloneNode","hasAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select","createCaption"],function(t){e.Node.prototype[t]=function(e,n,r){var i=this.invoke(t,e,n,r);return i}}),e.Node.prototype.removeAttribute=function(e){var t=this._node;return t&&t.removeAttribute(e,0),this},e.Node.importMethod(e.DOM,["contains","setAttribute","getAttribute","wrap","unwrap","generateID"]),e.NodeList.importMethod(e.Node.prototype,["getAttribute","setAttribute","removeAttribute","unwrap","wrap","generateID"])},"3.9.1",{requires:["dom-core","selector"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("node-base",function(e,t){var n=["hasClass","addClass","removeClass","replaceClass","toggleClass"];e.Node.importMethod(e.DOM,n),e.NodeList.importMethod(e.Node.prototype,n);var r=e.Node,i=e.DOM;r.create=function(t,n){return n&&n._node&&(n=n._node),e.one(i.create(t,n))},e.mix(r.prototype,{create:r.create,insert:function(e,t){return this._insert(e,t),this},_insert:function(e,t){var n=this._node,r=null;return typeof t=="number"?t=this._node.childNodes[t]:t&&t._node&&(t=t._node),e&&typeof e!="string"&&(e=e._node||e._nodes||e),r=i.addHTML(n,e,t),r},prepend:function(e){return this.insert(e,0)},append:function(e){return this.insert(e,null)},appendChild:function(e){return r.scrubVal(this._insert(e))},insertBefore:function(t,n){return e.Node.scrubVal(this._insert(t,n))},appendTo:function(t){return e.one(t).append(this),this},setContent:function(e){return this._insert(e,"replace"),this},getContent:function(e){return this.get("innerHTML")}}),e.Node.prototype.setHTML=e.Node.prototype.setContent,e.Node.prototype.getHTML=e.Node.prototype.getContent,e.NodeList.importMethod(e.Node.prototype,["append","insert","appendChild","insertBefore","prepend","setContent","getContent","setHTML","getHTML"]);var r=e.Node,i=e.DOM;r.ATTRS={text:{getter:function(){return i.getText(this._node)},setter:function(e){return i.setText(this._node,e),e}},"for":{getter:function(){return i.getAttribute(this._node,"for")},setter:function(e){return i.setAttribute(this._node,"for",e),e}},options:{getter:function(){return this._node.getElementsByTagName("option")}},children:{getter:function(){var t=this._node,n=t.children,r,i,s;if(!n){r=t.childNodes,n=[];for(i=0,s=r.length;i1?this._data[e]=t:this._data=e,this},clearData:function(e){return"_data"in this&&(typeof e!="undefined"?delete this._data[e]:delete this._data),this}}),e.mix(e.NodeList.prototype,{getData:function(e){var t=arguments.length?[e]:[];return this._invoke("getData",t,!0)},setData:function(e,t){var n=arguments.length>1?[e,t]: +[e];return this._invoke("setData",n)},clearData:function(e){var t=arguments.length?[e]:[];return this._invoke("clearData",[e])}})},"3.9.1",{requires:["event-base","node-core","dom-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +(function(){var e=YUI.Env;e._ready||(e._ready=function(){e.DOMReady=!0,e.remove(YUI.config.doc,"DOMContentLoaded",e._ready)},e.add(YUI.config.doc,"DOMContentLoaded",e._ready))})(),YUI.add("event-base",function(e,t){e.publish("domready",{fireOnce:!0,async:!0}),YUI.Env.DOMReady?e.fire("domready"):e.Do.before(function(){e.fire("domready")},YUI.Env,"_ready");var n=e.UA,r={},i={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},s=function(t){if(!t)return t;try{t&&3==t.nodeType&&(t=t.parentNode)}catch(n){return null}return e.one(t)},o=function(e,t,n){this._event=e,this._currentTarget=t,this._wrapper=n||r,this.init()};e.extend(o,Object,{init:function(){var e=this._event,t=this._wrapper.overrides,r=e.pageX,o=e.pageY,u,a=this._currentTarget;this.altKey=e.altKey,this.ctrlKey=e.ctrlKey,this.metaKey=e.metaKey,this.shiftKey=e.shiftKey,this.type=t&&t.type||e.type,this.clientX=e.clientX,this.clientY=e.clientY,this.pageX=r,this.pageY=o,u=e.keyCode||e.charCode,n.webkit&&u in i&&(u=i[u]),this.keyCode=u,this.charCode=u,this.which=e.which||e.charCode||u,this.button=this.which,this.target=s(e.target),this.currentTarget=s(a),this.relatedTarget=s(e.relatedTarget);if(e.type=="mousewheel"||e.type=="DOMMouseScroll")this.wheelDelta=e.detail?e.detail*-1:Math.round(e.wheelDelta/80)||(e.wheelDelta<0?-1:1);this._touch&&this._touch(e,a,this._wrapper)},stopPropagation:function(){this._event.stopPropagation(),this._wrapper.stopped=1,this.stopped=1},stopImmediatePropagation:function(){var e=this._event;e.stopImmediatePropagation?e.stopImmediatePropagation():this.stopPropagation(),this._wrapper.stopped=2,this.stopped=2},preventDefault:function(e){var t=this._event;t.preventDefault(),t.returnValue=e||!1,this._wrapper.prevented=1,this.prevented=1},halt:function(e){e?this.stopImmediatePropagation():this.stopPropagation(),this.preventDefault()}}),o.resolve=s,e.DOM2EventFacade=o,e.DOMEventFacade=o,function(){e.Env.evt.dom_wrappers={},e.Env.evt.dom_map={};var t=e.DOM,n=e.Env.evt,r=e.config,i=r.win,s=YUI.Env.add,o=YUI.Env.remove,u=function(){YUI.Env.windowLoaded=!0,e.Event._load(),o(i,"load",u)},a=function(){e.Event._unload()},f="domready",l="~yui|2|compat~",c=function(n){try{return n&&typeof n!="string"&&e.Lang.isNumber(n.length)&&!n.tagName&&!t.isWindow(n)}catch(r){return!1}},h=e.CustomEvent.prototype._delete,p=function(t){var n=h.apply(this,arguments);return this.hasSubs()||e.Event._clean(this),n},d=function(){var r=!1,u=0,h=[],v=n.dom_wrappers,m=null,g=n.dom_map;return{POLL_RETRYS:1e3,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:!1,startInterval:function(){d._interval||(d._interval=setInterval(d._poll,d.POLL_INTERVAL))},onAvailable:function(t,n,r,i,s,o){var a=e.Array(t),f,l;for(f=0;f4?n.slice(4):null),h&&a.fire(),p):!1},detach:function(n,r,i,s){var o=e.Array(arguments,0,!0),u,a,f,h,p,m;o[o.length-1]===l&&(u=!0);if(n&&n.detach)return n.detach();typeof i=="string"&&(u?i=t.byId(i):(i=e.Selector.query(i),a=i.length,a<1?i=null:a==1&&(i=i[0])));if(!i)return!1;if(i.detach)return o.splice(2,1),i.detach.apply(i,o);if(c(i)){f=!0;for(h=0,a=i.length;h0),a=[],f=function(t,n){var r,i=n.override;try{n.compat?(n.override?i===!0?r=n.obj:r=i:r=t,n.fn.call(r,n.obj)):(r=n.obj||e.one(t),n.fn.apply(r,e.Lang.isArray(i)?i:[]))}catch(s){}};for(n=0,i=h.length;n4?e.Array(arguments,4,!0):null;return e.Event.onAvailable.call(e.Event,r,n,i,s)}},e.Env.evt.plugins.contentready={on:function(t,n,r,i){var s=arguments.length>4?e.Array(arguments,4,!0):null;return e.Event.onContentReady.call(e.Event,r,n,i,s)}}},"3.9.1",{requires:["event-custom-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("event-delegate",function(e,t){function f(t,r,u,l){var c=n(arguments,0,!0),h=i(u)?u:null,p,d,v,m,g,y,b,w,E;if(s(t)){w=[];if(o(t))for(y=0,b=t.length;y1&&(g=p.shift(),c[0]=t=p.shift()),d=e.Node.DOM_EVENTS[t],s(d)&&d.delegate&&(E=d.delegate.apply(d,arguments));if(!E){if(!t||!r||!u||!l)return;v=h?e.Selector.query(h,null,!0):u,!v&&i(u)&&(E=e.on("available",function(){e.mix(E,e.delegate.apply(e,c),!0)},u)),!E&&v&&(c.splice(2,2,v),E=e.Event._attach(c,{facade:!1}),E.sub.filter=l,E.sub._notify=f.notifySub)}return E&&g&&(m=a[g]||(a[g]={}),m=m[t]||(m[t]=[]),m.push(E)),E}var n=e.Array,r=e.Lang,i=r.isString,s=r.isObject,o=r.isArray,u=e.Selector.test,a=e.Env.evt.handles;f.notifySub=function(t,r,i){r=r.slice(),this.args&&r.push.apply(r,this.args);var s=f._applyFilter(this.filter,r,i),o,u,a,l;if(s){s=n(s),o=r[0]=new e.DOMEventFacade(r[0],i.el,i),o.container=e.one(i.el);for(u=0,a=s.length;u=0;o--)s=n[o],a=s._UNPLUG,a&&e.mix(i,a,!0),u=s._PLUG,u&&e.mix(r,u,!0);for(f in r)r.hasOwnProperty(f)&&(i[f]||this.plug(r[f]));t&&t.plugins&&this.plug(t.plugins)},n.plug=function(t,n,i){var s,o,u,a;if(t!==e.Base){t._PLUG=t._PLUG||{},r.isArray(n)||(i&&(n={fn:n,cfg:i}),n=[n]);for(o=0,u=n.length;o=4.2)i[0]+=s,i[1]+=o}else i=d._getOffset(r)}return i}:function(t){var n=null,s,o,u,a,f;if(t)if(d.inDoc(t)){n=[t.offsetLeft,t.offsetTop],s=t.ownerDocument,o=t,u=e.UA.gecko||e.UA.webkit>519?!0:!1;while(o=o.offsetParent)n[0]+=o.offsetLeft,n[1]+=o.offsetTop,u&&(n=d._calcBorders(o,n));if(d.getStyle(t,r)!=i){o=t;while(o=o.parentNode){a=o.scrollTop,f=o.scrollLeft,e.UA.gecko&&d.getStyle(o,"overflow")!=="visible"&&(n=d._calcBorders(o,n));if(a||f)n[0]-=f,n[1]-=a}n[0]+=d.docScrollX(t,s),n[1]+=d.docScrollY(t,s)}else n[0]+=d.docScrollX(t,s),n[1]+=d.docScrollY(t,s)}else n=d._getOffset(t);return n}}(),getScrollbarWidth:e.cached(function(){var t=e.config.doc,n=t.createElement("div"),r=t.getElementsByTagName("body")[0],i=.1;return r&&(n.style.cssText="position:absolute;visibility:hidden;overflow:scroll;width:20px;",n.appendChild(t.createElement("p")).style.height="1px",r.insertBefore(n,r.firstChild),i=n.offsetWidth-n.clientWidth,r.removeChild(n)),i},null,.1),getX:function(e){return d.getXY(e)[0]},getY:function(e){return d.getXY(e)[1]},setXY:function(e,t,n){var i=d.setStyle,a,f,l,c;e&&t&&(a=d.getStyle(e,r),f=d._getOffset(e),a=="static"&&(a=s,i(e,r,a)),c=d.getXY(e),t[0]!==null&&i(e,o,t[0]-c[0]+f[0]+"px"),t[1]!==null&&i(e,u,t[1]-c[1]+f[1]+"px"),n||(l=d.getXY(e),(l[0]!==t[0]||l[1]!==t[1])&&d.setXY(e,t,!0)))},setX:function(e,t){return d.setXY(e,[t,null])},setY:function(e,t){return d.setXY(e,[null,t])},swapXY:function(e,t){var n=d.getXY(e);d.setXY(e,d.getXY(t)),d.setXY(t,n)},_calcBorders:function(t,n){var r=parseInt(d[p](t,c),10)||0,i=parseInt(d[p](t,l),10)||0;return e.UA.gecko&&v.test(t.tagName)&&(r=0,i=0),n[0]+=i,n[1]+=r,n},_getWinSize:function(r,i){i=i||r?d._getDoc(r):e.config.doc;var s=i.defaultView||i.parentWindow,o=i[n],u=s.innerHeight,a=s.innerWidth,f=i[t];return o&&!e.UA.opera&&(o!="CSS1Compat"&&(f=i.body),u=f.clientHeight,a=f.clientWidth),{height:u,width:a}},_getDocSize:function(r){var i=r?d._getDoc(r):e.config.doc,s=i[t];return i[n]!="CSS1Compat"&&(s=i.body),{height:s.scrollHeight,width:s.scrollWidth}}})})(e),function(e){var t="top",n="right",r="bottom",i="left",s=function(e,s){var o=Math.max(e[t],s[t]),u=Math.min(e[n],s[n]),a=Math.min(e[r],s[r]),f=Math.max(e[i],s[i]),l={};return l[t]=o,l[n]=u,l[r]=a,l[i]=f,l},o=e.DOM;e.mix(o,{region:function(e){var t=o.getXY(e),n=!1;return e&&t&&(n=o._getRegion(t[1],t[0]+e.offsetWidth,t[1]+e.offsetHeight,t[0])),n},intersect:function(u,a,f){var l=f||o.region(u),c={},h=a,p;if(h.tagName)c=o.region(h);else{if(!e.Lang.isObject(a))return!1;c=a}return p=s(c,l),{top:p[t],right:p[n],bottom:p[r],left:p[i],area:(p[r]-p[t])*(p[n]-p[i]),yoff:p[r]-p[t],xoff:p[n]-p[i],inRegion:o.inRegion(u,a,!1,f)}},inRegion:function(u,a,f,l){var c={},h=l||o.region(u),p=a,d;if(p.tagName)c=o.region(p);else{if(!e.Lang.isObject(a))return!1;c=a}return f?h[i]>=c[i]&&h[n]<=c[n]&&h[t]>=c[t]&&h[r]<=c[r]:(d=s(c,h),d[r]>=d[t]&&d[n]>=d[i]?!0:!1)},inViewportRegion:function(e,t,n){return o.inRegion(e,o.viewportRegion(e),t,n)},_getRegion:function(e,s,o,u){var a={};return a[t]=a[1]=e,a[i]=a[0]=u,a[r]=o,a[n]=s,a.width=a[n]-a[i],a.height=a[r]-a[t],a},viewportRegion:function(t){t=t||e.config.doc.documentElement;var n=!1,r,i;return t&&(r=o.docScrollX(t),i=o.docScrollY(t),n=o._getRegion(i,o.winWidth(t)+r,i+o.winHeight(t),r)),n}})}(e)},"3.9.1",{requires:["dom-base","dom-style"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("node-screen",function(e,t){e.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(t){e.Node.ATTRS[t]={getter:function(){var n=Array.prototype.slice.call(arguments);return n.unshift(e.Node.getDOMNode(this)),e.DOM[t].apply(this,n)}}}),e.Node.ATTRS.scrollLeft={getter:function(){var t=e.Node.getDOMNode(this);return"scrollLeft"in t?t.scrollLeft:e.DOM.docScrollX(t)},setter:function(t){var n=e.Node.getDOMNode(this);n&&("scrollLeft"in n?n.scrollLeft=t:(n.document||n.nodeType===9)&&e.DOM._getWin(n).scrollTo(t,e.DOM.docScrollY(n)))}},e.Node.ATTRS.scrollTop={getter:function(){var t=e.Node.getDOMNode(this);return"scrollTop"in t?t.scrollTop:e.DOM.docScrollY(t)},setter:function(t){var n=e.Node.getDOMNode(this);n&&("scrollTop"in n?n.scrollTop=t:(n.document||n.nodeType===9)&&e.DOM._getWin(n).scrollTo(e.DOM.docScrollX(n),t))}},e.Node.importMethod(e.DOM,["getXY","setXY","getX","setX","getY","setY","swapXY"]),e.Node.ATTRS.region={getter:function(){var t=this.getDOMNode(),n;return t&&!t.tagName&&t.nodeType===9&&(t=t.documentElement),e.DOM.isWindow(t)?n=e.DOM.viewportRegion(t):n=e.DOM.region(t),n}},e.Node.ATTRS.viewportRegion={getter:function(){return e.DOM.viewportRegion(e.Node.getDOMNode(this))}},e.Node.importMethod(e.DOM,"inViewportRegion"),e.Node.prototype.intersect=function(t,n){var r=e.Node.getDOMNode(this);return e.instanceOf(t,e.Node)&&(t=e.Node.getDOMNode(t)),e.DOM.intersect(r,t,n)},e.Node.prototype.inRegion=function(t,n,r){var i=e.Node.getDOMNode(this);return e.instanceOf(t,e.Node)&&(t=e.Node.getDOMNode(t)),e.DOM.inRegion(i,t,n,r)}},"3.9.1",{requires:["dom-screen","node-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("node-style",function(e,t){(function(e){e.mix(e.Node.prototype,{setStyle:function(t,n){return e.DOM.setStyle(this._node,t,n),this},setStyles:function(t){return e.DOM.setStyles(this._node,t),this},getStyle:function(t){return e.DOM.getStyle(this._node,t)},getComputedStyle:function(t){return e.DOM.getComputedStyle(this._node,t)}}),e.NodeList.importMethod(e.Node.prototype,["getStyle","getComputedStyle","setStyle","setStyles"])})(e)},"3.9.1",{requires:["dom-style","node-base"]}); diff --git a/docs_api/assets/js/comps2.js b/docs_api/assets/js/comps2.js new file mode 100644 index 000000000..4a39db1d7 --- /dev/null +++ b/docs_api/assets/js/comps2.js @@ -0,0 +1,41 @@ + +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("array-extras",function(e,t){var n=e.Array,r=e.Lang,i=Array.prototype;n.lastIndexOf=r._isNative(i.lastIndexOf)?function(e,t,n){return n||n===0?e.lastIndexOf(t,n):e.lastIndexOf(t)}:function(e,t,n){var r=e.length,i=r-1;if(n||n===0)i=Math.min(n<0?r+n:n,r);if(i>-1&&r>0)for(;i>-1;--i)if(i in e&&e[i]===t)return i;return-1},n.unique=function(e,t){var n=0,r=e.length,i=[],s,o,u,a;e:for(;n=0;--v){o=t[v];for(s in o)o.hasOwnProperty(s)&&(u=d({},o[s],g),h=u.value,m=u.cloneDefaultValue,h&&(m===undefined&&(f===h.constructor||r.isArray(h))||m===l||m===!0?u.value=e.clone(h):m===c&&(u.value=e.merge(h))),p=null,s.indexOf(i)!==-1&&(p=s.split(i),s=p.shift()),y=b[s],p&&y&&y.value?n.setValue(y.value,p,h):p||(y?(y.valueFn&&a in u&&(y.valueFn=null),d(y,u,g)):b[s]=u))}return b},_initHierarchy:function(e){var t=this._lazyAddAttrs,n,r,i,s,o,a,f,l=this._getClasses(),c=this._getAttrCfgs(),h=l.length-1;for(i=h;i>=0;i--){n=l[i],r=n.prototype,f=n._yuibuild&&n._yuibuild.exts;if(f)for(s=0,o=f.length;s":">",'"':""","'":"'","/":"/","`":"`"},r={html:function(e){return(e+"").replace(/[&<>"'\/`]/g,r._htmlReplacer)},regex:function(e){return(e+"").replace(/[\-$\^*()+\[\]{}|\\,.?\s]/g,"\\$&")},_htmlReplacer:function(e){return n[e]}};r.regexp=r.regex,e.Escape=r},"3.9.1",{requires:["yui-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("event-synthetic",function(e,t){function c(e,t){this.handle=e,this.emitFacade=t}function h(e,t,n){this.handles=[],this.el=e,this.key=n,this.domkey=t}function p(){this._init.apply(this,arguments)}var n=e.CustomEvent,r=e.Env.evt.dom_map,i=e.Array,s=e.Lang,o=s.isObject,u=s.isString,a=s.isArray,f=e.Selector.query,l=function(){};c.prototype.fire=function(t){var n=i(arguments,0,!0),r=this.handle,s=r.evt,u=r.sub,a=u.context,f=u.filter,l=t||{},c;if(this.emitFacade){if(!t||!t.preventDefault)l=s._getFacade(),o(t)&&!t.preventDefault?(e.mix(l,t,!0),n[0]=l):n.unshift(l);l.type=s.type,l.details=n.slice(),f&&(l.container=s.host)}else f&&o(t)&&t.currentTarget&&n.shift();return u.context=a||l.currentTarget||s.host,c=s.fire.apply(s,n),u.context=a,c},h.prototype={constructor:h,type:"_synth",fn:l,capture:!1,register:function(e){e.evt.registry=this,this.handles.push(e)},unregister:function(t){var n=this.handles,i=r[this.domkey],s;for(s=n.length-1;s>=0;--s)if(n[s].sub===t){n.splice(s,1);break}n.length||(delete i[this.key],e.Object.size(i)||delete r[this.domkey])},detachAll:function(){var e=this.handles,t=e.length;while(--t>=0)e[t].detach()}},e.mix(p,{Notifier:c,SynthRegistry:h,getRegistry:function(t,n,i){var s=t._node,o=e.stamp(s),u="event:"+o+n+"_synth",a=r[o];return i&&(a||(a=r[o]={}),a[u]||(a[u]=new h(s,o,u))),a&&a[u]||null},_deleteSub:function(e){if(e&&e.fn){var t=this.eventDef,r=e.filter?"detachDelegate":"detach";this._subscribers=[],n.keepDeprecatedSubs&&(this.subscribers={}),t[r](e.node,e,this.notifier,e.filter),this.registry.unregister(e),delete e.fn,delete e.node,delete e.context}},prototype:{constructor:p,_init:function(){var e=this.publishConfig||(this.publishConfig={});this.emitFacade="emitFacade"in e?e.emitFacade:!0,e.emitFacade=!1},processArgs:l,on:l,detach:l,delegate:l,detachDelegate:l,_on:function(t,n){var r=[],s=t.slice(),o=this.processArgs(t,n),a=t[2],l=n?"delegate":"on",c,h;return c=u(a)?f(a):i(a||e.one(e.config.win)),!c.length&&u(a)?(h=e.on("available",function(){e.mix(h,e[l].apply(e,s),!0)},a),h):(e.Array.each(c,function(i){var s=t.slice(),u;i=e.one(i),i&&(n&&(u=s.splice(3,1)[0]),s.splice(0,4,s[1],s[3]),(!this.preventDups||!this.getSubs(i,t,null,!0))&&r.push(this._subscribe(i,l,s,o,u)))},this),r.length===1?r[0]:new e.EventHandle(r))},_subscribe:function(t,n,r,i,s){var o=new e.CustomEvent(this.type,this.publishConfig),u=o.on.apply(o,r),a=new c(u,this.emitFacade),f=p.getRegistry(t,this.type,!0),l=u.sub;return l.node=t,l.filter=s,i&&this.applyArgExtras(i,l),e.mix(o,{eventDef:this,notifier:a,host:t,currentTarget:t,target:t,el:t._node,_delete:p._deleteSub},!0),u.notifier=a,f.register(u),this[n](t,l,a,s),u},applyArgExtras:function(e,t){t._extra=e},_detach:function(t){var n=t[2],r=u(n)?f(n):i(n),s,o,a,l,c;t.splice(2,1);for(o=0,a=r.length;o=0;--c)l[c].detach()}}},getSubs:function(e,t,n,r){var i=p.getRegistry(e,this.type),s=[],o,u,a,f;if(i){o=i.handles,n||(n=this.subMatch);for(u=0,a=o.length;u0&&o.length>v&&(o.length=v);if(h){c=h.call(this,e,o.concat());if(!c)return;for(p=0,d=c.length;p1&&(o[s-1]=e,e=o.join(n+" ")),e=e+n+" "),this.set(b,e)},_afterSourceTypeChange:function(e){this._rawSource&&this.set("source",this._rawSource)},_afterValueChange:function(e){var t=e.newVal,n=this,r=e.src===T.UI_SRC,i,s,o,u;r||n._inputNode.set(b,t),o=n.get("minQueryLength"),u=n._parseValue(t)||"",o>=0&&u.length>=o?r?(i=n.get("queryDelay"),s=function(){n.fire(S,{inputValue:t,query:u,src:e.src})},i?(clearTimeout(n._delay),n._delay=setTimeout(s,i)):s()):n._set(d,u):(clearTimeout(n._delay),n.fire(E,{prevVal:e.prevVal?n._parseValue(e.prevVal):null,src:e.src}))},_onInputBlur:function(e){var t=this.get(v),n,i,s;if(t&&!this.get("allowTrailingDelimiter")){t=r.trimRight(t),s=i=this._inputNode.get(b);if(t)while((i=r.trimRight(i))&&(n=i.length-t.length)&&i.lastIndexOf(t)===n)i=i.substring(0,n);else i=r.trimRight(i);i!==s&&this.set(b,i)}},_onInputValueChange:function(e){var t=e.newVal;t!==this.get(b)&&this.set(b,t,{src:T.UI_SRC})},_onResponse:function(e,t){e===(this.get(d)||"")&&this._parseResponse(e||"",t.response,t.data)},_defClearFn:function(){this._set(d,null),this._set(g,[])},_defQueryFn:function(e){this.sendRequest(e.query)},_defResultsFn:function(e){this._set(g,e[g])}},T.ATTRS={allowBrowserAutocomplete:{value:!1},allowTrailingDelimiter:{value:!1},enableCache:{lazyAdd:!1,setter:"_setEnableCache",value:!0},inputNode:{setter:e.one,writeOnce:"initOnly"},maxResults:{value:0},minQueryLength:{value:1},query:{readOnly:!0,value:null},queryDelay:{value:100},queryDelimiter:{value:null},requestTemplate:{setter:"_setRequestTemplate",value:null},resultFilters:{setter:"_setResultFilters",value:[]},resultFormatter +:{validator:l,value:null},resultHighlighter:{setter:"_setResultHighlighter",value:null},resultListLocator:{setter:"_setLocator",value:null},results:{readOnly:!0,value:[]},resultTextLocator:{setter:"_setLocator",value:null},source:{setter:"_setSource",value:null},sourceType:{value:null},tokenInput:{readOnly:!0},value:{value:""}},T._buildCfg={aggregates:["SOURCE_TYPES"],statics:["UI_SRC"]},T.SOURCE_TYPES={array:"_createArraySource","function":"_createFunctionSource",object:"_createObjectSource"},T.UI_SRC=e.Widget&&e.Widget.UI_SRC||"ui",e.AutoCompleteBase=T},"3.9.1",{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("classnamemanager",function(e,t){var n="classNamePrefix",r="classNameDelimiter",i=e.config;i[n]=i[n]||"yui3",i[r]=i[r]||"-",e.ClassNameManager=function(){var t=i[n],s=i[r];return{getClassName:e.cached(function(){var n=e.Array(arguments);return n[n.length-1]!==!0?n.unshift(t):n.pop(),n.join(s)})}}()},"3.9.1",{requires:["yui-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("text-data-wordbreak",function(e,t){e.namespace("Text.Data").WordBreak={aletter:"[A-Za-z\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]",midnumlet:"['\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]",midletter:"[:\u00b7\u00b7\u05f4\u2027\ufe13\ufe55\uff1a]",midnum:"[,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]",numeric:"[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]",cr:"\\r",lf:"\\n",newline:"[ \f\u0085\u2028\u2029]",extend:"[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]" +,format:"[\u00ad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",katakana:"[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]",extendnumlet:"[_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}\u00a1\u00ab\u00b7\u00bb\u00bf;\u00b7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"}},"3.9.1",{requires:["yui-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("text-wordbreak",function(e,t){var n=e.Text,r=n.Data.WordBreak,i=0,s=1,o=2,u=3,a=4,f=5,l=6,c=7,h=8,p=9,d=10,v=11,m=12,g=[new RegExp(r.aletter),new RegExp(r.midnumlet),new RegExp(r.midletter),new RegExp(r.midnum),new RegExp(r.numeric),new RegExp(r.cr),new RegExp(r.lf),new RegExp(r.newline),new RegExp(r.extend),new RegExp(r.format),new RegExp(r.katakana),new RegExp(r.extendnumlet)],y="",b=new RegExp("^"+r.punctuation+"$"),w=/\s/,E={getWords:function(e,t){var n=0,r=E._classify(e),i=r.length,s=[],o=[],u,a,f;t||(t={}),t.ignoreCase&&(e=e.toLowerCase()),a=t.includePunctuation,f=t.includeWhitespace;for(;ne.length-1&&t!==0?!1:r===i&&m===i?!1:(g=e[t+2],r!==i||m!==o&&m!==s||g!==i?(n=e[t-1],r!==o&&r!==s||m!==i||n!==i?r!==a&&r!==i||m!==a&&m!==i?r!==u&&r!==s||m!==a||n!==a?r!==a||m!==u&&m!==s||g!==a?r===h||r===p||n===h||n===p||m===h||m===p?!1:r===f&&m===l?!1:r===c||r===f||r===l?!0:m===c||m===f||m===l?!0:r===d&&m===d?!1:m!==v||r!==i&&r!==a&&r!==d&&r!==v?r!==v||m!==i&&m!==a&&m!==d?!0:!1:!1:!1:!1:!1:!1):!1)}};n.WordBreak=E},"3.9.1",{requires:["array-extras","text-data-wordbreak"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("highlight-base",function(e,t){var n=e.Array,r=e.Escape,i=e.Text.WordBreak,s=e.Lang.isArray,o={},u="(&[^;\\s]*)?",a={_REGEX:u+"(%needles)",_REPLACER:function(e,t,n){return t&&!/\s/.test(n)?e:a._TEMPLATE.replace(/\{s\}/g,n)},_START_REGEX:"^"+u+"(%needles)",_TEMPLATE:'{s}',all:function(e,t,n){var i=[],u,f,l,c,h,p;n||(n=o),u=n.escapeHTML!==!1,h=n.startsWith?a._START_REGEX:a._REGEX,p=n.replacer||a._REPLACER,t=s(t)?t:[t];for(f=0,l=t.length;f=2)&&(!e.UA.android||e.UA.android>=2.4)),p.nativeHashChange=("onhashchange"in a||"onhashchange"in o)&&(!u||u>7),e.mix(p.prototype,{_init:function(e){var t;e=this._config=e||{},this.force=!!e.force,t=this._initialState=this._initialState||e.initialState||null,this.publish(l,{broadcast:2,defaultFn:this._defChangeFn}),t&&this.replace(t)},add:function(){var e=s(arguments,0,!0);return e.unshift(c),this._change.apply(this,e)},addValue:function(e,t,n){var r={};return r[e]=t,this._change(c,r,n)},get:function(t){var n=i._state,s=d(n);return t?s&&r.owns(n,t)?n[t]:undefined:s?e.mix({},n,!0):n},replace:function(){var e=s(arguments,0,!0);return e.unshift(h),this._change.apply(this,e)},replaceValue:function(e,t,n){var r={};return r[e]=t,this._change(h,r,n)},_change:function(t,n,r){return r=r?e.merge(f,r):f,r.merge&&d(n)&&d(i._state)&&(n=e.merge(i._state,n)),this._resolveChanges(t,n,r),this},_fireEvents:function(e,t,n){this.fire(l,{_options:n,changed:t.changed,newVal:t.newState,prevVal:t.prevState,removed:t.removed,src:e}),r.each(t.changed,function(t,n){this._fireChangeEvent(e,n,t)},this),r.each(t.removed,function(t,n){this._fireRemoveEvent(e,n,t)},this)},_fireChangeEvent:function(e,t,n){this.fire(t+"Change",{newVal:n.newVal,prevVal:n.prevVal,src:e})},_fireRemoveEvent:function(e,t,n){this.fire(t+"Remove",{prevVal:n,src:e})},_resolveChanges:function(e,t,n){var s={},o,u=i._state,a={};t||(t={}),n||(n={}),d(t)&&d(u)?(r.each(t,function(e,t){var n=u[t];e!==n&&(s[t]={newVal:e,prevVal:n},o=!0)},this),r.each(u,function(e,n){if(!r.owns(t,n)||t[n]===null)delete t[n],a[n]=e,o=!0},this)):o=t!==u,(o||this.force)&&this._fireEvents(e,{changed:s,newState:t,prevState:u,removed:a},n)},_storeState:function(e,t){i._state=t||{}},_defChangeFn:function(e){this._storeState(e.src,e.newVal,e._options)}},!0),e.HistoryBase=p},"3.9.1",{requires:["event-custom-complex"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("history-html5",function(e,t){function a(){a.superclass.constructor.apply(this,arguments)}var n=e.HistoryBase,r=e.Lang,i=e.config.win,s=e.config.useHistoryHTML5,o="popstate",u=n.SRC_REPLACE;e.extend(a,n,{_init:function(t){var n=i.history.state;e.Object.isEmpty(n)&&(n=null),t||(t={}),t.initialState&&r.type(t.initialState)==="object"&&r.type(n)==="object"?this._initialState=e.merge(t.initialState,n):this._initialState=n,e.on("popstate",this._onPopState,i,this),a.superclass._init.apply(this,arguments)},_storeState:function(t,n,r){t!==o&&i.history[t===u?"replaceState":"pushState"](n,r.title||e.config.doc.title||"",r.url||null),a.superclass._storeState.apply(this,arguments)},_onPopState:function(e){this._resolveChanges(o,e._event.state||null)}},{NAME:"historyhtml5",SRC_POPSTATE:o}),e.Node.DOM_EVENTS.popstate||(e.Node.DOM_EVENTS.popstate=1),e.HistoryHTML5=a;if(s===!0||s!==!1&&n.html5)e.History=a},"3.9.1",{optional:["json"],requires:["event-base","history-base","node-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("history-hash",function(e,t){function p(){p.superclass.constructor.apply(this,arguments)}var n=e.HistoryBase,r=e.Lang,i=e.Array,s=e.Object,o=YUI.namespace("Env.HistoryHash"),u="hash",a,f,l,c=e.config.win,h=e.config.useHistoryHTML5;e.extend(p,n,{_init:function(t){var n=p.parseHash();t=t||{},this._initialState=t.initialState?e.merge(t.initialState,n):n,e.after("hashchange",e.bind(this._afterHashChange,this),c),p.superclass._init.apply(this,arguments)},_change:function(e,t,n){return s.each(t,function(e,n){r.isValue(e)&&(t[n]=e.toString())}),p.superclass._change.call(this,e,t,n)},_storeState:function(e,t){var r=p.decode,i=p.createHash(t);p.superclass._storeState.apply(this,arguments),e!==u&&r(p.getHash())!==r(i)&&p[e===n.SRC_REPLACE?"replaceHash":"setHash"](i)},_afterHashChange:function(e){this._resolveChanges(u,p.parseHash(e.newHash),{})}},{NAME:"historyHash",SRC_HASH:u,hashPrefix:"",_REGEX_HASH:/([^\?#&]+)=([^&]+)/g,createHash:function(e){var t=p.encode,n=[];return s.each(e,function(e,i){r.isValue(e)&&n.push(t(i)+"="+t(e))}),n.join("&")},decode:function(e){return decodeURIComponent(e.replace(/\+/g," "))},encode:function(e){return encodeURIComponent(e).replace(/%20/g,"+")},getHash:e.UA.gecko?function(){var t=e.getLocation(),n=/#(.*)$/.exec(t.href),r=n&&n[1]||"",i=p.hashPrefix;return i&&r.indexOf(i)===0?r.replace(i,""):r}:function(){var t=e.getLocation(),n=t.hash.substring(1),r=p.hashPrefix;return r&&n.indexOf(r)===0?n.replace(r,""):n},getUrl:function(){return location.href},parseHash:function(e){var t=p.decode,n,i,s,o,u={},a=p.hashPrefix,f;e=r.isValue(e)?e:p.getHash();if(a){f=e.indexOf(a);if(f===0||f===1&&e.charAt(0)==="#")e=e.replace(a,"")}s=e.match(p._REGEX_HASH)||[];for(n=0,i=s.length;n')),e.config.doc.documentElement.appendChild(s),i._updateIframe(t||"#"),e.on("hashchange",function(e){t=e.newHash,i.getIframeHash()!==t&&i._updateIframe(t)},o),e.later(50,null,function(){var e=i.getIframeHash();e!==t&&i.setHash(e)},null,!0)})}},"3.9.1",{requires:["history-hash","node-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("router",function(e,t){function f(){f.superclass.constructor.apply(this,arguments)}var n=e.HistoryHash,r=e.QueryString,i=e.Array,s=e.config.win,o=[],u=[],a="ready";e.Router=e.extend(f,e.Base,{_regexPathParam:/([:*])([\w\-]+)?/g,_regexUrlQuery:/\?([^#]*).*$/,_regexUrlOrigin:/^(?:[^\/#?:]+:\/\/|\/\/)[^\/]*/,initializer:function(t){var n=this;n._html5=n.get("html5"),n._routes=[],n._url=n._getURL(),n._setRoutes(t&&t.routes?t.routes:n.get("routes")),n._html5?(n._history=new e.HistoryHTML5({force:!0}),n._historyEvents=e.after("history:change",n._afterHistoryChange,n)):n._historyEvents=e.on("hashchange",n._afterHistoryChange,s,n),n.publish(a,{defaultFn:n._defReadyFn,fireOnce:!0,preventable:!1}),n.once("initializedChange",function(){e.once("load",function(){setTimeout(function(){n.fire(a,{dispatched:!!n._dispatched})},20)})}),o.push(this)},destructor:function(){var e=i.indexOf(o,this);e>-1&&o.splice(e,1),this._historyEvents&&this._historyEvents.detach()},dispatch:function(){return this.once(a,function(){this._ready=!0;if(this._html5&&this.upgrade())return;this._dispatch(this._getPath(),this._getURL())}),this},getPath:function(){return this._getPath()},hasRoute:function(e){var t;return this._hasSameOrigin(e)?(this._html5||(e=this._upgradeURL(e)),t=this.removeQuery(this.removeRoot(e)),!!this.match(t).length):!1},match:function(e){return i.filter(this._routes,function(t){return e.search(t.regex)>-1})},removeRoot:function(e){var t=this.get("root");return e=e.replace(this._regexUrlOrigin,""),t&&e.indexOf(t)===0&&(e=e.substring(t.length)),e.charAt(0)==="/"?e:"/"+e},removeQuery:function(e){return e.replace(/\?.*$/,"")},replace:function(e){return this._queue(e,!0)},route:function(e,t){t=i.flatten(i(arguments,1,!0));var n=[];return this._routes.push({callbacks:t,keys:n,path:e,regex:this._getRegex(e,n),callback:t[0]}),this},save:function(e){return this._queue(e)},upgrade:function(){if(!this._html5)return!1;var e=this._getHashPath();return e?(this.once(a,function(){this.replace(e)}),!0):!1},_decode:function(e){return decodeURIComponent(e.replace(/\+/g," "))},_dequeue:function(){var t=this,n;return YUI.Env.windowLoaded?(n=u.shift(),n?n():this):(e.once("load",function(){t._dequeue()}),this)},_dispatch:function(t,n,r){var s=this,o=s._decode,u=s.match(t),a=[],f,l,c;return s._dispatching=s._dispatched=!0,!u||!u.length?(s._dispatching=!1,s):(l=s._getRequest(t,n,r),c=s._getResponse(l),l.next=function(n){var r,h,p;if(n)n==="route"?(a=[],l.next()):e.error(n);else if(r=a.shift())typeof r=="string"&&(h=r,r=s[h],r||e.error("Router: Callback not found: "+h,null,"router")),l.pendingCallbacks=a.length,r.call(s,l,c,l.next);else if(p=u.shift())a=p.callbacks.concat(),f=i.map(p.regex.exec(t)||[],o),f.length===p.keys.length+1?l.params=i.hash(p.keys,f.slice(1)):l.params=f.concat(),l.pendingRoutes=u.length,l.next()},l.next(),s._dispatching=!1,s._dequeue())},_getHashPath:function(e){return e||(e=n.getHash()),e&&e.charAt(0)==="/"?this._joinURL(e):""},_getOrigin:function(){var t=e.getLocation();return t.origin||t.protocol+"//"+t.host},_getPath:function(){var t=!this._html5&&this._getHashPath()||e.getLocation().pathname;return this.removeQuery(this.removeRoot(t))},_getPathRoot:function(){var t="/",n=e.getLocation().pathname,r;return n.charAt(n.length-1)===t?n:(r=n.split(t),r.pop(),r.join(t)+t)},_getQuery:function(){var t=e.getLocation(),r,i;return this._html5?t.search.substring(1):(r=n.getHash(),i=r.match(this._regexUrlQuery),r&&i?i[1]:t.search.substring(1))},_getRegex:function(e,t){return e instanceof RegExp?e:e==="*"?/.*/:(e=e.replace(this._regexPathParam,function(e,n,r){return r?(t.push(r),n==="*"?"(.*?)":"([^/#?]*)"):n==="*"?".*":e}),new RegExp("^"+e+"$"))},_getRequest:function(e,t,n){return{path:e,query:this._parseQuery(this._getQuery()),url:t,src:n}},_getResponse:function(e){var t=function(){return e.next.apply(this,arguments)};return t.req=e,t},_getRoutes:function(){return this._routes.concat()},_getURL:function(){var t=e.getLocation().toString();return this._html5||(t=this._upgradeURL(t)),t},_hasSameOrigin:function(t){var n=(t&&t.match(this._regexUrlOrigin)||[])[0];return n&&n.indexOf("//")===0&&(n=e.getLocation().protocol+n),!n||n===this._getOrigin()},_joinURL:function(e){var t=this.get("root");return e=this.removeRoot(e),e.charAt(0)==="/"&&(e=e.substring(1)),t&&t.charAt(t.length-1)==="/"?t+e:t+"/"+e},_normalizePath:function(e){var t="..",n="/",r,i,s,o,u,a;if(!e||e===n)return n;o=e.split(n),a=[];for(r=0,i=o.length;r=3),_instances:o,dispatch:function(){var e,t,n;for(e=0,t=o.length;e=200&&n<300||n===304||n===1223?this.success(e,t):this.failure(e,t)},_rS:function(e,t){var n=this;e.c.readyState===4&&(t.timeout&&n._clearTimeout(e.id),setTimeout(function(){n.complete(e,t),n._result(e,t)},0))},_abort:function(e,t){e&&e.c&&(e.e=t,e.c.abort())},send:function(t,n,i){var s,o,u,a,f,c,h=this,p=t,d={};n=n?e.Object(n):{},s=h._create(n,i),o=n.method?n.method.toUpperCase():"GET",f=n.sync,c=n.data,e.Lang.isObject(c)&&!c.nodeType&&!s.upload&&e.QueryString&&e.QueryString.stringify&&(n.data=c=e.QueryString.stringify(c));if(n.form){if(n.form.upload)return h.upload(s,t,n);c=h._serialize(n.form,c)}c||(c="");if(c)switch(o){case"GET":case"HEAD":case"DELETE":p=h._concat(p,c),c="";break;case"POST":case"PUT":n.headers=e.merge({"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},n.headers)}if(s.xdr)return h.xdr(p,s,n);if(s.notify)return s.c.send(s,t,n);!f&&!s.upload&&(s.c.onreadystatechange=function(){h._rS(s,n)});try{s.c.open(o,p,!f,n.username||null,n.password||null),h._setHeaders(s.c,n.headers||{}),h.start(s,n),n.xdr&&n.xdr.credentials&&l&&(s.c.withCredentials=!0),s.c.send(c);if(f){for(u=0,a=r.length;u-1?"&":"?")+"pjax=1",t+(n||"")})),this._request=e.io(i,{arguments:{route:{req:t,res:n,next:r},url:i},context:this,headers:{"X-PJAX":"true"},timeout:this.get("timeout"),on:{complete:this._onPjaxIOComplete,end:this._onPjaxIOEnd}})},_onPjaxIOComplete:function(e,t,n){var r=this.getContent(t.responseText),i=n.route,s=i.req,o=i.res;s.ioURL=n.url,o.content=r,o.ioResponse=t,i.next()},_onPjaxIOEnd:function(){this._request=null}},n.ATTRS={addPjaxParam:{value:!0},contentSelector:{value:null},titleSelector:{value:"title"},timeout:{value:3e4}},e.PjaxContent=n},"3.9.1",{requires:["io-base","node-base","router"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("pjax",function(e,t){var n=["loadContent","_defaultRoute"],r="error",i="load";e.Pjax=e.Base.create("pjax",e.Router,[e.PjaxBase,e.PjaxContent],{initializer:function(){this.publish(r,{defaultFn:this._defCompleteFn}),this.publish(i,{defaultFn:this._defCompleteFn})},_defaultRoute:function(e,t,n){var s=t.ioResponse,o=s.status,u=o>=200&&o<300?i:r;this.fire(u,{content:t.content,responseText:s.responseText,status:o,url:e.ioURL}),n()},_defCompleteFn:function(t){var n=this.get("container"),r=t.content;n&&r.node&&n.setHTML(r.node),r.title&&e.config.doc&&(e.config.doc.title=r.title)}},{ATTRS:{container:{value:null,setter:e.one},routes:{value:[{path:"*",callbacks:n}]}},defaultRoute:n})},"3.9.1",{requires:["pjax-base","pjax-content"]}); diff --git a/docs_api/assets/js/comps4.js b/docs_api/assets/js/comps4.js new file mode 100644 index 000000000..e9b91f195 --- /dev/null +++ b/docs_api/assets/js/comps4.js @@ -0,0 +1,464 @@ + +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("autocomplete-highlighters",function(e,t){var n=e.Array,r=e.Highlight,i=e.mix(e.namespace("AutoCompleteHighlighters"),{charMatch:function(e,t,i){var s=n.unique((i?e:e.toLowerCase()).split(""));return n.map(t,function(e){return r.all(e.text,s,{caseSensitive:i})})},charMatchCase:function(e,t){return i.charMatch(e,t,!0)},phraseMatch:function(e,t,i){return n.map(t,function(t){return r.all(t.text,[e],{caseSensitive:i})})},phraseMatchCase:function(e,t){return i.phraseMatch(e,t,!0)},startsWith:function(e,t,i){return n.map(t,function(t){return r.all(t.text,[e],{caseSensitive:i,startsWith:!0})})},startsWithCase:function(e,t){return i.startsWith(e,t,!0)},subWordMatch:function(t,i,s){var o=e.Text.WordBreak.getUniqueWords(t,{ignoreCase:!s});return n.map(i,function(e){return r.all(e.text,o,{caseSensitive:s})})},subWordMatchCase:function(e,t){return i.subWordMatch(e,t,!0)},wordMatch:function(e,t,i){return n.map(t,function(t){return r.words(t.text,e,{caseSensitive:i})})},wordMatchCase:function(e,t){return i.wordMatch(e,t,!0)}})},"3.9.1",{requires:["array-extras","highlight-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("autocomplete-sources",function(e,t){var n=e.AutoCompleteBase,r=e.Lang,i="_sourceSuccess",s="maxResults",o="requestTemplate",u="resultListLocator";e.mix(n.prototype,{_YQL_SOURCE_REGEX:/^(?:select|set|use)\s+/i,_beforeCreateObjectSource:function(t){return t instanceof e.Node&&t.get("nodeName").toLowerCase()==="select"?this._createSelectSource(t):e.JSONPRequest&&t instanceof e.JSONPRequest?this._createJSONPSource(t):this._createObjectSource(t)},_createIOSource:function(t){function a(n){var o=n.request;if(r._cache&&o in r._cache){r[i](r._cache[o],n);return}s&&s.isInProgress()&&s.abort(),s=e.io(r._getXHRUrl(t,n),{on:{success:function(t,s){var u;try{u=e.JSON.parse(s.responseText)}catch(a){e.error("JSON parse error",a)}u&&(r._cache&&(r._cache[o]=u),r[i](u,n))}}})}var n={type:"io"},r=this,s,o,u;return n.sendRequest=function(t){o=t;if(u)return;u=!0,e.use("io-base","json-parse",function(){n.sendRequest=a,a(o)})},n},_createJSONPSource:function(t){function u(e){var n=e.request,s=e.query;if(r._cache&&n in r._cache){r[i](r._cache[n],e);return}t._config.on.success=function(t){r._cache&&(r._cache[n]=t),r[i](t,e)},t.send(s)}var n={type:"jsonp"},r=this,s,o;return n.sendRequest=function(i){s=i;if(o)return;o=!0,e.use("jsonp",function(){t instanceof e.JSONPRequest||(t=new e.JSONPRequest(t,{format:e.bind(r._jsonpFormatter,r)})),n.sendRequest=u,u(s)})},n},_createSelectSource:function(e){var t=this;return{type:"select",sendRequest:function(n){var r=[];e.get("options").each(function(e){r.push({html:e.get("innerHTML"),index:e.get("index"),node:e,selected:e.get("selected"),text:e.get("text"),value:e.get("value")})}),t[i](r,n)}}},_createStringSource:function(e){return this._YQL_SOURCE_REGEX.test(e)?this._createYQLSource(e):e.indexOf("{callback}")!==-1?this._createJSONPSource(e):this._createIOSource(e)},_createYQLSource:function(t){function c(o){var u=o.query,a=n.get("yqlEnv"),f=n.get(s),c,h,p;p=r.sub(t,{maxResults:f>0?f:1e3,request:o.request,query:u});if(n._cache&&p in n._cache){n[i](n._cache[p],o);return}c=function(e){n._cache&&(n._cache[p]=e),n[i](e,o)},h={proto:n.get("yqlProtocol")},l?(l._callback=c,l._opts=h,l._params.q=p,a&&(l._params.env=a)):l=new e.YQLRequest(p,{on:{success:c},allowCache:!1},a?{env:a}:null,h),l.send()}var n=this,o={type:"yql"},a,f,l;return n.get(u)||n.set(u,n._defaultYQLLocator),o.sendRequest=function(t){a=t,f||(f=!0,e.use("yql",function(){o.sendRequest=c,c(a)}))},o},_defaultYQLLocator:function(t){var n=t&&t.query&&t.query.results,i;return n&&r.isObject(n)?(i=e.Object.values(n)||[],n=i.length===1?i[0]:i,r.isArray(n)||(n=[n])):n=[],n},_getXHRUrl:function(e,t){var n=this.get(s);return t.query!==t.request&&(e+=t.request),r.sub(e,{maxResults:n>0?n:1e3,query:encodeURIComponent(t.query)})},_jsonpFormatter:function(e,t,n){var i=this.get(s),u=this.get(o);return u&&(e+=u(n)),r.sub(e,{callback:t,maxResults:i>0?i:1e3,query:encodeURIComponent(n)})}}),e.mix(n.ATTRS,{yqlEnv:{value:null},yqlProtocol:{value:"http"}}),e.mix(n.SOURCE_TYPES,{io:"_createIOSource",jsonp:"_createJSONPSource",object:"_beforeCreateObjectSource",select:"_createSelectSource",string:"_createStringSource",yql:"_createYQLSource"},!0)},"3.9.1",{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("event-key",function(e,t){var n="+alt",r="+ctrl",i="+meta",s="+shift",o=e.Lang.trim,u={KEY_MAP:{enter:13,esc:27,backspace:8,tab:9,pageup:33,pagedown:34},_typeRE:/^(up|down|press):/,_keysRE:/^(?:up|down|press):|\+(alt|ctrl|meta|shift)/g,processArgs:function(t){var n=t.splice(3,1)[0],r=e.Array.hash(n.match(/\+(?:alt|ctrl|meta|shift)\b/g)||[]),i={type:this._typeRE.test(n)?RegExp.$1:null,mods:r,keys:null},s=n.replace(this._keysRE,""),u,a,f,l;if(s){s=s.split(","),i.keys={};for(l=s.length-1;l>=0;--l){u=o(s[l]);if(!u)continue;+u==u?i.keys[u]=r:(f=u.toLowerCase(),this.KEY_MAP[f]?(i.keys[this.KEY_MAP[f]]=r,i.type||(i.type="down")):(u=u.charAt(0),a=u.toUpperCase(),r["+shift"]&&(u=a),i.keys[u.charCodeAt(0)]=u===a?e.merge(r,{"+shift":!0}):r))}}return i.type||(i.type="press"),i},on:function(e,t,o,u){var a=t._extra,f="key"+a.type,l=a.keys,c=u?"delegate":"on";t._detach=e[c](f,function(e){var t=l?l[e.which]:a.mods;t&&(!t[n]||t[n]&&e.altKey)&&(!t[r]||t[r]&&e.ctrlKey)&&(!t[i]||t[i]&&e.metaKey)&&(!t[s]||t[s]&&e.shiftKey)&&o.fire(e)},u)},detach:function(e,t,n){t._detach.detach()}};u.delegate=u.on,u.detachDelegate=u.detach,e.Event.define("key",u,!0)},"3.9.1",{requires:["event-synthetic"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("attribute-complex",function(e,t){var n=e.Attribute;n.Complex=function(){},n.Complex.prototype={_normAttrVals:n.prototype._normAttrVals,_getAttrInitVal:n.prototype._getAttrInitVal},e.AttributeComplex=n.Complex},"3.9.1",{requires:["attribute-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("plugin",function(e,t){function n(t){!this.hasImpl||!this.hasImpl(e.Plugin.Base)?n.superclass.constructor.apply(this,arguments):n.prototype.initializer.apply(this,arguments)}n.ATTRS={host:{writeOnce:!0}},n.NAME="plugin",n.NS="plugin",e.extend(n,e.Base,{_handles:null,initializer:function(e){this._handles=[]},destructor:function(){if(this._handles)for(var e=0,t=this._handles.length;e0?m:v,t.fireEvent("on"+u,g)):e.error("simulateKeyEvent(): No event simulation framework present.")}function v(t,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x){t||e.error("simulateMouseEvent(): Invalid target."),r(f)?!u[f.toLowerCase()]&&!a[f]&&e.error("simulateMouseEvent(): Event type '"+f+"' not supported."):e.error("simulateMouseEvent(): Event type must be a string."),i(l)||(l=!0),i(c)||(c=f!=="mousemove"),s(h)||(h=e.config.win),o(p)||(p=1),o(d)||(d=0),o(v)||(v=0),o(m)||(m=0),o(g)||(g=0),i(y)||(y=!1),i(b)||(b=!1),i(w)||(w=!1),i(E)||(E=!1),o(S)||(S=0),x=x||null;var T=null;if(n(e.config.doc.createEvent))T=e.config.doc.createEvent("MouseEvents"),T.initMouseEvent?T.initMouseEvent(f,l,c,h,p,d,v,m,g,y,b,w,E,S,x):(T=e.config.doc.createEvent("UIEvents"),T.initEvent(f,l,c),T.view=h,T.detail=p,T.screenX=d,T.screenY=v,T.clientX=m,T.clientY=g,T.ctrlKey=y,T.altKey=b,T.metaKey=E,T.shiftKey=w,T.button=S,T.relatedTarget=x),x&&!T.relatedTarget&&(f==="mouseout"?T.toElement=x:f==="mouseover"&&(T.fromElement=x)),t.dispatchEvent(T);else if(s(e.config.doc.createEventObject)){T=e.config.doc.createEventObject(),T.bubbles=l,T.cancelable=c,T.view=h,T.detail=p,T.screenX=d,T.screenY=v,T.clientX=m,T.clientY=g,T.ctrlKey=y,T.altKey=b,T.metaKey=E,T.shiftKey=w;switch(S){case 0:T.button=1;break;case 1:T.button=4;break;case 2:break;default:T.button=0}T.relatedTarget=x,t.fireEvent("on"+f,T)}else e.error("simulateMouseEvent(): No event simulation framework present.")}function m(t,u,a,f,h,p){t||e.error("simulateUIEvent(): Invalid target."),r(u)?(u=u.toLowerCase(),l[u]||e.error("simulateUIEvent(): Event type '"+u+"' not supported.")):e.error("simulateUIEvent(): Event type must be a string.");var d=null;i(a)||(a=u in c),i(f)||(f=u==="submit"),s(h)||(h=e.config.win),o(p)||(p=1),n(e.config.doc.createEvent)?(d=e.config.doc.createEvent("UIEvents"),d.initUIEvent(u,a,f,h,p),t.dispatchEvent(d)):s(e.config.doc.createEventObject)?(d=e.config.doc.createEventObject(),d.bubbles=a,d.cancelable=f,d.view=h,d.detail=p,t.fireEvent("on"+u,d)):e.error("simulateUIEvent(): No event simulation framework present.")}function g(t,n,r,i,s,o,u,a,f,l,c,h,d,v,m,g){var y;(!e.UA.ios||e.UA.ios<2)&&e.error("simulateGestureEvent(): Native gesture DOM eventframe is not available in this platform."),t||e.error("simulateGestureEvent(): Invalid target."),e.Lang.isString(n)?(n=n.toLowerCase(),p[n]||e.error("simulateTouchEvent(): Event type '"+n+"' not supported.")):e.error("simulateGestureEvent(): Event type must be a string."),e.Lang.isBoolean(r)||(r=!0),e.Lang.isBoolean(i)||(i=!0),e.Lang.isObject(s)||(s=e.config.win),e.Lang.isNumber(o)||(o=2),e.Lang.isNumber(u)||(u=0),e.Lang.isNumber(a)||(a=0),e.Lang.isNumber(f)||(f=0),e.Lang.isNumber(l)||(l=0),e.Lang.isBoolean(c)||(c=!1),e.Lang.isBoolean(h)||(h=!1),e.Lang.isBoolean(d)||(d=!1),e.Lang.isBoolean(v)||(v=!1),e.Lang.isNumber(m)||(m=1),e.Lang.isNumber(g)||(g=0),y=e.config.doc.createEvent("GestureEvent"),y.initGestureEvent(n,r,i,s,o,u,a,f,l,c,h,d,v,t,m,g),t.dispatchEvent(y)}function y(t,n,r,i,s,o,u,a,f,l,c,p,d,v,m,g,y,b,w){var E;t||e.error("simulateTouchEvent(): Invalid target."),e.Lang.isString(n)?(n=n.toLowerCase(),h[n]||e.error("simulateTouchEvent(): Event type '"+n+"' not supported.")):e.error("simulateTouchEvent(): Event type must be a string."),n==="touchstart"||n==="touchmove"?m.length===0&&e.error("simulateTouchEvent(): No touch object in touches"):n==="touchend"&&y.length===0&&e.error("simulateTouchEvent(): No touch object in changedTouches"),e.Lang.isBoolean(r)||(r=!0),e.Lang.isBoolean(i)||(i=n!=="touchcancel"),e.Lang.isObject(s)||(s=e.config.win),e.Lang.isNumber(o)||(o=1),e.Lang.isNumber(u)||(u=0),e.Lang.isNumber(a)||(a=0),e.Lang.isNumber(f)||(f=0),e.Lang.isNumber(l)||(l=0),e.Lang.isBoolean(c)||(c=!1),e.Lang.isBoolean(p)||(p=!1),e.Lang.isBoolean(d)||(d=!1),e.Lang.isBoolean(v)||(v=!1),e.Lang.isNumber(b)||(b=1),e.Lang.isNumber(w)||(w=0),e.Lang.isFunction(e.config.doc.createEvent)?(e.UA.android?e.UA.android<4?(E=e.config.doc.createEvent("MouseEvents"),E.initMouseEvent(n,r,i,s,o,u,a,f,l,c,p,d,v,0,t),E.touches=m,E.targetTouches=g,E.changedTouches=y):(E=e.config.doc.createEvent("TouchEvent"),E.initTouchEvent(m,g,y,n,s,u,a,f,l,c,p,d,v)):e.UA.ios?e.UA.ios>=2?(E=e.config.doc.createEvent("TouchEvent"),E.initTouchEvent(n,r,i,s,o,u,a,f,l,c,p,d,v,m,g,y,b,w)):e.error("simulateTouchEvent(): No touch event simulation framework present for iOS, "+e.UA.ios+"."):e.error("simulateTouchEvent(): Not supported agent yet, "+e.UA.userAgent),t.dispatchEvent(E)):e.error("simulateTouchEvent(): No event simulation framework present.")}var t=e.Lang,n=t.isFunction,r=t.isString,i=t.isBoolean,s=t.isObject,o=t.isNumber,u={click:1,dblclick:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,mousemove:1,contextmenu:1},a={MSPointerOver:1,MSPointerOut:1,MSPointerDown:1,MSPointerUp:1,MSPointerMove:1},f={keydown:1,keyup:1,keypress:1},l={submit:1,blur:1,change:1,focus:1,resize:1,scroll:1,select:1},c={scroll:1,resize:1,reset:1,submit:1,change:1,select +:1,error:1,abort:1},h={touchstart:1,touchmove:1,touchend:1,touchcancel:1},p={gesturestart:1,gesturechange:1,gestureend:1};e.mix(c,u),e.mix(c,f),e.mix(c,h),e.Event.simulate=function(t,n,r){r=r||{},u[n]||a[n]?v(t,n,r.bubbles,r.cancelable,r.view,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget):f[n]?d(t,n,r.bubbles,r.cancelable,r.view,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.keyCode,r.charCode):l[n]?m(t,n,r.bubbles,r.cancelable,r.view,r.detail):h[n]?e.config.win&&"ontouchstart"in e.config.win&&!e.UA.phantomjs&&!(e.UA.chrome&&e.UA.chrome<6)?y(t,n,r.bubbles,r.cancelable,r.view,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.touches,r.targetTouches,r.changedTouches,r.scale,r.rotation):e.error("simulate(): Event '"+n+"' can't be simulated. Use gesture-simulate module instead."):e.UA.ios&&e.UA.ios>=2&&p[n]?g(t,n,r.bubbles,r.cancelable,r.view,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.scale,r.rotation):e.error("simulate(): Event '"+n+"' can't be simulated.")}})()},"3.9.1",{requires:["event-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("async-queue",function(e,t){e.AsyncQueue=function(){this._init(),this.add.apply(this,arguments)};var n=e.AsyncQueue,r="execute",i="shift",s="promote",o="remove",u=e.Lang.isObject,a=e.Lang.isFunction;n.defaults=e.mix({autoContinue:!0,iterations:1,timeout:10,until:function(){return this.iterations|=0,this.iterations<=0}},e.config.queueDefaults||{}),e.extend(n,e.EventTarget,{_running:!1,_init:function(){e.EventTarget.call(this,{prefix:"queue",emitFacade:!0}),this._q=[],this.defaults={},this._initEvents()},_initEvents:function(){this.publish({execute:{defaultFn:this._defExecFn,emitFacade:!0},shift:{defaultFn:this._defShiftFn,emitFacade:!0},add:{defaultFn:this._defAddFn,emitFacade:!0},promote:{defaultFn:this._defPromoteFn,emitFacade:!0},remove:{defaultFn:this._defRemoveFn,emitFacade:!0}})},next:function(){var e;while(this._q.length){e=this._q[0]=this._prepare(this._q[0]);if(!e||!e.until())break;this.fire(i,{callback:e}),e=null}return e||null},_defShiftFn:function(e){this.indexOf(e.callback)===0&&this._q.shift()},_prepare:function(t){if(a(t)&&t._prepared)return t;var r=e.merge(n.defaults,{context:this,args:[],_prepared:!0},this.defaults,a(t)?{fn:t}:t),i=e.bind(function(){i._running||i.iterations--,a(i.fn)&&i.fn.apply(i.context||e,e.Array(i.args))},this);return e.mix(i,r)},run:function(){var e,t=!0;for(e=this.next();t&&e&&!this.isRunning();e=this.next())t=e.timeout<0?this._execute(e):this._schedule(e);return e||this.fire("complete"),this},_execute:function(e){this._running=e._running=!0,e.iterations--,this.fire(r,{callback:e});var t=this._running&&e.autoContinue;return this._running=e._running=!1,t},_schedule:function(t){return this._running=e.later(t.timeout,this,function(){this._execute(t)&&this.run()}),!1},isRunning:function(){return!!this._running},_defExecFn:function(e){e.callback()},add:function(){return this.fire("add",{callbacks:e.Array(arguments,0,!0)}),this},_defAddFn:function(t){var n=this._q,r=[];e.Array.each(t.callbacks,function(e){u(e)&&(n.push(e),r.push(e))}),t.added=r},pause:function(){return u(this._running)&&this._running.cancel(),this._running=!1,this},stop:function(){return this._q=[],this.pause()},indexOf:function(e){var t=0,n=this._q.length,r;for(;t-1?this._q[t]:null},promote:function(e){var t={callback:e},n;return this.isRunning()?n=this.after(i,function(){this.fire(s,t),n.detach()},this):this.fire(s,t),this},_defPromoteFn:function(e){var t=this.indexOf(e.callback),n=t>-1?this._q.splice(t,1)[0]:null;e.promoted=n,n&&this._q.unshift(n)},remove:function(e){var t={callback:e},n;return this.isRunning()?n=this.after(i,function(){this.fire(o,t),n.detach()},this):this.fire(o,t),this},_defRemoveFn:function(e){var t=this.indexOf(e.callback);e.removed=t>-1?this._q.splice(t,1)[0]:null},size:function(){return this.isRunning()||this.next(),this._q.length}})},"3.9.1",{requires:["event-custom"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("gesture-simulate",function(e,t){function T(n){n||e.error(t+": invalid target node"),this.node=n,this.target=e.Node.getDOMNode(n);var r=this.node.getXY(),i=this._getDims();a=r[0]+i[0]/2,f=r[1]+i[1]/2}var t="gesture-simulate",n=e.config.win&&"ontouchstart"in e.config.win&&!e.UA.phantomjs&&!(e.UA.chrome&&e.UA.chrome<6),r={tap:1,doubletap:1,press:1,move:1,flick:1,pinch:1,rotate:1},i={touchstart:1,touchmove:1,touchend:1,touchcancel:1},s=e.config.doc,o,u=20,a,f,l={HOLD_TAP:10,DELAY_TAP:10,HOLD_PRESS:3e3,MIN_HOLD_PRESS:1e3,MAX_HOLD_PRESS:6e4,DISTANCE_MOVE:200,DURATION_MOVE:1e3,MAX_DURATION_MOVE:5e3,MIN_VELOCITY_FLICK:1.3,DISTANCE_FLICK:200,DURATION_FLICK:1e3,MAX_DURATION_FLICK:5e3,DURATION_PINCH:1e3},c="touchstart",h="touchmove",p="touchend",d="gesturestart",v="gesturechange",m="gestureend",g="mouseup",y="mousemove",b="mousedown",w="click",E="dblclick",S="x",x="y";T.prototype={_toRadian:function(e){return e*(Math.PI/180)},_getDims:function(){var e,t,n;return this.target.getBoundingClientRect?(e=this.target.getBoundingClientRect(),"height"in e?n=e.height:n=Math.abs(e.bottom-e.top),"width"in e?t=e.width:t=Math.abs(e.right-e.left)):(e=this.node.get("region"),t=e.width,n=e.height),[t,n]},_calculateDefaultPoint:function(t){var n;return!e.Lang.isArray(t)||t.length===0?t=[a,f]:(t.length==1&&(n=this._getDims[1],t[1]=n/2),t[0]=this.node.getX()+t[0],t[1]=this.node.getY()+t[1]),t},rotate:function(n,r,i,s,o,u,a){var f,l=i,c=s;if(!e.Lang.isNumber(l)||!e.Lang.isNumber(c)||l<0||c<0)f=this.target.offsetWidth=2&&this._simulateEvent(this.target,d,e.merge({scale:k,rotation:O},r))},timeout:0,context:this}),H=Math.floor(o/b),T=(x-S)/H,A=(L-k)/H,_=(M-O)/H,B=function(t){var n=S+T*t,r=N+n*Math.sin(this._toRadian(O+_*t)),i=C-n*Math.cos(this._toRadian(O+_*t)),s=N-n*Math.sin(this._toRadian(O+_*t)),o=C+n*Math.cos(this._toRadian(O+_*t)),u=(r+s)/2,a=(i+o)/2,f,l,c,p;f={pageX:r,pageY:i,clientX:r,clientY:i},l={pageX:s,pageY:o,clientX:s,clientY:o},p=this._createTouchList([e.merge({identifier:E++},f),e.merge({identifier:E++},l)]),c={pageX:u,pageY:a,clientX:u,clientY:a},this._simulateEvent(this.target,h,e.merge({touches:p,targetTouches:p,changedTouches:p,scale:k+A*t,rotation:O+_*t},c)),e.UA.ios>=2&&this._simulateEvent(this.target,v,e.merge({scale:k+A*t,rotation:O+_*t},c))};for(y=0;y=2&&this._simulateEvent(this.target,m,e.merge({scale:L,rotation:M},i)),this._simulateEvent(this.target,p,e.merge({touches:t,targetTouches:t,changedTouches:s,scale:L,rotation:M},i))},context:this}),n&&e.Lang.isFunction(n)&&g.add({fn:n,context:this.node}),g.run()},tap:function(t,r,i,s,o){var u=new e.AsyncQueue,a=this._getEmptyTouchList(),f,h,d,v,m;r=this._calculateDefaultPoint(r);if(!e.Lang.isNumber(i)||i<1)i=1;e.Lang.isNumber(s)||(s=l.HOLD_TAP),e.Lang.isNumber(o)||(o=l.DELAY_TAP),h={pageX:r[0],pageY:r[1],clientX:r[0],clientY:r[1]},f=this._createTouchList([e.merge({identifier:0},h)]),v=function(){this._simulateEvent(this.target,c,e.merge({touches:f,targetTouches:f,changedTouches:f},h))},m=function(){this._simulateEvent(this.target,p,e.merge({touches:a,targetTouches:a,changedTouches:f},h))};for(d=0;d1&&!n&&u.add({fn:function(){this._simulateEvent(this.target,E,h)},context:this}),t&&e.Lang.isFunction(t)&&u.add({fn:t,context:this.node}),u.run()},flick:function(n,r,i,s,o){var u;r=this._calculateDefaultPoint(r),e.Lang.isString(i)?(i=i.toLowerCase(),i!==S&&i!==x&&e.error(t+"(flick): Only x or y axis allowed")):i=S,e.Lang.isNumber(s)||(s=l.DISTANCE_FLICK),e.Lang.isNumber(o)?o>l.MAX_DURATION_FLICK&&(o=l.MAX_DURATION_FLICK):o=l.DURATION_FLICK,Math.abs(s)/ol.MAX_DURATION_MOVE&&(r=l.MAX_DURATION_MOVE):r=l.DURATION_MOVE,i={start:e.clone(n.point),end:[n.point[0]+n.xdist,n.point[1]+n.ydist]},this._move(t,i,r)},_move:function(t,n,r){var i,s,o=u,d,v,m,g=0,y;e.Lang.isNumber(r)?r>l.MAX_DURATION_MOVE&&(r=l.MAX_DURATION_MOVE):r=l.DURATION_MOVE,e.Lang.isObject(n)?(e.Lang.isArray(n.start)||(n.start=[a,f]),e.Lang.isArray(n.end)||(n.end=[a+l.DISTANCE_MOVE,f])):n={start:[a,f],end:[a+l.DISTANCE_MOVE,f]},e.AsyncQueue.defaults.timeout=o,i=new e.AsyncQueue,i.add({fn:function(){var t={pageX:n.start[0],pageY:n.start[1],clientX:n.start[0],clientY:n.start[1]},r=this._createTouchList([e.merge({identifier:g++},t)]);this._simulateEvent(this.target,c,e.merge({touches:r,targetTouches:r,changedTouches:r},t))},timeout:0,context:this}),d=Math.floor(r/o),v=(n.end[0]-n.start[0])/d,m=(n.end[1]-n.start[1])/d,y=function(t){var r=n.start[0]+v*t,i=n.start[1]+m*t,s={pageX:r,pageY:i,clientX:r,clientY:i},o=this._createTouchList([e.merge({identifier:g++},s)]);this._simulateEvent(this.target,h,e.merge({touches:o,targetTouches:o,changedTouches:o},s))};for(s=0;s=4||e.UA.ios&&e.UA.ios>=2?(e.each(n,function(t){t.identifier||(t.identifier=0),t.pageX||(t.pageX=0),t.pageY||(t.pageY=0),t.screenX||(t.screenX=0),t.screenY||(t.screenY=0),r.push(s.createTouch(e.config.win,o.target,t.identifier,t.pageX,t.pageY,t.screenX,t.screenY))}),i=s.createTouchList.apply(s,r)):e.UA.ios&&e.UA.ios<2?e.error(t+": No touch event simulation framework present."):(i=[],e.each(n,function(e){e.identifier||(e.identifier=0),e.clientX||(e.clientX=0),e.clientY||(e.clientY=0),e.pageX||(e.pageX=0),e.pageY||(e.pageY=0),e.screenX||(e.screenX=0),e.screenY||(e.screenY=0),i.push({target:o.target,identifier:e.identifier,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}),i.item=function(e){return i[e]}):e.error(t+": Invalid touchPoints passed"),i},_simulateEvent:function(t,r,s){var o;i[r]?n?e.Event.simulate(t,r,s):this._isSingleTouch(s.touches,s.targetTouches,s.changedTouches)?(r={touchstart:b,touchmove:y,touchend:g}[r],s.button=0,s.relatedTarget=null,o=r===g?s.changedTouches:s.touches,s=e.mix(s,{screenX:o.item(0).screenX,screenY:o.item(0).screenY,clientX:o.item(0).clientX,clientY:o.item(0).clientY},!0),e.Event.simulate(t,r,s),r==g&&e.Event.simulate(t,w,s)):e.error("_simulateEvent(): Event '"+r+"' has multi touch objects that can't be simulated in your platform."):e.Event.simulate(t,r,s)},_isSingleTouch:function(e,t,n){return e&&e.length<=1&&t&&t.length<=1&&n&&n.length<=1}},e.GestureSimulation=T,e.GestureSimulation.defaults=l,e.GestureSimulation.GESTURES=r,e.Event.simulateGesture=function(n,i,s,o){n=e.one(n);var u=new e.GestureSimulation(n);i=i.toLowerCase(),!o&&e.Lang.isFunction(s)&&(o=s,s={}),s=s||{};if(r[i])switch(i){case"tap":u.tap(o,s.point,s.times,s.hold,s.delay);break;case"doubletap":u.tap(o,s.point,2);break;case"press":e.Lang.isNumber(s.hold)?s.holdl.MAX_HOLD_PRESS&&(s.hold=l.MAX_HOLD_PRESS):s.hold=l.HOLD_PRESS,u.tap(o,s.point,1,s.hold);break;case"move":u.move(o,s.path,s.duration);break;case"flick":u.flick(o,s.point,s.axis,s.distance,s.duration);break;case"pinch":u.pinch(o,s.center,s.r1,s.r2,s.duration,s.start,s.rotation);break;case"rotate":u.rotate(o,s.center,s.r1,s.r2,s.duration,s.start,s.rotation)}else e.error(t+": Not a supported gesture simulation: "+i)}},"3.9.1",{requires:["async-queue","event-simulate","node-screen"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("node-event-simulate",function(e,t){e.Node.prototype.simulate=function(t,n){e.Event.simulate(e.Node.getDOMNode(this),t,n)},e.Node.prototype.simulateGesture=function(t,n,r){e.Event.simulateGesture(this,t,n,r)}},"3.9.1",{requires:["node-base","event-simulate","gesture-simulate"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("node-focusmanager",function(e,t){var n="activeDescendant",r="id",i="disabled",s="tabIndex",o="focused",u="focusClass",a="circular",f="UI",l="key",c=n+"Change",h="host",p={37:!0,38:!0,39:!0,40:!0},d={a:!0,button:!0,input:!0,object:!0},v=e.Lang,m=e.UA,g=function(){g.superclass.constructor.apply(this,arguments)};g.ATTRS={focused:{value:!1,readOnly:!0},descendants:{getter:function(e){return this.get(h).all(e)}},activeDescendant:{setter:function(t){var n=v.isNumber,i=e.Attribute.INVALID_VALUE,s=this._descendantsMap,o=this._descendants,u,a,f;return n(t)?(u=t,a=u):t instanceof e.Node&&s?(u=s[t.get(r)],n(u)?a=u:a=i):a=i,o&&(f=o.item(u),f&&f.get("disabled")&&(a=i)),a}},keys:{value:{next:null,previous:null}},focusClass:{},circular:{value:!0}},e.extend(g,e.Plugin.Base,{_stopped:!0,_descendants:null,_descendantsMap:null,_focusedNode:null,_lastNodeIndex:0,_eventHandlers:null,_initDescendants:function(){var t=this.get("descendants"),o={},u=-1,a,f=this.get(n),l,c,h=0;v.isUndefined(f)&&(f=-1);if(t){a=t.size();for(h=0;h=0&&(r-=1,r===-1&&this.get(a)&&(r=this._lastNodeIndex),i=this._descendants.item(r),i&&(i.get("disabled")?this._focusPrevious(e,r):this.focus(r))),this._preventScroll(e)},_afterActiveDescendantChange:function(e){var t=this._descendants.item(e.prevVal);t&&t.set(s,-1),t=this._descendants.item(e.newVal),t&&t.set(s,0)},initializer:function(e){this.start()},destructor:function(){this.stop(),this.get(h).focusManager=null},focus:function(e){v.isUndefined(e)&&(e=this.get(n)),this.set(n,e,{src:f});var t=this._descendants.item(this.get(n));t&&(t.focus(),m.opera&&t.get("nodeName").toLowerCase()==="button"&&(this._focusTarget=t))},blur:function(){var e;this.get(o)&&(e=this._descendants.item(this.get(n)),e&&(e.blur(),this._removeFocusClass()),this._set(o,!1,{src:f}))},start:function(){this._stopped&&(this._initDescendants(),this._attachEventHandlers(),this._stopped=!1)},stop:function(){this._stopped||(this._detachEventHandlers(),this._descendants=null,this._focusedNode=null,this._lastNodeIndex=0,this._stopped=!0)},refresh:function(){this._initDescendants(),this._eventHandlers||this._attachEventHandlers()}}),g.NAME="nodeFocusManager",g.NS="focusManager",e.namespace("Plugin"),e.Plugin.NodeFocusManager=g},"3.9.1",{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("base-pluginhost",function(e,t){var n=e.Base,r=e.Plugin.Host;e.mix(n,r,!1,null,1),n.plug=r.plug,n.unplug=r.unplug},"3.9.1",{requires:["base-base","pluginhost"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("widget-base",function(e,t){function R(e){var t=this,n,r,i=t.constructor;t._strs={},t._cssPrefix=i.CSS_PREFIX||s(i.NAME.toLowerCase()),e=e||{},R.superclass.constructor.call(t,e),r=t.get(T),r&&(r!==P&&(n=r),t.render(n))}var n=e.Lang,r=e.Node,i=e.ClassNameManager,s=i.getClassName,o,u=e.cached(function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}),a="content",f="visible",l="hidden",c="disabled",h="focused",p="width",d="height",v="boundingBox",m="contentBox",g="parentNode",y="ownerDocument",b="auto",w="srcNode",E="body",S="tabIndex",x="id",T="render",N="rendered",C="destroyed",k="strings",L="
          ",A="Change",O="loading",M="_uiSet",_="",D=function(){},P=!0,H=!1,B,j={},F=[f,c,d,p,h,S],I=e.UA.webkit,q={};R.NAME="widget",B=R.UI_SRC="ui",R.ATTRS=j,j[x]={valueFn:"_guid",writeOnce:P},j[N]={value:H,readOnly:P},j[v]={value:null,setter:"_setBB",writeOnce:P},j[m]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:P},j[S]={value:null,validator:"_validTabIndex"},j[h]={value:H,readOnly:P},j[c]={value:H},j[f]={value:P},j[d]={value:_},j[p]={value:_},j[k]={value:{},setter:"_strSetter",getter:"_strGetter"},j[T]={value:H,writeOnce:P},R.CSS_PREFIX=s(R.NAME.toLowerCase()),R.getClassName=function(){return s.apply(i,[R.CSS_PREFIX].concat(e.Array(arguments),!0))},o=R.getClassName,R.getByNode=function(t){var n,i=o();return t=r.one(t),t&&(t=t.ancestor("."+i,!0),t&&(n=q[e.stamp(t,!0)])),n||null},e.extend(R,e.Base,{getClassName:function(){return s.apply(i,[this._cssPrefix].concat(e.Array(arguments),!0))},initializer:function(t){var n=this.get(v);n instanceof r&&this._mapInstance(e.stamp(n)),this._applyParser&&this._applyParser(t)},_mapInstance:function(e){q[e]=this},destructor:function(){var t=this.get(v),n;t instanceof r&&(n=e.stamp(t,!0),n in q&&delete q[n],this._destroyBox())},destroy:function(e){return this._destroyAllNodes=e,R.superclass.destroy.apply(this)},_destroyBox:function(){var e=this.get(v),t=this.get(m),n=this._destroyAllNodes,r;r=e&&e.compareTo(t),this.UI_EVENTS&&this._destroyUIEvents(),this._unbindUI(e),n?(e.empty(),e.remove(P)):(t&&t.remove(P),r||e.remove(P))},render:function(e){return!this.get(C)&&!this.get(N)&&(this.publish(T,{queuable:H,fireOnce:P,defaultTargetOnly:P,defaultFn:this._defRenderFn}),this.fire(T,{parentNode:e?r.one(e):null})),this},_defRenderFn:function(e){this._parentNode=e.parentNode,this.renderer(),this._set(N,P),this._removeLoadingClassNames()},renderer:function(){var e=this;e._renderUI(),e.renderUI(),e._bindUI(),e.bindUI(),e._syncUI(),e.syncUI()},bindUI:D,renderUI:D,syncUI:D,hide:function(){return this.set(f,H)},show:function(){return this.set(f,P)},focus:function(){return this._set(h,P)},blur:function(){return this._set(h,H)},enable:function(){return this.set(c,H)},disable:function(){return this.set(c,P)},_uiSizeCB:function(e){this.get(m).toggleClass(o(a,"expanded"),e)},_renderBox:function(e){var t=this,n=t.get(m),i=t.get(v),s=t.get(w),o=t.DEF_PARENT_NODE,u=s&&s.get(y)||i.get(y)||n.get(y);s&&!s.compareTo(n)&&!n.inDoc(u)&&s.replace(n),!i.compareTo(n.get(g))&&!i.compareTo(n)&&(n.inDoc(u)&&n.replace(i),i.appendChild(n)),e=e||o&&r.one(o),e?e.appendChild(i):i.inDoc(u)||r.one(E).insert(i,0)},_setBB:function(e){return this._setBox(this.get(x),e,this.BOUNDING_TEMPLATE,!0)},_setCB:function(e){return this.CONTENT_TEMPLATE===null?this.get(v):this._setBox(null,e,this.CONTENT_TEMPLATE,!1)},_defaultCB:function(e){return this.get(w)||null},_setBox:function(t,n,i,s){return n=r.one(n),n||(n=r.create(i),s?this._bbFromTemplate=!0:this._cbFromTemplate=!0),n.get(x)||n.set(x,t||e.guid()),n},_renderUI:function(){this._renderBoxClassNames(),this._renderBox(this._parentNode)},_renderBoxClassNames:function(){var e=this._getClasses(),t,n=this.get(v),r;n.addClass(o());for(r=e.length-3;r>=0;r--)t=e[r],n.addClass(t.CSS_PREFIX||s(t.NAME.toLowerCase()));this.get(m).addClass(this.getClassName(a))},_removeLoadingClassNames:function(){var e=this.get(v),t=this.get(m),n=this.getClassName(O),r=o(O);e.removeClass(r).removeClass(n),t.removeClass(r).removeClass(n)},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND),this._bindDOM()},_unbindUI:function(e){this._unbindDOM(e)},_bindDOM:function(){var t=this.get(v).get(y),n=R._hDocFocus;n||(n=R._hDocFocus=t.on("focus",this._onDocFocus,this),n.listeners={count:0}),n.listeners[e.stamp(this,!0)]=!0,n.listeners.count++,I&&(this._hDocMouseDown=t.on("mousedown",this._onDocMouseDown,this))},_unbindDOM:function(t){var n=R._hDocFocus,r=e.stamp(this,!0),i,s=this._hDocMouseDown;n&&(i=n.listeners,i[r]&&(delete i[r],i.count--),i.count===0&&(n.detach(),R._hDocFocus=null)),I&&s&&s.detach()},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC)},_uiSetHeight:function(e){this._uiSetDim(d,e),this._uiSizeCB(e!==_&&e!==b)},_uiSetWidth:function(e){this._uiSetDim(p,e)},_uiSetDim:function(e,t){this.get(v).setStyle(e,n.isNumber(t)?t+this.DEF_UNIT:t)},_uiSetVisible:function(e){this.get(v).toggleClass(this.getClassName(l),!e)},_uiSetDisabled:function(e){this.get(v).toggleClass(this.getClassName(c),e)},_uiSetFocused:function(e,t){var n=this.get(v);n.toggleClass(this.getClassName(h),e),t!==B&&(e?n.focus():n.blur())},_uiSetTabIndex:function(e){var t=this.get(v);n.isNumber(e)?t.set(S,e):t.removeAttribute(S)},_onDocMouseDown:function(e){this._domFocus&&this._onDocFocus(e)},_onDocFocus:function(e){var t=R.getByNode(e.target),n=R._active;n&&n!==t&&(n._domFocus=!1,n._set(h,!1,{src:B}),R._active=null),t&&(t._domFocus=!0,t._set(h,!0,{src:B}),R._active=t)},toString:function(){return this.name+"["+this.get(x)+"]"},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:L,BOUNDING_TEMPLATE:L,_guid:function(){return e.guid()},_validTabIndex:function(e){return n.isNumber(e)||n.isNull(e)},_bindAttrUI:function(e){var t,n=e.length;for(t=0;t=0;r--)i=t[r].HTML_PARSER,i&&e.mix(n,i,!0);return n}})},"3.9.1",{requires:["widget-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("widget-skin",function(e,t){var n="boundingBox",r="contentBox",i="skin",s=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var e=this.get(r)||this.get(n),t=new RegExp("\\b"+s(i)+"-(\\S+)"),o;return e&&e.ancestor(function(e){return o=e.get("className").match(t),o}),o?o[1]:null}},"3.9.1",{requires:["widget-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("widget-uievents",function(e,t){var n="boundingBox",r=e.Widget,i="render",s=e.Lang,o=":",u=e.Widget._uievts=e.Widget._uievts||{};e.mix(r.prototype,{_destroyUIEvents:function(){var t=e.stamp(this,!0);e.each(u,function(n,r){n.instances[t]&&(delete n.instances[t],e.Object.isEmpty(n.instances)&&(n.handle.detach(),u[r]&&delete u[r]))})},UI_EVENTS:e.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get(n)},_createUIEvent:function(t){var n=this._getUIEventNode(),i=e.stamp(n)+t,s=u[i],o;s||(o=n.delegate(t,function(e){var t=r.getByNode(this);t&&t._filterUIEvent(e)&&t.fire(e.type,{domEvent:e})},"."+e.Widget.getClassName()),u[i]=s={instances:{},handle:o}),s.instances[e.stamp(this)]=1},_filterUIEvent:function(e){return e.currentTarget.compareTo(e.container)||e.container.compareTo(this._getUIEventNode())},_getUIEvent:function(e){if(s.isString(e)){var t=this.parseType(e)[1],n,r;return t&&(n=t.indexOf(o),n>-1&&(t=t.substring(n+o.length)),this.UI_EVENTS[t]&&(r=t)),r}},_initUIEvent:function(e){var t=this._getUIEvent(e),n=this._uiEvtsInitQueue||{};t&&!n[t]&&(this._uiEvtsInitQueue=n[t]=1,this.after(i,function(){this._createUIEvent(t),delete this._uiEvtsInitQueue[t]}))},on:function(e){return this._initUIEvent(e),r.superclass.on.apply(this,arguments)},publish:function(e,t){var n=this._getUIEvent(e);return n&&t&&t.defaultFn&&this._initUIEvent(n),r.superclass.publish.apply(this,arguments)}},!0)},"3.9.1",{requires:["node-event-delegate","widget-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("arraylist",function(e,t){function s(t){t!==undefined?this._items=e.Lang.isArray(t)?t:n(t):this._items=this._items||[]}var n=e.Array,r=n.each,i;i={item:function(e){return this._items[e]},each:function(e,t){return r(this._items,function(n,r){n=this.item(r),e.call(t||n,n,r,this)},this),this},some:function(e,t){return n.some(this._items,function(n,r){return n=this.item(r),e.call(t||n,n,r,this)},this)},indexOf:function(e){return n.indexOf(this._items,e)},size:function(){return this._items.length},isEmpty:function(){return!this.size()},toJSON:function(){return this._items}},i._item=i.item,e.mix(s.prototype,i),e.mix(s,{addMethod:function(e,t){t=n(t),r(t,function(t){e[t]=function(){var e=n(arguments,0,!0),i=[];return r(this._items,function(n,r){n=this._item(r);var s=n[t].apply(n,e);s!==undefined&&s!==n&&(i[r]=s)},this),i.length?i:this}})}}),e.ArrayList=s},"3.9.1",{requires:["yui-base"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("widget-parent",function(e,t){function s(t){this.publish("addChild",{defaultTargetOnly:!0,defaultFn:this._defAddChildFn}),this.publish("removeChild",{defaultTargetOnly:!0,defaultFn:this._defRemoveChildFn}),this._items=[];var n,r;t&&t.children&&(n=t.children,r=this.after("initializedChange",function(e){this._add(n),r.detach()})),e.after(this._renderChildren,this,"renderUI"),e.after(this._bindUIParent,this,"bindUI"),this.after("selectionChange",this._afterSelectionChange),this.after("selectedChange",this._afterParentSelectedChange),this.after("activeDescendantChange",this._afterActiveDescendantChange),this._hDestroyChild=this.after("*:destroy",this._afterDestroyChild),this.after("*:focusedChange",this._updateActiveDescendant)}var n=e.Lang,r="rendered",i="boundingBox";s.ATTRS={defaultChildType:{setter:function(t){var r=e.Attribute.INVALID_VALUE,i=n.isString(t)?e[t]:t;return n.isFunction(i)&&(r=i),r}},activeDescendant:{readOnly:!0},multiple:{value:!1,validator:n.isBoolean,writeOnce:!0,getter:function(e){var t=this.get("root");return t&&t!=this?t.get("multiple"):e}},selection:{readOnly:!0,setter:"_setSelection",getter:function(t){var r=n.isArray(t)?new e.ArrayList(t):t;return r}},selected:{setter:function(t){var n=t;return t===1&&!this.get("multiple")&&(n=e.Attribute.INVALID_VALUE),n}}},s.prototype={destructor:function(){this._destroyChildren()},_afterDestroyChild:function(e){var t=e.target;t.get("parent")==this&&t.remove()},_afterSelectionChange:function(t){if(t.target==this&&t.src!=this){var n=t.newVal,r=0;n&&(r=2,e.instanceOf(n,e.ArrayList)&&n.size()===this.size()&&(r=1)),this.set("selected",r,{src:this})}},_afterActiveDescendantChange:function(e){var t=this.get("parent");t&&t._set("activeDescendant",e.newVal)},_afterParentSelectedChange:function(e){var t=e.newVal;this==e.target&&e.src!=this&&(t===0||t===1)&&this.each(function(e){e.set("selected",t,{src:this})},this)},_setSelection:function(e){var t=null,n;return this.get("multiple")&&!this.isEmpty()?(n=[],this.each(function(e){e.get("selected")>0&&n.push(e)}),n.length>0&&(t=n)):e.get("selected")>0&&(t=e),t},_updateSelection:function(e){var t=e.target,n;t.get("parent")==this&&(e.src!="_updateSelection"&&(n=this.get("selection"),!this.get("multiple")&&n&&e.newVal>0&&n.set("selected",0,{src:"_updateSelection"}),this._set("selection",t)),e.src==this&&this._set("selection",t,{src:this}))},_updateActiveDescendant:function(e){var t=e.newVal===!0?e.target:null;this._set("activeDescendant",t)},_createChild:function(t){var r=this.get("defaultChildType"),i=t.childType||t.type,s,o,u;return i&&(o=n.isString(i)?e[i]:i),n.isFunction(o)?u=o:r&&(u=r),u?s=new u(t):e.error("Could not create a child instance because its constructor is either undefined or invalid."),s},_defAddChildFn:function(t){var r=t.child,i=t.index,s=this._items;r.get("parent")&&r.remove(),n.isNumber(i)?s.splice(i,0,r):s.push(r),r._set("parent",this),r.addTarget(this),t.index=r.get("index"),r.after("selectedChange",e.bind(this._updateSelection,this))},_defRemoveChildFn:function(e){var t=e.child,n=e.index,r=this._items;t.get("focused")&&t.blur(),t.get("selected")&&t.set("selected",0),r.splice(n,1),t.removeTarget(this),t._oldParent=t.get("parent"),t._set("parent",null)},_add:function(t,r){var i,s,o;return n.isArray(t)?(i=[],e.each(t,function(e,t){s=this._add(e,r+t),s&&i.push(s)},this),i.length>0&&(o=i)):(e.instanceOf(t,e.Widget)?s=t:s=this._createChild(t),s&&this.fire("addChild",{child:s,index:r})&&(o=s)),o},add:function(){var t=this._add.apply(this,arguments),r=t?n.isArray(t)?t:[t]:[];return new e.ArrayList(r)},remove:function(e){var t=this._items[e],n;return t&&this.fire("removeChild",{child:t,index:e})&&(n=t),n},removeAll:function(){var t=[],n;return e.each(this._items.concat(),function(){n=this.remove(0),n&&t.push(n)},this),new e.ArrayList(t)},selectChild:function(e){this.item(e).set("selected",1)},selectAll:function(){this.set("selected",1)},deselectAll:function(){this.set("selected",0)},_uiAddChild:function(e,t){e.render(t);var n=e.get("boundingBox"),s,o=e.next(!1),u;o&&o.get(r)?(s=o.get(i),s.insert(n,"before")):(u=e.previous(!1),u&&u.get(r)?(s=u.get(i),s.insert(n,"after")):t.contains(n)||t.appendChild(n))},_uiRemoveChild:function(e){e.get("boundingBox").remove()},_afterAddChild:function(e){var t=e.child;t.get("parent")==this&&this._uiAddChild(t,this._childrenContainer)},_afterRemoveChild:function(e){var t=e.child;t._oldParent==this&&this._uiRemoveChild(t)},_bindUIParent:function(){this.after("addChild",this._afterAddChild),this.after("removeChild",this._afterRemoveChild)},_renderChildren:function(){var e=this._childrenContainer||this.get("contentBox");this._childrenContainer=e,this.each(function(t){t.render(e)})},_destroyChildren:function(){this._hDestroyChild.detach(),this.each(function(e){e.destroy()})}},e.augment(s,e.ArrayList),e.WidgetParent=s},"3.9.1",{requires:["arraylist","base-build","widget"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("widget-child",function(e,t){function r(){e.after(this._syncUIChild,this,"syncUI"),e.after(this._bindUIChild,this,"bindUI")}var n=e.Lang;r.ATTRS={selected:{value:0,validator:n.isNumber},index:{readOnly:!0,getter:function(){var e=this.get("parent"),t=-1;return e&&(t=e.indexOf(this)),t}},parent:{readOnly:!0},depth:{readOnly:!0,getter:function(){var e=this.get("parent"),t=this.get("root"),n=-1;while(e){n+=1;if(e==t)break;e=e.get("parent")}return n}},root:{readOnly:!0,getter:function(){var t=function(n){var r=n.get("parent"),i=n.ROOT_TYPE,s=r;return i&&(s=r&&e.instanceOf(r,i)),s?t(r):n};return t(this)}}},r.prototype={ROOT_TYPE:null,_getUIEventNode:function(){var e=this.get("root"),t;return e&&(t=e.get("boundingBox")),t},next:function(e){var t=this.get("parent"),n;return t&&(n=t.item(this.get("index")+1)),!n&&e&&(n=t.item(0)),n},previous:function(e){var t=this.get("parent"),n=this.get("index"),r;return t&&n>0&&(r=t.item([n-1])),!r&&e&&(r=t.item(t.size()-1)),r},remove:function(t){var r,i;return n.isNumber(t)?i=e.WidgetParent.prototype.remove.apply(this,arguments):(r=this.get("parent"),r&&(i=r.remove(this.get("index")))),i},isRoot:function(){return this==this.get("root")},ancestor:function(e){var t=this.get("root"),n;if(this.get("depth")>e){n=this.get("parent");while(n!=t&&n.get("depth")>e)n=n.get("parent")}return n},_uiSetChildSelected:function(e){var t=this.get("boundingBox"),n=this.getClassName("selected");e===0?t.removeClass(n):t.addClass(n)},_afterChildSelectedChange:function(e){this._uiSetChildSelected(e.newVal)},_syncUIChild:function(){this._uiSetChildSelected(this.get("selected"))},_bindUIChild:function(){this.after("selectedChange",this._afterChildSelectedChange)}},e.WidgetChild=r},"3.9.1",{requires:["base-build","widget"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add("tabview-base",function(e,t){var n=e.ClassNameManager.getClassName,r="tabview",i="tab",s="panel",o="selected",u={},a=".",f={tabview:n(r),tabviewPanel:n(r,s),tabviewList:n(r,"list"),tab:n(i),tabLabel:n(i,"label"),tabPanel:n(i,s),selectedTab:n(i,o),selectedPanel:n(i,s,o)},l={tabview:a+f.tabview,tabviewList:"> ul",tab:"> ul > li",tabLabel:"> ul > li > a",tabviewPanel:"> div",tabPanel:"> div > div",selectedTab:"> ul > "+a+f.selectedTab,selectedPanel:"> div "+a+f.selectedPanel},c=function(){this.init.apply(this,arguments)};c.NAME="tabviewBase",c._queries=l,c._classNames=f,e.mix(c.prototype,{init:function(t){t=t||u,this._node=t.host||e.one(t.node),this.refresh()},initClassNames:function(t){e.Object.each(l,function(e,n){if(f[n]){var r=this.all(e);t!==undefined&&(r=r.item(t)),r&&r.addClass(f[n])}},this._node),this._node.addClass(f.tabview)},_select:function(e){var t=this._node,n=t.one(l.selectedTab),r=t.one(l.selectedPanel),i=t.all(l.tab).item(e),s=t.all(l.tabPanel).item(e);n&&n.removeClass(f.selectedTab),r&&r.removeClass(f.selectedPanel),i&&i.addClass(f.selectedTab),s&&s.addClass(f.selectedPanel)},initState:function(){var e=this._node,t=e.one(l.selectedTab),n=t?e.all(l.tab).indexOf(t):0;this._select(n)},_scrubTextNodes:function(){this._node.one(l.tabviewList).get("childNodes").each(function(e){e.get("nodeType")===3&&e.remove()})},refresh:function(){this._scrubTextNodes(),this.initClassNames(),this.initState(),this.initEvents()},tabEventName:"click",initEvents:function(){this._node.delegate(this.tabEventName,this.onTabEvent,l.tab,this)},onTabEvent:function(e){e.preventDefault(),this._select(this._node.all(l.tab).indexOf(e.currentTarget))},destroy:function(){this._node.detach(this.tabEventName)}}),e.TabviewBase=c},"3.9.1",{requires:["node-event-delegate","classnamemanager"]}); +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ + + + +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +YUI.add('tabview', function (Y, NAME) { + +/** + * The TabView module + * + * @module tabview + */ + +var _queries = Y.TabviewBase._queries, + _classNames = Y.TabviewBase._classNames, + DOT = '.', + + /** + * Provides a tabbed widget interface + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class TabView + * @constructor + * @extends Widget + * @uses WidgetParent + */ + TabView = Y.Base.create('tabView', Y.Widget, [Y.WidgetParent], { + _afterChildAdded: function() { + this.get('contentBox').focusManager.refresh(); + }, + + _defListNodeValueFn: function() { + return Y.Node.create(TabView.LIST_TEMPLATE); + }, + + _defPanelNodeValueFn: function() { + return Y.Node.create(TabView.PANEL_TEMPLATE); + }, + + _afterChildRemoved: function(e) { // update the selected tab when removed + var i = e.index, + selection = this.get('selection'); + + if (!selection) { // select previous item if selection removed + selection = this.item(i - 1) || this.item(0); + if (selection) { + selection.set('selected', 1); + } + } + + this.get('contentBox').focusManager.refresh(); + }, + + _initAria: function() { + var contentBox = this.get('contentBox'), + tablist = contentBox.one(_queries.tabviewList); + + if (tablist) { + tablist.setAttrs({ + //'aria-labelledby': + role: 'tablist' + }); + } + }, + + bindUI: function() { + // Use the Node Focus Manager to add keyboard support: + // Pressing the left and right arrow keys will move focus + // among each of the tabs. + + this.get('contentBox').plug(Y.Plugin.NodeFocusManager, { + descendants: DOT + _classNames.tabLabel, + keys: { next: 'down:39', // Right arrow + previous: 'down:37' }, // Left arrow + circular: true + }); + + this.after('render', this._setDefSelection); + this.after('addChild', this._afterChildAdded); + this.after('removeChild', this._afterChildRemoved); + }, + + renderUI: function() { + var contentBox = this.get('contentBox'); + this._renderListBox(contentBox); + this._renderPanelBox(contentBox); + this._childrenContainer = this.get('listNode'); + this._renderTabs(contentBox); + }, + + _setDefSelection: function() { + // If no tab is selected, select the first tab. + var selection = this.get('selection') || this.item(0); + + this.some(function(tab) { + if (tab.get('selected')) { + selection = tab; + return true; + } + }); + if (selection) { + // TODO: why both needed? (via widgetParent/Child)? + this.set('selection', selection); + selection.set('selected', 1); + } + }, + + _renderListBox: function(contentBox) { + var node = this.get('listNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderPanelBox: function(contentBox) { + var node = this.get('panelNode'); + if (!node.inDoc()) { + contentBox.append(node); + } + }, + + _renderTabs: function(contentBox) { + var tabs = contentBox.all(_queries.tab), + panelNode = this.get('panelNode'), + panels = (panelNode) ? this.get('panelNode').get('children') : null, + tabview = this; + + if (tabs) { // add classNames and fill in Tab fields from markup when possible + tabs.addClass(_classNames.tab); + contentBox.all(_queries.tabLabel).addClass(_classNames.tabLabel); + contentBox.all(_queries.tabPanel).addClass(_classNames.tabPanel); + + tabs.each(function(node, i) { + var panelNode = (panels) ? panels.item(i) : null; + tabview.add({ + boundingBox: node, + contentBox: node.one(DOT + _classNames.tabLabel), + panelNode: panelNode + }); + }); + } + } +}, { + + LIST_TEMPLATE: '
            ', + PANEL_TEMPLATE: '
            ', + + ATTRS: { + defaultChildType: { + value: 'Tab' + }, + + listNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(_classNames.tabviewList); + } + return node; + }, + + valueFn: '_defListNodeValueFn' + }, + + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(_classNames.tabviewPanel); + } + return node; + }, + + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null + //validator: '_validTabIndex' + } + }, + + HTML_PARSER: { + listNode: _queries.tabviewList, + panelNode: _queries.tabviewPanel + } +}); + +Y.TabView = TabView; +var Lang = Y.Lang, + _classNames = Y.TabviewBase._classNames; + +/** + * Provides Tab instances for use with TabView + * @param config {Object} Object literal specifying tabview configuration properties. + * + * @class Tab + * @constructor + * @extends Widget + * @uses WidgetChild + */ +Y.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], { + BOUNDING_TEMPLATE: '
          • ', + CONTENT_TEMPLATE: '', + PANEL_TEMPLATE: '
            ', + + _uiSetSelectedPanel: function(selected) { + this.get('panelNode').toggleClass(_classNames.selectedPanel, selected); + }, + + _afterTabSelectedChange: function(event) { + this._uiSetSelectedPanel(event.newVal); + }, + + _afterParentChange: function(e) { + if (!e.newVal) { + this._remove(); + } else { + this._add(); + } + }, + + _initAria: function() { + var anchor = this.get('contentBox'), + id = anchor.get('id'), + panel = this.get('panelNode'); + + if (!id) { + id = Y.guid(); + anchor.set('id', id); + } + // Apply the ARIA roles, states and properties to each tab + anchor.set('role', 'tab'); + anchor.get('parentNode').set('role', 'presentation'); + + + // Apply the ARIA roles, states and properties to each panel + panel.setAttrs({ + role: 'tabpanel', + 'aria-labelledby': id + }); + }, + + syncUI: function() { + this.set('label', this.get('label')); + this.set('content', this.get('content')); + this._uiSetSelectedPanel(this.get('selected')); + }, + + bindUI: function() { + this.after('selectedChange', this._afterTabSelectedChange); + this.after('parentChange', this._afterParentChange); + }, + + renderUI: function() { + this._renderPanel(); + this._initAria(); + }, + + _renderPanel: function() { + this.get('parent').get('panelNode') + .appendChild(this.get('panelNode')); + }, + + _add: function() { + var parent = this.get('parent').get('contentBox'), + list = parent.get('listNode'), + panel = parent.get('panelNode'); + + if (list) { + list.appendChild(this.get('boundingBox')); + } + + if (panel) { + panel.appendChild(this.get('panelNode')); + } + }, + + _remove: function() { + this.get('boundingBox').remove(); + this.get('panelNode').remove(); + }, + + _onActivate: function(e) { + if (e.target === this) { + // Prevent the browser from navigating to the URL specified by the + // anchor's href attribute. + e.domEvent.preventDefault(); + e.target.set('selected', 1); + } + }, + + initializer: function() { + this.publish(this.get('triggerEvent'), { + defaultFn: this._onActivate + }); + }, + + _defLabelGetter: function() { + return this.get('contentBox').getHTML(); + }, + + _defLabelSetter: function(label) { + var labelNode = this.get('contentBox'); + if (labelNode.getHTML() !== label) { // Avoid rewriting existing label. + labelNode.setHTML(label); + } + return label; + }, + + _defContentSetter: function(content) { + var panel = this.get('panelNode'); + if (panel.getHTML() !== content) { // Avoid rewriting existing content. + panel.setHTML(content); + } + return content; + }, + + _defContentGetter: function() { + return this.get('panelNode').getHTML(); + }, + + // find panel by ID mapping from label href + _defPanelNodeValueFn: function() { + var href = this.get('contentBox').get('href') || '', + parent = this.get('parent'), + hashIndex = href.indexOf('#'), + panel; + + href = href.substr(hashIndex); + + if (href.charAt(0) === '#') { // in-page nav, find by ID + panel = Y.one(href); + if (panel) { + panel.addClass(_classNames.tabPanel); + } + } + + // use the one found by id, or else try matching indices + if (!panel && parent) { + panel = parent.get('panelNode') + .get('children').item(this.get('index')); + } + + if (!panel) { // create if none found + panel = Y.Node.create(this.PANEL_TEMPLATE); + } + return panel; + } +}, { + ATTRS: { + /** + * @attribute triggerEvent + * @default "click" + * @type String + */ + triggerEvent: { + value: 'click' + }, + + /** + * @attribute label + * @type HTML + */ + label: { + setter: '_defLabelSetter', + getter: '_defLabelGetter' + }, + + /** + * @attribute content + * @type HTML + */ + content: { + setter: '_defContentSetter', + getter: '_defContentGetter' + }, + + /** + * @attribute panelNode + * @type Y.Node + */ + panelNode: { + setter: function(node) { + node = Y.one(node); + if (node) { + node.addClass(_classNames.tabPanel); + } + return node; + }, + valueFn: '_defPanelNodeValueFn' + }, + + tabIndex: { + value: null, + validator: '_validTabIndex' + } + + }, + + HTML_PARSER: { + selected: function() { + var ret = (this.get('boundingBox').hasClass(_classNames.selectedTab)) ? + 1 : 0; + return ret; + } + } + +}); + + +}, '3.9.1', { + "requires": [ + "widget", + "widget-parent", + "widget-child", + "tabview-base", + "node-pluginhost", + "node-focusmanager" + ], + "skinnable": true +}); diff --git a/docs_api/assets/js/yui-min.js b/docs_api/assets/js/yui-min.js new file mode 100644 index 000000000..af1775cde --- /dev/null +++ b/docs_api/assets/js/yui-min.js @@ -0,0 +1,16 @@ +/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */ +typeof YUI!="undefined"&&(YUI._YUI=YUI);var YUI=function(){var e=0,t=this,n=arguments,r=n.length,i=function(e,t){return e&&e.hasOwnProperty&&e instanceof t},s=typeof YUI_config!="undefined"&&YUI_config;i(t,YUI)?(t._init(),YUI.GlobalConfig&&t.applyConfig(YUI.GlobalConfig),s&&t.applyConfig(s),r||t._setup()):t=new YUI;if(r){for(;e-1&&(n="3.5.0"),e={applyConfig:function(e){e=e||u;var t,n,r=this.config,i=r.modules,s=r.groups,o=r.aliases,a=this.Env._loader;for(n in e)e.hasOwnProperty(n)&&(t=e[n],i&&n=="modules"?E(i,t):o&&n=="aliases"?E(o,t):s&&n=="groups"?E(s,t):n=="win"?(r[n]=t&&t.contentWindow||t,r.doc=r[n]?r[n].document:null):n!="_yuid"&&(r[n]=t));a&&a._config(e)},_config:function(e){this.applyConfig(e)},_init:function(){var e,t,r=this,s=YUI.Env,u=r.Env,a;r.version=n;if(!u){r.Env={core:["get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"],loaderExtras:["loader-rollup","loader-yui3"],mods:{},versions:{},base:i,cdn:i+n+"/build/",_idx:0,_used:{},_attached:{},_missed:[],_yidx:0,_uidx:0,_guidp:"y",_loaded:{},_BASE_RE:/(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,parseBasePath:function(e,t){var n=e.match(t),r,i;return n&&(r=RegExp.leftContext||e.slice(0,e.indexOf(n[0])),i=n[3],n[1]&&(r+="?"+n[1]),r={filter:i,path:r}),r},getBase:s&&s.getBase||function(t){var n=h&&h.getElementsByTagName("script")||[],i=u.cdn,s,o,a,f;for(o=0,a=n.length;o',YUI.Env.cssStampEl=t.firstChild,h.body?h.body.appendChild(YUI.Env.cssStampEl):p.insertBefore(YUI.Env.cssStampEl,p.firstChild)):h&&h.getElementById(o)&&!YUI.Env.cssStampEl&&(YUI.Env.cssStampEl=h.getElementById(o)),r.config.lang=r.config.lang||"en-US",r.config.base=YUI.config.base||r.Env.getBase(r.Env._BASE_RE);if(!e||!"mindebug".indexOf(e))e="min";e=e?"-"+e:e,r.config.loaderPath=YUI.config.loaderPath||"loader/loader"+e+".js"},_setup:function(){var e,t=this,n=[],r=YUI.Env.mods,i=t.config.core||[].concat(YUI.Env.core);for(e=0;e-1){s=o.split(r);for(i=s[0]=="YAHOO"?1:0;ii&&i in t?t[i]:!0);return n},h.indexOf=f._isNative(l.indexOf)?function(e,t,n){return l.indexOf.call(e,t,n)}:function(e,t,n){var r=e.length;n=+n||0,n=(n>0||-1)*Math.floor(Math.abs(n)),n<0&&(n+=r,n<0&&(n=0));for(;n1?Array.prototype.join.call(arguments,d):String(r);if(!(i in t)||n&&t[i]==n)t[i]=e.apply(e,arguments);return t[i]}},e.getLocation=function(){var t=e.config.win;return t&&t.location},e.merge=function(){var e=0,t=arguments.length,n={},r,i;for(;e-1},g.each=function(t,n,r,i){var s;for(s in t)(i||E(t,s))&&n.call(r||e,t[s],s,t);return e},g.some=function(t,n,r,i){var s;for(s in t)if(i||E(t,s))if(n.call(r||e,t[s],s,t))return!0;return!1},g.getValue=function(t,n){if(!f.isObject(t))return m;var r,i=e.Array(n),s=i.length;for(r=0;t!==m&&r=0){for(i=0;u!==m&&i0),t||(typeof process=="object"&&process.versions&&process.versions.node&&(s.os=process.platform,s.nodejs=n(process.versions.node)),YUI.Env.UA=s),s},e.UA=YUI.Env.UA||YUI.Env.parseUA(),e.UA.compareVersions=function(e,t){var n,r,i,s,o,u;if(e===t)return 0;r=(e+"").split("."),s=(t+"").split(".");for(o=0,u=Math.max(r.length,s.length);oi)return 1}return 0},YUI.Env.aliases={anim:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],"anim-shape-transform":["anim-shape"],app:["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"],attribute:["attribute-base","attribute-complex"],"attribute-events":["attribute-observable"],autocomplete:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],axes:["axis-numeric","axis-category","axis-time","axis-stacked"],"axes-base":["axis-numeric-base","axis-category-base","axis-time-base","axis-stacked-base"],base:["base-base","base-pluginhost","base-build"],cache:["cache-base","cache-offline","cache-plugin"],charts:["charts-base"],collection:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],color:["color-base","color-hsl","color-harmony"],controller:["router"],dataschema:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],datasource:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],datatable:["datatable-core","datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"],datatype:["datatype-date","datatype-number","datatype-xml"],"datatype-date":["datatype-date-parse","datatype-date-format","datatype-date-math"],"datatype-number":["datatype-number-parse","datatype-number-format"],"datatype-xml":["datatype-xml-parse","datatype-xml-format"],dd:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],dom:["dom-base","dom-screen","dom-style","selector-native","selector"],editor:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],event:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange","event-tap"],"event-custom":["event-custom-base","event-custom-complex"],"event-gestures":["event-flick","event-move"],handlebars:["handlebars-compiler"],highlight:["highlight-base","highlight-accentfold"],history:["history-base","history-hash","history-hash-ie","history-html5"],io:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],json:["json-parse","json-stringify"],loader:["loader-base","loader-rollup","loader-yui3"],node:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],pluginhost:["pluginhost-base","pluginhost-config"],querystring:["querystring-parse","querystring-stringify"],recordset:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],resize:["resize-base","resize-proxy","resize-constrain"],slider:["slider-base","slider-value-range","clickable-rail","range-slider"],template:["template-base","template-micro"],text:["text-accentfold","text-wordbreak"],widget:["widget-base","widget-htmlparser","widget-skin","widget-uievents"]}},"3.9.1",{use:["yui-base","get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"]}),YUI.add("get",function(e,t){var n=e.Lang,r,i,s;e.Get=i={cssOptions:{attributes:{rel:"stylesheet"},doc:e.config.linkDoc||e.config.doc,pollInterval:50},jsOptions:{autopurge:!0,doc:e.config.scriptDoc||e.config.doc},options:{attributes:{charset:"utf-8"},purgethreshold:20},REGEX_CSS:/\.css(?:[?;].*)?$/i,REGEX_JS:/\.js(?:[?;].*)?$/i,_insertCache:{},_pending:null,_purgeNodes:[],_queue:[],abort:function(e){var t,n,r,i,s;if(!e.abort){n=e,s=this._pending,e=null;if(s&&s.transaction.id===n)e=s.transaction,this._pending=null;else for(t=0,i=this._queue.length;t=e&&this._purge(this._purgeNodes)},_getEnv:function(){var t=e.config.doc,n=e.UA;return this._env={async:t&&t.createElement("script").async===!0||n.ie>=10,cssFail:n.gecko>=9||n.compareVersions(n.webkit,535.24)>=0,cssLoad:(!n.gecko&&!n.webkit||n.gecko>=9||n.compareVersions(n.webkit,535.24)>=0)&&!(n.chrome&&n.chrome<=18),preservesScriptOrder:!!(n.gecko||n.opera||n.ie&&n.ie>=10)}},_getTransaction:function(t,r){var i=[],o,u,a,f;n.isArray(t)||(t=[t]),r=e.merge(this.options,r),r.attributes=e.merge(this.options.attributes,r.attributes);for(o=0,u=t.length;o-1&&n.splice(i,1))}}},i.script=i.js,i.Transaction=s=function(t,n){var r=this;r.id=s._lastId+=1,r.data=n.data,r.errors=[],r.nodes=[],r.options=n,r.requests=t,r._callbacks=[],r._queue=[],r._reqsWaiting=0,r.tId=r.id,r.win=n.win||e.config.win},s._lastId=0,s.prototype={_state:"new",abort:function(e){this._pending=null,this._pendingCSS=null,this._pollTimer=clearTimeout(this._pollTimer),this._queue=[],this._reqsWaiting=0,this.errors.push({error:e||"Aborted"}),this._finish()},execute:function(e){var t=this,n=t.requests,r=t._state,i,s,o,u;if(r==="done"){e&&e(t.errors.length?t.errors:null,t);return}e&&t._callbacks.push(e);if(r==="executing")return;t._state="executing",t._queue=o=[],t.options.timeout&&(t._timeout=setTimeout(function(){t.abort("Timeout")},t.options.timeout)),t._reqsWaiting=n.length;for(i=0,s=n.length;i=10?(o.onerror=function(){setTimeout(c,0)},o.onload=function(){setTimeout(h,0)}):(o.onerror=c,o.onload=h),!n.cssFail&&!s&&(f=setTimeout(c,t.timeout||3e3))),this.nodes.push(o),r.parentNode.insertBefore(o,r)},_next:function(){if(this._pending)return;this._queue.length?this._insert(this._queue.shift()):this._reqsWaiting||this._finish()},_poll:function(t){var n=this,r=n._pendingCSS,i=e.UA.webkit,s,o,u,a,f,l;if(t){r||(r=n._pendingCSS=[]),r.push(t);if(n._pollTimer)return}n._pollTimer=null;for(s=0;s=0)if(l[u].href===a){r.splice(s,1),s-=1,n._progress(null,f);break}}else try{o=!!f.node.sheet.cssRules,r.splice(s,1),s-=1,n._progress(null,f)}catch(c){}}r.length&&(n._pollTimer=setTimeout(function(){n._poll.call(n)},n.options.pollInterval))},_progress:function(e,t){var n=this.options;e&&(t.error=e,this.errors.push({error:e,request:t})),t.node._yuiget_finished=t.finished=!0,n.onProgress&&n.onProgress.call(n.context||this,this._getEventData(t)),t.autopurge&&(i._autoPurge(this.options.purgethreshold),i._purgeNodes.push(t.node)),this._pending===t&&(this._pending=null),this._reqsWaiting-=1,this._next()}}},"3.9.1",{requires:["yui-base"]}),YUI.add("features",function(e,t){var n={};e.mix(e.namespace("Features"),{tests:n,add:function(e,t,r){n[e]=n[e]||{},n[e][t]=r},all:function(t,r){var i=n[t],s=[];return i&&e.Object.each(i,function(n,i){s.push(i+":"+(e.Features.test(t,i,r)?1:0))}),s.length?s.join(";"):""},test:function(t,r,i){i=i||[];var s,o,u,a=n[t],f=a&&a[r];return!f||(s=f.result,e.Lang.isUndefined(s)&&(o=f.ua,o&&(s=e.UA[o]),u=f.test,u&&(!o||s)&&(s=u.apply(e,i)),f.result=s)),s}});var r=e.Features.add;r("load","0",{name:"app-transitions-native",test:function(e){var t=e.config.doc,n=t?t.documentElement:null;return n&&n.style?"MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style:!1},trigger:"app-transitions"}),r("load","1",{name:"autocomplete-list-keys",test:function(e){return!e.UA.ios&&!e.UA.android},trigger:"autocomplete-list"}),r("load","2",{name:"dd-gestures",trigger:"dd-drag",ua:"touchEnabled"}),r("load","3",{name:"dom-style-ie",test:function(e){var t=e.Features.test,n=e.Features.add,r=e.config.win,i=e.config.doc,s="documentElement",o=!1;return n("style","computedStyle",{test:function(){return r&&"getComputedStyle"in r}}),n("style","opacity",{test:function(){return i&&"opacity"in i[s].style}}),o=!t("style","opacity" +)&&!t("style","computedStyle"),o},trigger:"dom-style"}),r("load","4",{name:"editor-para-ie",trigger:"editor-para",ua:"ie",when:"instead"}),r("load","5",{name:"event-base-ie",test:function(e){var t=e.config.doc&&e.config.doc.implementation;return t&&!t.hasFeature("Events","2.0")},trigger:"node-base"}),r("load","6",{name:"graphics-canvas",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}),r("load","7",{name:"graphics-canvas-default",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}),r("load","8",{name:"graphics-svg",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}),r("load","9",{name:"graphics-svg-default",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}),r("load","10",{name:"graphics-vml",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}),r("load","11",{name:"graphics-vml-default",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}),r("load","12",{name:"history-hash-ie",test:function(e){var t=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange"in e.config.win)||!t||t<8)},trigger:"history-hash"}),r("load","13",{name:"io-nodejs",trigger:"io-base",ua:"nodejs"}),r("load","14",{name:"json-parse-shim",test:function(e){function i(e,t){return e==="ok"?!0:t}var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONParse!==!1&&!!n;if(r)try{r=n.parse('{"ok":false}',i).ok}catch(s){r=!1}return!r},trigger:"json-parse"}),r("load","15",{name:"json-stringify-shim",test:function(e){var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONStringify!==!1&&!!n;if(r)try{r="0"===n.stringify(0)}catch(i){r=!1}return!r},trigger:"json-stringify"}),r("load","16",{name:"scrollview-base-ie",trigger:"scrollview-base",ua:"ie"}),r("load","17",{name:"selector-css2",test:function(e){var t=e.config.doc,n=t&&!("querySelectorAll"in t);return n},trigger:"selector"}),r("load","18",{name:"transition-timer",test:function(e){var t=e.config.doc,n=t?t.documentElement:null,r=!0;return n&&n.style&&(r=!("MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style)),r},trigger:"transition"}),r("load","19",{name:"widget-base-ie",trigger:"widget-base",ua:"ie"}),r("load","20",{name:"yql-jsonp",test:function(e){return!e.UA.nodejs&&!e.UA.winjs},trigger:"yql",when:"after"}),r("load","21",{name:"yql-nodejs",trigger:"yql",ua:"nodejs",when:"after"}),r("load","22",{name:"yql-winjs",trigger:"yql",ua:"winjs",when:"after"})},"3.9.1",{requires:["yui-base"]}),YUI.add("intl-base",function(e,t){var n=/[, ]/;e.mix(e.namespace("Intl"),{lookupBestLang:function(t,r){function a(e){var t;for(t=0;t0){o=a(s);if(o)return o;u=s.lastIndexOf("-");if(!(u>=0))break;s=s.substring(0,u),u>=2&&s.charAt(u-2)==="-"&&(s=s.substring(0,u-2))}}return""}})},"3.9.1",{requires:["yui-base"]}),YUI.add("yui-log",function(e,t){var n=e,r="yui:log",i="undefined",s={debug:1,info:1,warn:1,error:1};n.log=function(e,t,o,u){var a,f,l,c,h,p=n,d=p.config,v=p.fire?p:YUI.Env.globalEvents;return d.debug&&(o=o||"",typeof o!="undefined"&&(f=d.logExclude,l=d.logInclude,!l||o in l?l&&o in l?a=!l[o]:f&&o in f&&(a=f[o]):a=1),a||(d.useBrowserConsole&&(c=o?o+": "+e:e,p.Lang.isFunction(d.logFn)?d.logFn.call(p,e,t,o):typeof console!==i&&console.log?(h=t&&console[t]&&t in s?t:"log",console[h](c)):typeof opera!==i&&opera.postError(c)),v&&!u&&(v===p&&!v.getEvent(r)&&v.publish(r,{broadcast:2}),v.fire(r,{msg:e,cat:t,src:o})))),p},n.message=function(){return n.log.apply(n,arguments)}},"3.9.1",{requires:["yui-base"]}),YUI.add("yui-later",function(e,t){var n=[];e.later=function(t,r,i,s,o){t=t||0,s=e.Lang.isUndefined(s)?n:e.Array(s),r=r||e.config.win||e;var u=!1,a=r&&e.Lang.isString(i)?r[i]:i,f=function(){u||(a.apply?a.apply(r,s||n):a(s[0],s[1],s[2],s[3]))},l=o?setInterval(f,t):setTimeout(f,t);return{id:l,interval:o,cancel:function(){u=!0,this.interval?clearInterval(l):clearTimeout(l)}}},e.Lang.later=e.later},"3.9.1",{requires:["yui-base"]}),YUI.add("loader-base",function(e,t){YUI.Env[e.version]||function(){var t=e.version,n="/build/",r=t+n,i=e.Env.base,s="gallery-2013.02.27-21-03",o="2in3",u="4",a="2.9.0",f=i+"combo?",l={version:t,root:r,base:e.Env.base,comboBase:f,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},c=l.groups,h=function(e,t,r){var s=o+"."+(e||u)+"/"+(t||a)+n,l=r&&r.base?r.base:i,h=r&&r.comboBase?r.comboBase:f;c.yui2.base=l+s,c.yui2.root=s,c.yui2.comboBase=h}, +p=function(e,t){var r=(e||s)+n,o=t&&t.base?t.base:i,u=t&&t.comboBase?t.comboBase:f;c.gallery.base=o+r,c.gallery.root=r,c.gallery.comboBase=u};c[t]={},c.gallery={ext:!1,combine:!0,comboBase:f,update:p,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}},c.yui2={combine:!0,ext:!1,comboBase:f,update:h,patterns:{"yui2-":{configFn:function(e){/-skin|reset|fonts|grids|base/.test(e.name)&&(e.type="css",e.path=e.path.replace(/\.js/,".css"),e.path=e.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin"))}}}},p(),h(),YUI.Env[t]=l}();var n={},r=[],i=1024,s=YUI.Env,o=s._loaded,u="css",a="js",f="intl",l="sam",c=e.version,h="",p=e.Object,d=p.each,v=e.Array,m=s._loaderQueue,g=s[c],y="skin-",b=e.Lang,w=s.mods,E,S=function(e,t,n,r){var i=e+"/"+t;return r||(i+="-min"),i+="."+(n||u),i};YUI.Env._cssLoaded||(YUI.Env._cssLoaded={}),e.Env.meta=g,e.Loader=function(t){var n=this;t=t||{},E=g.md5,n.context=e,n.base=e.Env.meta.base+e.Env.meta.root,n.comboBase=e.Env.meta.comboBase,n.combine=t.base&&t.base.indexOf(n.comboBase.substr(0,20))>-1,n.comboSep="&",n.maxURLLength=i,n.ignoreRegistered=t.ignoreRegistered,n.root=e.Env.meta.root,n.timeout=0,n.forceMap={},n.allowRollup=!1,n.filters={},n.required={},n.patterns={},n.moduleInfo={},n.groups=e.merge(e.Env.meta.groups),n.skin=e.merge(e.Env.meta.skin),n.conditions={},n.config=t,n._internal=!0,n._populateCache(),n.loaded=o[c],n.async=!0,n._inspectPage(),n._internal=!1,n._config(t),n.forceMap=n.force?e.Array.hash(n.force):{},n.testresults=null,e.config.tests&&(n.testresults=e.config.tests),n.sorted=[],n.dirty=!0,n.inserted={},n.skipped={},n.tested={},n.ignoreRegistered&&n._resetModules()},e.Loader.prototype={_populateCache:function(){var t=this,n=g.modules,r=s._renderedMods,i;if(r&&!t.ignoreRegistered){for(i in r)r.hasOwnProperty(i)&&(t.moduleInfo[i]=e.merge(r[i]));r=s._conditions;for(i in r)r.hasOwnProperty(i)&&(t.conditions[i]=e.merge(r[i]))}else for(i in n)n.hasOwnProperty(i)&&t.addModule(n[i],i)},_resetModules:function(){var e=this,t,n,r,i,s;for(t in e.moduleInfo)if(e.moduleInfo.hasOwnProperty(t)){r=e.moduleInfo[t],i=r.name,s=YUI.Env.mods[i]?YUI.Env.mods[i].details:null,s&&(e.moduleInfo[i]._reset=!0,e.moduleInfo[i].requires=s.requires||[],e.moduleInfo[i].optional=s.optional||[],e.moduleInfo[i].supersedes=s.supercedes||[]);if(r.defaults)for(n in r.defaults)r.defaults.hasOwnProperty(n)&&r[n]&&(r[n]=r.defaults[n]);delete r.langCache,delete r.skinCache,r.skinnable&&e._addSkin(e.skin.defaultSkin,r.name)}},REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"},COVERAGE:{searchExp:"-min\\.js",replaceStr:"-coverage.js"}},_inspectPage:function(){var e=this,t,n,r,i,s;for(s in e.moduleInfo)e.moduleInfo.hasOwnProperty(s)&&(t=e.moduleInfo[s],t.type&&t.type===u&&e.isCSSLoaded(t.name)&&(e.loaded[s]=!0));for(s in w)w.hasOwnProperty(s)&&(t=w[s],t.details&&(n=e.moduleInfo[t.name],r=t.details.requires,i=n&&n.requires,n?!n._inspected&&r&&i.length!==r.length&&delete n.expanded:n=e.addModule(t.details,s),n._inspected=!0))},_requires:function(e,t){var n,r,i,s,o=this.moduleInfo,a=o[e],f=o[t];if(!a||!f)return!1;r=a.expanded_map,i=a.after_map;if(i&&t in i)return!0;i=f.after_map;if(i&&e in i)return!1;s=o[t]&&o[t].supersedes;if(s)for(n=0;n-1&&(k=n);if(C&&(C[c]||k&&C[k])){L=c,C[k]&&(L=k);for(n=0;n-1},getModule:function(t){if(!t)return null;var n,r,i,s=this.moduleInfo[t],o=this.patterns;if(!s||s&&s.ext)for(i in o)if(o.hasOwnProperty(i)){n=o[i],n.test||(n.test=this._patternTest);if(n.test(t,i)){r=n;break}}return s?r&&s&&r.configFn&&!s.configFn&&(s.configFn=r.configFn,s.configFn(s)):r&&(n.action?n.action.call(this,t,i):(s=this.addModule(e.merge(r),t),r.configFn&&(s.configFn=r.configFn),s.temp=!0)),s},_rollup:function(){},_reduce:function(e){e=e||this.required;var t,n,r,i,s=this.loadType,o=this.ignore?v.hash(this.ignore):!1;for(t in e)if(e.hasOwnProperty(t)){i=this.getModule(t),((this.loaded[t]||w[t])&&!this.forceMap[t]&&!this.ignoreRegistered||s&&i&&i.type!==s)&&delete e[t],o&&o[t]&&delete e[t],r=i&&i.supersedes;if(r)for(n=0;n0&&(m.running=!0,m.next()())},insert:function(t,n,r){var i=this,s=e.merge(this);delete s.require,delete s.dirty,m.add(function(){i._insert(s,t,n,r)}),this._continue()},loadNext:function(){return},_filter:function(e,t,n){var r=this.filter,i=t&&t in this.filters,s=i&&this.filters[t],o=n||(this.moduleInfo[t]?this.moduleInfo[t].group:null);return o&&this.groups[o]&&this.groups +[o].filter&&(s=this.groups[o].filter,i=!0),e&&(i&&(r=b.isString(s)?this.FILTER_DEFS[s.toUpperCase()]||null:s),r&&(e=e.replace(new RegExp(r.searchExp,"g"),r.replaceStr))),e},_url:function(e,t,n){return this._filter((n||this.base||"")+e,t)},resolve:function(e,t){var r,s,o,f,c,h,p,d,v,m,g,y,w,E,S=[],x,T,N={},C=this,k,A,O=C.ignoreRegistered?{}:C.inserted,M={js:[],jsMods:[],css:[],cssMods:[]},_=C.loadType||"js",D;(C.skin.overrides||C.skin.defaultSkin!==l||C.ignoreRegistered)&&C._resetModules(),e&&C.calculate(),t=t||C.sorted,D=function(e){if(e){c=e.group&&C.groups[e.group]||n,c.async===!1&&(e.async=c.async),f=e.fullpath?C._filter(e.fullpath,t[s]):C._url(e.path,t[s],c.base||e.base);if(e.attributes||e.async===!1)f={url:f,async:e.async},e.attributes&&(f.attributes=e.attributes);M[e.type].push(f),M[e.type+"Mods"].push(e)}},r=t.length,y=C.comboBase,f=y,m={};for(s=0;sA){S=[];for(t=0;tA&&(o=S.pop(),x=w+S.join(k),M[_].push(C._filter(x,null,N[w].group)),S=[],o&&S.push(o));S.length&&(x=w+S.join(k),M[_].push(C._filter(x,null,N[w].group)))}else M[_].push(C._filter(x,null,N[w].group));M[_+"Mods"]=M[_+"Mods"].concat(g)}}return N=null,M},load:function(e){if(!e)return;var t=this,n=t.resolve(!0);t.data=n,t.onEnd=function(){e.apply(t.context||t,arguments)},t.insert()}}},"3.9.1",{requires:["get","features"]}),YUI.add("loader-rollup",function(e,t){e.Loader.prototype._rollup=function(){var e,t,n,r,i=this.required,s,o=this.moduleInfo,u,a,f;if(this.dirty||!this.rollups){this.rollups={};for(e in o)o.hasOwnProperty(e)&&(n=this.getModule(e),n&&n.rollup&&(this.rollups[e]=n))}for(;;){u=!1;for(e in this.rollups)if(this.rollups.hasOwnProperty(e)&&!i[e]&&(!this.loaded[e]||this.forceMap[e])){n=this.getModule(e),r=n.supersedes||[],s=!1;if(!n.rollup)continue;a=0;for(t=0;t=n.rollup;if(s)break}}s&&(i[e]=!0,u=!0,this.getRequires(n))}if(!u)break}}},"3.9.1",{requires:["loader-base"]}),YUI.add("loader-yui3",function(e,t){YUI.Env[e.version].modules=YUI.Env[e.version].modules||{},e.mix(YUI.Env[e.version].modules,{"align-plugin":{requires:["node-screen","node-pluginhost"]},anim:{use:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{requires:["base-base","node-style"]},"anim-color":{requires:["anim-base"]},"anim-curve":{requires:["anim-xy"]},"anim-easing":{requires:["anim-base"]},"anim-node-plugin":{requires:["node-pluginhost","anim-base"]},"anim-scroll":{requires:["anim-base"]},"anim-shape":{requires:["anim-base","anim-easing","anim-color","matrix"]},"anim-shape-transform":{use:["anim-shape"]},"anim-xy":{requires:["anim-base","node-screen"]},app:{use:["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"]},"app-base":{requires:["classnamemanager","pjax-base","router","view"]},"app-content":{requires:["app-base","pjax-content"]},"app-transitions":{requires:["app-base"]},"app-transitions-css":{type:"css"},"app-transitions-native":{condition:{name:"app-transitions-native",test:function(e){var t=e.config.doc,n=t?t.documentElement:null;return n&&n.style?"MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style:!1},trigger:"app-transitions"},requires:["app-transitions","app-transitions-css","parallel","transition"]},"array-extras":{requires:["yui-base"]},"array-invoke":{requires:["yui-base"]},arraylist:{requires:["yui-base"]},"arraylist-add":{requires:["arraylist"]},"arraylist-filter":{requires:["arraylist"]},arraysort:{requires:["yui-base"]},"async-queue":{requires:["event-custom"]},attribute:{use:["attribute-base","attribute-complex"]},"attribute-base":{requires:["attribute-core","attribute-observable","attribute-extras"]},"attribute-complex":{requires:["attribute-base"]},"attribute-core":{requires:["oop"]},"attribute-events":{use:["attribute-observable"]},"attribute-extras":{requires:["oop"]},"attribute-observable":{requires:["event-custom"]},autocomplete:{use:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters":{requires:["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{requires:["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{requires:["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{requires:["array-extras","highlight-accentfold"]},"autocomplete-list":{after:["autocomplete-sources"],lang:["en","es"],requires:["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],skinnable:!0},"autocomplete-list-keys":{condition:{name:"autocomplete-list-keys",test:function(e){return!e.UA.ios&&!e.UA.android},trigger:"autocomplete-list"},requires: +["autocomplete-list","base-build"]},"autocomplete-plugin":{requires:["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]},axes:{use:["axis-numeric","axis-category","axis-time","axis-stacked"]},"axes-base":{use:["axis-numeric-base","axis-category-base","axis-time-base","axis-stacked-base"]},axis:{requires:["dom","widget","widget-position","widget-stack","graphics","axis-base"]},"axis-base":{requires:["classnamemanager","datatype-number","datatype-date","base","event-custom"]},"axis-category":{requires:["axis","axis-category-base"]},"axis-category-base":{requires:["axis-base"]},"axis-numeric":{requires:["axis","axis-numeric-base"]},"axis-numeric-base":{requires:["axis-base"]},"axis-stacked":{requires:["axis-numeric","axis-stacked-base"]},"axis-stacked-base":{requires:["axis-numeric-base"]},"axis-time":{requires:["axis","axis-time-base"]},"axis-time-base":{requires:["axis-base"]},base:{use:["base-base","base-pluginhost","base-build"]},"base-base":{requires:["attribute-base","base-core","base-observable"]},"base-build":{requires:["base-base"]},"base-core":{requires:["attribute-core"]},"base-observable":{requires:["attribute-observable"]},"base-pluginhost":{requires:["base-base","pluginhost"]},button:{requires:["button-core","cssbutton","widget"]},"button-core":{requires:["attribute-core","classnamemanager","node-base"]},"button-group":{requires:["button-plugin","cssbutton","widget"]},"button-plugin":{requires:["button-core","cssbutton","node-pluginhost"]},cache:{use:["cache-base","cache-offline","cache-plugin"]},"cache-base":{requires:["base"]},"cache-offline":{requires:["cache-base","json"]},"cache-plugin":{requires:["plugin","cache-base"]},calendar:{lang:["de","en","es","es-AR","fr","it","ja","nb-NO","nl","pt-BR","ru","zh-HANT-TW"],requires:["calendar-base","calendarnavigator"],skinnable:!0},"calendar-base":{lang:["de","en","es","es-AR","fr","it","ja","nb-NO","nl","pt-BR","ru","zh-HANT-TW"],requires:["widget","datatype-date","datatype-date-math","cssgrids"],skinnable:!0},calendarnavigator:{requires:["plugin","classnamemanager","datatype-date","node"],skinnable:!0},charts:{use:["charts-base"]},"charts-base":{requires:["dom","event-mouseenter","event-touch","graphics-group","axes","series-pie","series-line","series-marker","series-area","series-spline","series-column","series-bar","series-areaspline","series-combo","series-combospline","series-line-stacked","series-marker-stacked","series-area-stacked","series-spline-stacked","series-column-stacked","series-bar-stacked","series-areaspline-stacked","series-combo-stacked","series-combospline-stacked"]},"charts-legend":{requires:["charts-base"]},classnamemanager:{requires:["yui-base"]},"clickable-rail":{requires:["slider-base"]},collection:{use:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},color:{use:["color-base","color-hsl","color-harmony"]},"color-base":{requires:["yui-base"]},"color-harmony":{requires:["color-hsl"]},"color-hsl":{requires:["color-base"]},"color-hsv":{requires:["color-base"]},console:{lang:["en","es","ja"],requires:["yui-log","widget"],skinnable:!0},"console-filters":{requires:["plugin","console"],skinnable:!0},controller:{use:["router"]},cookie:{requires:["yui-base"]},"createlink-base":{requires:["editor-base"]},cssbase:{after:["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],type:"css"},"cssbase-context":{after:["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],type:"css"},cssbutton:{type:"css"},cssfonts:{type:"css"},"cssfonts-context":{type:"css"},cssgrids:{optional:["cssreset","cssfonts"],type:"css"},"cssgrids-base":{optional:["cssreset","cssfonts"],type:"css"},"cssgrids-responsive":{optional:["cssreset","cssfonts"],requires:["cssgrids","cssgrids-responsive-base"],type:"css"},"cssgrids-units":{optional:["cssreset","cssfonts"],requires:["cssgrids-base"],type:"css"},cssnormalize:{type:"css"},"cssnormalize-context":{type:"css"},cssreset:{type:"css"},"cssreset-context":{type:"css"},dataschema:{use:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{requires:["dataschema-base"]},"dataschema-base":{requires:["base"]},"dataschema-json":{requires:["dataschema-base","json"]},"dataschema-text":{requires:["dataschema-base"]},"dataschema-xml":{requires:["dataschema-base"]},datasource:{use:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{requires:["datasource-local","plugin","dataschema-array"]},"datasource-cache":{requires:["datasource-local","plugin","cache-base"]},"datasource-function":{requires:["datasource-local"]},"datasource-get":{requires:["datasource-local","get"]},"datasource-io":{requires:["datasource-local","io-base"]},"datasource-jsonschema":{requires:["datasource-local","plugin","dataschema-json"]},"datasource-local":{requires:["base"]},"datasource-polling":{requires:["datasource-local"]},"datasource-textschema":{requires:["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{requires:["datasource-local","plugin","datatype-xml","dataschema-xml"]},datatable:{use:["datatable-core","datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"]},"datatable-base":{requires:["datatable-core","datatable-table","datatable-head","datatable-body","base-build","widget"],skinnable:!0},"datatable-body":{requires:["datatable-core","view","classnamemanager"]},"datatable-column-widths":{requires:["datatable-base"]},"datatable-core":{requires:["escape","model-list","node-event-delegate"]},"datatable-datasource":{requires:["datatable-base","plugin","datasource-local" +]},"datatable-formatters":{requires:["datatable-body","datatype-number-format","datatype-date-format","escape"]},"datatable-head":{requires:["datatable-core","view","classnamemanager"]},"datatable-message":{lang:["en","fr","es"],requires:["datatable-base"],skinnable:!0},"datatable-mutable":{requires:["datatable-base"]},"datatable-scroll":{requires:["datatable-base","datatable-column-widths","dom-screen"],skinnable:!0},"datatable-sort":{lang:["en","fr","es"],requires:["datatable-base"],skinnable:!0},"datatable-table":{requires:["datatable-core","datatable-head","datatable-body","view","classnamemanager"]},datatype:{use:["datatype-date","datatype-number","datatype-xml"]},"datatype-date":{use:["datatype-date-parse","datatype-date-format","datatype-date-math"]},"datatype-date-format":{lang:["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{requires:["yui-base"]},"datatype-date-parse":{},"datatype-number":{use:["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{use:["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},dd:{use:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{requires:["dd-drag"]},"dd-ddm":{requires:["dd-ddm-base","event-resize"]},"dd-ddm-base":{requires:["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{requires:["dd-ddm"]},"dd-delegate":{requires:["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{requires:["dd-ddm-base"]},"dd-drop":{requires:["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{requires:["dd-drop"]},"dd-gestures":{condition:{name:"dd-gestures",trigger:"dd-drag",ua:"touchEnabled"},requires:["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{optional:["dd-constrain","dd-proxy"],requires:["dd-drag"]},"dd-proxy":{requires:["dd-drag"]},"dd-scroll":{requires:["dd-drag"]},dial:{lang:["en","es"],requires:["widget","dd-drag","event-mouseenter","event-move","event-key","transition","intl"],skinnable:!0},dom:{use:["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{requires:["dom-core"]},"dom-core":{requires:["oop","features"]},"dom-deprecated":{requires:["dom-base"]},"dom-screen":{requires:["dom-base","dom-style"]},"dom-style":{requires:["dom-base"]},"dom-style-ie":{condition:{name:"dom-style-ie",test:function(e){var t=e.Features.test,n=e.Features.add,r=e.config.win,i=e.config.doc,s="documentElement",o=!1;return n("style","computedStyle",{test:function(){return r&&"getComputedStyle"in r}}),n("style","opacity",{test:function(){return i&&"opacity"in i[s].style}}),o=!t("style","opacity")&&!t("style","computedStyle"),o},trigger:"dom-style"},requires:["dom-style"]},dump:{requires:["yui-base"]},editor:{use:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{requires:["base","frame","node","exec-command","editor-selection"]},"editor-bidi":{requires:["editor-base"]},"editor-br":{requires:["editor-base"]},"editor-lists":{requires:["editor-base"]},"editor-para":{requires:["editor-para-base"]},"editor-para-base":{requires:["editor-base"]},"editor-para-ie":{condition:{name:"editor-para-ie",trigger:"editor-para",ua:"ie",when:"instead"},requires:["editor-para-base"]},"editor-selection":{requires:["node"]},"editor-tab":{requires:["editor-base"]},escape:{requires:["yui-base"]},event:{after:["node-base"],use:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange","event-tap"]},"event-base":{after:["node-base"],requires:["event-custom-base"]},"event-base-ie":{after:["event-base"],condition:{name:"event-base-ie",test:function(e){var t=e.config.doc&&e.config.doc.implementation;return t&&!t.hasFeature("Events","2.0")},trigger:"node-base"},requires:["node-base"]},"event-contextmenu":{requires:["event-synthetic","dom-screen"]},"event-custom":{use:["event-custom-base","event-custom-complex"]},"event-custom-base":{requires:["oop"]},"event-custom-complex":{requires:["event-custom-base"]},"event-delegate":{requires:["node-base"]},"event-flick":{requires:["node-base","event-touch","event-synthetic"]},"event-focus":{requires:["event-synthetic"]},"event-gestures":{use:["event-flick","event-move"]},"event-hover":{requires:["event-mouseenter"]},"event-key":{requires:["event-synthetic"]},"event-mouseenter":{requires:["event-synthetic"]},"event-mousewheel":{requires:["node-base"]},"event-move":{requires:["node-base","event-touch","event-synthetic"]},"event-outside":{requires:["event-synthetic"]},"event-resize":{requires:["node-base","event-synthetic"]},"event-simulate":{requires:["event-base"]},"event-synthetic":{requires:["node-base","event-custom-complex"]},"event-tap":{requires:["node-base","event-base","event-touch","event-synthetic"]},"event-touch":{requires:["node-base"]},"event-valuechange":{requires:["event-focus","event-synthetic"]},"exec-command":{requires:["frame"]},features:{requires:["yui-base"]},file:{requires:["file-flash","file-html5"]},"file-flash":{requires:["base"]},"file-html5":{requires:["base"]},frame:{requires:["base","node","selector-css3","yui-throttle"]},"gesture-simulate":{requires:["async-queue","event-simulate","node-screen"]},get:{requires +:["yui-base"]},graphics:{requires:["node","event-custom","pluginhost","matrix","classnamemanager"]},"graphics-canvas":{condition:{name:"graphics-canvas",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"},requires:["graphics"]},"graphics-canvas-default":{condition:{name:"graphics-canvas-default",test:function(e){var t=e.config.doc,n=e.config.defaultGraphicEngine&&e.config.defaultGraphicEngine=="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return(!i||n)&&r&&r.getContext&&r.getContext("2d")},trigger:"graphics"}},"graphics-group":{requires:["graphics"]},"graphics-svg":{condition:{name:"graphics-svg",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"},requires:["graphics"]},"graphics-svg-default":{condition:{name:"graphics-svg-default",test:function(e){var t=e.config.doc,n=!e.config.defaultGraphicEngine||e.config.defaultGraphicEngine!="canvas",r=t&&t.createElement("canvas"),i=t&&t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");return i&&(n||!r)},trigger:"graphics"}},"graphics-vml":{condition:{name:"graphics-vml",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"},requires:["graphics"]},"graphics-vml-default":{condition:{name:"graphics-vml-default",test:function(e){var t=e.config.doc,n=t&&t.createElement("canvas");return t&&!t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!n||!n.getContext||!n.getContext("2d"))},trigger:"graphics"}},handlebars:{use:["handlebars-compiler"]},"handlebars-base":{requires:[]},"handlebars-compiler":{requires:["handlebars-base"]},highlight:{use:["highlight-base","highlight-accentfold"]},"highlight-accentfold":{requires:["highlight-base","text-accentfold"]},"highlight-base":{requires:["array-extras","classnamemanager","escape","text-wordbreak"]},history:{use:["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{requires:["event-custom-complex"]},"history-hash":{after:["history-html5"],requires:["event-synthetic","history-base","yui-later"]},"history-hash-ie":{condition:{name:"history-hash-ie",test:function(e){var t=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange"in e.config.win)||!t||t<8)},trigger:"history-hash"},requires:["history-hash","node-base"]},"history-html5":{optional:["json"],requires:["event-base","history-base","node-base"]},imageloader:{requires:["base-base","node-style","node-screen"]},intl:{requires:["intl-base","event-custom"]},"intl-base":{requires:["yui-base"]},io:{use:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{requires:["event-custom-base","querystring-stringify-simple"]},"io-form":{requires:["io-base","node-base"]},"io-nodejs":{condition:{name:"io-nodejs",trigger:"io-base",ua:"nodejs"},requires:["io-base"]},"io-queue":{requires:["io-base","queue-promote"]},"io-upload-iframe":{requires:["io-base","node-base"]},"io-xdr":{requires:["io-base","datatype-xml-parse"]},json:{use:["json-parse","json-stringify"]},"json-parse":{requires:["yui-base"]},"json-parse-shim":{condition:{name:"json-parse-shim",test:function(e){function i(e,t){return e==="ok"?!0:t}var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONParse!==!1&&!!n;if(r)try{r=n.parse('{"ok":false}',i).ok}catch(s){r=!1}return!r},trigger:"json-parse"},requires:["json-parse"]},"json-stringify":{requires:["yui-base"]},"json-stringify-shim":{condition:{name:"json-stringify-shim",test:function(e){var t=e.config.global.JSON,n=Object.prototype.toString.call(t)==="[object JSON]"&&t,r=e.config.useNativeJSONStringify!==!1&&!!n;if(r)try{r="0"===n.stringify(0)}catch(i){r=!1}return!r},trigger:"json-stringify"},requires:["json-stringify"]},jsonp:{requires:["get","oop"]},"jsonp-url":{requires:["jsonp"]},"lazy-model-list":{requires:["model-list"]},loader:{use:["loader-base","loader-rollup","loader-yui3"]},"loader-base":{requires:["get","features"]},"loader-rollup":{requires:["loader-base"]},"loader-yui3":{requires:["loader-base"]},matrix:{requires:["yui-base"]},model:{requires:["base-build","escape","json-parse"]},"model-list":{requires:["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"model-sync-rest":{requires:["model","io-base","json-stringify"]},node:{use:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{requires:["event-base","node-core","dom-base"]},"node-core":{requires:["dom-core","selector"]},"node-deprecated":{requires:["node-base"]},"node-event-delegate":{requires:["node-base","event-delegate"]},"node-event-html5":{requires:["node-base"]},"node-event-simulate":{requires:["node-base","event-simulate","gesture-simulate"]},"node-flick":{requires:["classnamemanager","transition","event-flick","plugin"],skinnable:!0},"node-focusmanager":{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{requires:["node-base","io-base"]},"node-menunav":{requires:["node","classnamemanager","plugin","node-focusmanager"],skinnable:!0},"node-pluginhost":{requires:["node-base","pluginhost"]},"node-screen":{requires:["dom-screen","node-base"]},"node-scroll-info":{requires:["base-build","dom-screen","event-resize","node-pluginhost","plugin"]},"node-style":{requires:["dom-style" +,"node-base"]},oop:{requires:["yui-base"]},overlay:{requires:["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],skinnable:!0},panel:{requires:["widget","widget-autohide","widget-buttons","widget-modality","widget-position","widget-position-align","widget-position-constrain","widget-stack","widget-stdmod"],skinnable:!0},parallel:{requires:["yui-base"]},pjax:{requires:["pjax-base","pjax-content"]},"pjax-base":{requires:["classnamemanager","node-event-delegate","router"]},"pjax-content":{requires:["io-base","node-base","router"]},"pjax-plugin":{requires:["node-pluginhost","pjax","plugin"]},plugin:{requires:["base-base"]},pluginhost:{use:["pluginhost-base","pluginhost-config"]},"pluginhost-base":{requires:["yui-base"]},"pluginhost-config":{requires:["pluginhost-base"]},profiler:{requires:["yui-base"]},promise:{requires:["timers"]},querystring:{use:["querystring-parse","querystring-stringify"]},"querystring-parse":{requires:["yui-base","array-extras"]},"querystring-parse-simple":{requires:["yui-base"]},"querystring-stringify":{requires:["yui-base"]},"querystring-stringify-simple":{requires:["yui-base"]},"queue-promote":{requires:["yui-base"]},"range-slider":{requires:["slider-base","slider-value-range","clickable-rail"]},recordset:{use:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{requires:["base","arraylist"]},"recordset-filter":{requires:["recordset-base","array-extras","plugin"]},"recordset-indexer":{requires:["recordset-base","plugin"]},"recordset-sort":{requires:["arraysort","recordset-base","plugin"]},resize:{use:["resize-base","resize-proxy","resize-constrain"]},"resize-base":{requires:["base","widget","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:!0},"resize-constrain":{requires:["plugin","resize-base"]},"resize-plugin":{optional:["resize-constrain"],requires:["resize-base","plugin"]},"resize-proxy":{requires:["plugin","resize-base"]},router:{optional:["querystring-parse"],requires:["array-extras","base-build","history"]},scrollview:{requires:["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{requires:["widget","event-gestures","event-mousewheel","transition"],skinnable:!0},"scrollview-base-ie":{condition:{name:"scrollview-base-ie",trigger:"scrollview-base",ua:"ie"},requires:["scrollview-base"]},"scrollview-list":{requires:["plugin","classnamemanager"],skinnable:!0},"scrollview-paginator":{requires:["plugin","classnamemanager"]},"scrollview-scrollbars":{requires:["classnamemanager","transition","plugin"],skinnable:!0},selector:{requires:["selector-native"]},"selector-css2":{condition:{name:"selector-css2",test:function(e){var t=e.config.doc,n=t&&!("querySelectorAll"in t);return n},trigger:"selector"},requires:["selector-native"]},"selector-css3":{requires:["selector-native","selector-css2"]},"selector-native":{requires:["dom-base"]},"series-area":{requires:["series-cartesian","series-fill-util"]},"series-area-stacked":{requires:["series-stacked","series-area"]},"series-areaspline":{requires:["series-area","series-curve-util"]},"series-areaspline-stacked":{requires:["series-stacked","series-areaspline"]},"series-bar":{requires:["series-marker","series-histogram-base"]},"series-bar-stacked":{requires:["series-stacked","series-bar"]},"series-base":{requires:["graphics","axis-base"]},"series-candlestick":{requires:["series-range"]},"series-cartesian":{requires:["series-base"]},"series-column":{requires:["series-marker","series-histogram-base"]},"series-column-stacked":{requires:["series-stacked","series-column"]},"series-combo":{requires:["series-cartesian","series-line-util","series-plot-util","series-fill-util"]},"series-combo-stacked":{requires:["series-stacked","series-combo"]},"series-combospline":{requires:["series-combo","series-curve-util"]},"series-combospline-stacked":{requires:["series-combo-stacked","series-curve-util"]},"series-curve-util":{},"series-fill-util":{},"series-histogram-base":{requires:["series-cartesian","series-plot-util"]},"series-line":{requires:["series-cartesian","series-line-util"]},"series-line-stacked":{requires:["series-stacked","series-line"]},"series-line-util":{},"series-marker":{requires:["series-cartesian","series-plot-util"]},"series-marker-stacked":{requires:["series-stacked","series-marker"]},"series-ohlc":{requires:["series-range"]},"series-pie":{requires:["series-base","series-plot-util"]},"series-plot-util":{},"series-range":{requires:["series-cartesian"]},"series-spline":{requires:["series-line","series-curve-util"]},"series-spline-stacked":{requires:["series-stacked","series-spline"]},"series-stacked":{requires:["axis-stacked"]},"shim-plugin":{requires:["node-style","node-pluginhost"]},slider:{use:["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{requires:["widget","dd-constrain","event-key"],skinnable:!0},"slider-value-range":{requires:["slider-base"]},sortable:{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]},"sortable-scroll":{requires:["dd-scroll","sortable"]},stylesheet:{requires:["yui-base"]},substitute:{optional:["dump"],requires:["yui-base"]},swf:{requires:["event-custom","node","swfdetect","escape"]},swfdetect:{requires:["yui-base"]},tabview:{requires:["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],skinnable:!0},"tabview-base":{requires:["node-event-delegate","classnamemanager"]},"tabview-plugin":{requires:["tabview-base"]},template:{use:["template-base","template-micro"]},"template-base":{requires:["yui-base"]},"template-micro":{requires:["escape"]},test:{requires:["event-simulate","event-custom","json-stringify"]},"test-console":{requires:["console-filters","test","array-extras"],skinnable:!0},text:{use:["text-accentfold","text-wordbreak"]},"text-accentfold":{requires:["array-extras","text-data-accentfold"]},"text-data-accentfold":{requires:["yui-base"]},"text-data-wordbreak":{requires:["yui-base" +]},"text-wordbreak":{requires:["array-extras","text-data-wordbreak"]},timers:{requires:["yui-base"]},transition:{requires:["node-style"]},"transition-timer":{condition:{name:"transition-timer",test:function(e){var t=e.config.doc,n=t?t.documentElement:null,r=!0;return n&&n.style&&(r=!("MozTransition"in n.style||"WebkitTransition"in n.style||"transition"in n.style)),r},trigger:"transition"},requires:["transition"]},tree:{requires:["base-build","tree-node"]},"tree-labelable":{requires:["tree"]},"tree-lazy":{requires:["base-pluginhost","plugin","tree"]},"tree-node":{},"tree-openable":{requires:["tree"]},"tree-selectable":{requires:["tree"]},uploader:{requires:["uploader-html5","uploader-flash"]},"uploader-flash":{requires:["swf","widget","base","cssbutton","node","event-custom","file-flash","uploader-queue"]},"uploader-html5":{requires:["widget","node-event-simulate","file-html5","uploader-queue"]},"uploader-queue":{requires:["base"]},view:{requires:["base-build","node-event-delegate"]},"view-node-map":{requires:["view"]},widget:{use:["widget-base","widget-htmlparser","widget-skin","widget-uievents"]},"widget-anim":{requires:["anim-base","plugin","widget"]},"widget-autohide":{requires:["base-build","event-key","event-outside","widget"]},"widget-base":{requires:["attribute","base-base","base-pluginhost","classnamemanager","event-focus","node-base","node-style"],skinnable:!0},"widget-base-ie":{condition:{name:"widget-base-ie",trigger:"widget-base",ua:"ie"},requires:["widget-base"]},"widget-buttons":{requires:["button-plugin","cssbutton","widget-stdmod"]},"widget-child":{requires:["base-build","widget"]},"widget-htmlparser":{requires:["widget-base"]},"widget-locale":{requires:["widget-base"]},"widget-modality":{requires:["base-build","event-outside","widget"],skinnable:!0},"widget-parent":{requires:["arraylist","base-build","widget"]},"widget-position":{requires:["base-build","node-screen","widget"]},"widget-position-align":{requires:["widget-position"]},"widget-position-constrain":{requires:["widget-position"]},"widget-skin":{requires:["widget-base"]},"widget-stack":{requires:["base-build","widget"],skinnable:!0},"widget-stdmod":{requires:["base-build","widget"]},"widget-uievents":{requires:["node-event-delegate","widget-base"]},yql:{requires:["oop"]},"yql-jsonp":{condition:{name:"yql-jsonp",test:function(e){return!e.UA.nodejs&&!e.UA.winjs},trigger:"yql",when:"after"},requires:["jsonp","jsonp-url"]},"yql-nodejs":{condition:{name:"yql-nodejs",trigger:"yql",ua:"nodejs",when:"after"}},"yql-winjs":{condition:{name:"yql-winjs",trigger:"yql",ua:"winjs",when:"after"}},yui:{},"yui-base":{},"yui-later":{requires:["yui-base"]},"yui-log":{requires:["yui-base"]},"yui-throttle":{requires:["yui-base"]}}),YUI.Env[e.version].md5="660f328e92276f36e9abfafb02169183"},"3.9.1",{requires:["loader-base"]}),YUI.add("yui",function(e,t){},"3.9.1",{use:["yui-base","get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"]}); diff --git a/docs_api/classes/.Bizs.html b/docs_api/classes/.Bizs.html new file mode 100644 index 000000000..72a5f1693 --- /dev/null +++ b/docs_api/classes/.Bizs.html @@ -0,0 +1,191 @@ + + + + + .Bizs - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            .Bizs Class

            +
            +
            + Defined in: ../JC.js:4 +
            +
            +
            +

            业务逻辑命名空间

            +
            这个命名空间的组件主要为满足业务需求, 不是通用组件~ +
            但在某个项目中应该是常用组件~

            +
            +
            业务组件的存放位置:
            +
            libpath/bizs/
            +
            使用业务组件
            +
            JC.use( 'Bizs.BizComps' ); // libpath/bizs/BizComps/BizComps.js
            +
            使用业务文件
            +
            JC.use( 'bizs.BizFile' ); // libpath/bizs/BizFile.js
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.JC.html b/docs_api/classes/.JC.html similarity index 68% rename from docs_api/classes/window.JC.html rename to docs_api/classes/.JC.html index adc524e3f..4f85fe5f2 100644 --- a/docs_api/classes/window.JC.html +++ b/docs_api/classes/.JC.html @@ -2,12 +2,18 @@ - window.JC - jquery components - + .JC - jquery components + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -103,18 +144,21 @@

            APIs

            -

            window.JC Class

            +

            .JC Class

            - Defined in: ../lib.js:859 + Defined in: ../JC.js:26

            JC jquery 组件库 资源调用控制类
            这是一个单例模式, 全局访问使用 JC 或 window.JC

            -

            requires: jQuery

            +

            require: + jQuery + , JC.common +

            JC Project Site -| API docs +| API docs | demo link

            @@ -133,10 +177,6 @@

            Methods

            _usePatch static -
          • - _writeNginxScript - static -
          • _writeNormalScript static @@ -174,6 +214,10 @@

            Properties

            nginxBasePath static
          • +
          • + nginxUrlLen + static +
          • PATH static @@ -207,7 +251,7 @@

            _usePatch

            Defined in - ../lib.js:999 + ../JC.js:176

            @@ -237,38 +281,6 @@

            Parameters:

          • -
            -
            -

            _writeNginxScript

            -
            - (
              -
            • - _paths -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../lib.js:1091 -

            -
            -
            -

            输出 nginx concat 模块的脚本路径格式

            -
            -
            -

            Parameters:

            -
              -
            • - _paths - Array -
              -
              -
            • -
            -

            _writeNormalScript

            @@ -284,7 +296,7 @@

            _writeNormalScript

            Defined in - ../lib.js:1119 + ../JC.js:334

            @@ -315,7 +327,7 @@

            log

            Defined in - ../lib.js:1021 + ../JC.js:198

            @@ -338,13 +350,10 @@

            use

            (
            • - _names -
            • -
            • - _basePath + _items
            • - _enableNginxStyle + _readyCb
            )
            @@ -352,7 +361,7 @@

            use

            Defined in - ../lib.js:892 + ../JC.js:63

            @@ -362,32 +371,20 @@

            use

            Parameters:

            • - _names - String -
              -
                -
              • 模块名 - 或者模块下面的某个js文件(test/test1.js, 路径前面不带"/"将视为test模块下的test1.js) - 或者一个绝对路径的js文件, 路径前面带 "/"
              • -
              -
              -
            • -
            • - _basePath + _items String
                -
              • 指定要导入资源所在的主目录, 这个主要应用于 nginx 路径输出
              • +
              • 模块名
                                         或者模块下面的某个js文件(test/test1.js, 路径前面不带"/"将视为test模块下的test1.js)
                +                         或者一个绝对路径的js文件, 路径前面带 "/"
                +
            • - _enableNginxStyle - Bool + _readyCb + Callback
              -
                -
              • 指定是否需要使用 nginx 路径输出脚本资源
              • -
            @@ -395,34 +392,33 @@

            Parameters:

            Example:

            -
                       JC.use( 'SomeClass' );                              //导入类 SomeClass
            -           JC.use( 'SomeClass, AnotherClass' );                //导入类 SomeClass, AnotherClass
            +                
                       JC.use( 'SomeClass' );                              //导入类 SomeClass
            +           JC.use( 'SomeClass, AnotherClass' );                //导入类 SomeClass, AnotherClass
                        //
                        ///  导入类 SomeClass, SomeClass目录下的file1.js, 
                        ///  AnotherClass, AnotherClass 下的file2.js
                        //
            -           JC.use( 'SomeClass, comps/SomeClass/file1.js, comps/AnotherClass/file2.js' );   
            -           JC.use( 'SomeClass, plugins/swfobject.js., plugins/json2.js' );   
            -           JC.use( '/js/Test/Test1.js' );     //导入文件  /js/Test/Test1.js, 如果起始处为 "/", 将视为文件的绝对路径
            +           JC.use( 'SomeClass, comps/SomeClass/file1.js, comps/AnotherClass/file2.js' );   
            +           JC.use( 'SomeClass, plugins/swfobject.js., plugins/json2.js' );   
            +           JC.use( '/js/Test/Test1.js' );     //导入文件  /js/Test/Test1.js, 如果起始处为 "/", 将视为文件的绝对路径
                        //
            -           /// 导入 URL 资源 // JC.use( 'http://test.com/file1.js', 'https://another.com/file2.js' ); 
            +           /// 导入 URL 资源 // JC.use( 'http://test.com/file1.js', 'https://another.com/file2.js' ); 
                        //
                        /// in libpath/_demo/
                        //
                        JC.use(
                            [
            -                   'Panel'                     //  ../comps/Panel/Panel.js
            -                   , 'Tips'                    //  ../comps/Tips/Tips.js
            -                   , 'Valid'                   //  ../comps/Valid/Valid.js
            -                   , 'Bizs.KillISPCache'       //  ../bizs/KillISPCache/KillISPCache.js
            -                   , 'bizs.TestBizFile'        //  ../bizs/TestBizFile.js
            -                   , 'comps.TestCompFile'      //  ../comps/TestCompFile.js 
            -                   , 'Plugins.rate'            //  ../plugins/rate/rate.js
            -                   , 'plugins.json2'           //  ../plugins/json2.js
            -                   , '/js/fullpathtest.js'     //  /js/fullpathtest.js
            +                   'Panel'                     //  ../comps/Panel/Panel.js
            +                   , 'Tips'                    //  ../comps/Tips/Tips.js
            +                   , 'Valid'                   //  ../comps/Valid/Valid.js
            +                   , 'Bizs.KillISPCache'       //  ../bizs/KillISPCache/KillISPCache.js
            +                   , 'bizs.TestBizFile'        //  ../bizs/TestBizFile.js
            +                   , 'comps.TestCompFile'      //  ../comps/TestCompFile.js 
            +                   , 'Plugins.rate'            //  ../plugins/rate/rate.js
            +                   , 'plugins.json2'           //  ../plugins/json2.js
            +                   , '/js/fullpathtest.js'     //  /js/fullpathtest.js
                            ].join()
            -           );
            -
            + );
            @@ -437,7 +433,7 @@

            _USE_CACHE

            Defined in - ../lib.js:1136 + ../JC.js:351

            @@ -452,7 +448,7 @@

            debug

            Defined in - ../lib.js:885 + ../JC.js:56

            @@ -466,7 +462,7 @@

            enableNginxStyle

            Defined in - ../lib.js:1036 + ../JC.js:214

            @@ -481,12 +477,12 @@

            FILE_MAP

            Defined in - ../lib.js:1053 + ../JC.js:239

            资源路径映射对象 -
            设置 JC.use 逗号(',') 分隔项的 对应URL路径

            +
            设置 JC.use 逗号(',') 分隔项的 对应URL路径

            Default: null

            @@ -495,20 +491,20 @@

            Example:

                       以下例子假定 libpath = http://git.me.btbtd.org/ignore/JQueryComps_dev/
                        <script>
                            JC.FILE_MAP = {
            -                   'Calendar': 'http://jc.openjavascript.org/comps/Calendar/Calendar.js'
            -                   , 'Form': 'http://jc.openjavascript.org/comps/Form/Form.js'
            -                   , 'LunarCalendar': 'http://jc.openjavascript.org/comps/LunarCalendar/LunarCalendar.js'
            -                   , 'Panel': 'http://jc.openjavascript.org/comps/Panel/Panel.js' 
            -                   , 'Tab': 'http://jc.openjavascript.org/comps/Tab/Tab.js'
            -                   , 'Tips': 'http://jc.openjavascript.org/comps/Tips/Tips.js' 
            -                   , 'Tree': 'http://jc.openjavascript.org/comps/Tree/Tree.js'
            -                   , 'Valid': 'http://jc.openjavascript.org/comps/Valid/Valid.js'
            -                   , 'plugins/jquery.form.js': 'http://jc.openjavascript.org/plugins/jquery.form.js'
            -                   , 'plugins/json2.js': 'http://jc.openjavascript.org/plugins/json2.js'
            +                   'Calendar': 'http://jc.openjavascript.org/comps/Calendar/Calendar.js'
            +                   , 'Form': 'http://jc.openjavascript.org/comps/Form/Form.js'
            +                   , 'LunarCalendar': 'http://jc.openjavascript.org/comps/LunarCalendar/LunarCalendar.js'
            +                   , 'Panel': 'http://jc.openjavascript.org/comps/Panel/Panel.js' 
            +                   , 'Tab': 'http://jc.openjavascript.org/comps/Tab/Tab.js'
            +                   , 'Tips': 'http://jc.openjavascript.org/comps/Tips/Tips.js' 
            +                   , 'Tree': 'http://jc.openjavascript.org/comps/Tree/Tree.js'
            +                   , 'Valid': 'http://jc.openjavascript.org/comps/Valid/Valid.js'
            +                   , 'plugins/jquery.form.js': 'http://jc.openjavascript.org/plugins/jquery.form.js'
            +                   , 'plugins/json2.js': 'http://jc.openjavascript.org/plugins/json2.js'
                            };
            -               JC.use( 'Panel, Tips, Valid, plugins/jquery.form.js' );
            +               JC.use( 'Panel, Tips, Valid, plugins/jquery.form.js' );
                            $(document).ready(function(){
            -                   //JC.Dialog( 'JC.use example', 'test issue' );
            +                   //JC.Dialog( 'JC.use example', 'test issue' );
                            });
                        </script>
                        output should be:
            @@ -516,8 +512,7 @@ 

            Example:

            http://jc.openjavascript.org/comps/Panel/Panel.js http://jc.openjavascript.org/comps/Tips/Tips.js http://jc.openjavascript.org/comps/Valid/Valid.js - http://jc.openjavascript.org/plugins/jquery.form.js -
            + http://jc.openjavascript.org/plugins/jquery.form.js
            @@ -528,7 +523,7 @@

            nginxBasePath

            Defined in - ../lib.js:1044 + ../JC.js:230

            @@ -536,6 +531,21 @@

            nginxBasePath


            注意: 如果这个属性为空, 即使 enableNginxStyle = true, 也是直接输出默认路径

            Default: empty

            +
            +
            +

            nginxUrlLen

            + Int + static +
            +

            + Defined in + ../JC.js:222 +

            +
            +
            +

            定义 nginx 合并文件时, URL 的最大长度

            +
            +

            Default: 200

            PATH

            @@ -544,7 +554,7 @@

            PATH

            Defined in - ../lib.js:875 + ../JC.js:46

            @@ -558,7 +568,7 @@

            pathPostfix

            Defined in - ../lib.js:1028 + ../JC.js:206

            diff --git a/docs_api/classes/JC.AjaxTree.html b/docs_api/classes/JC.AjaxTree.html new file mode 100644 index 000000000..25ac4058c --- /dev/null +++ b/docs_api/classes/JC.AjaxTree.html @@ -0,0 +1,1240 @@ + + + + + JC.AjaxTree - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.AjaxTree Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            AJAX 树菜单类 JC.AjaxTree

            +

            require: + JC.BaseMVC + , JSON2 +

            +

            JC Project Site +| API docs +| demo link

            +

            页面只要引用本文件, 默认会自动初始化 div class="js_compAjaxTree" 的树组件

            +

            可用的 html attribute

            +
            +
            data-defaultOpenRoot = bool, default = true
            +
            如果没有默认选中节点, 是否展开根节点
            +
            data-cajScriptData = script selector
            +
            从脚本模板解释数据
            +
            data-cajData = object name of window
            +
            从window变量获取数据
            +
            data-cajUrl = url
            +
            从 url 加载数据
            +
            data-rootId = node id, default = ''
            +
            指定根节点ID
            +
            data-urlArgName = string, default = 'tree_node'
            +
            书节点的URL参数名
            +
            data-typeIndex = int, default = 0
            +
            数据节点中 节点类型 所在的索引位置
            +
            data-idIndex = int, default = 1
            +
            数据节点中 节点id 所在的索引位置
            +
            data-nameIndex = int, default = 2
            +
            数据节点中 节点name 所在的索引位置
            +
            +
            +
            +

            Constructor

            +
            +

            JC.AjaxTree

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:7 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +

              树要显示的选择器

              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                  <div class="js_compAjaxTree js_tree2" data-cajData="TREE_2" data-urlArgName="node">
            +       <script>
            +           window.TREE_2 = {
            +               root: [ 'folder', "23",'客户发展部']
            +               , data: 
            +                   {
            +                       "24":
            +                       [
            +                           [
            +                               'file',
            +                               "25", 
            +                               "二组一队"
            +                           ], 
            +                           [
            +                               'file',
            +                               "26", 
            +                               "二组二队"
            +                           ], 
            +                           [
            +                               'file',
            +                               "27", 
            +                               "二组三队"
            +                           ]
            +                       ], 
            +                       "23":
            +                       [
            +                           [
            +                               'file',
            +                               "28", 
            +                               "销售二组"
            +                           ], 
            +                           [
            +                               'folder', 
            +                               "24", 
            +                               "售前审核组"
            +                           ]
            +                       ]
            +                   }
            +           };           
            +           $( document ).delegate( 'div.js_tree2', 'renderItem', function( _evt, _item, _data ){
            +               _item.html( JC.f.printf( '<a href="?node={0}" data-id="{0}">{1}</a>', _data[1], _data[2] ) );
            +           });
            +       </script>
            +   </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +

            Events

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            add

            +
            + (
              +
            • + _parentId +
            • +
            • + _data +
            • +
            • + _needFresh +
            • +
            • + _cb +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:315 +

            +
            +
            +

            新增节点方法

            +
            +
            +

            Parameters:

            +
              +
            • + _parentId + String +
              +

              父节点ID

              +
              +
            • +
            • + _data + Object +
              +

              新增的数据对象( 对象会通过ajax请求传递,ajax的url读取dom属性“data-addUrl” )

              +
              +
            • +
            • + _needFresh + Boolean +
              +

              是否刷新父节点

              +
              +
            • +
            • + _cb + Function +
              +

              添加请求完毕后的回调函数,请求结果为第一个参数

              +
              +
            • +
            +
            +
            +
            +

            close

            +
            + (
              +
            • + _nodeId +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:299 +

            +
            +
            +

            关闭某个节点, 或者关闭整个树

            +
            +
            +

            Parameters:

            +
              +
            • + _nodeId + String | Int +
              +

              如果_nodeId='undefined', 将会关闭树的所有节点 +
              _nodeId 不为空, 将关闭树 _nodeId 所在的节点

              +
              +
            • +
            +
            +
            +
            +

            getItem

            +
            + (
              +
            • + _nodeId +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:367 +

            +
            +
            +

            获取树的节点 label

            +
            +
            +

            Parameters:

            +
              +
            • + _nodeId + String | Int +
              +
              +
            • +
            +
            +
            +
            +

            idPrefix

            + () + + String + +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:360 +

            +
            +
            +

            获取树的 ID 前缀 +
            每个树都会有自己的随机ID前缀

            +
            +
            +

            Returns:

            +
            + String: +

            树的ID前缀

            +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of AjaxTreeInstance + + static +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:119 +

            +
            +
            +

            初始化可识别的 AjaxTree 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of AjaxTreeInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            open

            +
            + (
              +
            • + _nodeId +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:264 +

            +
            +
            +

            展开树到某个具体节点, 或者展开树的所有节点

            +
            +
            +

            Parameters:

            +
              +
            • + _nodeId + String | Int +
              +

              如果_nodeId='undefined', 将会展开树的所有节点 +
              _nodeId 不为空, 将展开树到 _nodeId 所在的节点

              +
              +
            • +
            +
            +
            +
            +

            openUI

            +
            + (
              +
            • + _nodeId +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:283 +

            +
            +
            +

            展开树到某个具体节点, 或者展开树的所有节点

            +
            +
            +

            Parameters:

            +
              +
            • + _nodeId + String | Int +
              +

              如果_nodeId='undefined', 将会展开树的所有节点 +
              _nodeId 不为空, 将展开树到 _nodeId 所在的节点

              +
              +
            • +
            +
            +
            +
            +

            refreshNode

            +
            + (
              +
            • + _nodeId +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:350 +

            +
            +
            +

            刷新某个节点

            +
            +
            +

            Parameters:

            +
              +
            • + _nodeId + String +
              +

              节点ID

              +
              +
            • +
            +
            +
            +
            +

            selectedItem

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:378 +

            +
            +
            +

            获取或设置树的高亮节点

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Properties

            +
            +

            dataFilter

            + Function + static +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:144 +

            +
            +
            +

            树的数据过滤函数 +
            如果树的初始数据格式不符合要求, 可通过该属性定义函数进行数据修正

            +
            +

            Default: undefined

            +
            +

            Example:

            +
            +
                   JC.AjaxTree.dataFilter =
            +       function( _data ){
            +           var _r = {};
            +           if( _data ){
            +               if( _data.root.length > 2 ){
            +                   _data.root.shift();
            +                   _r.root = _data.root;
            +                }
            +               _r.data = {};
            +               for( var k in _data.data ){
            +                   _r.data[ k ] = [];
            +                   for( var i = 0, j = _data.data[k].length; i < j; i++ ){
            +                       if( _data.data[k][i].length < 3 ) continue;
            +                       _data.data[k][i].shift();
            +                       _r.data[k].push( _data.data[k][i] );
            +                   }
            +               }
            +           }
            +           return _r;
            +       };
            +
            +
            +
            +
            +

            lastHover

            + Selector +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:931 +

            +
            +
            +

            树的最后的 hover 节点 +
            树的 hover 是全局属性, 页面上的所有树只会有一个当前 hover

            +
            +

            Default: null

            +
            +
            +
            +

            Events

            +
            +

            change

            + +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:899 +

            +
            +
            +

            树节点的change事件

            +
            +
            +

            Event Payload:

            +
              +
            • + _evt + Event +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                   $( document ).delegate( 'div.js_compAjaxTree', 'change', function( _evt, _item, _data, _box ){
            +           JC.dir( _item[0], _data, _box[0] );
            +       });
            +
            +
            +
            +
            +

            click

            + +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:890 +

            +
            +
            +

            树节点的点击事件

            +
            +
            +

            Event Payload:

            +
              +
            • + _evt + Event +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                   $( document ).delegate( 'div.js_compAjaxTree', 'click', function( _evt, _item, _data, _box ){
            +           JC.dir( _item[0], _data, _box[0] );
            +       });
            +
            +
            +
            +
            +

            FolderClick

            + +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:921 +

            +
            +
            +

            树文件夹的点击事件

            +
            +
            +

            Event Payload:

            +
              +
            • + _evt + Event +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                   _tree.on('FolderClick', function( _evt ){
            +           var _p = $(this);
            +           alert( 'folder click' );
            +       });
            +
            +
            +
            +
            +

            RenderLabel

            + +
            +

            + Defined in + ../comps/AjaxTree/AjaxTree.js:909 +

            +
            +
            +

            树节点的展现事件

            +
            +
            +

            Event Payload:

            +
              +
            • + _data + Array +
              +
              +
            • +
            • + _item + Selector +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                   _tree.on('RenderLabel', function( _data ){
            +           var _node = $(this);
            +           _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) );
            +       });
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.AjaxUpload.html b/docs_api/classes/JC.AjaxUpload.html index 5f42c4f13..043a3c460 100644 --- a/docs_api/classes/JC.AjaxUpload.html +++ b/docs_api/classes/JC.AjaxUpload.html @@ -3,11 +3,17 @@ JC.AjaxUpload - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            Ajax 文件上传

            -

            +

            require: + JC.BaseMVC + , JC.Panel +

            +

            JC Project Site | API docs | demo link -

            -

            - require: jQuery -

            -

            可用的 html attribute

            +

            +

            可用的 html attribute

            cauStyle = string, default = g1
            @@ -140,10 +182,25 @@

            可用的 html attribute

            上传完成后是否隐藏上传按钮
            +
            cauButtonAfter= bool
            +
            是否把上传按钮放在后面
            cauUrl = url, require
            -
            上传文件的接口地址
            +
            上传文件的接口地址 +
            如果 url 带有参数 callback, 返回数据将以 jsonp 方式处理 +
            +
            cauJSONPName = function name
            +
            显式声明上传后返回数据的 jsonp 回调名 +

            jsonp 返回数据示例:

            +url: ?callback=callback +
            data: +<script> + window.parent && window.parent.callback && window.parent.callback( {"errorno":0,"errmsg":"","data":{"name":"test.jpg","url":".\/data\/images\/test.jpg"}} ); +</script> +
            cauFileExt = file ext, optional
            -
            允许上传的文件扩展名, 例: ".jpg, .jpeg, .png, .gif"
            +
            允许上传的文件扩展名, 例: ".jpg, .jpeg, .png, .gif"
            +
            cauFileSize = [ KB | MB | GB ], default = 1024 MB
            +
            上传文件大小限制
            cauFileName = string, default = file
            上传文件的 name 属性
            cauValueKey = string, default = url
            @@ -159,32 +216,36 @@

            可用的 html attribute

            cauUploadDoneCallback = function, optional
            文件上传完毕时, 触发的回调 -function cauUploadDoneCallback( _json, _selector, _frame ){ +<pre>function cauUploadDoneCallback( _json, _selector, _frame ){ var _ins = this; //alert( _json ); //object object -} +}
            cauUploadErrorCallback = function, optional
            文件上传完毕时, 发生错误触发的回调 -function cauUploadErrorCallback( _json, _selector, _frame ){ +<pre>function cauUploadErrorCallback( _json, _selector, _frame ){ var _ins = this; //alert( _json ); //object object -} +}
            cauDisplayLabelCallback = function, optional, return = string
            自定义上传完毕后显示的内容 模板 -function cauDisplayLabelCallback( _json, _label, _value ){ +<pre>function cauDisplayLabelCallback( _json, _label, _value ){ var _selector = this - , _label = printf( '<a href="{0}" class="green js_auLink" target="_blank">{1}</a>{2}' + , _label = JC.f.printf( &#39;&lt;a href=&quot;{0}&quot; class=&quot;green js_auLink&quot; target=&quot;_blank&quot;&gt;{1}&lt;/a&gt;{2}&#39; , _value, _label - , '&nbsp;<a href="javascript:" class="btn btn-cls2 js_cleanCauData"></a>&nbsp;&nbsp;' + , &#39;&nbsp;&lt;a href=&quot;javascript:&quot; class=&quot;btn btn-cls2 js_cleanCauData&quot;&gt;&lt;/a&gt;&nbsp;&nbsp;&#39; ) ; return _label; -} +}
            +
            cauViewFileBox = selector
            +
            用于显示文件链接的容器
            +
            cauViewFileBoxItemTpl = selector
            +
            cauViewFileBox 的脚本模板
            @@ -221,35 +282,34 @@

            Parameters:

            Example:

                   <div>
            -           <input type="hidden" class="js_compAjaxUpload" value=""
            -               cauStyle="w1"
            -               cauButtonText="上传资质文件"
            -               cauUrl="/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/handler.php"
            -               cauFileExt=".jpg, .jpeg, .png, .gif"
            -               cauFileName="file"
            -               cauLabelKey="name"
            -               cauValueKey="url"
            -               cauStatusLabel="/label.js_statusLabel"
            -               cauDisplayLabel="/label.js_fileLabel"
            +           <input type="hidden" class="js_compAjaxUpload" value=""
            +               cauStyle="w1"
            +               cauButtonText="上传资质文件"
            +               cauUrl="/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/handler.php"
            +               cauFileExt=".jpg, .jpeg, .png, .gif"
            +               cauFileName="file"
            +               cauLabelKey="name"
            +               cauValueKey="url"
            +               cauStatusLabel="/label.js_statusLabel"
            +               cauDisplayLabel="/label.js_fileLabel"
                            />
            -           <label class="js_fileLabel" style="display:none"></label>
            -           <label class="js_statusLabel" style="display:none">文件上传中, 请稍候...</label>
            +           <label class="js_fileLabel" style="display:none"></label>
            +           <label class="js_statusLabel" style="display:none">文件上传中, 请稍候...</label>
                    </div>
                    POST 数据:
                        ------WebKitFormBoundaryb1Xd1FMBhVgBoEKD
            -           Content-Disposition: form-data; name="file"; filename="disk.jpg"
            +           Content-Disposition: form-data; name="file"; filename="disk.jpg"
                        Content-Type: image/jpeg
                    返回数据:
                        {
            -               "errorno": 0, 
            -               "data":
            +               "errorno": 0, 
            +               "data":
                            {
            -                   "url": "/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg", 
            -                   "name": "test.jpg"
            +                   "url": "/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg", 
            +                   "name": "test.jpg"
                            }, 
            -               "errmsg": ""
            -           }
            -
            + "errmsg": "" + }
            @@ -278,6 +338,12 @@

            Methods

          • _initHanlderEvent
          • +
          • + disable +
          • +
          • + enable +
          • getInstance static @@ -286,6 +352,12 @@

            Methods

            init static
          • +
          • + notification +
          • +
          • + notificationHandler +
          • on
          • @@ -295,6 +367,9 @@

            Methods

          • trigger
          • +
          • + triggerHandler +
          • update
          • @@ -331,7 +406,7 @@

            _beforeInit

            @@ -351,7 +426,7 @@

            _init

            @@ -376,7 +451,7 @@

            _inited

            @@ -390,12 +465,38 @@

            _initHanlderEvent

            内部事件初始化方法

            +
            +
            +

            disable

            + () + +
            +

            禁用上传按钮

            +
            +
            +
            +

            enable

            + () + +
            +

            启用上传按钮

            +

            getInstance

            @@ -413,7 +514,7 @@

            getInstance

            @@ -453,7 +554,7 @@

            init

            @@ -474,7 +575,96 @@

            Parameters:

            Returns:

            Array: - instance array +

            instance array

            +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + :
            @@ -496,7 +686,7 @@

            on

            @@ -522,7 +712,7 @@

            Parameters:

            Returns:

            - BaseMVCInstance +

            BaseMVCInstance

            @@ -535,7 +725,7 @@

            selector

            @@ -544,7 +734,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -555,6 +745,9 @@

            trigger

          • _evtName
          • +
          • + _args +
          • )
            @@ -563,11 +756,59 @@

            trigger

            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            -

            使用 jquery trigger 绑定事件

            +

            使用 jquery triggerHandler 触发绑定事件

            Parameters:

            @@ -578,12 +819,18 @@

            Parameters:

            +
          • + _args + | Array +
            +
            +
          • Returns:

            - BaseMVCInstance + :
            @@ -602,7 +849,7 @@

            update

            @@ -622,22 +869,21 @@

            Parameters:

            Returns:

            - AjaxUploadInstance +

            AjaxUploadInstance

            Example:

                       JC.AjaxUpload.getInstance( _selector ).update( {
            -               "errorno": 0, 
            -               "data":
            +               "errorno": 0, 
            +               "data":
                            {
            -                   "url": "/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg", 
            -                   "name": "test.jpg"
            +                   "url": "/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg", 
            +                   "name": "test.jpg"
                            }, 
            -               "errmsg": ""
            -           });
            -
            + "errmsg": "" + });
            @@ -652,7 +898,7 @@

            _FRAME_DIR

            @@ -668,7 +914,7 @@

            _INS_COUNT

            @@ -683,7 +929,7 @@

            frameFileName

            @@ -698,7 +944,7 @@

            randomFrame

            diff --git a/docs_api/classes/JC.AutoChecked.html b/docs_api/classes/JC.AutoChecked.html index c6fb9c88d..7f121de91 100644 --- a/docs_api/classes/JC.AutoChecked.html +++ b/docs_api/classes/JC.AutoChecked.html @@ -3,11 +3,17 @@ JC.AutoChecked - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            全选/反选

            -

            JC Project Site +

            require: + JC.common +

            +

            JC Project Site | API docs -| demo link

            -

            require: jQuery

            -

            input[type=checkbox] 可用的 HTML 属性

            +| demo link

            +

            input[type=checkbox] 可用的 HTML 属性

            checktype = string
            @@ -164,54 +207,53 @@

            Parameters:

            Example:

                   <h2>AJAX data:</h2>
            -       <dl class="def example24">
            +       <dl class="def example24">
                        <dt>checkall example 24</dt>
                        <dd>
                            <label>
            -                   <input type="checkbox" checktype="all" checkfor="dl.example24 input[type=checkbox]">
            +                   <input type="checkbox" checktype="all" checkfor="dl.example24 input[type=checkbox]">
                                全选
                            </label>
                            <label>
            -                   <input type="checkbox" checktype="inverse" checkfor="dl.example24 input[type=checkbox]" checkall="dl.example24 input[checktype=all]">
            +                   <input type="checkbox" checktype="inverse" checkfor="dl.example24 input[type=checkbox]" checkall="dl.example24 input[checktype=all]">
                                反选
                            </label>
                        </dd>
                        <dd>
                            <label>
            -                   <input type='checkbox' value='' name='' checked />
            +                   <input type='checkbox' value='' name='' checked />
                                checkall24_1
                            </label>
                            <label>
            -                   <input type='checkbox' value='' name='' checked />
            +                   <input type='checkbox' value='' name='' checked />
                                checkall24_2
                            </label>
                            <label>
            -                   <input type='checkbox' value='' name='' checked />
            +                   <input type='checkbox' value='' name='' checked />
                                checkall24_3
                            </label>
                            <label>
            -                   <input type='checkbox' value='' name='' checked />
            +                   <input type='checkbox' value='' name='' checked />
                                checkall24_4
                            </label>
                            <label>
            -                   <input type='checkbox' value='' name='' checked />
            +                   <input type='checkbox' value='' name='' checked />
                                checkall24_5
                            </label>
                        </dd>
                    </dl>
                    <script>
            -       $(document).delegate( 'button.js_ajaxTest', 'click', function(){
            +       $(document).delegate( 'button.js_ajaxTest', 'click', function(){
                        var _p = $(this);
            -           _p.prop('disabled', true);
            -           setTimeout( function(){ _p.prop('disabled', false); }, 1000 );
            -           $.get( './data/initCheckAll.php?rnd='+new Date().getTime(), function( _r ){
            +           _p.prop('disabled', true);
            +           setTimeout( function(){ _p.prop('disabled', false); }, 1000 );
            +           $.get( './data/initCheckAll.php?rnd='+new Date().getTime(), function( _r ){
                            var _selector = $(_r);
            -               $( $( 'body' ).children().first() ).before( _selector );
            +               $( $( 'body' ).children().first() ).before( _selector );
                            JC.AutoChecked( _selector );
                        });
                    });
            -       </script>
            -
            + </script>
            @@ -272,7 +314,7 @@

            getInstance

            @@ -309,7 +351,7 @@

            init

            @@ -343,7 +385,7 @@

            isAutoChecked

            @@ -363,7 +405,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -385,7 +427,7 @@

            on

            @@ -411,7 +453,7 @@

            Parameters:

            Returns:

            - AutoCheckedInstance +

            AutoCheckedInstance

            @@ -424,7 +466,7 @@

            selector

            @@ -433,7 +475,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -452,7 +494,7 @@

            trigger

            @@ -472,7 +514,7 @@

            Parameters:

            Returns:

            - AutoCheckedInstance +

            AutoCheckedInstance

            @@ -482,7 +524,7 @@

            update

            diff --git a/docs_api/classes/JC.AutoComplete.html b/docs_api/classes/JC.AutoComplete.html new file mode 100644 index 000000000..5a11d926b --- /dev/null +++ b/docs_api/classes/JC.AutoComplete.html @@ -0,0 +1,871 @@ + + + + + JC.AutoComplete - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.AutoComplete Class

            + +
            +

            AutoComplete 文本框内容输入提示 +
            响应式初始化, 当光标焦点 foucs 到 文本框时, 会检查是否需要自动初始化 AutoComplete 实例

            +

            require: + jQuery + , JC.BaseMVC +

            +

            JC Project Site +| API docs +| demo link

            +

            可用的 HTML attribute

            +
            +
            cacPopup = selector, optional
            +
            显式指定用于显示数据列表的弹框, 如不指定, 载入数据时会自己生成 popup node
            +
            cacPreventEnter = bool, default = false
            +
            文本框按回车键时, 是否阻止默认行为, 防止提交表单
            +
            cacLabelKey = string, default = data-label
            +
            用于显示 label 的HTML属性
            +
            cacIdKey = string, default= data-id
            +
            用于显示 ID 的HTML属性
            +
            cacIdSelector = selector
            +
            用于保存 ID 值的 node
            +
            cacIdVal = string, optional
            +
            用于初始化的默认ID, 如果 cacIdVal 为空将尝试读取 cacIdSelector 的值
            +
            cacStrictData = bool, default = false
            +
            是否验证已填内容的合法性
            仅在 cacIdSelector 和 cacIdKey 显式声明时有效
            +
            cacAjaxDataUrl = url
            +
            + 获取 数据的 AJAX 接口 +
            +
            数据格式
            +
            + [ { "id": "id value", "label": "label value" }, ... ] +
            +
            +
            +
            cacDataFilter = callback
            +
            +
            +
            如果 数据接口获取的数据不是默认格式, + 可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式 +
            +
            +
            function cacDataFilter( _json ){
            +if( _json.data && _json.data.length ){
            +   _json = _json.data;
            +}
            +$.each( _json, function( _ix, _item ){
            +   _item.length &&
            +       ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } )
            +       ;
            +});
            +return _json;
            +}
            +
            +
            +
            +
            cacBoxWidth = int
            +
            定义 popup 的宽度, 如果没有显式定义, 将使用 selector 的宽度
            +
            cacCasesensitive = bool, default = false
            +
            是否区分英文大小写
            +
            cacSubItemsSelector = selector string, default = "> li" +
            popup 查找数据项的选择器语法
            +
            cacNoDataText = string, default = "数据加载中, 请稍候..."
            +
            加载数据时的默认提示文字
            +
            cacValidCheckTimeout = int, default = 1
            +
            定义 JC.Valid blur 时执行 check 的时间间隔, 主要为防止点击列表时已经 Valid.check 的问题
            +
            cacFixHtmlEntity = bool
            +
            是否将 HTML实体 转为 html
            +
            cacMultiSelect = bool, default = false
            +
            是否为多选模式
            +
            cacListItemTpl= selector
            +
            指定项内容的模板
            +
            cacListAll = bool
            +
            popup是否显示所有内容
            +
            cacDisableSelectedBlur = bool
            +
            在文本框里按方向键选择项内容并按回车键时, 是否禁止触发 blur事件
            +
            cacNoCache = bool, default = false
            +
            AJAX 获取数据式,是否缓存 AJAX 数据
            +
            +
            +
            +

            Constructor

            +
            +

            JC.AutoComplete

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <div class="ui-sug-mod">
            +       <input name="ac" type="text" class="ui-sug-ipt js_compAutoComplete" value="" 
            +           autocomplete="off" 
            +           cacPopup="/ul.js_compAutoCompleteBox"
            +           cacLabelKey="data-label"
            +           cacIdKey="data-id"
            +           cacPreventEnter="true" 
            +           />
            +       <div style="height:200px"></div>
            +       <ul class="AC_box js_compAutoCompleteBox" style="display:none;">
            +           <li data-id="9" data-label="yy语音">yy语音</li>
            +           <li data-id="10" data-label="yy直播">yy直播</li>
            +           <li data-id="11" data-label="yy频道设计">yy频道设计</li>
            +           <li data-id="12" data-label="yy网页版">yy网页版</li>
            +           <li data-id="13" data-label="youku">youku</li>
            +           <li data-id="14" data-label="yeah">yeah</li>
            +           <li data-id="15" data-label="yahoo">yahoo</li>
            +           <li data-id="09" data-label="YY语音">YY语音</li>
            +           <li data-id="010" data-label="YY直播">YY直播</li>
            +           <li data-id="011" data-label="YY频道设计">YY频道设计</li>
            +           <li data-id="012" data-label="YY网页版">YY网页版</li>
            +           <li data-id="013" data-label="YOUKU">YOUKU</Li>
            +           <li data-id="014" data-label="YEAH">YEAH</LI>
            +       </ul>
            +   </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            ajaxUpdate

            +
            + (
              +
            • + _url +
            • +
            • + _cb +
            • +
            ) +
            + +
            +

            使用 ajax 接口更新原始数据

            +
            +
            +

            Parameters:

            +
              +
            • + _url + String +
              +
              +
            • +
            • + _cb + Callback +
              +
              +
            • +
            +
            +
            +
            +

            ajaxUpdate

            +
            + (
              +
            • + _selector +
            • +
            • + _url +
            • +
            • + _cb +
            • +
            ) +
            + + AutoCompleteInstance + + static + +
            +

            使用 ajax 接口更新原始数据

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            • + _url + Url string +
              +
              +
            • +
            • + _cb + Callback +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + AutoCompleteInstance: +
            +
            +
            +
            +

            clear

            + () + +
            +

            清除 selector 和 idSelector 的默认值

            +
            +
            +
            +

            clearAll

            + () + +
            +

            清除所有数据

            +
            +
            +
            +

            dataFilter

            +
            + (
              +
            • + _json +
            • +
            ) +
            + + Json + + static + +
            +

            定义全局数据过滤函数

            +
            +
            +

            Parameters:

            +
              +
            • + _json + Json +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Json: +
            +
            +
            +
            +

            fixPosition

            + () + +
            +

            校正数据列表的显示位置

            +
            +
            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + AutoCompleteInstance + + static + +
            +

            获取或设置 AutoComplete 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + AutoCompleteInstance: +
            +
            +
            +
            +

            hide

            + () + +
            +

            隐藏数据列表

            +
            +
            +
            +

            idSelector

            + () + + Selector + + +
            +

            获取 绑定的 id node

            +
            +
            +

            Returns:

            +
            + Selector: +
            +
            +
            +
            +

            idVal

            +
            + (
              +
            • + _id +
            • +
            ) +
            + + Id string + + +
            +

            获取/设置 id 值

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            + Id string: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of AutoCompleteInstance + + static + +
            +

            初始化可识别的 AutoComplete 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of AutoCompleteInstance: +
            +
            +
            +
            +

            popup

            + () + + Selector + + +
            +

            获取数据列表 node

            +
            +
            +

            Returns:

            +
            + Selector: +
            +
            +
            +
            +

            show

            + () + +
            +

            显示数据列表

            +
            +
            +
            +

            update

            +
            + (
              +
            • + _json +
            • +
            ) +
            + +
            +

            更新原始数据

            +
            +
            +

            Parameters:

            +
              +
            • + _json + Json +
              +
              +
            • +
            +
            +
            +
            +

            update

            +
            + (
              +
            • + _selector +
            • +
            • + _data +
            • +
            ) +
            + + AutoCompleteInstance + + static + +
            +

            更新原始数据

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            • + _data + Json +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + AutoCompleteInstance: +
            +
            +
            +
            +
            +

            Properties

            +
            +

            AJAX_NO_CACHE

            + Bool + static + +
            +

            AJAX 获取数据式,是否缓存 AJAX 数据

            +
            +

            Default: false

            +
            +
            +

            fixHtmlEntity

            + Bool + static + +
            +

            是否将 HTML实体 转为 html

            +
            +

            Default: true

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.AutoFixed.html b/docs_api/classes/JC.AutoFixed.html new file mode 100644 index 000000000..90c1dbc20 --- /dev/null +++ b/docs_api/classes/JC.AutoFixed.html @@ -0,0 +1,691 @@ + + + + + JC.AutoFixed - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.AutoFixed Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            自动 Fixed ( JC.AutoFixed )

            +

            require: + JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 div class="js_compAutoFixed"

            +

            可用的 HTML attribute

            +
            +
            data-normalClass = css class name
            +
            正常状态下附加的 css
            +
            data-fixedClass = css class name
            +
            fixed 状态下附加的 css
            +
            data-cloneItemClass = css class name
            +
            fixed源 克隆对象附加的 css( 仅对 position = static 的克隆源生效 )
            +
            data-fixedTopPx = number, default = 0
            +
            + 滚动到多少像素式开始执行 fixed +
            +
            data-fixAnchor = bool
            +
            + 是否修正 html 锚点定位问题( 该问题通常出现在 position fixed top = 0 ) +
            +
            data-highlightTrigger = selector
            +
            滚动时响应滚动条所在锚点的内容高亮显示
            +
            data-highlightAnchorLayout = selector, default = data-highlightTrigger
            +
            指定计算位置为锚点的某个父容器 y + height
            +
            data-highlightClass = css class name, default = cur
            +
            当前高亮的css class
            +
            +
            +
            +

            Constructor

            +
            +

            JC.AutoFixed

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/AutoFixed/AutoFixed.js:3 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <h2>JC.AutoFixed 示例</h2>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of AutoFixedInstance + + static +
            +

            + Defined in + ../comps/AutoFixed/AutoFixed.js:77 +

            +
            +
            +

            初始化可识别的 AutoFixed 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of AutoFixedInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Properties

            +
            +

            INIT_DELAY

            + Int + static + +
            +

            初始化时是否添加延时

            +
            +

            Default: 0

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.AutoSelect.html b/docs_api/classes/JC.AutoSelect.html index 2f7269184..c01fd6e15 100644 --- a/docs_api/classes/JC.AutoSelect.html +++ b/docs_api/classes/JC.AutoSelect.html @@ -3,11 +3,17 @@ JC.AutoSelect - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            -

            select 级联下拉框无限联动

            -


            只要引用本脚本, 页面加载完毕时就会自动初始化级联下拉框功能 +

            select 级联下拉框无限联动

            +
            只要引用本脚本, 页面加载完毕时就会自动初始化级联下拉框功能

            动态添加的 DOM 需要显式调用 JC.AutoSelect( domSelector ) 进行初始化

            要使页面上的级联下拉框功能能够自动初始化, 需要在select标签上加入一些HTML 属性

            +

            require: + JC.common +

            JC Project Site | API docs | demo link

            -

            requires: jQuery

            select 标签可用的 HTML 属性

            defaultselect, 这个属性不需要赋值
            @@ -145,14 +188,40 @@

            select 标签可用的 HTML 属性

            如果接口的数据不符合 select 的要求, 可通过这个属性定义数据过滤函数
            selectbeforeinited = 初始化之前的回调
            selectinited = 初始化后的回调
            -
            function selectinited( _items ){ +<dd><pre>function selectinited( _items ){ var _ins = this; -} +}
            selectallchanged = 所有select请求完数据之后的回调, window 变量域
            -
            function selectallchanged( _items ){ + <dd><pre>function selectallchanged( _items ){ var _ins = this; -} +} +
            +
            selectCacheData = bool, default = true
            +
            是否缓存ajax数据
            +
            selectItemDataFilter = function
            +
            每个select 显示option前,可自定义数据过滤函数 +
            function selectItemDataFilter2( _selector, _data, _pid){
            +   //alert( '_pid:' + _pid + '\n' + JSON.stringify( _data ) );
            +   var _r, i, j;
            +   if( _pid === '' ){//过滤北京id = 28
            +       _r = [];
            +       for( i = 0, j = _data.length; i < j; i++ ){
            +           if( _data[i][0] == 28 ) continue;
            +           _r.push( _data[i] );
            +       }
            +       _data = _r;
            +   }
            +   else if( _pid == 14 ){//过滤江门id=2254
            +       _r = [];
            +       for( i = 0, j = _data.length; i < j; i++ ){
            +           if( _data[i][0] == 2254 ) continue;
            +           _r.push( _data[i] );
            +       }
            +       _data = _r;
            +   }
            +   return _data;
            +}

            option 标签可用的 HTML 属性

            @@ -310,7 +379,7 @@

            data

            @@ -330,7 +399,7 @@

            Parameters:

            Returns:

            - JSON +

            JSON

            @@ -343,7 +412,7 @@

            first

            @@ -352,7 +421,7 @@

            first

            Returns:

            - selector +

            selector

            @@ -375,7 +444,7 @@

            getInstance

            @@ -401,7 +470,7 @@

            Parameters:

            Returns:

            - AutoSelectControlerInstance +

            AutoSelectControlerInstance

            @@ -420,7 +489,7 @@

            isFirst

            @@ -440,7 +509,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -459,7 +528,7 @@

            isInited

            @@ -479,7 +548,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -498,7 +567,7 @@

            isLast

            @@ -518,7 +587,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -538,7 +607,7 @@

            isSelect

            @@ -558,7 +627,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -571,7 +640,7 @@

            items

            @@ -580,7 +649,7 @@

            items

            Returns:

            - selector +

            selector

            @@ -593,7 +662,7 @@

            last

            @@ -602,7 +671,7 @@

            last

            Returns:

            - selector +

            selector

            @@ -624,7 +693,7 @@

            on

            @@ -650,7 +719,7 @@

            Parameters:

            Returns:

            - AutoSelectInstance +

            AutoSelectInstance

            @@ -670,7 +739,7 @@

            removeItems

            @@ -691,7 +760,7 @@

            Parameters:

            Returns:

            Int: - deleted items number +

            deleted items number

            @@ -710,7 +779,7 @@

            trigger

            @@ -730,7 +799,7 @@

            Parameters:

            Returns:

            - AutoSelectInstance +

            AutoSelectInstance

            @@ -749,7 +818,7 @@

            update

            @@ -762,7 +831,7 @@

            Parameters:

            _ls Array | String
            -

            ids for selected, (string with "," or array of ids );

            +

            ids for selected, (string with "," or array of ids );

            @@ -770,7 +839,7 @@

            Parameters:

            Returns:

            - AutoSelectInstance +

            AutoSelectInstance

            @@ -784,7 +853,7 @@

            allChanged

            @@ -800,7 +869,7 @@

            beforeInited

            @@ -816,7 +885,7 @@

            change

            @@ -832,7 +901,7 @@

            dataFilter

            @@ -855,8 +924,7 @@

            Example:

            _r = _data.data; } return _r; - }; - + };
            @@ -867,7 +935,7 @@

            hideEmpty

            @@ -878,8 +946,7 @@

            hideEmpty

            Example:

            -
                       AutoSelect.hideEmpty = true;
            -
            +
                       AutoSelect.hideEmpty = true;
            @@ -890,7 +957,7 @@

            ignoreInitRequest

            @@ -906,7 +973,7 @@

            inited

            @@ -922,7 +989,7 @@

            processUrl

            @@ -938,7 +1005,7 @@

            randomurl

            @@ -954,7 +1021,7 @@

            triggerInitChange

            @@ -972,7 +1039,7 @@

            SelectAllChanged

            @@ -985,7 +1052,7 @@

            SelectBeforeInited

            @@ -998,7 +1065,7 @@

            SelectChange

            @@ -1011,7 +1078,7 @@

            SelectInited

            @@ -1024,7 +1091,7 @@

            SelectItemBeforeUpdate

            @@ -1037,7 +1104,7 @@

            SelectItemUpdated

            diff --git a/docs_api/classes/JC.BaseMVC.Model.html b/docs_api/classes/JC.BaseMVC.Model.html index f401678e2..41ad4b200 100644 --- a/docs_api/classes/JC.BaseMVC.Model.html +++ b/docs_api/classes/JC.BaseMVC.Model.html @@ -3,11 +3,17 @@ JC.BaseMVC.Model - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,16 +147,16 @@

            APIs

            JC.BaseMVC.Model Class

            - Defined in: ../lib.js:1396 + Defined in: ../comps/BaseMVC/BaseMVC.js:249
            -

            MVC Model 类( 仅供扩展用 )

            -

            这个类默认已经包含在lib.js里面, 不需要显式引用

            -

            require: jQuery

            +

            MVC Model 类( 仅供扩展用 ) +
            这个类默认已经包含在lib.js里面, 不需要显式引用

            JC Project Site -| API docs -| demo link

            +| API docs +| demo link

            +

            see also: JC.BaseMVC

            Constructor

            @@ -131,7 +172,7 @@

            JC.BaseMVC.Model

            @@ -179,6 +220,24 @@

            Methods

          • is
          • +
          • + jsonProp +
          • +
          • + notification +
          • +
          • + notificationHandler +
          • +
          • + on +
          • +
          • + scriptDataProp +
          • +
          • + scriptTplProp +
          • selector
          • @@ -188,6 +247,15 @@

            Methods

          • stringProp
          • +
          • + trigger +
          • +
          • + trigger +
          • +
          • + windowProp +
          • @@ -220,7 +288,7 @@

            attrProp

            @@ -248,7 +316,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -273,7 +341,7 @@

            boolProp

            @@ -328,7 +396,7 @@

            callbackProp

            @@ -377,7 +445,7 @@

            floatProp

            @@ -404,7 +472,7 @@

            Parameters:

            Returns:

            - float +

            float

            @@ -426,7 +494,7 @@

            intProp

            @@ -453,7 +521,7 @@

            Parameters:

            Returns:

            - int +

            int

            @@ -475,7 +543,7 @@

            is

            @@ -502,7 +570,280 @@

            Parameters:

            Returns:

            - bool +

            bool

            +
            +
            +
            +
            +

            jsonProp

            +
            + (
              +
            • + _selector +
            • +
            • + _key +
            • +
            ) +
            + + Json | null + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:568 +

            +
            +
            +

            获取 selector 属性的 json 数据

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +

              如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()

              +
              +
            • +
            • + _key + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Json | null: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:317 +

            +
            +
            +

            通知选择器有新事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:329 +

            +
            +
            +

            通知选择器有新事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:278 +

            +
            +
            +

            使用 jquery on 为 controler 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            scriptDataProp

            +
            + (
              +
            • + _selector +
            • +
            • + _key +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:546 +

            +
            +
            +

            获取 脚本数据 jquery 选择器

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +

              如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()

              +
              +
            • +
            • + _key + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            object

            +
            +
            +
            +
            +

            scriptTplProp

            +
            + (
              +
            • + _selector +
            • +
            • + _key +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:521 +

            +
            +
            +

            获取 脚本模板 jquery 选择器

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +

              如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()

              +
              +
            • +
            • + _key + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            string

            @@ -521,7 +862,7 @@

            selector

            @@ -541,7 +882,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -563,7 +904,7 @@

            selectorProp

            @@ -590,7 +931,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -612,7 +953,7 @@

            stringProp

            @@ -639,7 +980,143 @@

            Parameters:

            Returns:

            - string +

            string

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:303 +

            +
            +
            +

            使用 jquery trigger 触发 controler 绑定事件( 有换回数据 )

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:289 +

            +
            +
            +

            使用 jquery trigger 触发 controler 绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            windowProp

            +
            + (
              +
            • + _selector +
            • +
            • + _key +
            • +
            ) +
            + + Window variable + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:487 +

            +
            +
            +

            获取与属性名匹配的 window 变量

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +

              如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()

              +
              +
            • +
            • + _key + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Window variable:
            @@ -654,7 +1131,7 @@

            _instanceName

            diff --git a/docs_api/classes/JC.BaseMVC.html b/docs_api/classes/JC.BaseMVC.html index 46b15a87f..05dc03f88 100644 --- a/docs_api/classes/JC.BaseMVC.html +++ b/docs_api/classes/JC.BaseMVC.html @@ -3,11 +3,17 @@ JC.BaseMVC - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,13 +147,14 @@

            APIs

            JC.BaseMVC Class

            - Defined in: ../lib.js:1190 + Defined in: ../comps/BaseMVC/BaseMVC.js:3
            -

            MVC 抽象类 ( 仅供扩展用 )

            -

            这个类默认已经包含在lib.js里面, 不需要显式引用

            -

            require: jQuery

            +

            MVC 抽象类 ( 仅供扩展用, 这个类不能实例化)

            +

            require: + JC.common +

            JC Project Site | API docs | demo link

            @@ -131,7 +173,7 @@

            JC.BaseMVC

            @@ -193,6 +235,12 @@

            Methods

            getInstance static +
          • + notification +
          • +
          • + notificationHandler +
          • on
          • @@ -202,6 +250,9 @@

            Methods

          • trigger
          • +
          • + triggerHandler +
          • @@ -223,7 +274,7 @@

            _beforeInit

            @@ -243,7 +294,7 @@

            _init

            @@ -268,7 +319,7 @@

            _inited

            @@ -282,7 +333,7 @@

            _initHanlderEvent

            @@ -302,7 +353,7 @@

            build

            @@ -330,16 +381,13 @@

            buildClass

          • _outClass
          • -
          • - _namespace -
          • )
            static
            @@ -360,13 +408,6 @@

            Parameters:

            -
          • - _namespace - String -
            -

            default='JC', 如果是业务组件, 请显式指明为 'Bizs'

            -
            -
          • @@ -383,7 +424,7 @@

            buildModel

            @@ -414,7 +455,7 @@

            buildView

            @@ -439,20 +480,26 @@

            getInstance

          • _selector
          • +
          • + _staticClass +
          • +
          • + _classInstance +
          • )
            - BaseMVCInstance + ClassInstance | null static
            -

            获取或设置 BaseMVC 的实例

            +

            获取或设置组件实例

            Parameters:

            @@ -463,12 +510,113 @@

            Parameters:

            +
          • + _staticClass + Class +
            +
            +
          • +
          • + _classInstance + ClassInstance +
            +
            +
          • + +
            +
            +

            Returns:

            +
            + ClassInstance | null: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +

            Returns:

            - BaseMVCInstance: + :
            @@ -490,7 +638,7 @@

            on

            @@ -516,7 +664,7 @@

            Parameters:

            Returns:

            - BaseMVCInstance +

            BaseMVCInstance

            @@ -529,7 +677,7 @@

            selector

            @@ -538,7 +686,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -549,6 +697,57 @@

            trigger

          • _evtName
          • +
          • + _args +
          • + ) +
            + + + +
            +

            + Defined in + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            )
            @@ -557,11 +756,11 @@

            trigger

            -

            使用 jquery trigger 绑定事件

            +

            使用 jquery triggerHandler 触发绑定事件

            Parameters:

            @@ -572,12 +771,18 @@

            Parameters:

            +
          • + _args + | Array +
            +
            +
          • Returns:

            - BaseMVCInstance + :
            @@ -591,7 +796,7 @@

            autoInit

            diff --git a/docs_api/classes/JC.Calendar.html b/docs_api/classes/JC.Calendar.html index 0ea1a437f..ad3bfafa2 100644 --- a/docs_api/classes/JC.Calendar.html +++ b/docs_api/classes/JC.Calendar.html @@ -3,11 +3,17 @@ JC.Calendar - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,7 +147,7 @@

            APIs

            JC.Calendar Class

            @@ -114,60 +155,72 @@

            JC.Calendar Class


            全局访问请使用 JC.Calendar 或 Calendar
            DOM 加载完毕后 , Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签 -
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( selector ) -
            selector 可以是 新加载的容器, 也可以是新加载的所有input

            -

            require: jQuery -
            require: window.cloneDate -
            require: window.parseISODate -
            require: window.formatISODate -
            require: window.maxDayOfMonth -
            require: window.isSameDay -
            require: window.isSameMonth -

            -

            JC Project Site +
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector ) +
            _selector 可以是 新加载的容器, 也可以是新加载的所有input

            +

            require: + JC.common +

            +

            JC Project Site | API docs -| demo link

            -

            可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season)

            +| demo link

            +

            可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season)

            defaultdate = ISO Date
            默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性
            datatype = string
            声明日历控件的类型: -

            date: 日期日历

            -

            week: 周日历

            -

            month: 月日历

            -

            season: 季日历

            -

            monthday: 多选日期日历

            +
            date: 日期日历 +
            week: 周日历 +
            month: 月日历 +
            season: 季日历 +
            year: 年日历 +
            monthday: 多选日期日历
            multidate = string
            与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突
            calendarshow = function
            -
            显示日历时的回调
            +
            显示日历时的回调 +
            function calendarshow( _selector, _ins ){
            +   var _selector = $(this);
            +   UXC.log( 'calendarshow', _selector.val() );
            +}
            +
            calendarhide = function
            -
            隐藏日历时的回调
            +
            隐藏日历时的回调 +
            function calendarhide( _selector, _ins ){
            +   var _selector = $(this);
            +   UXC.log( 'calendarhide', _selector.val() );
            +}
            calendarlayoutchange = function
            -
            用户点击日历控件操作按钮后, 外观产生变化时触发的回调
            +
            用户点击日历控件操作按钮后, 外观产生变化时触发的回调 +
            function calendarlayoutchange( _selector, _ins ){
            +   var _selector = $(this);
            +   JC.log( 'calendarlayoutchange', _selector.val() );
            +}
            +
            calendarupdate = function
            赋值后触发的回调 -
            -
            参数:
            -
            _startDate: 开始日期
            -
            _endDate: 结束日期
            -
            -
            +
            function calendarupdate( _startDate, _endDate, _ins ){
            +   var _selector = $(this);
            +   JC.log( 'calendarupdate', _selector.val(), _startDate, _endDate );
            +}
            +
            calendarclear = function
            -
            清空日期触发的回调
            +
            清空日期触发的回调 +
            function calendarclear( _selector, _ins ){
            +   var _selector = $(this);
            +}
            minvalue = ISO Date
            日期的最小时间, YYYY-MM-DD
            maxvalue = ISO Date
            日期的最大时间, YYYY-MM-DD
            currentcanselect = bool, default = true
            当前日期是否能选择
            -
            multiselect = bool (目前支持 month: default=false, monthday: default = treu)
            +
            multiselect = bool (目前支持 month: default=false, monthday: default = true)
            是否为多选日历
            calendarupdatemultiselect = function
            @@ -175,9 +228,67 @@

            可用的html attribute, (input|button):(datatype|multidate)=(date|week|mon
            参数: _data:
            - [{"start": Date,"end": Date}[, {"start": Date,"end": Date}... ] ] + [{"start": Date,"end": Date}[, {"start": Date,"end": Date}... ] ]
            +
            function calendarupdatemultiselect( _data, _ins ){
            +   var _selector = $(this);
            +   window.JSON && ( _data = JSON.stringify( _data ) );
            +   JC.log( 'calendarupdatemultiselect:'
            +       , JC.f.printf( 'val:{0}, data:{1}', _selector.val(), _data ) );
            +}

            +
            dateFormat = string
            +
            + 自定义日期格式化显示, 使用 JC.f.dateFormat 函数进行格式化 +
            如果日期去除非数字后不是 8/16 位数字的话, 需要 显式声明 dateParse 属性, 自定义日期解析函数 +
            +
            fullDateFormat = string
            +
            + 针对 日期类型: 月/季/年 定义显示格式, default: "{0} 至 {1}" +
            {0}代表开始日期, {1}代表结束日期 +
            +
            ignoreInitCalendarDate = bool, default = false
            +
            是否忽略初始化 控件的值
            +
            dateParse = function
            +
            + 自定义日期格式函数, 针对日期不能解析为 8 位数字的特殊日期 +
            例子: +
            //
            +/// 针对月份日期格式化 YY-MM
            +//
            +function parseYearMonthDate( _dateStr ){
            +   _dateStr = $.trim( _dateStr || '' );
            +   var _r = { start: null, end: null };
            +   if( !_dateStr ) return _r;
            +   _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +   var _year = _dateStr.slice( 0, 4 ), _month = parseInt( _dateStr.slice( 4 ), 10 ) - 1;
            +   _r.start = new Date( _year, _month, 1 );
            +   return _r;
            +}
            +//
            +/// 针对季度日期格式化 YY-MM ~ YY-MM
            +//
            +function parseSeasonDate( _dateStr ){
            +   _dateStr = $.trim( _dateStr || '' );
            +   var _r = { start: null, end: null };
            +   if( !_dateStr ) return _r;
            +   _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +   _r.start = JC.f.parseISODate( _dateStr.slice( 0, 6 ) + '01' );
            +   _r.end = JC.f.parseISODate( _dateStr.slice( 6 ) + '01' );
            +   return _r;
            +}
            +//
            +/// 针对年份日期格式化 YY
            +//
            +function parseYearDate( _dateStr ){
            +   _dateStr = $.trim( _dateStr || '' );
            +   var _r = { start: null, end: null };
            +   if( !_dateStr ) return _r;
            +   _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +   var _year = _dateStr.slice( 0, 4 );
            +   _r.start = new Date( _year, 0, 1 );
            +   return _r;
            +}
            @@ -200,9 +311,6 @@

            Methods

          • _initHanlderEvent
          • -
          • - _logic.initTrigger -
          • cancel
          • @@ -234,6 +342,9 @@

            Methods

          • hide
          • +
          • + init +
          • isCalendar static @@ -286,10 +397,6 @@

            Methods

          • visible
          • -
          • - weekOfYear - static -
          • @@ -359,6 +466,10 @@

            Properties

            weekTpl static +
          • + yearTpl + static +
          • @@ -385,9 +496,6 @@

            Events

          • dom ready
          • -
          • - input focus -
          • month map click
          • @@ -427,7 +535,7 @@

            _init

            @@ -441,43 +549,12 @@

            _initHanlderEvent

            初始化相关操作事件

            -
            -
            -

            _logic.initTrigger

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - private -
            -

            - Defined in - ../comps/Calendar/Calendar.js:677 -

            -
            -
            -

            初始化日历组件的触发按钮

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -
              -
            • -
            -

            cancel

            @@ -485,7 +562,7 @@

            cancel

            @@ -498,7 +575,7 @@

            clear

            @@ -520,7 +597,7 @@

            clone

            @@ -556,7 +633,7 @@

            defaultDate

            @@ -590,7 +667,7 @@

            getCnNum

            @@ -610,7 +687,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -627,7 +704,7 @@

            getDate

            @@ -664,7 +741,7 @@

            getInstance

            @@ -695,7 +772,7 @@

            hide

            @@ -704,8 +781,7 @@

            hide

            Example:

            -
                   <script>JC.Calendar.hide();</script>
            -
            +
                   <script>JC.Calendar.hide();</script>
            @@ -718,7 +794,7 @@

            hide

            @@ -727,9 +803,40 @@

            hide

            Returns:

            - CalendarInstance +

            CalendarInstance

            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private + +
            +

            初始化日历组件的触发按钮

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +

            isCalendar

            @@ -744,7 +851,7 @@

            isCalendar

            @@ -772,7 +879,7 @@

            layout

            @@ -781,7 +888,7 @@

            layout

            Returns:

            - selector +

            selector

            @@ -803,7 +910,7 @@

            on

            @@ -829,7 +936,7 @@

            Parameters:

            Returns:

            - CalendarInstance +

            CalendarInstance

            @@ -846,7 +953,7 @@

            pickDate

            @@ -869,20 +976,19 @@

            Example:

                   <dl>
                        <dd>
            -               <input type="text" name="date6" class="manualPickDate" value="20110201" />
            +               <input type="text" name="date6" class="manualPickDate" value="20110201" />
                            manual JC.Calendar.pickDate
                        </dd>
                        <dd>
            -               <input type="text" name="date7" class="manualPickDate" />
            +               <input type="text" name="date7" class="manualPickDate" />
                            manual JC.Calendar.pickDate
                        </dd>
                    </dl>
                    <script>
            -           $(document).delegate('input.manualPickDate', 'focus', function($evt){
            +           $(document).delegate('input.manualPickDate', 'focus', function($evt){
                        JC.Calendar.pickDate( this );
                        });
            -       </script>
            -
            + </script>
            @@ -899,7 +1005,7 @@

            position

            @@ -927,7 +1033,7 @@

            selector

            @@ -936,7 +1042,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -949,7 +1055,7 @@

            show

            @@ -958,7 +1064,7 @@

            show

            Returns:

            - CalendarInstance +

            CalendarInstance

            @@ -977,7 +1083,7 @@

            trigger

            @@ -997,7 +1103,7 @@

            Parameters:

            Returns:

            - CalendarInstance +

            CalendarInstance

            @@ -1017,7 +1123,7 @@

            type

            @@ -1038,7 +1144,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -1048,7 +1154,7 @@

            updateLayout

            @@ -1067,7 +1173,7 @@

            updateMonth

            @@ -1091,7 +1197,7 @@

            updatePosition

            @@ -1110,7 +1216,7 @@

            updateSelected

            @@ -1141,7 +1247,7 @@

            updateSelector

            @@ -1171,7 +1277,7 @@

            updateYear

            @@ -1198,7 +1304,7 @@

            visible

            @@ -1207,57 +1313,7 @@

            visible

            Returns:

            - bool -
            -
            -
            -
            -

            weekOfYear

            -
            - (
              -
            • - _year -
            • -
            • - _dayOffset -
            • -
            ) -
            - - - - static -
            -

            - Defined in - ../comps/Calendar/Calendar.js:1809 -

            -
            -
            -

            取一年中所有的星期, 及其开始结束日期

            -
            -
            -

            Parameters:

            -
              -
            • - _year - Int -
              -
              -
            • -
            • - _dayOffset - Int -
              -

              每周的默认开始为周几, 默认0(周一)

              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - Array +

            bool

            @@ -1271,7 +1327,7 @@

            autoInit

            @@ -1286,7 +1342,7 @@

            cnUnit

            @@ -1301,7 +1357,7 @@

            cnWeek

            @@ -1316,7 +1372,7 @@

            defaultDateSpan

            @@ -1331,7 +1387,7 @@

            domClickFilter

            @@ -1348,7 +1404,7 @@

            lastIpt

            @@ -1362,7 +1418,7 @@

            layoutHideCallback

            @@ -1377,7 +1433,7 @@

            layoutInitedCallback

            @@ -1392,7 +1448,7 @@

            layoutShowCallback

            @@ -1407,7 +1463,7 @@

            monthdayHeadAppendText

            @@ -1422,7 +1478,7 @@

            monthdayTpl

            @@ -1437,7 +1493,7 @@

            monthTpl

            @@ -1452,7 +1508,7 @@

            seasonTpl

            @@ -1467,7 +1523,7 @@

            tpl

            @@ -1484,7 +1540,7 @@

            weekDayOffset

            @@ -1500,7 +1556,22 @@

            weekTpl

            +
            +

            自定义周弹框的模板HTML

            +
            +

            Default: empty

            +
            +
            +

            yearTpl

            + String + static +
            @@ -1518,7 +1589,7 @@

            calendar button click

            @@ -1532,7 +1603,7 @@

            cancel click

            @@ -1547,7 +1618,7 @@

            clear click

            @@ -1562,7 +1633,7 @@

            confirm click

            @@ -1577,7 +1648,7 @@

            date click

            @@ -1591,7 +1662,7 @@

            dom click

            @@ -1605,26 +1676,12 @@

            dom ready

            DOM 加载完毕后, 初始化日历组件相关事件

            -
            -
            -

            input focus

            - - private -
            -

            - Defined in - ../comps/Calendar/Calendar.js:1580 -

            -
            -
            -

            日历组件文本框获得焦点

            -

            month map click

            @@ -1633,7 +1690,7 @@

            month map click

            @@ -1648,12 +1705,12 @@

            next year

            -

            捕获用户更改年份

            -

            监听 下一年按钮

            +

            捕获用户更改月份

            +

            监听 下一月按钮

            @@ -1663,12 +1720,12 @@

            next year

            -

            捕获用户更改月份

            -

            监听 下一月按钮

            +

            捕获用户更改年份

            +

            监听 下一年按钮

            @@ -1678,7 +1735,7 @@

            previous year

            @@ -1693,7 +1750,7 @@

            previous year

            @@ -1708,7 +1765,7 @@

            UXCCalendar click

            @@ -1722,7 +1779,7 @@

            window scroll, window resize

            @@ -1736,7 +1793,7 @@

            year change

            @@ -1751,7 +1808,7 @@

            year map click

            diff --git a/docs_api/classes/JC.DCalendar.html b/docs_api/classes/JC.DCalendar.html new file mode 100644 index 000000000..cf11682f2 --- /dev/null +++ b/docs_api/classes/JC.DCalendar.html @@ -0,0 +1,881 @@ + + + + + JC.DCalendar - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.DCalendar Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            双日历日期选择组件

            +

            + require: + JC.BaseMVC +

            +

            JC Project Site +| API docs +| demo link

            +

            +

            可用的 HTML attribute

            +
            +
            datatype = string 必填项
            +
            声明日历控件的类型: +
            ddate: 日期日历 +
            drange: 日期范围日历( 成对出现 ) +
            +
            minvalue = ISO Date
            +
            日期的最小时间, YYYY-MM-DD
            +
            maxvalue = ISO Date
            +
            日期的最大时间, YYYY-MM-DD
            +
            currentcanselect = bool, default = true
            +
            当前日期是否能选择
            +
            monthmum = int
            +
            + 声明显示月份日历面板的个数(一次性可显示2到12个月份),默认为2(双日历) +
            +
            showtype = block || float
            +
            + 声明月份日历面板的显示方式,默认为float
            + float(比如两个月份并排显示) 查看
            + block (月份日历面板竖排显示)查看
            +
            +
            calendarshow = function
            +
            显示日历显示后的回调 +
            function calendarShow( selector ) {
            +   var ins = this;
            +   JC.log( "calendarshow", new Date().getTime(), selector.val() );
            +}
            +
            calendarhide = function
            +
            隐藏日历后的回调 +
            function calendarhide( selector ) {
            +   JC.log( "calendarhide", $(selector).val(), new Date().getTime() );
            +}
            +
            calendarclear = function
            +
            清空选中日期后的回调 +
            function calendarclear( selector ) {
            +   JC.log( "calendarclear", $(selector).val(), new Date().getTime() );
            +}
            +
            updatedate = function
            +
            选中日期后回调 +
            function updatedate( selector ) {
            +   JC.log( "updatedate", $(selector).val(), new Date().getTime() );
            +}
            +
            updatemonth = function
            +
            选中月份后回调 +
            function updatemonth( selector ) {
            +   JC.log( "updatedatemonth", $(selector).val(), new Date().getTime() );
            +}
            +
            updateyear = function
            +
            选中年份后回调 +
            function updateyear( selector ) {
            +   JC.log( "updatedateyear", $(selector).val(), new Date().getTime() );
            +}
            +
            beforeupdateyear = function
            +
            更新年份前的回调,即年份日历面板出来时 +
            function beforeupdateyear( selector ) {
            +   JC.log( "beforeupdateyear", $(selector).val(), new Date().getTime() );
            +}
            +
            beforeupdatemonth = function
            +
            更新月份前的回调,即月份日历面板出来时 +
            function beforeupdateymonth( selector ) {
            +   JC.log( "beforeupdateymonth", $(selector).val(), new Date().getTime() );
            +}
            +
            beforeupdatemont = function
            +
            更新月份前的回调,即月份日历面板出来时 +
            function beforeupdateymonth( selector ) {
            +   JC.log( "beforeupdateymonth", $(selector).val(), new Date().getTime() );
            +}
            +
            updateprevpageyear = function
            +
            点击上一页年份时的回调 +
            function updatprevtpageyear( selector ) {
            +   JC.log( "updateprevpageyear", $(selector).val(), new Date().getTime() );
            +}
            +
            updatenextpageyear = function
            +
            点击下一页年份时的回调 +
            function updatenextpageyear( selector ) {
            +   JC.log( "updatenextpageyear", $(selector).val(), new Date().getTime() );
            +}
            +
            updateprevyear = function
            +
            点击上一年时的回调,月份日历面板点击上一页 +
            function updatprevyear( selector ) {
            +   JC.log( "updateprevyear", $(selector).val(), new Date().getTime() );
            +}
            +
            updatenextyear = function
            +
            点击下一年时的回调,月份日历面板点击下一页 +
            function updatenextyear( selector ) {
            +   JC.log( "updatenextyear", $(selector).val(), new Date().getTime() );
            +}
            +
            updateprevmonth = function
            +
            点击上一月时的回调,日期日历面板点击上一页 +
            function updatprevmonth( selector ) {
            +   JC.log( "updateprevmonth", $(selector).val(), new Date().getTime() );
            +}
            +
            updatenextmonth = function
            +
            点击下一月时的回调,日期日历面板点击下一页 +
            function updatenextmonth( selector ) {
            +   JC.log( "updatenextmonth", $(selector).val(), new Date().getTime() );
            +}
            +
            +
            +
            +

            Constructor

            +
            +

            JC.DCalendar

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            _initStatus

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + protected + static + +
            +

            初始化可识别的 DCalendar 的状态

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + DCalendarInstance + + static + +
            +

            获取或设置 DCalendar 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + DCalendarInstance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            • + _onlyStatus +
            • +
            ) +
            + + Array of DCalendarInstance + + static + +
            +

            初始化可识别的 DCalendar 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            • + _onlyStatus + Bool +
              +

              default = false

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of DCalendarInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            pickDate

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + static + +
            +

            弹出日期选择框

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +

              需要显示日期选择框的标签

              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                   <dl>
            +           <dd>
            +               <input type="text" name="date6" class="manualPickDate" value="20110201" />
            +               manual JC.DCalendar.pickDate
            +           </dd>
            +           <dd>
            +               <input type="text" name="date7" class="manualPickDate" />
            +               manual JC.DCalendar.pickDate
            +           </dd>
            +       </dl>
            +       <script>
            +           $(document).delegate('input.manualPickDate', 'focus', function($evt){
            +               JC.DCalendar.pickDate( this );
            +           });
            +       </script>
            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Dialog.alert.html b/docs_api/classes/JC.Dialog.alert.html index c6cfa0dfe..d705fa0bf 100644 --- a/docs_api/classes/JC.Dialog.alert.html +++ b/docs_api/classes/JC.Dialog.alert.html @@ -3,11 +3,17 @@ JC.Dialog.alert - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,20 +147,19 @@

            APIs

            JC.Dialog.alert Class

            - Extends JC.Panel + Extends JC.Dialog

            会话框 alert 提示
            注意, 这是个方法, 写 @class 属性是为了生成文档

            -

            private property see: JC.Dialog -

            requires: jQuery, Panel, Dialog

            JC Project Site | API docs | demo link

            +

            see also: JC.Dialog

            Constructor

            @@ -145,7 +185,7 @@

            JC.Dialog.alert

            @@ -171,10 +211,10 @@

            Parameters:

            _cb Function
            -

            点击弹框确定按钮的回调 -

            function( _evtName, _panelIns ){ + <p>点击弹框确定按钮的回调</p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
            @@ -182,7 +222,7 @@

            Parameters:

            Returns:

            @@ -203,6 +243,21 @@

            Methods

          • _init
          • +
          • + _logic.dialogIdentifier +
          • +
          • + _logic.fixWidth +
          • +
          • + _logic.hideMask +
          • +
          • + _logic.setMaskSizeForIe6 +
          • +
          • + _logic.showMask +
          • autoClose
          • @@ -268,6 +323,36 @@

            Methods

            Properties

            +
            +

            _logic.dialogIdentifier

            +
            + (
              +
            • + _panel +
            • +
            ) +
            + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:105 +

            +
            +
            +

            设置会话弹框的唯一性

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            _logic.fixWidth

            +
            + (
              +
            • + _status +
            • +
            ) +
            + + Int + + private +
            +

            Inherited from + + JC.Dialog + + but overwritten in + ../comps/Panel/Dialog.popup.js:150 +

            +
            +
            +

            获取弹框的显示状态, 默认为0(成功)

            +
            +
            +

            Parameters:

            +
              +
            • + _status + Int +
              +

              弹框状态: 0:成功, 1:失败, 2:警告

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Int: +
            +
            +
            +
            +

            _logic.hideMask

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:129 +

            +
            +
            +

            隐藏蒙板

            +
            +
            +
            +

            _logic.setMaskSizeForIe6

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:219 +

            +
            +
            +

            窗口改变大小时, 改变蒙板的大小, +
            这个方法主要为了兼容 IE6

            +
            +
            +
            +

            _logic.showMask

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:182 +

            +
            +
            +

            显示蒙板

            +

            autoClose

            @@ -344,7 +547,7 @@

            autoClose

            @@ -377,7 +580,7 @@

            body

            @@ -398,7 +601,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -408,7 +611,7 @@

            center

            @@ -427,7 +630,7 @@

            clickClose

            @@ -451,7 +654,7 @@

            close

            @@ -465,7 +668,7 @@

            dispose

            @@ -488,7 +691,7 @@

            find

            @@ -509,7 +712,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -519,7 +722,7 @@

            focusButton

            @@ -543,7 +746,7 @@

            footer

            @@ -565,7 +768,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -584,7 +787,7 @@

            header

            @@ -606,7 +809,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -616,7 +819,7 @@

            hide

            @@ -633,7 +836,7 @@

            isClickClose

            @@ -642,7 +845,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -655,7 +858,7 @@

            layout

            @@ -683,7 +886,7 @@

            on

            @@ -715,16 +918,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -743,7 +945,7 @@

            panel

            @@ -764,7 +966,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -783,7 +985,7 @@

            positionWith

            @@ -817,7 +1019,7 @@

            selector

            @@ -843,7 +1045,7 @@

            show

            @@ -869,8 +1071,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -889,7 +1090,7 @@

            trigger

            @@ -918,9 +1119,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -939,7 +1139,7 @@

            triggerSelector

            @@ -966,6 +1166,152 @@

            Returns:

            Properties

            +
            +

            _logic

            + Unknown + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:98 +

            +
            +
            +

            会话弹框逻辑处理方法集

            +
            +
            +
            +

            _logic.maxWidth

            + Int + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:141 +

            +
            +
            +

            弹框最大宽度

            +
            +

            Default: 500

            +
            +
            +

            _logic.minWidth

            + Int + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:132 +

            +
            +
            +

            弹框最小宽度

            +
            +

            Default: 180

            +
            +
            +

            _logic.showMs

            + Int millisecond + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:210 +

            +
            +
            +

            延时显示弹框 +
            延时是为了使用户绑定的 show 事件能够被执行

            +
            +
            +
            +

            _logic.timeout

            + SetTimeout + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:202 +

            +
            +
            +

            延时处理的指针属性

            +
            +
            +
            +

            _logic.tpls

            + Object + private +
            +

            Inherited from + + JC.Dialog + + but overwritten in + ../comps/Panel/Dialog.js:242 +

            +
            +
            +

            保存会话弹框的所有默认模板

            +
            +
            +
            +

            _logic.tpls.alert

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:212 +

            +
            +
            +

            alert 会话弹框的默认模板

            +
            +
            +
            +

            _logic.tpls.confirm

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:235 +

            +
            +
            +

            confirm 会话弹框的默认模板

            +
            +
            +
            +

            _logic.tpls.mask

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:250 +

            +
            +
            +

            会话弹框的蒙板模板

            +
            +
            +
            +

            _logic.tpls.msgbox

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:192 +

            +
            +
            +

            msgbox 会话弹框的默认模板

            +
            +

            _model

            Unknown @@ -973,7 +1319,7 @@

            _model

            @@ -986,7 +1332,7 @@

            _view

            @@ -999,7 +1345,7 @@

            tpl

            @@ -1016,7 +1362,7 @@

            beforecenter

            @@ -1026,8 +1372,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1037,7 +1382,7 @@

            beforeclose

            @@ -1047,11 +1392,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1061,7 +1405,7 @@

            beforehide

            @@ -1071,8 +1415,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1082,7 +1425,7 @@

            beforeshow

            @@ -1092,8 +1435,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1103,7 +1445,7 @@

            cancel

            @@ -1112,11 +1454,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1126,7 +1467,7 @@

            center

            @@ -1135,8 +1476,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1146,7 +1486,7 @@

            close

            @@ -1155,11 +1495,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1169,7 +1508,7 @@

            confirm

            @@ -1178,11 +1517,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1192,7 +1530,7 @@

            hide

            @@ -1202,8 +1540,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1213,7 +1550,7 @@

            show

            @@ -1222,8 +1559,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/JC.Dialog.confirm.html b/docs_api/classes/JC.Dialog.confirm.html index a3b054b6a..1b19bf776 100644 --- a/docs_api/classes/JC.Dialog.confirm.html +++ b/docs_api/classes/JC.Dialog.confirm.html @@ -3,11 +3,17 @@ JC.Dialog.confirm - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,20 +147,19 @@

            APIs

            JC.Dialog.confirm Class

            - Extends JC.Panel + Extends JC.Dialog

            会话框 confirm 提示
            注意, 这是个方法, 写 @class 属性是为了生成文档

            -

            private property see: JC.Dialog -

            requires: jQuery, Panel, Dialog

            JC Project Site | API docs | demo link

            +

            see also: JC.Dialog

            Constructor

            @@ -148,7 +188,7 @@

            JC.Dialog.confirm

            @@ -174,20 +214,20 @@

            Parameters:

            _cb Function
            -

            点击弹框确定按钮的回调 -

            function( _evtName, _panelIns ){ + <p>点击弹框确定按钮的回调</p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
          • _cancelCb Function
            -

            点击弹框取消按钮的回调 -

            function( _evtName, _panelIns ){ + <p>点击弹框取消按钮的回调</p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
          • @@ -195,7 +235,7 @@

            Parameters:

            Returns:

            @@ -216,6 +256,21 @@

            Methods

          • _init
          • +
          • + _logic.dialogIdentifier +
          • +
          • + _logic.fixWidth +
          • +
          • + _logic.hideMask +
          • +
          • + _logic.setMaskSizeForIe6 +
          • +
          • + _logic.showMask +
          • autoClose
          • @@ -281,6 +336,36 @@

            Methods

            Properties

            +
            +

            _logic.dialogIdentifier

            +
            + (
              +
            • + _panel +
            • +
            ) +
            + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:105 +

            +
            +
            +

            设置会话弹框的唯一性

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            _logic.fixWidth

            +
            + (
              +
            • + _status +
            • +
            ) +
            + + Int + + private +
            +

            Inherited from + + JC.Dialog + + but overwritten in + ../comps/Panel/Dialog.popup.js:150 +

            +
            +
            +

            获取弹框的显示状态, 默认为0(成功)

            +
            +
            +

            Parameters:

            +
              +
            • + _status + Int +
              +

              弹框状态: 0:成功, 1:失败, 2:警告

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Int: +
            +
            +
            +
            +

            _logic.hideMask

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:129 +

            +
            +
            +

            隐藏蒙板

            +
            +
            +
            +

            _logic.setMaskSizeForIe6

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:219 +

            +
            +
            +

            窗口改变大小时, 改变蒙板的大小, +
            这个方法主要为了兼容 IE6

            +
            +
            +
            +

            _logic.showMask

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:182 +

            +
            +
            +

            显示蒙板

            +

            autoClose

            @@ -357,7 +560,7 @@

            autoClose

            @@ -390,7 +593,7 @@

            body

            @@ -411,7 +614,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -421,7 +624,7 @@

            center

            @@ -440,7 +643,7 @@

            clickClose

            @@ -464,7 +667,7 @@

            close

            @@ -478,7 +681,7 @@

            dispose

            @@ -501,7 +704,7 @@

            find

            @@ -522,7 +725,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -532,7 +735,7 @@

            focusButton

            @@ -556,7 +759,7 @@

            footer

            @@ -578,7 +781,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -597,7 +800,7 @@

            header

            @@ -619,7 +822,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -629,7 +832,7 @@

            hide

            @@ -646,7 +849,7 @@

            isClickClose

            @@ -655,7 +858,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -668,7 +871,7 @@

            layout

            @@ -696,7 +899,7 @@

            on

            @@ -728,16 +931,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -756,7 +958,7 @@

            panel

            @@ -777,7 +979,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -796,7 +998,7 @@

            positionWith

            @@ -830,7 +1032,7 @@

            selector

            @@ -856,7 +1058,7 @@

            show

            @@ -882,8 +1084,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -902,7 +1103,7 @@

            trigger

            @@ -931,9 +1132,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -952,7 +1152,7 @@

            triggerSelector

            @@ -979,6 +1179,152 @@

            Returns:

            Properties

            +
            +

            _logic

            + Unknown + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:98 +

            +
            +
            +

            会话弹框逻辑处理方法集

            +
            +
            +
            +

            _logic.maxWidth

            + Int + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:141 +

            +
            +
            +

            弹框最大宽度

            +
            +

            Default: 500

            +
            +
            +

            _logic.minWidth

            + Int + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:132 +

            +
            +
            +

            弹框最小宽度

            +
            +

            Default: 180

            +
            +
            +

            _logic.showMs

            + Int millisecond + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:210 +

            +
            +
            +

            延时显示弹框 +
            延时是为了使用户绑定的 show 事件能够被执行

            +
            +
            +
            +

            _logic.timeout

            + SetTimeout + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:202 +

            +
            +
            +

            延时处理的指针属性

            +
            +
            +
            +

            _logic.tpls

            + Object + private +
            +

            Inherited from + + JC.Dialog + + but overwritten in + ../comps/Panel/Dialog.js:242 +

            +
            +
            +

            保存会话弹框的所有默认模板

            +
            +
            +
            +

            _logic.tpls.alert

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:212 +

            +
            +
            +

            alert 会话弹框的默认模板

            +
            +
            +
            +

            _logic.tpls.confirm

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:235 +

            +
            +
            +

            confirm 会话弹框的默认模板

            +
            +
            +
            +

            _logic.tpls.mask

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:250 +

            +
            +
            +

            会话弹框的蒙板模板

            +
            +
            +
            +

            _logic.tpls.msgbox

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:192 +

            +
            +
            +

            msgbox 会话弹框的默认模板

            +
            +

            _model

            Unknown @@ -986,7 +1332,7 @@

            _model

            @@ -999,7 +1345,7 @@

            _view

            @@ -1012,7 +1358,7 @@

            tpl

            @@ -1029,7 +1375,7 @@

            beforecenter

            @@ -1039,8 +1385,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1050,7 +1395,7 @@

            beforeclose

            @@ -1060,11 +1405,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1074,7 +1418,7 @@

            beforehide

            @@ -1084,8 +1428,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1095,7 +1438,7 @@

            beforeshow

            @@ -1105,8 +1448,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1116,7 +1458,7 @@

            cancel

            @@ -1125,11 +1467,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1139,7 +1480,7 @@

            center

            @@ -1148,8 +1489,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1159,7 +1499,7 @@

            close

            @@ -1168,11 +1508,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1182,7 +1521,7 @@

            confirm

            @@ -1191,11 +1530,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1205,7 +1543,7 @@

            hide

            @@ -1215,8 +1553,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1226,7 +1563,7 @@

            show

            @@ -1235,8 +1572,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/JC.Dialog.html b/docs_api/classes/JC.Dialog.html index f3755d464..9a1555b1a 100644 --- a/docs_api/classes/JC.Dialog.html +++ b/docs_api/classes/JC.Dialog.html @@ -3,11 +3,17 @@ JC.Dialog - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            带蒙板的会话弹框
            注意, 这是个方法, 写 @class 属性是为了生成文档

            -

            requires: jQuery, Panel

            JC Project Site | API docs -| demo link

            +| demo link

            +

            see also: JC.Panel

            Constructor

            @@ -147,7 +188,7 @@

            JC.Dialog

            @@ -188,7 +229,7 @@

            Parameters:

            Returns:

            @@ -310,6 +351,9 @@

            Properties

          • _logic.tpls
          • +
          • + _logic.tpls +
          • _logic.tpls.alert
          • @@ -328,6 +372,10 @@

            Properties

          • _view
          • +
          • + MULTI_MASK + static +
          • @@ -375,7 +423,7 @@

            _init

            @@ -395,7 +443,7 @@

            _logic.dialogIdentifier

            @@ -429,7 +477,7 @@

            _logic.fixWidth

            @@ -470,7 +518,7 @@

            _logic.fixWidth

            @@ -502,7 +550,7 @@

            _logic.hideMask

            @@ -516,7 +564,7 @@

            _logic.setMaskSizeForIe6

            @@ -531,7 +579,7 @@

            _logic.showMask

            @@ -550,7 +598,7 @@

            autoClose

            @@ -583,7 +631,7 @@

            body

            @@ -604,7 +652,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -614,7 +662,7 @@

            center

            @@ -633,7 +681,7 @@

            clickClose

            @@ -657,7 +705,7 @@

            close

            @@ -671,7 +719,7 @@

            dispose

            @@ -694,7 +742,7 @@

            find

            @@ -715,7 +763,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -725,7 +773,7 @@

            focusButton

            @@ -749,7 +797,7 @@

            footer

            @@ -771,7 +819,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -790,7 +838,7 @@

            header

            @@ -812,7 +860,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -822,7 +870,7 @@

            hide

            @@ -839,7 +887,7 @@

            isClickClose

            @@ -848,7 +896,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -861,7 +909,7 @@

            layout

            @@ -889,7 +937,7 @@

            on

            @@ -921,16 +969,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -949,7 +996,7 @@

            panel

            @@ -970,7 +1017,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -989,7 +1036,7 @@

            positionWith

            @@ -1023,7 +1070,7 @@

            selector

            @@ -1049,7 +1096,7 @@

            show

            @@ -1075,8 +1122,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -1095,7 +1141,7 @@

            trigger

            @@ -1124,9 +1170,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -1145,7 +1190,7 @@

            triggerSelector

            @@ -1179,7 +1224,7 @@

            _logic

            @@ -1193,7 +1238,7 @@

            _logic.maxWidth

            @@ -1208,7 +1253,7 @@

            _logic.minWidth

            @@ -1223,7 +1268,7 @@

            _logic.showMs

            @@ -1238,7 +1283,7 @@

            _logic.timeout

            @@ -1252,7 +1297,21 @@

            _logic.tpls

            +
            +

            保存会话弹框的所有默认模板

            +
            +
            +
            +

            _logic.tpls

            + Object + private +
            @@ -1266,7 +1325,7 @@

            _logic.tpls.alert

            @@ -1280,7 +1339,7 @@

            _logic.tpls.confirm

            @@ -1294,7 +1353,7 @@

            _logic.tpls.mask

            @@ -1308,7 +1367,7 @@

            _logic.tpls.msgbox

            @@ -1322,7 +1381,7 @@

            _model

            @@ -1335,11 +1394,26 @@

            _view

            +
            +
            +
            +
            +

            MULTI_MASK

            + Boolean + static +
            +

            + Defined in + ../comps/Panel/Dialog.js:74

            +

            是否支持多层蒙板

            +

            Default: true

            @@ -1350,7 +1424,7 @@

            beforecenter

            @@ -1360,8 +1434,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1371,7 +1444,7 @@

            beforeclose

            @@ -1381,11 +1454,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1395,7 +1467,7 @@

            beforehide

            @@ -1405,8 +1477,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1416,7 +1487,7 @@

            beforeshow

            @@ -1426,8 +1497,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1437,7 +1507,7 @@

            cancel

            @@ -1446,11 +1516,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1460,7 +1529,7 @@

            center

            @@ -1469,8 +1538,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1480,7 +1548,7 @@

            close

            @@ -1489,11 +1557,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1503,7 +1570,7 @@

            confirm

            @@ -1512,11 +1579,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1526,7 +1592,7 @@

            hide

            @@ -1536,8 +1602,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1547,7 +1612,7 @@

            show

            @@ -1556,8 +1621,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/JC.Dialog.mask.html b/docs_api/classes/JC.Dialog.mask.html index f0b4ff119..bdf3171ea 100644 --- a/docs_api/classes/JC.Dialog.mask.html +++ b/docs_api/classes/JC.Dialog.mask.html @@ -3,11 +3,17 @@ JC.Dialog.mask - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,7 +147,7 @@

            APIs

            JC.Dialog.mask Class

            @@ -128,7 +169,7 @@

            JC.Dialog.mask

            diff --git a/docs_api/classes/JC.Dialog.msgbox.html b/docs_api/classes/JC.Dialog.msgbox.html index fb343cdbd..f3669e777 100644 --- a/docs_api/classes/JC.Dialog.msgbox.html +++ b/docs_api/classes/JC.Dialog.msgbox.html @@ -3,11 +3,17 @@ JC.Dialog.msgbox - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,20 +147,19 @@

            APIs

            JC.Dialog.msgbox Class

            - Extends JC.Panel + Extends JC.Dialog

            会话框 msgbox 提示 (不带按钮)
            注意, 这是个方法, 写 @class 属性是为了生成文档

            -

            private property see: JC.Dialog -

            requires: jQuery, Panel, Dialog

            JC Project Site | API docs | demo link

            +

            see also: JC.Dialog

            Constructor

            @@ -148,7 +188,7 @@

            JC.Dialog.msgbox

            @@ -174,10 +214,10 @@

            Parameters:

            _cb Function
            -

            弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs -

            function( _evtName, _panelIns ){ + <p>弹框自动关闭后的的回调, <b>如果 _cb 为 int 值, 将视为 _closeMs</b></p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
          • @@ -192,7 +232,7 @@

            Parameters:

            Returns:

          • @@ -213,6 +253,21 @@

            Methods

          • _init
          • +
          • + _logic.dialogIdentifier +
          • +
          • + _logic.fixWidth +
          • +
          • + _logic.hideMask +
          • +
          • + _logic.setMaskSizeForIe6 +
          • +
          • + _logic.showMask +
          • autoClose
          • @@ -278,6 +333,36 @@

            Methods

            Properties

            +
            +

            _logic.dialogIdentifier

            +
            + (
              +
            • + _panel +
            • +
            ) +
            + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:105 +

            +
            +
            +

            设置会话弹框的唯一性

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            _logic.fixWidth

            +
            + (
              +
            • + _status +
            • +
            ) +
            + + Int + + private +
            +

            Inherited from + + JC.Dialog + + but overwritten in + ../comps/Panel/Dialog.popup.js:150 +

            +
            +
            +

            获取弹框的显示状态, 默认为0(成功)

            +
            +
            +

            Parameters:

            +
              +
            • + _status + Int +
              +

              弹框状态: 0:成功, 1:失败, 2:警告

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Int: +
            +
            +
            +
            +

            _logic.hideMask

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:129 +

            +
            +
            +

            隐藏蒙板

            +
            +
            +
            +

            _logic.setMaskSizeForIe6

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:219 +

            +
            +
            +

            窗口改变大小时, 改变蒙板的大小, +
            这个方法主要为了兼容 IE6

            +
            +
            +
            +

            _logic.showMask

            + () + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:182 +

            +
            +
            +

            显示蒙板

            +

            autoClose

            @@ -354,7 +557,7 @@

            autoClose

            @@ -387,7 +590,7 @@

            body

            @@ -408,7 +611,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -418,7 +621,7 @@

            center

            @@ -437,7 +640,7 @@

            clickClose

            @@ -461,7 +664,7 @@

            close

            @@ -475,7 +678,7 @@

            dispose

            @@ -498,7 +701,7 @@

            find

            @@ -519,7 +722,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -529,7 +732,7 @@

            focusButton

            @@ -553,7 +756,7 @@

            footer

            @@ -575,7 +778,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -594,7 +797,7 @@

            header

            @@ -616,7 +819,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -626,7 +829,7 @@

            hide

            @@ -643,7 +846,7 @@

            isClickClose

            @@ -652,7 +855,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -665,7 +868,7 @@

            layout

            @@ -693,7 +896,7 @@

            on

            @@ -725,16 +928,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -753,7 +955,7 @@

            panel

            @@ -774,7 +976,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -793,7 +995,7 @@

            positionWith

            @@ -827,7 +1029,7 @@

            selector

            @@ -853,7 +1055,7 @@

            show

            @@ -879,8 +1081,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -899,7 +1100,7 @@

            trigger

            @@ -928,9 +1129,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -949,7 +1149,7 @@

            triggerSelector

            @@ -976,6 +1176,152 @@

            Returns:

            Properties

            +
            +

            _logic

            + Unknown + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:98 +

            +
            +
            +

            会话弹框逻辑处理方法集

            +
            +
            +
            +

            _logic.maxWidth

            + Int + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:141 +

            +
            +
            +

            弹框最大宽度

            +
            +

            Default: 500

            +
            +
            +

            _logic.minWidth

            + Int + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:132 +

            +
            +
            +

            弹框最小宽度

            +
            +

            Default: 180

            +
            +
            +

            _logic.showMs

            + Int millisecond + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:210 +

            +
            +
            +

            延时显示弹框 +
            延时是为了使用户绑定的 show 事件能够被执行

            +
            +
            +
            +

            _logic.timeout

            + SetTimeout + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:202 +

            +
            +
            +

            延时处理的指针属性

            +
            +
            +
            +

            _logic.tpls

            + Object + private +
            +

            Inherited from + + JC.Dialog + + but overwritten in + ../comps/Panel/Dialog.js:242 +

            +
            +
            +

            保存会话弹框的所有默认模板

            +
            +
            +
            +

            _logic.tpls.alert

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:212 +

            +
            +
            +

            alert 会话弹框的默认模板

            +
            +
            +
            +

            _logic.tpls.confirm

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:235 +

            +
            +
            +

            confirm 会话弹框的默认模板

            +
            +
            +
            +

            _logic.tpls.mask

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.js:250 +

            +
            +
            +

            会话弹框的蒙板模板

            +
            +
            +
            +

            _logic.tpls.msgbox

            + String + private +
            +

            Inherited from + JC.Dialog: + ../comps/Panel/Dialog.popup.js:192 +

            +
            +
            +

            msgbox 会话弹框的默认模板

            +
            +

            _model

            Unknown @@ -983,7 +1329,7 @@

            _model

            @@ -996,7 +1342,7 @@

            _view

            @@ -1009,7 +1355,7 @@

            tpl

            @@ -1026,7 +1372,7 @@

            beforecenter

            @@ -1036,8 +1382,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1047,7 +1392,7 @@

            beforeclose

            @@ -1057,11 +1402,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1071,7 +1415,7 @@

            beforehide

            @@ -1081,8 +1425,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1092,7 +1435,7 @@

            beforeshow

            @@ -1102,8 +1445,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1113,7 +1455,7 @@

            cancel

            @@ -1122,11 +1464,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1136,7 +1477,7 @@

            center

            @@ -1145,8 +1486,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1156,7 +1496,7 @@

            close

            @@ -1165,11 +1505,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1179,7 +1518,7 @@

            confirm

            @@ -1188,11 +1527,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1202,7 +1540,7 @@

            hide

            @@ -1212,8 +1550,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1223,7 +1560,7 @@

            show

            @@ -1232,8 +1569,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/JC.Drag.html b/docs_api/classes/JC.Drag.html new file mode 100644 index 000000000..f1a16c8f4 --- /dev/null +++ b/docs_api/classes/JC.Drag.html @@ -0,0 +1,1215 @@ + + + + + JC.Drag - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.Drag Class

            +
            +
            + Extends JC.BaseMVC +
            +
            + Defined in: ../comps/Drag/Drag.js:2 +
            +
            +
            +

            响应式 Drag and Drop 功能 +
            对 [ div | button ].js_compDrag 生效

            +

            require: + JC.common + , JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            通用 HTML attribute

            +
            +
            dragTarget = selector, default = self
            +
            要拖动的 selector, 可以通过该属性指定拖动的父节点
            +
            dragIn = selector, default = window
            +
            可拖动的范围
            +
            disableDrag = bool, default = false
            +
            是否禁止拖动, 会执行实例初始化
            +
            ignoreDrog = bool, default = false
            +
            是否忽略拖动, 不会执行实例初始化
            +
            dragInitedCb = function, window 变量域
            +
            实例初始化后调用的回调 +
            function dragInitedCb( _selector, _dragTarget ){
            +   var _ins = this;
            +   JC.log( 'dragInitedCb', new Date().getTime() );
            +}
            +
            +
            dragBeforeCb = function, window 变量域
            +
            拖动之前调用的回调, 如果返回 false, 将停止拖动操作 +
            function dragBeforeCb( _dragTarget, _selector ){
            +   var _ins = this;
            +   JC.log( 'dragBeforeCb', new Date().getTime() );
            +   //return false;
            +}
            +
            +
            dragAfterCb = function, window 变量域
            +
            拖动完成之后的回调 +
            function dragAfterCb( _dragTarget, _selector ){
            +   var _ins = this;
            +   JC.log( 'dragAfterCb', new Date().getTime() );
            +}
            +
            +
            dragBeginCb = function, window 变量域
            +
            拖动开始时的回调 +
            function dragBeginCb( _selector, _dragTarget, _movingSelector ){
            +   var _ins = this;
            +   JC.log( 'dragBeginCb', new Date().getTime() );
            +}
            +
            +
            dragMovingCb = function, window 变量域
            +
            拖动移动时的回 +
            function dragMovingCb( _selector, _dragTarget, _movingSelector, _x, _y, _evt ){
            +   var _ins = this;
            +   JC.log( 'dragMovingCb', new Date().getTime() );
            +}
            +
            +
            dragDoneCb = function, window 变量域
            +
            拖动完成时的回调 +
            function dragDoneCb( _selector, _dragTarget ){
            +   var _ins = this;
            +   JC.log( 'dragDoneCb', new Date().getTime() );
            +}
            +
            +
            +

            drop HTML attribute

            +
            +
            dropFor = selector
            +
            指定可拖放的 selector
            +
            dropSwap = bool, default = false
            +
            + 是否交换拖曳的位置 +
            为真, 交换 selector 的位置 +
            不为真, 将 append 到目标 selector +
            +
            disableDrop = bool, default = false
            +
            是否禁止 拖放功能, 这个属性应当写在 dropFor 的 selector 里
            +
            dropDoneCb = function, window 变量域
            +
            拖放完成时的回调, 如果返回 false, 将停止拖放操 +
            function dropDoneCb( _dragTarget, _dropTarget ){
            +   var _initSelector = this;
            +   JC.log( 'dropDoneCb', new Date().getTime() );
            +   //return false;
            +}
            +
            +
            dropDoneAfterCb = function, window 变量域
            +
            拖放完成后的回调 +
            function dropDoneAfterCb( _dragTarget, _dropTarget ){
            +   var _initSelector = this;
            +   JC.log( 'dropDoneAfterCb', new Date().getTime() );
            +}
            +
            +
            +
            +
            +

            Constructor

            +
            +

            JC.Drag

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/Drag/Drag.js:2 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <h2>拖动示例</h2>
            +   <div class="JCDrag dragStyle1 js_compDrag" dragBeginCb="dragBeginCb">
            +       normal drag 
            +       , dragBeginCb="dragBeginCb"
            +   </div>
            +   <h2>拖放示例</h2>
            +   <table>
            +       <tr>
            +           <td>
            +               <div class="js_compDrag" 
            +                   dropFor="(table div.js_compDrag" 
            +                   dropSwap="true" 
            +                   dropDoneCb="dropDoneCbAllow"
            +                   >
            +                   dropDoneCb="dropDoneCbAllow"
            +               </div>
            +           </td>
            +           <td>
            +               <div class="js_compDrag" 
            +                   dropFor="(table div.js_compDrag" 
            +                   dropSwap="true" 
            +                   dropDoneCb="dropDoneCbBan"
            +                   > 
            +                   dropDoneCb="dropDoneCbBan"
            +               </div>
            +           </td>
            +       </tr>
            +   </table>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Events

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            _updatePosition

            + () + protected +
            +

            + Defined in + ../comps/Drag/Drag.js:396 +

            +
            +
            +

            更新 dragMovingTarget 的位置

            +
            +
            +
            +

            cleanDragData

            + () + static +
            +

            + Defined in + ../comps/Drag/Drag.js:466 +

            +
            +
            +

            清除拖动的相关数据

            +
            +
            +
            +

            defaultMouseMove

            +
            + (
              +
            • + _evt +
            • +
            ) +
            + static +
            +

            + Defined in + ../comps/Drag/Drag.js:480 +

            +
            +
            +

            拖动时, 默认的 mousemove 函数

            +
            +
            +

            Parameters:

            +
              +
            • + _evt + Evt +
              +
              +
            • +
            +
            +
            +
            +

            defaultMouseUp

            +
            + (
              +
            • + _evt +
            • +
            ) +
            + static +
            +

            + Defined in + ../comps/Drag/Drag.js:512 +

            +
            +
            +

            拖动时, 默认的 mouseup 函数

            +
            +
            +

            Parameters:

            +
              +
            • + _evt + Evt +
              +
              +
            • +
            +
            +
            +
            +

            defaultScroll

            +
            + (
              +
            • + _evt +
            • +
            ) +
            + static +
            +

            + Defined in + ../comps/Drag/Drag.js:529 +

            +
            +
            +

            拖动时, 默认的 scroll 函数

            +
            +
            +

            Parameters:

            +
              +
            • + _evt + Evt +
              +
              +
            • +
            +
            +
            +
            +

            draggingItem

            +
            + (
              +
            • + _setter +
            • +
            ) +
            + + Selector | Null + + static +
            +

            + Defined in + ../comps/Drag/Drag.js:449 +

            +
            +
            +

            设置当前的拖动 selector

            +
            +
            +

            Parameters:

            +
              +
            • + _setter + Selector | Null +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Selector | Null: +
            +
            +
            +
            +

            dragIn

            + () + + Selector | Window + +
            +

            + Defined in + ../comps/Drag/Drag.js:390 +

            +
            +
            +

            获取可拖动范围的 [ 节点 | window ]

            +
            +
            +

            Returns:

            +
            + Selector | Window: +
            +
            +
            +
            +

            dragInfo

            +
            + (
              +
            • + _ins +
            • +
            • + _evt +
            • +
            ) +
            + + Json | Null + + static +
            +

            + Defined in + ../comps/Drag/Drag.js:430 +

            +
            +
            +

            设置/获取 拖动时所需的数据

            +
            +
            +

            Parameters:

            +
              +
            • + _ins + DragInstance +
              +
              +
            • +
            • + _evt + Event +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Json | Null: +
            +
            +
            +
            +

            dragMovingTarget

            + () + + + +
            +

            + Defined in + ../comps/Drag/Drag.js:384 +

            +
            +
            +

            获取拖动时移动的节点, drag 使用 dragTarget, drop clone dragTarget

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            dragTarget

            + () + + + +
            +

            + Defined in + ../comps/Drag/Drag.js:378 +

            +
            +
            +

            获取拖动的源节点

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of DragInstance + + static +
            +

            + Defined in + ../comps/Drag/Drag.js:407 +

            +
            +
            +

            初始化可识别的 Drag 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of DragInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Events

            +
            +

            JCDragAfter

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1048 +

            +
            +
            +

            拖动完成之后触发的事件

            +
            +
            +
            +

            JCDragBefore

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1036 +

            +
            +
            +

            拖动开始前触发的事件

            +
            +
            +
            +

            JCDragBegin

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1040 +

            +
            +
            +

            拖动开始时触发的事件

            +
            +
            +
            +

            JCDragDone

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1044 +

            +
            +
            +

            拖动完成时触发的事件

            +
            +
            +
            +

            JCDraggingMoving

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1052 +

            +
            +
            +

            拖动移动时触发的事件

            +
            +
            +
            +

            JCDragInited

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1032 +

            +
            +
            +

            实例初始化后触发的事件

            +
            +
            +
            +

            JCDropDone

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1056 +

            +
            +
            +

            拖放完成时触发的事件

            +
            +
            +
            +

            JCDropDoneAfter

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1060 +

            +
            +
            +

            拖放完成后触发的事件

            +
            +
            +
            +

            JCTriggerDrag

            + +
            +

            + Defined in + ../comps/Drag/Drag.js:1064 +

            +
            +
            +

            手动触发拖动事件

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.DragSelect.html b/docs_api/classes/JC.DragSelect.html new file mode 100644 index 000000000..5dc0e704d --- /dev/null +++ b/docs_api/classes/JC.DragSelect.html @@ -0,0 +1,854 @@ + + + + + JC.DragSelect - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.DragSelect Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            DOM标签拖动选择

            +

            require: + JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 div class="js_compDragSelect"

            +

            可用的 HTML attribute

            +
            +
            cdsConfig = script selector
            +
            拖动内容的配置 +<script type="text/template" class="js_cdsConfig">
            +   {
            +       "items": {                                      //响应选择动作的选择器列表
            +           "td.js_pos_canSelect": {                        //响应选择动作的选择器
            +               "addClass": "js_pos_selected"               //选取到的内容 添加的 class
            +               , "removeClass": "js_pos_canSelect"         //选取到的内容 清除的 class
            +               , "callback":                               //选中内容后的回调
            +                   function( _items, _type, _ins ){
            +                       var _selector = this;
            +                       JC.log( 'callback, td.js_pos_canSelect:', _type, _items.length );
            +                   }
            +           }
            +           , "td.js_pos_selected": {
            +               "addClass": "js_pos_canSelect"
            +               , "removeClass": "js_pos_selected"
            +               , "callback": 
            +                   function( _items, _type, _ins ){
            +                       var _selector = this;
            +                       JC.log( 'callback, td.js_pos_selected:', _type, _items.length );
            +                   }
            +           }
            +       }
            +       , "realtimeClass": "js_cdsRealtimeEffect"   //实时显示选取内容的 CSS 样式名
            +       , "callback":                         //选中内容的全局回调
            +           function( _items, _type, _ins ){
            +               var _selector = this;
            +               JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );
            +           }
            +   }
            +
            </script> +
            +
            cdsRealtimeEffect = bool, default = false
            +
            是否实时显示选中内容的状态
            +
            cdsRealtimeClass = CSS class name
            +
            显示选中内容的 CSS 样式名
            +
            cdsCallback = function
            +
            选中内容的全局回调 +
            function cdsCallback( _items, _type, _ins ){
            +   var _selector = this;
            +   JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );
            +}
            +
            +
            cdsItemFilter = function
            +
            选取内容时的过滤函数, 返回 false 将忽略 _item +
            function cdsItemFilter( _item, _type, _itemData, _configData ){
            +   var _selector = this
            +       , _r = true
            +       //, _minDate = JC.f.pureDate( JC.f.dateDetect( 'now,1d' ) )
            +       //, _itemDate = JC.f.parseISODate( _item.data( 'date' ) )
            +       ;
            +   //_itemDate.getTime() < _minDate.getTime() && ( _r = false );
            +   return _r;
            +}
            +
            +
            cdsRectMinWidth = int, default = 20
            +
            响应选取时,最小拖动宽度
            +
            cdsRectMinHeight= int, default = 20
            +
            响应选取时,最小拖动高度
            +
            cdsEnableTextSelectable = bool, default = false
            +
            选取内容式,是否启用文本选取
            +
            +
            +
            +

            Constructor

            +
            +

            JC.DragSelect

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            DEFAULT_MOUSEMOVE

            + () + static + +
            +

            默认 mousemove 事件

            +
            +
            +
            +

            DEFAULT_MOUSEUP

            + () + static + +
            +

            默认 mouseup 事件

            +
            +
            +
            +

            DEFAULT_SELECT_EVENT

            + () + static + +
            +

            默认 selectstart 事件

            +
            +
            +
            +

            DRAG_DATA

            + () + + + + static + +
            +

            获取当前拖动的相关数据

            +
            +
            +

            Returns:

            +
            +

            object

            +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of DragSelectInstance + + static + +
            +

            初始化可识别的 DragSelect 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of DragSelectInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            RECT

            + () + + + + static + +
            +

            用于显示选取范围的矩形

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Properties

            +
            +

            MIN_RECT

            + Object + static + +
            +

            最小拖动范围, 小于这个范围将不予处理

            +
            +

            Default: width: 20, height: 20

            +
            +
            +

            RECT_TPL

            + String + static + +
            +

            用于显示选取范围的矩形模板

            +
            +

            Default: <div class="js_compDragSelect_rect" style="display:none;position:absolute;left: -9999px;"></div>

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.FChart.html b/docs_api/classes/JC.FChart.html new file mode 100644 index 000000000..eeba13602 --- /dev/null +++ b/docs_api/classes/JC.FChart.html @@ -0,0 +1,847 @@ + + + + + JC.FChart - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.FChart Class

            +
            +
            + Extends JC.BaseMVC +
            +
            + Defined in: ../comps/FChart/FChart.js:7 +
            +
            +
            +

            JC.FChart - flash 图表组件

            +

            require: + JC.BaseMVC + , SWFObject + , JSON2 + , jQuery.mousewheel +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 div class="js_compFChart"

            +

            可用的 HTML attribute

            +
            +
            chartScriptData = script tpl selector
            +
            图表的脚本模板数据
            +
            chartDataVar = json object name
            +
            图表的json数据名, window变量域
            +
            chartWidth = number, default = 100%
            +
            图表的宽度
            +
            chartHeight = number, default = 400
            +
            图表的高度
            +
            chartScroll = bool, default = true
            +
            图表是否响应鼠标滚动
            +
            +
            +
            +

            Constructor

            +
            +

            JC.FChart

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/FChart/FChart.js:7 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
            +   <div class="js_compFChart"
            +       chartScriptData="|script"
            +       chartWidth="600"
            +       chartHeight="400"
            +       >
            +       <script type="text/template">
            +           {
            +               chart: {
            +                   type: 'bar' 
            +               }, 
            +               title: {
            +                   text:'Chart Title'
            +               },
            +               subtitle: {
            +                   text: 'sub title'
            +               }, 
            +               xAxis: {
            +                   categories: [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12' ]
            +               }, 
            +               yAxis: {
            +                   title: {
            +                       text: '(Vertical Title - 中文)'
            +                   }
            +               },
            +               series:[{
            +                   name: 'Temperature'
            +                   , data: [-50, 0, 3, -20, -20, 27, 28, 32, 30, 25, 15, -58]
            +                   , style: { 'stroke': '#ff7100' } 
            +                   , pointStyle: {}
            +               }, {
            +                   name: 'Rainfall',
            +                   data: [20, 21, 20, 100, 200, 210, 220, 100, 20, 10, 20, 10]
            +               }],
            +               credits: {
            +                   enabled: true
            +                   , text: 'fchart.openjavascript.org'
            +                   , href: 'http://fchart.openjavascript.org/'
            +               },
            +               displayAllLabel: true,
            +               legend: {
            +                   enabled: false
            +               }
            +           }
            +       </script>
            +   </div>
            +
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of FChartInstance + + static +
            +

            + Defined in + ../comps/FChart/FChart.js:117 +

            +
            +
            +

            初始化可识别的 FChart 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of FChartInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            update

            +
            + (
              +
            • + object +
            • +
            ) +
            +
            +

            + Defined in + ../comps/FChart/FChart.js:195 +

            +
            +
            +

            更新数据

            +
            +
            +

            Parameters:

            +
              +
            • + object + Object +
              +

              _data

              +
              +
            • +
            +
            +
            +
            +
            +

            Properties

            +
            +

            Model.FLASH_PATH

            + String + static +
            +

            + Defined in + ../comps/FChart/FChart.js:244 +

            +
            +
            +

            flash swf 路径 +
            {0} = JC.PATH +
            {1} = chart file name

            +
            +

            Default: {0}/flash/pub/charts/{1}.swf

            +
            +
            +

            Model.SWF_FILE_MAP

            + Object + static +
            +

            + Defined in + ../comps/FChart/FChart.js:219 +

            +
            +
            +

            flash swf 路径映射 +
            你还可以使用其他属性进行定义路径映射

            +
             1. window.FCHART_SWF_FILE_MAP
            + 2. JC.FCHART_SWF_FILE_MAP
            +
            +

            Default: null

            +
            +

            Example:

            +
            +
               requirejs( [ 'JC.FChart' ], function( FChart ){
            +       FChart['Model'].SWF_FILE_MAP = {
            +           'bar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Histogram.swf'
            +           , 'vbar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VHistogram.swf'
            +           , 'line': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/CurveGram.swf'
            +           , 'stack': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Stack.swf'
            +           , 'mix': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/MixChart.swf'
            +           , 'column': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/ZHistogram.swf'
            +           , 'hcolumn': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VZHistogram.swf'
            +       };
            +   });
            +
            +
            +
            +
            +

            Model.TYPE_MAP

            + Object + static +
            +

            + Defined in + ../comps/FChart/FChart.js:272 +

            +
            +
            +

            图表类型映射 +
            曲线图: line, curvegram +
            柱状图: bar, histogram +
            垂直柱状图: var, vhistogram +
            饼状图: pie, piegraph +
            圆环图: dount +
            评分球: rate

            +
            +
            +
            +

            Model.VERSION

            + String + static +
            +

            + Defined in + ../comps/FChart/FChart.js:255 +

            +
            +
            +

            flash swf 缓存版本控制

            +
            +

            Default: requirejs.s.contexts._.config.urlArgs || 'v=' + JC.pathPostfix || 'v=fchart'

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Fixed.html b/docs_api/classes/JC.Fixed.html index a23460230..8b82bce34 100644 --- a/docs_api/classes/JC.Fixed.html +++ b/docs_api/classes/JC.Fixed.html @@ -3,11 +3,17 @@ JC.Fixed - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            内容固定于屏幕某个位置显示

            -
            -
            require: jQuery
            -
            require: $.support.isFixed
            -
            +

            require: + jQuery + , JC.common +

            JC Project Site | API docs | demo link

            @@ -196,6 +237,10 @@

            Methods

            Properties

            @@ -325,7 +370,7 @@

            layout

            Returns:

            - selector +

            selector

            @@ -373,7 +418,7 @@

            Parameters:

            Returns:

            - FixedIns +

            FixedIns

            @@ -395,7 +440,7 @@

            show

            Returns:

            - FixedIns +

            FixedIns

            @@ -434,13 +479,27 @@

            Parameters:

            Returns:

            - FixedIns +

            FixedIns

            Properties

            +
            +

            $.support.isFixed

            + Bool + static +
            +

            + Defined in + ../comps/Fixed/Fixed.js:467 +

            +
            +
            +

            判断是否支持 CSS position: fixed

            +
            +

            autoInit

            Bool diff --git a/docs_api/classes/JC.FlowChart.html b/docs_api/classes/JC.FlowChart.html new file mode 100644 index 000000000..6693108f2 --- /dev/null +++ b/docs_api/classes/JC.FlowChart.html @@ -0,0 +1,899 @@ + + + + + JC.FlowChart - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.FlowChart Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +
            +
            JC 流程图
            +
            一对多关系
            +
            多对一关系
            +
            多对多关系
            +
            +

            require: + RaphaelJS + , JC.BaseMVC + , JC.PopTips +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 div class="js_compFlowChart"

            +

            可用的 HTML attribute

            +
            +
            data-FlowChart = script json data
            +
            流程图数据 +
            +
            数据说明
            +
            数据按节点关系分为两大类: 一对多, 多对一
            +
            +
            +
            一对多数据
            +
            一对多数据存放于字段: nodes, nodes 数据类型为数组
            +
            nodes 字段位于数据节点里
            +
            +
            +
            多对一数据
            +
            多对一数据存放于字段: targetNodes, targetNodes 数据类型为对象
            +
            targetNodes 字段为全局节点
            +
            +
            +
            +
            +
            数据字段说明
            +
            +

            图表数据 - chart 字段

            +
            +
            name = string
            +
            节点名
            +
            id = string
            +
            节点唯一标识符
            +
            nodes = array
            +
            一对多数据的子节点, 该字段位于父节点里面
            +
            targetNodes = object
            +
            多对一数据的子节点, 该字段为全局字段, 节点位置 chart.targetNodes
            +
            status = string, default = 0
            +
            + 节点状态 +
            根据 status 显示为不同的样式 +
            默认有0 ~ 10, 共11 种状态 +
            由status 产生的 css class: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status ) +
            +
            tipsHtml = string
            +
            鼠标划过节点时, 显示的tips内容, 支持html内容
            +
            +

            线条与图标颜色 - colors 字段

            +
            +
            line = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2 }
            +
            背景线颜色
            +
            icon = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2, 'fill': '#F2F2F2' }
            +
            图标颜色
            +
            如果要自定义节点颜色 或者 tips 颜色, 请使用 css 定义: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status )
            +
            +
            +
            +
            +
            +
            +
            +

            Constructor

            +
            +

            JC.FlowChart

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/FlowChart/FlowChart.js:5 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
            +   <div class="js_compFlowChart" data-FlowChart="|script">
            +       <script type="text/template">
            +           {
            +               chart: {
            +                   name: '提交'
            +                   , id: 1
            +                   , nodes: [
            +                           {
            +                               name: '资质审核'
            +                               , id: 2
            +                               , status: 1
            +                               , tipsHtml: 'username 1'
            +                               , nodes: [
            +                                   {
            +                                       name: '服务审核'
            +                                       , id: 3
            +                                       , targetNode: 5
            +                                       , status: 2
            +                                       , tipsHtml: 'username 2'
            +                                   }
            +                                   , {
            +                                       name: '渠道管理层'
            +                                       , id: 4
            +                                       , status: 3
            +                                       , tipsHtml: 'username 3'
            +                                   }
            +                               ]
            +                           }
            +                           , {
            +                               name: '资质审核1'
            +                               , id: 6
            +                               , status: 4
            +                               , tipsHtml: 'username 4'
            +                               , nodes: [
            +                                   {
            +                                       name: '服务审核1'
            +                                       , id: 7
            +                                       , targetNode: 9
            +                                       , status: 5
            +                                       , tipsHtml: 'username 5'
            +                                   }
            +                                   , {
            +                                       name: '渠道管理层1'
            +                                       , id: 8
            +                                       , targetNode: 9
            +                                       , status: 6
            +                                       , tipsHtml: 'username 6'
            +                                   }
            +                               ]
            +                           }
            +                           , {
            +                               name: '资质审核2'
            +                               , id: 10
            +                               , status: 7
            +                               , tipsHtml: 'username 7'
            +                               , nodes: [
            +                                   {
            +                                       name: '服务审核2'
            +                                       , id: 11
            +                                       , status: 8
            +                                       , tipsHtml: 'username 8'
            +                                       , nodes: [
            +                                           {
            +                                               name: '管理层2'
            +                                               , id: 12
            +                                               , targetNode: 5
            +                                               , status: 9
            +                                               , tipsHtml: 'username 9'
            +                                           }
            +                                       ]
            +                                   }
            +                               ]
            +                           }
            +                           , {
            +                               name: '资质审核3'
            +                               , id: 15
            +                               , status: 10
            +                               , tipsHtml: 'username 10'
            +                           }
            +                   ]
            +                   , targetNodes: {
            +                       '5': {
            +                           name: '管理层'
            +                       }
            +                       , '9': {
            +                           name: '管理层1'
            +                           , targetNode: 5
            +                       }
            +                   }
            +               }
            +           }
            +       </script>
            +   </div>
            +
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Events

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of FlowChartInstance + + static + +
            +

            初始化可识别的 FlowChart 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of FlowChartInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Events

            +
            +

            cfc_beforeInitItem

            + + +
            +

            dom节点初始化前的事件 +
            节点如果有特殊显示需求的话, 可以从这个事件进行相关操作

            +
            +
            +

            Example:

            +
            +
            +$( document ).delegate( 
            +   'div.js_compFlowChart'
            +   , JC.FlowChart.Model.BEFORE_INIT_ITEM
            +   , function( _evt, _itemData, _listData, _chartData ){
            +       if( _itemData.tipsHtml ){
            +           _itemData.tipsHtml += '   test';
            +       }
            +       _itemData.name = JC.f.printf( '~{0}~', _itemData.name );
            +   }
            +);
            +
            +
            +
            +
            +
            +

            cfc_inited

            + + +
            +

            初始化后 selector 触发的事件

            +
            +
            +

            Example:

            +
            +
            +$( document ).delegate( 
            +   'div.js_compFlowChart'
            +   , JC.FlowChart.Model.INITED
            +   , function( _evt, _ins, _chartData ){
            +       JC.log( 'js_compFlowChart inited' );
            +   }
            +);
            +
            +
            +
            +
            +
            +

            cfc_nodeInited

            + + +
            +

            dom 节点初始化后 触发的事件

            +
            +
            +

            Example:

            +
            +
            +$( document ).delegate( 
            +   'div.js_compFlowChart'
            +   , JC.FlowChart.Model.ITEM_INITED
            +   , function( _evt, _domNode, _itemData, _listData, _chartData ){
            +       JC.log( _domNode.prop( 'nodeName' ) );
            +   }
            +);
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Form.html b/docs_api/classes/JC.Form.html index 9c95d2762..9165fefd0 100644 --- a/docs_api/classes/JC.Form.html +++ b/docs_api/classes/JC.Form.html @@ -3,11 +3,17 @@ JC.Form - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            表单常用功能类 JC.Form

            -

            requires: jQuery

            +

            这个组件将不再维护, 相关功能请使用抽取出来的对应组件

            +

            + optional: + JC.AutoSelect + , JC.AutoChecked + , JC.FormFillUrl +

            JC Project Site | API docs | demo link

            @@ -120,7 +167,6 @@

            JC.Form Class

            @@ -136,10 +182,6 @@

            Methods

            initAutoFill static -
          • - initAutoFill.selectHasVal - static -
          • initAutoSelect static @@ -148,23 +190,6 @@

            Methods

            initCheckAll static
          • -
          • - initNumericStepper - static -
          • - -
            -
            -

            Properties

            -
            @@ -186,11 +211,13 @@

            disableButton

            -

            禁用按钮一定时间, 默认为1秒

            +

            禁用按钮一定时间, 默认为1秒 +
            这个方法已停止维护 +, 请使用 Bizs.ActionLogic.disableButton

            Parameters:

            @@ -228,15 +255,13 @@

            initAutoFill

            表单自动填充 URL GET 参数 -
            只要引用本脚本, DOM 加载完毕后, 页面上所有带 class js_autoFillUrlForm 的 form 都会自动初始化默认值

            -

            requires: jQuery

            -

            JC Project Site -| API docs

            +
            这个方法已经摘取出来, 单独成为一个类. +
            详情请见: JC.FormFillUrl

            Parameters:

            @@ -257,55 +282,6 @@

            Parameters:

            -
            -

            Example:

            -
            -
             JC.Form.initAutoFill( myCustomSelector, myUrl );
            -
            -
            -
            -
            -
            -

            initAutoFill.selectHasVal

            -
            - (
              -
            • - _select -
            • -
            • - _val -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Form/Form.js:174 -

            -
            -
            -

            判断下拉框的option里是否有给定的值

            -
            -
            -

            Parameters:

            -
              -
            • - _select - Selector -
              -
              -
            • -
            • - _val - String -
              -

              要查找的值

              -
              -
            • -
            -

            initAutoSelect

            @@ -314,13 +290,13 @@

            initAutoSelect

            select 级联下拉框无限联动
            这个方法已经摘取出来, 单独成为一个类. -
            详情请见: JC.AutoSelect.html +
            详情请见: JC.AutoSelect
            目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法

            @@ -331,107 +307,15 @@

            initCheckAll

            全选/反选
            这个方法已经摘取出来, 单独成为一个类. -
            详情请见: JC.AutoChecked.html +
            详情请见: JC.AutoChecked
            目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法

            -
            -
            -

            initNumericStepper

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - static -
            -

            - Defined in - ../comps/Form/Form.js:203 -

            -
            -
            -

            文本框 值增减 应用 -
            只要引用本脚本, 页面加载完毕时就会自动初始化 NumericStepper -
            所有带 class jsNStepperPlus, jsNStepperMinus 视为值加减按钮 -

            目标文本框可以添加一些HTML属性自己的规则, -
            nsminvalue=最小值(默认=0), nsmaxvalue=最大值(默认=100), nsstep=步长(默认=1), nsfixed=小数点位数(默认=0) -
            nschangecallback=值变改后的回调

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -

              要初始化的全选反选的父级节点

              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                    <dl class="def example1">
            -           <dt>JC.Form.initNumericStepper 默认值 0 - 100, step 1, fixed 0</dt>
            -           <dd>
            -               <button class="NS_icon NS_minus js_NStepperMinus" nstarget="input.js_ipt1" ></button>
            -               <input type="text" value="0" class="js_ipt1" />
            -               <button class="NS_icon NS_plus js_NStepperPlus" nstarget="input.js_ipt1" ></button>
            -           </dd>
            -       </dl>
            -       <dl class="def example1">
            -           <dt>JC.Form.initNumericStepper -10 ~ 10, step 2, fixed 2</dt>
            -           <dd>
            -               <button class="NS_icon NS_minus js_NStepperMinus" nstarget="input.js_ipt2" ></button>
            -               <input type="text" value="4" class="js_ipt2" nsminvalue="-10" nsmaxvalue="10" nsstep="2" nsfixed="2" />
            -               <button class="NS_icon NS_plus js_NStepperPlus" nstarget="input.js_ipt2" ></button>
            -           </dd>
            -       </dl>
            -
            -
            -
            -
            -
            -
            -

            Properties

            -
            -

            initAutoFill.decodeFunc

            - Function - static -
            -

            - Defined in - ../comps/Form/Form.js:158 -

            -
            -
            -

            自定义 URI decode 函数

            -
            -

            Default: null

            -
            -
            -

            initNumericStepper.onchange

            - Function - static -
            -

            - Defined in - ../comps/Form/Form.js:262 -

            -
            -
            -

            文本框 值增减 值变改后的回调 -
            这个是定义全局的回调函数, 要定义局部回调请在目标文本框上添加 nschangecallback=回调 HTML属性

            -
            diff --git a/docs_api/classes/JC.FormFillUrl.html b/docs_api/classes/JC.FormFillUrl.html new file mode 100644 index 000000000..3a599307b --- /dev/null +++ b/docs_api/classes/JC.FormFillUrl.html @@ -0,0 +1,794 @@ + + + + + JC.FormFillUrl - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.FormFillUrl Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            FormFillUrl 表单自动填充 URL 参数

            +

            require: + JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 form class="js_compFormFillUrl"

            +

            Form 可用的 HTML attribute

            +
            +
            decoder = function, default = decodeURIComponent
            +
            URL 的解码函数
            +
            encoder = function, default = encodeURIComponent
            +
            URL 的编码码函数
            +
            ignoreUrlFill = bool, default = false
            +
            是否忽略 URL填充
            +
            +
            +
            +

            Constructor

            +
            +

            JC.FormFillUrl

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <h2>JC.FormFillUrl 示例</h2>
            +   <form method="get" action="" class="js_compFormFillUrl" charset="utf-8" >
            +   </form>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            fill

            +
            + (
              +
            • + _selector +
            • +
            • + _url +
            • +
            ) +
            + + + + +
            +

            手动填充 URL 值

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            • + _url + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            FormFillUrlInstance

            +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of FormFillUrlInstance + + static + +
            +

            初始化可识别的 FormFillUrl 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of FormFillUrlInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selectHasVal

            +
            + (
              +
            • + _select +
            • +
            • + _val +
            • +
            ) +
            + static + +
            +

            判断下拉框的option里是否有给定的值

            +
            +
            +

            Parameters:

            +
              +
            • + _select + Selector +
              +
              +
            • +
            • + _val + String +
              +

              要查找的值

              +
              +
            • +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Properties

            +
            +

            decoder

            + Function + static + +
            +

            自定义 URI decode 函数

            +
            +

            Default: decodeURIComponent

            +
            +
            +

            encoder

            + Function + static + +
            +

            自定义 URI encode 函数

            +
            +

            Default: encodeURIComponent

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.FrameUtil.html b/docs_api/classes/JC.FrameUtil.html new file mode 100644 index 000000000..0469ff97b --- /dev/null +++ b/docs_api/classes/JC.FrameUtil.html @@ -0,0 +1,954 @@ + + + + + JC.FrameUtil - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.FrameUtil Class

            + +
            +

            iframe 自适应 与 数据交互 工具类

            +

            require: + JC.common +

            +

            JC Project Site + | API docs + | demo link

            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            autoNoticeSize

            +
            + (
              +
            • + _ms +
            • +
            • + _type +
            • +
            ) +
            +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:91 +

            +
            +
            +

            自动通知父窗口更新frame大小

            +
            +
            +

            Parameters:

            +
              +
            • + _ms + Int +
              +
              +
            • +
            • + _type + String +
              +
              +
            • +
            +
            +
            +
            +

            childIdMap

            +
            + (
              +
            • + _id +
            • +
            ) +
            + + + + +
            +

            通过 id 比对 frame 的 FrameUtil.id() 获取 frame

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            selector | null

            +
            +
            +
            +
            +

            childrenAutoSize

            +
            + (
              +
            • + _frames +
            • +
            • + _ms +
            • +
            ) +
            + +
            +

            自动批量更新 frame 大小

            +
            +
            +

            Parameters:

            +
              +
            • + _frames + Selector +
              +
              +
            • +
            • + _ms + Int +
              +
              +
            • +
            +
            +
            +
            +

            cssFromSizePattern

            +
            + (
              +
            • + _pattern +
            • +
            • + _params +
            • +
            ) +
            + + + + +
            +

            通过 FrameUtil.childSizePattern 获取对应的 css 样式

            +
            +
            +

            Parameters:

            +
              +
            • + _pattern + Int +
              +
              +
            • +
            • + _params + Json +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            json

            +
            +
            +
            +
            +

            id

            + () + + + +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:67 +

            +
            +
            +

            获取 JC.FrameUtil 唯一id +
            id = location.url_timestamp

            +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +
            +

            info

            + () + + Object + + +
            +

            获取窗口信息

            +
            +
            +

            Returns:

            +
            + Object: +

            $, width, height, bodyWidth, bodyHeight, id

            +
            +
            +
            +
            +

            noticeChildData

            +
            + (
              +
            • + _params +
            • +
            • + _type +
            • +
            ) +
            + +
            +

            通知子级有数据交互

            +
            +
            +

            Parameters:

            +
              +
            • + _params + Json +
              +
              +
            • +
            • + _type + String +
              +
              +
            • +
            +
            +
            +
            +

            noticeClose

            +
            + (
              +
            • + _type +
            • +
            ) +
            + +
            +

            通知父级关闭窗口

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            noticeData

            +
            + (
              +
            • + _data +
            • +
            • + _type +
            • +
            ) +
            + +
            +

            通知父级有数据交互

            +
            +
            +

            Parameters:

            +
              +
            • + _data + Json +
              +
              +
            • +
            • + _type + String +
              +
              +
            • +
            +
            +
            +
            +

            noticeReady

            +
            + (
              +
            • + _type +
            • +
            ) +
            + +
            +

            通知父级已经初始化完毕

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            noticeReload

            +
            + (
              +
            • + _url +
            • +
            • + _type +
            • +
            ) +
            + +
            +

            通知父级刷新页面

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            noticeSize

            +
            + (
              +
            • + _type +
            • +
            ) +
            +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:74 +

            +
            +
            +

            通知父窗口更新frame大小

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            parent

            + () + + Object + + +
            +

            获取父级窗口信息

            +
            +
            +

            Returns:

            +
            + Object: +

            $, win, jwin, JC, FrameUtil, eventHost, jEventHost, id

            +
            +
            +
            +
            +

            parent

            + () + + Object + + +
            +

            获取子级窗口信息

            +
            +
            +

            Returns:

            +
            + Object: +

            $, width, height, bodyWidth, bodyHeight, win, doc, type, id

            +
            +
            +
            +
            +

            subscribeEvent

            +
            + (
              +
            • + _name +
            • +
            • + _cb +
            • +
            ) +
            + +
            +

            订阅 frame 的事件 +
            目前有以下事件: +
            close: 关闭 +
            size: 更新大小 +
            data: json 数据

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            type

            + () + + + + +
            +

            获取窗口类型 +
            这个方法的作用可用 id() + childIdMap() 替代

            +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +
            +

            updateChildrenSize

            +
            + (
              +
            • + _frames +
            • +
            ) +
            + +
            +

            批量更新 frame 大小

            +
            +
            +

            Parameters:

            +
              +
            • + _frames + Selector +
              +
              +
            • +
            +
            +
            +
            +

            updateChildSize

            +
            + (
              +
            • + _frame +
            • +
            ) +
            + +
            +

            更新 frame 大小

            +
            +
            +

            Parameters:

            +
              +
            • + _frame + Selector +
              +
              +
            • +
            +
            +
            +
            +
            +

            Properties

            +
            +

            autoUpdateSizeMs

            + Int +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:35 +

            +
            +
            +

            自动大小的间隔 +
            单位毫秒

            +
            +

            Default: 1000

            +
            +
            +

            childSizePattern

            + Int +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:43 +

            +
            +
            +

            设置自适应大小应用的属性 +
            1: height +
            2: width +
            3: height + width

            +
            +

            Default: 1

            +
            +
            +

            eventHost

            + Object +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:22 +

            +
            +
            +

            事件保存与触发对象

            +
            +
            +
            +

            heightOffset

            + Int +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:28 +

            +
            +
            +

            frame 高度偏移值

            +
            +

            Default: 0

            +
            +
            +

            isChildAutoClose

            + Boolean +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:53 +

            +
            +
            +

            是否自动响应关闭事件

            +
            +

            Default: true

            +
            +
            +

            isChildAutoSize

            + Boolean +
            +

            + Defined in + ../comps/FrameUtil/FrameUtil.js:60 +

            +
            +
            +

            是否自动响应大小改变事件

            +
            +

            Default: true

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.ImageCutter.html b/docs_api/classes/JC.ImageCutter.html new file mode 100644 index 000000000..4b352dc3c --- /dev/null +++ b/docs_api/classes/JC.ImageCutter.html @@ -0,0 +1,1316 @@ + + + + + JC.ImageCutter - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.ImageCutter Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            图片裁切组件 +
            借助 PHP GD 库进行图片裁切( 不仅限于 PHP GD )

            +

            require: + JC.common + , JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 div class="js_compImageCutter"

            +

            可用的 HTML attribute

            +
            +
            imageUrl = url string
            +
            图片URL
            +
            defaultCoordinate = string
            +
            + 设置默认选择范围, 有以下三种模式 +
            sidelength +
            x, y +
            x, y, sidelength +
            +
            coordinateSelector = selector
            +
            保存当前坐标值的 node +
            坐标值分别为: [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ] +
            +
            imageUrlSelector = selector
            +
            保存当前图片URL的 node
            +
            previewSelector = selector
            +
            用于显示预览的 node, 支持多个预览, node 宽高并须为正方形
            +
            minRectSidelength = int, default = 50
            +
            裁切块的最小边长
            +
            minImageSidelength = int, default = 50
            +
            图片的最小边长
            +
            maxImageSidelength = int
            +
            图片的最大边长
            +
            cicInitedCb = function
            +
            组件初始化后的回调, window变量域 +
            function cicInitedCb(){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicInitedCb', new Date().getTime() );
            +}
            +
            +
            cicImageInitedCb = function
            +
            图片初始化完成时的回调, window变量域 +
            function cicImageInitedCb( _sizeObj, _img ){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicImageInitedCb', new Date().getTime() );
            +}
            +
            +
            cicCoordinateUpdateCb = function
            +
            更新裁切坐标后的回调, window变量域 +
            _corAr = Array = [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ] +
            function cicCoordinateUpdateCb( _corAr, _imgUrl ){
            +   var _p = this, _selector = _p.selector();
            +   JC.log( 'cicCoordinateUpdateCb', _corAr, _imgUrl, new Date().getTime() );
            +}
            +
            +
            cicDragDoneCb = function
            +
            拖动完成后的回调, window变量域 +
            与 cicCoordinateUpdateCb 的差别是: cicDragDoneCb 初始化不会触发 +
            function cicDragDoneCb( _sizeObj ){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicDragDoneCb', new Date().getTime() );
            +}
            +
            +
            cicErrorCb = function
            +
            发生错误时的回调, window变量域 +
            所有错误类型都会触发这个回调 +
            function cicErrorCb( _errType, _args ){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicErrorCb', _errType, new Date().getTime() );
            +}
            +
            +
            cicLoadErrorCb = function
            +
            图片加载错误时的回调, window变量域 +
            function cicLoadErrorCb( _imgUrl ){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicLoadErrorCb',_imgUrl, new Date().getTime() );
            +}
            +
            +
            cicSizeErrorCb = function
            +
            图片尺寸不符合设置要求时的回调, window变量域 +
            function cicSizeErrorCb( _width, _height, _imgUrl, _isMax ){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicSizeErrorCb', _width, _height, _imgUrl, _isMax, new Date().getTime() );
            +}
            +
            +
            cicPreviewSizeErrorCb = function
            +
            图片缩放后尺寸不符合设置要求时的回调, window变量域 +
            function cicPreviewSizeErrorCb( _width, _height, _imgUrl, _newSize ){
            +   var _ins = this, _selector = _ins.selector();
            +   JC.log( 'cicPreviewSizeErrorCb', _width, _height, _imgUrl, _newSize, new Date().getTime() );
            +}
            +
            +
            +
            +
            +

            Constructor

            +
            +

            JC.ImageCutter

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            + <table> + <tr> + <td> + <div class="js_compImageCutter" + imageUrl="data/uploads/h_1680x1050.jpg" + previewSelector="(tr div.js_previewItem" + coordinateSelector="(td input.js_coordinate" + imageUrlSelector="(td input.js_imageUrl" + cicCoordinateUpdateCb="cicCoordinateUpdateCb" + > + </div> + <input type="text" class="ipt js_coordinate" value="" /> + <input type="text" class="ipt js_imageUrl" value="" /> + </td> + <td> + <div class="cic_previewItem js_previewItem" style="width: 50px; height: 50px;"></div> + <div class="cic_previewItem js_previewItem" style="width: 75px; height: 75px;"></div> + <div class="cic_previewItem js_previewItem" style="width: 150px; height: 150px;"></div> + </td> + </tr> +</table> +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            + +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            _size

            +
            + (
              +
            • + _size +
            • +
            ) +
            + protected + +
            +

            设置拖动信息

            +
            +
            +

            Parameters:

            + +
            +
            +
            +

            clean

            + () + +
            +

            清除拖动的所有内容

            +
            +
            +
            +

            cleanInfo

            + () + static + +
            +

            清除拖动信息

            +
            +
            +
            +

            dragInfo

            +
            + (
              +
            • + _p +
            • +
            • + _evt +
            • +
            • + _size +
            • +
            • + _srcSelector +
            • +
            ) +
            + static + +
            +

            获取 拖动 的相关信息

            +
            +
            +

            Parameters:

            +
              +
            • + _p + ImageCutterInstance +
              +
              +
            • +
            • + _evt + Event +
              +
              +
            • +
            • + _size + Object +
              +
              +
            • +
            • + _srcSelector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of ImageCutterInstance + + static + +
            +

            初始化可识别的 ImageCutter 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of ImageCutterInstance: +
            +
            +
            +
            +

            moveDown

            + () + +
            +

            向下移动, 移动步长为 ImageCutter.moveStep 定义的步长

            +
            +
            +
            +

            moveLeft

            + () + +
            +

            向左移动, 移动步长为 ImageCutter.moveStep 定义的步长

            +
            +
            +
            +

            moveRight

            + () + +
            +

            向右移动, 移动步长为 ImageCutter.moveStep 定义的步长

            +
            +
            +
            +

            moveUp

            + () + +
            +

            向上移动, 移动步长为 ImageCutter.moveStep 定义的步长

            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            update

            +
            + (
              +
            • + _imgUrl +
            • +
            ) +
            + +
            +

            更新图片

            +
            +
            +

            Parameters:

            +
              +
            • + _imgUrl + String +
              +
              +
            • +
            +
            +
            +
            +

            updatePosition

            +
            + (
              +
            • + _size +
            • +
            ) +
            + +
            +

            更新拖动位置

            +
            +
            +

            Parameters:

            + +
            +
            +
            +
            +

            Properties

            +
            +

            _defaultCursor

            + String + protected + static + +
            +

            默认的 CSS cursor

            +
            +

            Default: auto

            +
            +
            +

            _positionPoint

            + Int + protected + static + +
            +

            进行坐标计算的偏移值

            +
            +

            Default: 10000

            +
            +
            +

            maxImageSidelength

            + Int + static + +
            +

            图片的最大边长

            +
            +
            +
            +

            minImageSidelength

            + Int + static + +
            +

            图片的最小边长

            +
            +

            Default: 50

            +
            +
            +

            minRectSidelength

            + Int + static + +
            +

            裁切范围的最小边长

            +
            +

            Default: 50

            +
            +
            +

            moveStep

            + Int + static + +
            +

            上下左右方向键移动的步长

            +
            +

            Default: 1

            +
            +
            +
            +

            Events

            +
            +

            CICDragDone

            + + +
            +

            拖动完成时触发的事件

            +
            +
            +
            +

            CICError

            + + +
            +

            发生错误时触发的事件

            +
            +
            +
            +

            CICImageLoad

            + + +
            +

            图片加载完毕时触发的事件

            +
            +
            +
            +

            CICImageLoadError

            + + +
            +

            图片加载失败时触发的事件

            +
            +
            +
            +

            CICInitPreview

            + + +
            +

            初始化预览时触发的事件

            +
            +
            +
            +

            CICPreviewError

            + + +
            +

            图片缩放后大小不符合要求时触发的事件

            +
            +
            +
            +

            CICSizeError

            + + +
            +

            图片大小不符合要求时触发的事件

            +
            +
            +
            +

            CICUpdateCoordinate

            + + +
            +

            更新坐标值时触发的事件

            +
            +
            +
            +

            CICUpdateDragger

            + + +
            +

            更新拖动块时触发的事件

            +
            +
            +
            +

            CICUpdatePreview

            + + +
            +

            更新预览时触发的事件

            +
            +
            +
            +

            ImageCutterInited

            + + +
            +

            初始化实例时触发的事件

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.LunarCalendar.Model.html b/docs_api/classes/JC.LunarCalendar.Model.html index 3d218e356..ac360bc52 100644 --- a/docs_api/classes/JC.LunarCalendar.Model.html +++ b/docs_api/classes/JC.LunarCalendar.Model.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -125,7 +166,7 @@

            Constructor

            @@ -221,7 +262,7 @@

            getDate

            @@ -253,7 +294,7 @@

            setDate

            @@ -282,7 +323,7 @@

            setSelectedDate

            @@ -292,7 +333,7 @@

            setSelectedDate

            Returns:

            Int: - 0/1 +

            0/1

            @@ -307,7 +348,7 @@

            _deftpl

            @@ -321,7 +362,7 @@

            _titleObj

            @@ -335,7 +376,7 @@

            container

            @@ -349,7 +390,7 @@

            date

            @@ -363,7 +404,7 @@

            dateObj

            @@ -376,7 +417,7 @@

            tpl

            @@ -394,7 +435,7 @@

            dom ready

            diff --git a/docs_api/classes/JC.LunarCalendar.View.html b/docs_api/classes/JC.LunarCalendar.View.html index 1dd4a6856..27f295ed3 100644 --- a/docs_api/classes/JC.LunarCalendar.View.html +++ b/docs_api/classes/JC.LunarCalendar.View.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -122,7 +163,7 @@

            Constructor

            @@ -195,7 +236,7 @@

            _init

            @@ -214,7 +255,7 @@

            _logic.initMonthDate

            @@ -245,7 +286,7 @@

            addTitle

            @@ -269,7 +310,7 @@

            hideControl

            @@ -288,7 +329,7 @@

            initLayout

            @@ -318,7 +359,7 @@

            initMonth

            @@ -348,7 +389,7 @@

            initYear

            @@ -375,7 +416,7 @@

            _model

            @@ -388,7 +429,7 @@

            layout

            diff --git a/docs_api/classes/JC.LunarCalendar.html b/docs_api/classes/JC.LunarCalendar.html index 02d8da1e3..72f23a0b4 100644 --- a/docs_api/classes/JC.LunarCalendar.html +++ b/docs_api/classes/JC.LunarCalendar.html @@ -3,11 +3,17 @@ JC.LunarCalendar - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,33 +147,46 @@

            APIs

            JC.LunarCalendar Class

            农历日历组件 -
            全局访问请使用 JC.LunarCalendar 或 LunarCalendar -
            DOM 加载完毕后 -, LunarCalendar会自动初始化页面所有具备识别符的日历, 目前可识别: div.jsLunarCalendar, td.jsLunarCalendar, li.js_LunarCalendar -
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 var ins = new JC.LunarCalendar( _selector );

            -

            - 初始化时, 如果日历是添加到某个selector里, 那么selector可以指定一些设置属性 -
            hidecontrol: 如果设置该属性, 那么日历将隐藏操作控件 -
            minvalue: 设置日历的有效最小选择范围, 格式YYYY-mm-dd -
            maxvalue: 设置日历的有效最大选择范围, 格式YYYY-mm-dd -
            nopreviousfestivals: 不显示上个月的节日 -
            nonextfestivals: 不显示下个月的节日 -

            -

            require: jQuery -
            require: window.cloneDate -
            require: window.parseISODate -
            require: window.maxDayOfMonth -
            require: window.isSameDay -
            require: window.isSameMonth +
            全局访问请使用 JC.LunarCalendar 或 LunarCalendar

            +

            require: + jQuery + , JC.BaseMVC

            JC Project Site | API docs | demo link

            +

            +DOM 加载完毕后 +
            会自动初始化页面可识别的node, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar +
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 JC.LunarCalendar.init( _selector ); +

            +

            可用的 HTML attribute

            +
            +
            clcDate = date string
            +
            设置日历的默认日期
            +
            minvalue = date string
            +
            设置日历的有效最小选择范围, 格式YYYY-mm-dd
            +
            maxvalue = date string
            +
            设置日历的有效最大选择范围, 格式YYYY-mm-dd
            +
            hidecontrol = bool, default = false
            +
            是否隐藏日历将操作控件
            +
            nopreviousfestivals = bool, default = false
            +
            不显示上个月的节日
            +
            nonextfestivals = bool, default = false
            +
            不显示下个月的节日
            +
            clcSelectedItemCb = function, window变量域
            +
            选择日期时触发的回调 +
            function clcSelectedItemCb1( _date, _td, _a ){
            +   var _ins = this;
            +   JC.log( _date );
            +}
            +
            +

            Constructor

            @@ -141,7 +195,7 @@

            JC.LunarCalendar

            (
            +
            +

            Events

            + +

            Methods

            @@ -324,7 +397,7 @@

            _init

            @@ -347,7 +420,7 @@

            comment

            @@ -390,7 +463,7 @@

            commentTitle

            @@ -426,7 +499,7 @@

            getAllDate

            @@ -436,8 +509,8 @@

            getAllDate

            Returns:

            Object: - { date: 默认时间, minvalue: 有效最小时间 - , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 } +

            { date: 默认时间, minvalue: 有效最小时间 + , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 }

            @@ -457,7 +530,7 @@

            getComment

            @@ -490,7 +563,7 @@

            getContainer

            @@ -499,7 +572,7 @@

            getContainer

            Returns:

            - selector +

            selector

            @@ -512,7 +585,7 @@

            getDate

            @@ -544,13 +617,13 @@

            getFestivals

            返回农历和国历的所在日期的所有节日 -
            假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 } -
            返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 }

            +
            假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 } +
            返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 }

            Parameters:

            @@ -574,7 +647,7 @@

            Parameters:

            Returns:

            - Object +

            Object

            @@ -594,7 +667,7 @@

            getItemByTimestamp

            @@ -616,7 +689,7 @@

            Parameters:

            Returns:

            Selector | Undefined: - td selector, 如果 td class unable 不可选, 将忽略 +

            td selector, 如果 td class unable 不可选, 将忽略

            @@ -629,7 +702,7 @@

            getLayout

            @@ -638,7 +711,7 @@

            getLayout

            Returns:

            - selector +

            selector

            @@ -651,7 +724,7 @@

            getSelectedDate

            @@ -674,7 +747,7 @@

            getSelectedDateGlobal

            @@ -698,7 +771,7 @@

            getSelectedItemGlobal

            @@ -709,7 +782,7 @@

            getSelectedItemGlobal

            Returns:

            Object | Undefined: - 如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td } +

            如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td }

            @@ -729,7 +802,7 @@

            gregorianToLunar

            @@ -764,7 +837,7 @@

            Parameters:

            Returns:

            - Object +

            Object

            @@ -784,7 +857,7 @@

            holiday

            @@ -810,6 +883,46 @@

            Parameters:

            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of LunarCalendarInstance + + static + +
            +

            初始化可识别的 LunarCalendar 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of LunarCalendarInstance: +
            +

            isComment

            @@ -827,7 +940,7 @@

            isComment

            @@ -860,7 +973,7 @@

            isHideControl

            @@ -869,7 +982,7 @@

            isHideControl

            Returns:

            - bool +

            bool

            @@ -889,7 +1002,7 @@

            isHoliday

            @@ -929,7 +1042,7 @@

            isWorkday

            @@ -973,7 +1086,7 @@

            JC.LunarCalendar.getFestival.intPad

            @@ -1011,7 +1124,7 @@

            nextMonth

            @@ -1024,12 +1137,60 @@

            nextYear

            显示下一年的日期

            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + + +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +

            preMonth

            @@ -1037,7 +1198,7 @@

            preMonth

            @@ -1050,12 +1211,51 @@

            preYear

            显示上一年的日期

            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            ) +
            + + + + +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +

            update

            @@ -1069,7 +1269,7 @@

            update

            @@ -1101,7 +1301,7 @@

            updateStatus

            @@ -1130,23 +1330,22 @@

            Parameters:

            Example:

             LunarCalendar.updateStatus(  {
            -                                       "1369843200": {
            -                                           "dayaction": 2,
            -                                           "comment": "dfdfgdsfgsdfgsdg<b></b>'\"'asdf\"\"'sdf"
            +                                       "1369843200": {
            +                                           "dayaction": 2,
            +                                           "comment": "dfdfgdsfgsdfgsdg<b></b>'\"'asdf\"\"'sdf"
                                                    },
            -                                       "1370966400": {
            -                                           "dayaction": 0,
            -                                           "comment": "asdfasdfsa"
            +                                       "1370966400": {
            +                                           "dayaction": 0,
            +                                           "comment": "asdfasdfsa"
                                                    },
            -                                       "1371139200": {
            -                                           "dayaction": 1
            +                                       "1371139200": {
            +                                           "dayaction": 1
                                                    },
            -                                       "1371225600": {
            -                                           "dayaction": 0,
            -                                           "comment": "dddd"
            +                                       "1371225600": {
            +                                           "dayaction": 0,
            +                                           "comment": "dddd"
                                                    }
            -                                   });
            -
            + });
            @@ -1166,7 +1365,7 @@

            workday

            @@ -1202,7 +1401,7 @@

            _model

            @@ -1215,7 +1414,7 @@

            _view

            @@ -1229,7 +1428,7 @@

            autoinit

            @@ -1244,7 +1443,7 @@

            commentSeparator

            @@ -1259,7 +1458,7 @@

            defaultYearSpan

            @@ -1274,7 +1473,7 @@

            tpl

            @@ -1282,6 +1481,22 @@

            tpl

            如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板

            Default: empty

            +
            +
            +
            +

            Events

            +
            +

            CLCSelectedItem

            + + +
            +

            选择日期时触发的事件

            +
            diff --git a/docs_api/classes/JC.NumericStepper.html b/docs_api/classes/JC.NumericStepper.html new file mode 100644 index 000000000..c4d7e7a0d --- /dev/null +++ b/docs_api/classes/JC.NumericStepper.html @@ -0,0 +1,767 @@ + + + + + JC.NumericStepper - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.NumericStepper Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            数值加减 +
            响应式初始化

            +

            require: + jQuery + , JC.common + , JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 (div|span) class="js_compNumericStepper"

            +

            可用的 HTML attribute

            +
            +
            cnsMinusButton = selector
            +
            减少数值的 selector
            +
            cnsPlusButton = selector
            +
            增加数值的 selector
            +
            cnsTarget = selector
            +
            目标文本框的 selector
            +
            cnsChangeCb = function
            +
            内容改变后的回调 +
            function cnsChangeCb( _newVal, _oldVal, _ins ){
            +   var _ipt = $(this);
            +   JC.log( 'cnsChangeCb: ', _newVal, _oldVal );
            +}
            +
            +
            cnsBeforeChangeCb = function
            +
            内容改变前的回调, 如果显式返回 false 将终止内容变更 +
            function cnsBeforeChangeCb( _newVal, _oldVal, _ins ){
            +   var _ipt = $(this);
            +   JC.log( 'cnsBeforeChangeCb: ', _newVal, _oldVal );
            +   if( _newVal > 5 ) return false;
            +}
            +
            +
            +

            textbox 可用的 HTML attribute

            +
            +
            minvalue = number
            +
            最小值
            +
            maxvalue = number
            +
            最大值
            +
            step = number, default = 1
            +
            每次变更的步长
            +
            fixed = int, default = 0
            +
            显示多少位小数点
            +
            +
            +
            +

            Constructor

            +
            +

            JC.NumericStepper

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <h2>JC.NumericStepper 示例</h2>
            +   <span class="js_compNumericStepper"
            +       cnsMinusButton="|button:first"
            +       cnsPlusButton="|button:last"
            +       cnsTarget="|input[type=text]"
            +       cnsChangeCb="cnsChangeCb"
            +       >
            +       <button type="button" class="cnsIcon cnsMinus"></button>
            +       <input type="text" value="0" class="ipt" minvalue="0" maxvalue="10" />
            +       <button type="button" class="cnsIcon cnsPlus"></button>
            +   </span>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Properties

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of NumericStepperInstance + + static + +
            +

            初始化可识别的 NumericStepper 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of NumericStepperInstance: +
            +
            +
            +
            +

            minus

            + () + +
            +

            减少一个 step

            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            plus

            + () + +
            +

            增加一个 step

            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +

            Properties

            +
            +

            redoMs

            + Ms + static + +
            +

            按下鼠标时 重复执行的频率

            +
            +

            Default: 100

            +
            +
            +

            timeoutMs

            + Ms + static + +
            +

            按下鼠标时 延迟 多少毫秒执行重复执行

            +
            +

            Default: 100

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Paginator.html b/docs_api/classes/JC.Paginator.html new file mode 100644 index 000000000..7d78125ff --- /dev/null +++ b/docs_api/classes/JC.Paginator.html @@ -0,0 +1,708 @@ + + + + + JC.Paginator - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.Paginator Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            Paginator 分页

            +

            实现的功能上一页,下一页,数字页,...显示页码,跳转到n页,每页显示n条记录,

            +

            + require: + JC.BaseMVC +

            +

            JC Project Site +| API docs +| demo link

            +

            +

            自动初始化.js_compPaginator下的table

            +

            可用的 HTML attribute

            +
            +
            paginatorui
            +
            css selector, 指定分页的模板内容将放到哪个容器里面
            +
            paginatorcontent
            +
            css selector, 指定取回来的数据将放到哪个容器里面
            +
            totalrecords
            +
            num, 共多少条记录,必填项
            +
            perpage
            +
            num, 每页显示多少条记录,默认10条
            +
            perpageitems
            +
            定义下拉框的option值,默认为[10,20,50]
            +
            midrange
            +
            num, default = 5。显示多少个数字页,超出的页将以...显示,比如一共有10页,那么显示前5页和最后一页,中间的以...显示
            +
            +
            +
            +

            Constructor

            +
            +

            JC.Paginator

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/Paginator/Paginator.js:2 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <div class="cafe-table js_compPaginator" paginatorcontent=".contents" paginatorui=".pages"  totalrecords="14" perpage="3" midrange="5">
            +       <table>
            +          在这里添加你要的数据
            +       </table>
            +       <div class="page pages">
            +       </div>
            +   </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + PaginatorInstance + + static +
            +

            + Defined in + ../comps/Paginator/Paginator.js:62 +

            +
            +
            +

            获取或设置 Paginator 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + PaginatorInstance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of PaginatorInstance + + static +
            +

            + Defined in + ../comps/Paginator/Paginator.js:77 +

            +
            +
            +

            初始化可识别的 Paginator 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of PaginatorInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Panel.Model.html b/docs_api/classes/JC.Panel.Model.html index 7ccbee082..cf3f8dbc1 100644 --- a/docs_api/classes/JC.Panel.Model.html +++ b/docs_api/classes/JC.Panel.Model.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -132,7 +173,7 @@

            Constructor

            @@ -231,7 +272,7 @@

            _init

            @@ -259,7 +300,7 @@

            addEvent

            @@ -300,7 +341,7 @@

            getEvent

            @@ -322,7 +363,7 @@

            Parameters:

            Returns:

            Array: - 某类事件类型的所有回调 +

            某类事件类型的所有回调

            @@ -336,7 +377,7 @@

            _events

            @@ -349,7 +390,7 @@

            bodys

            @@ -363,7 +404,7 @@

            footers

            @@ -377,7 +418,7 @@

            headers

            @@ -391,7 +432,7 @@

            panel

            @@ -404,7 +445,7 @@

            selector

            diff --git a/docs_api/classes/JC.Panel.View.html b/docs_api/classes/JC.Panel.View.html index 4aa51d957..4999f1425 100644 --- a/docs_api/classes/JC.Panel.View.html +++ b/docs_api/classes/JC.Panel.View.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -171,7 +212,7 @@

            _init

            @@ -184,7 +225,7 @@

            center

            @@ -197,7 +238,7 @@

            close

            @@ -210,7 +251,7 @@

            focus button

            @@ -232,7 +273,7 @@

            getBody

            @@ -252,7 +293,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -271,7 +312,7 @@

            getFooter

            @@ -291,7 +332,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -310,7 +351,7 @@

            getHeader

            @@ -330,7 +371,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -343,7 +384,7 @@

            getPanel

            @@ -352,7 +393,7 @@

            getPanel

            Returns:

            - selector +

            selector

            @@ -362,7 +403,7 @@

            hide

            @@ -381,7 +422,7 @@

            positionWith

            @@ -405,7 +446,7 @@

            show

            @@ -421,7 +462,7 @@

            _model

            diff --git a/docs_api/classes/JC.Panel.html b/docs_api/classes/JC.Panel.html index a15baf125..93726e9d9 100644 --- a/docs_api/classes/JC.Panel.html +++ b/docs_api/classes/JC.Panel.html @@ -3,11 +3,17 @@ JC.Panel - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,16 +147,18 @@

            APIs

            JC.Panel Class

            弹出层基础类 JC.Panel

            +

            require: + JC.common +

            JC Project Site | API docs | demo link

            -

            require: jQuery

            -

            Panel Layout 可用的 html attribute

            +

            Panel Layout 可用的 html attribute

            panelclickclose = bool
            点击 Panel 外时, 是否关闭 panel
            @@ -143,23 +186,23 @@

            a, button 可用的 html attribute( 自动生成弹框)

            panelcallback = function
            点击确定按钮的回调, window 变量域 -function( _evtName, _panelIns ){ +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -} +}
            panelcancelcallback = function
            点击取消按钮的回调, window 变量域 -function( _evtName, _panelIns ){ +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -} +}
            panelclosecallback = function
            弹框关闭时的回调, window 变量域 -function( _evtName, _panelIns ){ +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -} +}
            panelbutton = int, default = 0
            @@ -188,6 +231,10 @@

            a, button 可用的 html attribute( 自动生成弹框)

            是否隐藏关闭按钮
            类型为 panel, dialog 时生效
            +
            panelfixed = bool, default = false
            +
            + 显示 panel 时, 是否居中显示 +
            @@ -213,7 +260,7 @@

            JC.Panel

            @@ -254,24 +301,23 @@

            Parameters:

            Example:

            -
                   <script src="../../../lib.js"></script>
            -       <script>JC.use( 'Panel' ); </script>
            +                
                   <script src="../../../lib.js"></script>
            +       <script src="../../../config.js"></script>
                    <script>
                        var btnstr = [
            -               '<div style="text-align:center" class="UButton">'
            -               , '<button type="button" eventtype="confirm">确定</button>'
            -               , '<button type="button" eventtype="cancel">取消</button>\n'
            -               , '</div>'
            -           ].join('');
            -           $(document).ready( function(_evt){
            -               tmpPanel = new JC.Panel( '默认panel', '<h2>test content</h2>' + btnstr, 'test footer');
            -               tmpPanel.on('close', function(_evt, _panel){
            -                   JC.log('user close evnet');
            +               '<div style="text-align:center" class="UButton">'
            +               , '<button type="button" eventtype="confirm">确定</button>'
            +               , '<button type="button" eventtype="cancel">取消</button>\n'
            +               , '</div>'
            +           ].join('');
            +           requirejs( [ 'JC.Panel' ], function(){
            +               tmpPanel = new JC.Panel( '默认panel', '<h2>test content</h2>' + btnstr, 'test footer');
            +               tmpPanel.on('close', function(_evt, _panel){
            +                   JC.log('user close evnet');
                            });
                            tmpPanel.show( 0 );
                        });
            -       </script>
            -
            + </script>
            @@ -383,6 +429,10 @@

            Properties

            clickClose static +
          • + FIXED + static +
          • focusButton static @@ -450,7 +500,7 @@

            _fixWidth

            @@ -501,7 +551,7 @@

            _getButton

            @@ -527,7 +577,7 @@

            _init

            @@ -546,7 +596,7 @@

            autoClose

            @@ -579,7 +629,7 @@

            body

            @@ -600,7 +650,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -610,7 +660,7 @@

            center

            @@ -629,7 +679,7 @@

            clickClose

            @@ -653,7 +703,7 @@

            close

            @@ -667,7 +717,7 @@

            dispose

            @@ -690,7 +740,7 @@

            find

            @@ -711,7 +761,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -721,7 +771,7 @@

            focusButton

            @@ -745,7 +795,7 @@

            footer

            @@ -767,7 +817,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -787,7 +837,7 @@

            getInstance

            @@ -827,7 +877,7 @@

            header

            @@ -849,7 +899,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -859,7 +909,7 @@

            hide

            @@ -876,7 +926,7 @@

            isClickClose

            @@ -885,7 +935,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -898,7 +948,7 @@

            layout

            @@ -926,7 +976,7 @@

            on

            @@ -958,16 +1008,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -986,7 +1035,7 @@

            panel

            @@ -1007,7 +1056,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -1026,7 +1075,7 @@

            positionWith

            @@ -1060,7 +1109,7 @@

            selector

            @@ -1086,7 +1135,7 @@

            show

            @@ -1112,8 +1161,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -1132,7 +1180,7 @@

            trigger

            @@ -1161,9 +1209,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -1182,7 +1229,7 @@

            triggerSelector

            @@ -1216,7 +1263,7 @@

            _model

            @@ -1229,7 +1276,7 @@

            _view

            @@ -1242,7 +1289,7 @@

            autoCloseMs

            @@ -1258,13 +1305,28 @@

            clickClose

            页面点击时, 是否自动关闭 Panel

            Default: true

            +
            +
            +

            FIXED

            + Bool + static + +
            +

            显示Panel时, 是否 fixed 居中

            +
            +

            Default: false

            focusButton

            @@ -1273,7 +1335,7 @@

            focusButton

            @@ -1291,7 +1353,7 @@

            beforecenter

            @@ -1301,8 +1363,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1312,7 +1373,7 @@

            beforeclose

            @@ -1322,11 +1383,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1336,7 +1396,7 @@

            beforehide

            @@ -1346,8 +1406,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1357,7 +1416,7 @@

            beforeshow

            @@ -1367,8 +1426,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1378,7 +1436,7 @@

            cancel

            @@ -1387,11 +1445,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1401,7 +1458,7 @@

            center

            @@ -1410,8 +1467,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1421,7 +1477,7 @@

            close

            @@ -1430,11 +1486,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1444,7 +1499,7 @@

            confirm

            @@ -1453,11 +1508,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1467,7 +1521,7 @@

            hide

            @@ -1477,8 +1531,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1488,7 +1541,7 @@

            show

            @@ -1497,8 +1550,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/JC.Placeholder.html b/docs_api/classes/JC.Placeholder.html index 73f71ded7..ca0a941e5 100644 --- a/docs_api/classes/JC.Placeholder.html +++ b/docs_api/classes/JC.Placeholder.html @@ -3,11 +3,17 @@ JC.Placeholder - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            Placeholder 占位符提示功能

            +

            + require: + JC.BaseMVC +

            JC Project Site | API docs | demo link

            -

            require: jQuery

            Constructor

            @@ -133,7 +177,7 @@

            JC.Placeholder

            @@ -183,6 +227,12 @@

            Methods

            init static
          • +
          • + notification +
          • +
          • + notificationHandler +
          • on
          • @@ -192,6 +242,9 @@

            Methods

          • trigger
          • +
          • + triggerHandler +
          • update
          • @@ -224,7 +277,7 @@

            _beforeInit

            @@ -244,7 +297,7 @@

            _init

            @@ -269,7 +322,7 @@

            _inited

            @@ -283,7 +336,7 @@

            _initHanlderEvent

            @@ -306,7 +359,7 @@

            getInstance

            @@ -346,7 +399,7 @@

            init

            @@ -369,6 +422,95 @@

            Returns:

            Array of PlaceholderInstance:
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +

            on

            @@ -388,7 +530,7 @@

            on

            @@ -414,7 +556,7 @@

            Parameters:

            Returns:

            - BaseMVCInstance +

            BaseMVCInstance

            @@ -427,7 +569,7 @@

            selector

            @@ -436,7 +578,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -447,6 +589,9 @@

            trigger

          • _evtName
          • +
          • + _args +
          • )
            @@ -455,11 +600,59 @@

            trigger

            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            -

            使用 jquery trigger 绑定事件

            +

            使用 jquery triggerHandler 触发绑定事件

            Parameters:

            @@ -470,12 +663,18 @@

            Parameters:

            +
          • + _args + | Array +
            +
            +
          • Returns:

            - BaseMVCInstance + :
            @@ -485,7 +684,7 @@

            update

            @@ -499,11 +698,11 @@

            update

            -

            更新所有 placeholder 实现的状态

            +

            更新所有 placeholder 的状态

            @@ -516,7 +715,7 @@

            className

            @@ -531,7 +730,7 @@

            isSupport

            diff --git a/docs_api/classes/JC.PopTips.html b/docs_api/classes/JC.PopTips.html new file mode 100644 index 000000000..3d21f1efa --- /dev/null +++ b/docs_api/classes/JC.PopTips.html @@ -0,0 +1,797 @@ + + + + + JC.PopTips - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.PopTips Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            PopTips 带箭头的气泡提示框功能

            +

            + require: + JC.BaseMVC +

            +

            JC Project Site +| API docs +| demo link

            +

            页面只要引用本文件, 默认会自动初始化span|em|a|b为class="js_compPoptips"的提示气泡

            +

            +

            可用的 HTML attribute

            +
            +
            htmlContent
            +
            +

            声明气泡提示的内容支持脚本模板
            + 如果有设置该属性那么会优先选用htmlContent提供的内容 +

            +
            +
            ajaxContent
            +
            +

            声明气泡提示的ajax 模板

            +
            +
            content = string
            +
            +

            声明气泡提示的内容,如果需要提示html内容那么用htmlContent属性
            + 如果没有设置则去查找title属性,如果title也没有设置,
            + 则将触发元素的text作为提示内容。

            +
            +
            theme = yellow | blue | white | green, 查看
            +
            + 气泡主题,提供黄色、蓝色、白色、绿色四种样式,默认为 yellow. +

            yellow:黄色
            + blue:蓝色
            + white:白色
            + green:绿色

            +
            +
            triggerType = hover | click
            +
            + 触发方式: 支持hover和click +

            默认为hover

            +
            +
            arrowPosition = left | right | top | bottom
            +
            + 声明箭头的方向,默认值为left +

            left:箭头向左(提示框在触发元素的右边)如果右边空间不够,提示框自动显示在左边,如果左边空间不够,提示框显示在上方,如果上方空间,提示框显示到下方
            + right:箭头向右(提示框在触发元素的左边)如果左边空间不够,提示框自动显示在右边,如果右边空间不够,提示框显示在上方,如果上方空间,提示框显示到下方
            + top:箭头向上(提示框在触发元素的下边)如果下边不够,提示框自动显示到上边
            + bottom:箭头向下(提示框在触发元素的上边)如果上边不够,提示框自动显示到下边


            +
            arrowPositionOffset = left | right | top , 查看
            +
            + 声明箭头在提示框的位置,默认居中 +

            如果arrowPosition = left | right, arrowPositionOffset可以设置为top

            +

            如果arrowPosition = top | bottom, arrowPositionOffset可以设置为left | right

            +
            +
            offsetXY = num,num
            +
            + 声明提示框相对于当前位置的偏移位置(x 坐标,y 坐标),默认值为0 +

            x < 0,往左偏移,x > 0 往右偏移
            + y < 0, 往上偏移,y > 0 往下偏移
            + 两个数值以逗号分隔,如果只写一个值表示 y 坐标为0。

            +
            +
            popTipsWidth = num
            +
            + 声明提示框的宽度,默认自适应 +
            +
            popTipsHeight = num
            +
            + 声明提示框的高度,默认自适应 +
            +
            popTipsMinWidth= num, default = auto
            +
            + 声明提示框的最小宽度,默认自适应 +
            +
            popTipsMinHeight = num, default = auto
            +
            + 声明提示框的最小高度,默认自适应 +
            +
            beforeShowCallback = function
            +
            + 气泡显示前, 触发的回调, window 变量域 +
            function beforeShowCallback( _selector ){
            +   var _ins = this;
            +   JC.log( 'beforeShowCallback', new Date().getTime() );
            +}
            +
            +
            afterHideCallback = function
            +
            + 气泡隐藏后, 触发的回调, window 变量域 +
            function afterHideCallback( _selector ){
            +   var _ins = this;
            +   JC.log( 'afterHideCallback', new Date().getTime() );
            +}
            +
            +
            +
            +
            +

            Constructor

            +
            +

            JC.PopTips

            +
            + (
              +
            • + _selector +
            • +
            ) +
            +
            +

            + Defined in + ../comps/PopTips/PopTips.js:2 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
            <span class="js_compPopTips" style="margin-top:50px; margin-left:200px; display:inline-block;"  
            +    content="1.这个tip显示在右边<br>2.古希腊学者亚里士多<br>3.古希腊学者亚里士多<br>4.古希腊学者亚里士多"  
            +    theme="yellow" 
            +    arrowposition="left"
            +    triggerType="click"
            +    >
            +    <span>古希腊学者亚里士多德曾编<br>
            +        写过全面讲述当时学问的讲义,<br>
            +        被西方奉为“百科全书之父”,<br>
            +        中国汉朝初年的《尔雅》,<br>
            +        是中国百科全书性质著作的渊源。</span>
            +</span>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + PopTipsInstance + + static +
            +

            + Defined in + ../comps/PopTips/PopTips.js:154 +

            +
            +
            +

            获取或设置 PopTips 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + PopTipsInstance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of PopTipsInstance + + static +
            +

            + Defined in + ../comps/PopTips/PopTips.js:169 +

            +
            +
            +

            初始化可识别的 PopTips 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of PopTipsInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            update

            + () +
            +

            + Defined in + ../comps/PopTips/PopTips.js:314 +

            +
            +
            +

            更新 PopTips 状态

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.ServerSort.html b/docs_api/classes/JC.ServerSort.html new file mode 100644 index 000000000..85e1c3cb9 --- /dev/null +++ b/docs_api/classes/JC.ServerSort.html @@ -0,0 +1,709 @@ + + + + + JC.ServerSort - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.ServerSort Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            数据库全表排序逻辑

            +

            require: + JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 [div|tr] class="js_compServerSort"

            +

            可用的 HTML attribute

            +
            +
            cssUrl = url, default = location.href
            +
            要翻页的URL
            +
            cssSortName = string, default = sortby
            +
            排序的字段名
            +
            cssTypeName = string, default = sorttype
            +
            排序的类型名: desc, asc
            +
            cssItems = selector, default = |a[sortName]
            +
            排序的具体字段选择器
            +
            cssTypeEnum = string, default = desc,asc
            +
            排序的种类
            +
            cssClassEnum = string, default = js_cssDesc,js_cssAsc
            +
            显示排序样式的 CSS class
            +
            cssCurClassEnum= string, default = js_cssDesc_cur,js_cssAsc_cur
            +
            显示当前排序字段样式的 CSS class
            +
            cssResetUrlParams = string, default=page
            +
            页面跳转时, 要重置的 URL 参数
            +
            cssUrlFilter = function, window 变量域
            +
            页面跳转前, 过滤 url 的回调 +
            function urlFilter( _url ){
            +   _url = JC.f.addUrlParams( _url, { rnd: JC.f.ts() } );
            +   return _url;
            +}
            +
            +
            cssDefaultSortName = string, default = first item[sortName]
            +
            默认排序字段
            +
            cssDefaultType = string, default = desc
            +
            默认排序类型
            +
            +
            +
            +

            Constructor

            +
            +

            JC.ServerSort

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <table class="data-table" width="90%">
            +       <thead>
            +           <tr class="js_compServerSort"
            +               cssUrl="URL"
            +               cssSortName="sortby"
            +               cssTypeName="sorttype"
            +               cssItems="|a[sortName]"
            +               cssTypeEnum="desc,asc"
            +               cssClassEnum="js_cssDesc,js_cssAsc"
            +               cssCurClassEnum="js_cssDesc_cur,js_cssAsc_cur"
            +               cssResetUrlParams="pz,page"
            +               cssUrlFilter="urlFilter"
            +               >
            +               <th><a href="javascript:;" sortName="order">序号</a></th>
            +               <th><a href="javascript:;" sortName="keyword">关键词</a></th>
            +               <th><a href="javascript:;" sortName="dpv">日均PV</a></th>
            +               <th><a href="javascript:;" sortName="irate">行业添加率</a></th>
            +               <th><a href="javascript:;" sortName="dprice">平均出价</a></th>
            +               <th><a href="javascript:;" sortName="drate">日均点击率</a></th>
            +           </tr>
            +       </thead>
            +       <tbody>
            +           <tr>
            +               <td>2</td>
            +               <td>关键词</td>
            +               <td>1000</td>
            +               <td>1000</td>
            +               <td>20.00</td>
            +               <td>3000</td>
            +           </tr>
            +           <tr class="even">
            +               <td>1</td>
            +               <td>关键词</td>
            +               <td>1000</td>
            +               <td>1000</td>
            +               <td>20.00</td>
            +               <td>3000</td>
            +           </tr>
            +       </tbody>
            +   </table>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of ServerSortInstance + + static + +
            +

            初始化可识别的 ServerSort 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of ServerSortInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Slider.Model.html b/docs_api/classes/JC.Slider.Model.html index 5e7a2c036..87761acab 100644 --- a/docs_api/classes/JC.Slider.Model.html +++ b/docs_api/classes/JC.Slider.Model.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -122,7 +163,7 @@

            Constructor

            @@ -274,7 +315,7 @@

            _init

            @@ -295,7 +336,7 @@

            automove

            @@ -304,7 +345,7 @@

            automove

            Returns:

            - bool +

            bool

            @@ -317,7 +358,7 @@

            automovems

            @@ -326,7 +367,7 @@

            automovems

            Returns:

            - int +

            int

            @@ -339,7 +380,7 @@

            automoveNewPointer

            @@ -348,7 +389,7 @@

            automoveNewPointer

            Returns:

            - int +

            int

            @@ -358,7 +399,7 @@

            clearInterval

            @@ -371,7 +412,7 @@

            clearTimeout

            @@ -393,7 +434,7 @@

            controlover

            @@ -413,7 +454,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -426,7 +467,7 @@

            defaultpage

            @@ -435,7 +476,7 @@

            defaultpage

            Returns:

            - int +

            int

            @@ -448,7 +489,7 @@

            direction

            @@ -458,7 +499,7 @@

            direction

            Returns:

            - string +

            string

            @@ -471,7 +512,7 @@

            durationms

            @@ -480,7 +521,7 @@

            durationms

            Returns:

            - int +

            int

            @@ -499,7 +540,7 @@

            fixpointer

            @@ -519,7 +560,7 @@

            Parameters:

            Returns:

            - int +

            int

            @@ -532,7 +573,7 @@

            height

            @@ -541,7 +582,7 @@

            height

            Returns:

            - int +

            int

            @@ -554,7 +595,7 @@

            howmanyitem

            @@ -563,7 +604,7 @@

            howmanyitem

            Returns:

            - int +

            int

            @@ -576,7 +617,7 @@

            initedcb

            @@ -585,7 +626,7 @@

            initedcb

            Returns:

            - function|undefined +

            function|undefined

            @@ -604,7 +645,7 @@

            interval

            @@ -624,7 +665,7 @@

            Parameters:

            Returns:

            - interval +

            interval

            @@ -637,7 +678,7 @@

            itemheight

            @@ -646,7 +687,7 @@

            itemheight

            Returns:

            - int +

            int

            @@ -659,7 +700,7 @@

            itemwidth

            @@ -668,7 +709,7 @@

            itemwidth

            Returns:

            - int +

            int

            @@ -681,7 +722,7 @@

            layout

            @@ -690,7 +731,7 @@

            layout

            Returns:

            - selector +

            selector

            @@ -703,7 +744,7 @@

            leftbutton

            @@ -712,7 +753,7 @@

            leftbutton

            Returns:

            - selector +

            selector

            @@ -725,7 +766,7 @@

            loop

            @@ -734,7 +775,7 @@

            loop

            Returns:

            - bool +

            bool

            @@ -753,7 +794,7 @@

            moveDirection

            @@ -774,7 +815,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -793,7 +834,7 @@

            newpointer

            @@ -814,7 +855,7 @@

            Parameters:

            Returns:

            - int +

            int

            @@ -833,7 +874,7 @@

            page

            @@ -853,7 +894,7 @@

            Parameters:

            Returns:

            - array +

            array

            @@ -872,7 +913,7 @@

            pointer

            @@ -892,7 +933,7 @@

            Parameters:

            Returns:

            - int +

            int

            @@ -905,7 +946,7 @@

            rightbutton

            @@ -914,7 +955,7 @@

            rightbutton

            Returns:

            - selector +

            selector

            @@ -927,7 +968,7 @@

            stepms

            @@ -936,7 +977,7 @@

            stepms

            Returns:

            - int +

            int

            @@ -949,7 +990,7 @@

            subitems

            @@ -958,7 +999,7 @@

            subitems

            Returns:

            - selector +

            selector

            @@ -977,7 +1018,7 @@

            timeout

            @@ -997,7 +1038,7 @@

            Parameters:

            Returns:

            - timeout +

            timeout

            @@ -1010,7 +1051,7 @@

            totalpage

            @@ -1020,7 +1061,7 @@

            totalpage

            Returns:

            - int +

            int

            @@ -1033,7 +1074,7 @@

            width

            @@ -1042,7 +1083,7 @@

            width

            Returns:

            - int +

            int

            @@ -1056,7 +1097,7 @@

            _interval

            @@ -1070,7 +1111,7 @@

            _layout

            @@ -1084,7 +1125,7 @@

            _moveDirection

            @@ -1100,7 +1141,7 @@

            _timeout

            diff --git a/docs_api/classes/JC.Slider.html b/docs_api/classes/JC.Slider.html index 4b49fb920..e8046ed51 100644 --- a/docs_api/classes/JC.Slider.html +++ b/docs_api/classes/JC.Slider.html @@ -3,11 +3,17 @@ JC.Slider - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -112,11 +153,14 @@

            JC.Slider Class

            Slider 划动菜单类
            页面加载完毕后, Slider 会查找那些有 class = js_autoSlider 的标签进行自动初始化

            -

            requires: jQuery

            -

            JC Project Site +

            require: + jQuery + , JC.common +

            +

            JC Project Site | API docs -| demo link

            -

            可用的 html attribute

            +| demo link

            +

            可用的 html attribute

            slidersubitems
            指定具体子元素是那些, selector ( 子元素默认是 layout的子标签 )
            @@ -192,51 +236,51 @@

            Example:

            height: 230px; } </style> - <link href='../../Slider/res/hslider/style.css' rel='stylesheet' /> - <script src="../../../lib.js"></script> + <link href='../../Slider/res/hslider/style.css' rel='stylesheet' /> + <script src="../../../lib.js"></script> + <script src="../../../config.js"></script> <script> JC.debug = true; - JC.use( 'Slider' ); + requirejs( [ 'JC.Slider' ] ); function sliderinitedcb(){ var _sliderIns = this; - JC.log( 'sliderinitedcb', new Date().getTime() ); - _sliderIns.on('outmin', function(){ - JC.log( 'slider outmin' ); - }).on('outmax', function(){ - JC.log( 'slider outmax' ); - }).on('movedone', function( _evt, _oldpointer, _newpointer){ - JC.log( 'slider movedone', _evt, _oldpointer, _newpointer ); - }).on('beforemove', function( _evt, _oldpointer, _newpointer ){ - JC.log( 'slider beforemove', _evt, _oldpointer, _newpointer ); + JC.log( 'sliderinitedcb', new Date().getTime() ); + _sliderIns.on('outmin', function(){ + JC.log( 'slider outmin' ); + }).on('outmax', function(){ + JC.log( 'slider outmax' ); + }).on('movedone', function( _evt, _oldpointer, _newpointer){ + JC.log( 'slider movedone', _evt, _oldpointer, _newpointer ); + }).on('beforemove', function( _evt, _oldpointer, _newpointer ){ + JC.log( 'slider beforemove', _evt, _oldpointer, _newpointer ); }); } </script> - <table class="hslide_wra"> + <table class="hslide_wra"> <tr> - <td class="hslide_left"> - <a href="javascript:" hidefocus="true" style="outline:none;" class="js_slideleft">左边滚动</a> + <td class="hslide_left"> + <a href="javascript:" hidefocus="true" style="outline:none;" class="js_slideleft">左边滚动</a> </td> - <td class="hslide_mid"> + <td class="hslide_mid"> <dl - style="width:820px; height: 230px; margin:0 5px;" - class="hslide_list clearfix js_slideList js_autoSlider" - slidersubitems="> dd" sliderleft="a.js_slideleft" sliderright="a.js_slideright" - sliderwidth="820" slideritemwidth="160" - sliderdirection="horizontal" sliderhowmanyitem="5" - sliderloop="false" sliderdurationms="300" - sliderinitedcb="sliderinitedcb" + style="width:820px; height: 230px; margin:0 5px;" + class="hslide_list clearfix js_slideList js_autoSlider" + slidersubitems="> dd" sliderleft="a.js_slideleft" sliderright="a.js_slideright" + sliderwidth="820" slideritemwidth="160" + sliderdirection="horizontal" sliderhowmanyitem="5" + sliderloop="false" sliderdurationms="300" + sliderinitedcb="sliderinitedcb" > - <dd style="display: block; left: 0; " class="tipsItem">content...</dd> - <dd style="display: block; left: 0; " class="tipsItem">content...</dd> - <dd style="display: block; left: 0; " class="tipsItem">content...</dd> + <dd style="display: block; left: 0; " class="tipsItem">content...</dd> + <dd style="display: block; left: 0; " class="tipsItem">content...</dd> + <dd style="display: block; left: 0; " class="tipsItem">content...</dd> </dl> </td> - <td class="hslide_right"> - <a href="javascript:" hidefocus="true" style="outline:none;" class="js_slideright">右边滚动</a> + <td class="hslide_right"> + <a href="javascript:" hidefocus="true" style="outline:none;" class="js_slideright">右边滚动</a> </td> </tr> - </table> - + </table>
            @@ -343,7 +387,7 @@

            _init

            @@ -352,7 +396,7 @@

            _init

            Returns:

            - bool +

            bool

            @@ -366,7 +410,7 @@

            _initAutoMove

            @@ -376,7 +420,7 @@

            _initAutoMove

            Returns:

            - SliderInstance +

            SliderInstance

            @@ -395,7 +439,7 @@

            find

            @@ -415,7 +459,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -438,7 +482,7 @@

            getInstance

            @@ -464,7 +508,7 @@

            Parameters:

            Returns:

            - SliderInstance +

            SliderInstance

            @@ -484,7 +528,7 @@

            init

            @@ -504,7 +548,7 @@

            Parameters:

            Returns:

            - array +

            array

            @@ -524,7 +568,7 @@

            isSlider

            @@ -544,7 +588,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -557,7 +601,7 @@

            layout

            @@ -566,7 +610,7 @@

            layout

            Returns:

            - selector +

            selector

            @@ -585,7 +629,7 @@

            move

            @@ -606,7 +650,7 @@

            Parameters:

            Returns:

            - SliderInstance +

            SliderInstance

            @@ -625,7 +669,7 @@

            moveTo

            @@ -645,7 +689,7 @@

            Parameters:

            Returns:

            - SliderInstance +

            SliderInstance

            @@ -667,7 +711,7 @@

            on

            @@ -694,7 +738,7 @@

            Parameters:

            Returns:

            - SliderInstance +

            SliderInstance

            @@ -713,7 +757,7 @@

            page

            @@ -733,7 +777,7 @@

            Parameters:

            Returns:

            - array +

            array

            @@ -746,7 +790,7 @@

            pointer

            @@ -755,7 +799,7 @@

            pointer

            Returns:

            - int +

            int

            @@ -768,7 +812,7 @@

            totalpage

            @@ -777,7 +821,7 @@

            totalpage

            Returns:

            - int +

            int

            @@ -796,7 +840,7 @@

            trigger

            @@ -817,7 +861,7 @@

            Parameters:

            Returns:

            - SliderInstance +

            SliderInstance

            @@ -831,7 +875,7 @@

            autoInit

            @@ -848,7 +892,7 @@

            beforemove

            @@ -860,7 +904,7 @@

            inited

            @@ -872,7 +916,7 @@

            movedone

            @@ -884,7 +928,7 @@

            outmax

            @@ -896,7 +940,7 @@

            outmin

            diff --git a/docs_api/classes/JC.StepControl.html b/docs_api/classes/JC.StepControl.html new file mode 100644 index 000000000..cb9bf7795 --- /dev/null +++ b/docs_api/classes/JC.StepControl.html @@ -0,0 +1,646 @@ + + + + + JC.StepControl - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.StepControl Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            组件用途简述

            +

            require: + jQuery + , JC.Valid +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会处理 div class="js_compStepControl"

            +

            可用的 HTML attribute

            +
            +
            +
            +
            +
            +
            +

            Constructor

            +
            +

            JC.StepControl

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <h2>JC.StepControl 示例</h2>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of StepControlInstance + + static + +
            +

            初始化可识别的 StepControl 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of StepControlInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Suggest.html b/docs_api/classes/JC.Suggest.html index b5fa0a146..5096f968c 100644 --- a/docs_api/classes/JC.Suggest.html +++ b/docs_api/classes/JC.Suggest.html @@ -3,11 +3,17 @@ JC.Suggest - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,16 +147,18 @@

            APIs

            JC.Suggest Class

            Suggest 关键词补全提示类

            -

            requires: jQuery

            -

            JC Project Site +

            require: + JC.BaseMVC +

            +

            JC Project Site | API docs -| demo link

            -

            可用的 HTML attribute

            +| demo link

            +

            可用的 HTML attribute

            sugwidth: int
            显示列表的宽度
            @@ -133,10 +176,10 @@

            可用的 HTML attribute

            sugurl: string
            数据请求 URL API -
            例: http://sug.so.360.cn/suggest/word?callback={1}&encodein=utf-8&encodeout=utf-8&word={0} +
            例: http://sug.so.360.cn/suggest/word?callback={1}&encodein=utf-8&encodeout=utf-8&word={0}
            {0}=关键词, {1}=回调名称
            -
            sugqueryinterval: int, default = 200
            +
            sugqueryinterval: int, default = 300
            设置用户输入内容时, 响应的间隔, 避免不必要的请求
            @@ -166,6 +209,10 @@

            可用的 HTML attribute

            声明自动定位时, 显示位置的占位符标签
            sugprevententer: bool, default = false
            回车时, 是否阻止默认事件, 为真将阻止表单提交事件
            +
            sugIdSelector = selector
            +
            + 保存 id 的选择器( 只有关键词为 json格式的时候才会生效, { id: 'string', name: 'string' } ) +
            @@ -182,7 +229,7 @@

            JC.Suggest

            @@ -198,11 +245,6 @@

            Parameters:

            -
            -

            Example:

            -
            -
            -
            @@ -312,7 +354,7 @@

            _hideOther

            @@ -349,7 +391,7 @@

            getInstance

            @@ -388,7 +430,7 @@

            hide

            @@ -397,7 +439,7 @@

            hide

            Returns:

            - SuggestInstance +

            SuggestInstance

            @@ -417,7 +459,7 @@

            isSuggest

            @@ -437,7 +479,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -450,7 +492,7 @@

            layout

            @@ -459,7 +501,7 @@

            layout

            Returns:

            - selector +

            selector

            @@ -481,7 +523,7 @@

            on

            @@ -507,7 +549,7 @@

            Parameters:

            Returns:

            - SuggestInstance +

            SuggestInstance

            @@ -520,7 +562,7 @@

            selector

            @@ -529,7 +571,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -542,7 +584,7 @@

            show

            @@ -551,7 +593,7 @@

            show

            Returns:

            - SuggestInstance +

            SuggestInstance

            @@ -570,7 +612,7 @@

            trigger

            @@ -590,7 +632,7 @@

            Parameters:

            Returns:

            - SuggestInstance +

            SuggestInstance

            @@ -605,7 +647,7 @@

            _allIns

            @@ -620,7 +662,7 @@

            autoInit

            @@ -635,7 +677,7 @@

            dataFilter

            @@ -650,7 +692,7 @@

            layoutTpl

            @@ -665,7 +707,7 @@

            layoutTpl

            @@ -682,7 +724,7 @@

            SuggestBeforeShow

            @@ -695,7 +737,7 @@

            SuggestInited

            @@ -708,7 +750,7 @@

            SuggestShow

            @@ -721,7 +763,7 @@

            SuggestUpdate

            @@ -734,7 +776,7 @@

            SuggestUpdated

            diff --git a/docs_api/classes/JC.Tab.Model.html b/docs_api/classes/JC.Tab.Model.html deleted file mode 100644 index 176e9cf9d..000000000 --- a/docs_api/classes/JC.Tab.Model.html +++ /dev/null @@ -1,911 +0,0 @@ - - - - - - - - - - - -
            -
            -
            -

            -
            -
            - API Docs for: 0.1 -
            -
            -
            - -
            -
            - Show: - - - - -
            -
            -
            -
            -
            -
            - Defined in: ../comps/Tab/Tab.js:304 -
            -
            -
            -

            Tab 数据模型类

            -
            -
            -

            Constructor

            -
            - (
              -
            • - _selector -
            • -
            • - _triggerTarget -
            • -
            ) -
            -
            -

            - Defined in - ../comps/Tab/Tab.js:304 -

            -
            -
            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector | String -
              -

              要初始化的 Tab 选择器

              -
              -
            • -
            • - _triggerTarget - Selector | String -
              -

              初始完毕后要触发的 label

              -
              -
            • -
            -
            -
            -
            -
            - -
            -
            -

            Item Index

            -
            -

            Methods

            - -
            -
            -

            Properties

            - -
            -
            -
            -

            Methods

            -
            -

            _init

            - () - private -
            -

            - Defined in - ../comps/Tab/Tab.js:352 -

            -
            -
            -

            Tab Model 内部初始化方法

            -
            -
            -
            -

            activeClass

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:425 -

            -
            -
            -

            获取 Tab 活动状态的 class

            -
            -
            -

            Returns:

            -
            - string -
            -
            -
            -
            -

            activeEvent

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:431 -

            -
            -
            -

            获取 Tab label 的触发事件名称

            -
            -
            -

            Returns:

            -
            - string -
            -
            -
            -
            -

            layout

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:387 -

            -
            -
            -

            获取 Tab 的主容器

            -
            -
            -

            Returns:

            -
            - selector -
            -
            -
            -
            -

            layoutIsTab

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:419 -

            -
            -
            -

            判断一个容器是否 符合 Tab 数据要求

            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            tabactivecallback

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:478 -

            -
            -
            -

            获取Tab label 触发事件后的回调

            -
            -
            -

            Returns:

            -
            - function -
            -
            -
            -
            -

            tabajaxcallback

            -
            - (
              -
            • - _label -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:542 -

            -
            -
            -

            获取 ajax label 请求URL后的回调

            -
            -
            -

            Parameters:

            -
              -
            • - _label - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - function -
            -
            -
            -
            -

            tabajaxdata

            -
            - (
              -
            • - _label -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:528 -

            -
            -
            -

            获取 ajax label 的请求数据

            -
            -
            -

            Parameters:

            -
              -
            • - _label - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - object -
            -
            -
            -
            -

            tabajaxmethod

            -
            - (
              -
            • - _label -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:521 -

            -
            -
            -

            获取 ajax label 的请求方法 get/post

            -
            -
            -

            Parameters:

            -
              -
            • - _label - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - string -
            -
            -
            -
            -

            tabajaxurl

            -
            - (
              -
            • - _label -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:514 -

            -
            -
            -

            获取 ajax label 的 URL

            -
            -
            -

            Parameters:

            -
              -
            • - _label - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - string -
            -
            -
            -
            -

            tabchangecallback

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:489 -

            -
            -
            -

            获取 Tab label 变更后的回调

            -
            -
            -

            Returns:

            -
            - function -
            -
            -
            -
            -

            tabcontainers

            -
            - (
              -
            • - _ix -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:403 -

            -
            -
            -

            获取 Tab 所有内容container 或 特定索引的 container

            -
            -
            -

            Parameters:

            -
              -
            • - _ix - Int -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - selector -
            -
            -
            -
            -

            tabcontent

            -
            - (
              -
            • - _content -
            • -
            • - _setter -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:450 -

            -
            -
            -

            判断 container 是否符合要求, 或者设置一个 container为符合要求

            -
            -
            -

            Parameters:

            -
              -
            • - _content - Selector -
              -
              -
            • -
            • - _setter - Bool -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            tabindex

            -
            - (
              -
            • - _label -
            • -
            • - _setter -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:464 -

            -
            -
            -

            获取或设置 label 的索引位置

            -
            -
            -

            Parameters:

            -
              -
            • - _label - Selector -
              -
              -
            • -
            • - _setter - Int -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - int -
            -
            -
            -
            -

            tablabel

            -
            - (
              -
            • - _setter -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:437 -

            -
            -
            -

            判断 label 是否符合要求, 或者设置一个 label为符合要求

            -
            -
            -

            Parameters:

            -
              -
            • - _setter - Bool -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            tablabelparent

            -
            - (
              -
            • - _label -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:500 -

            -
            -
            -

            获取 Tab label 活动状态显示样式的标签

            -
            -
            -

            Parameters:

            -
              -
            • - _label - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - selector -
            -
            -
            -
            -

            tablabels

            -
            - (
              -
            • - _ix -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:393 -

            -
            -
            -

            获取 Tab 所有 label 或 特定索引的 label

            -
            -
            -

            Parameters:

            -
              -
            • - _ix - Int -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - selector -
            -
            -
            -
            -

            triggerTarget

            - () - - - -
            -

            - Defined in - ../comps/Tab/Tab.js:413 -

            -
            -
            -

            获取初始化要触发的 label

            -
            -
            -

            Returns:

            -
            - selector -
            -
            -
            -
            -
            -

            Properties

            -
            -

            _layout

            - Selector - private -
            -

            - Defined in - ../comps/Tab/Tab.js:313 -

            -
            -
            -

            Tab 的主容器

            -
            -
            -
            -

            _tabcontainers

            - Selector - private -
            -

            - Defined in - ../comps/Tab/Tab.js:334 -

            -
            -
            -

            Tab 的内容列表选择器

            -
            -
            -
            -

            _tablabels

            - Selector - private -
            -

            - Defined in - ../comps/Tab/Tab.js:327 -

            -
            -
            -

            Tab 的标签列表选择器

            -
            -
            -
            -

            _triggerTarget

            - Selector - private -
            -

            - Defined in - ../comps/Tab/Tab.js:320 -

            -
            -
            -

            Tab 初始完毕后要触发的label, 可选

            -
            -
            -
            -

            currentIndex

            - Int -
            -

            - Defined in - ../comps/Tab/Tab.js:341 -

            -
            -
            -

            当前标签的所在索引位置

            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            - - - - - - - - - - \ No newline at end of file diff --git a/docs_api/classes/JC.Tab.html b/docs_api/classes/JC.Tab.html index e7207c907..c3623f7ae 100644 --- a/docs_api/classes/JC.Tab.html +++ b/docs_api/classes/JC.Tab.html @@ -3,11 +3,17 @@ JC.Tab - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,19 +147,20 @@

            APIs

            JC.Tab Class

            - Defined in: ../comps/Tab/Tab.js:3 + Defined in: ../comps/Tab/Tab.js:4
            -

            Tab 菜单类 -
            DOM 加载完毕后 -, 只要鼠标移动到具有识别符的Tab上面, Tab就会自动初始化, 目前可识别: .js_autoTab( CSS class ) -
            需要手动初始化, 请使用: var ins = new JC.Tab( _tabSelector );

            -

            JC Project Site +

            Tab 选项卡 +
            响应式初始化, 当鼠标移动到 Tab 时, Tab 会尝试自动初始化 class = ".js_autoTab" 的 HTML 标签 +
            需要手动初始化, 请使用: var _ins = new JC.Tab( _tabSelector );

            +

            require: + JC.BaseMVC +

            +

            JC Project Site | API docs -| demo link

            -

            require: jQuery

            -

            Tab 容器的HTML属性

            +| demo link

            +

            Tab 容器的HTML属性

            tablabels
            声明 tab 标签的选择器语法
            @@ -132,10 +174,14 @@

            Tab 容器的HTML属性

            当 tab label 被触发时的回调
            tabchangecallback
            当 tab label 变更时的回调
            +
            tabQueryKey = url arg name
            +
            从URL默认选中tab, value = tab index, index 从0开始
            +
            tabTriggerDefault
            +
            页面初始化完毕时,是否实例化,并初始化当前选中标签

            Label(标签) 容器的HTML属性(AJAX)

            -
            tabajaxurl
            +
            tabAjaxUrl
            ajax 请求的 URL 地址
            tabajaxmethod
            ajax 请求的方法( get|post ), 默认 get
            @@ -143,6 +189,8 @@

            Label(标签) 容器的HTML属性(AJAX)

            ajax 请求的 数据, json
            tabajaxcallback
            ajax 请求的回调
            +
            tabIframeUrl
            +
            iframe 显示的URL
            @@ -162,7 +210,7 @@

            JC.Tab

            @@ -189,91 +237,90 @@

            Parameters:

            Example:

            -
                   <link href='../../../comps/Tab/res/default/style.css' rel='stylesheet' />
            -       <script src="../../../lib.js"></script>
            +                
                   <link href='../../../modules/JC.Tab/res/default/style.css' rel='stylesheet' />
            +       <script src="../../../lib.js"></script>
            +       <script src="../../../config.js"></script>
                    <script>
                        JC.debug = 1;
            -           JC.use( 'Tab' );
            -           httpRequire();
            -           function tabactive( _evt, _container, _tabIns ){
            -               var _label = $(this);
            -               JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );
            -               if( JC.Tab.isAjax( _label ) && ! JC.Tab.isAjaxInited( _label ) ){
            -                   _container.html( '<h2>内容加载中...</h2>' );
            -               }
            -           }
            -           function tabchange( _container, _tabIns ){
            -               var _label = $(this);
            -               JC.log( 'tab change: ', _label.html(), new Date().getTime() );
            -           }
            -           $(document).ready( function(){
            +           requirejs( [ 'JC.Tab' ], function(){
            +               JC.f.httpRequire();
                            JC.Tab.ajaxCallback =
                                function( _data, _label, _container ){
                                    _data && ( _data = $.parseJSON( _data ) );
                                    if( _data && _data.errorno === 0 ){
            -                           _container.html( printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) );
            +                           _container.html( JC.f.printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) );
                                    }else{
                                        Tab.isAjaxInited( _label, 0 );
            -                           _container.html( '<h2>内容加载失败!</h2>' );
            +                           _container.html( '<h2>内容加载失败!</h2>' );
                                    }
                                };
                        });
            +           function tabactive( _evt, _container, _tabIns ){
            +               var _label = $(this);
            +               JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );
            +               if( JC.Tab.isAjax( _label ) && ! JC.Tab.isAjaxInited( _label ) ){
            +                   _container.html( '<h2>内容加载中...</h2>' );
            +               }
            +           }
            +           function tabchange( _container, _tabIns ){
            +               var _label = $(this);
            +               JC.log( 'tab change: ', _label.html(), new Date().getTime() );
            +           }
                        function ajaxcallback( _data, _label, _container ){
                            _data && ( _data = $.parseJSON( _data ) );
                            if( _data && _data.errorno === 0 ){
            -                   _container.html( printf( '<h2>label attr ajaxcallback</h2>{0}', _data.data ) );
            +                   _container.html( JC.f.printf( '<h2>label attr ajaxcallback</h2>{0}', _data.data ) );
                            }else{
                                Tab.isAjaxInited( _label, 0 );
            -                   _container.html( '<h2>内容加载失败!</h2>' );
            +                   _container.html( '<h2>内容加载失败!</h2>' );
                            }
                        };
                    </script>
            -       <dl class="def">
            +       <dl class="def">
                        <dt>JC.Tab 示例 - 静态内容</dt>
                        <dd>
            -           <div class="le-tabview js_autoTab" tablabels="ul.js_tabLabel > li > a" tabcontainers="div.js_tabContent > div" 
            -                                               tabactiveclass="active" tablabelparent="li" 
            -                                               tabactivecallback="tabactive" tabchangecallback="tabchange"
            +           <div class="le-tabview js_autoTab" tablabels="ul.js_tabLabel > li > a" tabcontainers="div.js_tabContent > div" 
            +                                               tabactiveclass="active" tablabelparent="li" 
            +                                               tabactivecallback="tabactive" tabchangecallback="tabchange"
                                                            >
            -                   <ul class="le-tabs js_tabLabel">
            -                       <li class="active"><a href="javascript:">电视剧</a></li>
            -                       <li><a href="javascript:">电影</a></li>
            -                       <li><a href="javascript:">综艺</a></li>
            -                       <li><a href="javascript:">热点</a></li>
            +                   <ul class="le-tabs js_tabLabel">
            +                       <li class="active"><a href="javascript:">电视剧</a></li>
            +                       <li><a href="javascript:">电影</a></li>
            +                       <li><a href="javascript:">综艺</a></li>
            +                       <li><a href="javascript:">热点</a></li>
                                </ul>
            -                   <div class="views js_tabContent">
            -                       <div class="view-item active">1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。</div>
            -                       <div class="view-item">2. 相送黄血富打万念却烟会华它表本雷烟形烟消卷效难标否标滑固小实。</div>
            -                       <div class="view-item">3. 理往局背剧养认被站推简沉形括於穿短,精白自没路绿往优八益是入。</div>
            -                       <div class="view-item">4. 鲁杆格滑那双来班五材实死听顶脱本续克修先课丝另乡型茶父报孔图。</div>
            +                   <div class="views js_tabContent">
            +                       <div class="view-item active">1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。</div>
            +                       <div class="view-item">2. 相送黄血富打万念却烟会华它表本雷烟形烟消卷效难标否标滑固小实。</div>
            +                       <div class="view-item">3. 理往局背剧养认被站推简沉形括於穿短,精白自没路绿往优八益是入。</div>
            +                       <div class="view-item">4. 鲁杆格滑那双来班五材实死听顶脱本续克修先课丝另乡型茶父报孔图。</div>
                                </div>
                            </div>
                        </dd>
                    </dl>
            -       <dl class="def">
            +       <dl class="def">
                        <dt>JC.Tab 示例 - 动态内容 - AJAX</dt>
                        <dd>
            -           <div class="le-tabview js_autoTab" tablabels="ul.js_tabLabel2 > li > a" tabcontainers="div.js_tabContent2 > div" 
            -                                               tabactiveclass="active" tablabelparent="li" 
            -                                               tabactivecallback="tabactive" tabchangecallback="tabchange"
            +           <div class="le-tabview js_autoTab" tablabels="ul.js_tabLabel2 > li > a" tabcontainers="div.js_tabContent2 > div" 
            +                                               tabactiveclass="active" tablabelparent="li" 
            +                                               tabactivecallback="tabactive" tabchangecallback="tabchange"
                                                            >
            -                   <ul class="le-tabs js_tabLabel2">
            -                       <li class="active"><a href="javascript:">电视剧</a></li>
            -                       <li><a href="javascript:" tabajaxurl="data/test.php" tabajaxmethod="post" 
            -                                                 tabajaxdata="{a:1,b:2}" tabajaxcallback="ajaxcallback" >电影</a></li>
            -                       <li><a href="javascript:" tabajaxurl="data/test.php" tabajaxcallback="ajaxcallback" >综艺</a></li>
            -                       <li><a href="javascript:" tabajaxurl="data/test.php" >热点</a></li>
            +                   <ul class="le-tabs js_tabLabel2">
            +                       <li class="active"><a href="javascript:">电视剧</a></li>
            +                       <li><a href="javascript:" tabAjaxUrl="data/test.php" tabajaxmethod="post" 
            +                                                 tabajaxdata="{a:1,b:2}" tabajaxcallback="ajaxcallback" >电影</a></li>
            +                       <li><a href="javascript:" tabAjaxUrl="data/test.php" tabajaxcallback="ajaxcallback" >综艺</a></li>
            +                       <li><a href="javascript:" tabAjaxUrl="data/test.php" >热点</a></li>
                                </ul>
            -                   <div class="views js_tabContent2">
            -                       <div class="view-item active">1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。</div>
            -                       <div class="view-item"></div>
            -                       <div class="view-item"></div>
            -                       <div class="view-item"></div>
            +                   <div class="views js_tabContent2">
            +                       <div class="view-item active">1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。</div>
            +                       <div class="view-item"></div>
            +                       <div class="view-item"></div>
            +                       <div class="view-item"></div>
                                </div>
                            </div>
                        </dd>
            -       </dl>
            -
            + </dl>
            @@ -296,10 +343,17 @@

            Methods

          • active
          • +
          • + activeEvent +
          • getInstance static
          • +
          • + init + static +
          • isAjax static @@ -308,6 +362,14 @@

            Methods

            isAjaxInited static
          • +
          • + isIframe + static +
          • +
          • + isIframeInited + static +
          • @@ -348,7 +410,7 @@

            _init

            @@ -367,7 +429,7 @@

            active

            @@ -384,6 +446,28 @@

            Parameters:

            +
            +
            +

            activeEvent

            + () + + + +
            +

            + Defined in + ../comps/Tab/Tab.js:517 +

            +
            +
            +

            获取 Tab label 的触发事件名称

            +
            +
            +

            Returns:

            +
            +

            string

            +
            +

            getInstance

            @@ -401,7 +485,7 @@

            getInstance

            @@ -425,6 +509,46 @@

            Parameters:

            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of TabInstance + + static +
            +

            + Defined in + ../comps/Tab/Tab.js:239 +

            +
            +
            +

            初始化可识别的 Tab 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of TabInstance: +
            +

            isAjax

            @@ -442,7 +566,7 @@

            isAjax

            @@ -482,7 +606,7 @@

            isAjaxInited

            @@ -512,12 +636,104 @@

            Example:

               function tabactive( _evt, _container, _tabIns ){
                    var _label = $(this);
            -       JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );
            +       JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );
                    if( JC.Tab.isAjax( _label ) && ! JC.Tab.isAjaxInited( _label ) ){
            -           _container.html( '<h2>内容加载中...</h2>' );
            +           _container.html( '<h2>内容加载中...</h2>' );
            +       }
            +   }
            +
            +
            +
            +
            +

            isIframe

            +
            + (
              +
            • + _label +
            • +
            ) +
            + + String | Undefined + + static +
            +

            + Defined in + ../comps/Tab/Tab.js:338 +

            +
            +
            +
            +
            +

            Parameters:

            +
              +
            • + _label + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + String | Undefined: +
            +
            +
            +
            +

            isIframeInited

            +
            + (
              +
            • + _label +
            • +
            • + _setter +
            • +
            ) +
            + static +
            +

            + Defined in + ../comps/Tab/Tab.js:348 +

            +
            +
            +

            判断一个 iframe label 是否已经初始化过 +
            这个方法需要跟 Tab.isIframe 结合判断才更为准确

            +
            +
            +

            Parameters:

            +
              +
            • + _label + Selector +
              +
              +
            • +
            • + _setter + Bool +
              +

              如果 _setter 不为空, 则进行赋值

              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               function tabactive( _evt, _container, _tabIns ){
            +       var _label = $(this);
            +       JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );
            +       if( JC.Tab.isIframe( _label ) && ! JC.Tab.isIframeInited( _label ) ){
            +           _container.html( '<h2>内容加载中...</h2>' );
                    }
            -   }
            -
            + }
            @@ -530,7 +746,7 @@

            _model

            @@ -544,7 +760,7 @@

            activeClass

            @@ -559,7 +775,7 @@

            activeEvent

            @@ -574,7 +790,7 @@

            ajaxCallback

            @@ -589,14 +805,13 @@

            Example:

            function( _data, _label, _container, _textStatus, _jqXHR ){ _data && ( _data = $.parseJSON( _data ) ); if( _data && _data.errorno === 0 ){ - _container.html( printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) ); + _container.html( JC.f.printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) ); }else{ Tab.isAjaxInited( _label, 0 ); - _container.html( '<h2>内容加载失败!</h2>' ); + _container.html( '<h2>内容加载失败!</h2>' ); } }; - }); - + });
            @@ -607,7 +822,7 @@

            ajaxRandom

            @@ -622,7 +837,7 @@

            autoInit

            diff --git a/docs_api/classes/JC.TableFreeze.html b/docs_api/classes/JC.TableFreeze.html new file mode 100644 index 000000000..008767d45 --- /dev/null +++ b/docs_api/classes/JC.TableFreeze.html @@ -0,0 +1,835 @@ + + + + + JC.TableFreeze - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            JC.TableFreeze Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            TableFreeze 表格固定指定列功能

            +

            require: + JC.BaseMVC +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本文件, 默认会自动初始化div为class="js_compTableFreeze"下的表格

            +

            目前不支持带有tfooter的表格。如果表格带有tfooter,tfooter部分的内容会被清空

            +

            +

            可用的 HTML attribute

            +
            +
            freezeType = string
            +
            + 声明表格列冻结的类型: +

            prev:左边的列固定,其他滚动

            +

            next:右边的列固定,其他滚动

            +

            both:两边的列固定,其他滚动

            +
            +
            freezeCol = string
            +
            + 声明表格要冻结的列数: +

            0:全部滚动,不冻结

            +

            列表数目:全部冻结, 不滚动

            +

            num,num:freezeType为both时,第一个数字表示前面冻结的列数
            + 第二个数字表示后面冻结的列数。
            + 当两个数字加起来等于列数时,表示全部冻结,不会出现有滚动的列。 +

            +
            +
            scrollWidth = num
            +
            + 声明表格滚动部分的宽度,默认120% +
            +
            needHoverClass = true|false
            +
            + 声明表格行是否需要鼠标hover高亮效果: +

            默认值为true

            +
            +
            alternateClass = string
            +
            + 声明表格索引值为奇数行的背景色的className: (表格行隔行换色) +

            如果为空则不指定隔行背景色

            +
            +
            beforeCreateTableCallback = function
            +
            + 表格创建前, 触发的回调, window 变量域 +
            function beforeCreateTableCallback( _selector ){
            +   var _ins = this;
            +   JC.log( 'beforeCreateTableCallback', new Date().getTime() );
            +}
            +
            +
            afterCreateTableCallback = function
            +
            + 表格创建后, 触发的回调, window 变量域 +
            function afterCreateTableCallback( _selector ){
            +   var _ins = this;
            +   JC.log( 'afterCreateTableCallback', new Date().getTime() );
            +}
            +
            +
            +
            +
            +

            Constructor

            +
            +

            JC.TableFreeze

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <script>
            +       JC.debug = true;
            +       JC.use('TableFreeze');
            +   </script>
            +   <dl class="defdl">
            +       <dt>TableFreeze example</dt>
            +       <dd>
            +           <dl>
            +               <dd>
            +                   <div class="js_compTableFreeze" freezeType="prev" freezeCols="2" />
            +                       <dl>
            +                           <dd>
            +                               <table >
            +                                   <thead>
            +                                       <tr>
            +                                           <th > 
            +                                               item0
            +                                           </th>
            +                                           <th >
            +                                               item1
            +                                           </th>
            +                                           <th >
            +                                               item2
            +                                           </th>
            +                                           <th >
            +                                               item3
            +                                           </th>
            +                                           <th >
            +                                               item4
            +                                           </th>
            +                                       </tr>
            +                                   </thead>
            +                                   <tbody>
            +                                       <tr>
            +                                           <td rowspan="3">
            +                                               col01
            +                                           </td>
            +                                           <td class="breaklw" >
            +                                               我的我的我的我的我的我的我的我的我的
            +                                           </td>
            +                                           <td rowspan="2" colspan="2">
            +                                               col02
            +                                           </td>
            +                                           <td>
            +                                               col04
            +                                           </td>
            +                                       </tr>
            +                                       <tr>
            +                                           <td >
            +                                               col11
            +                                           </td>
            +                                           <td >
            +                                               col14
            +                                           </td>
            +                                       </tr>
            +                                         <tr>
            +                                           <td>
            +                                               col21
            +                                           </td>
            +                                            <td colspan="3">
            +                                               col22
            +                                           </td>
            +                                       </tr>
            +                                       <tr>
            +                                           <td>
            +                                               col30
            +                                           </td>
            +                                           <td rowspan="2">
            +                                               col31
            +                                           </td>
            +                                            <td>
            +                                               col32
            +                                           </td>
            +                                            <td>
            +                                               col33
            +                                           </td>
            +                                           <td rowspan="2">
            +                                               col34
            +                                           </td>
            +                                       </tr>
            +                                       <tr>
            +                                           <td>
            +                                               col40
            +                                           </td>
            +                                            <td>
            +                                               col42
            +                                           </td>
            +                                            <td>
            +                                               col43
            +                                           </td>
            +                                       </tr>
            +                                   </tbody>
            +                               </table>
            +                           </dd>
            +                       </dl>
            +                   </div>
            +               <dd>
            +           </dl>
            +       </dd>
            +   </dl>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + TableFreezeInstance + + static + +
            +

            获取或设置 TableFreeze 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + TableFreezeInstance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of TableFreezeInstance + + static + +
            +

            初始化可识别的 TableFreeze 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of TableFreezeInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Tips.Model.html b/docs_api/classes/JC.Tips.Model.html index 1b08336ee..8b956af45 100644 --- a/docs_api/classes/JC.Tips.Model.html +++ b/docs_api/classes/JC.Tips.Model.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -122,7 +163,7 @@

            Constructor

            @@ -195,7 +236,7 @@

            _init

            @@ -217,7 +258,7 @@

            data

            @@ -238,7 +279,7 @@

            Parameters:

            Returns:

            - string +

            string

            @@ -257,7 +298,7 @@

            isInited

            @@ -277,7 +318,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -290,7 +331,7 @@

            selector

            @@ -299,7 +340,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -309,7 +350,7 @@

            update

            @@ -326,7 +367,7 @@

            _data

            @@ -341,7 +382,7 @@

            _selector

            @@ -354,7 +395,7 @@

            tpl

            diff --git a/docs_api/classes/JC.Tips.View.html b/docs_api/classes/JC.Tips.View.html index 24eaf0ecc..d27c84198 100644 --- a/docs_api/classes/JC.Tips.View.html +++ b/docs_api/classes/JC.Tips.View.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -122,7 +163,7 @@

            Constructor

            @@ -193,7 +234,7 @@

            _init

            @@ -206,7 +247,7 @@

            hide

            @@ -228,7 +269,7 @@

            layout

            @@ -249,7 +290,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -265,7 +306,7 @@

            show

            @@ -299,7 +340,7 @@

            tipMouseenter

            @@ -327,7 +368,7 @@

            _defTpl

            @@ -341,7 +382,7 @@

            _layout

            @@ -354,7 +395,7 @@

            _model

            diff --git a/docs_api/classes/JC.Tips.html b/docs_api/classes/JC.Tips.html index 115b1880a..175b55b37 100644 --- a/docs_api/classes/JC.Tips.html +++ b/docs_api/classes/JC.Tips.html @@ -3,11 +3,17 @@ JC.Tips - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -112,15 +153,18 @@

            JC.Tips Class

            Tips 提示信息类
            显示标签的 title/tipsData 属性 为 Tips 样式

            -

            导入该类后, 页面加载完毕后, 会自己初始化所有带 title/tipsData 属性的标签为 Tips效果的标签 -
            如果要禁用自动初始化, 请把静态属性 Tips.autoInit 置为 false

            -

            注意: Tips 默认构造函数只处理单一标签 -
            , 如果需要处理多个标签, 请使用静态方法 Tips.init( _selector )

            -

            requires: jQuery

            -

            JC Project Site +

            导入该类后, 页面加载完毕后, 会自己初始化所有带 title/tipsData 属性的标签为 Tips效果的标签 +
            如果要禁用自动初始化, 请把静态属性 Tips.autoInit 置为 false

            +

            注意: Tips 默认构造函数只处理单一标签 +
            , 如果需要处理多个标签, 请使用静态方法 Tips.init( _selector )

            +

            require: + jQuery + , JC.common +

            +

            JC Project Site | API docs -| demo link

            -

            可用的 html attribute

            +| demo link

            +

            可用的 html attribute

            tipsinitedcallback: function
            初始完毕时的回调
            @@ -168,17 +212,16 @@

            Parameters:

            Example:

            -
                   <script src="../../../lib.js"></script>
            +                
                   <script src="../../../lib.js"></script>
            +       <script src="../../../config.js"></script>
                    <script>
            -           JC.use( 'Tips' );
            -           $(document).ready( function(_evt){
            +           requirejs( [ 'JC.Tips' ], function(){
                            //默认是自动初始化, 也就是只要导入 JC.Tips 就会自己初始化 带 title/tipsData 属性的标签
                            //下面示例是手动初始化
                            JC.Tips.autoInit = false;
            -               JC.Tips.init( $( 'a[title]' ) ); 
            +               JC.Tips.init( $( 'a[title]' ) ); 
                        });
            -       </script>
            -
            + </script>
            @@ -295,7 +338,7 @@

            _init

            @@ -311,7 +354,7 @@

            data

            @@ -320,7 +363,7 @@

            data

            Returns:

            - string +

            string

            @@ -343,7 +386,7 @@

            getInstance

            @@ -369,7 +412,7 @@

            Parameters:

            Returns:

            - TipsInstance +

            TipsInstance

            @@ -382,7 +425,7 @@

            hide

            @@ -391,7 +434,7 @@

            hide

            Returns:

            - TipsInstance +

            TipsInstance

            @@ -402,7 +445,7 @@

            hide

            @@ -422,7 +465,7 @@

            init

            @@ -443,15 +486,14 @@

            Parameters:

            Example:

            -
                   <script src="../../../lib.js"></script>
            +                
                   <script src="../../../lib.js"></script>
            +       <script src="../../../config.js"></script>
                    <script>
            -           JC.use( 'Tips' );
            -           $(document).ready( function(_evt){
            +           requirejs( [ 'JC.Tips' ], function(){
                            JC.Tips.autoInit = false;
            -               JC.Tips.init( $( 'a' ) ); 
            +               JC.Tips.init( $( 'a' ) ); 
                        });
            -       </script>
            -
            + </script>
            @@ -470,7 +512,7 @@

            layout

            @@ -491,7 +533,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -513,7 +555,7 @@

            on

            @@ -539,7 +581,7 @@

            Parameters:

            Returns:

            - TipsInstance +

            TipsInstance

            @@ -552,7 +594,7 @@

            selector

            @@ -561,7 +603,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -580,7 +622,7 @@

            show

            @@ -602,7 +644,7 @@

            Parameters:

            Returns:

            - TipsInstance +

            TipsInstance

            @@ -618,7 +660,7 @@

            titleToTipsdata

            @@ -658,7 +700,7 @@

            trigger

            @@ -678,7 +720,7 @@

            Parameters:

            Returns:

            - TipsInstance +

            TipsInstance

            @@ -691,7 +733,7 @@

            _model

            @@ -704,7 +746,7 @@

            _view

            @@ -718,7 +760,7 @@

            autoInit

            @@ -733,7 +775,7 @@

            maxWidth

            @@ -748,7 +790,7 @@

            minWidth

            @@ -763,7 +805,7 @@

            offset

            @@ -783,7 +825,7 @@

            tpl

            @@ -801,12 +843,12 @@

            TipsBeforeShow

            tips 显示前的回调 -
            在HTML属性定义回调 tipsbeforeshowcallback="function name"

            +
            在HTML属性定义回调 tipsbeforeshowcallback="function name"

            @@ -815,12 +857,12 @@

            TipsHide

            tips 隐藏后的回调 -
            在HTML属性定义回调 tipshidecallback="function name"

            +
            在HTML属性定义回调 tipshidecallback="function name"

            @@ -829,12 +871,12 @@

            TipsInited

            tips 初始化实例后的触发的事件 -
            在HTML属性定义回调 tipsinitedcallback ="function name"

            +
            在HTML属性定义回调 tipsinitedcallback ="function name"

            @@ -843,12 +885,12 @@

            TipsShow

            tips 显示后的回调 -
            在HTML属性定义回调 tipsshowcallback="function name"

            +
            在HTML属性定义回调 tipsshowcallback="function name"

            diff --git a/docs_api/classes/JC.Tree.Model.html b/docs_api/classes/JC.Tree.Model.html index 71d3d1bbf..1d70feb47 100644 --- a/docs_api/classes/JC.Tree.Model.html +++ b/docs_api/classes/JC.Tree.Model.html @@ -2,11 +2,17 @@ - + + + - + + + + +
            @@ -33,44 +39,79 @@

            APIs

            @@ -104,7 +145,7 @@

            APIs

            @@ -116,7 +157,7 @@

            Constructor

            @@ -242,7 +283,7 @@

            _init

            @@ -268,7 +309,7 @@

            _initFile

            @@ -317,7 +358,7 @@

            _initFolder

            @@ -363,7 +404,7 @@

            _initLabel

            @@ -383,7 +424,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -394,7 +435,7 @@

            _initRoot

            @@ -417,7 +458,7 @@

            _process

            @@ -457,7 +498,7 @@

            addEvent

            @@ -496,7 +537,7 @@

            child

            @@ -516,7 +557,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -532,7 +573,7 @@

            close

            @@ -556,7 +597,7 @@

            closeAll

            @@ -572,7 +613,7 @@

            container

            @@ -581,7 +622,7 @@

            container

            Returns:

            - selector +

            selector

            @@ -594,7 +635,7 @@

            data

            @@ -603,7 +644,7 @@

            data

            Returns:

            - object +

            object

            @@ -622,7 +663,7 @@

            event

            @@ -661,7 +702,7 @@

            hasChild

            @@ -681,7 +722,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            @@ -700,7 +741,7 @@

            highlight

            @@ -721,7 +762,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -740,7 +781,7 @@

            id

            @@ -761,7 +802,7 @@

            Parameters:

            Returns:

            - string 节点的最终ID +

            string 节点的最终ID

            @@ -774,7 +815,7 @@

            idPrefix

            @@ -783,7 +824,7 @@

            idPrefix

            Returns:

            - string +

            string

            @@ -793,7 +834,7 @@

            init

            @@ -812,7 +853,7 @@

            open

            @@ -836,7 +877,7 @@

            openAll

            @@ -852,7 +893,7 @@

            root

            @@ -861,7 +902,7 @@

            root

            Returns:

            - selector +

            selector

            @@ -880,7 +921,7 @@

            treeRoot

            @@ -900,7 +941,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -914,7 +955,7 @@

            _container

            @@ -928,7 +969,7 @@

            _data

            @@ -942,7 +983,7 @@

            _events

            @@ -956,7 +997,7 @@

            _highlight

            @@ -970,7 +1011,7 @@

            _id

            @@ -983,7 +1024,7 @@

            _model

            @@ -997,7 +1038,7 @@

            _treeRoot

            @@ -1010,7 +1051,7 @@

            lastHover

            diff --git a/docs_api/classes/JC.Tree.html b/docs_api/classes/JC.Tree.html index b18a7df81..e067d5e02 100644 --- a/docs_api/classes/JC.Tree.html +++ b/docs_api/classes/JC.Tree.html @@ -3,11 +3,17 @@ JC.Tree - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            树菜单类 JC.Tree

            -

            requires: jQuery, -window.printf

            +

            require: + JC.common +

            JC Project Site | API docs | demo link

            @@ -161,30 +203,29 @@

            Parameters:

            Example:

            -
                   <link href='../../../comps/Tree/res/default/style.css' rel='stylesheet' />
            -       <script src="../../../lib.js"></script>
            +                
                   <link href='../../../modules/JC.Tree/res/default/style.css' rel='stylesheet' />
            +       <script src="../../../lib.js"></script>
            +       <script src="../../../config.js"></script>
                    <script>
            -           JC.use( 'Tree' );
            -           $(document).ready( function(){
            -               var treeData = {
            -                   data: {"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]},
            -                   root: ["23",'客户发展部']
            -               };
            -               var _tree = new JC.Tree( $('#tree_box2'), treeData );
            -                   _tree.on('RenderLabel', function( _data ){
            -                       var _node = $(this);
            -                       _node.html( printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) );
            -                   });
            -                   _tree.on('click', function( _evt ){
            -                       var _p = $(this);
            -                       JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') );
            -                   });
            -                   _tree.init();
            -                   //_queryNode && _tree.open( _queryNode );
            +           requirejs( [ 'JC.Tree' ], function(){
            +                var treeData = {
            +                       data: {"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]},
            +                       root: ["23",'客户发展部']
            +                   };
            +                   var _tree = new JC.Tree( $('#tree_box2'), treeData );
            +                       _tree.on('RenderLabel', function( _data ){
            +                           var _node = $(this);
            +                           _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) );
            +                       });
            +                       _tree.on('click', function( _evt ){
            +                           var _p = $(this);
            +                           JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') );
            +                       });
            +                       _tree.init();
            +                       //_queryNode && _tree.open( _queryNode );
                        });
                    </script>
            -       <div id="tree_box2" class="tree_container"></div>
            -
            + <div id="tree_box2" class="tree_container"></div>
            @@ -215,9 +256,6 @@

            Methods

          • getItem
          • -
          • - highlight -
          • idPrefix
          • @@ -230,6 +268,9 @@

            Methods

          • open
          • +
          • + selectedItem +
          • @@ -276,7 +317,7 @@

            close

            @@ -289,8 +330,8 @@

            Parameters:

            _nodeId String | Int
            -

            如果nodeId='undefined', 将会关闭树的所有节点 -
            nodeId 不为空, 将关闭树 _nodeId 所在的节点

            +

            如果_nodeId='undefined', 将会关闭树的所有节点 +
            _nodeId 不为空, 将关闭树 _nodeId 所在的节点

            @@ -311,7 +352,7 @@

            event

            @@ -351,7 +392,7 @@

            getInstance

            @@ -387,7 +428,7 @@

            getItem

            @@ -404,46 +445,6 @@

            Parameters:

            -
            -
            -

            highlight

            -
            - (
              -
            • - _item -
            • -
            ) -
            - - - -
            -

            - Defined in - ../comps/Tree/Tree.js:192 -

            -
            -
            -

            获取或设置树的高亮节点 -
            注意: 这个只是数据层面的设置, 不会影响视觉效果

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - selector -
            -

            idPrefix

            @@ -454,7 +455,7 @@

            idPrefix

            @@ -465,7 +466,7 @@

            idPrefix

            Returns:

            String: - 树的ID前缀 +

            树的ID前缀

            @@ -475,7 +476,7 @@

            init

            @@ -485,9 +486,8 @@

            init

            Example:

            -
                       var _tree = new JC.Tree( $('#tree_box'), treeData );
            -           _tree.init();
            -
            +
                       var _tree = new JC.Tree( $('#tree_box'), treeData );
            +           _tree.init();
            @@ -506,7 +506,7 @@

            on

            @@ -543,7 +543,7 @@

            open

            @@ -556,12 +556,51 @@

            Parameters:

            _nodeId String | Int
            -

            如果nodeId='undefined', 将会展开树的所有节点 -
            nodeId 不为空, 将展开树到 _nodeId 所在的节点

            +

            如果_nodeId='undefined', 将会展开树的所有节点 +
            _nodeId 不为空, 将展开树到 _nodeId 所在的节点

            +
            +
            +

            selectedItem

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + + +
            +

            + Defined in + ../comps/Tree/Tree.js:194 +

            +
            +
            +

            获取或设置树的高亮节点

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            @@ -572,7 +611,7 @@

            _model

            @@ -585,7 +624,7 @@

            _view

            @@ -599,7 +638,7 @@

            dataFilter

            @@ -629,8 +668,7 @@

            Example:

            } } return _r; - }; - + };
            @@ -643,7 +681,7 @@

            click

            @@ -663,11 +701,10 @@

            Event Payload:

            Example:

            -
                   _tree.on('click', function( _evt ){
            +                
                   _tree.on('click', function( _evt ){
                        var _p = $(this);
            -           JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') );
            -       });
            -
            + JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') ); + });
            @@ -677,7 +714,7 @@

            FolderClick

            @@ -697,11 +734,10 @@

            Event Payload:

            Example:

            -
                   _tree.on('FolderClick', function( _evt ){
            +                
                   _tree.on('FolderClick', function( _evt ){
                        var _p = $(this);
            -           alert( 'folder click' );
            -       });
            -
            + alert( 'folder click' ); + });
            @@ -711,7 +747,7 @@

            RenderLabel

            @@ -737,11 +773,10 @@

            Event Payload:

            Example:

            -
                   _tree.on('RenderLabel', function( _data ){
            +                
                   _tree.on('RenderLabel', function( _data ){
                        var _node = $(this);
            -           _node.html( printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) );
            -       });
            -
            + _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) ); + });
            diff --git a/docs_api/classes/JC.Valid.html b/docs_api/classes/JC.Valid.html index eb35b1827..8570b5bd7 100644 --- a/docs_api/classes/JC.Valid.html +++ b/docs_api/classes/JC.Valid.html @@ -3,11 +3,17 @@ JC.Valid - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,17 +147,19 @@

            APIs

            JC.Valid Class

            表单验证 (单例模式)
            全局访问请使用 JC.Valid 或 Valid

            -

            requires: jQuery

            -

            JC Project Site +

            require: + JC.common +

            +

            JC Project Site | API docs -| demo link

            -

            Form 的可用 html attribute

            +| demo link

            +

            Form 的可用 html attribute

            errorabort = bool, default = true
            @@ -133,6 +176,8 @@

            Form 的可用 html attribute

            设置 表单所有控件的 em CSS display 显示类型
            +
            ignoreAutoCheckEvent = bool, default = false
            +
            是否禁用 自动 check 事件( focus, blur, change )

            Form Control的可用 html attribute

            @@ -166,17 +211,20 @@

            Form Control的可用 html attribute

            验证内容的最小长度, 但不验证为空的值
            maxlength = int(最大长度)
            验证内容的最大长度, 但不验证为空的值
            -
            minvalue = [number|ISO date](最小值)
            +
            minvalue = number|ISO date(最小值)
            验证内容的最小值, 但不验证为空的值
            -
            maxvalue = [number|ISO date](最大值)
            +
            maxvalue = number|ISO date(最大值)
            验证内容的最大值, 但不验证为空的值
            -
            validitemcallback = function name
            +
            validitemcallback = function
            对一个 control 作检查后的回调, 无论正确与否都会触发, window 变量域 -function validItemCallback( _item, _isValid){ - JC.log( _item.attr('name'), _isValid ); -} +
            function validItemCallback( _selector, _isValid ){
            +}
            +
            validHidden = bool, default = false
            +
            是否验证隐藏的控件
            +
            rangeCanEqual = bool, default = true
            +
            nrange 和 daterange 的开始值和结束值是否可以相等
            datatype: 常用数据类型
            n: 检查是否为正确的数字
            n-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], n-7.2 = 0.00 ~ 9999999.99
            @@ -188,6 +236,8 @@

            Form Control的可用 html attribute

            如果不指定 fromNEl, toNEl, 默认是从父节点下面找到 nrange, 按顺序定为 fromNEl, toNEl
            +
            f: 检查是否为正确的数字, default: f-9.2
            +
            f-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], f-7.2 = 0.00 ~ 9999999.99
            d: 检查是否为正确的日期, YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD
            daterange: 检查两个control的日期范围 @@ -195,26 +245,36 @@

            Form Control的可用 html attribute

            html attr fromDateEl: 指定开始的 control
            html attr toDateEl: 指定结束的 control
            如果不指定 fromDateEl, toDateEl, 默认是从父节点下面找到 daterange, 按顺序定为 fromDateEl, toDateEl
            +
            html attr datespan:, 指定开始与结束日期的时间跨度(JC.f.dateDetect)
            time: 是否为正确的时间, hh:mm:ss
            minute: 是否为正确的时间, hh:mm
            bankcard: 是否为正确的银行卡 -
            格式为: d{15}, d{16}, d{17}, d{19} +
            格式为: 9 ~ 25 位数字
            cnname: 中文姓名
            格式: 汉字和大小写字母
            规则: 长度 2-32个字节, 非 ASCII 算2个字节
            +
            + enname: 英文姓名 +
            格式: 大小写字母 + 空格 +
            规则: 长度 2-32个字节, 非 ASCII 算2个字节 +
            +
            + allname: cnname | enname +
            中文姓名和英文姓名的复合验证 +
            username: 注册用户名
            格式: a-zA-Z0-9_-
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30
            idnumber: 身份证号码, 15~18 位
            -
            mobilecode: 手机号码, 11位, (13|14|15|16|18|19)[\d]{9}
            +
            mobilecode: 手机号码, 11位, (13|14|15|16|17|18|19)[\d]{9}
            mobile: mobilecode 的别名
            mobilezonecode: 带 国家代码的手机号码, [+国家代码] [零]11位数字
            phonecode: 电话号码, 7~8 位数字, [1-9][0-9]{6,7}
            @@ -273,6 +333,8 @@

            Form Control的可用 html attribute

            +
            qq: 检查QQ号码, 5 ~ 11位数字
            +
            qqall: 检查QQ号码, [ qq | email ]
            subdatatype: 特殊数据类型, 以逗号分隔多个属性
            @@ -311,6 +373,7 @@

            Form Control的可用 html attribute

            uniquemsg: 值有重复的提示信息
            uniqueIgnoreCase: 是否忽略大小写
            uniqueIgnoreEmpty: 是否忽略空的值, 如果组中有空值也会被忽略
            +
            processDisabled: 是否处理 disabled 但 visible 的node
            unique-n 可以指定 N 个为一组的匹配, unique-2 = 2个一组, unique-3: 三个一组
            @@ -320,29 +383,44 @@

            Form Control的可用 html attribute

            datavalidMsg: 值不合法时的提示信息
            datavalidUrl: 验证内容正确与否的 url api -

            {"errorno":0,"errmsg":""}

            +

            {"errorno":0,"errmsg":""}

            errorno: 0( 正确 ), 非0( 错误 ) -

            datavalidurl="./data/handler.php?key={0}"

            +

            datavalidurl="./data/handler.php?key={0}"

            {0} 代表 value
            +
            + datavalidCheckCallback: 验证内容正确与否的回调(优先级比 datavalidUrl 高) +
            window.datavalidCheckCallback =
            +function (){
            +   var _r = { 'errorno': 1, errmsg:'验证码错误' }, _sp = $( this ), _v = _sp.val().trim().toLowerCase();
            +   if( _v && _v === window.CHECK_CODE ){
            +       _r.errorno = 0;
            +   }
            +   return _r;
            +};
            +             
            +
            datavalidNoCache: 是否禁止缓存, default = true
            +
            datavalidAjaxType: ajax 请求类型, default = get
            +
            datavalidRequestData: ajax 请求数据, json data
            datavalidCallback: 请求 datavalidUrl 后调用的回调 -function datavalidCallback( _json ){ +<pre>function datavalidCallback( _json ){ var _selector = $(this); -}); +});
            +
            datavalidKeyupCallback: 每次 keyup 的回调 -function datavalidKeyupCallback( _evt ){ +<pre>function datavalidKeyupCallback( _evt ){ var _selector = $(this); -}); +});
            datavalidUrlFilter: 请求数据前对 url 进行操作的回调 -function datavalidUrlFilter( _url ){ +<pre>function datavalidUrlFilter( _url ){ var _selector = $(this); - _url = addUrlParams( _url, { 'xtest': 'customData' } ); + _url = JC.f.addUrlParams( _url, { &#39;xtest&#39;: &#39;customData&#39; } ); return _url; -}); +});
            @@ -350,10 +428,42 @@

            Form Control的可用 html attribute

            hidden: 验证隐藏域的值
            - 有些特殊情况需要验证隐藏域的值, 请使用 subdatatype="hidden" + 有些特殊情况需要验证隐藏域的值, 请使用 subdatatype="hidden"
            +
            +
            +
            ucheck: 用户自定义验证
            +
            ucheckmsg: 验证出错的提示信息
            +
            ucheckCallback: 用于验证的函数 window变量域 +
            function ucheck_n( _item ){
            +   var _r = false, _v = JC.f.parseFinance( _item.val() );
            +   if( _v === 0 || ( _v >= 30 && _v >= 50 ) ){
            +       _r = true;
            +   }
            +   return _r;
            +}
            +
            +
            +
            +
            +
            +
            subdatatype = even: 数值必须为偶数
            +
            +
            +
            +
            +
            subdatatype = odd: 数值必须为奇数
            +
            +
            +
            exdatatype: 特殊数据类型, 以逗号分隔多个属性, 该类型只用于显示视觉效果, 不作为实际验证的判断
            +
            +
            +
            datavalid: 判断 control 的值是否合法( 通过HTTP请求验证 )(只用于显示视觉效果, 不作为实际验证的判断)
            +
            其他参数与 subdatatype = datavalid 相同
            +
            +
            @@ -369,22 +479,6 @@

            Item Index

            Methods

            @@ -627,6 +561,10 @@

            Properties

            focusmsgEverytime static +
          • + ignoreAutoCheckEvent + static +
          • itemCallback static @@ -651,8 +589,8 @@

            Events

          • Methods

            -
            -

            alternative

            +
            +

            check

            (
            • @@ -660,17 +598,18 @@

              alternative

            )
            - private + + Boolean + static
            -

            此类型检查 2|N个对象必须至少有一个是有输入内容的, -
            常用于 手机/电话 二填一

            +

            验证一个表单项, 如 文本框, 下拉框, 复选框, 单选框, 文本域, 隐藏域

            Parameters:

            @@ -679,44 +618,32 @@

            Parameters:

            _item Selector
            +

            需要验证规则正确与否的表单/表单项( 可同时传递多个_item )

            +
            +

            Returns:

            +
            + Boolean: +
            +

            Example:

            -
                       <dd>
            -           <div class="f-l label">
            -               <label>(datatype phonezone, phonecode, phoneext)电话号码:</label>
            -           </div>
            -           <div class="f-l">
            -               <input type='TEXT' name='company_phonezone' style="width:40px;" value='' size="4" 
            -                   datatype="phonezone" emEl="#phone-err-em" errmsg="请填写正确的电话区号" />
            -               - <input type='TEXT' name='company_phonecode' style="width:80px;" value='' size="8" 
            -                   datatype="phonecode" subdatatype="alternative" datatarget="input[name=company_mobile]" alternativemsg="电话号码和手机号码至少填写一个"
            -                   errmsg="请检查电话号码格式" emEl="#phone-err-em" />
            -               - <input type='TEXT' name='company_phoneext' style="width:40px;" value='' size="4" 
            -                   datatype="phoneext" emEl="#phone-err-em" errmsg="请填写正确的分机号" />
            -               <em id="phone-err-em"></em>
            -           </div>
            -           </dd>
            -           <dd>
            -           <div class="f-l label">
            -               <label>(datatype mobilecode)手机号码:</label>
            -           </div>
            -           <div class="f-l">
            -               <input type="TEXT" name="company_mobile" 
            -                   datatype="mobilecode" subdatatype="alternative" datatarget="input[name=company_phonecode]" alternativemsg=" "
            -                   errmsg="请填写正确的手机号码">
            -           </div>
            -           </dd>
            -
            +
                 JC.Valid.check( $( selector ) );
            +     JC.Valid.check( $( selector ), $( anotherSelector );
            +     JC.Valid.check( document.getElementById( item ) );
            +     if( !JC.Valid.check( $('form') ) ){
            +         _evt.preventDefault();
            +         return false;
            +     }
            -
            -

            bankcard

            +
            +

            checkAll

            (
            • @@ -724,17 +651,15 @@

              bankcard

            )
            - private static
            -

            检查银行卡号码 -
            格式为: d{15}, d{16}, d{17}, d{19}

            +

            这个方法是 Valid.check 的别名

            Parameters:

            @@ -743,322 +668,102 @@

            Parameters:

            _item Selector
            +
              +
            • 需要验证规则正确与否的表单/表单项
            • +
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_idnumber" 
            -                   datatype="idnumber" errmsg="请填写正确的身份证号码">
            -           </div>
            -
            -
            -
            -
            -

            bytelen

            +
            +

            checkTimeout

            (
            • - _s + _selector +
            • +
            • + _tm
            )
            - private + + Valid instance + static
            -

            计算字符串的字节长度, 非 ASCII 0-255的字符视为两个字节

            +

            检查是否需要延时 check +
            以 html 属性 validCheckTimeout 定义, int 类型, type = ms

            Parameters:

            • - _s - String + _selector + Selector +
              +
              +
            • +
            • + _tm + Int
            +
            +

            Returns:

            +
            + Valid instance: +
            +
            -
            -

            bytetext

            - () - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1600 -

            -
            -
            -

            检查文本的字节长度

            -
            -
            -
            -

            check

            +
            +

            clearError

            (
            • - _item + _selector
            )
            - - Boolean - static
            -

            验证一个表单项, 如 文本框, 下拉框, 复选框, 单选框, 文本域, 隐藏域

            +

            清除Valid生成的错误样式

            Parameters:

            • - _item - Selector + _selector + Form | Input | Textarea | Select | File | Password
              -

              需要验证规则正确与否的表单/表单项( 可同时传递多个_item )

              +
                +
              • 需要清除错误的选择器
              • +
            -
            -

            Returns:

            -
            - Boolean: -
            -

            Example:

            -
                 JC.Valid.check( $( selector ) );
            -     JC.Valid.check( $( selector ), $( anotherSelector );
            -     JC.Valid.check( document.getElementById( item ) );
            -     if( !JC.Valid.check( $('form') ) ){
            -         _evt.preventDefault();
            -         return false;
            -     }
            -
            -
            -
            -
            -
            -

            checkAll

            -
            - (
              -
            • - _item -
            • -
            ) -
            - static -
            -

            - Defined in - ../comps/Valid/Valid.js:469 -

            -
            -
            -

            这个方法是 Valid.check 的别名

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
                -
              • 需要验证规则正确与否的表单/表单项
              • -
              -
              -
            • -
            -
            -
            -
            -

            clearError

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - static -
            -

            - Defined in - ../comps/Valid/Valid.js:601 -

            -
            -
            -

            清除Valid生成的错误样式

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Form | Input | Textarea | Select | File | Password -
              -
                -
              • 需要清除错误的选择器
              • -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                 JC.Valid.clearError( 'form' );
            -     JC.Valid.clearError( 'input.some' );
            -
            -
            -
            -
            -
            -

            cnname

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1275 -

            -
            -
            -

            检查中文姓名 -
            格式: 汉字和大小写字母 -
            规则: 长度 2-32个字节, 非 ASCII 算2个字节

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_cnname" 
            -                   datatype="cnname" reqmsg="姓名" errmsg="请填写正确的姓名">
            -           </div>
            -
            -
            -
            -
            -
            -

            countrycode

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1702 -

            -
            -
            -

            检查地区代码

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_countrycode" datatype="countrycode" errmsg="请填写正确的地区代码">
            -           </div>
            -
            -
            -
            -
            -
            -

            d

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1110 -

            -
            -
            -

            检查是否为合法的日期, -
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_d" errmsg="请填写正确的日期范围2013-05-01 - 2013-05-31" datatype="daterange" minvalue="2013-05-01" maxvalue="2013-05-31" >
            -           </div>
            -
            +
                 JC.Valid.clearError( 'form' );
            +     JC.Valid.clearError( 'input.some' );
            @@ -1068,1742 +773,132 @@

            dataValid

            (
            • _selector -
            • -
            • - _settter -
            • -
            • - _noStatus -
            • -
            • - _customMsg -
            • -
            ) -
            - - - - static -
            -

            - Defined in - ../comps/Valid/Valid.js:484 -

            -
            -
            -

            判断/设置 selector 的数据是否合法 -
            通过 datavalid 属性判断

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -
              -
            • -
            • - _settter - Bool -
              -
              -
            • -
            • - _noStatus - Bool -
              -
              -
            • -
            • - _customMsg - String -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            daterange

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1145 -

            -
            -
            -

            检查两个输入框的日期 -
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD -
            注意: 如果不显示指定 fromDateEl, toDateEl, - 将会从父级查找 datatype=daterange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_daterange" errmsg="请填写正确的日期范围,并且起始日期不能大于结束日期" id="start_date" 
            -                   datatype="daterange" toDateEl="end_date" emEl="date-err-em" >
            -               - <input type="TEXT" name="company_daterange" errmsg="请填写正确的日期范围,并且起始日期不能大于结束日期" id="end_date" 
            -                   datatype="daterange" fromDateEl="start_date" emEl="date-err-em" >
            -               <br /><em id="date-err-em"></em>
            -           </div>
            -
            -
            -
            -
            -
            -

            domain

            -
            - (
              -
            • - _item!~YUIDOC_LINE~! -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1650 -

            -
            -
            -

            检查域名

            -
            -
            -

            Parameters:

            -
              -
            • - _item!~YUIDOC_LINE~! - Selector -
              -
              - -
              -
              -
            • -
            -
            -
            -
            -

            email

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1685 -

            -
            -
            -

            检查电子邮件

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_email" datatype="email" reqmsg="邮箱" errmsg="请填写正确的邮箱">
            -           </div>
            -
            -
            -
            -
            -
            -

            error

            -
            - (
              -
            • - _item -
            • -
            • - _msgAttr -
            • -
            • - _fullMsg -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:2518 -

            -
            -
            -

            显示错误的视觉效果

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _msgAttr - String -
              -
                -
              • 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名
              • -
              -
              -
            • -
            • - _fullMsg - Bool -
              -
                -
              • 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写
              • -
              -
              -
            • -
            -
            -
            -
            -

            errorMsg

            -
            - (
              -
            • - _item -
            • -
            • - _msgAttr -
            • -
            • - _fullMsg -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:2186 -

            -
            -
            -

            获取对应的错误信息, 默认的错误信息有 reqmsg, errmsg,
            -注意: 错误信息第一个字符如果为空格的话, 将完全使用用户定义的错误信息, 将不会动态添加 请上传/选择/填写

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _msgAttr - String -
              -
                -
              • 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名
              • -
              -
              -
            • -
            • - _fullMsg - Bool -
              -
                -
              • 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写
              • -
              -
              -
            • -
            -
            -
            -
            -

            getElement

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:2163 -

            -
            -
            -

            获取 _selector 对象 -
            这个方法的存在是为了向后兼容qwrap, qwrap DOM参数都为ID

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -
              -
            • -
            -
            -
            -
            -

            getInstance

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - - Valid instance - - static -
            -

            - Defined in - ../comps/Valid/Valid.js:476 -

            -
            -
            -

            获取 Valid 的实例 ( Valid 是单例模式 )

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - Valid instance: -
            -
            -
            -
            -

            idnumber

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1316 -

            -
            -
            -

            检查身份证号码
            -目前只使用最简单的位数判断~ 有待完善

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                   <div class="f-l">
            -           <input type="TEXT" name="company_idnumber" 
            -               datatype="idnumber" errmsg="请填写正确的身份证号码">
            -       </div>
            -
            -
            -
            -
            -
            -

            ignore

            -
            - (
              -
            • - _item -
            • -
            • - _delIgnore -
            • -
            ) -
            - - - - static -
            -

            - Defined in - ../comps/Valid/Valid.js:652 -

            -
            -
            -

            判断 表单控件是否为忽略检查 或者 设置 表单控件是否为忽略检查

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _delIgnore - Bool -
              -

              是否删除忽略属性, 如果为 undefined 将不执行 添加删除操作

              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            isFormControl

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - - - - static -
            -

            - Defined in - ../comps/Valid/Valid.js:693 -

            -
            -
            -

            判断 _selector 是否为 form control

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            isValid

            -
            - (
              -
            • - _selector -
            • -
            ) -
            - - - - static -
            -

            - Defined in - ../comps/Valid/Valid.js:520 -

            -
            -
            -

            判断 selector 是否 Valid 的处理对象

            -
            -
            -

            Parameters:

            -
              -
            • - _selector - Selector -
              -
              -
            • -
            -
            -
            -

            Returns:

            -
            - bool -
            -
            -
            -
            -

            lengthValid

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:911 -

            -
            -
            -

            检查内容的长度

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_name" minlength="2" maxlength="120" reqmsg="公司名称" errmsg="请检查格式,长度2-120" /> <em>公司名称描述</em>
            -           </div>
            -
            -
            -
            -
            -
            -

            minute

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1233 -

            -
            -
            -

            检查时间格式, 格式为 hh:mm

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_time" errmsg="正确的时间, 格式为 hh:mm" datatype="minute" >
            -           </div>
            -
            -
            -
            -
            -
            -

            mobile

            -
            - (
              -
            • - _item -
            • -
            • - _noError -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1355 -

            -
            -
            -

            检查手机号码 -
            这个方法是 mobilecode 的别名

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _noError - Bool -
              -
              -
            • -
            -
            -
            -
            -

            mobilecode

            -
            - (
              -
            • - _item -
            • -
            • - _noError -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1335 -

            -
            -
            -

            检查手机号码

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _noError - Bool -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                   <div class="f-l">
            -           <input type="TEXT" name="company_mobile" 
            -               datatype="mobilecode" subdatatype="alternative" datatarget="input[name=company_phonecode]" alternativemsg=" "
            -               errmsg="请填写正确的手机号码">
            -       </div>
            -
            -
            -
            -
            -
            -

            mobilephone

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1492 -

            -
            -
            -

            检查手机号码/电话号码 -
            这个方法是原有方法的混合验证 mobilecode + phone

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l label">
            -               <label>(datatype mobilephone, phone + mobilecode)手机号码或电话号码:</label>
            -           </div>
            -           <div class="f-l">
            -               <input type="text" name="company_mobilephone" 
            -                   datatype="mobilephone"
            -                   errmsg="请填写正确的手机/电话号码">
            -           </div>
            -
            -
            -
            -
            -
            -

            mobilephoneall

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1516 -

            -
            -
            -

            检查手机号码/电话号码, 泛匹配 -
            这个方法是原有方法的混合验证 mobilezonecode + phoneall

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l label">
            -               <label>(datatype mobilephoneall, phoneall + mobilezonecode)手机号码或电话号码:</label>
            -           </div>
            -           <div class="f-l">
            -               <input type="text" name="company_mobilephoneall" 
            -                   datatype="mobilephoneall"
            -                   errmsg="请填写正确的手机/电话号码">
            -           </div>
            -
            -
            -
            -
            -
            -

            mobilezonecode

            -
            - (
              -
            • - _item -
            • -
            • - _noError -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1368 -

            -
            -
            -

            检查手机号码加强方法 -
            格式: [+国家代码] [零]11位数字

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _noError - Bool -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_mobilezone" 
            -                   datatype="mobilezonecode" 
            -                   errmsg="请填写正确的手机号码">
            -           </div>
            -
            -
            -
            -
            -
            -

            n

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:964 -

            -
            -
            -

            检查是否为正确的数字
            -
            默认范围 0 - Math.pow(10, 10)

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_n" errmsg="请填写正确的正整数" datatype="n" >
            -           </div>
            -           <div class="f-l">
            -               <input type="TEXT" name="company_n1" errmsg="请填写正确的数字, 范围1-100" datatype="n" minvalue="1", maxvalue="100" >
            -           </div>
            -           <div class="f-l">
            -               <input type="TEXT" name="company_n2" errmsg="请填写正确的数字" datatype="n-7.2" >
            -           </div>
            -
            -
            -
            -
            -
            -

            nrange

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1036 -

            -
            -
            -

            检查两个输入框的数值 -
            数字格式为 0-pow(10,10) -
            带小数点使用 nrange-int.float, 例: nrange-1.2 nrange-2.2 -
            注意: 如果不显示指定 fromNEl, toNEl, - 将会从父级查找 datatype=nrange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                   <div class="f-l label">
            -           <label>(datatype nrange)正数:<br/><b style="color:red">注意: 这个是大小颠倒位置的nrange</b></label>
            -           大<input type="text" name="company_n10" id="company_n10" fromNEl="company_n11"
            -               errmsg="请填写正确的数值范围" datatype="nrange" emEl="nrange_n1011" >
            -           - 小<input type="text" name="company_n11" id="company_n11" toNEl="company_n10"
            -               errmsg="请填写正确的数值范围" datatype="nrange" emEl="nrange_n1011" >
            -           <em id="nrange_n1011"></em>
            -       </div>
            -
            -
            -
            -
            -
            -

            on

            -
            - (
              -
            • - _evtName -
            • -
            • - _cb -
            • -
            ) -
            - - - - private -
            -

            - Defined in - ../comps/Valid/Valid.js:329 -

            -
            -
            -

            使用 jquery on 绑定事件

            -
            -
            -

            Parameters:

            - -
            -
            -

            Returns:

            -
            - ValidInstance -
            -
            -
            -
            -

            parse

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private -
            -

            - Defined in - ../comps/Valid/Valid.js:346 -

            -
            -
            -

            分析_item是否附合规则要求

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -
            -

            parseDatatype

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:731 -

            -
            -
            -

            获取 _item 的检查类型

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector | String -
              -
              -
            • -
            -
            -
            -
            -

            parseSubdatatype

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:748 -

            -
            -
            -

            获取 _item 的检查子类型, 所有可用的检查子类型位于 _logic.subdatatype 对象

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector | String -
              -
              -
            • -
            -
            -
            -
            -

            phone

            -
            - (
              -
            • - _item -
            • -
            • - _noError -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1408 -

            -
            -
            -

            检查电话号码 -
            格式: [区号]7/8位电话号码

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _noError - Bool -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_phone" 
            -                   datatype="phone" 
            -                   errmsg="请填写正确的电话号码">
            -           </div>
            -
            -
            -
            -
            -
            -

            phoneall

            -
            - (
              -
            • - _item -
            • -
            • - _noError -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1429 -

            -
            -
            -

            检查电话号码 -
            格式: [+国家代码][ ][电话区号][ ]7/8位电话号码[#分机号]

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _noError - Bool -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_mobilezone" 
            -                   datatype="phoneall" 
            -                   errmsg="请填写正确的电话号码">
            -           </div>
            -
            -
            -
            -
            -
            -

            phonecode

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1389 -

            -
            -
            -

            检查电话号码 -
            格式: 7/8位数字

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div>
            -               <input type='TEXT' name='company_phonecode' style="width:80px;" value='' size="8" 
            -                   datatype="phonecode" errmsg="请检查电话号码格式" emEl="#phone-err-em" />
            -           </div>
            -
            -
            -
            -
            -
            -

            phoneext

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1474 -

            -
            -
            -

            检查电话分机号码

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div>
            -               <input type='TEXT' name='company_phoneext' style="width:40px;" value='' size="4" 
            -                   datatype="phoneext" emEl="#phone-err-em" errmsg="请填写正确的分机号" />
            -           </div>
            -
            -
            -
            -
            -
            -

            phonezone

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1451 -

            -
            -
            -

            检查电话区号

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div>
            -               <input type='TEXT' name='company_phonezone' style="width:40px;" value='' size="4" 
            -                   datatype="phonezone" emEl="#phone-err-em" errmsg="请填写正确的电话区号" />
            -           </div>
            -
            -
            -
            -
            -
            -

            reconfirm

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1757 -

            -
            -
            -

            此类型检查 2|N 个对象填写的值必须一致 -常用于注意时密码验证/重置密码

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <dd>
            -           <div class="f-l label">
            -               <label>(datatype text, subdatatype reconfirm)用户密码:</label>
            -           </div>
            -           <div class="f-l">
            -               <input type="PASSWORD" name="company_pwd" 
            -               datatype="text" subdatatype="reconfirm" datatarget="input[name=company_repwd]" reconfirmmsg="用户密码和确认密码不一致"
            -               minlength="6" maxlength="15" reqmsg="用户密码" errmsg="请填写正确的用户密码">
            -           </div>
            -           </dd>
            -           <dd>
            -           <div class="f-l label">
            -               <label>(datatype text, subdatatype reconfirm)确认密码:</label>
            -           </div>
            -           <div class="f-l">
            -               <input type="PASSWORD" name="company_repwd" 
            -               datatype="text" subdatatype="reconfirm" datatarget="input[name=company_pwd]" reconfirmmsg="确认密码和用户密码不一致"
            -               minlength="6" maxlength="15" reqmsg="确认密码" errmsg="请填写正确的确认密码">
            -           </div>
            -           </dd>
            -
            -
            -
            -
            -
            -

            reg

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1539 -

            -
            -
            -

            自定义正则校验

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                           <div><input type="TEXT" name="company_addr" datatype="reg" reg-pattern="/^[\s\S]{2,120}$/i" errmsg="请填写正确的地址"></div>
            -               <div><input type="TEXT" name="company_addr" datatype="reg-/^[\s\S]{2,120}$/i" errmsg="请填写正确的地址"></div>
            -
            -
            -
            -
            -
            -

            reqmsg

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:2221 -

            -
            -
            -

            检查内容是否为空, -
            如果声明了该属性, 那么 value 须不为空

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_name" reqmsg="公司名称" /> <em>公司名称描述</em>
            -           </div>
            -
            -
            -
            -
            -
            -

            reqtarget

            -
            - (
              -
            • - _item -
            • -
            ) -
            - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1993 -

            -
            -
            -

            如果 _item 的值非空, 那么 reqtarget 的值也不能为空

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            -
            -
            -
            -

            richtext

            - () - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1609 -

            -
            -
            -

            检查富文本的字节 -
            TODO: 完成富文本长度检查

            -
            -
            -
            -

            setError

            -
            - (
              -
            • - _item -
            • -
            • - _msgAttr -
            • -
            • - _fullMsg -
            • -
            ) -
            - static -
            -

            - Defined in - ../comps/Valid/Valid.js:536 -

            -
            -
            -

            把一个表单项的状态设为错误状态

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _msgAttr - String -
              -
                -
              • 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 -
                如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateErrorMsg
              • -
              -
              -
            • -
            • - _fullMsg - Bool -
              -
                -
              • 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写
              • -
              -
              -
            • -
            -
            -
            -
            -

            setFocusMsg

            -
            - (
              -
            • - _item -
            • -
            • - _setHide -
            • -
            • - _msgAttr -
            • -
            ) -
            - static -
            -

            - Defined in - ../comps/Valid/Valid.js:554 -

            -
            -
            -

            显示 focusmsg 属性的提示信息( 如果有的话 )

            -
            -
            -

            Parameters:

            -
              -
            • - _item - Selector -
              -
              -
            • -
            • - _setHide - Bool -
              -
              -
            • -
            • - _msgAttr - String -
              -
                -
              • 显示指定需要读取的focusmsg信息属性名, 默认为 focusmsg, 通过该属性可以指定别的属性名 -
                如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateFocusMsg
              • -
              -
              -
            • -
            -
            -
            -
            -

            setValid

            -
            - (
              +
            • - _item + _settter
            • - _tm + _noStatus +
            • +
            • + _customMsg
            )
            + + + static
            -

            把一个表单项的状态设为正确状态

            +

            判断/设置 selector 的数据是否合法 +
            通过 datavalid 属性判断

            Parameters:

            • - _item + _selector Selector
            • - _tm - Int + _settter + Bool +
              +
              +
            • +
            • + _noStatus + Bool +
              +
              +
            • +
            • + _customMsg + String
              -

              延时 _tm 毫秒显示处理结果, 默认=150

            +
            +

            Returns:

            +
            +

            bool

            +
            +
            -
            -

            stricdomain

            +
            +

            getInstance

            (
            • - _item!~YUIDOC_LINE~! + _selector
            )
            - private + + Valid instance + static
            -

            检查域名

            +

            获取 Valid 的实例 ( Valid 是单例模式 )

            Parameters:

            • - _item!~YUIDOC_LINE~! + _selector Selector
              -
              - -
            +
            +

            Returns:

            +
            + Valid instance: +
            +
            -
            -

            taxcode

            +
            +

            ignore

            (
            • _item
            • +
            • + _delIgnore +
            )
            - private + + + static
            -

            纳税人识别号, 15, 18, 20位字符

            +

            判断 表单控件是否为忽略检查 或者 设置 表单控件是否为忽略检查

            Parameters:

            @@ -2814,102 +909,90 @@

            Parameters:

            +
          • + _delIgnore + Bool +
            +

            是否删除忽略属性, 如果为 undefined 将不执行 添加删除操作

            +
            +
          • -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="" datatype="taxcode" errmsg="请填空正确的纳税人识别号">
            -           </div>
            -
            +
            +

            Returns:

            +
            +

            bool

            -
            -

            text

            - () - private - static -
            -

            - Defined in - ../comps/Valid/Valid.js:1591 -

            -
            -
            -

            检查文本长度

            -
            -
            -
            -

            time

            +
            +

            isFormControl

            (
            • - _item + _selector
            )
            - private + + + static
            -

            检查时间格式, 格式为 hh:mm:ss

            +

            判断 _selector 是否为 form control

            Parameters:

            • - _item + _selector Selector
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_time" errmsg="正确的时间, 格式为 hh:mm:ss" datatype="time" >
            -           </div>
            -
            +
            +

            Returns:

            +
            +

            bool

            -
            -

            trigger

            +
            +

            isValid

            (
            • - _evtName + _selector
            )
            - private + static
            -

            使用 jquery trigger 绑定事件

            +

            判断 selector 是否 Valid 的处理对象

            Parameters:

            • - _evtName - String + _selector + Selector
            • @@ -2918,44 +1001,61 @@

              Parameters:

              Returns:

              - ValidInstance +

              bool

            -
            -

            unique

            +
            +

            on

            (
            • - _item + _evtName +
            • +
            • + _cb
            )
            + + + private - static
            -

            N 个值必须保持唯一性, 不能有重复

            +

            使用 jquery on 绑定事件

            Parameters:

            +
            +

            Returns:

            +
            +

            ValidInstance

            +
            +
            -
            -

            url

            +
            +

            parse

            (
            • @@ -2964,15 +1064,14 @@

              url

            )
            private - static
            -

            检查URL

            +

            分析_item是否附合规则要求

            Parameters:

            @@ -2985,195 +1084,194 @@

            Parameters:

            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_url" datatype="url" errmsg="请填写正确的网址">
            -           </div>
            -
            -
            -
            -
            -

            username

            +
            +

            setError

            (
            • - _item + _items +
            • +
            • + _msgAttr +
            • +
            • + _fullMsg
            )
            - private static
            -

            检查注册用户名 -
            格式: a-zA-Z0-9_- -
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30

            +

            把一个表单项的状态设为错误状态

            Parameters:

            • - _item + _items Selector
            • +
            • + _msgAttr + String +
              +
                +
              • 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名
                                             <br /> 如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateErrorMsg
                +
              • +
              +
              +
            • +
            • + _fullMsg + Bool +
              +
                +
              • 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写
              • +
              +
              +
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_username" 
            -                   datatype="username" reqmsg="用户名" errmsg="请填写正确的用户名">
            -           </div>
            -
            -
            -
            -
            -

            valid

            +
            +

            setFocusMsg

            (
            • - _item + _items
            • - _tm + _setHide
            • - _noStyle + _msgAttr
            )
            - private static
            -

            显示正确的视觉效果

            +

            显示 focusmsg 属性的提示信息( 如果有的话 )

            Parameters:

            • - _item + _items Selector
            • - _tm - Int + _setHide + Bool
            • - _noStyle - Bool + _msgAttr + String
              +
                +
              • 显示指定需要读取的focusmsg信息属性名, 默认为 focusmsg, 通过该属性可以指定别的属性名
                                             <br /> 如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateFocusMsg
                +
              • +
            -
            -

            vcode

            +
            +

            setValid

            (
            • - _item + _items +
            • +
            • + _tm
            )
            - private static
            -

            检查验证码
            -格式: 为 0-9a-zA-Z, 长度 默认为4

            +

            把一个表单项的状态设为正确状态

            Parameters:

            • - _item + _items Selector
            • +
            • + _tm + Int +
              +

              延时 _tm 毫秒显示处理结果, 默认=150

              +
              +
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_vcode" style="width: 40px;"
            -                   datatype="vcode" reqmsg="验证码" errmsg="请填写正确的验证码">
            -           </div>
            -           <div class="f-l">
            -               <input type="TEXT" name="company_vcode" style="width: 40px;"
            -                   datatype="vcode-5" errmsg="请填写正确的验证码">
            -           </div>
            -
            -
            -
            -
            -

            zipcode

            +
            +

            trigger

            (
            • - _item + _evtName
            )
            + + + private - static
            -

            检查邮政编码

            +

            使用 jquery trigger 绑定事件

            Parameters:

            • - _item - Selector + _evtName + String
            -
            -

            Example:

            -
            -
                       <div class="f-l">
            -               <input type="TEXT" name="company_zipcode" datatype="zipcode" errmsg="请填写正确的邮编">
            -           </div>
            -
            +
            +

            Returns:

            +
            +

            ValidInstance

            @@ -3188,7 +1286,7 @@

            _formControls

            @@ -3211,7 +1309,7 @@

            autoTrim

            @@ -3223,8 +1321,7 @@

            Example:

                   $(document).ready( function($evt){
                        JC.Valid.autoTrim = false;
            -       });
            -
            + });
            @@ -3235,7 +1332,7 @@

            emDisplayType

            @@ -3250,7 +1347,7 @@

            errorAbort

            @@ -3263,8 +1360,7 @@

            Example:

                   $(document).ready( function($evt){
                        JC.Valid.errorAbort = true;
            -       });
            -
            + });
            @@ -3275,13 +1371,28 @@

            focusmsgEverytime

            focus 时,是否总是显示 focusmsg 提示信息

            Default: true

            +
            +
            +

            ignoreAutoCheckEvent

            + Bool + static +
            +

            + Defined in + ../comps/Valid/Valid.js:900 +

            +
            +
            +

            是否禁用 自动 check 事件( focus, blur, change )

            +
            +

            Default: false

            itemCallback

            @@ -3290,7 +1401,7 @@

            itemCallback

            @@ -3303,10 +1414,9 @@

            Example:

                   $(document).ready( function($evt){
                        JC.Valid.itemCallback =
                            function( _item, _isValid ){
            -                   JC.log( 'JC.Valid.itemCallback _isValid:', _isValid );
            +                   JC.log( 'JC.Valid.itemCallback _isValid:', _isValid );
                            };
            -       });
            -
            + });
            @@ -3317,7 +1427,7 @@

            showValidStatus

            @@ -3334,7 +1444,7 @@

            ValidCorrect

            @@ -3347,7 +1457,7 @@

            ValidError

            diff --git a/docs_api/classes/JC.alert.html b/docs_api/classes/JC.alert.html index 2be5dda3e..1d7fc19d9 100644 --- a/docs_api/classes/JC.alert.html +++ b/docs_api/classes/JC.alert.html @@ -3,11 +3,17 @@ JC.alert - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            alert 提示 popup
            这个是不带 蒙板的 popup 弹框
            注意, 这是个方法, 写 @class 属性是为了生成文档

            -

            requires: jQuery, Panel

            JC Project Site | API docs | demo link

            +

            see also: JC.Panel

            Constructor

            @@ -148,7 +189,7 @@

            JC.alert

            @@ -181,10 +222,10 @@

            Parameters:

            _cb Function
            -

            点击弹框确定按钮的回调 -

            function( _evtName, _panelIns ){ + <p>点击弹框确定按钮的回调</p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
            @@ -192,7 +233,7 @@

            Parameters:

            Returns:

            @@ -389,7 +430,7 @@

            _init

            @@ -412,7 +453,7 @@

            _logic.fixWidth

            @@ -453,7 +494,7 @@

            _logic.fixWidth

            @@ -503,7 +544,7 @@

            _logic.getLeft

            @@ -574,7 +615,7 @@

            _logic.getTop

            @@ -639,7 +680,7 @@

            _logic.hideEffect

            @@ -683,7 +724,7 @@

            _logic.onresize

            @@ -729,7 +770,7 @@

            _logic.popup

            @@ -778,7 +819,7 @@

            Parameters:

            Returns:

            - JC.Panel +

            JC.Panel

            @@ -795,7 +836,7 @@

            _logic.popupIdentifier

            @@ -829,7 +870,7 @@

            _logic.showEffect

            @@ -865,7 +906,7 @@

            autoClose

            @@ -898,7 +939,7 @@

            body

            @@ -919,7 +960,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -929,7 +970,7 @@

            center

            @@ -948,7 +989,7 @@

            clickClose

            @@ -972,7 +1013,7 @@

            close

            @@ -986,7 +1027,7 @@

            dispose

            @@ -1009,7 +1050,7 @@

            find

            @@ -1030,7 +1071,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -1040,7 +1081,7 @@

            focusButton

            @@ -1064,7 +1105,7 @@

            footer

            @@ -1086,7 +1127,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -1105,7 +1146,7 @@

            header

            @@ -1127,7 +1168,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -1137,7 +1178,7 @@

            hide

            @@ -1154,7 +1195,7 @@

            isClickClose

            @@ -1163,7 +1204,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -1176,7 +1217,7 @@

            layout

            @@ -1204,7 +1245,7 @@

            on

            @@ -1236,16 +1277,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -1264,7 +1304,7 @@

            panel

            @@ -1285,7 +1325,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -1304,7 +1344,7 @@

            positionWith

            @@ -1338,7 +1378,7 @@

            selector

            @@ -1364,7 +1404,7 @@

            show

            @@ -1390,8 +1430,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -1410,7 +1449,7 @@

            trigger

            @@ -1439,9 +1478,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -1460,7 +1498,7 @@

            triggerSelector

            @@ -1494,7 +1532,7 @@

            _logic

            @@ -1508,7 +1546,7 @@

            _logic.maxWidth

            @@ -1523,7 +1561,7 @@

            _logic.minWidth

            @@ -1538,7 +1576,7 @@

            _logic.tpls

            @@ -1552,7 +1590,7 @@

            _logic.tpls.alert

            @@ -1566,7 +1604,7 @@

            _logic.tpls.confirm

            @@ -1580,7 +1618,7 @@

            _logic.tpls.msgbox

            @@ -1594,7 +1632,7 @@

            _logic.xoffset

            @@ -1609,7 +1647,7 @@

            _logic.yoffset

            @@ -1624,7 +1662,7 @@

            _model

            @@ -1637,7 +1675,7 @@

            _view

            @@ -1650,7 +1688,7 @@

            tpl

            @@ -1667,7 +1705,7 @@

            beforecenter

            @@ -1677,8 +1715,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1688,7 +1725,7 @@

            beforeclose

            @@ -1698,11 +1735,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1712,7 +1748,7 @@

            beforehide

            @@ -1722,8 +1758,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1733,7 +1768,7 @@

            beforeshow

            @@ -1743,8 +1778,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1754,7 +1788,7 @@

            cancel

            @@ -1763,11 +1797,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1777,7 +1810,7 @@

            center

            @@ -1786,8 +1819,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1797,7 +1829,7 @@

            close

            @@ -1806,11 +1838,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1820,7 +1851,7 @@

            confirm

            @@ -1829,11 +1860,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1843,7 +1873,7 @@

            hide

            @@ -1853,8 +1883,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1864,7 +1893,7 @@

            show

            @@ -1873,8 +1902,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/.window.html b/docs_api/classes/JC.common.html similarity index 50% rename from docs_api/classes/.window.html rename to docs_api/classes/JC.common.html index 576087aba..4e6ba2438 100644 --- a/docs_api/classes/.window.html +++ b/docs_api/classes/JC.common.html @@ -2,12 +2,18 @@ - .window - jquery components - + JC.common - jquery components + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -103,14 +144,18 @@

            APIs

            -

            .window Class

            +

            JC.common Class

            - Defined in: ../lib.js:23 + Defined in: ../common.js:40
            -

            全局函数

            +

            JC 组件通用静态方法和属性 ( JC.common, 别名: JC.f ) +
            所有 JC 组件都会依赖这个静态类

            +

            require: jQuery

            +

            JC Project Site +| API docs

              @@ -124,26 +169,74 @@

              Item Index

              Methods

              Properties

              Methods

              +
              +

              addAutoInit

              +
              + (
                +
              • + _class +
              • +
              ) +
              + static +
              +

              + Defined in + ../common.js:1152 +

              +
              +
              +

              添加需要自动识别的组件

              +
              +
              +

              Parameters:

              +
                +
              • + _class + Class +
                +
                +
              • +
              +
              +
              +

              Example:

              +
              +
               JC.f.addAutoInit( JC.Calendar );
              +
              +
              +

              addUrlParams

              @@ -284,12 +458,12 @@

              addUrlParams

              添加URL参数 -
              require: delUrlParam

              +
              require: delUrlParam, filterXSS

              Parameters:

              @@ -311,47 +485,45 @@

              Parameters:

              Returns:

              - string +

              string

              Example:

              -
                 var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );
              -
              +
                     var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );
              -
              -

              cloneDate

              +
              +

              arrayId

              (
              • - _date + _ar
              )
              - Date + static
              -

              克隆日期对象

              +

              一维数组去重

              Parameters:

              • - _date - Date + _ar + Array
                -

                需要克隆的日期

              @@ -359,41 +531,71 @@

              Parameters:

              Returns:

              - Date: - 需要克隆的日期对象 +

              Array

              -
              -

              dateDetect

              +
              +

              autoInit

              (
              • - _dateStr + _selector +
              • +
              ) +
              + static +
              +

              + Defined in + ../common.js:1135 +

              +
              +
              +

              执行自动识别的组件

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +
              +

              cloneDate

              +
              + (
                +
              • + _date
              )
              - Date | Null + Date static
              -

              日期占位符识别功能

              +

              克隆日期对象

              Parameters:

              • - _dateStr - String + _date + Date
                -

                如果 起始字符为 NOW, 那么将视为当前日期

                +

                需要克隆的日期

              @@ -401,32 +603,16 @@

              Parameters:

              Returns:

              - Date | Null: -
              -
              -
              -

              Example:

              -
              -
               dateDetect( 'now' ); //2014-10-02
              - dateDetect( 'now,3d' ); //2013-10-05
              - dateDetect( 'now,-3d' ); //2013-09-29
              - dateDetect( 'now,2w' ); //2013-10-16
              - dateDetect( 'now,-2m' ); //2013-08-02
              - dateDetect( 'now,4y' ); //2017-10-02
              - dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10
              -
              + Date:
              -
              -

              delUrlParam

              +
              +

              cloneObject

              (
              • - _url -
              • -
              • - _key + _inObj
              )
              @@ -437,24 +623,18 @@

              delUrlParam

              -

              删除URL参数

              +

              深度克隆对象

              Parameters:

              • - _url - String -
                -
                -
              • -
              • - _key - String + _inObj + Object
              • @@ -463,88 +643,41 @@

                Parameters:

                Returns:

                - string -
                -
                -
                -

                Example:

                -
                -
                   var url = delUrlParam( location.href, 'tag' );
                -
                +

                Object

              -
              -

              easyEffect

              +
              +

              dateDetect

              (
              • - _cb -
              • -
              • - _maxVal -
              • -
              • - _startVal -
              • -
              • - _duration -
              • -
              • - _stepMs + _dateStr
              )
              - + Date | Null static
              -

              缓动函数, 动画效果为按时间缓动 -
              这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval

              +

              日期占位符识别功能

              Parameters:

              • - _cb - Function -
                -

                缓动运动时的回调

                -
                -
              • -
              • - _maxVal - Number -
                -

                缓动的最大值, default = 200

                -
                -
              • -
              • - _startVal - Number -
                -

                缓动的起始值, default = 0

                -
                -
              • -
              • - _duration - Number -
                -

                缓动的总时间, 单位毫秒, default = 200

                -
                -
              • -
              • - _stepMs - Number + _dateStr + String
                -

                缓动的间隔, 单位毫秒, default = 2

                +

                如果起始字符为 NOW, 那么将视为当前日期 + , 如果起始字符为 NOWFirst, 那么将视为当前月的1号

              @@ -552,36 +685,31 @@

              Parameters:

              Returns:

              - interval + Date | Null:

              Example:

              -
                 $(document).ready(function(){
              -       window.js_output = $('span.js_output');
              -       window.ls = [];
              -       window.EFF_INTERVAL = easyEffect( effectcallback, 100);
              -   });
              -   function effectcallback( _stepval, _done ){
              -       js_output.html( _stepval );
              -       ls.push( _stepval );
              -       !_done && js_output.html( _stepval );
              -       _done && js_output.html( _stepval + '<br />' + ls.join() );
              -   }
              -
              +
               dateDetect( 'now' ); //2014-10-02
              + dateDetect( 'now,3d' ); //2013-10-05
              + dateDetect( 'now,-3d' ); //2013-09-29
              + dateDetect( 'now,2w' ); //2013-10-16
              + dateDetect( 'now,-2m' ); //2013-08-02
              + dateDetect( 'now,4y' ); //2017-10-02
              + dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10
              -
              -

              formatISODate

              +
              +

              dateFormat

              (
              • _date
              • - _split + _format
              )
              @@ -592,12 +720,11 @@

              formatISODate

              -

              格式化日期为 YYYY-mm-dd 格式 -
              require: pad_char_f

              +

              日期格式化 (具体格式请查看 PHP Date Formats)

              Parameters:

              @@ -606,14 +733,14 @@

              Parameters:

              _date Date
              -

              要格式化日期的日期对象

              +

              default = now

            • - _split - String | Undefined + _format + String
              -

              定义年月日的分隔符, 默认为 '-'

              +

              default = "YY-MM-DD"

            @@ -621,16 +748,16 @@

            Parameters:

            Returns:

            - string +

            string

            -
            -

            funcName

            +
            +

            dayOfSeason

            (
            • - _func + _date
            )
            @@ -641,18 +768,18 @@

            funcName

            -

            取函数名 ( 匿名函数返回空 )

            +

            取某一天所在季度的开始结束日期,以及第几个Q

            Parameters:

            • - _func - Function + _date + Iso date
            • @@ -661,19 +788,19 @@

              Parameters:

              Returns:

              - string +

              Object

            -
            -

            getJqParent

            +
            +

            dayOfWeek

            (
            • - _selector + _date
            • - _filter + _dayOffset
            )
            @@ -684,24 +811,24 @@

            getJqParent

            -

            获取 selector 的指定父级标签

            +

            取某一天所在星期的开始结束日期,以及第几个星期

            Parameters:

            • - _selector - Selector + _date + Iso date
            • - _filter - Selector + _dayOffset + Int
            • @@ -710,12 +837,12 @@

              Parameters:

              Returns:

              - selector +

              Object

            -
            -

            getUrlParam

            +
            +

            delUrlParam

            (
            • @@ -733,11 +860,12 @@

              getUrlParam

              -

              取URL参数的值

              +

              删除URL参数 +
              require: filterXSS

              Parameters:

              @@ -759,26 +887,25 @@

              Parameters:

              Returns:

              - string +

              string

              Example:

              -
                 var defaultTag = getUrlParam(location.href, 'tag');  
              -
              +
                     var url = delUrlParam( location.href, 'tag' );
              -
              -

              getUrlParams

              +
              +

              delUrlParams

              (
              • _url
              • - _key + _keys
              )
              @@ -789,12 +916,12 @@

              getUrlParams

              -

              取URL参数的值, 这个方法返回数组 -
              与 getUrlParam 的区别是可以获取 checkbox 的所有值

              +

              批量删除URL参数 +
              require: delUrlParam

              Parameters:

              @@ -806,8 +933,8 @@

              Parameters:

            • - _key - String + _keys + Array
            • @@ -816,26 +943,22 @@

              Parameters:

              Returns:

              - Array +

              string

              Example:

              -
                 var params = getUrlParams(location.href, 'tag');  
              -
              +
                     var url = delUrlParam( location.href, [ 'k1', 'k2' ] );
            -
            -

            hasUrlParam

            +
            +

            docSize

            (
            • - _url -
            • -
            • - _key + _doc
            )
            @@ -846,24 +969,18 @@

            hasUrlParam

            -

            判断URL中是否有某个get参数

            +

            获取 document 的 相关大小

            Parameters:

            • - _url - String -
              -
              -
            • -
            • - _key - String + _doc + Document
            • @@ -872,23 +989,28 @@

              Parameters:

              Returns:

              - bool -
              -
              -
              -

              Example:

              -
              -
               var bool = hasUrlParam( 'getkey' );
              -
              +

              Object

            -
            -

            httpRequire

            +
            +

            easyEffect

            (
            • - _msg + _cb +
            • +
            • + _maxVal +
            • +
            • + _startVal +
            • +
            • + _duration +
            • +
            • + _stepMs
            )
            @@ -899,20 +1021,49 @@

            httpRequire

            -

            提示需要 HTTP 环境

            +

            缓动函数, 动画效果为按时间缓动 +
            这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval

            Parameters:

            • - _msg - String + _cb + Function +
              +

              缓动运动时的回调

              +
              +
            • +
            • + _maxVal + Number +
              +

              缓动的最大值, default = 200

              +
              +
            • +
            • + _startVal + Number +
              +

              缓动的起始值, default = 0

              +
              +
            • +
            • + _duration + Number +
              +

              缓动的总时间, 单位毫秒, default = 200

              +
              +
            • +
            • + _stepMs + Number
              -

              要提示的文字, 默认 "本示例需要HTTP环境'

              +

              缓动的间隔, 单位毫秒, default = 2

            @@ -920,50 +1071,55 @@

            Parameters:

            Returns:

            - bool 如果是HTTP环境返回true, 否则返回false +

            interval

            +
            +
            +
            +

            Example:

            +
            +
                   $(document).ready(function(){
            +           window.js_output = $('span.js_output');
            +           window.ls = [];
            +           window.EFF_INTERVAL = easyEffect( effectcallback, 100);
            +       });
            +       function effectcallback( _stepval, _done ){
            +           js_output.html( _stepval );
            +           ls.push( _stepval );
            +           !_done && js_output.html( _stepval );
            +           _done && js_output.html( _stepval + '<br />' + ls.join() );
            +       }
            -
            -

            isSameDay

            +
            +

            encoder

            (
            • - _d1 -
            • -
            • - _d2 + _selector
            )
            - Bool + Encode function static
            -

            判断两个日期是否为同一天

            +

            URL 请求时, 获取对URL参数进行编码的函数

            Parameters:

            • - _d1 - Date -
              -

              需要判断的日期1

              -
              -
            • -
            • - _d2 - Date + _selector + Selector
              -

              需要判断的日期2

            @@ -971,50 +1127,59 @@

            Parameters:

            Returns:

            - Bool: + Encode function: +

            default encodeURIComponent

            -
            -

            isSameMonth

            +
            +

            extendObject

            (
            • - _d1 + _source
            • - _d2 + _new +
            • +
            • + _overwrite
            )
            - Bool + static
            -

            判断两个日期是否为同一月份

            +

            扩展对象属性

            Parameters:

            • - _d1 - Date + _source + Object
              -

              需要判断的日期1

            • - _d2 - Date + _new + Object
              -

              需要判断的日期2

              +
              +
            • +
            • + _overwrite + Bool +
              +

              是否覆盖已有属性, default = true

            @@ -1022,142 +1187,130 @@

            Parameters:

            Returns:

            - Bool: +

            object

            -
            -

            jcAutoInitComps

            +
            +

            filterXSS

            (
            • - _selector + _s
            )
            + + + static
            -

            动态添加内容时, 初始化可识别的组件 -

            -
            目前会自动识别的组件,
            -
            - Bizs.CommonModify, JC.Panel, JC.Dialog -
            自动识别的组件不用显式调用 jcAutoInitComps 去识别可识别的组件 -
            - -
            -
            可识别的组件
            -
            - JC.AutoSelect, JC.Calendar, JC.AutoChecked, JC.AjaxUpload -
            Bizs.DisableLogic, Bizs.FormLogic -
            -

            +

            xss 过滤函数

            Parameters:

            • - _selector - Selector + _s + String
            +
            +

            Returns:

            +
            +

            string

            +
            +
            -
            -

            loaderDetect

            +
            +

            formatISODate

            (
            • - _require -
            • -
            • - _class + _date
            • - _cb + _split
            )
            + + + static
            -

            模块加载器自动识别函数 -
            目前可识别 requirejs -
            计划支持的加载器 seajs

            +

            格式化日期为 YYYY-mm-dd 格式 +
            require: pad_char_f

            Parameters:

            • - _require - Array of dependency | Class -
              -
              -
            • -
            • - _class - Class | Callback + _date + Date
              +

              要格式化日期的日期对象

            • - _cb - Callback + _split + String | Undefined
              +

              定义年月日的分隔符, 默认为 '-'

            -
            -

            Example:

            -
            -
             loaderDetect( JC.AutoSelect );
            - loaderDetect( [ 'JC.AutoSelect', 'JC.AutoChecked' ], JC.Form );
            -
            +
            +

            Returns:

            +
            +

            string

            -
            -

            maxDayOfMonth

            +
            +

            funcName

            (
            • - _date + _func
            )
            - Int + static
            -

            取得一个月份中最大的一天

            +

            取函数名 ( 匿名函数返回空 )

            Parameters:

            • - _date - Date + _func + Function
            • @@ -1166,63 +1319,1168 @@

              Parameters:

              Returns:

              - Int: - 月份中最大的一天 +

              string

            -
            -

            mousewheelEvent

            +
            +

            getJqParent

            (
            • - _cb + _selector
            • - _detach + _filter
            )
            + + + static
            -

            绑定或清除 mousewheel 事件

            +

            获取 selector 的指定父级标签

            Parameters:

            • - _cb - Function + _selector + Selector
            • - _detach - Bool + _filter + Selector
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            -
            -

            padChar

            +
            +

            getUrlParam

            (
            • - _str + _url +
            • +
            • + _key
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:384 +

            +
            +
            +

            取URL参数的值 +
            require: filterXSS

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +

            Example:

            +
            +
                   var defaultTag = getUrlParam(location.href, 'tag');  
            +
            +
            +
            +
            +

            getUrlParams

            +
            + (
              +
            • + _url +
            • +
            • + _key +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:412 +

            +
            +
            +

            取URL参数的值, 这个方法返回数组 +
            与 getUrlParam 的区别是可以获取 checkbox 的所有值 +
            require: filterXSS

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            Array

            +
            +
            +
            +

            Example:

            +
            +
                   var params = getUrlParams(location.href, 'tag');  
            +
            +
            +
            +
            +

            gid

            + () + + + + static +
            +

            + Defined in + ../common.js:218 +

            +
            +
            +

            生成全局唯一ID

            +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +
            +

            hasUrlParam

            +
            + (
              +
            • + _url +
            • +
            • + _key +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:321 +

            +
            +
            +

            判断URL中是否有某个get参数

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            bool

            +
            +
            +
            +

            Example:

            +
            +
             var bool = hasUrlParam( 'getkey' );
            +
            +
            +
            +
            +

            httpRequire

            +
            + (
              +
            • + _msg +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:489 +

            +
            +
            +

            提示需要 HTTP 环境

            +
            +
            +

            Parameters:

            +
              +
            • + _msg + String +
              +

              要提示的文字, 默认 "本示例需要HTTP环境'

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            bool 如果是HTTP环境返回true, 否则返回false

            +
            +
            +
            +
            +

            isSameDay

            +
            + (
              +
            • + _d1 +
            • +
            • + _d2 +
            • +
            ) +
            + + Bool + + static +
            +

            + Defined in + ../common.js:660 +

            +
            +
            +

            判断两个日期是否为同一天

            +
            +
            +

            Parameters:

            +
              +
            • + _d1 + Date +
              +

              需要判断的日期1

              +
              +
            • +
            • + _d2 + Date +
              +

              需要判断的日期2

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Bool: +
            +
            +
            +
            +

            isSameMonth

            +
            + (
              +
            • + _d1 +
            • +
            • + _d2 +
            • +
            ) +
            + + Bool + + static +
            +

            + Defined in + ../common.js:672 +

            +
            +
            +

            判断两个日期是否为同一月份

            +
            +
            +

            Parameters:

            +
              +
            • + _d1 + Date +
              +

              需要判断的日期1

              +
              +
            • +
            • + _d2 + Date +
              +

              需要判断的日期2

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Bool: +
            +
            +
            +
            +

            isSameSeason

            +
            + (
              +
            • + _d1 +
            • +
            • + _d2 +
            • +
            ) +
            + + Bool + + static +
            +

            + Defined in + ../common.js:716 +

            +
            +
            +

            判断两个日期是否为同一季度

            +
            +
            +

            Parameters:

            +
              +
            • + _d1 + Date +
              +

              需要判断的日期1

              +
              +
            • +
            • + _d2 + Date +
              +

              需要判断的日期2

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Bool: +
            +
            +
            +
            +

            isSameWeek

            +
            + (
              +
            • + _d1 +
            • +
            • + _d2 +
            • +
            ) +
            + + Bool + + static +
            +

            + Defined in + ../common.js:685 +

            +
            +
            +

            判断两个日期是否为同一季度

            +
            +
            +

            Parameters:

            +
              +
            • + _d1 + Date +
              +

              需要判断的日期1

              +
              +
            • +
            • + _d2 + Date +
              +

              需要判断的日期2

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Bool: +
            +
            +
            +
            +

            isSameYear

            +
            + (
              +
            • + _d1 +
            • +
            • + _d2 +
            • +
            ) +
            + + Bool + + static +
            +

            + Defined in + ../common.js:748 +

            +
            +
            +

            判断两个日期是否为同一年

            +
            +
            +

            Parameters:

            +
              +
            • + _d1 + Date +
              +

              需要判断的日期1

              +
              +
            • +
            • + _d2 + Date +
              +

              需要判断的日期2

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Bool: +
            +
            +
            +
            +

            maxDayOfMonth

            +
            + (
              +
            • + _date +
            • +
            ) +
            + + Int + + static +
            +

            + Defined in + ../common.js:889 +

            +
            +
            +

            取得一个月份中最大的一天

            +
            +
            +

            Parameters:

            +
              +
            • + _date + Date +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Int: +

            月份中最大的一天

            +
            +
            +
            +
            +

            moneyFormat

            +
            + (
              +
            • + _number +
            • +
            • + _len +
            • +
            • + _floatLen +
            • +
            • + _splitSymbol +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:1372 +

            +
            +
            +

            逗号格式化金额

            +
            +
            +

            Parameters:

            +
              +
            • + _number + Int | String +
              +
              +
            • +
            • + _len + Int +
              +
              +
            • +
            • + _floatLen + Int +
              +
              +
            • +
            • + _splitSymbol + Int +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +
            +

            mousewheelEvent

            +
            + (
              +
            • + _cb +
            • +
            • + _detach +
            • +
            • + _selector +
            • +
            ) +
            + static +
            +

            + Defined in + ../common.js:987 +

            +
            +
            +

            绑定或清除 mousewheel 事件

            +
            +
            +

            Parameters:

            +
              +
            • + _cb + Function +
              +
              +
            • +
            • + _detach + Bool +
              +
              +
            • +
            • + _selector + Selector +
              +

              default = document

              +
              +
            • +
            +
            +
            +
            +

            padChar

            +
            + (
              +
            • + _str +
            • +
            • + _len +
            • +
            • + _char +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:562 +

            +
            +
            +

            js 附加字串函数

            +
            +
            +

            Parameters:

            +
              +
            • + _str + String +
              +
              +
            • +
            • + _len + Intl +
              +
              +
            • +
            • + _char + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +
            +

            parentSelector

            +
            + (
              +
            • + _item +
            • +
            • + _selector +
            • +
            • + _finder +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:1037 +

            +
            +
            +

            扩展 jquery 选择器 +
            扩展起始字符的 '/' 符号为 jquery 父节点选择器 +
            扩展起始字符的 '|' 符号为 jquery 子节点选择器 +
            扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )

            +
            +
            +

            Parameters:

            +
              +
            • + _item + Selector +
              +
              +
            • +
            • + _selector + String +
              +
              +
            • +
            • + _finder + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            parseBool

            +
            + (
              +
            • + _input +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:968 +

            +
            +
            +

            把输入值转换为布尔值

            +
            +
            +

            Parameters:

            +
              +
            • + _input + +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            bool

            +
            +
            +
            +
            +

            parseDate

            +
            + (
              +
            • + _date +
            • +
            • + _selector +
            • +
            • + _forceISO +
            • +
            ) +
            + + Date | Null + + static +
            +

            + Defined in + ../common.js:615 +

            +
            +
            +

            从日期字符串解析日期对象 +
            兼容 JC.Calendar 日期格式

            +
            +
            +

            Parameters:

            +
              +
            • + _date + Date +
              +
              +
            • +
            • + _selector + Selector +
              +

              如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化

              +
              +
            • +
            • + _forceISO + Boolean +
              +

              是否强制转换为ISO日期

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Date | Null: +
            +
            +
            +
            +

            parseFinance

            +
            + (
              +
            • + _i +
            • +
            • + _dot +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:547 +

            +
            +
            +

            取小数点的N位 +
            JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题

            +
            +
            +

            Parameters:

            +
              +
            • + _i + Number +
              +
              +
            • +
            • + _dot + Int +
              +

              default = 2

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            number

            +
            +
            +
            +
            +

            parseISODate

            +
            + (
              +
            • + _datestr +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:592 +

            +
            +
            +

            从 ISODate 字符串解析日期对象

            +
            +
            +

            Parameters:

            +
              +
            • + _datestr + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            date

            +
            +
            +
            +
            +

            printf

            +
            + (
              +
            • + _str +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:287 +

            +
            +
            +

            按格式输出字符串

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +

            Example:

            +
            +
             printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
            + //return asdfasdf000sdfasdf1111
            +
            +
            +
            +
            +

            printKey

            +
            + (
              +
            • + _str +
            • +
            • + _keys +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:303 +

            +
            +
            +

            按格式输出字符串

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +

            Example:

            +
            +
             JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );
            + //return asdfasdf000sdfasdf1111,222
            +
            +
            +
            +
            +

            pureDate

            +
            + (
              +
            • + _d +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../common.js:639 +

            +
            +
            +

            获取不带 时分秒的 日期对象

            +
            +
            +

            Parameters:

            +
              +
            • + _d + Date +
              +

              可选参数, 如果为空 = new Date

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            Date

            +
            +
            +
            +
            +

            relativePath

            +
            + (
            • - _len + _path
            • - _char + _url
            )
            @@ -1233,29 +2491,23 @@

            padChar

            -

            js 附加字串函数

            +

            把 URL 相对路径 转换为 绝对路径

            Parameters:

            • - _str + _path String
            • - _len - Intl -
              -
              -
            • -
            • - _char + _url String
              @@ -1265,77 +2517,72 @@

              Parameters:

              Returns:

              - string +

              string

            -
            -

            parentSelector

            +
            +

            reloadPage

            (
            • - _item + _url
            • - _selector + _nornd
            • - _finder + _delayms
            )
            - - - static
            -

            扩展 jquery 选择器 -
            扩展起始字符的 '/' 符号为 jquery 父节点选择器 -
            扩展起始字符的 '|' 符号为 jquery 子节点选择器 -
            扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )

            +

            重载页面 +
            require: removeUrlSharp, addUrlParams, filterXSS

            Parameters:

            • - _item - Selector + _url + String
            • - _selector - String + _nornd + Bool
            • - _finder - Selector + _delayms + Int
            -
            -

            Returns:

            -
            - selector -
            -
            -
            -

            parseBool

            +
            +

            removeUrlSharp

            (
            • - _input + _url +
            • +
            • + _nornd +
            • +
            • + _rndName
            )
            @@ -1346,18 +2593,32 @@

            parseBool

            -

            把输入值转换为布尔值

            +

            删除 URL 的锚点 +
            require: addUrlParams, filterXSS

            Parameters:

            • - _input - + _url + String +
              +
              +
            • +
            • + _nornd + Bool +
              +

              是否不添加随机参数

              +
              +
            • +
            • + _rndName + String
            • @@ -1366,19 +2627,25 @@

              Parameters:

              Returns:

              - bool +

              string

            -
            -

            parseFinance

            +
            +

            safeTimeout

            (
            • - _i + _timeout +
            • +
            • + _obj +
            • +
            • + _name
            • - _dot, + _ms
            )
            @@ -1389,27 +2656,40 @@

            parseFinance

            -

            取小数点的N位 -
            JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题

            +

            timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行

            Parameters:

            • - _i - Number + _timeout + Timeout | Function +
              +
              +
            • +
            • + _obj + Object +
              +

              default = window.TIMEOUT_HOST || {}

              +
              +
            • +
            • + _name + String
              +

              default = 'NORMAL'

            • - _dot, + _ms Int
              -

              default = 2

              +

              default = 50

            @@ -1417,16 +2697,16 @@

            Parameters:

            Returns:

            - number +

            object

            -
            -

            parseISODate

            +
            +

            scriptContent

            (
            • - _datestr + _selector
            )
            @@ -1437,18 +2717,18 @@

            parseISODate

            -

            从 ISODate 字符串解析日期对象

            +

            获取脚本模板的内容

            Parameters:

            • - _datestr - String + _selector + Selector
            • @@ -1457,87 +2737,63 @@

              Parameters:

              Returns:

              - date +

              string

            -
            -

            printf

            -
            - (
              -
            • - _str -
            • -
            ) -
            +
            +

            scriptPath

            + () - + String static
            -

            按格式输出字符串

            +

            取当前脚本标签的 src路径

            -
            -

            Parameters:

            - -

            Returns:

            - string -
            -
            -
            -

            Example:

            -
            -
             printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
            - //return asdfasdf000sdfasdf1111
            -
            + String: +

            脚本所在目录的完整路径

            -
            -

            pureDate

            +
            +

            seasonOfYear

            (
            • - _d + _year
            )
            + static
            -

            获取不带 时分秒的 日期对象

            +

            取一年中所有的季度, 及其开始结束日期

            Parameters:

            • - _d - Date + _year + Int
              -

              可选参数, 如果为空 = new Date

            @@ -1545,70 +2801,56 @@

            Parameters:

            Returns:

            - Date +

            Array

            -
            -

            reloadPage

            +
            +

            sliceArgs

            (
            • - $url -
            • -
            • - $nornd -
            • -
            • - $delayms + args
            )
            + + + static
            -

            重载页面 -
            require: removeUrlSharp -
            require: addUrlParams

            +

            把函数的参数转为数组

            Parameters:

            • - $url - String -
              -
              -
            • -
            • - $nornd - Bool -
              -
              -
            • -
            • - $delayms - Int + args + Arguments
            +
            +

            Returns:

            +
            +

            Array

            +
            +
            -
            -

            removeUrlSharp

            +
            +

            urlDetect

            (
            • - $url -
            • -
            • - $nornd + _url
            )
            @@ -1619,27 +2861,21 @@

            removeUrlSharp

            -

            删除 URL 的锚点 -
            require: addUrlParams

            +

            URL 占位符识别功能 +
            require: addUrlParams, filterXSS

            Parameters:

            • - $url + _url String
              -
              -
            • -
            • - $nornd - Bool -
              -

              是否不添加随机参数

              +

              如果 起始字符为 URL, 那么 URL 将祝为本页的URL

            @@ -1647,16 +2883,25 @@

            Parameters:

            Returns:

            - string +

            string

            +
            +
            +
            +

            Example:

            +
            +
             urlDetect( '?test' ); //output: ?test
            + urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2
            + urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2
            + urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2
            -
            -

            scriptContent

            +
            +

            urlHostName

            (
            • - _selector + _url
            )
            @@ -1667,18 +2912,18 @@

            scriptContent

            -

            获取脚本模板的内容

            +

            取 URL 的 host name

            Parameters:

            • - _selector - Selector + _url + String
            • @@ -1687,40 +2932,19 @@

              Parameters:

              Returns:

              - string -
              -
              -
            -
            -

            scriptPath

            - () - - String - - static -
            -

            - Defined in - ../lib.js:396 -

            -
            -
            -

            取当前脚本标签的 src路径

            -
            -
            -

            Returns:

            -
            - String: - 脚本所在目录的完整路径 +

            string

            -
            -

            sliceArgs

            +
            +

            weekOfYear

            (
            • - args + _year +
            • +
            • + _dayOffset
            )
            @@ -1731,19 +2955,26 @@

            sliceArgs

            -

            把函数的参数转为数组

            +

            取一年中所有的星期, 及其开始结束日期

            Parameters:

            • - args - Arguments + _year + Int +
              +
              +
            • +
            • + _dayOffset + Int
              +

              每周的默认开始为周几, 默认0(周一)

            @@ -1751,16 +2982,16 @@

            Parameters:

            Returns:

            - Array +

            Array

            -
            -

            urlDetect

            +
            +

            winSize

            (
            • - _url + _win,
            )
            @@ -1771,20 +3002,20 @@

            urlDetect

            -

            URL 占位符识别功能

            +

            获取 window 的 相关大小

            Parameters:

            • - _url - String + _win, + Window
              -

              如果 起始字符为 URL, 那么 URL 将祝为本页的URL

              +

              default = window

            @@ -1792,35 +3023,25 @@

            Parameters:

            Returns:

            - string -
            -
            -
            -

            Example:

            -
            -
             urlDetect( '?test' ); //output: ?test
            - urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2
            - urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2
            - urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2
            -
            +

            Object

            Properties

            -
            -

            $.support.isFixed

            - Bool - static +
            +

            _AUTO_INIT_DATA

            + Object + protected
            -

            判断是否支持 CSS position: fixed

            +

            保存需要自动识别的组件

            @@ -1830,11 +3051,12 @@

            ZINDEX_COUNT

            -

            全局 css z-index 控制属性

            +

            全局 css z-index 控制属性 +
            注意: 这个变量是 window.ZINDEX_COUNT

            Default: 50001

            diff --git a/docs_api/classes/JC.confirm.html b/docs_api/classes/JC.confirm.html index 632b31a0a..73eb3f554 100644 --- a/docs_api/classes/JC.confirm.html +++ b/docs_api/classes/JC.confirm.html @@ -3,11 +3,17 @@ JC.confirm - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            confirm 提示 popup
            这个是不带 蒙板的 popup 弹框
            注意, 这是个方法, 写 @class 属性是为了生成文档

            -

            private property see: JC.alert -

            requires: jQuery, Panel

            JC Project Site | API docs | demo link

            +

            see also: JC.Panel

            Constructor

            @@ -152,7 +192,7 @@

            JC.confirm

            @@ -185,20 +225,20 @@

            Parameters:

            _cb Function
            -

            点击弹框确定按钮的回调 -

            function( _evtName, _panelIns ){ + <p>点击弹框确定按钮的回调</p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
          • _cancelCb Function
            -

            点击弹框取消按钮的回调 -

            function( _evtName, _panelIns ){ + <p>点击弹框取消按钮的回调</p> +<pre>function( _evtName, _panelIns ){ var _btn = $(this); -}

            +}
          • @@ -206,7 +246,7 @@

            Parameters:

            Returns:

            @@ -349,7 +389,7 @@

            _init

            @@ -368,7 +408,7 @@

            autoClose

            @@ -401,7 +441,7 @@

            body

            @@ -422,7 +462,7 @@

            Parameters:

            Returns:

            String: - body 的HTML内容 +

            body 的HTML内容

            @@ -432,7 +472,7 @@

            center

            @@ -451,7 +491,7 @@

            clickClose

            @@ -475,7 +515,7 @@

            close

            @@ -489,7 +529,7 @@

            dispose

            @@ -512,7 +552,7 @@

            find

            @@ -533,7 +573,7 @@

            Parameters:

            Returns:

            - selector +

            selector

            @@ -543,7 +583,7 @@

            focusButton

            @@ -567,7 +607,7 @@

            footer

            @@ -589,7 +629,7 @@

            Parameters:

            Returns:

            String: - footer 的HTML内容 +

            footer 的HTML内容

            @@ -608,7 +648,7 @@

            header

            @@ -630,7 +670,7 @@

            Parameters:

            Returns:

            String: - header 的HTML内容 +

            header 的HTML内容

            @@ -640,7 +680,7 @@

            hide

            @@ -657,7 +697,7 @@

            isClickClose

            @@ -666,7 +706,7 @@

            isClickClose

            Returns:

            - bool +

            bool

            @@ -679,7 +719,7 @@

            layout

            @@ -707,7 +747,7 @@

            on

            @@ -739,16 +779,15 @@

            Parameters:

            Example:

                       //绑定内置事件
            -           <button type="button" eventtype="close">text</button>
            +           <button type="button" eventtype="close">text</button>
                        <script>
            -           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +           panelInstace.on( 'close', function( _evt, _panel ){ do something } );
                        </script>
                        //绑定自定义事件
            -           <button type="button" eventtype="userevent">text</button>
            +           <button type="button" eventtype="userevent">text</button>
                        <script>
            -           panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -           </script>
            -
            + panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } ); + </script>
            @@ -767,7 +806,7 @@

            panel

            @@ -788,7 +827,7 @@

            Parameters:

            Returns:

            String: - panel 的HTML内容 +

            panel 的HTML内容

            @@ -807,7 +846,7 @@

            positionWith

            @@ -841,7 +880,7 @@

            selector

            @@ -867,7 +906,7 @@

            show

            @@ -893,8 +932,7 @@

            Example:

             panelInstace.show();            //默认显示
              panelInstace.show( 0 );         //居中显示
            - panelInstace.show( _selector ); //位于 _selector 的上下左右
            -
            + panelInstace.show( _selector ); //位于 _selector 的上下左右
            @@ -913,7 +951,7 @@

            trigger

            @@ -942,9 +980,8 @@

            Parameters:

            Example:

            -
             panelInstace.trigger('close');
            - panelInstace.trigger('userevent', sourceElement);
            -
            +
             panelInstace.trigger('close');
            + panelInstace.trigger('userevent', sourceElement);
            @@ -963,7 +1000,7 @@

            triggerSelector

            @@ -997,7 +1034,7 @@

            _model

            @@ -1010,7 +1047,7 @@

            _view

            @@ -1023,7 +1060,7 @@

            tpl

            @@ -1040,7 +1077,7 @@

            beforecenter

            @@ -1050,8 +1087,7 @@

            beforecenter

            Example:

            -
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            @@ -1061,7 +1097,7 @@

            beforeclose

            @@ -1071,11 +1107,10 @@

            beforeclose

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1085,7 +1120,7 @@

            beforehide

            @@ -1095,8 +1130,7 @@

            beforehide

            Example:

            -
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            @@ -1106,7 +1140,7 @@

            beforeshow

            @@ -1116,8 +1150,7 @@

            beforeshow

            Example:

            -
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            @@ -1127,7 +1160,7 @@

            cancel

            @@ -1136,11 +1169,10 @@

            cancel

            Example:

            -
             <button type="button" eventtype="cancel">text</button>
            +                
             <button type="button" eventtype="cancel">text</button>
              <script>
            - panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1150,7 +1182,7 @@

            center

            @@ -1159,8 +1191,7 @@

            center

            Example:

            -
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            @@ -1170,7 +1201,7 @@

            close

            @@ -1179,11 +1210,10 @@

            close

            Example:

            -
             <button type="button" eventtype="close">text</button>
            +                
             <button type="button" eventtype="close">text</button>
              <script>
            - panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'close', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1193,7 +1223,7 @@

            confirm

            @@ -1202,11 +1232,10 @@

            confirm

            Example:

            -
             <button type="button" eventtype="confirm">text</button>
            +                
             <button type="button" eventtype="confirm">text</button>
              <script>
            - panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            - </script>
            -
            + panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something }); + </script>
            @@ -1216,7 +1245,7 @@

            hide

            @@ -1226,8 +1255,7 @@

            hide

            Example:

            -
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            @@ -1237,7 +1265,7 @@

            show

            @@ -1246,8 +1274,7 @@

            show

            Example:

            -
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -
            +
             panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            diff --git a/docs_api/classes/JC.Bizs.html b/docs_api/classes/JC.f.html similarity index 57% rename from docs_api/classes/JC.Bizs.html rename to docs_api/classes/JC.f.html index d81ef7a2e..531cfda0b 100644 --- a/docs_api/classes/JC.Bizs.html +++ b/docs_api/classes/JC.f.html @@ -2,12 +2,18 @@ - JC.Bizs - jquery components - + JC.f - jquery components + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -103,24 +144,15 @@

            APIs

            -

            JC.Bizs Class

            +

            JC.f Class

            - Defined in: ../lib.js:1165 + Defined in: ../common.js:34
            -

            业务逻辑命名空间

            -


            这个命名空间的组件主要为满足业务需求, 不是通用组件~ -
            但在某个项目中应该是常用组件~

            -
            -
            业务组件的存放位置:
            -
            libpath/bizs/
            -
            使用业务组件
            -
            JC.use( 'Bizs.BizComps' ); // libpath/bizs/BizComps/BizComps.js
            -
            使用业务文件
            -
            JC.use( 'bizs.BizFile' ); // libpath/bizs/BizFile.js
            -
            +

            JC.f 是 JC.common 的别名 +
            具体使用请见 JC.common

            @@ -269,7 +358,7 @@

            _beforeInit

            @@ -289,7 +378,7 @@

            _init

            @@ -314,7 +403,7 @@

            _inited

            @@ -328,12 +417,54 @@

            _initHanlderEvent

            内部事件初始化方法

            +
            +
            +

            disableButton

            +
            + (
              +
            • + _selector +
            • +
            • + _durationMs +
            • +
            ) +
            + static + +
            +

            禁用按钮一定时间, 默认为1秒

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +

              要禁用button的选择器

              +
              +
            • +
            • + _durationMs + Int +
              +

              禁用多少时间, 单位毫秒, 默认1秒

              +
              +
            • +
            +

            getInstance

            @@ -351,7 +482,7 @@

            getInstance

            @@ -387,7 +518,7 @@

            init

            @@ -423,7 +554,7 @@

            isActionLogic

            @@ -443,7 +574,96 @@

            Parameters:

            Returns:

            - bool +

            bool

            +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + :
            @@ -465,7 +685,7 @@

            on

            @@ -491,7 +711,7 @@

            Parameters:

            Returns:

            - BaseMVCInstance +

            BaseMVCInstance

            @@ -504,7 +724,7 @@

            process

            @@ -533,7 +753,7 @@

            process

            @@ -566,7 +786,7 @@

            selector

            @@ -575,7 +795,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -586,6 +806,9 @@

            trigger

          • _evtName
          • +
          • + _args +
          • )
            @@ -594,11 +817,59 @@

            trigger

            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            -

            使用 jquery trigger 绑定事件

            +

            使用 jquery triggerHandler 触发绑定事件

            Parameters:

            @@ -609,12 +880,18 @@

            Parameters:

            +
          • + _args + | Array +
            +
            +
          • Returns:

            - BaseMVCInstance + :
            diff --git a/docs_api/classes/window.Bizs.AutoSelectComplete.html b/docs_api/classes/window.Bizs.AutoSelectComplete.html new file mode 100644 index 000000000..0e0775d8c --- /dev/null +++ b/docs_api/classes/window.Bizs.AutoSelectComplete.html @@ -0,0 +1,340 @@ + + + + + window.Bizs.AutoSelectComplete - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.AutoSelectComplete Class

            + +
            +

            结合 JC.AutoSelect 与 JC.AutoComplete 综合使用的一个业务逻辑

            +
            应用场景: CRM 多级广告位最后一级因为内容较多, 用户使用传统的下拉框选择比较不便 +
            这个业务组件结合 JC.AutoSelect 和 JC.AutoComplete 提供一种简便的可输入解决方案

            +

            require: + JC.BaseMVC + , JC.AutoComplete + , JC.AutoSelect +

            +

            JC Project Site +| API docs +| demo link

            +

            可用的 HTML attribute

            +
            +
            bascAjaxUrl = url
            +
            + 获取 JC.AutoComplete 数据的 AJAX 接口 +
            +
            数据格式
            +
            + [ { "id": "id value", "label": "label value" }, ... ] +
            +
            +
            +
            bascDefaultSelect = selector
            +
            声明 JC.AutoSelect 的围住 select
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.AutoSelectComplete

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + AutoSelectCompleteInstance + + static + +
            +

            获取或设置 AutoSelectComplete 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + AutoSelectCompleteInstance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of AutoSelectCompleteInstance + + static + +
            +

            初始化可识别的 AutoSelectComplete 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of AutoSelectCompleteInstance: +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.ChangeLogic.html b/docs_api/classes/window.Bizs.ChangeLogic.html new file mode 100644 index 000000000..73d133913 --- /dev/null +++ b/docs_api/classes/window.Bizs.ChangeLogic.html @@ -0,0 +1,496 @@ + + + + + window.Bizs.ChangeLogic - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.ChangeLogic Class

            + +
            +

            input[type=radio|type=checkbox], select change 事件的响应逻辑

            +
            应用场景
            +
            表单操作时, 选择某个 radio 时, 对应的 内容有效, +
            但选择其他 radio 时, 其他的内容无效 +
            checkbox / select 也可使用( 带change事件的标签 )

            +

            require: + JC.BaseMVC +

            +

            JC Project Site +| API docs +| demo link

            +

            div 需要 添加 class="js_bizChangeLogic"

            +

            box 的 HTML 属性

            +
            +
            bclTrigger
            +
            触发禁用/起用的control
            +
            bclDisableTarget
            +
            需要禁用/起用的control
            +
            bclHideTarget
            +
            需要根据禁用起用隐藏/可见的标签
            +
            bclDoneCallback = function
            +
            + 启用/禁用后会触发的回调, window 变量域 +
            function bclDoneCallback( _triggerItem, _boxItem ){
            +   var _ins = this;
            +   JC.log( 'bclDoneCallback', new Date().getTime() );
            +}
            +
            +
            bclEnableCallback = function
            +
            + 启用后的回调, window 变量域 +
            function bclEnableCallback( _triggerItem, _boxItem ){
            +   var _ins = this;
            +   JC.log( 'bclEnableCallback', new Date().getTime() );
            +}
            +
            +
            bclDisableCallback = function
            +
            + 禁用后的回调, window 变量域 +
            function bclDisableCallback( _triggerItem, _boxItem ){
            +   var _ins = this;
            +   JC.log( 'bclDisableCallback', new Date().getTime() );
            +}
            +
            +
            bclChangeCleanTarget = selector
            +
            radio change 的时候, 清除目标选择器的 html 内容
            +
            bclTriggerChangeOnInit = bool, default = true
            +
            初始化实例时, 是否触发 change 事件
            +
            +

            trigger 的 HTML 属性

            +
            +
            bclDisable = bool, default = false
            +
            + 指定 bclDisableTarget 是否置为无效 +
            还可以根据这个属性 指定 bclHideTarget 是否显示 +
            +
            bclDisplay = bool
            +
            指定 bclHideTarget 是否显示
            +
            bclDelimiter = string, default = "||"
            +
            bclDisplay 和 bclDisable 多值分隔符
            +
            bclHideTargetSub = selector
            +
            根据 trigger 的 checked 状态 显示或者隐藏 bclHideTargetSub node
            +
            bclShowToggleFilter = selector | html attr
            +
            显示的时候, 如果匹配到 filter, 那么将会隐藏
            +
            +

            hide target 的 HTML 属性

            +
            +
            bclHideToggle = bool, default = false
            +
            显示或显示的时候, 是否与他项相反
            +
            bclDisableToggle= bool, default = false
            +
            disabled 的时候, 是否与他项相反
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.ChangeLogic

            + () + +
            +
            +
            +

            Example:

            +
            +
               <div class="js_bizChangeLogic"
            +       bclTrigger="/input[type=radio]"
            +       bclDisableTarget="/input.js_disableItem"
            +       >
            +       <label>
            +           <input type="radio" name="discount" checked  
            +           bclDisable="true"
            +           />自本协议签订之日起10日内生效
            +       </label> <br>
            +       <label>
            +           <input type="radio" name="discount" 
            +           bclDisable="false"
            +           />生效时间点
            +       </label>
            +       <input type="text" class="ipt js_disableItem" datatype="date" value=""
            +       /><input type="button" class="UXCCalendar_btn">
            +   </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + ChangeLogic instance + + static + +
            +

            获取或设置 ChangeLogic 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + ChangeLogic instance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector, +
            • +
            ) +
            + static + +
            +

            初始化 _selector | document 可识别的 ChangeLogic HTML属性

            +
            +
            +

            Parameters:

            +
              +
            • + _selector, + Selector +
              +

              default = document

              +
              +
            • +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + + +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            ChangeLogicInstance

            +
            +
            +
            +
            +

            selector

            + () + + + + +
            +

            获取 显示 ChangeLogic 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            ) +
            + + + + +
            +

            使用 jquery trigger 绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            ChangeLogicInstance

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.CommonModify.html b/docs_api/classes/window.Bizs.CommonModify.html index 4a170a7c7..c4e330d9f 100644 --- a/docs_api/classes/window.Bizs.CommonModify.html +++ b/docs_api/classes/window.Bizs.CommonModify.html @@ -3,11 +3,17 @@ window.Bizs.CommonModify - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            -

            Dom 通用 添加删除 逻辑

            -


            应用场景 +

            Dom 通用 添加删除 逻辑

            +
            应用场景
            需要动态添加删除内容的地方可以使用这个类

            +

            require: + JC.BaseMVC +

            JC Project Site | API docs | demo link

            -

            a|button 需要 添加 class="js_autoCommonModify"

            -

            可用的 HTML 属性

            +

            a|button 需要 添加 class="js_autoCommonModify"

            +

            可用的 HTML 属性

            [cmtpl | cmtemplate] = script selector
            指定保存模板的 script 标签
            @@ -133,54 +177,54 @@

            可用的 HTML 属性

            cmdonecallback = function
            添加或删除完后会触发的回调, window 变量域 -function cmdonecallback( _ins, _boxParent ){ +<pre>function cmdonecallback( _ins, _boxParent ){ var _trigger = $(this); - JC.log( 'cmdonecallback', new Date().getTime() ); -} + JC.log( 'cmdonecallback', new Date().getTime() ); +}
            cmtplfiltercallback = function
            模板内容过滤回调, window 变量域 -window.COUNT = 1; +<pre>window.COUNT = 1; function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ var _trigger = $(this); - JC.log( 'cmtplfiltercallback', new Date().getTime() ); - _tpl = printf( _tpl, COUNT++ ); + JC.log( &#39;cmtplfiltercallback&#39;, new Date().getTime() ); + _tpl = JC.f.printf( _tpl, COUNT++ ); return _tpl; -} +}
            cmbeforeaddcallabck = function
            添加之前的回调, 如果返回 false, 将不执行添加操作, window 变量域 -function cmbeforeaddcallabck( _cmitem, _boxParent ){ +<pre>function cmbeforeaddcallabck( _cmitem, _boxParent ){ var _trigger = $(this); - JC.log( 'cmbeforeaddcallabck', new Date().getTime() ); + JC.log( &#39;cmbeforeaddcallabck&#39;, new Date().getTime() ); //return false; -} +}
            cmaddcallback = function
            添加完成的回调, window 变量域 -function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){ +<pre>function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){ var _trigger = $(this); - JC.log( 'cmaddcallback', new Date().getTime() ); -} + JC.log( 'cmaddcallback', new Date().getTime() ); +}
            cmbeforedelcallback = function
            删除之前的回调, 如果返回 false, 将不执行删除操作, window 变量域 -function cmbeforedelcallback( _cmitem, _boxParent ){ +<pre>function cmbeforedelcallback( _cmitem, _boxParent ){ var _trigger = $(this); - JC.log( 'cmbeforedelcallback', new Date().getTime() ); + JC.log( &#39;cmbeforedelcallback&#39;, new Date().getTime() ); //return false; -} +}
            cmdelcallback = function
            删除完成的回调, window 变量域 -function cmdelcallback( _ins, _boxParent ){ - JC.log( 'cmdelcallback', new Date().getTime() ); -} +
            function cmdelcallback( _ins, _boxParent ){
            +   JC.log( 'cmdelcallback', new Date().getTime() );
            +}
            cmMaxItems = int
            @@ -191,7 +235,7 @@

            可用的 HTML 属性

            指定查找所有上传项的选择器语法
            -
            cmOutRangeMsg = string, default = "最多只能上传 {0}个文件!"
            +
            cmOutRangeMsg = string, default = "最多只能上传 {0}个文件!"
            添加数量超出 cmMaxItems 时的提示信息
            @@ -205,7 +249,7 @@

            window.Bizs.CommonModify

            @@ -216,43 +260,42 @@

            Example:

              <table>
                     <tr>
                        <td>
            -               <label class="gray">甲方主体:</label>
            +               <label class="gray">甲方主体:</label>
                        </td>
                        <td>
            -               <input type="text" name="" class="ipt ipt-w320" />&nbsp;
            -                   <a href="javascript:" 
            -                   class="green js_autoCommonModify" 
            -                   cmtemplate="#addMainFirstPartyTpl"
            -                   cmitem="(tr"
            -                   cmaction="add"
            +               <input type="text" name="" class="ipt ipt-w320" />&nbsp;
            +                   <a href="javascript:" 
            +                   class="green js_autoCommonModify" 
            +                   cmtemplate="#addMainFirstPartyTpl"
            +                   cmitem="(tr"
            +                   cmaction="add"
                            >+ 添加</a>
            -               <em class="error"></em>
            +               <em class="error"></em>
                        </td>
                    </tr>
                </table>
            -   <script type="text/template" id="addMainFirstPartyTpl" >
            +   <script type="text/template" id="addMainFirstPartyTpl" >
                 <tr>
                    <td>
            -           <label class="gray">甲方主体:</label>
            +           <label class="gray">甲方主体:</label>
                    </td>
                    <td>
            -           <input type="text" name="" class="ipt ipt-w320" />
            -           <a href="javascript:" 
            -               class="green js_autoCommonModify" 
            -               cmtemplate="#addMainFirstPartyTpl"
            -               cmitem="(tr"
            -               cmaction="add"
            +           <input type="text" name="" class="ipt ipt-w320" />
            +           <a href="javascript:" 
            +               class="green js_autoCommonModify" 
            +               cmtemplate="#addMainFirstPartyTpl"
            +               cmitem="(tr"
            +               cmaction="add"
                        >+ 添加</a>
            -           <a href="javascript:" class="red js_autoCommonModify"
            -               cmtemplate="#addMainFirstPartyTpl"
            -               cmitem="(tr"
            -               cmaction="del"
            +           <a href="javascript:" class="red js_autoCommonModify"
            +               cmtemplate="#addMainFirstPartyTpl"
            +               cmitem="(tr"
            +               cmaction="del"
                        >+ 删除</a>
            -           <em class="error"></em>
            +           <em class="error"></em>
                    </td>
                </tr>
            -   </script>
            -
            + </script>
            @@ -288,6 +331,12 @@

            Methods

            isCommonModify static +
          • + notification +
          • +
          • + notificationHandler +
          • on
          • @@ -297,6 +346,9 @@

            Methods

          • trigger
          • +
          • + triggerHandler +
          • @@ -309,7 +361,7 @@

            _beforeInit

            @@ -329,7 +381,7 @@

            _init

            @@ -354,7 +406,7 @@

            _inited

            @@ -368,7 +420,7 @@

            _initHanlderEvent

            @@ -391,7 +443,7 @@

            getInstance

            @@ -431,7 +483,7 @@

            isCommonModify

            @@ -451,7 +503,96 @@

            Parameters:

            Returns:

            - bool +

            bool

            +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + :
            @@ -476,7 +617,7 @@

            on

            JC.BaseMVC but overwritten in - ../bizs/CommonModify/CommonModify.js:210 + ../bizs/CommonModify/CommonModify.js:212

            @@ -502,7 +643,7 @@

            Parameters:

            Returns:

            - CommonModifyInstance +

            CommonModifyInstance

            @@ -518,7 +659,7 @@

            selector

            JC.BaseMVC but overwritten in - ../bizs/CommonModify/CommonModify.js:204 + ../bizs/CommonModify/CommonModify.js:206

            @@ -527,7 +668,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -549,7 +690,7 @@

            trigger

            JC.BaseMVC but overwritten in - ../bizs/CommonModify/CommonModify.js:218 + ../bizs/CommonModify/CommonModify.js:220

            @@ -569,7 +710,55 @@

            Parameters:

            Returns:

            - CommonModifyInstance +

            CommonModifyInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + :
            diff --git a/docs_api/classes/window.Bizs.CustomColumn.html b/docs_api/classes/window.Bizs.CustomColumn.html new file mode 100644 index 000000000..1948a09a6 --- /dev/null +++ b/docs_api/classes/window.Bizs.CustomColumn.html @@ -0,0 +1,667 @@ + + + + + window.Bizs.CustomColumn - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.CustomColumn Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            组件用途简述

            +

            require: + JC.Panel + , JC.Valid + , Bizs.FormLogic +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会自动处理 div class="js_bizCustomColumn"

            +

            可用的 HTML attribute

            +
            +
            [ data-url | data-query ] = url
            +
            提交数据的URL
            +
            data-data = json var name
            +
            自定义列的数据 变量名, window 变量域
            +
            data-scriptData = script selector
            +
            脚本数据
            +
            data-id = string
            +
            {id}占位符的数值
            +
            data-minCol = int
            +
            最小需要选择多少列
            +
            data-maxCol = int
            +
            最多只能选择多少列
            +
            data-name = string
            +
            数据复选框的 name
            +
            data-saveSelector = selector
            +
            保存所要复选框值的选择器
            +
            data-tpl = script tpl
            +
            显示弹框的脚本模板
            +
            data-formDoneCallback = window function name
            +
            自定义提交数据后的响应函数
            +
            data-formAfterProcessCallback = window function name
            +
            自定义表单提交前的校验函数
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.CustomColumn

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <h2>Bizs.CustomColumn 示例</h2>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of CustomColumnInstance + + static + +
            +

            初始化可识别的 CustomColumn 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of CustomColumnInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.DMultiDate.html b/docs_api/classes/window.Bizs.DMultiDate.html new file mode 100644 index 000000000..f02d9ba7c --- /dev/null +++ b/docs_api/classes/window.Bizs.DMultiDate.html @@ -0,0 +1,324 @@ + + + + + window.Bizs.DMultiDate - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.DMultiDate Class

            + +
            +

            DMultiDate 复合日历业务逻辑 +
            Dom 加载后会自动加载页面上所有.js_autoDMultiDate的标签

            +

            require: + JC.BaseMVC + , JC.Calendar +

            +

            JC Project Site +| API docs +| demo link

            +

            可用的html属性

            +
            +
            mddate = css selector
            +
            声明日期input[type=text][datatype=daterange]的标签
            + 如果缺省则自动查找子元素.js_multidate
            +
            mdstartdate = css selector
            +
            声明开始日期的隐藏域标签, 默认查找子元素.js_startdate
            +
            mdenddate = css selector
            +
            声明结束日期的隐藏域标签, 默认查找子元素.js_enddate
            +
            mddayrange = num
            +
            声明时间粒度为日时,最长可选取多少天,如果不需要则不声明此属性
            +
            mdweekrange = num
            +
            声明时间粒度为周时,最长可选取多少周,如果不需要则不声明此属性
            +
            mdmonthrange = num
            +
            声明时间粒度为月时,最长可选取多少月,如果不需要则不声明此属性
            +
            mdseasonrange = num
            +
            声明时间粒度为季时,最长可选取多少季,如果不需要则不声明此属性
            +
            mdyearrange = num
            +
            声明时间粒度为年时,最长可选取多少年,如果不需要则不声明此属性
            +
            mdIgnoreUrlFill = bool, default = false
            +
            是否忽略 URL 自动填充
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.DMultiDate

            + () + private +
            +

            + Defined in + ../bizs/DMultiDate/DMultiDate.js:3 +

            +
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + DMultiDateInstance + + static + +
            +

            获取或设置 DMultiDate 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + DMultiDateInstance: +
            +
            +
            +
            +

            isDMultiDate

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + + + static + +
            +

            判断 selector 是否可以初始化 DMultiDate

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            bool

            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.DisableLogic.html b/docs_api/classes/window.Bizs.DisableLogic.html index b6d21b874..264a26629 100644 --- a/docs_api/classes/window.Bizs.DisableLogic.html +++ b/docs_api/classes/window.Bizs.DisableLogic.html @@ -3,11 +3,17 @@ window.Bizs.DisableLogic - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -106,20 +147,24 @@

            APIs

            window.Bizs.DisableLogic Class

            -

            Form Control禁用启用逻辑

            -


            应用场景
            +

            这个应用将不再维护, 请使用 Bizs.ChangeLogic

            +

            Form Control禁用启用逻辑

            +
            应用场景

            表单操作时, 选择某个 radio 时, 对应的 内容有效,
            但选择其他 radio 时, 其他的内容无效
            checkbox / select 也可使用( 带change事件的标签 )

            +

            require: + JC.BaseMVC +

            JC Project Site | API docs | demo link

            -

            div 需要 添加 class="js_bizsDisableLogic"

            -

            box 的 HTML 属性

            +

            div 需要 添加 class="js_bizsDisableLogic"

            +

            box 的 HTML 属性

            dltrigger
            触发禁用/起用的control
            @@ -130,29 +175,29 @@

            box 的 HTML 属性

            dldonecallback = function
            启用/禁用后会触发的回调, window 变量域 -function dldonecallback( _triggerItem, _boxItem ){ +<pre>function dldonecallback( _triggerItem, _boxItem ){ var _ins = this; - JC.log( 'dldonecallback', new Date().getTime() ); -} + JC.log( 'dldonecallback', new Date().getTime() ); +}
            dlenablecallback = function
            启用后的回调, window 变量域 -function dlenablecallback( _triggerItem, _boxItem ){ +<pre>function dlenablecallback( _triggerItem, _boxItem ){ var _ins = this; - JC.log( 'dlenablecallback', new Date().getTime() ); -} + JC.log( 'dlenablecallback', new Date().getTime() ); +}
            dldisablecallback = function
            禁用后的回调, window 变量域 -function dldisablecallback( _triggerItem, _boxItem ){ +<pre>function dldisablecallback( _triggerItem, _boxItem ){ var _ins = this; - JC.log( 'dldisablecallback', new Date().getTime() ); -} + JC.log( 'dldisablecallback', new Date().getTime() ); +}
            -

            trigger 的 HTML 属性

            +

            trigger 的 HTML 属性

            dldisable = bool, default = false
            @@ -164,10 +209,12 @@

            trigger 的 HTML 属性

            dlhidetargetsub = selector
            根据 trigger 的 checked 状态 显示或者隐藏 dlhidetargetsub node
            -

            hide target 的 HTML 属性

            +

            hide target 的 HTML 属性

            -
            dlhidetoggle = bool
            +
            dlhidetoggle = bool, false
            显示或显示的时候, 是否与他项相反
            +
            dlDisableToggle = bool, default = false
            +
            disabled 的时候, 是否与他项相反
            @@ -178,7 +225,7 @@

            window.Bizs.DisableLogic

            @@ -186,24 +233,23 @@

            window.Bizs.DisableLogic

            Example:

            -
               <div class="js_bizsDisableLogic"
            -       dltrigger="/input[type=radio]"
            -       dltarget="/input.js_disableItem"
            +                
               <div class="js_bizsDisableLogic"
            +       dltrigger="/input[type=radio]"
            +       dltarget="/input.js_disableItem"
                    >
                    <label>
            -           <input type="radio" name="discount" checked  
            -           dldisable="true"
            +           <input type="radio" name="discount" checked  
            +           dldisable="true"
                        />自本协议签订之日起10日内生效
                    </label> <br>
                    <label>
            -           <input type="radio" name="discount" 
            -           dldisable="false"
            +           <input type="radio" name="discount" 
            +           dldisable="false"
                        />生效时间点
                    </label>
            -       <input type="text" class="ipt js_disableItem" datatype="date" value=""
            -       /><input type="button" class="UXCCalendar_btn">
            -   </div>
            -
            + <input type="text" class="ipt js_disableItem" datatype="date" value="" + /><input type="button" class="UXCCalendar_btn"> + </div>
            @@ -257,7 +303,7 @@

            getInstance

            @@ -294,7 +340,7 @@

            init

            @@ -331,7 +377,7 @@

            on

            @@ -357,7 +403,7 @@

            Parameters:

            Returns:

            - DisableLogicInstance +

            DisableLogicInstance

            @@ -370,7 +416,7 @@

            selector

            @@ -379,7 +425,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -398,7 +444,7 @@

            trigger

            @@ -418,7 +464,7 @@

            Parameters:

            Returns:

            - DisableLogicInstance +

            DisableLogicInstance

            diff --git a/docs_api/classes/window.Bizs.DropdownTree.html b/docs_api/classes/window.Bizs.DropdownTree.html new file mode 100644 index 000000000..0dce07ac7 --- /dev/null +++ b/docs_api/classes/window.Bizs.DropdownTree.html @@ -0,0 +1,913 @@ + + + + + window.Bizs.DropdownTree - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.DropdownTree Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            树菜单 形式模拟下拉框

            +

            require: + JC.BaseMVC + , JC.Tree +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会自动处理 div class="js_bizDropdownTree"

            +

            可用的 HTML attribute

            +
            +
            bdtData = json, window 变量域
            +
            + 初始化的数据变量名 +
            数据格式:
            +
            +
                        {
            +                 root: [ id, label ]
            +                 data: {
            +                     id: [ [id, label], [id, label]... ] 
            +                     , id: [ [id, label], [id, label]... ]...
            +                 }
            +             }
            +
            +
            +
            +
            bdtDefaultLabel = string
            +
            用于显示的 默认 label
            +
            bdtDefaultValue = string
            +
            默认选中 ID
            +
            bdtLabel = selector, default = "|.bdtLabel"
            +
            树的 label
            +
            bdtInput = selector, default = "|.bdtInput"
            +
            保存树 ID的 input
            +
            bdtTreeBox = selector, default = "|.bdtTreeBox"
            +
            树的 node
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.DropdownTree

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
               <div class="bdtBox js_bizDropdownTree" bdtData="treeData1" bdtDefaultLabel="请选择" bdtDefaultValue="0">
            +       <i class="bdtIcon"></i>
            +       <span class="bdtLabel"></span>
            +       <input type="hidden" name="tree03" value="" class="bdtInput" />                                                
            +       <div class="bdtTreeBox"></div>
            +   </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +

            Events

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            clear

            + () + +
            +

            清除选择数据

            +
            +
            +
            +

            hide

            + () + +
            +

            隐藏 树弹框

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of DropdownTreeInstance + + static + +
            +

            初始化可识别的 DropdownTree 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of DropdownTreeInstance: +
            +
            +
            +
            +

            label

            + () + + + + +
            +

            获取选中的 label

            +
            +
            +

            Returns:

            +
            +

            string

            +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            show

            + () + +
            +

            显示 树弹框

            +
            +
            +
            +

            toggle

            + () + +
            +

            显式/隐藏 树弹框

            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            update

            +
            + (
              +
            • + _data +
            • +
            • + _selectedId +
            • +
            ) +
            + +
            +

            更新树菜单数据

            +
            +
            +

            Parameters:

            +
              +
            • + _data + Json +
              +
              +
            • +
            • + _selectedId + String +
              +
              +
            • +
            +
            +
            +
            +

            val

            +
            + (
              +
            • + _nodeId +
            • +
            ) +
            + + String of id + + +
            +

            获取或设置 选中的 id

            +
            +
            +

            Parameters:

            +
              +
            • + _nodeId + String +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + String of id: +
            +
            +
            +
            +
            +

            Events

            +
            +

            DropdownTreeSelected

            + + +
            +

            选择树节点时触发的事件

            +
            +
            +

            Event Payload:

            +
              +
            • + _evt + Object +
              +
              +
            • +
            • + _id + String +
              +
              +
            • +
            • + _name + String +
              +
              +
            • +
            • + _triggerSelector + Selector +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
                   $( 'div.js_bizDropdownTree' ).each( function(){
            +           var _ins = JC.BaseMVC.getInstance( $(this), Bizs.DropdownTree );
            +               _ins 
            +                   && _ins.on( 'DropdownTreeSelected', function( _evt, _id, _name, _triggerSelector ){
            +                       JC.log( [ _evt, _id, _name ] );
            +                   });
            +       });
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.FormLogic.html b/docs_api/classes/window.Bizs.FormLogic.html index 6d3c8d394..5d7715908 100644 --- a/docs_api/classes/window.Bizs.FormLogic.html +++ b/docs_api/classes/window.Bizs.FormLogic.html @@ -3,11 +3,17 @@ window.Bizs.FormLogic - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            -

            提交表单控制逻辑

            -

            应用场景 +

            提交表单控制逻辑

            +应用场景
            get 查询表单
            post 提交表单
            ajax 提交表单

            +

            require: + JC.BaseMVC + , JC.Valid + , JC.Panel +

            +

            optional: + JC.FormFillUrl +

            JC Project Site | API docs | demo link

            -

            require: jQuery -
            require: JC.Valid -
            require: JC.Form -
            require: JC.Panel

            -

            页面只要引用本文件, 默认会自动初始化 from class="js_bizsFormLogic" 的表单

            -

            Form 可用的 HTML 属性

            +

            页面只要引用本文件, 默认会自动初始化 from class="js_bizsFormLogic" 的表单

            +

            Form 可用的 HTML 属性

            formType = string, default = get
            form 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性 -
            类型有: get, post, ajax +
            类型有: get, post, ajax, jsonp
            formSubmitDisable = bool, default = true
            表单提交后, 是否禁用提交按钮
            formResetAfterSubmit = bool, default = true
            表单提交后, 是否重置内容
            -
            formBeforeProcess = function
            +
            formBeforeProcess = function, window 变量域
            - 表单开始提交时且没开始验证时, 触发的回调, window 变量域 -function formBeforeProcess( _evt, _ins ){ + 表单开始提交时且没开始验证时, 触发的回调 +<pre>function formBeforeProcess( _evt, _ins ){ var _form = $(this); - JC.log( 'formBeforeProcess', new Date().getTime() ); + JC.log( &#39;formBeforeProcess&#39;, new Date().getTime() ); //return false; -} +}
            -
            formProcessError = function
            +
            formProcessError = function, window 变量域
            - 提交时, 验证未通过时, 触发的回调, window 变量域 -function formProcessError( _evt, _ins ){ + 提交时, 验证未通过时, 触发的回调 +<pre>function formProcessError( _evt, _ins ){ var _form = $(this); - JC.log( 'formProcessError', new Date().getTime() ); + JC.log( &#39;formProcessError&#39;, new Date().getTime() ); //return false; -} +}
            -
            formAfterProcess = function
            +
            formAfterProcess = function, window 变量域
            - 表单开始提交时且验证通过后, 触发的回调, window 变量域 -function formAfterProcess( _evt, _ins ){ + 表单开始提交时且验证通过后, 触发的回调 +<pre>function formAfterProcess( _evt, _ins ){ var _form = $(this); - JC.log( 'formAfterProcess', new Date().getTime() ); + JC.log( &#39;formAfterProcess&#39;, new Date().getTime() ); //return false; -} +}
            -
            formConfirmPopupType = string, default = dialog
            +
            formBeforeSubmit = function, window 变量域
            +
            + 表单开始发送数据到服务器之前的回调 +
            function formBeforeSubmit( _evt, _ins ){
            +   var _form = $(this);
            +   JC.log( 'formBeforeSubmit', new Date().getTime() );
            +   //return false;
            +}
            +
            +
            formPopupType = string, default = dialog
            定义提示框的类型: dialog, popup
            +
            formConfirmPopupType = string, default = dialog
            +
            定义确认提示框的类型: dialog, popup
            formResetUrl = url
            表单重置时, 返回的URL
            formPopupCloseMs = int, default = 2000
            @@ -183,22 +239,46 @@

            Form 可用的 HTML 属性

            AJAX 提交完成后的回调, window 变量域
            如果没有显式声明, FormLogic将自行处理 -function formAjaxDone( _json, _submitButton, _ins ){ +<pre>function formAjaxDone( _json, _submitButton, _ins ){ var _form = $(this); - JC.log( 'custom formAjaxDone', new Date().getTime() ); + JC.log( &#39;custom formAjaxDone&#39;, new Date().getTime() ); if( _json.errorno ){ - _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); + _panel = JC.Dialog.alert( _json.errmsg || &#39;操作失败, 请重新尝试!&#39;, 1 ); }else{ - _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){ - reloadPage( "?donetype=custom" ); + _panel = JC.msgbox( _json.errmsg || &#39;操作成功&#39;, _submitButton, 0, function(){ + JC.f.reloadPage( &quot;?donetype=custom&quot; ); }); } -}; +};
            formAjaxDoneAction = url
            声明 ajax 提交完成后的返回路径, 如果没有, 提交完成后将不继续跳转操作
            +
            formJsonpCb = function, default = FormLogic#_model._innerJsonpCb
            +
            自定义 JSOPN 处理回调, window 变量域 +
            function customFormJsonpCb( _data, _info ){
            +   if( !( _data && _info ) ) return;
            +   var _frm = $( 'form.' + _info ), _ins;
            +   if( !_frm.length ) return;
            +   _ins = JC.BaseMVC.getInstance( _frm, Bizs.FormLogic );
            +   if( !_ins ) return;
            +}
            +
            URL: handler_jsonp.php?callbackInfo=FormLogic_1&callback=callback
            +OUTPUT:
            +<script>
            +window.parent 
            +   && window.parent != this
            +   && window.parent[ 'callback' ]
            +   && window.parent[ 'callback' ]( {"errorno":0,"errmsg":"","data":{"callbackInfo":"FormLogic_1","callback":"callback"}}, 'FormLogic_1' )
            +   ;
            +</script>
            +
            +
            +

            Form Control 可用的 html 属性

            +
            +
            ignoreResetClear = bool, default = false
            +
            重置时, 是否忽略清空控件的值, 默认清空
            -

            submit button 可用的 html 属性

            +

            submit button 可用的 html 属性

            基本上 form 可用的 html 属性, submit 就可用, 区别在于 submit 优化级更高 @@ -210,14 +290,26 @@

            submit button 可用的 html 属性

            formConfirmCheckCallback = function
            提交表单时, 进行二次确认的条件判断, window 变量域 -function formConfirmCheckCallback( _trigger, _evt, _ins ){ +<pre>function formConfirmCheckCallback( _trigger, _evt, _ins ){ var _form = $(this); - JC.log( 'formConfirmCheckCallback', new Date().getTime() ); - return _form.find('td.js_confirmCheck input[value=0]:checked').length; -} - + JC.log( 'formConfirmCheckCallback', new Date().getTime() ); + return _form.find('td.js_confirmCheck input[value=0]:checked').length; +} +
            +
            formSubmitIgnoreCheck = bool, default = false
            +
            + 表单提交时, 是否忽略 JC.Valid 的验证 +
            注意: 仅忽略内容为空的项, 如果已经填写内容, 那么内容必须与验证规则匹配 +
            注: 有时 提交操作 仅为保存为草稿的时候, 是不需要验证所有内容的, 不过还是会对值非空的项进行验证 +
            +
            formResetCallback = callback
            +
            表单重置后的回调 +
            function formResetCallback( _evt, _ins ){
            +   var _form = $(this);
            +   JC.log( 'formResetCallback', JC.f.ts() );
            +}
            -

            reset button 可用的 html 属性

            +

            reset button 可用的 html 属性

            如果 form 和 reset 定义了相同属性, reset 优先级更高 @@ -230,8 +322,9 @@

            reset button 可用的 html 属性

            重置表单时进行二次确认的提示信息
            formPopupCloseMs = int, default = 2000
            msgbox 弹框的显示时间
            +
            -

            普通 [a | button] 可用的 html 属性

            +

            普通 [a | button] 可用的 html 属性

            buttonReturnUrl
            点击button时, 返回的URL
            @@ -241,6 +334,11 @@

            普通 [a | button] 可用的 html 属性

            弹框类型: confirm, dialog.confirm
            popupstatus = int, default = 2
            提示状态: 0: 成功, 1: 失败, 2: 警告
            +
            buttonClickBindSelector = selector
            +
            + 点击按钮时, 把按钮的值赋值给 绑定的 控件 +
            注意: 这个属性仅支持 [input|button] 标签 +
            @@ -251,7 +349,7 @@

            window.Bizs.FormLogic

            @@ -261,73 +359,72 @@

            Example:

                   <script>
                        JC.debug = true;
            -           JC.use( 'Bizs.FormLogic, Calendar, plugins.json2' );
            +           JC.use( 'Bizs.FormLogic, Calendar, plugins.json2' );
                        function formBeforeProcess( _evt, _ins ){
                            var _form = $(this);
            -               JC.log( 'formBeforeProcess', new Date().getTime() );
            +               JC.log( 'formBeforeProcess', new Date().getTime() );
                        }
                        function formAfterProcess( _evt, _ins ){
                            var _form = $(this);
            -               JC.log( 'formAfterProcess', new Date().getTime() );
            +               JC.log( 'formAfterProcess', new Date().getTime() );
                            //return false;
                        }
                        function formAjaxDone( _json, _submitButton, _ins ){
                            var _form = $(this);
            -               JC.log( 'custom formAjaxDone', new Date().getTime() );
            +               JC.log( 'custom formAjaxDone', new Date().getTime() );
                            if( _json.errorno ){
            -                   _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 );
            +                   _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 );
                            }else{
            -                   _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){
            -                       reloadPage( "?donetype=custom" );
            +                   _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){
            +                       JC.f.reloadPage( "?donetype=custom" );
                                });
                            }
                        };
                    </script>
            -       <dl class="defdl">
            +       <dl class="defdl">
                        <dt>Bizs.FormLogic, get form example 3, nothing at done</dt>
                        <dd>
                            <dl>
            -                   <form action="./data/handler.php" method="POST"
            -                       class="js_bizsFormLogic"
            -                       formType="ajax"
            -                       formAjaxMethod="POST"
            -                       formBeforeProcess="formBeforeProcess"
            -                       formAfterProcess="formAfterProcess"
            -                       formAjaxDone="formAjaxDone"                            
            -                       formAjaxDoneAction="?donetype=system"
            +                   <form action="./data/handler.php" method="POST"
            +                       class="js_bizsFormLogic"
            +                       formType="ajax"
            +                       formAjaxMethod="POST"
            +                       formBeforeProcess="formBeforeProcess"
            +                       formAfterProcess="formAfterProcess"
            +                       formAjaxDone="formAjaxDone"                            
            +                       formAjaxDoneAction="?donetype=system"
                                    >
                                    <dl>
                                        <dd>
            -                               文件框: <input type="text" name="text" reqmsg="文本框" value="test3" />
            +                               文件框: <input type="text" name="text" reqmsg="文本框" value="test3" />
                                        </dd>
                                        <dd>
            -                               日期: <input type="text" name="date" datatype="date" reqmsg="日期" value="2015-02-20" />
            -                               <em class="error"></em>
            +                               日期: <input type="text" name="date" datatype="date" reqmsg="日期" value="2015-02-20" />
            +                               <em class="error"></em>
                                        </dd>
                                        <dd>
                                            下拉框:
            -                                   <select name="dropdown" reqmsg="下拉框" >
            -                                       <option value="">请选择</option>
            -                                       <option value="1">条件1</option>
            -                                       <option value="2">条件2</option>
            -                                       <option value="3" selected>条件3</option>
            +                                   <select name="dropdown" reqmsg="下拉框" >
            +                                       <option value="">请选择</option>
            +                                       <option value="1">条件1</option>
            +                                       <option value="2">条件2</option>
            +                                       <option value="3" selected>条件3</option>
                                                </select>
                                        </dd>
                                        <dd>
            -                               <input type="hidden" name="getform" value="1" />
            -                               <button type="submit" formSubmitConfirm="确定要提交吗?" >submit - dialog</button>
            -                               <button type="submit" formConfirmPopupType="dialog" 
            -                                                       formSubmitConfirm="确定要提交吗?" >submit - popup</button>
            -                               <button type="reset" formResetConfirm="确定要重置吗?"  >reset</button>
            -                               <button type="reset" formResetConfirm="确定要重置吗?" formResetUrl="?"  >reset - url</button>
            -                               <a href="?">back</a>
            +                               <input type="hidden" name="getform" value="1" />
            +                               <button type="submit" formSubmitConfirm="确定要提交吗?" >submit - dialog</button>
            +                               <button type="submit" formConfirmPopupType="dialog" 
            +                                                       formSubmitConfirm="确定要提交吗?" >submit - popup</button>
            +                               <button type="reset" formResetConfirm="确定要重置吗?"  >reset</button>
            +                               <button type="reset" formResetConfirm="确定要重置吗?" formResetUrl="?"  >reset - url</button>
            +                               <a href="?">back</a>
                                        </dd>
                                    </dl>
                                </form>
                            </dl>
                        </dd>
            -       </dl>     
            -
            + </dl>
            @@ -364,6 +461,12 @@

            Methods

            init static +
          • + notification +
          • +
          • + notificationHandler +
          • on
          • @@ -373,11 +476,22 @@

            Methods

          • trigger
          • +
          • + triggerHandler +
          • Properties

            )
            @@ -642,11 +848,59 @@

            trigger

            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            -

            使用 jquery trigger 绑定事件

            +

            使用 jquery triggerHandler 触发绑定事件

            Parameters:

            @@ -657,18 +911,58 @@

            Parameters:

            +
          • + _args + | Array +
            +
            +
          • Returns:

            - BaseMVCInstance + :

            Properties

            +
            +

            DATA_PARSE

            + Function + static +
            +

            + Defined in + ../bizs/FormLogic/FormLogic.js:423 +

            +
            +
            +

            全局数据解析函数 +
            所有换回结果都会调用 +
            arg: _data[string of result]

            +
            +

            Default: null

            +
            +
            +

            GLOBAL_AJAX_CHECK

            + Function + static +
            +

            + Defined in + ../bizs/FormLogic/FormLogic.js:412 +

            +
            +
            +

            全局返回数据处理回调 +
            所有换回结果都会调用 +
            arg: _data[string of result]

            +
            +

            Default: null

            +

            popupCloseMs

            Int @@ -676,7 +970,7 @@

            popupCloseMs

            @@ -691,7 +985,7 @@

            popupCloseMs

            @@ -708,7 +1002,7 @@

            processErrorCb

            @@ -723,7 +1017,7 @@

            resetAfterSubmit

            @@ -738,7 +1032,7 @@

            submitDisable

            diff --git a/docs_api/classes/window.Bizs.InputSelect.html b/docs_api/classes/window.Bizs.InputSelect.html new file mode 100644 index 000000000..a245f8d01 --- /dev/null +++ b/docs_api/classes/window.Bizs.InputSelect.html @@ -0,0 +1,654 @@ + + + + + window.Bizs.InputSelect - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.InputSelect Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            输入下拉框 +可以输入数据也可以通过点下拉箭头选择数据。 +下拉的数据支持Ajax接口和php前段铺数据。

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会自动处理 div class="js_bizInputSelect"

            +

            可用的 HTML attribute

            +
            +
            iptseldatabox = string
            +
            指定下拉数据存放的父容器
            +
            iptseldataboxheight = int
            +
            指定下拉数据存放的父容器的高度,默然为自适应
            +
            iptseloption = string
            +
            指定下拉数据选项
            +
            iptselipt = string
            +
            指定输入框
            +
            iptselhideipt = string
            +
            指定隐藏域
            +
            iptselprevententer = bool
            +
            回车键阻止表单提交, default = true
            +
            iptselitemselected = function
            +
            选择数据后的回调
            +
            iptseldataurl = string
            +
            指定下拉数据的ajax接口,要求返回json数据格式如下: + { errorno: 0, + data: [{label: 'item1', 'value': 0}]
            }
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.InputSelect

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of InputSelectInstance + + static + +
            +

            初始化可识别的 InputSelect 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of InputSelectInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.KillISPCache.html b/docs_api/classes/window.Bizs.KillISPCache.html index 893a92ad1..e867b2924 100644 --- a/docs_api/classes/window.Bizs.KillISPCache.html +++ b/docs_api/classes/window.Bizs.KillISPCache.html @@ -3,11 +3,17 @@ window.Bizs.KillISPCache - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            @@ -117,11 +158,14 @@

            window.Bizs.KillISPCache Class


            ISP 缓存问题 引起的用户串号
            ajax 或者动态添加的内容, 请显式调用 JC.KillISPCache.getInstance().process( newNodeContainer )
            这是个单例类

            +

            require: + jQuery + , JC.BaseMVC +

            JC Project Site | API docs | demo link

            -

            require: jQuery

            -

            页面只要引用本文件, 默认会自动初始化 KillISPCache 逻辑

            +

            页面只要引用本文件, 默认会自动初始化 KillISPCache 逻辑

            影响到的地方:
            每个 a node 会添加 isp 参数
            @@ -152,8 +196,7 @@

            Example:

            _node.appendTo( document.body ); JC.KillISPCache.getInstance().process( _node ); }); - </script> - + </script>
            @@ -194,6 +237,12 @@

            Methods

            ignoreUrl static +
          • + notification +
          • +
          • + notificationHandler +
          • on
          • @@ -206,6 +255,9 @@

            Methods

          • trigger
          • +
          • + triggerHandler +
          • @@ -231,7 +283,7 @@

            _beforeInit

            @@ -251,7 +303,7 @@

            _init

            @@ -276,7 +328,7 @@

            _inited

            @@ -290,7 +342,7 @@

            _initHanlderEvent

            @@ -313,7 +365,7 @@

            getInstance

            @@ -350,7 +402,7 @@

            ignoreSelector

            @@ -382,7 +434,7 @@

            ignoreUrl

            @@ -400,6 +452,95 @@

            Parameters:

            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +

            on

            @@ -419,7 +560,7 @@

            on

            @@ -445,7 +586,7 @@

            Parameters:

            Returns:

            - BaseMVCInstance +

            BaseMVCInstance

            @@ -467,7 +608,7 @@

            process

            @@ -506,7 +647,7 @@

            selector

            @@ -515,7 +656,7 @@

            selector

            Returns:

            - selector +

            selector

            @@ -526,6 +667,9 @@

            trigger

          • _evtName
          • +
          • + _args +
          • )
            @@ -534,11 +678,59 @@

            trigger

            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            -

            使用 jquery trigger 绑定事件

            +

            使用 jquery triggerHandler 触发绑定事件

            Parameters:

            @@ -549,12 +741,18 @@

            Parameters:

            +
          • + _args + | Array +
            +
            +
          • Returns:

            - BaseMVCInstance + :
            @@ -568,7 +766,7 @@

            ignoreSameLinkText

            @@ -583,7 +781,7 @@

            randName

            diff --git a/docs_api/classes/window.Bizs.MoneyTips.html b/docs_api/classes/window.Bizs.MoneyTips.html new file mode 100644 index 000000000..977d0260d --- /dev/null +++ b/docs_api/classes/window.Bizs.MoneyTips.html @@ -0,0 +1,778 @@ + + + + + window.Bizs.MoneyTips - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.MoneyTips Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            金额格式化 业务逻辑

            +
            应用场景 +
            用户在文本框输入金额时, 在指定的 node 显示以逗号分隔的金额

            +

            require: + JC.BaseMVC +

            +

            JC Project Site +| API docs +| demo link

            +

            input[type=text] 需要 添加 class="js_bizMoneyTips" +
            只要带有 class = js_bizMoneyTips 的文本框, 默认会自动初始化 MoneyTips 实例

            +

            + 页面载入时, Bizs.MoneyTips 会对 span.js_bmtLabel, label.js_bmtLabel 进行自动格式化 +

            +

            可用的 HTML 属性

            +
            +
            bmtDisplayLabel = selector, default = span
            +
            + 指定显示 格式化金额的 node, 如果没有显式指定 node, 那么将会动态生成一个用于显示的 span +
            +
            bmtPattern = string, default = {0}
            +
            + 用于显示格式化金额的显示内容, {0} = 金额占位符 +
            example: <input type="text" class="js_bizMoneyTips" bmtPattern="格式化金额: {0}" /> +
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.MoneyTips

            + () +
            +

            + Defined in + ../bizs/MoneyTips/MoneyTips.js:4 +

            +
            +
            +
            +
            +

            Example:

            +
            +
               <div>
            +       金额: <input type="text" value="6543.21" 
            +       datatype="n-12.2" class="js_bizMoneyTips" bmtDisplayLabel="/span.js_bmtSpan" />
            +       <em class="error"></em>
            +       <span class="js_bmtSpan"></span>
            +   </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            format

            +
            + (
              +
            • + _selector +
            • +
            • + _outputSelector +
            • +
            ) +
            + + + + static +
            +

            + Defined in + ../bizs/MoneyTips/MoneyTips.js:105 +

            +
            +
            +

            格式化 node 的 value/html

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            • + _outputSelector + Selector +
              +

              指定显示格式化内容的 node, 默认为 selector 本身 +
              , 还可以通过 html 属性 bmtFormatOutput 指定单独的 _outputSelector

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            _selector

            +
            +
            +
            +
            +

            getInstance

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + MoneyTipsInstance + + static +
            +

            + Defined in + ../bizs/MoneyTips/MoneyTips.js:66 +

            +
            +
            +

            获取或设置 MoneyTips 的实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + MoneyTipsInstance: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of MoneyTipsInstance + + static +
            +

            + Defined in + ../bizs/MoneyTips/MoneyTips.js:82 +

            +
            +
            +

            初始化可识别的 MoneyTips 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of MoneyTipsInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            update

            +
            + (
              +
            • + _val +
            • +
            ) +
            +
            +

            + Defined in + ../bizs/MoneyTips/MoneyTips.js:211 +

            +
            +
            +

            更新 tips 的值

            +
            +
            +

            Parameters:

            +
              +
            • + _val + Int | String +
              +
              +
            • +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.MultiAutoComplete.html b/docs_api/classes/window.Bizs.MultiAutoComplete.html new file mode 100644 index 000000000..8899de213 --- /dev/null +++ b/docs_api/classes/window.Bizs.MultiAutoComplete.html @@ -0,0 +1,748 @@ + + + + + window.Bizs.MultiAutoComplete - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.MultiAutoComplete Class

            + +
            +

            级联 Suggest

            +

            require: + JC.AutoComplete + , JC.Placeholder + , JC.Panel +

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会自动处理 input[defaultMultiAutomComplete]

            +

            可用的 HTML attribute

            +
            +
            defaultMultiAutomComplete = empty
            +
            声明第一级联动框
            +
            macUrl = url
            +
            获取数据的URL接口
            +
            macAddtionUrl = url
            +
            用于最后一级的附加数据接口, 如果所有父级没有选中内容, 将启用该接口
            +
            macAddtionBox = selector
            +
            指定用于保存选择内容的选择器
            +
            macAddtionBoxItemTpl = selector
            +
            保存内容项的模板
            +
            macAddtionBoxItemSelector = selector
            +
            保存内容项的选择器
            +
            macAddtionItemAddCallback = callback
            +
            添加保存内容项时的回调 +function macAddtionItemAddCallback( _item, _id, _label, _parent, _parentBox ){ + var _macIns = this; + JC.log( &#39;macAddtionItemAddCallback&#39;, _id, _label ); +} +
            +
            macAddtionItemRemoveCallback = callback
            +
            删除保存内容项时的回调 +function macAddtionItemRemoveCallback( _item, _id, _label, _parent, _parentBox ){ + var _macIns = this; + JC.log( &#39;macAddtionItemRemoveCallback&#39;, _id, _label ); +} +
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.MultiAutoComplete

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            + <div class="ui-sug-mod"> + <input type="text" class="ui-sug-ipt js_compAutoComplete js_k1" name="k1" value="" + autocomplete="off" + cacPopup="/ul.js_compAutoCompleteBox" + cacLabelKey="data-label" + cacIdKey="data-id" + cacIdSelector="/input.js_k1_id" + cacStrictData="true" + cacDataFilter="cacDataFilter" + cacNoDataText="暂无数据!" + cacPreventEnter="true" + defaultMultiAutomComplete="" + macUrl="./data/shengshi_with_error_code.php?id=0" + macTarget="/input.js_k2" + Placeholder="一级位置" + /> + <input type="hidden" value="14" class="js_k1_id" name="k1_id" /> + <input type="text" class="ui-sug-ipt js_compAutoComplete js_k2" name="k2" value="" + autocomplete="off" + cacPopup="/ul.js_compAutoCompleteBox" + cacLabelKey="data-label" + cacIdKey="data-id" + cacIdSelector="/input.js_k2_id" + cacStrictData="true" + cacDataFilter="cacDataFilter" + cacNoDataText="暂无数据!" + cacPreventEnter="true" + macUrl="./data/shengshi_with_error_code.php?id={0}" + macTarget="/input.js_k3" + Placeholder="二级位置" + /> + <input type="hidden" value="2341" class="js_k2_id" name="k2_id" /> + <input type="text" class="ui-sug-ipt js_compAutoComplete js_k3" name="k3" value="区" + autocomplete="off" + Placeholder="三级位置" + cacPopup="/ul.js_compAutoCompleteBox" + cacLabelKey="data-label" + cacIdKey="data-id" + cacStrictData="false" + cacDataFilter="cacDataFilter" + cacNoDataText="暂无数据!" + cacAddtionItem="true" + cacListItemTpl="/script.cacItemTpl" + cacPreventEnter="true" + macUrl="./data/shengshi_with_error_code.php?id={0}" + macAddtionUrl="./data/shengshi_with_error_code.php?id=0" + macAddtionBox="/.js_macAddtionBox" + macAddtionBoxItemTpl="/script.macAddtionBoxItemTpl" + macAddtionBoxItemSelector="> a" + macAddtionItemAddCallback="macAddtionItemAddCallback" + macAddtionItemRemoveCallback="macAddtionItemRemoveCallback" + /> + <span class="js_macAddtionBox" style="display:none;"> + <span class="js_macAddtionBoxList"> + <a href="javascript:" class="js_macAddtionBoxItem" data-id="2345" id="macAddtionBoxItemId_1_2345" data-label="枫溪区"> + <label>枫溪区</label> + <button type="button" class="AURemove"></button> + <input type="hidden" name="condition[]" value="2345"> + </a> + </span> + <a href="javascript:" class="js_macClearAddtionList"> + 清空<button type="button" class="AUClose"></button> + </a> + </span> + <script type="text/template" class="cacItemTpl"> + <li data-id="{0}" data-label="{1}" data-index="{2}" class="AC_listItem {3} js_macAddtionBoxItemClick"> + <a href="javascript:;" data-id="{0}" data-label="{1}" data-index="{2}" class="AC_control AC_customAdd">添加</a> + <label>{1} </label> + </li> + </script> + <script type="text/template" class="macAddtionBoxItemTpl"> + <a href="javascript:" class="js_macAddtionBoxItem" data-id="{0}" id="{2}" data-label="{1}"> + <label>{1}</label> + <button type="button" class="AURemove"></button> + <input type="hidden" name="condition[]" value="{0}" /> + </a> + </script> +</div> +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of MultiAutoCompleteInstance + + static + +
            +

            初始化可识别的 MultiAutoComplete 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of MultiAutoCompleteInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.MultiChangeLogic.html b/docs_api/classes/window.Bizs.MultiChangeLogic.html new file mode 100644 index 000000000..14b5ebccb --- /dev/null +++ b/docs_api/classes/window.Bizs.MultiChangeLogic.html @@ -0,0 +1,631 @@ + + + + + window.Bizs.MultiChangeLogic - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.MultiChangeLogic Class

            + +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.MultiChangeLogic

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of MultiChangeLogicInstance + + static + +
            +

            初始化可识别的 MultiChangeLogic 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of MultiChangeLogicInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.MultiDate.html b/docs_api/classes/window.Bizs.MultiDate.html index 52fcb71bb..81ab472d8 100644 --- a/docs_api/classes/window.Bizs.MultiDate.html +++ b/docs_api/classes/window.Bizs.MultiDate.html @@ -3,11 +3,17 @@ window.Bizs.MultiDate - jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            -

            MultiDate 复合日历业务逻辑

            -

            - require: JC.Calendar -
            require: jQuery +

            MultiDate 复合日历业务逻辑 +根据select选项弹出日、周、月、季日历,并计算出起始日期和结束日期

            +

            require: v + JC.BaseMVC + , JC.Calendar

            JC Project Site | API docs @@ -175,7 +217,7 @@

            getInstance

            @@ -215,7 +257,7 @@

            isMultiDate

            @@ -235,7 +277,7 @@

            Parameters:

            Returns:

            - bool +

            bool

            diff --git a/docs_api/classes/window.Bizs.MultiSelect.html b/docs_api/classes/window.Bizs.MultiSelect.html new file mode 100644 index 000000000..8865b868f --- /dev/null +++ b/docs_api/classes/window.Bizs.MultiSelect.html @@ -0,0 +1,762 @@ + + + + + window.Bizs.MultiSelect - jquery components + + + + + + + + + + + + + +
            +
            +
            +

            +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            +
            + Show: + + + + +
            +
            +
            +
            +

            window.Bizs.MultiSelect Class

            +
            +
            + Extends JC.BaseMVC +
            + +
            +
            +

            模拟多选下拉框 +框的click将列表拉出来。 +close和document的click将面板关闭,返回数据,并把数据铺到指定的面板里

            +

            JC Project Site + | API docs + | demo link

            +

            页面只要引用本脚本, 默认会自动处理 div class="js_bizMultiSelect"

            +

            可用的 HTML attribute

            +
            +
            defaultLabel = string
            +
            + 声明下拉框默认显示的文字信息 +
            +
            binddatabox = string(selector)
            +
            声明选中数据,关闭下拉面板后,数据的回填区域
            + 如果此属性为空,则不会在其他区域展示选中的数据 +
            +
            ajaxurl = string
            +
            声明ajax加载数据的url +
            +
            数据格式
            +
            + {errorno: 0, + data: [ { "id": "id value", "label": "label value", "isChecked": "is checked" }, ... ], + errormsg: ""} +
            +
            +
            dataFilter = callback
            +
            +
            +
            如果 数据接口获取的数据不是默认格式, + 可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式 +
            +
            +
            function cacDataFilter( _json ){
            +if( _json.data && _json.data.length ){
            +   _json = _json.data;
            +}
            +$.each( _json, function( _ix, _item ){
            +   _item.length &&
            +       ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1], 'isChecked': _item[2] } )
            +       ;
            +});
            +return _json;
            +}
            +
            +
            +
            +
            dataname=string
            +
            声明checkbox的name属性, 适用于ajax接口的数据
            +
            +
            +
            +

            Constructor

            +
            +

            window.Bizs.MultiSelect

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + +
            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector | String +
              +
              +
            • +
            +
            +
            +

            Example:

            +
            +
            <div class="test">
            +   <div class="SELECTBOX js_bizMultiSelect" databindbox="(.test .js_box">
            +      <i class="SELECTIcon"></i>
            +      <span class="SELECTLabel">共选中<b class="red">2</b>条数据</span>                                         
            +      <div class="SELECTListBox" style="z-index: 50008; display: none;">
            +           <ul>
            +               <li class="SELECTIgnore">
            +                  <label>
            +                      <input type="checkbox" value="" name="" checktype="all" checkfor="///input[type=checkbox]">
            +                      全选
            +                  </label>
            +               </li>
            +               <li>
            +                  <label>
            +                      <input type="checkbox" value="1" name="" data-text="北京天地在线广告有限公司">
            +                      北京天地在线广告有限公司
            +                  </label>
            +               </li>
            +               <li>
            +                  <label>
            +                      <input type="checkbox" value="2" name="" data-text="河南天地在线广告有限公司">
            +                      河南天地在线广告有限公司
            +                  </label>
            +               </li>
            +               <li>
            +                  <label>
            +                      <input type="checkbox" value="3" name="" data-text="河北天地在线广告有限公司">
            +                      河北天地在线广告有限公司
            +                  </label>
            +               </li>
            +          </ul>
            +          <div class="SELECTClose"><a href="javascript:;" class="SELECTCloseBtn">关闭</a></div>
            +      </div>
            +   </div>
            +   <div class="js_box"><ul><li>北京天地在线广告有限公司</li> <li>河南天地在线广告有限公司</li></ul></div>
            + </div>
            +
            +
            +
            +
            +
            + +
            +
            +

            Item Index

            +
            +

            Methods

            + +
            +
            +
            +

            Methods

            +
            +

            _beforeInit

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

            +
            +
            +

            初始化之前调用的方法

            +
            +
            +
            +

            _init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

            +
            +
            +

            内部初始化方法

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +
            +

            _inited

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

            +
            +
            +

            内部初始化完毕时, 调用的方法

            +
            +
            +
            +

            _initHanlderEvent

            + () + private +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

            +
            +
            +

            内部事件初始化方法

            +
            +
            +
            +

            dataFilter

            +
            + (
              +
            • + _json +
            • +
            ) +
            + + Json + + static + +
            +

            定义全局数据过滤函数

            +
            +
            +

            Parameters:

            +
              +
            • + _json + Json +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Json: +
            +
            +
            +
            +

            init

            +
            + (
              +
            • + _selector +
            • +
            ) +
            + + Array of MultiSelectInstance + + static + +
            +

            初始化可识别的 MultiSelect 实例

            +
            +
            +

            Parameters:

            +
              +
            • + _selector + Selector +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + Array of MultiSelectInstance: +
            +
            +
            +
            +

            notification

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

            +
            +
            +

            通知选择器有新事件 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +
            +

            notificationHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

            +
            +
            +

            通知选择器有新事件, 有返回结果 +
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +

            on

            +
            + (
              +
            • + _evtName +
            • +
            • + _cb +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

            +
            +
            +

            使用 jquery on 绑定事件

            +
            +
            +

            Parameters:

            + +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            selector

            + () + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

            +
            +
            +

            获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

            +
            +
            +

            Returns:

            +
            +

            selector

            +
            +
            +
            +
            +

            trigger

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

            +
            +
            +

            使用 jquery trigger 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            BaseMVCInstance

            +
            +
            +
            +
            +

            triggerHandler

            +
            + (
              +
            • + _evtName +
            • +
            • + _args +
            • +
            ) +
            + + + +
            +

            Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

            +
            +
            +

            使用 jquery triggerHandler 触发绑定事件

            +
            +
            +

            Parameters:

            +
              +
            • + _evtName + String +
              +
              +
            • +
            • + _args + | Array +
              +
              +
            • +
            +
            +
            +

            Returns:

            +
            + : +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/JC.Tab.View.html b/docs_api/classes/window.Bizs.MultiSelectTree.html similarity index 55% rename from docs_api/classes/JC.Tab.View.html rename to docs_api/classes/window.Bizs.MultiSelectTree.html index 6d7bdb885..3c526785b 100644 --- a/docs_api/classes/JC.Tab.View.html +++ b/docs_api/classes/window.Bizs.MultiSelectTree.html @@ -2,11 +2,18 @@ - + window.Bizs.MultiSelectTree - jquery components + + + - + + + + +
            @@ -33,44 +40,79 @@

            APIs

            @@ -102,27 +144,39 @@

            APIs

            +

            window.Bizs.MultiSelectTree Class

            -

            Tab 视图模型类

            +

            MultiSelect
            +多选树
            +基于JC.Tree的扩展

            +

            require: + JC.common + , JC.Tree +

            +

            JC Project Site + | API docs + | demo link

            Constructor

            +
            +

            window.Bizs.MultiSelectTree

            (
            • - _model + _selector
            )
            @@ -131,7 +185,8 @@

            Constructor

            Parameters:

            • - _model + _selector + Selector | String
            • @@ -143,7 +198,6 @@

              Parameters:

              @@ -152,115 +206,42 @@

              Item Index

              Methods

              -
              -
              -

              Properties

              -

              Methods

              -
              -

              active

              +
              +

              expandChild

              (
              • - _ix + _evt
              )
              -

              设置特定索引位置的 label 为活动状态

              +

              explain~

              Parameters:

              • - _ix - Int + _evt + Event
              -
              -
              -

              activeAjax

              -
              - (
                -
              • - _ix -
              • -
              ) -
              -
              -

              - Defined in - ../comps/Tab/Tab.js:619 -

              -
              -
              -

              请求特定索引位置的 ajax tab 数据

              -
              -
              -

              Parameters:

              -
                -
              • - _ix - Int -
                -
                -
              • -
              -
              -
              -
              -

              init

              - () -
              -

              - Defined in - ../comps/Tab/Tab.js:573 -

              -
              -
              -

              Tab 视图类初始化方法

              -
              -
              -
              -
              -

              Properties

              -
              -

              _model

              - private -
              -

              - Defined in - ../comps/Tab/Tab.js:563 -

              -
              -
              -

              Tab 数据模型类实例引用

              -
              diff --git a/docs_api/classes/window.Bizs.MultiUpload.html b/docs_api/classes/window.Bizs.MultiUpload.html new file mode 100644 index 000000000..3486fcda4 --- /dev/null +++ b/docs_api/classes/window.Bizs.MultiUpload.html @@ -0,0 +1,812 @@ + + + + + window.Bizs.MultiUpload - jquery components + + + + + + + + + + + + + +
              +
              +
              +

              +
              +
              + API Docs for: 0.1 +
              +
              +
              + +
              +
              + Show: + + + + +
              +
              +
              +
              +

              window.Bizs.MultiUpload Class

              +
              +
              + Extends JC.BaseMVC +
              + +
              +
              +

              上传多个文件, 基于 JC.AjaxUpload

              +

              require: + jQuery + , JC.BaseMVC + , JC.AjaxUpload +

              +

              JC Project Site + | API docs + | demo link

              +

              页面只要引用本脚本, 默认会自动处理 div class="js_bizMultiUpload"

              +

              可用的 HTML attribute

              +
              +
              bmuItemLimit = int, default = 0
              +
              限制上传的数量, 0 为不限制, 非 0 为限制的数量
              +
              bmuBoxSelector = selector, default = '|.bmuBoxSelector'
              +
              上传内容的父容器
              +
              bmuTplSelector = selector, default = 组件生成
              +
              上传内容的模板内容, {0} = file url, {1} = file name
              +
              bmuAjaxUploadSelector = selector, default = '|.js_compAjaxUpload'
              +
              JC.AjaxUpload 的选择器
              +
              bmuItemDelegate = selector, default = '>'
              +
              bmuBoxSelector 的子级标签
              +
              bmuRemoveDelegate = selector, default = '.js_removeUploadItem'
              +
              删除子级标签的选择器
              +
              bmuRemoveItemParentSelector = selector, default = '('
              +
              相对于 bmuRemoveDelegate 的子级标签父选择器
              +
              bmuItemAddedCallback = function
              +
              添加上传内容后的回调 +
              function bmuItemAddedCallback( _newItem, _json, _boxSelector ){
              +   var _bmuIns = this;
              +}
              +
              +
              bmuItemDeletedCallback = function
              +
              删除上传内容后的回调 +
              function bmuItemDeletedCallback( _deletedItem, _boxSelector ){
              +   var _bmuIns = this;
              +}
              +
              +
              +
              +
              +

              Constructor

              +
              +

              window.Bizs.MultiUpload

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + +
              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector | String +
                +
                +
              • +
              +
              +
              +

              Example:

              +
              + <div class="js_bizMultiUpload" + bmuBoxSelector="|.uploadItemBox" + bmuTplSelector="|script" + bmuItemDelegate=">" + bmuRemoveDelegate=".js_removeUploadItem" + bmuRemoveItemParentSelector="(" + bmuAjaxUploadSelector="|.js_compAjaxUpload" + bmuItemLimit="2" + > + <div> + <input type="hidden" class="ipt ipt-w180 js_compAjaxUpload" value="" + cauStyle="w1" + cauButtonText="上传资质文件" + cauUrl="../_demo/data/handler.php" + cauFileExt=".jpg, .jpeg, .png, .gif" + cauFileName="file" + cauValueKey="url" + cauLabelKey="name" + cauProgressBox="/span.AUProgressBox" + /> + <span class="AUProgressBox" style="display:none;"> + <button type="button" class="AUProgress"><div class="AUPercent"></div></button> + <button type="button" class="AUCancelProgress"></button> + </span> + .jpg, .jpeg, .png, .gif + (最多上传2个) + </div> + <dl class="uploadItemBox"> + </dl> + <script type="text/template"> + <dd class="js_multiUploadItem"> + <input type="hidden" name="file[]" value="{0}" class="js_multiUploadHidden" /> + <a href="{0}" target="_blank"><label class="js_multiUploadLabel">{1}</label></a> + <button type="button" class="AURemove js_removeUploadItem"></button> + </dd> + </script> +</div> +
              +
              +
              +
              +
              + +
              +
              +

              Item Index

              +
              +

              Methods

              + +
              +
              +

              Events

              + +
              +
              +
              +

              Methods

              +
              +

              _beforeInit

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

              +
              +
              +

              初始化之前调用的方法

              +
              +
              +
              +

              _init

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

              +
              +
              +

              内部初始化方法

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +
              +

              _inited

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

              +
              +
              +

              内部初始化完毕时, 调用的方法

              +
              +
              +
              +

              _initHanlderEvent

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

              +
              +
              +

              内部事件初始化方法

              +
              +
              +
              +

              init

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + + Array of MultiUploadInstance + + static + +
              +

              初始化可识别的 MultiUpload 实例

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + Array of MultiUploadInstance: +
              +
              +
              +
              +

              notification

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

              +
              +
              +

              通知选择器有新事件 +
              JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +
              +

              notificationHandler

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

              +
              +
              +

              通知选择器有新事件, 有返回结果 +
              JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + : +
              +
              +
              +
              +

              on

              +
              + (
                +
              • + _evtName +
              • +
              • + _cb +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

              +
              +
              +

              使用 jquery on 绑定事件

              +
              +
              +

              Parameters:

              + +
              +
              +

              Returns:

              +
              +

              BaseMVCInstance

              +
              +
              +
              +
              +

              selector

              + () + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

              +
              +
              +

              获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

              +
              +
              +

              Returns:

              +
              +

              selector

              +
              +
              +
              +
              +

              trigger

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

              +
              +
              +

              使用 jquery trigger 触发绑定事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              +

              BaseMVCInstance

              +
              +
              +
              +
              +

              triggerHandler

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

              +
              +
              +

              使用 jquery triggerHandler 触发绑定事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + : +
              +
              +
              +
              +

              updateStatus

              + () + +
              +

              更新按钮的状态

              +
              +
              +
              +
              +

              Events

              +
              +

              AjaxDone

              + + +
              +

              ajax 上传完毕后触发的事件

              +
              +
              +
              +

              CheckItemLimit

              + + +
              +

              修正按钮状态的事件

              +
              +
              +
              +

              inited

              + + +
              +

              Bizs.MultiUpload 初始化后触发的事件

              +
              +
              +
              +

              ItemAdded

              + + +
              +

              添加上传内容后触发的事件

              +
              +
              +
              +

              ItemDeleted

              + + +
              +

              删除上传内容后触发的事件

              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.MultiselectPanel.html b/docs_api/classes/window.Bizs.MultiselectPanel.html new file mode 100644 index 000000000..06fe91161 --- /dev/null +++ b/docs_api/classes/window.Bizs.MultiselectPanel.html @@ -0,0 +1,676 @@ + + + + + window.Bizs.MultiselectPanel - jquery components + + + + + + + + + + + + + +
              +
              +
              +

              +
              +
              + API Docs for: 0.1 +
              +
              +
              + +
              +
              + Show: + + + + +
              +
              +
              +
              +

              window.Bizs.MultiselectPanel Class

              + +
              +

              二级分类复选弹框

              +

              require: + JC.BaseMVC + , JC.Panel +

              +

              JC Project Site + | API docs + | demo link

              +

              页面只要引用本脚本, 默认会自动处理 [input|button] class="js_bizMultiselectPanel"

              +

              共用的 HTML attribute

              +
              +
              bmspUrl = url
              +
              获取一级分类数据的URL

              +

              bmspChildUrl = url
              +
              获取子级分类数据的URL, "{0}" 代表父级ID

              +

              bmspPopupHideButton = bool, default = false
              +
              显示弹框的时候, 是否遮盖触发源标签

              +

              bmspPanel = selector
              +
              显示内容的弹框

              +

              bmspPanelBoxSelector = selector
              +
              弹框里显示分类内容的容器

              +

              bmspTopTpl = script selector
              +
              一级分类的脚本模板

              +

              bmspChildTpl = script selector
              +
              子级分类的脚本模板

              +

              bmspOpenClass = css class name
              +
              展开子级分类的样式

              +

              bmspCloseClass = css class name
              +
              关闭子级分类的样式

              +

              bmspNoItemText = string
              +
              没有选择内容时的提示文本

              +

              bmspHasItemText = string
              +
              有选择内容时的提示文本, "{0}" 代表选择的数量

              +

              bmspSaveTopIdSelector = selector
              +
              保存一级分类ID的选择器
              +

              +

              URL 回填的 HTML attribute

              +
              +
              bmspAutoFillTopKey = url arg name
              +
              回填一级分类的URL识别name

              +

              bmspAutoFillChildKey = url arg name
              +
              回填子级分类的URL识别name
              +

              +

              数据 回填的 HTML attribute

              +
              +
              bmspDefaultFillData = json data name, window 变量域
              +
              初始化的数据变量名
              +window.testData = { "parents": [ 1, 2, 3 ], "children": [4, 5, 6, 7, 8 ] };
              +
              +

              +
              +
              +

              Constructor

              +
              +

              window.Bizs.MultiselectPanel

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + +
              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector | String +
                +
                +
              • +
              +
              +
              +
              +
              + +
              +
              +

              Item Index

              +
              +

              Methods

              + +
              +
              +
              +

              Methods

              +
              +

              _beforeInit

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

              +
              +
              +

              初始化之前调用的方法

              +
              +
              +
              +

              _init

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

              +
              +
              +

              内部初始化方法

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +
              +

              _inited

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

              +
              +
              +

              内部初始化完毕时, 调用的方法

              +
              +
              +
              +

              _initHanlderEvent

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

              +
              +
              +

              内部事件初始化方法

              +
              +
              +
              +

              init

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + + Array of MultiselectPanelInstance + + static + +
              +

              初始化可识别的 MultiselectPanel 实例

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + Array of MultiselectPanelInstance: +
              +
              +
              +
              +

              notification

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

              +
              +
              +

              通知选择器有新事件 +
              JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +
              +

              notificationHandler

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

              +
              +
              +

              通知选择器有新事件, 有返回结果 +
              JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + : +
              +
              +
              +
              +

              on

              +
              + (
                +
              • + _evtName +
              • +
              • + _cb +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

              +
              +
              +

              使用 jquery on 绑定事件

              +
              +
              +

              Parameters:

              + +
              +
              +

              Returns:

              +
              +

              BaseMVCInstance

              +
              +
              +
              +
              +

              selector

              + () + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

              +
              +
              +

              获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

              +
              +
              +

              Returns:

              +
              +

              selector

              +
              +
              +
              +
              +

              trigger

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

              +
              +
              +

              使用 jquery trigger 触发绑定事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              +

              BaseMVCInstance

              +
              +
              +
              +
              +

              triggerHandler

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

              +
              +
              +

              使用 jquery triggerHandler 触发绑定事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + : +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.Bizs.TaskViewer.html b/docs_api/classes/window.Bizs.TaskViewer.html new file mode 100644 index 000000000..7a30c5a1c --- /dev/null +++ b/docs_api/classes/window.Bizs.TaskViewer.html @@ -0,0 +1,689 @@ + + + + + window.Bizs.TaskViewer - jquery components + + + + + + + + + + + + + +
              +
              +
              +

              +
              +
              + API Docs for: 0.1 +
              +
              +
              + +
              +
              + Show: + + + + +
              +
              +
              +
              +

              window.Bizs.TaskViewer Class

              +
              +
              + Extends JC.BaseMVC +
              + +
              +
              +

              TaskViewer 日历任务展示面板

              +

              require: + jQuery + , JC.common + , JC.BaseMVC +

              +

              JC Project Site + | API docs + | demo link

              +

              页面只要引用本文件, 默认会自动初始化class="js_COMPTaskViewer"下的日期

              +

              可用的 HTML attribute

              +
              +
              taskselecteddates = selector
              +
              指定选定的日期标签
              +
              taskdeleteddates = selector
              +
              指定删除的日期标签
              +
              tasknewaddeddates = selector
              +
              指定新增的日期标签
              +
              +
              +
              +

              Constructor

              +
              +

              window.Bizs.TaskViewer

              +
              + (
                +
              • + _selector +
              • +
              ) +
              +
              +

              + Defined in + ../bizs/TaskViewer/TaskViewer.js:2 +

              +
              +
              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector | String +
                +
                +
              • +
              +
              +
              +
              +
              + +
              +
              +

              Item Index

              +
              +

              Methods

              + +
              +
              +
              +

              Methods

              +
              +

              _beforeInit

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:60 +

              +
              +
              +

              初始化之前调用的方法

              +
              +
              +
              +

              _init

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:31 +

              +
              +
              +

              内部初始化方法

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +
              +

              _inited

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:76 +

              +
              +
              +

              内部初始化完毕时, 调用的方法

              +
              +
              +
              +

              _initHanlderEvent

              + () + private +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:68 +

              +
              +
              +

              内部事件初始化方法

              +
              +
              +
              +

              getInstance

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + + TaskViewerInstance + + static + +
              +

              获取或设置 TaskViewer 的实例

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + TaskViewerInstance: +
              +
              +
              +
              +

              init

              +
              + (
                +
              • + _selector +
              • +
              ) +
              + + Array of TaskViewerInstance + + static + +
              +

              初始化可识别的 TaskViewer 实例

              +
              +
              +

              Parameters:

              +
                +
              • + _selector + Selector +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + Array of TaskViewerInstance: +
              +
              +
              +
              +

              notification

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:114 +

              +
              +
              +

              通知选择器有新事件 +
              JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +
              +

              notificationHandler

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:125 +

              +
              +
              +

              通知选择器有新事件, 有返回结果 +
              JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + : +
              +
              +
              +
              +

              on

              +
              + (
                +
              • + _evtName +
              • +
              • + _cb +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:90 +

              +
              +
              +

              使用 jquery on 绑定事件

              +
              +
              +

              Parameters:

              + +
              +
              +

              Returns:

              +
              +

              BaseMVCInstance

              +
              +
              +
              +
              +

              selector

              + () + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:84 +

              +
              +
              +

              获取 显示 BaseMVC 的触发源选择器, 比如 a 标签

              +
              +
              +

              Returns:

              +
              +

              selector

              +
              +
              +
              +
              +

              trigger

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:98 +

              +
              +
              +

              使用 jquery trigger 触发绑定事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              +

              BaseMVCInstance

              +
              +
              +
              +
              +

              triggerHandler

              +
              + (
                +
              • + _evtName +
              • +
              • + _args +
              • +
              ) +
              + + + +
              +

              Inherited from + JC.BaseMVC: + ../comps/BaseMVC/BaseMVC.js:106 +

              +
              +
              +

              使用 jquery triggerHandler 触发绑定事件

              +
              +
              +

              Parameters:

              +
                +
              • + _evtName + String +
                +
                +
              • +
              • + _args + | Array +
                +
                +
              • +
              +
              +
              +

              Returns:

              +
              + : +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.UXC.html b/docs_api/classes/window.JSON.html similarity index 56% rename from docs_api/classes/window.UXC.html rename to docs_api/classes/window.JSON.html index 954201204..b7ada5697 100644 --- a/docs_api/classes/window.UXC.html +++ b/docs_api/classes/window.JSON.html @@ -2,12 +2,18 @@ - window.UXC - jquery components - + window.JSON - jquery components + + + - + + + + +
              @@ -34,44 +40,79 @@

              APIs

              @@ -103,17 +144,18 @@

              APIs

              -

              window.UXC Class

              +

              window.JSON Class

              - Defined in: ../lib.js:1146 + Defined in: ../plugins/json2.js:1
              -

              UXC 是 JC 的别名 -
              存在这个变量是为了向后兼容 -
              20130804 之前的命名空间是 UXC, 这个命名空间在一段时间后将会清除, 请使用 JC 命名空间

              -

              see: JC

              +

              json2.js +
              JSON is a light-weight, language independent, data interchange format.

              +

              source +| docs +

                diff --git a/docs_api/classes/window.Raphael.html b/docs_api/classes/window.Raphael.html new file mode 100644 index 000000000..5e7420856 --- /dev/null +++ b/docs_api/classes/window.Raphael.html @@ -0,0 +1,184 @@ + + + + + window.Raphael - jquery components + + + + + + + + + + + + + +
                +
                +
                +

                +
                +
                + API Docs for: 0.1 +
                +
                +
                + +
                +
                + Show: + + + + +
                +
                +
                +
                +

                window.Raphael Class

                +
                +
                + Defined in: ../plugins/raphael.js:1 +
                +
                +
                +

                Raphaël 2.1.2 - JavaScript Vector Library

                +

                JC Project Site +| API docs +| demo

                +
                +
                + +
                +
                +

                Item Index

                +
                +
                +
                +
                +
                +
                +
                +
                +
                + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.jQuery.html b/docs_api/classes/window.jQuery.html index 7a90b5f29..8a127d248 100644 --- a/docs_api/classes/window.jQuery.html +++ b/docs_api/classes/window.jQuery.html @@ -3,11 +3,17 @@ window.jQuery - jquery components - + + + - + + + + +
                @@ -34,44 +40,79 @@

                APIs

                @@ -106,7 +147,7 @@

                APIs

                window.jQuery Class

                - Defined in: ../lib.js:1 + Defined in: ../jquery.js:1
                diff --git a/docs_api/classes/window.jQuery.mousewheel.html b/docs_api/classes/window.jQuery.mousewheel.html new file mode 100644 index 000000000..6e39d6929 --- /dev/null +++ b/docs_api/classes/window.jQuery.mousewheel.html @@ -0,0 +1,182 @@ + + + + + window.jQuery.mousewheel - jquery components + + + + + + + + + + + + + +
                +
                +
                +

                +
                +
                + API Docs for: 0.1 +
                +
                +
                + +
                +
                + Show: + + + + +
                +
                +
                +
                +

                window.jQuery.mousewheel Class

                + + +
                + +
                +
                +

                Item Index

                +
                +
                +
                +
                +
                +
                +
                +
                +
                + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/classes/window.swfobject.html b/docs_api/classes/window.swfobject.html new file mode 100644 index 000000000..82809b463 --- /dev/null +++ b/docs_api/classes/window.swfobject.html @@ -0,0 +1,187 @@ + + + + + window.swfobject - jquery components + + + + + + + + + + + + + +
                +
                +
                +

                +
                +
                + API Docs for: 0.1 +
                +
                +
                + +
                +
                + Show: + + + + +
                +
                +
                +
                +

                window.swfobject Class

                +
                +
                + Defined in: ../plugins/swfobject.js:1 +
                +
                +
                +

                swfobject v2.3 +
                An open source Javascript framework for detecting the Adobe Flash Player plugin and embedding Flash (swf) files.

                +

                source +| docs +| demo link +| html generator +

                +
                +
                + +
                +
                +

                Item Index

                +
                +
                +
                +
                +
                +
                +
                +
                +
                + + + + + + + + + + \ No newline at end of file diff --git a/docs_api/data.json b/docs_api/data.json index f7b043884..5be7acbc4 100644 --- a/docs_api/data.json +++ b/docs_api/data.json @@ -18,6 +18,28 @@ "window.Bizs": 1 } }, + "../bizs/AutoSelectComplete/AutoSelectComplete.js": { + "name": "../bizs/AutoSelectComplete/AutoSelectComplete.js", + "modules": {}, + "classes": { + "window.Bizs.AutoSelectComplete": 1 + }, + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, + "../bizs/ChangeLogic/ChangeLogic.js": { + "name": "../bizs/ChangeLogic/ChangeLogic.js", + "modules": {}, + "classes": { + "window.Bizs.ChangeLogic": 1 + }, + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, "../bizs/CommonModify/CommonModify.js": { "name": "../bizs/CommonModify/CommonModify.js", "modules": {}, @@ -29,6 +51,28 @@ "window.Bizs": 1 } }, + "../bizs/CustomColumn/CustomColumn.js": { + "name": "../bizs/CustomColumn/CustomColumn.js", + "modules": {}, + "classes": { + "window.Bizs.CustomColumn": 1 + }, + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, + "../bizs/DMultiDate/DMultiDate.js": { + "name": "../bizs/DMultiDate/DMultiDate.js", + "modules": {}, + "classes": { + "window.Bizs.DMultiDate": 1 + }, + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, "../bizs/DisableLogic/DisableLogic.js": { "name": "../bizs/DisableLogic/DisableLogic.js", "modules": {}, @@ -40,6 +84,17 @@ "window.Bizs": 1 } }, + "../bizs/DropdownTree/DropdownTree.js": { + "name": "../bizs/DropdownTree/DropdownTree.js", + "modules": {}, + "classes": { + "window.Bizs.DropdownTree": 1 + }, + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, "../bizs/FormLogic/FormLogic.js": { "name": "../bizs/FormLogic/FormLogic.js", "modules": {}, @@ -51,6 +106,17 @@ "window.Bizs": 1 } }, + "../bizs/InputSelect/InputSelect.js": { + "name": "../bizs/InputSelect/InputSelect.js", + "modules": {}, + "classes": { + "window.Bizs.InputSelect": 1 + }, + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, "../bizs/KillISPCache/KillISPCache.js": { "name": "../bizs/KillISPCache/KillISPCache.js", "modules": {}, @@ -62,1716 +128,10265 @@ "window.Bizs": 1 } }, - "../bizs/MultiDate/MultiDate.js": { - "name": "../bizs/MultiDate/MultiDate.js", + "../bizs/MoneyTips/MoneyTips.js": { + "name": "../bizs/MoneyTips/MoneyTips.js", "modules": {}, "classes": { - "window.Bizs.MultiDate": 1 + "window.Bizs.MoneyTips": 1 }, "fors": {}, "namespaces": { "window.Bizs": 1 } }, - "../comps/AjaxUpload/AjaxUpload.js": { - "name": "../comps/AjaxUpload/AjaxUpload.js", + "../bizs/MultiAutoComplete/MultiAutoComplete.js": { + "name": "../bizs/MultiAutoComplete/MultiAutoComplete.js", "modules": {}, "classes": { - "JC.AjaxUpload": 1 + "window.Bizs.MultiAutoComplete": 1 }, "fors": {}, "namespaces": { - "JC": 1 + "window.Bizs": 1 } }, - "../comps/AutoChecked/AutoChecked.js": { - "name": "../comps/AutoChecked/AutoChecked.js", + "../bizs/MultiChangeLogic/MultiChangeLogic.js": { + "name": "../bizs/MultiChangeLogic/MultiChangeLogic.js", "modules": {}, "classes": { - "JC.AutoChecked": 1 + "window.Bizs.MultiChangeLogic": 1 }, "fors": {}, "namespaces": { - "JC": 1 + "window.Bizs": 1 } }, - "../comps/AutoSelect/AutoSelect.js": { - "name": "../comps/AutoSelect/AutoSelect.js", + "../bizs/MultiDate/MultiDate.js": { + "name": "../bizs/MultiDate/MultiDate.js", "modules": {}, "classes": { - "JC.AutoSelect": 1 + "window.Bizs.MultiDate": 1 }, "fors": {}, "namespaces": { - "JC": 1 + "window.Bizs": 1 } }, - "../comps/Calendar/Calendar.js": { - "name": "../comps/Calendar/Calendar.js", + "../bizs/MultiSelect/MultiSelect.js": { + "name": "../bizs/MultiSelect/MultiSelect.js", "modules": {}, "classes": { - "JC.Calendar": 1 - }, - "fors": { - "JC.Calendar": 1 + "window.Bizs.MultiSelect": 1 }, + "fors": {}, "namespaces": { - "JC": 1 + "window.Bizs": 1 } }, - "../comps/Fixed/Fixed.js": { - "name": "../comps/Fixed/Fixed.js", + "../bizs/MultiSelectTree/MultiSelectTree.js": { + "name": "../bizs/MultiSelectTree/MultiSelectTree.js", "modules": {}, "classes": { - "JC.Fixed": 1 + "window.Bizs.MultiSelectTree": 1 }, "fors": {}, "namespaces": { - "JC": 1 + "window.Bizs": 1 } }, - "../comps/Form/Form.js": { - "name": "../comps/Form/Form.js", + "../bizs/MultiUpload/MultiUpload.js": { + "name": "../bizs/MultiUpload/MultiUpload.js", "modules": {}, "classes": { - "JC.Form": 1 - }, - "fors": { - "JC.Form": 1 + "window.Bizs.MultiUpload": 1 }, + "fors": {}, "namespaces": { - "JC": 1 + "window.Bizs": 1 } }, - "../comps/LunarCalendar/LunarCalendar.js": { - "name": "../comps/LunarCalendar/LunarCalendar.js", + "../bizs/MultiselectPanel/MultiselectPanel.js": { + "name": "../bizs/MultiselectPanel/MultiselectPanel.js", "modules": {}, "classes": { - "JC.LunarCalendar": 1, - "JC.LunarCalendar.View": 1, - "JC.LunarCalendar.Model": 1 - }, - "fors": { - "JC.LunarCalendar": 1 + "window.Bizs.MultiselectPanel": 1 }, + "fors": {}, "namespaces": { - "JC": 1, - "JC.LunarCalendar": 1 + "window.Bizs": 1 } }, - "../comps/Panel/Panel.js": { - "name": "../comps/Panel/Panel.js", + "../bizs/TaskViewer/TaskViewer.js": { + "name": "../bizs/TaskViewer/TaskViewer.js", "modules": {}, "classes": { - "JC.Panel": 1, - "JC.Panel.Model": 1, - "JC.hideAllPanel": 1, - "JC.hideAllPopup": 1, - "JC.msgbox": 1, - "JC.alert": 1, - "JC.confirm": 1, - "JC.Dialog": 1, - "JC.Dialog.msgbox": 1, - "JC.Dialog.alert": 1, - "JC.Dialog.confirm": 1, - "JC.Dialog.mask": 1 + "window.Bizs.TaskViewer": 1 }, - "fors": { - "View": 1, - "JC.alert": 1, - "JC.Dialog": 1 + "fors": {}, + "namespaces": { + "window.Bizs": 1 + } + }, + "../comps/AjaxTree/AjaxTree.js": { + "name": "../comps/AjaxTree/AjaxTree.js", + "modules": {}, + "classes": { + "JC.AjaxTree": 1 }, + "fors": {}, "namespaces": { - "JC": 1, - "JC.Panel": 1, - "JC.Dialog": 1 + "JC": 1 } }, - "../comps/Placeholder/Placeholder.js": { - "name": "../comps/Placeholder/Placeholder.js", + "../comps/AjaxUpload/AjaxUpload.js": { + "name": "../comps/AjaxUpload/AjaxUpload.js", "modules": {}, "classes": { - "JC.Placeholder": 1 + "JC.AjaxUpload": 1 }, "fors": {}, "namespaces": { "JC": 1 } }, - "../comps/Slider/Slider.js": { - "name": "../comps/Slider/Slider.js", + "../comps/AutoChecked/AutoChecked.js": { + "name": "../comps/AutoChecked/AutoChecked.js", "modules": {}, "classes": { - "JC.Slider": 1, - "JC.Slider.Model": 1 + "JC.AutoChecked": 1 }, "fors": {}, "namespaces": { - "JC": 1, - "JC.Slider": 1 + "JC": 1 } }, - "../comps/Suggest/Suggest.js": { - "name": "../comps/Suggest/Suggest.js", + "../comps/AutoComplete/AutoComplete.js": { + "name": "../comps/AutoComplete/AutoComplete.js", "modules": {}, "classes": { - "JC.Suggest": 1 + "JC.AutoComplete": 1 }, "fors": {}, "namespaces": { "JC": 1 } }, - "../comps/Tab/Tab.js": { - "name": "../comps/Tab/Tab.js", + "../comps/AutoFixed/AutoFixed.js": { + "name": "../comps/AutoFixed/AutoFixed.js", "modules": {}, "classes": { - "JC.Tab": 1, - "JC.Tab.Model": 1, - "JC.Tab.View": 1 + "JC.AutoFixed": 1 }, "fors": {}, "namespaces": { - "JC": 1, - "JC.Tab": 1 + "JC": 1 } }, - "../comps/Tips/Tips.js": { - "name": "../comps/Tips/Tips.js", + "../comps/AutoSelect/AutoSelect.js": { + "name": "../comps/AutoSelect/AutoSelect.js", "modules": {}, "classes": { - "JC.Tips": 1, - "JC.Tips.Model": 1, - "JC.Tips.View": 1 + "JC.AutoSelect": 1 }, "fors": {}, "namespaces": { - "JC": 1, - "JC.Tips": 1 + "JC": 1 } }, - "../comps/Tree/Tree.js": { - "name": "../comps/Tree/Tree.js", + "../comps/BaseMVC/BaseMVC.js": { + "name": "../comps/BaseMVC/BaseMVC.js", "modules": {}, "classes": { - "JC.Tree": 1, - "JC.Tree.Model": 1 + "JC.BaseMVC": 1, + "JC.BaseMVC.Model": 1 }, "fors": {}, "namespaces": { - "JC": 1, - "JC.Tree": 1 + "JC": 1 } }, - "../comps/Valid/Valid.js": { - "name": "../comps/Valid/Valid.js", + "../comps/Calendar/Calendar.date.js": { + "name": "../comps/Calendar/Calendar.date.js", "modules": {}, "classes": { - "JC.Valid": 1 + "JC.Calendar": 1 }, "fors": {}, "namespaces": { "JC": 1 } }, - "../plugins/rate/spec/lib/jasmine.js": { - "name": "../plugins/rate/spec/lib/jasmine.js", + "../comps/Calendar/Calendar.js": { + "name": "../comps/Calendar/Calendar.js", "modules": {}, "classes": {}, "fors": {}, "namespaces": {} }, - "../plugins/aes.js": { - "name": "../plugins/aes.js", + "../comps/Calendar/Calendar.month.js": { + "name": "../comps/Calendar/Calendar.month.js", "modules": {}, "classes": {}, - "fors": {}, + "fors": { + "JC.Calendar": 1 + }, "namespaces": {} }, - "../jquery.js": { - "name": "../jquery.js", + "../comps/Calendar/Calendar.monthday.js": { + "name": "../comps/Calendar/Calendar.monthday.js", + "modules": {}, + "classes": {}, + "fors": { + "JC.Calendar": 1 + }, + "namespaces": {} + }, + "../comps/Calendar/Calendar.season.js": { + "name": "../comps/Calendar/Calendar.season.js", + "modules": {}, + "classes": {}, + "fors": { + "JC.Calendar": 1 + }, + "namespaces": {} + }, + "../comps/Calendar/Calendar.week.js": { + "name": "../comps/Calendar/Calendar.week.js", + "modules": {}, + "classes": {}, + "fors": { + "JC.Calendar": 1 + }, + "namespaces": {} + }, + "../comps/Calendar/Calendar.year.js": { + "name": "../comps/Calendar/Calendar.year.js", "modules": {}, "classes": {}, + "fors": { + "JC.Calendar": 1 + }, + "namespaces": {} + }, + "../comps/DCalendar/DCalendar.date.js": { + "name": "../comps/DCalendar/DCalendar.date.js", + "modules": {}, + "classes": { + "JC.DCalendar": 1 + }, "fors": {}, "namespaces": { - "window": 1 + "JC": 1 } }, - "../lib.js": { - "name": "../lib.js", + "../comps/DCalendar/DCalendar.js": { + "name": "../comps/DCalendar/DCalendar.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../comps/Drag/Drag.js": { + "name": "../comps/Drag/Drag.js", "modules": {}, "classes": { - "window.jQuery": 1, - ".window": 1, - "window.JC": 1, - "window.UXC": 1, - "JC.Bizs": 1, - "JC.BaseMVC": 1, - "JC.BaseMVC.Model": 1 + "JC.Drag": 1 }, "fors": {}, "namespaces": { - "window": 1, "JC": 1 } - } - }, - "modules": {}, - "classes": { - "window.Bizs.ActionLogic": { - "name": "window.Bizs.ActionLogic", - "shortname": "window.Bizs.ActionLogic", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window.Bizs", - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 1, - "description": "

                node 点击操作逻辑

                \n应用场景\n
                点击后弹框( 脚本模板 )\n
                点击后弹框( AJAX )\n
                点击后弹框( Dom 模板 )\n
                点击后执行 AJAX 操作\n

                JC Project Site\n| API docs\n| demo link

                \n\nrequire: jQuery\n
                require: JC.Panel\n\na|button 需要 添加 class=\"js_bizsActionLogic\"\n\n

                可用的 HTML 属性

                \n
                \n
                balType = string, 操作类型
                \n
                \n
                \n
                类型:
                \n
                panel: 弹框
                \n
                link: 链接跳转
                \n
                ajaxaction: ajax操作, 删除, 启用, 禁用
                \n
                \n
                \n
                \n

                balType = panel 可用的 HTML 属性

                \n
                \n
                balPanelTpl = script selector
                \n
                脚本模板选择器
                \n\n
                balAjaxHtml = url
                \n
                返回 HTML 的 AJAX 模板
                \n\n
                balAjaxData = url
                \n
                返回 json 的 AJAX 模板, { errorno: int, data: html }
                \n\n
                balCallback = function
                \n
                \n 显示模板后的回调\nfunction balPanelInitCb( _panelIns ){\n var _trigger = $(this);\n //return true; //如果返回真的话, 表单提交后会关闭弹框\n}\n
                \n
                \n

                balType = link 可用的 HTML 属性

                \n
                \n
                balUrl = url
                \n
                要跳转的目标 URL
                \n\n
                balConfirmMsg = string
                \n
                跳转前的二次确认提示信息
                \n\n
                balConfirmPopupType = string, default = confirm
                \n
                二次确认的弹框类型: confirm, dialog.confirm
                \n
                \n

                balType = ajaxaction 可用的 HTML 属性

                \n
                \n
                balUrl = url
                \n
                AJAX 操作的接口
                \n\n
                balDoneUrl = url
                \n
                AJAX 操作完成后跳转的URL
                \n\n
                balConfirmMsg = string
                \n
                操作前的二次确认提示信息
                \n\n
                balErrorPopupType = string, default = dialog.alert
                \n
                错误提示的弹框类型: alert, msgbox, dialog.alert, dialog.msgbox
                \n\n
                balSuccessPopupType = string, default = msgbox
                \n
                错误提示的弹框类型: alert, msgbox, dialog.alert, dialog.msgbox
                \n\n
                balCallback = function
                \n
                \n 操作完成后的回调\nfunction ajaxDelCallback( _d, _ins ){\n var _trigger = $(this);\n if( _d && !_d.errorno ){\n JC.msgbox( _d.errmsg || '操作成功', _trigger, 0, function(){\n reloadPage( '?usercallback=ajaxaction' );\n });\n }else{\n JC.Dialog.alert( _d && _d.errmsg ? _d.errmsg : '操作失败, 请重试!' , 1 );\n }\n}\n\n
                \n
                ", - "extends": "JC.BaseMVC", - "is_constructor": 1, - "version": "dev 0.1 2013-09-17", - "author": "qiushaowei | 75 Team" }, - "window.Bizs.CommonModify": { - "name": "window.Bizs.CommonModify", - "shortname": "window.Bizs.CommonModify", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window.Bizs", + "../comps/DragSelect/DragSelect.js": { + "name": "../comps/DragSelect/DragSelect.js", + "modules": {}, + "classes": { + "JC.DragSelect": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/FChart/FChart.js": { + "name": "../comps/FChart/FChart.js", + "modules": {}, + "classes": { + "JC.FChart": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Fixed/Fixed.js": { + "name": "../comps/Fixed/Fixed.js", + "modules": {}, + "classes": { + "JC.Fixed": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/FlowChart/FlowChart.js": { + "name": "../comps/FlowChart/FlowChart.js", + "modules": {}, + "classes": { + "JC.FlowChart": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Form/Form.js": { + "name": "../comps/Form/Form.js", + "modules": {}, + "classes": { + "JC.Form": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/FormFillUrl/FormFillUrl.js": { + "name": "../comps/FormFillUrl/FormFillUrl.js", + "modules": {}, + "classes": { + "JC.FormFillUrl": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/FrameUtil/FrameUtil.js": { + "name": "../comps/FrameUtil/FrameUtil.js", + "modules": {}, + "classes": { + "JC.FrameUtil": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/ImageCutter/ImageCutter.js": { + "name": "../comps/ImageCutter/ImageCutter.js", + "modules": {}, + "classes": { + "JC.ImageCutter": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/LunarCalendar/LunarCalendar.default.js": { + "name": "../comps/LunarCalendar/LunarCalendar.default.js", + "modules": {}, + "classes": { + "JC.LunarCalendar": 1, + "JC.LunarCalendar.View": 1, + "JC.LunarCalendar.Model": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1, + "JC.LunarCalendar": 1 + } + }, + "../comps/LunarCalendar/LunarCalendar.getFestival.js": { + "name": "../comps/LunarCalendar/LunarCalendar.getFestival.js", + "modules": {}, + "classes": {}, + "fors": { + "JC.LunarCalendar": 1 + }, + "namespaces": {} + }, + "../comps/LunarCalendar/LunarCalendar.gregorianToLunar.js": { + "name": "../comps/LunarCalendar/LunarCalendar.gregorianToLunar.js", + "modules": {}, + "classes": {}, + "fors": { + "JC.LunarCalendar": 1 + }, + "namespaces": {} + }, + "../comps/LunarCalendar/LunarCalendar.js": { + "name": "../comps/LunarCalendar/LunarCalendar.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../comps/NumericStepper/NumericStepper.js": { + "name": "../comps/NumericStepper/NumericStepper.js", + "modules": {}, + "classes": { + "JC.NumericStepper": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Paginator/Paginator.js": { + "name": "../comps/Paginator/Paginator.js", + "modules": {}, + "classes": { + "JC.Paginator": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Panel/Dialog.js": { + "name": "../comps/Panel/Dialog.js", + "modules": {}, + "classes": { + "JC.Dialog": 1, + "JC.Dialog.mask": 1 + }, + "fors": { + "JC.Dialog": 1 + }, + "namespaces": { + "JC": 1, + "JC.Dialog": 1 + } + }, + "../comps/Panel/Dialog.popup.js": { + "name": "../comps/Panel/Dialog.popup.js", + "modules": {}, + "classes": { + "JC.Dialog.msgbox": 1, + "JC.Dialog.alert": 1, + "JC.Dialog.confirm": 1 + }, + "fors": { + "JC.Dialog": 1 + }, + "namespaces": { + "JC.Dialog": 1 + } + }, + "../comps/Panel/Panel.default.js": { + "name": "../comps/Panel/Panel.default.js", + "modules": {}, + "classes": { + "JC.Panel": 1, + "JC.Panel.Model": 1, + "JC.hideAllPanel": 1, + "JC.hideAllPopup": 1 + }, + "fors": { + "View": 1 + }, + "namespaces": { + "JC": 1, + "JC.Panel": 1 + } + }, + "../comps/Panel/Panel.js": { + "name": "../comps/Panel/Panel.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../comps/Panel/Panel.popup.js": { + "name": "../comps/Panel/Panel.popup.js", + "modules": {}, + "classes": { + "JC.msgbox": 1, + "JC.alert": 1, + "JC.confirm": 1 + }, + "fors": { + "JC.alert": 1 + }, + "namespaces": { + "JC": 1 + } + }, + "../comps/Placeholder/Placeholder.js": { + "name": "../comps/Placeholder/Placeholder.js", + "modules": {}, + "classes": { + "JC.Placeholder": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/PopTips/PopTips.js": { + "name": "../comps/PopTips/PopTips.js", + "modules": {}, + "classes": { + "JC.PopTips": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/ServerSort/ServerSort.js": { + "name": "../comps/ServerSort/ServerSort.js", + "modules": {}, + "classes": { + "JC.ServerSort": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Slider/Slider.js": { + "name": "../comps/Slider/Slider.js", + "modules": {}, + "classes": { + "JC.Slider": 1, + "JC.Slider.Model": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1, + "JC.Slider": 1 + } + }, + "../comps/StepControl/StepControl.js": { + "name": "../comps/StepControl/StepControl.js", + "modules": {}, + "classes": { + "JC.StepControl": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Suggest/Suggest.js": { + "name": "../comps/Suggest/Suggest.js", + "modules": {}, + "classes": { + "JC.Suggest": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Tab/Tab.js": { + "name": "../comps/Tab/Tab.js", + "modules": {}, + "classes": { + "JC.Tab": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/TableFreeze/TableFreeze.js": { + "name": "../comps/TableFreeze/TableFreeze.js", + "modules": {}, + "classes": { + "JC.TableFreeze": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../comps/Tips/Tips.js": { + "name": "../comps/Tips/Tips.js", + "modules": {}, + "classes": { + "JC.Tips": 1, + "JC.Tips.Model": 1, + "JC.Tips.View": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1, + "JC.Tips": 1 + } + }, + "../comps/Tree/Tree.js": { + "name": "../comps/Tree/Tree.js", + "modules": {}, + "classes": { + "JC.Tree": 1, + "JC.Tree.Model": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1, + "JC.Tree": 1 + } + }, + "../comps/Valid/Valid.js": { + "name": "../comps/Valid/Valid.js", + "modules": {}, + "classes": { + "JC.Valid": 1 + }, + "fors": {}, + "namespaces": { + "JC": 1 + } + }, + "../plugins/rate/spec/lib/jasmine.js": { + "name": "../plugins/rate/spec/lib/jasmine.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../plugins/SWFUpload.js": { + "name": "../plugins/SWFUpload.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../plugins/aes.js": { + "name": "../plugins/aes.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../plugins/jquery.mousewheel.js": { + "name": "../plugins/jquery.mousewheel.js", + "modules": {}, + "classes": { + "window.jQuery.mousewheel": 1 + }, + "fors": {}, + "namespaces": { + "window.jQuery": 1 + } + }, + "../plugins/json2.js": { + "name": "../plugins/json2.js", + "modules": {}, + "classes": { + "window.JSON": 1 + }, + "fors": {}, + "namespaces": { + "window": 1 + } + }, + "../plugins/raphael.js": { + "name": "../plugins/raphael.js", + "modules": {}, + "classes": { + "window.Raphael": 1 + }, + "fors": {}, + "namespaces": { + "window": 1 + } + }, + "../plugins/swfobject.js": { + "name": "../plugins/swfobject.js", + "modules": {}, + "classes": { + "window.swfobject": 1 + }, + "fors": {}, + "namespaces": { + "window": 1 + } + }, + "../JC.js": { + "name": "../JC.js", + "modules": {}, + "classes": { + ".Bizs": 1, + ".JC": 1 + }, + "fors": {}, + "namespaces": {} + }, + "../common.js": { + "name": "../common.js", + "modules": {}, + "classes": { + "JC.f": 1, + "JC.common": 1 + }, + "fors": {}, + "namespaces": {} + }, + "../jquery.js": { + "name": "../jquery.js", + "modules": {}, + "classes": { + "window.jQuery": 1 + }, + "fors": {}, + "namespaces": { + "window": 1 + } + } + }, + "modules": {}, + "classes": { + "window.Bizs.ActionLogic": { + "name": "window.Bizs.ActionLogic", + "shortname": "window.Bizs.ActionLogic", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 2, + "description": "

                node 点击操作逻辑

                \n应用场景\n
                点击后弹框( 脚本模板 )\n
                点击后弹框( AJAX )\n
                点击后弹框( Dom 模板 )\n
                点击后执行 AJAX 操作\n

                require: \n JC.BaseMVC\n , JC.Panel\n

                \n

                JC Project Site\n| API docs\n| demo link

                \n\na|button 需要 添加 class=\"js_bizsActionLogic\"\n\n

                可用的 HTML 属性

                \n
                \n
                balType = string, 操作类型
                \n
                \n
                \n
                类型:
                \n
                panel: 弹框
                \n
                link: 链接跳转
                \n
                ajaxaction: ajax操作, 删除, 启用, 禁用
                \n
                ec: 展开或收起(expand and contract)
                \n
                hit_value: 点击赋值
                \n
                \n
                \n\n
                balUnHtmlEntity = bool, default = false
                \n
                是否将 Panel 转义的 html 反转回来
                \n
                \n

                balType = panel 可用的 HTML 属性

                \n
                \n
                balPanelTpl = script selector
                \n
                脚本模板选择器
                \n\n
                balAjaxHtml = url
                \n
                返回 HTML 的 AJAX 模板
                \n\n
                balAjaxData = url
                \n
                返回 json 的 AJAX 模板, { errorno: int, data: html }
                \n\n
                balCallback = function
                \n
                \n 显示模板后的回调\n
                function balPanelInitCb( _panelIns ){\n   var _trigger = $(this);\n   //return true; //如果返回真的话, 表单提交后会关闭弹框\n}
                \n
                \n
                \n

                balType = link 可用的 HTML 属性

                \n
                \n
                balUrl = url
                \n
                要跳转的目标 URL
                \n\n
                balConfirmMsg = string
                \n
                跳转前的二次确认提示信息
                \n\n
                balConfirmPopupType = string, default = confirm
                \n
                二次确认的弹框类型: confirm, dialog.confirm
                \n
                \n

                balType = ajaxaction 可用的 HTML 属性

                \n
                \n
                balUrl = url
                \n
                AJAX 操作的接口
                \n\n
                balDoneUrl = url
                \n
                AJAX 操作完成后跳转的URL
                \n\n
                balConfirmMsg = string
                \n
                操作前的二次确认提示信息
                \n\n
                balErrorPopupType = string, default = dialog.alert
                \n
                错误提示的弹框类型: alert, msgbox, dialog.alert, dialog.msgbox
                \n\n
                balSuccessPopupType = string, default = msgbox
                \n
                错误提示的弹框类型: alert, msgbox, dialog.alert, dialog.msgbox
                \n\n
                balCallback = function, window 变量域
                \n
                \n 操作完成后的回调\n
                function ajaxDelCallback( _d, _ins ){\n   var _trigger = $(this);\n   if( _d && !_d.errorno ){\n       JC.msgbox( _d.errmsg || '操作成功', _trigger, 0, function(){\n           JC.f.reloadPage( '?usercallback=ajaxaction' );\n       });\n   }else{\n       JC.Dialog.alert( _d && _d.errmsg ? _d.errmsg : '操作失败, 请重试!' , 1 );\n   }\n}\n
                \n
                \n\n
                balRequestData = json
                \n
                ajax 请求发送的数据
                \n\n
                balAjaxType = string, default = get
                \n
                ajax 请求的类型
                \n\n
                balDoneRemoveSelector = selector
                \n
                ajax 操作完成后要删除的 node
                \n\n
                \n

                balType = ec( expand and contract) 可用的 HTML 属性

                \n
                \n
                balTarget = selector
                \n
                显示/隐藏的选择器
                \n\n
                balExpandWord = string, default = \"展开\"
                \n
                balExpandClass= string, default = \"js_ecExpand\"
                \n\n
                balContractWord = string, default = \"收起\"
                \n
                balContractClass = string, default = \"js_ecContract\"
                \n
                \n

                balType = hit_value 可用的 HTML 属性

                \n
                \n
                balTarget = selector
                \n
                显示/隐藏的选择器
                \n\n
                balValue = string, default = \"\"
                \n
                赋给 balTarget 的值
                \n
                \n

                balType = remove_element 可用的 HTML 属性

                \n
                \n
                balDoneRemoveSelector = selector
                \n
                点击操作完成后要删除的 node
                \n\n
                balDoneBeforeRemoveCallback= function, window 变量域
                \n
                删除前的回调
                \n
                ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "version": "dev 0.1 2013-09-17", + "author": "qiushaowei | 75 Team" + }, + "window.Bizs.AutoSelectComplete": { + "name": "window.Bizs.AutoSelectComplete", + "shortname": "window.Bizs.AutoSelectComplete", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/AutoSelectComplete/AutoSelectComplete.js", + "line": 4, + "description": "

                结合 JC.AutoSelect 与 JC.AutoComplete 综合使用的一个业务逻辑

                \n
                应用场景: CRM 多级广告位最后一级因为内容较多, 用户使用传统的下拉框选择比较不便\n
                这个业务组件结合 JC.AutoSelect 和 JC.AutoComplete 提供一种简便的可输入解决方案\n

                require: \n JC.BaseMVC\n , JC.AutoComplete\n , JC.AutoSelect\n

                \n

                JC Project Site\n| API docs\n| demo link

                \n

                可用的 HTML attribute

                \n
                \n
                bascAjaxUrl = url
                \n
                \n 获取 JC.AutoComplete 数据的 AJAX 接口\n
                \n
                数据格式
                \n
                \n [ { \"id\": \"id value\", \"label\": \"label value\" }, ... ]\n
                \n
                \n
                \n\n
                bascDefaultSelect = selector
                \n
                声明 JC.AutoSelect 的围住 select
                \n
                ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-11-25", + "author": "qiushaowei | 75 Team", + "example": [ + "" + ] + }, + "window.Bizs.ChangeLogic": { + "name": "window.Bizs.ChangeLogic", + "shortname": "window.Bizs.ChangeLogic", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/ChangeLogic/ChangeLogic.js", + "line": 3, + "description": "

                input[type=radio|type=checkbox], select change 事件的响应逻辑

                \n
                应用场景
                \n
                表单操作时, 选择某个 radio 时, 对应的 内容有效,\n
                但选择其他 radio 时, 其他的内容无效\n
                checkbox / select 也可使用( 带change事件的标签 )\n

                require: \n JC.BaseMVC\n

                \n

                JC Project Site\n| API docs\n| demo link

                \n\ndiv 需要 添加 class=\"js_bizChangeLogic\"\n\n

                box 的 HTML 属性

                \n
                \n
                bclTrigger
                \n
                触发禁用/起用的control
                \n\n
                bclDisableTarget
                \n
                需要禁用/起用的control
                \n\n
                bclHideTarget
                \n
                需要根据禁用起用隐藏/可见的标签
                \n\n
                bclDoneCallback = function
                \n
                \n 启用/禁用后会触发的回调, window 变量域\n
                function bclDoneCallback( _triggerItem, _boxItem ){\n   var _ins = this;\n   JC.log( 'bclDoneCallback', new Date().getTime() );\n}
                \n
                \n\n
                bclEnableCallback = function
                \n
                \n 启用后的回调, window 变量域\n
                function bclEnableCallback( _triggerItem, _boxItem ){\n   var _ins = this;\n   JC.log( 'bclEnableCallback', new Date().getTime() );\n}
                \n
                \n\n
                bclDisableCallback = function
                \n
                \n 禁用后的回调, window 变量域\n
                function bclDisableCallback( _triggerItem, _boxItem ){\n   var _ins = this;\n   JC.log( 'bclDisableCallback', new Date().getTime() );\n}
                \n
                \n\n
                bclChangeCleanTarget = selector
                \n
                radio change 的时候, 清除目标选择器的 html 内容
                \n\n
                bclTriggerChangeOnInit = bool, default = true
                \n
                初始化实例时, 是否触发 change 事件
                \n
                \n\n

                trigger 的 HTML 属性

                \n
                \n
                bclDisable = bool, default = false
                \n
                \n 指定 bclDisableTarget 是否置为无效\n
                还可以根据这个属性 指定 bclHideTarget 是否显示\n
                \n\n
                bclDisplay = bool
                \n
                指定 bclHideTarget 是否显示
                \n\n
                bclDelimiter = string, default = \"||\"
                \n
                bclDisplay 和 bclDisable 多值分隔符
                \n\n
                bclHideTargetSub = selector
                \n
                根据 trigger 的 checked 状态 显示或者隐藏 bclHideTargetSub node
                \n\n
                bclShowToggleFilter = selector | html attr
                \n
                显示的时候, 如果匹配到 filter, 那么将会隐藏
                \n
                \n\n

                hide target 的 HTML 属性

                \n
                \n
                bclHideToggle = bool, default = false
                \n
                显示或显示的时候, 是否与他项相反
                \n\n
                bclDisableToggle= bool, default = false
                \n
                disabled 的时候, 是否与他项相反
                \n
                ", + "is_constructor": 1, + "version": "dev 0.1 2013-09-04", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
                \n
                \n \n \n
                " + ] + }, + "window.Bizs.CommonModify": { + "name": "window.Bizs.CommonModify", + "shortname": "window.Bizs.CommonModify", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/CommonModify/CommonModify.js", + "line": 2, + "description": "

                Dom 通用 添加删除 逻辑

                \n
                应用场景\n
                需要动态添加删除内容的地方可以使用这个类\n

                require: \n JC.BaseMVC\n

                \n

                JC Project Site\n| API docs\n| demo link

                \n\na|button 需要 添加 class=\"js_autoCommonModify\"\n\n

                可用的 HTML 属性

                \n
                \n
                [cmtpl | cmtemplate] = script selector
                \n
                指定保存模板的 script 标签
                \n\n
                cmitem = selector
                \n
                添加时, 目标位置的 父节点/兄弟节点
                \n\n
                cmaction = string, [add, del], default = add
                \n
                操作类型
                \n\n
                cmappendtype = string, default = after
                \n
                指定 node 添加 dom 的方法, 可选类型: before, after, appendTo
                \n\n
                cmdonecallback = function
                \n
                \n 添加或删除完后会触发的回调, window 变量域\n
                function cmdonecallback( _ins, _boxParent ){\n   var _trigger = $(this);\n   JC.log( 'cmdonecallback', new Date().getTime() );\n}
                \n
                \n\n
                cmtplfiltercallback = function
                \n
                \n 模板内容过滤回调, window 变量域\n
                window.COUNT = 1;\nfunction cmtplfiltercallback( _tpl, _cmitem, _boxParent ){\n   var _trigger = $(this);\n   JC.log( 'cmtplfiltercallback', new Date().getTime() );\n   _tpl = JC.f.printf( _tpl, COUNT++ );\n\n   return _tpl;\n}
                \n
                \n\n
                cmbeforeaddcallabck = function
                \n
                \n 添加之前的回调, 如果返回 false, 将不执行添加操作, window 变量域\n
                function cmbeforeaddcallabck( _cmitem, _boxParent ){\n   var _trigger = $(this);\n   JC.log( 'cmbeforeaddcallabck', new Date().getTime() );\n   //return false;\n}
                \n
                \n\n
                cmaddcallback = function
                \n
                \n 添加完成的回调, window 变量域\n
                function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){\n   var _trigger = $(this);\n   JC.log( 'cmaddcallback', new Date().getTime() );\n}
                \n
                \n\n
                cmbeforedelcallback = function
                \n
                \n 删除之前的回调, 如果返回 false, 将不执行删除操作, window 变量域\n
                function cmbeforedelcallback( _cmitem, _boxParent ){\n   var _trigger = $(this);\n   JC.log( 'cmbeforedelcallback', new Date().getTime() );\n   //return false;\n}
                \n
                \n\n
                cmdelcallback = function
                \n
                \n 删除完成的回调, window 变量域\n
                function cmdelcallback( _ins, _boxParent ){\n   JC.log( 'cmdelcallback', new Date().getTime() );\n}
                \n
                \n\n
                cmMaxItems = int
                \n
                \n 指定最多可添加数量\n
                要使 cmMaxItems 生效, 必须声明 cmAddedItemsSelector\n
                \n\n
                cmAddedItemsSelector = selector
                \n
                \n 指定查找所有上传项的选择器语法\n
                \n\n
                cmOutRangeMsg = string, default = \"最多只能上传 {0}个文件!\"
                \n
                \n 添加数量超出 cmMaxItems 时的提示信息\n
                \n
                ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "version": "dev 0.1 2013-09-04", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
            \n \n \n \n \n
            \n \n \n  \n + 添加\n \n
            \n\n " + ] + }, + "window.Bizs.CustomColumn": { + "name": "window.Bizs.CustomColumn", + "shortname": "window.Bizs.CustomColumn", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/CustomColumn/CustomColumn.js", + "line": 8, + "description": "组件用途简述\n\n

            require:\n JC.Panel\n , JC.Valid\n , Bizs.FormLogic\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 div class=\"js_bizCustomColumn\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            [ data-url | data-query ] = url
            \n
            提交数据的URL
            \n\n
            data-data = json var name
            \n
            自定义列的数据 变量名, window 变量域
            \n\n
            data-scriptData = script selector
            \n
            脚本数据
            \n\n
            data-id = string
            \n
            {id}占位符的数值
            \n\n
            data-minCol = int
            \n
            最小需要选择多少列
            \n\n
            data-maxCol = int
            \n
            最多只能选择多少列
            \n\n
            data-name = string
            \n
            数据复选框的 name
            \n\n
            data-saveSelector = selector
            \n
            保存所要复选框值的选择器
            \n\n
            data-tpl = script tpl
            \n
            显示弹框的脚本模板
            \n\n
            data-formDoneCallback = window function name
            \n
            自定义提交数据后的响应函数
            \n\n
            data-formAfterProcessCallback = window function name
            \n
            自定义表单提交前的校验函数
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n

            Bizs.CustomColumn 示例

            " + ] + }, + "window.Bizs.DMultiDate": { + "name": "window.Bizs.DMultiDate", + "shortname": "window.Bizs.DMultiDate", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/DMultiDate/DMultiDate.js", + "line": 3, + "description": "DMultiDate 复合日历业务逻辑\n
            Dom 加载后会自动加载页面上所有.js_autoDMultiDate的标签\n

            require: \n JC.BaseMVC\n , JC.Calendar\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            可用的html属性

            \n
            \n
            mddate = css selector
            \n
            声明日期input[type=text][datatype=daterange]的标签
            \n 如果缺省则自动查找子元素.js_multidate
            \n\n
            mdstartdate = css selector
            \n
            声明开始日期的隐藏域标签, 默认查找子元素.js_startdate
            \n\n
            mdenddate = css selector
            \n
            声明结束日期的隐藏域标签, 默认查找子元素.js_enddate
            \n\n
            mddayrange = num
            \n
            声明时间粒度为日时,最长可选取多少天,如果不需要则不声明此属性
            \n\n
            mdweekrange = num
            \n
            声明时间粒度为周时,最长可选取多少周,如果不需要则不声明此属性
            \n\n
            mdmonthrange = num
            \n
            声明时间粒度为月时,最长可选取多少月,如果不需要则不声明此属性
            \n\n
            mdseasonrange = num
            \n
            声明时间粒度为季时,最长可选取多少季,如果不需要则不声明此属性
            \n\n
            mdyearrange = num
            \n
            声明时间粒度为年时,最长可选取多少年,如果不需要则不声明此属性
            \n\n
            mdIgnoreUrlFill = bool, default = false
            \n
            是否忽略 URL 自动填充
            \n\n
            ", + "is_constructor": 1, + "access": "private", + "tagname": "", + "version": "dev 0.1 2014-03-03", + "author": "zuojing | 75 Team" + }, + "window.Bizs.DisableLogic": { + "name": "window.Bizs.DisableLogic", + "shortname": "window.Bizs.DisableLogic", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/DisableLogic/DisableLogic.js", + "line": 2, + "description": "

            这个应用将不再维护, 请使用 Bizs.ChangeLogic

            \n

            Form Control禁用启用逻辑

            \n
            应用场景
            \n
            表单操作时, 选择某个 radio 时, 对应的 内容有效,\n
            但选择其他 radio 时, 其他的内容无效\n
            checkbox / select 也可使用( 带change事件的标签 )\n

            require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\ndiv 需要 添加 class=\"js_bizsDisableLogic\"\n\n

            box 的 HTML 属性

            \n
            \n
            dltrigger
            \n
            触发禁用/起用的control
            \n\n
            dltarget
            \n
            需要禁用/起用的control
            \n\n
            dlhidetarget
            \n
            需要根据禁用起用隐藏/可见的标签
            \n\n
            dldonecallback = function
            \n
            \n 启用/禁用后会触发的回调, window 变量域\n
            function dldonecallback( _triggerItem, _boxItem ){\n   var _ins = this;\n   JC.log( 'dldonecallback', new Date().getTime() );\n}
            \n
            \n\n
            dlenablecallback = function
            \n
            \n 启用后的回调, window 变量域\n
            function dlenablecallback( _triggerItem, _boxItem ){\n   var _ins = this;\n   JC.log( 'dlenablecallback', new Date().getTime() );\n}
            \n
            \n\n
            dldisablecallback = function
            \n
            \n 禁用后的回调, window 变量域\n
            function dldisablecallback( _triggerItem, _boxItem ){\n   var _ins = this;\n   JC.log( 'dldisablecallback', new Date().getTime() );\n}
            \n
            \n
            \n\n

            trigger 的 HTML 属性

            \n
            \n
            dldisable = bool, default = false
            \n
            \n 指定 dltarget 是否置为无效\n
            还可以根据这个属性 指定 dlhidetarget 是否显示\n
            \n\n
            dldisplay = bool
            \n
            指定 dlhidetarget 是否显示
            \n\n
            dlhidetargetsub = selector
            \n
            根据 trigger 的 checked 状态 显示或者隐藏 dlhidetargetsub node
            \n
            \n\n

            hide target 的 HTML 属性

            \n
            \n
            dlhidetoggle = bool, false
            \n
            显示或显示的时候, 是否与他项相反
            \n\n
            dlDisableToggle = bool, default = false
            \n
            disabled 的时候, 是否与他项相反
            \n
            ", + "is_constructor": 1, + "version": "dev 0.1 2013-09-04", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
            \n
            \n \n \n
            " + ] + }, + "window.Bizs.DropdownTree": { + "name": "window.Bizs.DropdownTree", + "shortname": "window.Bizs.DropdownTree", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 2, + "description": "树菜单 形式模拟下拉框\n\n

            require:\n JC.BaseMVC\n , JC.Tree\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 div class=\"js_bizDropdownTree\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            bdtData = json, window 变量域
            \n
            \n 初始化的数据变量名\n
            数据格式:
            \n
            \n
                        {\n                 root: [ id, label ]\n                 data: {\n                     id: [ [id, label], [id, label]... ] \n                     , id: [ [id, label], [id, label]... ]...\n                 }\n             }
            \n
            \n
            \n
            \n\n
            bdtDefaultLabel = string
            \n
            用于显示的 默认 label
            \n\n
            bdtDefaultValue = string
            \n
            默认选中 ID
            \n\n
            bdtLabel = selector, default = \"|.bdtLabel\"
            \n
            树的 label
            \n\n
            bdtInput = selector, default = \"|.bdtInput\"
            \n
            保存树 ID的 input
            \n\n
            bdtTreeBox = selector, default = \"|.bdtTreeBox\"
            \n
            树的 node
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
            \n \n \n \t\n
            \n
            " + ] + }, + "window.Bizs.FormLogic": { + "name": "window.Bizs.FormLogic", + "shortname": "window.Bizs.FormLogic", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/FormLogic/FormLogic.js", + "line": 4, + "description": "

            提交表单控制逻辑

            \n应用场景\n
            get 查询表单\n
            post 提交表单\n
            ajax 提交表单\n

            require: \n JC.BaseMVC\n , JC.Valid\n , JC.Panel\n

            \n

            optional: \n JC.FormFillUrl\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            页面只要引用本文件, 默认会自动初始化 from class=\"js_bizsFormLogic\" 的表单

            \n

            Form 可用的 HTML 属性

            \n
            \n
            formType = string, default = get
            \n
            \n form 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性\n
            类型有: get, post, ajax, jsonp \n
            \n\n
            formSubmitDisable = bool, default = true
            \n
            表单提交后, 是否禁用提交按钮
            \n\n
            formResetAfterSubmit = bool, default = true
            \n
            表单提交后, 是否重置内容
            \n\n
            formBeforeProcess = function, window 变量域
            \n
            \n 表单开始提交时且没开始验证时, 触发的回调\n
            function formBeforeProcess( _evt, _ins ){\n   var _form = $(this);\n   JC.log( 'formBeforeProcess', new Date().getTime() );\n   //return false;\n}
            \n
            \n\n
            formProcessError = function, window 变量域
            \n
            \n 提交时, 验证未通过时, 触发的回调\n
            function formProcessError( _evt, _ins ){\n   var _form = $(this);\n   JC.log( 'formProcessError', new Date().getTime() );\n   //return false;\n}
            \n
            \n\n
            formAfterProcess = function, window 变量域
            \n
            \n 表单开始提交时且验证通过后, 触发的回调\n
            function formAfterProcess( _evt, _ins ){\n   var _form = $(this);\n   JC.log( 'formAfterProcess', new Date().getTime() );\n   //return false;\n}
            \n
            \n\n
            formBeforeSubmit = function, window 变量域
            \n
            \n 表单开始发送数据到服务器之前的回调\n
            function formBeforeSubmit( _evt, _ins ){\n   var _form = $(this);\n   JC.log( 'formBeforeSubmit', new Date().getTime() );\n   //return false;\n}
            \n
            \n\n
            formPopupType = string, default = dialog
            \n
            定义提示框的类型: dialog, popup
            \n\n
            formConfirmPopupType = string, default = dialog
            \n
            定义确认提示框的类型: dialog, popup
            \n\n
            formResetUrl = url
            \n
            表单重置时, 返回的URL
            \n\n
            formPopupCloseMs = int, default = 2000
            \n
            msgbox 弹框的显示时间
            \n\n
            formAjaxResultType = string, default = json
            \n
            AJAX 返回的数据类型: json, html
            \n\n
            formAjaxMethod = string, default = get
            \n
            \n 类型有: get, post\n
            ajax 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性\n
            \n\n
            formAjaxAction = url
            \n
            ajax 的提交URL, 如果没有显式声明, 将视为 form 的 action 属性
            \n\n
            formAjaxDone = function, default = system defined
            \n
            \n AJAX 提交完成后的回调, window 变量域\n
            如果没有显式声明, FormLogic将自行处理\n
            function formAjaxDone( _json, _submitButton, _ins ){\n   var _form = $(this);\n   JC.log( 'custom formAjaxDone', new Date().getTime() );\n\n   if( _json.errorno ){\n       _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 );\n   }else{\n       _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){\n           JC.f.reloadPage( \"?donetype=custom\" );\n       });\n   }\n};
            \n
            \n\n
            formAjaxDoneAction = url
            \n
            声明 ajax 提交完成后的返回路径, 如果没有, 提交完成后将不继续跳转操作
            \n\n
            formJsonpCb = function, default = FormLogic#_model._innerJsonpCb
            \n
            自定义 JSOPN 处理回调, window 变量域\n
            function customFormJsonpCb( _data, _info ){\n   if( !( _data && _info ) ) return;\n\n   var _frm = $( 'form.' + _info ), _ins;\n   if( !_frm.length ) return;\n   _ins = JC.BaseMVC.getInstance( _frm, Bizs.FormLogic );\n   if( !_ins ) return;\n\n   _ins.trigger( Bizs.FormLogic.Model.AJAX_DONE, [ _data ] );\n}
            \n\n
            URL: handler_jsonp.php?callbackInfo=FormLogic_1&callback=callback\nOUTPUT:\n<script>\nwindow.parent \n   && window.parent != this\n   && window.parent[ 'callback' ]\n   && window.parent[ 'callback' ]( {\"errorno\":0,\"errmsg\":\"\",\"data\":{\"callbackInfo\":\"FormLogic_1\",\"callback\":\"callback\"}}, 'FormLogic_1' )\n   ;\n</script>
            \n
            \n
            \n\n

            Form Control 可用的 html 属性

            \n
            \n
            ignoreResetClear = bool, default = false
            \n
            重置时, 是否忽略清空控件的值, 默认清空
            \n
            \n\n

            submit button 可用的 html 属性

            \n
            \n
            \n 基本上 form 可用的 html 属性, submit 就可用, 区别在于 submit 优化级更高\n
            \n\n
            formSubmitConfirm = string
            \n
            提交表单时进行二次确认的提示信息\n\n
            formConfirmCheckSelector = selector
            \n
            提交表单时, 进行二次确认的条件判断\n\n
            formConfirmCheckCallback = function
            \n
            \n 提交表单时, 进行二次确认的条件判断, window 变量域\n
            function formConfirmCheckCallback( _trigger, _evt, _ins ){\n   var _form = $(this);\n   JC.log( 'formConfirmCheckCallback', new Date().getTime() );\n   return _form.find('td.js_confirmCheck input[value=0]:checked').length;\n}
            \n
            \n\n
            formSubmitIgnoreCheck = bool, default = false
            \n
            \n 表单提交时, 是否忽略 JC.Valid 的验证\n
            注意: 仅忽略内容为空的项, 如果已经填写内容, 那么内容必须与验证规则匹配\n
            注: 有时 提交操作 仅为保存为草稿的时候, 是不需要验证所有内容的, 不过还是会对值非空的项进行验证\n
            \n\n
            formResetCallback = callback
            \n
            表单重置后的回调\n
            function formResetCallback( _evt, _ins ){\n   var _form = $(this);\n   JC.log( 'formResetCallback', JC.f.ts() );\n}
            \n\n
            \n\n

            reset button 可用的 html 属性

            \n
            \n
            \n 如果 form 和 reset 定义了相同属性, reset 优先级更高\n
            \n
            formConfirmPopupType = string, default = dialog
            \n
            定义提示框的类型: dialog, popup
            \n\n
            formResetUrl = url
            \n
            表单重置时, 返回的URL
            \n\n
            formResetConfirm = string
            \n
            重置表单时进行二次确认的提示信息\n\n
            formPopupCloseMs = int, default = 2000
            \n
            msgbox 弹框的显示时间
            \n \n
            \n\n

            普通 [a | button] 可用的 html 属性

            \n
            \n
            buttonReturnUrl
            \n
            点击button时, 返回的URL
            \n\n
            returnConfirm = string
            \n
            二次确认提示信息
            \n\n
            popupType = string, default = confirm
            \n
            弹框类型: confirm, dialog.confirm
            \n\n
            popupstatus = int, default = 2
            \n
            提示状态: 0: 成功, 1: 失败, 2: 警告
            \n\n
            buttonClickBindSelector = selector
            \n
            \n 点击按钮时, 把按钮的值赋值给 绑定的 控件\n
            注意: 这个属性仅支持 [input|button] 标签\n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "version": "dev 0.1 2013-09-08", + "author": "qiushaowei | 75 Team", + "example": [ + "\n \n\n
            \n
            Bizs.FormLogic, get form example 3, nothing at done
            \n
            \n
            \n
            \n
            \n
            \n 文件框: \n
            \n
            \n 日期: \n \n
            \n
            \n 下拉框:\n \n
            \n
            \n \n \n \n\n \n \n back\n
            \n
            \n
            \n
            \n
            \n
            " + ] + }, + "window.Bizs.InputSelect": { + "name": "window.Bizs.InputSelect", + "shortname": "window.Bizs.InputSelect", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/InputSelect/InputSelect.js", + "line": 2, + "description": "输入下拉框\n可以输入数据也可以通过点下拉箭头选择数据。\n下拉的数据支持Ajax接口和php前段铺数据。\n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 div class=\"js_bizInputSelect\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            iptseldatabox = string
            \n
            指定下拉数据存放的父容器
            \n
            iptseldataboxheight = int
            \n
            指定下拉数据存放的父容器的高度,默然为自适应
            \n
            iptseloption = string
            \n
            指定下拉数据选项
            \n
            iptselipt = string
            \n
            指定输入框
            \n
            iptselhideipt = string
            \n
            指定隐藏域
            \n
            iptselprevententer = bool
            \n
            回车键阻止表单提交, default = true
            \n
            iptselitemselected = function
            \n
            选择数据后的回调
            \n\n
            iptseldataurl = string
            \n
            指定下拉数据的ajax接口,要求返回json数据格式如下:\n { errorno: 0,\n data: [{label: 'item1', 'value': 0}] \n }
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-12-02", + "author": "zuojing | 75 Team" + }, + "window.Bizs.KillISPCache": { + "name": "window.Bizs.KillISPCache", + "shortname": "window.Bizs.KillISPCache", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 2, + "description": "应用场景\n
            ISP 缓存问题 引起的用户串号\n
            ajax 或者动态添加的内容, 请显式调用 JC.KillISPCache.getInstance().process( newNodeContainer )\n
            这是个单例类\n

            require: \n jQuery\n , JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            页面只要引用本文件, 默认会自动初始化 KillISPCache 逻辑

            \n
            \n
            影响到的地方:
            \n
            每个 a node 会添加 isp 参数
            \n
            每个 form node 会添加 isp 参数
            \n
            每个 ajax get 请求会添加 isp 参数
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "version": "dev 0.1 2013-09-07", + "author": "qiushaowei | 75 Team", + "example": [ + "\n " + ] + }, + "window.Bizs.MoneyTips": { + "name": "window.Bizs.MoneyTips", + "shortname": "window.Bizs.MoneyTips", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MoneyTips/MoneyTips.js", + "line": 4, + "description": "

            金额格式化 业务逻辑

            \n
            应用场景\n
            用户在文本框输入金额时, 在指定的 node 显示以逗号分隔的金额\n

            require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\ninput[type=text] 需要 添加 class=\"js_bizMoneyTips\"\n
            只要带有 class = js_bizMoneyTips 的文本框, 默认会自动初始化 MoneyTips 实例\n\n

            \n 页面载入时, Bizs.MoneyTips 会对 span.js_bmtLabel, label.js_bmtLabel 进行自动格式化\n

            \n\n

            可用的 HTML 属性

            \n
            \n
            bmtDisplayLabel = selector, default = span
            \n
            \n 指定显示 格式化金额的 node, 如果没有显式指定 node, 那么将会动态生成一个用于显示的 span\n
            \n\n
            bmtPattern = string, default = {0}
            \n
            \n 用于显示格式化金额的显示内容, {0} = 金额占位符\n
            example: <input type=\"text\" class=\"js_bizMoneyTips\" bmtPattern=\"格式化金额: {0}\" />\n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "version": "dev 0.1 2013-11-21", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
            \n 金额: \n \n \n
            " + ] + }, + "window.Bizs.MultiAutoComplete": { + "name": "window.Bizs.MultiAutoComplete", + "shortname": "window.Bizs.MultiAutoComplete", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiAutoComplete/MultiAutoComplete.js", + "line": 2, + "description": "级联 Suggest\n\n

            require:\n JC.AutoComplete\n , JC.Placeholder\n , JC.Panel\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 input[defaultMultiAutomComplete]

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            defaultMultiAutomComplete = empty
            \n
            声明第一级联动框
            \n\n
            macUrl = url
            \n
            获取数据的URL接口
            \n\n
            macAddtionUrl = url
            \n
            用于最后一级的附加数据接口, 如果所有父级没有选中内容, 将启用该接口
            \n\n
            macAddtionBox = selector
            \n
            指定用于保存选择内容的选择器
            \n\n
            macAddtionBoxItemTpl = selector
            \n
            保存内容项的模板
            \n\n
            macAddtionBoxItemSelector = selector
            \n
            保存内容项的选择器
            \n\n
            macAddtionItemAddCallback = callback
            \n
            添加保存内容项时的回调\nfunction macAddtionItemAddCallback( _item, _id, _label, _parent, _parentBox ){\n var _macIns = this;\n JC.log( 'macAddtionItemAddCallback', _id, _label );\n}\n
            \n\n
            macAddtionItemRemoveCallback = callback
            \n
            删除保存内容项时的回调\nfunction macAddtionItemRemoveCallback( _item, _id, _label, _parent, _parentBox ){\n var _macIns = this;\n JC.log( 'macAddtionItemRemoveCallback', _id, _label );\n}\n
            \n\n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n<div class=\"ui-sug-mod\">\n <input type=\"text\" class=\"ui-sug-ipt js_compAutoComplete js_k1\" name=\"k1\" value=\"\" \n autocomplete=\"off\" \n\n cacPopup=\"/ul.js_compAutoCompleteBox\"\n cacLabelKey=\"data-label\"\n cacIdKey=\"data-id\"\n cacIdSelector=\"/input.js_k1_id\"\n cacStrictData=\"true\"\n cacDataFilter=\"cacDataFilter\"\n cacNoDataText=\"暂无数据!\"\n\n cacPreventEnter=\"true\" \n\n defaultMultiAutomComplete=\"\"\n macUrl=\"./data/shengshi_with_error_code.php?id=0\"\n macTarget=\"/input.js_k2\"\n\n Placeholder=\"一级位置\"\n />\n <input type=\"hidden\" value=\"14\" class=\"js_k1_id\" name=\"k1_id\" />\n\n <input type=\"text\" class=\"ui-sug-ipt js_compAutoComplete js_k2\" name=\"k2\" value=\"\" \n autocomplete=\"off\" \n\n cacPopup=\"/ul.js_compAutoCompleteBox\"\n cacLabelKey=\"data-label\"\n cacIdKey=\"data-id\"\n cacIdSelector=\"/input.js_k2_id\"\n cacStrictData=\"true\"\n cacDataFilter=\"cacDataFilter\"\n cacNoDataText=\"暂无数据!\"\n\n cacPreventEnter=\"true\" \n\n macUrl=\"./data/shengshi_with_error_code.php?id={0}\"\n macTarget=\"/input.js_k3\"\n Placeholder=\"二级位置\"\n />\n <input type=\"hidden\" value=\"2341\" class=\"js_k2_id\" name=\"k2_id\" />\n\n <input type=\"text\" class=\"ui-sug-ipt js_compAutoComplete js_k3\" name=\"k3\" value=\"区\" \n autocomplete=\"off\" \n Placeholder=\"三级位置\"\n\n cacPopup=\"/ul.js_compAutoCompleteBox\"\n cacLabelKey=\"data-label\"\n cacIdKey=\"data-id\"\n cacStrictData=\"false\"\n cacDataFilter=\"cacDataFilter\"\n cacNoDataText=\"暂无数据!\"\n cacAddtionItem=\"true\"\n cacListItemTpl=\"/script.cacItemTpl\"\n\n cacPreventEnter=\"true\" \n\n macUrl=\"./data/shengshi_with_error_code.php?id={0}\"\n macAddtionUrl=\"./data/shengshi_with_error_code.php?id=0\"\n macAddtionBox=\"/.js_macAddtionBox\"\n macAddtionBoxItemTpl=\"/script.macAddtionBoxItemTpl\"\n macAddtionBoxItemSelector=\"> a\"\n macAddtionItemAddCallback=\"macAddtionItemAddCallback\"\n macAddtionItemRemoveCallback=\"macAddtionItemRemoveCallback\"\n />\n <span class=\"js_macAddtionBox\" style=\"display:none;\">\n <span class=\"js_macAddtionBoxList\">\n <a href=\"javascript:\" class=\"js_macAddtionBoxItem\" data-id=\"2345\" id=\"macAddtionBoxItemId_1_2345\" data-label=\"枫溪区\">\n <label>枫溪区</label>\n <button type=\"button\" class=\"AURemove\"></button>\n <input type=\"hidden\" name=\"condition[]\" value=\"2345\">\n </a>\n </span>\n <a href=\"javascript:\" class=\"js_macClearAddtionList\">\n 清空<button type=\"button\" class=\"AUClose\"></button>\n </a>\n </span>\n <script type=\"text/template\" class=\"cacItemTpl\">\n <li data-id=\"{0}\" data-label=\"{1}\" data-index=\"{2}\" class=\"AC_listItem {3} js_macAddtionBoxItemClick\">\n <a href=\"javascript:;\" data-id=\"{0}\" data-label=\"{1}\" data-index=\"{2}\" class=\"AC_control AC_customAdd\">添加</a>\n <label>{1} </label>\n </li> \n </script>\n <script type=\"text/template\" class=\"macAddtionBoxItemTpl\">\n <a href=\"javascript:\" class=\"js_macAddtionBoxItem\" data-id=\"{0}\" id=\"{2}\" data-label=\"{1}\">\n <label>{1}</label>\n <button type=\"button\" class=\"AURemove\"></button>\n <input type=\"hidden\" name=\"condition[]\" value=\"{0}\" />\n </a>\n </script>\n</div>" + ] + }, + "window.Bizs.MultiChangeLogic": { + "name": "window.Bizs.MultiChangeLogic", + "shortname": "window.Bizs.MultiChangeLogic", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiChangeLogic/MultiChangeLogic.js", + "line": 2, + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "2014-12-25", + "author": "zuojing | 75 Team", + "example": [ + "\n " + ] + }, + "window.Bizs.MultiDate": { + "name": "window.Bizs.MultiDate", + "shortname": "window.Bizs.MultiDate", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiDate/MultiDate.js", + "line": 3, + "description": "MultiDate 复合日历业务逻辑\n根据select选项弹出日、周、月、季日历,并计算出起始日期和结束日期\n

            require: v\n JC.BaseMVC\n , JC.Calendar\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "is_constructor": 1, + "access": "private", + "tagname": "", + "version": "dev 0.1 2013-09-03", + "author": "qiushaowei | 75 Team" + }, + "window.Bizs.MultiSelect": { + "name": "window.Bizs.MultiSelect", + "shortname": "window.Bizs.MultiSelect", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiSelect/MultiSelect.js", + "line": 3, + "description": "模拟多选下拉框\n框的click将列表拉出来。\nclose和document的click将面板关闭,返回数据,并把数据铺到指定的面板里\n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 div class=\"js_bizMultiSelect\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            defaultLabel = string
            \n
            \n 声明下拉框默认显示的文字信息\n
            \n
            binddatabox = string(selector)
            \n
            声明选中数据,关闭下拉面板后,数据的回填区域
            \n 如果此属性为空,则不会在其他区域展示选中的数据\n
            \n
            ajaxurl = string
            \n
            声明ajax加载数据的url\n
            \n
            数据格式
            \n
            \n {errorno: 0,\n data: [ { \"id\": \"id value\", \"label\": \"label value\", \"isChecked\": \"is checked\" }, ... ],\n errormsg: \"\"}\n
            \n
            \n
            dataFilter = callback
            \n
            \n
            \n
            如果 数据接口获取的数据不是默认格式, \n 可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式\n
            \n
            \n
            function cacDataFilter( _json ){\nif( _json.data && _json.data.length ){\n   _json = _json.data;\n}\n\n$.each( _json, function( _ix, _item ){\n   _item.length &&\n       ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1], 'isChecked': _item[2] } )\n       ;\n});\nreturn _json;\n}
            \n
            \n
            \n
            \n
            dataname=string
            \n
            声明checkbox的name属性, 适用于ajax接口的数据
            \n\n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-02-20", + "author": "zuojing | 75 Team", + "example": [ + "\n
            \n
            \n \n 共选中2条数据 \n
            \n
              \n
            • \n \n
            • \n
            • \n \n
            • \n
            • \n \n
            • \n
            • \n \n
            • \n
            \n \n
            \n
            \n
            • 北京天地在线广告有限公司
            • 河南天地在线广告有限公司
            \n
            " + ] + }, + "window.Bizs.MultiSelectTree": { + "name": "window.Bizs.MultiSelectTree", + "shortname": "window.Bizs.MultiSelectTree", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiSelectTree/MultiSelectTree.js", + "line": 2, + "description": "MultiSelect
            \n多选树
            \n基于JC.Tree的扩展
            \n\n

            require:\n JC.common\n , JC.Tree\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-06-19", + "author": "sunlei | 75 Team" + }, + "window.Bizs.MultiUpload": { + "name": "window.Bizs.MultiUpload", + "shortname": "window.Bizs.MultiUpload", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 2, + "description": "上传多个文件, 基于 JC.AjaxUpload\n\n

            require:\n jQuery\n , JC.BaseMVC\n , JC.AjaxUpload\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 div class=\"js_bizMultiUpload\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            bmuItemLimit = int, default = 0
            \n
            限制上传的数量, 0 为不限制, 非 0 为限制的数量
            \n\n
            bmuBoxSelector = selector, default = '|.bmuBoxSelector'
            \n
            上传内容的父容器
            \n\n
            bmuTplSelector = selector, default = 组件生成
            \n
            上传内容的模板内容, {0} = file url, {1} = file name
            \n\n
            bmuAjaxUploadSelector = selector, default = '|.js_compAjaxUpload'
            \n
            JC.AjaxUpload 的选择器
            \n\n
            bmuItemDelegate = selector, default = '>'
            \n
            bmuBoxSelector 的子级标签
            \n\n
            bmuRemoveDelegate = selector, default = '.js_removeUploadItem'
            \n
            删除子级标签的选择器
            \n\n
            bmuRemoveItemParentSelector = selector, default = '('
            \n
            相对于 bmuRemoveDelegate 的子级标签父选择器
            \n\n
            bmuItemAddedCallback = function
            \n
            添加上传内容后的回调\n
            function bmuItemAddedCallback( _newItem, _json, _boxSelector ){\n   var _bmuIns = this;\n}
            \n
            \n\n
            bmuItemDeletedCallback = function
            \n
            删除上传内容后的回调\n
            function bmuItemDeletedCallback( _deletedItem, _boxSelector ){\n   var _bmuIns = this;\n}
            \n
            \n\n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n<div class=\"js_bizMultiUpload\"\n bmuBoxSelector=\"|.uploadItemBox\"\n bmuTplSelector=\"|script\"\n bmuItemDelegate=\">\"\n bmuRemoveDelegate=\".js_removeUploadItem\"\n bmuRemoveItemParentSelector=\"(\"\n bmuAjaxUploadSelector=\"|.js_compAjaxUpload\"\n bmuItemLimit=\"2\"\n >\n <div>\n <input type=\"hidden\" class=\"ipt ipt-w180 js_compAjaxUpload\" value=\"\"\n cauStyle=\"w1\"\n cauButtonText=\"上传资质文件\"\n cauUrl=\"../_demo/data/handler.php\"\n cauFileExt=\".jpg, .jpeg, .png, .gif\"\n cauFileName=\"file\"\n cauValueKey=\"url\"\n cauLabelKey=\"name\"\n cauProgressBox=\"/span.AUProgressBox\"\n />\n <span class=\"AUProgressBox\" style=\"display:none;\">\n <button type=\"button\" class=\"AUProgress\"><div class=\"AUPercent\"></div></button>\n <button type=\"button\" class=\"AUCancelProgress\"></button>\n </span>\n .jpg, .jpeg, .png, .gif\n (最多上传2个)\n </div>\n <dl class=\"uploadItemBox\">\n </dl>\n <script type=\"text/template\">\n <dd class=\"js_multiUploadItem\">\n <input type=\"hidden\" name=\"file[]\" value=\"{0}\" class=\"js_multiUploadHidden\" />\n <a href=\"{0}\" target=\"_blank\"><label class=\"js_multiUploadLabel\">{1}</label></a>\n <button type=\"button\" class=\"AURemove js_removeUploadItem\"></button>\n </dd>\n </script>\n</div>" + ] + }, + "window.Bizs.MultiselectPanel": { + "name": "window.Bizs.MultiselectPanel", + "shortname": "window.Bizs.MultiselectPanel", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/MultiselectPanel/MultiselectPanel.js", + "line": 2, + "description": "二级分类复选弹框\n\n

            require:\n JC.BaseMVC\n , JC.Panel\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会自动处理 [input|button] class=\"js_bizMultiselectPanel\"

            \n\n

            共用的 HTML attribute

            \n
            \n
            bmspUrl = url
            \n
            获取一级分类数据的URL
            \n\n
            bmspChildUrl = url
            \n
            获取子级分类数据的URL, \"{0}\" 代表父级ID
            \n\n
            bmspPopupHideButton = bool, default = false
            \n
            显示弹框的时候, 是否遮盖触发源标签
            \n\n
            bmspPanel = selector
            \n
            显示内容的弹框
            \n\n
            bmspPanelBoxSelector = selector
            \n
            弹框里显示分类内容的容器
            \n\n
            bmspTopTpl = script selector
            \n
            一级分类的脚本模板
            \n\n
            bmspChildTpl = script selector
            \n
            子级分类的脚本模板
            \n\n
            bmspOpenClass = css class name
            \n
            展开子级分类的样式
            \n\n
            bmspCloseClass = css class name
            \n
            关闭子级分类的样式
            \n\n
            bmspNoItemText = string
            \n
            没有选择内容时的提示文本
            \n\n
            bmspHasItemText = string
            \n
            有选择内容时的提示文本, \"{0}\" 代表选择的数量
            \n\n
            bmspSaveTopIdSelector = selector
            \n
            保存一级分类ID的选择器
            \n
            \n\n

            URL 回填的 HTML attribute

            \n
            \n
            bmspAutoFillTopKey = url arg name
            \n
            回填一级分类的URL识别name
            \n\n
            bmspAutoFillChildKey = url arg name
            \n
            回填子级分类的URL识别name
            \n
            \n\n

            数据 回填的 HTML attribute

            \n
            \n
            bmspDefaultFillData = json data name, window 变量域
            \n
            初始化的数据变量名
            \nwindow.testData = { \"parents\": [ 1, 2, 3 ], \"children\": [4, 5, 6, 7, 8 ] };\n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-05-09", + "author": "qiushaowei | 75 Team" + }, + "window.Bizs.TaskViewer": { + "name": "window.Bizs.TaskViewer", + "shortname": "window.Bizs.TaskViewer", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.Bizs", + "file": "../bizs/TaskViewer/TaskViewer.js", + "line": 2, + "description": "TaskViewer 日历任务展示面板\n\n

            require:\n jQuery\n , JC.common\n , JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本文件, 默认会自动初始化class=\"js_COMPTaskViewer\"下的日期

            \n\n\n

            可用的 HTML attribute

            \n
            \n
            taskselecteddates = selector
            \n
            指定选定的日期标签
            \n
            taskdeleteddates = selector
            \n
            指定删除的日期标签
            \n
            tasknewaddeddates = selector
            \n
            指定新增的日期标签
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "0.1 2014-04-17", + "author": "zuojing | 75 Team" + }, + "JC.AjaxTree": { + "name": "JC.AjaxTree", + "shortname": "JC.AjaxTree", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 7, + "description": "AJAX 树菜单类 JC.AjaxTree\n

            require: \n JC.BaseMVC\n , JSON2\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            页面只要引用本文件, 默认会自动初始化 div class=\"js_compAjaxTree\" 的树组件

            \n\n

            可用的 html attribute

            \n
            \n
            data-defaultOpenRoot = bool, default = true
            \n
            如果没有默认选中节点, 是否展开根节点
            \n\n
            data-cajScriptData = script selector
            \n
            从脚本模板解释数据
            \n\n
            data-cajData = object name of window
            \n
            从window变量获取数据
            \n\n
            data-cajUrl = url
            \n
            从 url 加载数据
            \n\n
            data-rootId = node id, default = ''
            \n
            指定根节点ID
            \n\n
            data-urlArgName = string, default = 'tree_node'
            \n
            书节点的URL参数名
            \n\n
            data-typeIndex = int, default = 0
            \n
            数据节点中 节点类型 所在的索引位置
            \n\n
            data-idIndex = int, default = 1
            \n
            数据节点中 节点id 所在的索引位置
            \n\n
            data-nameIndex = int, default = 2
            \n
            数据节点中 节点name 所在的索引位置
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "树要显示的选择器", + "type": "Selector" + } + ], + "version": "dev 0.1 2014-11-13, qiushaowei , pjk | 75 Team", + "example": [ + "\n\n
            \n \n
            " + ] + }, + "JC.AjaxUpload": { + "name": "JC.AjaxUpload", + "shortname": "JC.AjaxUpload", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 3, + "description": "Ajax 文件上传\n

            require: \n JC.BaseMVC\n , JC.Panel\n

            \n

            \n JC Project Site\n | API docs\n | demo link\n

            \n

            可用的 html attribute

            \n
            \n
            cauStyle = string, default = g1
            \n
            \n 按钮显示的样式, 可选样式:\n
            \n
            绿色按钮
            \n
            g1, g2, g3
            \n\n
            白色/银色按钮
            \n
            w1, w2, w3
            \n
            \n
            \n\n
            cauButtonText = string, default = 上传文件
            \n
            定义上传按钮的显示文本
            \n\n
            cauHideButton = bool, default = false( no label ), true( has label )
            \n
            \n 上传完成后是否隐藏上传按钮\n
            \n\n
            cauButtonAfter= bool
            \n
            是否把上传按钮放在后面
            \n\n
            cauUrl = url, require
            \n
            上传文件的接口地址\n
            如果 url 带有参数 callback, 返回数据将以 jsonp 方式处理\n
            \n\n
            cauJSONPName = function name
            \n
            显式声明上传后返回数据的 jsonp 回调名\n

            jsonp 返回数据示例:

            \nurl: ?callback=callback\n
            data: \n<script>\n window.parent && window.parent.callback && window.parent.callback( {\"errorno\":0,\"errmsg\":\"\",\"data\":{\"name\":\"test.jpg\",\"url\":\".\\/data\\/images\\/test.jpg\"}} );\n</script>\n
            \n\n
            cauFileExt = file ext, optional
            \n
            允许上传的文件扩展名, 例: \".jpg, .jpeg, .png, .gif\"
            \n\n
            cauFileSize = [ KB | MB | GB ], default = 1024 MB
            \n
            上传文件大小限制
            \n\n
            cauFileName = string, default = file
            \n
            上传文件的 name 属性
            \n\n
            cauValueKey = string, default = url
            \n
            返回数据用于赋值给 hidden/textbox 的字段
            \n\n
            cauLabelKey = string, default = name
            \n
            返回数据用于显示的字段
            \n\n
            cauSaveLabelSelector = selector
            \n
            指定保存 cauLabelKey 值的 selector
            \n\n
            cauStatusLabel = selector, optional
            \n
            开始上传时, 用于显示状态的 selector
            \n\n
            cauDisplayLabel = selector, optional
            \n
            上传完毕后, 用于显示文件名的 selector
            \n\n
            cauUploadDoneCallback = function, optional
            \n
            \n 文件上传完毕时, 触发的回调\n
            function cauUploadDoneCallback( _json, _selector, _frame ){\n   var _ins = this;\n   //alert( _json ); //object object\n}
            \n
            \n\n
            cauUploadErrorCallback = function, optional
            \n
            \n 文件上传完毕时, 发生错误触发的回调\n
            function cauUploadErrorCallback( _json, _selector, _frame ){\n   var _ins = this;\n   //alert( _json ); //object object\n}
            \n
            \n\n
            cauDisplayLabelCallback = function, optional, return = string
            \n
            \n 自定义上传完毕后显示的内容 模板\n
            function cauDisplayLabelCallback( _json, _label, _value ){\n   var _selector = this\n       , _label = JC.f.printf( '<a href=\"{0}\" class=\"green js_auLink\" target=\"_blank\">{1}</a>{2}'\n                       , _value, _label\n                       ,  ' <a href=\"javascript:\" class=\"btn btn-cls2 js_cleanCauData\"></a>  '\n                   )\n       ;\n   return _label;\n}
            \n
            \n\n
            cauViewFileBox = selector
            \n
            用于显示文件链接的容器
            \n\n
            cauViewFileBoxItemTpl = selector
            \n
            cauViewFileBox 的脚本模板
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 team", + "date": "2013-09-26", + "example": [ + "\n
            \n \n \n \n
            \n\n POST 数据:\n ------WebKitFormBoundaryb1Xd1FMBhVgBoEKD\n Content-Disposition: form-data; name=\"file\"; filename=\"disk.jpg\"\n Content-Type: image/jpeg\n\n 返回数据:\n {\n \"errorno\": 0, \n \"data\":\n {\n \"url\": \"/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg\", \n \"name\": \"test.jpg\"\n }, \n \"errmsg\": \"\"\n }" + ] + }, + "JC.AutoChecked": { + "name": "JC.AutoChecked", + "shortname": "JC.AutoChecked", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 2, + "description": "全选/反选\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            input[type=checkbox] 可用的 HTML 属性

            \n
            \n
            checktype = string
            \n
            \n 类型: all(全选), inverse(反选)\n
            \n\n
            checkfor = selector
            \n
            需要全选/反选的 checkbox
            \n\n
            checkall = selector
            \n
            声明 checkall input, 仅在 checktype = inverse 时才需要
            \n\n
            checktrigger = string of event name
            \n
            点击全选反选后触发的事件, 可选
            \n
            ", + "is_constructor": 1, + "version": "dev 0.1 2013-06-11", + "author": "qiushaowei | 75 team", + "params": [ + { + "name": "_selector", + "description": "要初始化的全选反选的父级节点 或 input[checktype][checkfor]", + "type": "Selector" + } + ], + "example": [ + "\n

            AJAX data:

            \n
            \n
            checkall example 24
            \n
            \n \n \n
            \n
            \n \n \n \n \n \n
            \n
            \n\n " + ] + }, + "JC.AutoComplete": { + "name": "JC.AutoComplete", + "shortname": "JC.AutoComplete", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 4, + "description": "AutoComplete 文本框内容输入提示\n
            响应式初始化, 当光标焦点 foucs 到 文本框时, 会检查是否需要自动初始化 AutoComplete 实例\n

            require: \n jQuery\n , JC.BaseMVC\n

            \n\n

            JC Project Site\n| API docs\n| demo link

            \n\n

            可用的 HTML attribute

            \n
            \n
            cacPopup = selector, optional
            \n
            显式指定用于显示数据列表的弹框, 如不指定, 载入数据时会自己生成 popup node
            \n\n
            cacPreventEnter = bool, default = false
            \n
            文本框按回车键时, 是否阻止默认行为, 防止提交表单
            \n\n
            cacLabelKey = string, default = data-label
            \n
            用于显示 label 的HTML属性
            \n\n
            cacIdKey = string, default= data-id
            \n
            用于显示 ID 的HTML属性
            \n\n
            cacIdSelector = selector
            \n
            用于保存 ID 值的 node
            \n\n
            cacIdVal = string, optional
            \n
            用于初始化的默认ID, 如果 cacIdVal 为空将尝试读取 cacIdSelector 的值
            \n\n
            cacStrictData = bool, default = false
            \n
            是否验证已填内容的合法性
            仅在 cacIdSelector 和 cacIdKey 显式声明时有效
            \n\n
            cacAjaxDataUrl = url
            \n
            \n 获取 数据的 AJAX 接口\n
            \n
            数据格式
            \n
            \n [ { \"id\": \"id value\", \"label\": \"label value\" }, ... ]\n
            \n
            \n
            \n\n
            cacDataFilter = callback
            \n
            \n
            \n
            如果 数据接口获取的数据不是默认格式, \n 可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式\n
            \n
            \n
            function cacDataFilter( _json ){\nif( _json.data && _json.data.length ){\n   _json = _json.data;\n}\n\n$.each( _json, function( _ix, _item ){\n   _item.length &&\n       ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } )\n       ;\n});\nreturn _json;\n}
            \n
            \n
            \n
            \n\n
            cacBoxWidth = int
            \n
            定义 popup 的宽度, 如果没有显式定义, 将使用 selector 的宽度
            \n\n
            cacCasesensitive = bool, default = false
            \n
            是否区分英文大小写
            \n\n
            cacSubItemsSelector = selector string, default = \"> li\"\n
            popup 查找数据项的选择器语法
            \n\n
            cacNoDataText = string, default = \"数据加载中, 请稍候...\"
            \n
            加载数据时的默认提示文字
            \n\n
            cacValidCheckTimeout = int, default = 1
            \n
            定义 JC.Valid blur 时执行 check 的时间间隔, 主要为防止点击列表时已经 Valid.check 的问题
            \n\n
            cacFixHtmlEntity = bool
            \n
            是否将 HTML实体 转为 html
            \n\n
            cacMultiSelect = bool, default = false
            \n
            是否为多选模式
            \n\n
            cacListItemTpl= selector
            \n
            指定项内容的模板
            \n\n
            cacListAll = bool
            \n
            popup是否显示所有内容
            \n\n
            cacDisableSelectedBlur = bool
            \n
            在文本框里按方向键选择项内容并按回车键时, 是否禁止触发 blur事件
            \n\n
            cacNoCache = bool, default = false
            \n
            AJAX 获取数据式,是否缓存 AJAX 数据
            \n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-11-01", + "author": "zuojing, qiushaowei | 75 Team", + "example": [ + "\n
            \n \n
            \n
              \n
            • yy语音
            • \n
            • yy直播
            • \n
            • yy频道设计
            • \n
            • yy网页版
            • \n
            • youku
            • \n
            • yeah
            • \n
            • yahoo
            • \n
            • YY语音
            • \n
            • YY直播
            • \n
            • YY频道设计
            • \n
            • YY网页版
            • \n
            • YOUKU
            • \n
            • YEAH
            • \n
            \n
            " + ] + }, + "JC.AutoFixed": { + "name": "JC.AutoFixed", + "shortname": "JC.AutoFixed", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/AutoFixed/AutoFixed.js", + "line": 3, + "description": "自动 Fixed ( JC.AutoFixed )\n\n

            require:\n JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 div class=\"js_compAutoFixed\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            data-normalClass = css class name
            \n
            正常状态下附加的 css
            \n\n
            data-fixedClass = css class name
            \n
            fixed 状态下附加的 css
            \n\n
            data-cloneItemClass = css class name
            \n
            fixed源 克隆对象附加的 css( 仅对 position = static 的克隆源生效 )
            \n\n
            data-fixedTopPx = number, default = 0
            \n
            \n 滚动到多少像素式开始执行 fixed\n
            \n\n
            data-fixAnchor = bool
            \n
            \n 是否修正 html 锚点定位问题( 该问题通常出现在 position fixed top = 0 )\n
            \n\n
            data-highlightTrigger = selector
            \n
            滚动时响应滚动条所在锚点的内容高亮显示
            \n\n
            data-highlightAnchorLayout = selector, default = data-highlightTrigger
            \n
            指定计算位置为锚点的某个父容器 y + height
            \n\n
            data-highlightClass = css class name, default = cur
            \n
            当前高亮的css class
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n

            JC.AutoFixed 示例

            " + ] + }, + "JC.AutoSelect": { + "name": "JC.AutoSelect", + "shortname": "JC.AutoSelect", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 3, + "description": "

            select 级联下拉框无限联动

            \n
            只要引用本脚本, 页面加载完毕时就会自动初始化级联下拉框功能\n

            动态添加的 DOM 需要显式调用 JC.AutoSelect( domSelector ) 进行初始化\n

            要使页面上的级联下拉框功能能够自动初始化, 需要在select标签上加入一些HTML 属性\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            select 标签可用的 HTML 属性

            \n
            \n
            defaultselect, 这个属性不需要赋值
            \n
            该属性声明这是级联下拉框的第一个下拉框, 这是必填项,初始化时以这个为入口
            \n\n
            selectvalue = string
            \n
            下拉框的默认选中值
            \n\n
            selecturl = AJAX 数据请求的URL
            \n
            下拉框的数据请求接口, 符号 {0} 代表下拉框值的占位符
            \n\n
            selectignoreinitrequest = bool, default = false
            \n
            \n 首次初始化时, 是否需要请求新数据\n
            有时 联动框太多, 载入页面时, 后端直接把初始数据输出, 避免请求过多\n
            \n\n
            selecttarget = selector
            \n
            下一级下拉框的选择器语法
            \n\n
            selectdatacb = 静态数据请求回调
            \n
            如果数据不需要 AJAX 请求, 可使用这个属性, 自行定义数据处理方式
            \n\n
            selectrandomurl = bool, default = false
            \n
            AJAX 请求时, 添加随机参数, 防止数据缓存
            \n\n
            selecttriggerinitchange = bool, default = true
            \n
            首次初始化时, 是否触发 change 事件
            \n\n
            selecthideempty = bool, default = false
            \n
            是否隐藏没有数据的 selecct
            \n\n
            selectdatafilter = 请求数据后的处理回调
            \n
            如果接口的数据不符合 select 的要求, 可通过这个属性定义数据过滤函数
            \n\n
            selectbeforeinited = 初始化之前的回调
            \n\n
            selectinited = 初始化后的回调
            \n
            function selectinited( _items ){\n   var _ins = this;\n}
            \n
            \n\n
            selectallchanged = 所有select请求完数据之后的回调, window 变量域
            \n
            function selectallchanged( _items ){\n   var _ins = this;\n}
            \n
            \n\n
            selectCacheData = bool, default = true
            \n
            是否缓存ajax数据
            \n\n
            selectItemDataFilter = function
            \n
            每个select 显示option前,可自定义数据过滤函数\n
            function selectItemDataFilter2( _selector, _data, _pid){\n   //alert( '_pid:' + _pid + '\\n' + JSON.stringify( _data ) );\n   var _r, i, j;\n   if( _pid === '' ){//过滤北京id = 28\n       _r = [];\n       for( i = 0, j = _data.length; i < j; i++ ){\n           if( _data[i][0] == 28 ) continue;\n           _r.push( _data[i] );\n       }\n       _data = _r;\n   }\n   else if( _pid == 14 ){//过滤江门id=2254\n       _r = [];\n       for( i = 0, j = _data.length; i < j; i++ ){\n           if( _data[i][0] == 2254 ) continue;\n           _r.push( _data[i] );\n       }\n       _data = _r;\n   }\n   return _data;\n}
            \n
            \n
            \n

            option 标签可用的 HTML 属性

            \n
            \n
            defaultoption, 这个属性不需要赋值
            \n
            声明默认 option 选项, 更新option时, 有该属性的项不会被清除
            \n
            \n

            数据格式

            \n

            \n [ [id, name], [id, name] ... ]\n
            如果获取到的数据格式不是默认格式,\n 可以通过 AutoSelect.dataFilter 属性自定义函数, 进行数据过滤\n

            ", + "static": 1, + "version": "dev 0.2", + "author": "qiushaowei | 75 Team", + "date": "2013-07-28(.2), 2013-06-11(.1)", + "params": [ + { + "name": "_selector", + "description": "要初始化的级联下拉框父级节点", + "type": "Selector" + } + ], + "example": [ + "\n

            AJAX 返回内容

            \n \n
            \n \n \n \n
            \n
            \n " + ] + }, + "JC.BaseMVC": { + "name": "JC.BaseMVC", + "shortname": "JC.BaseMVC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 3, + "description": "MVC 抽象类 ( 仅供扩展用, 这个类不能实例化)\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-09-07", + "author": "qiushaowei | 75 Team" + }, + "JC.BaseMVC.Model": { + "name": "JC.BaseMVC.Model", + "shortname": "JC.BaseMVC.Model", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 249, + "description": "MVC Model 类( 仅供扩展用 )\n
            这个类默认已经包含在lib.js里面, 不需要显式引用\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.BaseMVC

            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-09-11", + "author": "qiushaowei | 75 Team" + }, + "JC.Calendar": { + "name": "JC.Calendar", + "shortname": "JC.Calendar", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Calendar/Calendar.date.js", + "line": 3, + "description": "日期选择组件\n
            全局访问请使用 JC.Calendar 或 Calendar\n
            DOM 加载完毕后\n, Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签\n
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector )\n
            _selector 可以是 新加载的容器, 也可以是新加载的所有input\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season)

            \n
            \n
            defaultdate = ISO Date
            \n
            默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性
            \n\n
            datatype = string
            \n
            \n 声明日历控件的类型:\n
            date: 日期日历\n
            week: 周日历\n
            month: 月日历\n
            season: 季日历\n
            year: 年日历\n
            monthday: 多选日期日历\n
            \n\n
            multidate = string
            \n
            \n 与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突\n
            \n\n
            calendarshow = function
            \n
            显示日历时的回调\n
            function calendarshow( _selector, _ins ){\n   var _selector = $(this);\n   UXC.log( 'calendarshow', _selector.val() );\n}\n
            \n\n
            calendarhide = function
            \n
            隐藏日历时的回调\n
            function calendarhide( _selector, _ins ){\n   var _selector = $(this);\n   UXC.log( 'calendarhide', _selector.val() );\n}
            \n\n
            calendarlayoutchange = function
            \n
            用户点击日历控件操作按钮后, 外观产生变化时触发的回调\n
            function calendarlayoutchange( _selector, _ins ){\n   var _selector = $(this);\n   JC.log( 'calendarlayoutchange', _selector.val() );\n}\n
            \n\n
            calendarupdate = function
            \n
            \n 赋值后触发的回调\n
            function calendarupdate( _startDate, _endDate, _ins ){\n   var _selector = $(this);\n   JC.log( 'calendarupdate', _selector.val(), _startDate, _endDate );\n}\n
            \n\n
            calendarclear = function
            \n
            清空日期触发的回调\n
            function calendarclear( _selector, _ins ){\n   var _selector = $(this);\n}
            \n\n
            minvalue = ISO Date
            \n
            日期的最小时间, YYYY-MM-DD
            \n\n
            maxvalue = ISO Date
            \n
            日期的最大时间, YYYY-MM-DD
            \n\n
            currentcanselect = bool, default = true
            \n
            当前日期是否能选择
            \n\n
            multiselect = bool (目前支持 month: default=false, monthday: default = true)
            \n
            是否为多选日历
            \n\n
            calendarupdatemultiselect = function
            \n
            \n 多选日历赋值后触发的回调\n
            \n
            参数: _data:
            \n
            \n [{\"start\": Date,\"end\": Date}[, {\"start\": Date,\"end\": Date}... ] ]\n
            \n
            \n
            function calendarupdatemultiselect( _data, _ins ){\n   var _selector = $(this);\n   window.JSON && ( _data = JSON.stringify( _data ) );\n   JC.log( 'calendarupdatemultiselect:'\n       , JC.f.printf( 'val:{0}, data:{1}', _selector.val(), _data ) );\n}
            \n\n
            dateFormat = string
            \n
            \n 自定义日期格式化显示, 使用 JC.f.dateFormat 函数进行格式化\n
            如果日期去除非数字后不是 8/16 位数字的话, 需要 显式声明 dateParse 属性, 自定义日期解析函数\n
            \n\n
            fullDateFormat = string
            \n
            \n 针对 日期类型: 月/季/年 定义显示格式, default: \"{0} 至 {1}\"\n
            {0}代表开始日期, {1}代表结束日期\n
            \n\n
            ignoreInitCalendarDate = bool, default = false
            \n
            是否忽略初始化 控件的值
            \n\n
            dateParse = function
            \n
            \n 自定义日期格式函数, 针对日期不能解析为 8 位数字的特殊日期\n
            例子:\n
            //\n/// 针对月份日期格式化 YY-MM\n//\nfunction parseYearMonthDate( _dateStr ){\n   _dateStr = $.trim( _dateStr || '' );\n   var _r = { start: null, end: null };\n   if( !_dateStr ) return _r;\n\n   _dateStr = _dateStr.replace( /[^\\d]+/g, '' );\n   var _year = _dateStr.slice( 0, 4 ), _month = parseInt( _dateStr.slice( 4 ), 10 ) - 1;\n\n   _r.start = new Date( _year, _month, 1 );\n   return _r;\n}\n//\n/// 针对季度日期格式化 YY-MM ~ YY-MM\n//\nfunction parseSeasonDate( _dateStr ){\n   _dateStr = $.trim( _dateStr || '' );\n   var _r = { start: null, end: null };\n   if( !_dateStr ) return _r;\n\n   _dateStr = _dateStr.replace( /[^\\d]+/g, '' );\n\n   _r.start = JC.f.parseISODate( _dateStr.slice( 0, 6 ) + '01' );\n   _r.end = JC.f.parseISODate( _dateStr.slice( 6 ) + '01' );\n\n   return _r;\n}\n//\n/// 针对年份日期格式化 YY\n//\nfunction parseYearDate( _dateStr ){\n   _dateStr = $.trim( _dateStr || '' );\n   var _r = { start: null, end: null };\n   if( !_dateStr ) return _r;\n\n   _dateStr = _dateStr.replace( /[^\\d]+/g, '' );\n   var _year = _dateStr.slice( 0, 4 );\n\n   _r.start = new Date( _year, 0, 1 );\n   return _r;\n}
            \n
            \n
            ", + "version": "dev 0.1, 2013-06-04", + "author": "qiushaowei | 75 team" + }, + "JC.DCalendar": { + "name": "JC.DCalendar", + "shortname": "JC.DCalendar", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 2, + "description": "双日历日期选择组件\n

            \n require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            datatype = string 必填项
            \n
            声明日历控件的类型:\n
            ddate: 日期日历\n
            drange: 日期范围日历( 成对出现 )\n
            \n\n
            minvalue = ISO Date
            \n
            日期的最小时间, YYYY-MM-DD
            \n\n
            maxvalue = ISO Date
            \n
            日期的最大时间, YYYY-MM-DD
            \n\n
            currentcanselect = bool, default = true
            \n
            当前日期是否能选择
            \n\n
            monthmum = int
            \n
            \n 声明显示月份日历面板的个数(一次性可显示2到12个月份),默认为2(双日历)\n
            \n\n
            showtype = block || float
            \n
            \n 声明月份日历面板的显示方式,默认为float
            \n float(比如两个月份并排显示) 查看
            \n block (月份日历面板竖排显示)查看
            \n
            \n\n
            calendarshow = function
            \n
            显示日历显示后的回调\n
            function calendarShow( selector ) {\n   var ins = this;\n   JC.log( \"calendarshow\", new Date().getTime(), selector.val() );\n}
            \n\n
            calendarhide = function
            \n
            隐藏日历后的回调\n
            function calendarhide( selector ) {\n   JC.log( \"calendarhide\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            calendarclear = function
            \n
            清空选中日期后的回调\n
            function calendarclear( selector ) {\n   JC.log( \"calendarclear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updatedate = function
            \n
            选中日期后回调\n
            function updatedate( selector ) {\n   JC.log( \"updatedate\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updatemonth = function
            \n
            选中月份后回调\n
            function updatemonth( selector ) {\n   JC.log( \"updatedatemonth\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updateyear = function
            \n
            选中年份后回调\n
            function updateyear( selector ) {\n   JC.log( \"updatedateyear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            beforeupdateyear = function
            \n
            更新年份前的回调,即年份日历面板出来时\n
            function beforeupdateyear( selector ) {\n   JC.log( \"beforeupdateyear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            beforeupdatemonth = function
            \n
            更新月份前的回调,即月份日历面板出来时\n
            function beforeupdateymonth( selector ) {\n   JC.log( \"beforeupdateymonth\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            beforeupdatemont = function
            \n
            更新月份前的回调,即月份日历面板出来时\n
            function beforeupdateymonth( selector ) {\n   JC.log( \"beforeupdateymonth\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updateprevpageyear = function
            \n
            点击上一页年份时的回调\n
            function updatprevtpageyear( selector ) {\n   JC.log( \"updateprevpageyear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updatenextpageyear = function
            \n
            点击下一页年份时的回调\n
            function updatenextpageyear( selector ) {\n   JC.log( \"updatenextpageyear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updateprevyear = function
            \n
            点击上一年时的回调,月份日历面板点击上一页\n
            function updatprevyear( selector ) {\n   JC.log( \"updateprevyear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updatenextyear = function
            \n
            点击下一年时的回调,月份日历面板点击下一页\n
            function updatenextyear( selector ) {\n   JC.log( \"updatenextyear\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updateprevmonth = function
            \n
            点击上一月时的回调,日期日历面板点击上一页\n
            function updatprevmonth( selector ) {\n   JC.log( \"updateprevmonth\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            updatenextmonth = function
            \n
            点击下一月时的回调,日期日历面板点击下一页\n
            function updatenextmonth( selector ) {\n   JC.log( \"updatenextmonth\", $(selector).val(), new Date().getTime() );\n}
            \n\n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-20", + "author": "zuojing | 75 Team" + }, + "JC.Drag": { + "name": "JC.Drag", + "shortname": "JC.Drag", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Drag/Drag.js", + "line": 2, + "description": "响应式 Drag and Drop 功能\n
            对 [ div | button ].js_compDrag 生效\n\n

            require:\n JC.common\n , JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            通用 HTML attribute

            \n
            \n
            dragTarget = selector, default = self
            \n
            要拖动的 selector, 可以通过该属性指定拖动的父节点
            \n\n
            dragIn = selector, default = window
            \n
            可拖动的范围
            \n\n
            disableDrag = bool, default = false
            \n
            是否禁止拖动, 会执行实例初始化
            \n\n
            ignoreDrog = bool, default = false
            \n
            是否忽略拖动, 不会执行实例初始化
            \n\n
            dragInitedCb = function, window 变量域
            \n
            实例初始化后调用的回调\n
            function dragInitedCb( _selector, _dragTarget ){\n   var _ins = this;\n   JC.log( 'dragInitedCb', new Date().getTime() );\n}
            \n
            \n\n
            dragBeforeCb = function, window 变量域
            \n
            拖动之前调用的回调, 如果返回 false, 将停止拖动操作\n
            function dragBeforeCb( _dragTarget, _selector ){\n   var _ins = this;\n   JC.log( 'dragBeforeCb', new Date().getTime() );\n   //return false;\n}
            \n
            \n\n
            dragAfterCb = function, window 变量域
            \n
            拖动完成之后的回调\n
            function dragAfterCb( _dragTarget, _selector ){\n   var _ins = this;\n   JC.log( 'dragAfterCb', new Date().getTime() );\n}
            \n
            \n\n
            dragBeginCb = function, window 变量域
            \n
            拖动开始时的回调\n
            function dragBeginCb( _selector, _dragTarget, _movingSelector ){\n   var _ins = this;\n   JC.log( 'dragBeginCb', new Date().getTime() );\n}
            \n
            \n\n
            dragMovingCb = function, window 变量域
            \n
            拖动移动时的回\n
            function dragMovingCb( _selector, _dragTarget, _movingSelector, _x, _y, _evt ){\n   var _ins = this;\n   JC.log( 'dragMovingCb', new Date().getTime() );\n}
            \n
            \n\n
            dragDoneCb = function, window 变量域
            \n
            拖动完成时的回调\n
            function dragDoneCb( _selector, _dragTarget ){\n   var _ins = this;\n   JC.log( 'dragDoneCb', new Date().getTime() );\n}
            \n
            \n\n
            \n\n

            drop HTML attribute

            \n
            \n
            dropFor = selector
            \n
            指定可拖放的 selector
            \n\n
            dropSwap = bool, default = false
            \n
            \n 是否交换拖曳的位置\n
            为真, 交换 selector 的位置\n
            不为真, 将 append 到目标 selector\n
            \n\n
            disableDrop = bool, default = false
            \n
            是否禁止 拖放功能, 这个属性应当写在 dropFor 的 selector 里
            \n\n
            dropDoneCb = function, window 变量域
            \n
            拖放完成时的回调, 如果返回 false, 将停止拖放操\n
            function dropDoneCb( _dragTarget, _dropTarget ){\n   var _initSelector = this;\n   JC.log( 'dropDoneCb', new Date().getTime() );\n   //return false;\n}
            \n
            \n\n
            dropDoneAfterCb = function, window 变量域
            \n
            拖放完成后的回调\n
            function dropDoneAfterCb( _dragTarget, _dropTarget ){\n   var _initSelector = this;\n   JC.log( 'dropDoneAfterCb', new Date().getTime() );\n}
            \n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-26", + "author": "qiushaowei | 75 Team", + "example": [ + "\n

            拖动示例

            \n
            \n normal drag \n , dragBeginCb=\"dragBeginCb\"\n
            \n\n

            拖放示例

            \n \n \n \n \n \n
            \n
            \n dropDoneCb=\"dropDoneCbAllow\"\n
            \n
            \n
            \n dropDoneCb=\"dropDoneCbBan\"\n
            \n
            " + ] + }, + "JC.DragSelect": { + "name": "JC.DragSelect", + "shortname": "JC.DragSelect", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/DragSelect/DragSelect.js", + "line": 2, + "description": "DOM标签拖动选择\n\n

            require:\n JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 div class=\"js_compDragSelect\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            cdsConfig = script selector
            \n
            拖动内容的配置\n<script type=\"text/template\" class=\"js_cdsConfig\">
            \n   {\n       \"items\": {                                      //响应选择动作的选择器列表\n           \"td.js_pos_canSelect\": {                        //响应选择动作的选择器\n               \"addClass\": \"js_pos_selected\"               //选取到的内容 添加的 class\n               , \"removeClass\": \"js_pos_canSelect\"         //选取到的内容 清除的 class\n               , \"callback\":                               //选中内容后的回调\n                   function( _items, _type, _ins ){\n                       var _selector = this;\n                       JC.log( 'callback, td.js_pos_canSelect:', _type, _items.length );\n                   }\n           }\n           , \"td.js_pos_selected\": {\n               \"addClass\": \"js_pos_canSelect\"\n               , \"removeClass\": \"js_pos_selected\"\n               , \"callback\": \n                   function( _items, _type, _ins ){\n                       var _selector = this;\n                       JC.log( 'callback, td.js_pos_selected:', _type, _items.length );\n                   }\n           }\n       }\n       , \"realtimeClass\": \"js_cdsRealtimeEffect\"   //实时显示选取内容的 CSS 样式名\n       , \"callback\":                         //选中内容的全局回调\n           function( _items, _type, _ins ){\n               var _selector = this;\n               JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );\n           }\n   }\n
            </script>\n
            \n\n
            cdsRealtimeEffect = bool, default = false
            \n
            是否实时显示选中内容的状态
            \n\n
            cdsRealtimeClass = CSS class name
            \n
            显示选中内容的 CSS 样式名
            \n\n
            cdsCallback = function
            \n
            选中内容的全局回调\n
            function cdsCallback( _items, _type, _ins ){\n   var _selector = this;\n   JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );\n}
            \n
            \n\n
            cdsItemFilter = function
            \n
            选取内容时的过滤函数, 返回 false 将忽略 _item\n
            function cdsItemFilter( _item, _type, _itemData, _configData ){\n   var _selector = this\n       , _r = true\n       //, _minDate = JC.f.pureDate( JC.f.dateDetect( 'now,1d' ) )\n       //, _itemDate = JC.f.parseISODate( _item.data( 'date' ) )\n       ;\n   //_itemDate.getTime() < _minDate.getTime() && ( _r = false );\n   return _r;\n}
            \n
            \n\n
            cdsRectMinWidth = int, default = 20
            \n
            响应选取时,最小拖动宽度
            \n\n
            cdsRectMinHeight= int, default = 20
            \n
            响应选取时,最小拖动高度
            \n\n
            cdsEnableTextSelectable = bool, default = false
            \n
            选取内容式,是否启用文本选取
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-05-29", + "author": "qiushaowei | 75 Team" + }, + "JC.FChart": { + "name": "JC.FChart", + "shortname": "JC.FChart", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/FChart/FChart.js", + "line": 7, + "description": "JC.FChart - flash 图表组件\n\n

            require:\n JC.BaseMVC\n , SWFObject\n , JSON2\n , jQuery.mousewheel\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 div class=\"js_compFChart\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            chartScriptData = script tpl selector
            \n
            图表的脚本模板数据
            \n\n
            chartDataVar = json object name
            \n
            图表的json数据名, window变量域
            \n\n
            chartWidth = number, default = 100%
            \n
            图表的宽度
            \n\n
            chartHeight = number, default = 400
            \n
            图表的高度
            \n\n
            chartScroll = bool, default = true
            \n
            图表是否响应鼠标滚动
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-09-09", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
            \n   <div class=\"js_compFChart\"\n       chartScriptData=\"|script\"\n       chartWidth=\"600\"\n       chartHeight=\"400\"\n       >\n       <script type=\"text/template\">\n           {\n               chart: {\n                   type: 'bar' \n               }, \n               title: {\n                   text:'Chart Title'\n               },\n               subtitle: {\n                   text: 'sub title'\n               }, \n               xAxis: {\n                   categories: [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12' ]\n               }, \n               yAxis: {\n                   title: {\n                       text: '(Vertical Title - 中文)'\n                   }\n               },\n               series:[{\n                   name: 'Temperature'\n                   , data: [-50, 0, 3, -20, -20, 27, 28, 32, 30, 25, 15, -58]\n                   , style: { 'stroke': '#ff7100' } \n                   , pointStyle: {}\n               }, {\n                   name: 'Rainfall',\n                   data: [20, 21, 20, 100, 200, 210, 220, 100, 20, 10, 20, 10]\n               }],\n               credits: {\n                   enabled: true\n                   , text: 'fchart.openjavascript.org'\n                   , href: 'http://fchart.openjavascript.org/'\n               },\n               displayAllLabel: true,\n               legend: {\n                   enabled: false\n               }\n           }\n       </script>\n   </div>\n
            " + ] + }, + "JC.Fixed": { + "name": "JC.Fixed", + "shortname": "JC.Fixed", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Fixed/Fixed.js", + "line": 6, + "description": "内容固定于屏幕某个位置显示\n

            require: \n jQuery\n , JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 Team", + "date": "2013-08-18", + "example": [ + "" + ] + }, + "JC.FlowChart": { + "name": "JC.FlowChart", + "shortname": "JC.FlowChart", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/FlowChart/FlowChart.js", + "line": 5, + "description": "
            \n
            JC 流程图
            \n
            一对多关系
            \n
            多对一关系
            \n
            多对多关系
            \n
            \n

            require:\n RaphaelJS\n , JC.BaseMVC\n , JC.PopTips\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 div class=\"js_compFlowChart\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            data-FlowChart = script json data
            \n
            流程图数据\n
            \n
            数据说明
            \n
            数据按节点关系分为两大类: 一对多, 多对一
            \n
            \n
            \n
            一对多数据
            \n
            一对多数据存放于字段: nodes, nodes 数据类型为数组
            \n
            nodes 字段位于数据节点里
            \n
            \n
            \n
            多对一数据
            \n
            多对一数据存放于字段: targetNodes, targetNodes 数据类型为对象
            \n
            targetNodes 字段为全局节点
            \n
            \n
            \n
            \n
            \n
            数据字段说明
            \n
            \n

            图表数据 - chart 字段

            \n
            \n
            name = string
            \n
            节点名
            \n\n
            id = string
            \n
            节点唯一标识符
            \n\n
            nodes = array
            \n
            一对多数据的子节点, 该字段位于父节点里面
            \n\n
            targetNodes = object
            \n
            多对一数据的子节点, 该字段为全局字段, 节点位置 chart.targetNodes
            \n\n
            status = string, default = 0
            \n
            \n 节点状态\n
            根据 status 显示为不同的样式\n
            默认有0 ~ 10, 共11 种状态\n
            由status 产生的 css class: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status )\n
            \n\n
            tipsHtml = string
            \n
            鼠标划过节点时, 显示的tips内容, 支持html内容
            \n
            \n

            线条与图标颜色 - colors 字段

            \n
            \n
            line = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2 }
            \n
            背景线颜色
            \n\n
            icon = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2, 'fill': '#F2F2F2' }
            \n
            图标颜色
            \n\n
            如果要自定义节点颜色 或者 tips 颜色, 请使用 css 定义: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status )
            \n
            \n
            \n
            \n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-09-03", + "author": "qiushaowei | 75 Team", + "example": [ + "\n
            \n   <div class=\"js_compFlowChart\" data-FlowChart=\"|script\">\n       <script type=\"text/template\">\n           {\n               chart: {\n                   name: '提交'\n                   , id: 1\n                   , nodes: [\n                           {\n                               name: '资质审核'\n                               , id: 2\n                               , status: 1\n                               , tipsHtml: 'username 1'\n                               , nodes: [\n                                   {\n                                       name: '服务审核'\n                                       , id: 3\n                                       , targetNode: 5\n                                       , status: 2\n                                       , tipsHtml: 'username 2'\n                                   }\n                                   , {\n                                       name: '渠道管理层'\n                                       , id: 4\n                                       , status: 3\n                                       , tipsHtml: 'username 3'\n                                   }\n                               ]\n                           }\n                           , {\n                               name: '资质审核1'\n                               , id: 6\n                               , status: 4\n                               , tipsHtml: 'username 4'\n                               , nodes: [\n                                   {\n                                       name: '服务审核1'\n                                       , id: 7\n                                       , targetNode: 9\n                                       , status: 5\n                                       , tipsHtml: 'username 5'\n                                   }\n                                   , {\n                                       name: '渠道管理层1'\n                                       , id: 8\n                                       , targetNode: 9\n                                       , status: 6\n                                       , tipsHtml: 'username 6'\n                                   }\n                               ]\n                           }\n                           , {\n                               name: '资质审核2'\n                               , id: 10\n                               , status: 7\n                               , tipsHtml: 'username 7'\n                               , nodes: [\n                                   {\n                                       name: '服务审核2'\n                                       , id: 11\n                                       , status: 8\n                                       , tipsHtml: 'username 8'\n                                       , nodes: [\n                                           {\n                                               name: '管理层2'\n                                               , id: 12\n                                               , targetNode: 5\n                                               , status: 9\n                                               , tipsHtml: 'username 9'\n                                           }\n                                       ]\n                                   }\n                               ]\n                           }\n                           , {\n                               name: '资质审核3'\n                               , id: 15\n                               , status: 10\n                               , tipsHtml: 'username 10'\n                           }\n                   ]\n                   , targetNodes: {\n                       '5': {\n                           name: '管理层'\n                       }\n                       , '9': {\n                           name: '管理层1'\n                           , targetNode: 5\n                       }\n                   }\n               }\n           }\n       </script>\n   </div>\n
            \n" + ] + }, + "JC.Form": { + "name": "JC.Form", + "shortname": "JC.Form", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Form/Form.js", + "line": 2, + "description": "表单常用功能类 JC.Form\n

            这个组件将不再维护, 相关功能请使用抽取出来的对应组件

            \n\n

            \n optional: \n JC.AutoSelect\n , JC.AutoChecked\n , JC.FormFillUrl\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "static": 1, + "version": "dev 0.1 2013-06-11", + "author": "qiushaowei | 75 team" + }, + "JC.FormFillUrl": { + "name": "JC.FormFillUrl", + "shortname": "JC.FormFillUrl", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/FormFillUrl/FormFillUrl.js", + "line": 3, + "description": "FormFillUrl 表单自动填充 URL 参数\n\n

            require:\n JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 form class=\"js_compFormFillUrl\"

            \n\n

            Form 可用的 HTML attribute

            \n\n
            \n
            decoder = function, default = decodeURIComponent
            \n
            URL 的解码函数
            \n\n
            encoder = function, default = encodeURIComponent
            \n
            URL 的编码码函数
            \n\n
            ignoreUrlFill = bool, default = false
            \n
            是否忽略 URL填充
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-01-19", + "author": "qiushaowei | 75 Team", + "example": [ + "\n

            JC.FormFillUrl 示例

            \n
            \n
            " + ] + }, + "JC.FrameUtil": { + "name": "JC.FrameUtil", + "shortname": "JC.FrameUtil", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 2, + "description": "

            iframe 自适应 与 数据交互 工具类

            \n\n

            require:\n JC.common\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            ", + "static": 1, + "version": "dev 0.1 2014-04-26", + "author": "qiushaowei | 75 Team" + }, + "JC.ImageCutter": { + "name": "JC.ImageCutter", + "shortname": "JC.ImageCutter", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 2, + "description": "图片裁切组件\n
            借助 PHP GD 库进行图片裁切( 不仅限于 PHP GD )\n\n

            require:\n JC.common\n , JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 div class=\"js_compImageCutter\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            imageUrl = url string
            \n
            图片URL
            \n\n
            defaultCoordinate = string
            \n
            \n 设置默认选择范围, 有以下三种模式\n
            sidelength\n
            x, y\n
            x, y, sidelength\n
            \n\n
            coordinateSelector = selector
            \n
            保存当前坐标值的 node\n
            坐标值分别为: [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ]\n
            \n\n
            imageUrlSelector = selector
            \n
            保存当前图片URL的 node
            \n\n
            previewSelector = selector
            \n
            用于显示预览的 node, 支持多个预览, node 宽高并须为正方形
            \n\n
            minRectSidelength = int, default = 50
            \n
            裁切块的最小边长
            \n\n
            minImageSidelength = int, default = 50
            \n
            图片的最小边长
            \n\n
            maxImageSidelength = int
            \n
            图片的最大边长
            \n\n
            cicInitedCb = function
            \n
            组件初始化后的回调, window变量域\n
            function cicInitedCb(){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicInitedCb', new Date().getTime() );\n}
            \n
            \n\n
            cicImageInitedCb = function
            \n
            图片初始化完成时的回调, window变量域\n
            function cicImageInitedCb( _sizeObj, _img ){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicImageInitedCb', new Date().getTime() );\n}
            \n
            \n\n
            cicCoordinateUpdateCb = function
            \n
            更新裁切坐标后的回调, window变量域\n
            _corAr = Array = [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ]\n
            function cicCoordinateUpdateCb( _corAr, _imgUrl ){\n   var _p = this, _selector = _p.selector();\n   JC.log( 'cicCoordinateUpdateCb', _corAr, _imgUrl, new Date().getTime() );\n}
            \n
            \n\n
            cicDragDoneCb = function
            \n
            拖动完成后的回调, window变量域\n
            与 cicCoordinateUpdateCb 的差别是: cicDragDoneCb 初始化不会触发\n
            function cicDragDoneCb( _sizeObj ){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicDragDoneCb', new Date().getTime() );\n}
            \n
            \n\n
            cicErrorCb = function
            \n
            发生错误时的回调, window变量域\n
            所有错误类型都会触发这个回调\n
            function cicErrorCb( _errType, _args ){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicErrorCb', _errType, new Date().getTime() );\n}
            \n
            \n\n
            cicLoadErrorCb = function
            \n
            图片加载错误时的回调, window变量域\n
            function cicLoadErrorCb( _imgUrl ){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicLoadErrorCb',_imgUrl, new Date().getTime() );\n}
            \n
            \n\n
            cicSizeErrorCb = function
            \n
            图片尺寸不符合设置要求时的回调, window变量域\n
            function cicSizeErrorCb( _width, _height, _imgUrl, _isMax ){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicSizeErrorCb', _width, _height, _imgUrl, _isMax, new Date().getTime() );\n}
            \n
            \n\n
            cicPreviewSizeErrorCb = function
            \n
            图片缩放后尺寸不符合设置要求时的回调, window变量域\n
            function cicPreviewSizeErrorCb( _width, _height, _imgUrl, _newSize ){\n   var _ins = this, _selector = _ins.selector();\n   JC.log( 'cicPreviewSizeErrorCb', _width, _height, _imgUrl, _newSize, new Date().getTime() );\n}
            \n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n<table>\n <tr>\n <td>\n <div class=\"js_compImageCutter\"\n imageUrl=\"data/uploads/h_1680x1050.jpg\"\n previewSelector=\"(tr div.js_previewItem\"\n coordinateSelector=\"(td input.js_coordinate\"\n imageUrlSelector=\"(td input.js_imageUrl\"\n cicCoordinateUpdateCb=\"cicCoordinateUpdateCb\"\n >\n </div>\n <input type=\"text\" class=\"ipt js_coordinate\" value=\"\" />\n <input type=\"text\" class=\"ipt js_imageUrl\" value=\"\" />\n </td>\n <td>\n <div class=\"cic_previewItem js_previewItem\" style=\"width: 50px; height: 50px;\"></div>\n <div class=\"cic_previewItem js_previewItem\" style=\"width: 75px; height: 75px;\"></div>\n <div class=\"cic_previewItem js_previewItem\" style=\"width: 150px; height: 150px;\"></div>\n </td>\n </tr>\n</table>" + ] + }, + "JC.LunarCalendar": { + "name": "JC.LunarCalendar", + "shortname": "JC.LunarCalendar", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.LunarCalendar", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 6, + "description": "农历日历组件\n
            全局访问请使用 JC.LunarCalendar 或 LunarCalendar\n

            require: \n jQuery\n , JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            \nDOM 加载完毕后\n
            会自动初始化页面可识别的node, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar\n
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 JC.LunarCalendar.init( _selector );\n

            \n\n

            可用的 HTML attribute

            \n
            \n
            clcDate = date string
            \n
            设置日历的默认日期
            \n\n
            minvalue = date string
            \n
            设置日历的有效最小选择范围, 格式YYYY-mm-dd
            \n\n
            maxvalue = date string
            \n
            设置日历的有效最大选择范围, 格式YYYY-mm-dd
            \n\n
            hidecontrol = bool, default = false
            \n
            是否隐藏日历将操作控件
            \n\n
            nopreviousfestivals = bool, default = false
            \n
            不显示上个月的节日
            \n\n
            nonextfestivals = bool, default = false
            \n
            不显示下个月的节日
            \n\n
            clcSelectedItemCb = function, window变量域
            \n
            选择日期时触发的回调\n
            function clcSelectedItemCb1( _date, _td, _a ){\n   var _ins = this;\n   JC.log( _date );\n}
            \n
            \n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "指定要显示日历的选择器, 如果不显示指定该值, 默认为 document.body", + "type": "Selector" + }, + { + "name": "_date", + "description": "日历的当前日期, 如果不显示指定该值, 默认为当天", + "type": "Date" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 team", + "date": "2013-06-13" + }, + "JC.LunarCalendar.View": { + "name": "JC.LunarCalendar.View", + "shortname": "JC.LunarCalendar.View", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.LunarCalendar", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 587, + "description": "LunarCalendar 视图类", + "is_constructor": 1, + "params": [ + { + "name": "_model", + "description": "", + "type": "JC.LunarCalendar.Model" + } + ] + }, + "JC.LunarCalendar.Model": { + "name": "JC.LunarCalendar.Model", + "shortname": "JC.LunarCalendar.Model", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.LunarCalendar", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 779, + "description": "LunarCalendar 数据模型类", + "is_constructor": 1, + "params": [ + { + "name": "_container", + "description": "", + "type": "Selector" + }, + { + "name": "_date", + "description": "", + "type": "Date" + } + ] + }, + "JC.NumericStepper": { + "name": "JC.NumericStepper", + "shortname": "JC.NumericStepper", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/NumericStepper/NumericStepper.js", + "line": 2, + "description": "数值加减\n
            响应式初始化\n\n

            require:\n jQuery\n , JC.common\n , JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 (div|span) class=\"js_compNumericStepper\"

            \n\n

            可用的 HTML attribute

            \n
            \n
            cnsMinusButton = selector
            \n
            减少数值的 selector
            \n\n
            cnsPlusButton = selector
            \n
            增加数值的 selector
            \n\n
            cnsTarget = selector
            \n
            目标文本框的 selector
            \n\n
            cnsChangeCb = function
            \n
            内容改变后的回调\n
            function cnsChangeCb( _newVal, _oldVal, _ins ){\n   var _ipt = $(this);\n   JC.log( 'cnsChangeCb: ', _newVal, _oldVal );\n}
            \n
            \n\n
            cnsBeforeChangeCb = function
            \n
            内容改变前的回调, 如果显式返回 false 将终止内容变更\n
            function cnsBeforeChangeCb( _newVal, _oldVal, _ins ){\n   var _ipt = $(this);\n   JC.log( 'cnsBeforeChangeCb: ', _newVal, _oldVal );\n   if( _newVal > 5 ) return false;\n}
            \n
            \n
            \n

            textbox 可用的 HTML attribute

            \n
            \n
            minvalue = number
            \n
            最小值
            \n\n
            maxvalue = number
            \n
            最大值
            \n\n
            step = number, default = 1
            \n
            每次变更的步长
            \n\n
            fixed = int, default = 0
            \n
            显示多少位小数点
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-01-18", + "author": "qiushaowei | 75 Team", + "example": [ + "\n

            JC.NumericStepper 示例

            \n \n \n \n \n " + ] + }, + "JC.Paginator": { + "name": "JC.Paginator", + "shortname": "JC.Paginator", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Paginator/Paginator.js", + "line": 2, + "description": "Paginator 分页\n

            实现的功能上一页,下一页,数字页,...显示页码,跳转到n页,每页显示n条记录,

            \n

            \n require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            \n

            自动初始化.js_compPaginator下的table

            \n\n

            可用的 HTML attribute

            \n
            \n
            paginatorui
            \n
            css selector, 指定分页的模板内容将放到哪个容器里面
            \n
            paginatorcontent
            \n
            css selector, 指定取回来的数据将放到哪个容器里面
            \n
            totalrecords
            \n
            num, 共多少条记录,必填项
            \n
            perpage
            \n
            num, 每页显示多少条记录,默认10条
            \n
            perpageitems
            \n
            定义下拉框的option值,默认为[10,20,50]
            \n
            midrange
            \n
            num, default = 5。显示多少个数字页,超出的页将以...显示,比如一共有10页,那么显示前5页和最后一页,中间的以...显示
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2014-05-05", + "author": "zuojing | 75 Team", + "example": [ + "\n
            \n \n 在这里添加你要的数据\n
            \n
            \n \n
            \n
            " + ] + }, + "JC.Dialog": { + "name": "JC.Dialog", + "shortname": "JC.Dialog", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Dialog", + "file": "../comps/Panel/Dialog.js", + "line": 3, + "description": "带蒙板的会话弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Panel

            ", + "extends": "JC.Panel", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers", + "type": "Selector|string" + }, + { + "name": "_headers", + "description": "定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys", + "type": "String" + }, + { + "name": "_bodys", + "description": "定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers", + "type": "String" + }, + { + "name": "_footers", + "description": "定义模板的 footer 文字", + "type": "String" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.Dialog.mask": { + "name": "JC.Dialog.mask", + "shortname": "JC.Dialog.mask", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Dialog", + "file": "../comps/Panel/Dialog.js", + "line": 84, + "description": "显示或隐藏 蒙板\n
            注意, 这是个方法, 写 @class 属性是为了生成文档", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_isHide", + "description": "空/假 显示蒙板, 为真 隐藏蒙板", + "type": "Bool" + } + ] + }, + "JC.Dialog.msgbox": { + "name": "JC.Dialog.msgbox", + "shortname": "JC.Dialog.msgbox", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Dialog", + "file": "../comps/Panel/Dialog.popup.js", + "line": 2, + "description": "会话框 msgbox 提示 (不带按钮)\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Dialog

            ", + "extends": "JC.Dialog", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_msg", + "description": "提示内容", + "type": "String" + }, + { + "name": "_status", + "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "type": "Int" + }, + { + "name": "_cb", + "description": "弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + }, + { + "name": "_closeMs", + "description": "自动关闭的间隔, 单位毫秒, 默认 2000", + "type": "Int" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.Dialog.alert": { + "name": "JC.Dialog.alert", + "shortname": "JC.Dialog.alert", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Dialog", + "file": "../comps/Panel/Dialog.popup.js", + "line": 45, + "description": "会话框 alert 提示\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Dialog

            ", + "extends": "JC.Dialog", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_msg", + "description": "提示内容", + "type": "String" + }, + { + "name": "_status", + "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "type": "Int" + }, + { + "name": "_cb", + "description": "点击弹框确定按钮的回调\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.Dialog.confirm": { + "name": "JC.Dialog.confirm", + "shortname": "JC.Dialog.confirm", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Dialog", + "file": "../comps/Panel/Dialog.popup.js", + "line": 85, + "description": "会话框 confirm 提示\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Dialog

            ", + "extends": "JC.Dialog", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_msg", + "description": "提示内容", + "type": "String" + }, + { + "name": "_status", + "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "type": "Int" + }, + { + "name": "_cb", + "description": "点击弹框确定按钮的回调\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + }, + { + "name": "_cancelCb", + "description": "点击弹框取消按钮的回调\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.Panel": { + "name": "JC.Panel", + "shortname": "JC.Panel", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Panel/Panel.default.js", + "line": 4, + "description": "弹出层基础类 JC.Panel\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            Panel Layout 可用的 html attribute

            \n
            \n
            panelclickclose = bool
            \n
            点击 Panel 外时, 是否关闭 panel
            \n\n
            panelautoclose = bool
            \n
            Panel 是否自动关闭, 默认关闭时间间隔 = 2000 ms
            \n\n
            panelautoclosems = int, default = 2000 ms
            \n
            自动关闭 Panel 的时间间隔
            \n
            \n

            a, button 可用的 html attribute( 自动生成弹框)

            \n
            \n
            paneltype = string, require
            \n
            \n 弹框类型: alert, confirm, msgbox, panel \n
            dialog.alert, dialog.confirm, dialog.msgbox, dialog\n
            \n\n
            panelmsg = string
            \n
            要显示的内容
            \n\n
            panelmsgBox = script selector
            \n
            要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
            \n\n
            panelstatus = int, default = 0
            \n
            \n 弹框状态: 0: 成功, 1: 失败, 2: 警告 \n
            类型不为 panel, dialog 时生效\n
            \n\n
            panelcallback = function
            \n
            \n 点击确定按钮的回调, window 变量域\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            \n
            \n\n
            panelcancelcallback = function
            \n
            \n 点击取消按钮的回调, window 变量域\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            \n
            \n\n
            panelclosecallback = function
            \n
            \n 弹框关闭时的回调, window 变量域\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            \n
            \n\n
            panelbutton = int, default = 0
            \n
            \n 要显示的按钮, 0: 无, 1: 确定, 2: 确定, 取消\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelheader = string
            \n
            \n panel header 的显示内容\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelheaderBox = script selector
            \n
            \n panel header 的显示内容\n
            要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelfooterbox = script selector
            \n
            \n panel footer 的显示内容\n
            要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelhideclose = bool, default = false
            \n
            \n 是否隐藏关闭按钮\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelfixed = bool, default = false
            \n
            \n 显示 panel 时, 是否居中显示\n
            \n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers", + "type": "Selector|string" + }, + { + "name": "_headers", + "description": "定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys", + "type": "String" + }, + { + "name": "_bodys", + "description": "定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers", + "type": "String" + }, + { + "name": "_footers", + "description": "定义模板的 footer 文字", + "type": "String" + } + ], + "version": "dev 0.1, 2013-06-04, qiushaowei | 75 team", + "date": "", + "example": [ + "\n \n \n " + ] + }, + "JC.Panel.Model": { + "name": "JC.Panel.Model", + "shortname": "JC.Panel.Model", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Panel", + "file": "../comps/Panel/Panel.default.js", + "line": 702, + "description": "存储 Panel 的基础数据类\n
            这个类为 Panel 的私有类", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers", + "type": "Selector|string" + }, + { + "name": "_headers", + "description": "定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys", + "type": "String" + }, + { + "name": "_bodys", + "description": "定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers", + "type": "String" + }, + { + "name": "_footers", + "description": "定义模板的 footer 文字", + "type": "String" + } + ] + }, + "JC.Panel.View": { + "name": "JC.Panel.View", + "shortname": "View", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC" + }, + "JC.hideAllPanel": { + "name": "JC.hideAllPanel", + "shortname": "JC.hideAllPanel", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Panel/Panel.default.js", + "line": 1177, + "description": "隐藏或者清除所有 Panel\n

            使用这个方法应当谨慎, 容易为DOM造成垃圾Panel

            \n
            注意: 这是个方法, 写成class是为了方便生成文档", + "is_constructor": 1, + "static": 1, + "params": [ + { + "name": "_isClose", + "description": "从DOM清除/隐藏所有Panel(包刮 JC.alert, JC.confirm, JC.Panel, JC.Dialog)\n
            , true = 从DOM 清除, false = 隐藏, 默认 = false( 隐藏 )", + "type": "Bool" + } + ], + "example": [ + "\n JC.hideAllPanel(); //隐藏所有Panel\n JC.hideAllPanel( true ); //从DOM 清除所有Panel" + ] + }, + "JC.hideAllPopup": { + "name": "JC.hideAllPopup", + "shortname": "JC.hideAllPopup", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Panel/Panel.default.js", + "line": 1200, + "description": "隐藏 或 从DOM清除所有 JC.alert/JC.confirm\n
            注意, 这是个方法, 写 @class 属性是为了生成文档", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_isClose", + "description": "为真从DOM清除JC.alert/JC.confirm, 为假隐藏, 默认为false", + "type": "Bool" + } + ], + "example": [ + "\n JC.hideAllPopup(); //隐藏所有JC.alert, JC.confirm\n JC.hideAllPopup( true ); //从 DOM 清除所有 JC.alert, JC.confirm" + ] + }, + "JC.msgbox": { + "name": "JC.msgbox", + "shortname": "JC.msgbox", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Panel/Panel.popup.js", + "line": 2, + "description": "msgbox 提示 popup\n
            这个是不带蒙板 不带按钮的 popup 弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Panel

            ", + "extends": "JC.Panel", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_msg", + "description": "提示内容", + "type": "String" + }, + { + "name": "_popupSrc", + "description": "触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示", + "type": "Selector" + }, + { + "name": "_status", + "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "type": "Int" + }, + { + "name": "_cb", + "description": "弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + }, + { + "name": "_closeMs", + "description": "自动关闭的间隔, 单位毫秒, 默认 2000", + "type": "Int" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.alert": { + "name": "JC.alert", + "shortname": "JC.alert", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Panel/Panel.popup.js", + "line": 49, + "description": "alert 提示 popup\n
            这个是不带 蒙板的 popup 弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Panel

            ", + "extends": "JC.Panel", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_msg", + "description": "提示内容", + "type": "String" + }, + { + "name": "_popupSrc", + "description": "触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示", + "type": "Selector" + }, + { + "name": "_status", + "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "type": "Int" + }, + { + "name": "_cb", + "description": "点击弹框确定按钮的回调\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.confirm": { + "name": "JC.confirm", + "shortname": "JC.confirm", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Panel/Panel.popup.js", + "line": 87, + "description": "confirm 提示 popup\n
            这个是不带 蒙板的 popup 弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            JC Project Site\n| API docs\n| demo link

            \n

            see also: JC.Panel

            ", + "extends": "JC.Panel", + "static": 1, + "is_constructor": 1, + "params": [ + { + "name": "_msg", + "description": "提示内容", + "type": "String" + }, + { + "name": "_popupSrc", + "description": "触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示", + "type": "Selector" + }, + { + "name": "_status", + "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "type": "Int" + }, + { + "name": "_cb", + "description": "点击弹框确定按钮的回调\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + }, + { + "name": "_cancelCb", + "description": "点击弹框取消按钮的回调\n
            function( _evtName, _panelIns ){\n   var _btn = $(this);\n}
            ", + "type": "Function" + } + ], + "return": { + "description": "JC.Panel" + } + }, + "JC.Placeholder": { + "name": "JC.Placeholder", + "shortname": "JC.Placeholder", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Placeholder/Placeholder.js", + "line": 2, + "description": "Placeholder 占位符提示功能\n

            \n require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 Team", + "date": "2013-10-19" + }, + "JC.PopTips": { + "name": "JC.PopTips", + "shortname": "JC.PopTips", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/PopTips/PopTips.js", + "line": 2, + "description": "PopTips 带箭头的气泡提示框功能\n

            \n require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n\n

            页面只要引用本文件, 默认会自动初始化span|em|a|b为class=\"js_compPoptips\"的提示气泡

            \n

            \n\n\n

            可用的 HTML attribute

            \n\n
            \n
            htmlContent
            \n
            \n

            声明气泡提示的内容支持脚本模板
            \n 如果有设置该属性那么会优先选用htmlContent提供的内容\n

            \n
            \n\n
            ajaxContent
            \n
            \n

            声明气泡提示的ajax 模板

            \n
            \n\n
            content = string
            \n
            \n

            声明气泡提示的内容,如果需要提示html内容那么用htmlContent属性
            \n 如果没有设置则去查找title属性,如果title也没有设置,
            \n 则将触发元素的text作为提示内容。

            \n
            \n\n
            theme = yellow | blue | white | green, 查看
            \n
            \n 气泡主题,提供黄色、蓝色、白色、绿色四种样式,默认为 yellow.\n

            yellow:黄色
            \n blue:蓝色
            \n white:白色
            \n green:绿色

            \n
            \n\n
            triggerType = hover | click
            \n
            \n 触发方式: 支持hover和click\n

            默认为hover

            \n
            \n\n
            arrowPosition = left | right | top | bottom
            \n
            \n 声明箭头的方向,默认值为left\n

            left:箭头向左(提示框在触发元素的右边)如果右边空间不够,提示框自动显示在左边,如果左边空间不够,提示框显示在上方,如果上方空间,提示框显示到下方
            \n right:箭头向右(提示框在触发元素的左边)如果左边空间不够,提示框自动显示在右边,如果右边空间不够,提示框显示在上方,如果上方空间,提示框显示到下方
            \n top:箭头向上(提示框在触发元素的下边)如果下边不够,提示框自动显示到上边
            \n bottom:箭头向下(提示框在触发元素的上边)如果上边不够,提示框自动显示到下边

            \n
            \n\n
            arrowPositionOffset = left | right | top , 查看
            \n
            \n 声明箭头在提示框的位置,默认居中\n

            如果arrowPosition = left | right, arrowPositionOffset可以设置为top

            \n

            如果arrowPosition = top | bottom, arrowPositionOffset可以设置为left | right

            \n
            \n\n
            offsetXY = num,num
            \n
            \n 声明提示框相对于当前位置的偏移位置(x 坐标,y 坐标),默认值为0\n

            x < 0,往左偏移,x > 0 往右偏移
            \n y < 0, 往上偏移,y > 0 往下偏移
            \n 两个数值以逗号分隔,如果只写一个值表示 y 坐标为0。

            \n
            \n\n
            popTipsWidth = num
            \n
            \n 声明提示框的宽度,默认自适应\n
            \n\n
            popTipsHeight = num
            \n
            \n 声明提示框的高度,默认自适应\n
            \n\n
            popTipsMinWidth= num, default = auto
            \n
            \n 声明提示框的最小宽度,默认自适应\n
            \n\n
            popTipsMinHeight = num, default = auto
            \n
            \n 声明提示框的最小高度,默认自适应\n
            \n\n
            beforeShowCallback = function
            \n
            \n 气泡显示前, 触发的回调, window 变量域\n
            function beforeShowCallback( _selector ){\n   var _ins = this;\n   JC.log( 'beforeShowCallback', new Date().getTime() );\n}
            \n
            \n\n
            afterHideCallback = function
            \n
            \n 气泡隐藏后, 触发的回调, window 变量域\n
            function afterHideCallback( _selector ){\n   var _ins = this;\n   JC.log( 'afterHideCallback', new Date().getTime() );\n}
            \n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "zuojing , qiushaowei | 75 Team", + "example": [ + "\n\t2.古希腊学者亚里士多
            3.古希腊学者亚里士多
            4.古希腊学者亚里士多\" \n\t\ttheme=\"yellow\" \n\t\tarrowposition=\"left\"\n\t\ttriggerType=\"click\"\n\t\t>\n\t\t古希腊学者亚里士多德曾编
            \n\t\t\t写过全面讲述当时学问的讲义,
            \n\t\t\t被西方奉为“百科全书之父”,
            \n\t\t\t中国汉朝初年的《尔雅》,
            \n\t\t\t是中国百科全书性质著作的渊源。
            \n\t
            " + ] + }, + "JC.ServerSort": { + "name": "JC.ServerSort", + "shortname": "JC.ServerSort", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/ServerSort/ServerSort.js", + "line": 2, + "description": "数据库全表排序逻辑\n\n

            require:\n JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 [div|tr] class=\"js_compServerSort\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            cssUrl = url, default = location.href
            \n
            要翻页的URL
            \n\n
            cssSortName = string, default = sortby
            \n
            排序的字段名
            \n\n
            cssTypeName = string, default = sorttype
            \n
            排序的类型名: desc, asc
            \n\n
            cssItems = selector, default = |a[sortName]
            \n
            排序的具体字段选择器
            \n\n
            cssTypeEnum = string, default = desc,asc
            \n
            排序的种类
            \n\n
            cssClassEnum = string, default = js_cssDesc,js_cssAsc
            \n
            显示排序样式的 CSS class
            \n\n
            cssCurClassEnum= string, default = js_cssDesc_cur,js_cssAsc_cur
            \n
            显示当前排序字段样式的 CSS class
            \n\n
            cssResetUrlParams = string, default=page
            \n
            页面跳转时, 要重置的 URL 参数
            \n\n
            cssUrlFilter = function, window 变量域
            \n
            页面跳转前, 过滤 url 的回调\n
            function urlFilter( _url ){\n   _url = JC.f.addUrlParams( _url, { rnd: JC.f.ts() } );\n   return _url;\n}
            \n
            \n\n
            cssDefaultSortName = string, default = first item[sortName]
            \n
            默认排序字段
            \n\n
            cssDefaultType = string, default = desc
            \n
            默认排序类型
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "2014-08-15", + "author": "qiushaowei | 75 Team", + "example": [ + "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            序号关键词日均PV行业添加率平均出价日均点击率
            2关键词1000100020.003000
            1关键词1000100020.003000
            " + ] + }, + "JC.Slider": { + "name": "JC.Slider", + "shortname": "JC.Slider", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Slider", + "file": "../comps/Slider/Slider.js", + "line": 3, + "description": "Slider 划动菜单类\n
            页面加载完毕后, Slider 会查找那些有 class = js_autoSlider 的标签进行自动初始化\n

            require: \n jQuery\n , JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的 html attribute

            \n
            \n
            slidersubitems
            \n
            指定具体子元素是那些, selector ( 子元素默认是 layout的子标签 )
            \n\n
            sliderleft
            \n
            左移的触发selector
            \n\n
            sliderright
            \n
            右移的触发selector
            \n\n
            sliderwidth
            \n
            主容器宽度
            \n\n
            slideritemwidth
            \n
            子元素的宽度
            \n\n
            sliderhowmanyitem
            \n
            每次滚动多少个子元素, 默认1
            \n\n
            sliderdefaultpage
            \n
            默认显示第几页
            \n\n
            sliderstepms
            \n
            滚动效果运动的间隔时间(毫秒), 默认 5
            \n\n
            sliderdurationms
            \n
            滚动效果的总时间
            \n\n
            sliderdirection
            \n
            滚动的方向, 默认 horizontal, { horizontal, vertical }
            \n\n
            sliderloop
            \n
            是否循环滚动
            \n\n
            sliderinitedcb
            \n
            初始完毕后的回调函数, 便于进行更详细的声明
            \n\n
            sliderautomove
            \n
            是否自动滚动
            \n\n
            sliderautomovems
            \n
            自动滚动的间隔
            \n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 Team", + "date": "2013-07-20", + "example": [ + "\n \n \n \n \n \n \n \n \n \n \n \n
            \n 左边滚动\n \n
            dd\" sliderleft=\"a.js_slideleft\" sliderright=\"a.js_slideright\" \n sliderwidth=\"820\" slideritemwidth=\"160\"\n sliderdirection=\"horizontal\" sliderhowmanyitem=\"5\"\n sliderloop=\"false\" sliderdurationms=\"300\"\n sliderinitedcb=\"sliderinitedcb\"\n >\n
            content...
            \n
            content...
            \n
            content...
            \n
            \n
            \n 右边滚动\n
            \n" + ] + }, + "JC.Slider.Model": { + "name": "JC.Slider.Model", + "shortname": "JC.Slider.Model", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Slider", + "file": "../comps/Slider/Slider.js", + "line": 427, + "description": "Slider 的通用模型类", + "is_constructor": 1, + "params": [ + { + "name": "_layout", + "description": "", + "type": "Selector" + } + ] + }, + "JC.StepControl": { + "name": "JC.StepControl", + "shortname": "JC.StepControl", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/StepControl/StepControl.js", + "line": 2, + "description": "组件用途简述\n\n

            require:\n jQuery\n , JC.Valid\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本脚本, 默认会处理 div class=\"js_compStepControl\"

            \n\n

            可用的 HTML attribute

            \n\n
            \n
            \n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-12-13", + "author": "qiushaowei | 75 Team", + "example": [ + "\n

            JC.StepControl 示例

            " + ] + }, + "JC.Suggest": { + "name": "JC.Suggest", + "shortname": "JC.Suggest", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Suggest/Suggest.js", + "line": 4, + "description": "Suggest 关键词补全提示类\n

            require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的 HTML attribute

            \n
            \n
            sugwidth: int
            \n
            显示列表的宽度
            \n\n
            suglayout: selector
            \n
            显示列表的容器
            \n\n
            sugdatacallback: string
            \n
            \n 请求 JSONP 数据的回调名\n
            注意: 是字符串, 不是函数, 并且确保 window 下没有同名函数\n
            \n\n
            suginitedcallback: string
            \n
            \n 初始化完毕后的回调名称\n
            \n\n
            sugurl: string
            \n
            \n 数据请求 URL API\n
            例: http://sug.so.360.cn/suggest/word?callback={1}&encodein=utf-8&encodeout=utf-8&word={0} \n
            {0}=关键词, {1}=回调名称\n
            \n\n
            sugqueryinterval: int, default = 300
            \n
            \n 设置用户输入内容时, 响应的间隔, 避免不必要的请求\n
            \n\n
            sugneedscripttag: bool, default=true
            \n
            \n 是否需要 自动添加 script 标签\n
            Sugggest 设计为支持三种数据格式: JSONP, AJAX, static data\n
            目前只支持 JSONP 数据\n
            \n\n
            sugselectedcallback: function
            \n
            用户鼠标点击选择关键词后的回调
            \n\n
            sugdatafilter: function
            \n
            数据过滤回调
            \n\n
            sugsubtagname: string, default = dd
            \n
            显式定义 suggest 列表的子标签名
            \n\n
            suglayouttpl: string
            \n
            显式定义 suggest 列表显示模板
            \n\n
            sugautoposition: bool, default = false
            \n
            式声明是否要自动识别显示位置
            \n\n
            sugoffsetleft: int, default = 0
            \n
            声明显示时, x轴的偏移像素
            \n\n
            sugoffsettop: int, default = 0
            \n
            声明显示时, y轴的偏移像素
            \n\n
            sugoffsetwidth: int, default = 0
            \n
            首次初始化时, layout的偏移宽度
            \n\n
            sugplaceholder: selector
            \n
            声明自动定位时, 显示位置的占位符标签
            \n\n
            sugprevententer: bool, default = false
            \n
            回车时, 是否阻止默认事件, 为真将阻止表单提交事件
            \n\n
            sugIdSelector = selector
            \n
            \n 保存 id 的选择器( 只有关键词为 json格式的时候才会生效, { id: 'string', name: 'string' } )\n
            \n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.2", + "author": "qiushaowei | 75 Team", + "date": "2014-09-17" + }, + "JC.Tab": { + "name": "JC.Tab", + "shortname": "JC.Tab", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Tab/Tab.js", + "line": 4, + "description": "Tab 选项卡\n
            响应式初始化, 当鼠标移动到 Tab 时, Tab 会尝试自动初始化 class = \".js_autoTab\" 的 HTML 标签\n
            需要手动初始化, 请使用: var _ins = new JC.Tab( _tabSelector );\n

            require: \n JC.BaseMVC\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            Tab 容器的HTML属性

            \n
            \n
            tablabels
            \n
            声明 tab 标签的选择器语法
            \n\n
            tabcontainers
            \n
            声明 tab 容器的选择器语法
            \n\n
            tabactiveclass
            \n
            声明 tab当前标签的显示样式名, 默认为 cur
            \n\n
            tablabelparent
            \n
            声明 tab的当前显示样式是在父节点, 默认为 tab label 节点
            \n\n
            tabactivecallback
            \n
            当 tab label 被触发时的回调
            \n\n
            tabchangecallback
            \n
            当 tab label 变更时的回调
            \n\n
            tabQueryKey = url arg name
            \n
            从URL默认选中tab, value = tab index, index 从0开始
            \n\n
            tabTriggerDefault
            \n
            页面初始化完毕时,是否实例化,并初始化当前选中标签
            \n
            \n

            Label(标签) 容器的HTML属性(AJAX)

            \n
            \n
            tabAjaxUrl
            \n
            ajax 请求的 URL 地址
            \n\n
            tabajaxmethod
            \n
            ajax 请求的方法( get|post ), 默认 get
            \n\n
            tabajaxdata
            \n
            ajax 请求的 数据, json
            \n\n
            tabajaxcallback
            \n
            ajax 请求的回调
            \n\n
            tabIframeUrl
            \n
            iframe 显示的URL
            \n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "要初始化的 Tab 选择器", + "type": "Selector|string" + }, + { + "name": "_triggerTarget", + "description": "初始完毕后要触发的 label", + "type": "Selector|string" + } + ], + "version": "dev 0.1, 2013-07-04, qiushaowei | 360 75 Team", + "example": [ + "\n \n \n \n \n\n
            \n
            JC.Tab 示例 - 静态内容
            \n
            \n
            li > a\" tabcontainers=\"div.js_tabContent > div\" \n tabactiveclass=\"active\" tablabelparent=\"li\" \n tabactivecallback=\"tabactive\" tabchangecallback=\"tabchange\"\n >\n \n
            \n
            1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。
            \n
            2. 相送黄血富打万念却烟会华它表本雷烟形烟消卷效难标否标滑固小实。
            \n
            3. 理往局背剧养认被站推简沉形括於穿短,精白自没路绿往优八益是入。
            \n
            4. 鲁杆格滑那双来班五材实死听顶脱本续克修先课丝另乡型茶父报孔图。
            \n
            \n
            \n
            \n
            \n\n
            \n
            JC.Tab 示例 - 动态内容 - AJAX
            \n
            \n
            li > a\" tabcontainers=\"div.js_tabContent2 > div\" \n tabactiveclass=\"active\" tablabelparent=\"li\" \n tabactivecallback=\"tabactive\" tabchangecallback=\"tabchange\"\n >\n \n
            \n
            1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            " + ] + }, + "JC.TableFreeze": { + "name": "JC.TableFreeze", + "shortname": "JC.TableFreeze", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 6, + "description": "TableFreeze 表格固定指定列功能\n\n

            require:\n JC.BaseMVC\n

            \n\n

            JC Project Site\n | API docs\n | demo link

            \n \n

            页面只要引用本文件, 默认会自动初始化div为class=\"js_compTableFreeze\"下的表格

            \n

            目前不支持带有tfooter的表格。如果表格带有tfooter,tfooter部分的内容会被清空

            \n

            \n\n\n

            可用的 HTML attribute

            \n\n
            \n
            freezeType = string
            \n
            \n 声明表格列冻结的类型:\n

            prev:左边的列固定,其他滚动

            \n

            next:右边的列固定,其他滚动

            \n

            both:两边的列固定,其他滚动

            \n
            \n\n
            freezeCol = string
            \n
            \n 声明表格要冻结的列数:\n

            0:全部滚动,不冻结

            \n

            列表数目:全部冻结, 不滚动

            \n

            num,num:freezeType为both时,第一个数字表示前面冻结的列数
            \n 第二个数字表示后面冻结的列数。
            \n 当两个数字加起来等于列数时,表示全部冻结,不会出现有滚动的列。\n

            \n
            \n\n
            scrollWidth = num
            \n
            \n 声明表格滚动部分的宽度,默认120%\n
            \n\n
            needHoverClass = true|false
            \n
            \n 声明表格行是否需要鼠标hover高亮效果:\n

            默认值为true

            \n
            \n\n
            alternateClass = string
            \n
            \n 声明表格索引值为奇数行的背景色的className: (表格行隔行换色)\n

            如果为空则不指定隔行背景色

            \n
            \n\n
            beforeCreateTableCallback = function
            \n
            \n 表格创建前, 触发的回调, window 变量域\n
            function beforeCreateTableCallback( _selector ){\n   var _ins = this;\n   JC.log( 'beforeCreateTableCallback', new Date().getTime() );\n}
            \n
            \n\n
            afterCreateTableCallback = function
            \n
            \n 表格创建后, 触发的回调, window 变量域\n
            function afterCreateTableCallback( _selector ){\n   var _ins = this;\n   JC.log( 'afterCreateTableCallback', new Date().getTime() );\n}
            \n
            \n
            ", + "extends": "JC.BaseMVC", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector|string" + } + ], + "version": "dev 0.1 2013-11-25", + "author": "zuojing | 75 Team", + "example": [ + "\n \n
            \n
            TableFreeze example
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            \n item0\n \n item1\n \n item2\n \n item3\n \n item4\n
            \n col01\n \n 我的我的我的我的我的我的我的我的我的\n \n col02\n \n col04\n
            \n col11\n \n col14\n
            \n col21\n \n col22\n
            \n col30\n \n col31\n \n col32\n \n col33\n \n col34\n
            \n col40\n \n col42\n \n col43\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            " + ] + }, + "JC.Tips": { + "name": "JC.Tips", + "shortname": "JC.Tips", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Tips", + "file": "../comps/Tips/Tips.js", + "line": 3, + "description": "Tips 提示信息类\n
            显示标签的 title/tipsData 属性 为 Tips 样式\n

            导入该类后, 页面加载完毕后, 会自己初始化所有带 title/tipsData 属性的标签为 Tips效果的标签\n
            如果要禁用自动初始化, 请把静态属性 Tips.autoInit 置为 false

            \n

            注意: Tips 默认构造函数只处理单一标签\n
            , 如果需要处理多个标签, 请使用静态方法 Tips.init( _selector )

            \n

            require: \n jQuery\n , JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的 html attribute

            \n
            \n
            tipsinitedcallback: function
            \n
            初始完毕时的回调
            \n\n
            tipsshowcallback: function
            \n
            显示后的回调
            \n\n
            tipshidecallback: function
            \n
            隐藏后的回调
            \n\n
            tipstemplatebox: selector
            \n
            指定tips的显示模板
            \n\n
            tipsupdateonce: bool
            \n
            tips 内容只更新一次, 这个属性应当与 tipstemplatebox同时使用
            \n\n
            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "要显示 Tips 效果的标签, 这是单一标签, 需要显示多个请显示 Tips.init 方法", + "type": "Selector|string" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 team", + "date": "2013-06-23", + "example": [ + "\n \n \n " + ] + }, + "JC.Tips.Model": { + "name": "JC.Tips.Model", + "shortname": "JC.Tips.Model", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Tips", + "file": "../comps/Tips/Tips.js", + "line": 297, + "description": "Tips 数据模型类", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ] + }, + "JC.Tips.View": { + "name": "JC.Tips.View", + "shortname": "JC.Tips.View", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Tips", + "file": "../comps/Tips/Tips.js", + "line": 446, + "description": "Tips 视图类", + "is_constructor": 1, + "params": [ + { + "name": "_model", + "description": "", + "type": "JC.Tips.Model" + } + ] + }, + "JC.Tree": { + "name": "JC.Tree", + "shortname": "JC.Tree", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Tree", + "file": "../comps/Tree/Tree.js", + "line": 3, + "description": "树菜单类 JC.Tree\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "is_constructor": 1, + "params": [ + { + "name": "_selector", + "description": "树要显示的选择器", + "type": "Selector" + }, + { + "name": "_data", + "description": "树菜单的数据", + "type": "Object" + } + ], + "version": "dev 0.1", + "author": "qiushaowei | 75 Team", + "date": "2013-06-29", + "example": [ + "\n \n \n \n \n
            " + ] + }, + "JC.Tree.Model": { + "name": "JC.Tree.Model", + "shortname": "JC.Tree.Model", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC.Tree", + "file": "../comps/Tree/Tree.js", + "line": 248, + "description": "树的数据模型类", + "is_constructor": 1 + }, + "JC.Valid": { + "name": "JC.Valid", + "shortname": "JC.Valid", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "JC", + "file": "../comps/Valid/Valid.js", + "line": 6, + "description": "表单验证 (单例模式)\n
            全局访问请使用 JC.Valid 或 Valid\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            Form 的可用 html attribute

            \n
            \n
            errorabort = bool, default = true
            \n
            \n 查检Form Control时, 如果发生错误是否继续检查下一个\n
            true: 继续检查, false, 停止检查下一个\n
            \n\n
            validmsg = bool | string
            \n
            \n 内容填写正确时显示的 提示信息, class=validmsg\n
            如果 = 0, false, 将不显示提示信息\n
            如果 = 1, true, 将不显示提示文本\n
            \n\n
            validemdisplaytype = string, default = inline
            \n
            \n 设置 表单所有控件的 em CSS display 显示类型\n
            \n\n
            ignoreAutoCheckEvent = bool, default = false
            \n
            是否禁用 自动 check 事件( focus, blur, change )
            \n
            \n

            Form Control的可用 html attribute

            \n
            \n
            reqmsg = 错误提示
            \n
            值不能为空, class=error errormsg
            \n\n
            errmsg = 错误提示
            \n
            格式错误, 但不验证为空的值, class=error errormsg
            \n\n
            focusmsg = 控件获得焦点的提示信息
            \n
            \n 这个只作提示用, class=focusmsg\n
            \n\n
            validmsg = bool | string
            \n
            \n 内容填写正确时显示的 提示信息, class=validmsg\n
            如果 = 0, false, 将不显示提示信息\n
            如果 = 1, true, 将不显示提示文本\n
            \n\n
            emel = selector
            \n
            显示错误信息的selector
            \n\n
            validel = selector
            \n
            显示正确信息的selector
            \n\n
            focusel = selector
            \n
            显示提示信息的selector
            \n\n
            validemdisplaytype = string, default = inline
            \n
            \n 设置 em 的 CSS display 显示类型\n
            \n\n
            ignoreprocess = bool, default = false
            \n
            验证表单控件时, 是否忽略
            \n\n
            minlength = int(最小长度)
            \n
            验证内容的最小长度, 但不验证为空的值
            \n\n
            maxlength = int(最大长度)
            \n
            验证内容的最大长度, 但不验证为空的值
            \n\n
            minvalue = number|ISO date(最小值)
            \n
            验证内容的最小值, 但不验证为空的值
            \n\n
            maxvalue = number|ISO date(最大值)
            \n
            验证内容的最大值, 但不验证为空的值
            \n\n
            validitemcallback = function
            \n
            \n 对一个 control 作检查后的回调, 无论正确与否都会触发, window 变量域\n
            function validItemCallback( _selector, _isValid ){\n}
            \n
            \n\n
            validHidden = bool, default = false
            \n
            是否验证隐藏的控件
            \n\n
            rangeCanEqual = bool, default = true
            \n
            nrange 和 daterange 的开始值和结束值是否可以相等
            \n\n
            datatype: 常用数据类型
            \n
            n: 检查是否为正确的数字
            \n
            n-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], n-7.2 = 0.00 ~ 9999999.99
            \n
            \n nrange: 检查两个control的数值范围\n
            \n
            html attr fromNEl: 指定开始的 control
            \n
            html attr toNEl: 指定结束的 control
            \n
            如果不指定 fromNEl, toNEl, 默认是从父节点下面找到 nrange, 按顺序定为 fromNEl, toNEl
            \n
            \n
            \n
            f: 检查是否为正确的数字, default: f-9.2
            \n
            f-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], f-7.2 = 0.00 ~ 9999999.99
            \n
            d: 检查是否为正确的日期, YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD
            \n
            \n daterange: 检查两个control的日期范围\n
            \n
            html attr fromDateEl: 指定开始的 control
            \n
            html attr toDateEl: 指定结束的 control
            \n
            如果不指定 fromDateEl, toDateEl, 默认是从父节点下面找到 daterange, 按顺序定为 fromDateEl, toDateEl
            \n
            html attr datespan:, 指定开始与结束日期的时间跨度(JC.f.dateDetect)
            \n
            \n
            \n
            time: 是否为正确的时间, hh:mm:ss
            \n
            minute: 是否为正确的时间, hh:mm
            \n
            \n bankcard: 是否为正确的银行卡\n
            格式为: 9 ~ 25 位数字\n
            \n
            \n cnname: 中文姓名\n
            格式: 汉字和大小写字母\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节\n
            \n
            \n enname: 英文姓名\n
            格式: 大小写字母 + 空格\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节\n
            \n
            \n allname: cnname | enname\n
            中文姓名和英文姓名的复合验证\n
            \n
            \n username: 注册用户名\n
            格式: a-zA-Z0-9_-\n
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30\n
            \n
            idnumber: 身份证号码, 15~18 位
            \n
            mobilecode: 手机号码, 11位, (13|14|15|16|17|18|19)[\\d]{9}
            \n
            mobile: mobilecode 的别名
            \n
            mobilezonecode: 带 国家代码的手机号码, [+国家代码] [零]11位数字
            \n
            phonecode: 电话号码, 7~8 位数字, [1-9][0-9]{6,7}
            \n
            phone: 带区号的电话号码, [区号][空格|空白|-]7~8位电话号码
            \n
            phoneall: 带国家代码, 区号, 分机号的电话号码, [+国家代码][区号][空格|空白|-]7~8位电话号码#1~6位
            \n
            phonezone: 电话区号, 3~4位数字. phonezone-n,m 可指定位数长度
            \n
            phoneext: 电话分机号, 1~6位数字
            \n
            countrycode: 地区代码, [+]1~6位数字
            \n
            mobilephone: mobilecode | phone
            \n
            mobilephoneall: mobilezonecode | phoneall
            \n
            reg: 自定义正则校验, /正则规则/[igm]
            \n
            \n vcode: 验证码, 0-9a-zA-Z, 长度 默认为4\n
            可通过 vcode-[\\d], 指定验证码长度\n
            \n
            \n text: 显示声明检查的内容为文本类型\n
            默认就是 text, 没有特殊原因其实不用显示声明\n
            \n
            \n bytetext: 声明按字节检查文本长度\n
            ASCII 算一个字符, 非 ASCII 算两个字符\n
            \n
            url: URL 格式, ftp, http, https
            \n
            domain: 匹配域名, 宽松模式, 允许匹配 http(s), 且结尾允许匹配反斜扛(/)
            \n
            stricdomain: 匹配域名, 严格模式, 不允许匹配 http(s), 且结尾不允许匹配反斜扛(/)
            \n
            email: 电子邮件
            \n
            zipcode: 邮政编码, 0~6位数字
            \n
            taxcode: 纳税人识别号, 长度: 15, 18, 20
            \n\n
            \n
            \n
            checkbox: 默认需要至少选中N 个 checkbox
            \n
            \n 默认必须选中一个 checkbox\n
            如果需要选中N个, 用这种格式 checkbox-n, checkbox-3 = 必须选中三个\n
            datatarget: 声明所有 checkbox 的选择器\n
            \n
            \n
            \n\n
            \n
            \n
            file: 判断文件扩展名
            \n
            属性名(文件扩展名列表): fileext
            \n
            格式: .ext[, .ext]
            \n
            \n <input type=\"file\" \n reqmsg=\"文件\" \n errmsg=\"允许上传的文件类型: .gif, .jpg, .jpeg, .png\"\n datatype=\"file\" \n fileext=\".gif, .jpg, .jpeg, .png\" \n />\n <label>.gif, .jpg, .jpeg, .png</label>\n <em class=\"error\"></em>\n <em class=\"validmsg\"></em>\n\n
            \n
            \n
            \n\n
            qq: 检查QQ号码, 5 ~ 11位数字
            \n
            qqall: 检查QQ号码, [ qq | email ]
            \n\n
            subdatatype: 特殊数据类型, 以逗号分隔多个属性
            \n
            \n
            \n
            alternative: N 个 Control 必须至少有一个非空的值
            \n
            datatarget: 显式指定同一组 control, 默认在父级下查找[subdatatype=alternative]
            \n
            alternativedatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            alternativemsg: N 选一的错误提示
            \n\n
            \n alternativeReqTarget: 为 alternative node 指定一个不能为空的 node\n
            请使用 subdatatype = reqtarget, 这个附加属性将弃除\n
            \n
            alternativeReqmsg: alternativeReqTarget 目标 node 的html属性, 错误时显示的提示信息
            \n
            \n
            \n
            \n
            \n
            reqtarget: 如果 selector 的值非空, 那么 datatarget 的值也不能为空
            \n
            datatarget: 显式指定 目标 target
            \n
            reqTargetDatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            reqtargetmsg: target node 用于显示错误提示的 html 属性
            \n
            \n
            \n
            \n
            \n
            reconfirm: N 个 Control 的值必须保持一致
            \n
            datatarget: 显式指定同一组 control, 默认在父级下查找[subdatatype=reconfirm]
            \n
            reconfirmdatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            reconfirmmsg: 值不一致时的错误提示
            \n
            \n
            \n
            \n
            \n
            unique: N 个 Control 的值必须保持唯一性, 不能有重复
            \n
            datatarget: 显式指定同一组 control, 默认在父级下查找[subdatatype=unique]
            \n
            uniquedatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            uniquemsg: 值有重复的提示信息
            \n
            uniqueIgnoreCase: 是否忽略大小写
            \n
            uniqueIgnoreEmpty: 是否忽略空的值, 如果组中有空值也会被忽略
            \n
            processDisabled: 是否处理 disabled 但 visible 的node
            \n
            unique-n 可以指定 N 个为一组的匹配, unique-2 = 2个一组, unique-3: 三个一组
            \n
            \n
            \n
            \n
            \n
            datavalid: 判断 control 的值是否合法( 通过HTTP请求验证 )
            \n
            datavalidMsg: 值不合法时的提示信息
            \n
            \n datavalidUrl: 验证内容正确与否的 url api\n

            {\"errorno\":0,\"errmsg\":\"\"}

            \n errorno: 0( 正确 ), 非0( 错误 )\n

            datavalidurl=\"./data/handler.php?key={0}\"

            \n {0} 代表 value\n
            \n
            \n datavalidCheckCallback: 验证内容正确与否的回调(优先级比 datavalidUrl 高)\n
            window.datavalidCheckCallback =\nfunction (){\n   var _r = { 'errorno': 1, errmsg:'验证码错误' }, _sp = $( this ), _v = _sp.val().trim().toLowerCase();\n\n   if( _v && _v === window.CHECK_CODE ){\n       _r.errorno = 0;\n   }\n\n   return _r;\n};
            \n             
            \n
            datavalidNoCache: 是否禁止缓存, default = true
            \n
            datavalidAjaxType: ajax 请求类型, default = get
            \n
            datavalidRequestData: ajax 请求数据, json data
            \n
            \n datavalidCallback: 请求 datavalidUrl 后调用的回调\n
            function datavalidCallback( _json ){\n   var _selector = $(this);\n});
            \n
            \n
            \n datavalidKeyupCallback: 每次 keyup 的回调\n
            function datavalidKeyupCallback( _evt ){\n   var _selector = $(this);\n});
            \n
            \n
            \n datavalidUrlFilter: 请求数据前对 url 进行操作的回调\n
            function datavalidUrlFilter( _url ){\n   var _selector = $(this);\n   _url = JC.f.addUrlParams( _url, { 'xtest': 'customData' } );\n   return _url;\n});
            \n
            \n
            \n
            \n
            \n
            \n
            hidden: 验证隐藏域的值
            \n
            \n 有些特殊情况需要验证隐藏域的值, 请使用 subdatatype=\"hidden\"\n
            \n
            \n
            \n\n
            \n
            \n
            ucheck: 用户自定义验证
            \n
            ucheckmsg: 验证出错的提示信息
            \n
            ucheckCallback: 用于验证的函数 window变量域\n\n
            function ucheck_n( _item ){\n   var _r = false, _v = JC.f.parseFinance( _item.val() );\n\n   if( _v === 0 || ( _v >= 30 && _v >= 50 ) ){\n       _r = true;\n   }\n   return _r;\n}
            \n
            \n
            \n
            \n
            \n
            \n
            subdatatype = even: 数值必须为偶数
            \n
            \n
            \n
            \n
            \n
            subdatatype = odd: 数值必须为奇数
            \n
            \n
            \n
            exdatatype: 特殊数据类型, 以逗号分隔多个属性, 该类型只用于显示视觉效果, 不作为实际验证的判断
            \n
            \n
            \n
            datavalid: 判断 control 的值是否合法( 通过HTTP请求验证 )(只用于显示视觉效果, 不作为实际验证的判断)
            \n
            其他参数与 subdatatype = datavalid 相同
            \n
            \n
            \n
            ", + "static": 1, + "version": "0.1, 2013-05-22", + "author": "qiushaowei | 75 team" + }, + "window.jQuery.mousewheel": { + "name": "window.jQuery.mousewheel", + "shortname": "window.jQuery.mousewheel", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window.jQuery", + "file": "../plugins/jquery.mousewheel.js", + "line": 9, + "description": "jquery.mousewheel 3.1.12\n
            https://github.com/brandonaaron/jquery-mousewheel",
            +            "global": ""
            +        },
            +        "window.JSON": {
            +            "name": "window.JSON",
            +            "shortname": "window.JSON",
            +            "classitems": [],
            +            "plugins": [],
            +            "extensions": [],
            +            "plugin_for": [],
            +            "extension_for": [],
            +            "namespace": "window",
            +            "file": "../plugins/json2.js",
            +            "line": 1,
            +            "description": "json2.js \n
            JSON is a light-weight, language independent, data interchange format.\n

            source\n| docs\n

            ", + "version": "2.0" + }, + "window.Raphael": { + "name": "window.Raphael", + "shortname": "window.Raphael", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window", + "file": "../plugins/raphael.js", + "line": 1, + "description": "Raphaël 2.1.2 - JavaScript Vector Library \n

            JC Project Site\n| API docs\n| demo", + "version": "2.1.2" + }, + "window.swfobject": { + "name": "window.swfobject", + "shortname": "window.swfobject", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window", + "file": "../plugins/swfobject.js", + "line": 1, + "description": "swfobject v2.3\n
            An open source Javascript framework for detecting the Adobe Flash Player plugin and embedding Flash (swf) files.\n

            source\n| docs\n| demo link\n| html generator\n

            ", + "version": "2.3" + }, + ".Bizs": { + "name": ".Bizs", + "shortname": ".Bizs", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "", + "file": "../JC.js", + "line": 4, + "description": "

            业务逻辑命名空间

            \n
            这个命名空间的组件主要为满足业务需求, 不是通用组件~\n
            但在某个项目中应该是常用组件~\n
            \n
            业务组件的存放位置:
            \n
            libpath/bizs/
            \n\n
            使用业务组件
            \n
            JC.use( 'Bizs.BizComps' ); // libpath/bizs/BizComps/BizComps.js
            \n\n
            使用业务文件
            \n
            JC.use( 'bizs.BizFile' ); // libpath/bizs/BizFile.js
            \n
            ", + "static": 1 + }, + ".JC": { + "name": ".JC", + "shortname": ".JC", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "", + "file": "../JC.js", + "line": 26, + "description": "JC jquery 组件库 资源调用控制类\n
            这是一个单例模式, 全局访问使用 JC 或 window.JC\n

            require: \n jQuery\n , JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "static": 1, + "example": [ + " \n JC.use( 组件名[,组件名] );" + ], + "author": "qiushaowei | 75 team", + "date": "2013-08-04" + }, + "JC.f": { + "name": "JC.f", + "shortname": "JC.f", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "", + "file": "../common.js", + "line": 34, + "description": "JC.f 是 JC.common 的别名\n
            具体使用请见 JC.common

            ", + "static": 1 + }, + "JC.common": { + "name": "JC.common", + "shortname": "JC.common", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "", + "file": "../common.js", + "line": 40, + "description": "JC 组件通用静态方法和属性 ( JC.common, 别名: JC.f )\n
            所有 JC 组件都会依赖这个静态类\n

            require: jQuery

            \n

            JC Project Site\n| API docs", + "static": 1, + "version": "dev 0.1 2013-07-04", + "author": "qiushaowei | 360 75 Team" + }, + "window.jQuery": { + "name": "window.jQuery", + "shortname": "window.jQuery", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "namespace": "window", + "file": "../jquery.js", + "line": 1, + "description": "jQuery JavaScript Library v1.9.1\n

            http://jquery.com/\n\nIncludes Sizzle.js\nhttp://sizzlejs.com/\n\nCopyright 2005, 2012 jQuery Foundation, Inc. and other contributors\nReleased under the MIT license\nhttp://jquery.org/license\nDate: 2013-2-4
            ", + "global": "" + } + }, + "classitems": [ + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 160, + "description": "获取或设置 ActionLogic 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "ActionLogic instance" + }, + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 176, + "description": "判断 selector 是否可以初始化 ActionLogic", + "itemtype": "method", + "name": "isActionLogic", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "bool" + }, + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 191, + "description": "禁用按钮一定时间, 默认为1秒", + "itemtype": "method", + "name": "disableButton", + "static": 1, + "params": [ + { + "name": "_selector", + "description": "要禁用button的选择器", + "type": "Selector" + }, + { + "name": "_durationMs", + "description": "禁用多少时间, 单位毫秒, 默认1秒", + "type": "Int" + } + ], + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 208, + "description": "批量初始化 ActionLogic\n
            页面加载完毕时, 已使用 事件代理 初始化\n
            如果是弹框中的 ActionLogic, 由于事件冒泡被阻止了, 需要显示调用 init 方法", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 228, + "description": "初始化 ActionLogic, 并执行", + "itemtype": "method", + "name": "process", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "", + "type": "Instance|null" + }, + "static": 1, + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 256, + "description": "脚本模板 Panel", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 262, + "description": "显示 Panel", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 277, + "description": "ajax Panel", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 307, + "description": "跳转到 URL", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 316, + "description": "ajax 执行操作", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 423, + "description": "处理错误提示", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 455, + "description": "处理二次确认", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 479, + "description": "处理成功提示", + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ActionLogic/ActionLogic.js", + "line": 516, + "description": "执行操作", + "itemtype": "method", + "name": "process", + "return": { + "description": "", + "type": "ActionLogicInstance" + }, + "class": "window.Bizs.ActionLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/AutoSelectComplete/AutoSelectComplete.js", + "line": 55, + "description": "获取或设置 AutoSelectComplete 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "AutoSelectCompleteInstance" + }, + "class": "window.Bizs.AutoSelectComplete", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/AutoSelectComplete/AutoSelectComplete.js", + "line": 71, + "description": "初始化可识别的 AutoSelectComplete 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of AutoSelectCompleteInstance" + }, + "class": "window.Bizs.AutoSelectComplete", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/AutoSelectComplete/AutoSelectComplete.js", + "line": 214, + "description": "selectallchanged", + "class": "window.Bizs.AutoSelectComplete", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ChangeLogic/ChangeLogic.js", + "line": 204, + "description": "获取 显示 ChangeLogic 的触发源选择器, 比如 a 标签", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "window.Bizs.ChangeLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ChangeLogic/ChangeLogic.js", + "line": 210, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "ChangeLogicInstance" + }, + "class": "window.Bizs.ChangeLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ChangeLogic/ChangeLogic.js", + "line": 218, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "ChangeLogicInstance" + }, + "class": "window.Bizs.ChangeLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ChangeLogic/ChangeLogic.js", + "line": 226, + "description": "获取或设置 ChangeLogic 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "ChangeLogic instance" + }, + "class": "window.Bizs.ChangeLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/ChangeLogic/ChangeLogic.js", + "line": 246, + "description": "初始化 _selector | document 可识别的 ChangeLogic HTML属性", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector,", + "description": "default = document", + "type": "Selector" + } + ], + "static": 1, + "class": "window.Bizs.ChangeLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/CommonModify/CommonModify.js", + "line": 206, + "description": "获取 显示 CommonModify 的触发源选择器, 比如 a 标签", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "window.Bizs.CommonModify", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/CommonModify/CommonModify.js", + "line": 212, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "CommonModifyInstance" + }, + "class": "window.Bizs.CommonModify", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/CommonModify/CommonModify.js", + "line": 220, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "CommonModifyInstance" + }, + "class": "window.Bizs.CommonModify", + "namespace": "window.Bizs" + }, + { "file": "../bizs/CommonModify/CommonModify.js", + "line": 231, + "description": "update current selector", + "class": "window.Bizs.CommonModify", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/CommonModify/CommonModify.js", + "line": 243, + "description": "获取或设置 CommonModify 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "CommonModify instance" + }, + "class": "window.Bizs.CommonModify", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/CommonModify/CommonModify.js", + "line": 257, + "description": "判断 selector 是否可以初始化 CommonModify", + "itemtype": "method", + "name": "isCommonModify", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "bool" + }, + "class": "window.Bizs.CommonModify", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/CustomColumn/CustomColumn.js", + "line": 89, + "description": "初始化可识别的 CustomColumn 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of CustomColumnInstance" + }, + "class": "window.Bizs.CustomColumn", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DMultiDate/DMultiDate.js", + "line": 101, + "description": "更新日历的类型day/week/season/year\n日历输入框,及隐藏域的值清空\n打开第一个日历输入框的日历面板", + "class": "window.Bizs.DMultiDate", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DMultiDate/DMultiDate.js", + "line": 528, + "description": "获取或设置 DMultiDate 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "DMultiDateInstance" + }, + "class": "window.Bizs.DMultiDate", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DMultiDate/DMultiDate.js", + "line": 544, + "description": "判断 selector 是否可以初始化 DMultiDate", + "itemtype": "method", + "name": "isDMultiDate", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "bool" + }, + "class": "window.Bizs.DMultiDate", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DisableLogic/DisableLogic.js", + "line": 168, + "description": "获取 显示 DisableLogic 的触发源选择器, 比如 a 标签", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "window.Bizs.DisableLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DisableLogic/DisableLogic.js", + "line": 174, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "DisableLogicInstance" + }, + "class": "window.Bizs.DisableLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DisableLogic/DisableLogic.js", + "line": 182, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "DisableLogicInstance" + }, + "class": "window.Bizs.DisableLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DisableLogic/DisableLogic.js", + "line": 190, + "description": "获取或设置 DisableLogic 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "DisableLogic instance" + }, + "class": "window.Bizs.DisableLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DisableLogic/DisableLogic.js", + "line": 210, + "description": "初始化 _selector | document 可识别的 DisableLogic HTML属性", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector,", + "description": "default = document", + "type": "Selector" + } + ], + "static": 1, + "class": "window.Bizs.DisableLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 83, + "description": "初始化可识别的 DropdownTree 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of DropdownTreeInstance" + }, + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 170, + "description": "显示 树弹框", + "itemtype": "method", + "name": "show", + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 175, + "description": "隐藏 树弹框", + "itemtype": "method", + "name": "hide", + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 180, + "description": "显式/隐藏 树弹框", + "itemtype": "method", + "name": "toggle", + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 185, + "description": "更新树菜单数据", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_data", + "description": "", + "type": "Json" + }, + { + "name": "_selectedId", + "description": "", + "type": "String" + } + ], + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 201, + "description": "清除选择数据", + "itemtype": "method", + "name": "clear", + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 221, + "description": "获取选中的 label", + "itemtype": "method", + "name": "label", + "return": { + "description": "string" + }, + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 227, + "description": "获取或设置 选中的 id", + "itemtype": "method", + "name": "val", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "String of id" + }, + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/DropdownTree/DropdownTree.js", + "line": 352, + "description": "选择树节点时触发的事件", + "itemtype": "event", + "name": "DropdownTreeSelected", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Object" + }, + { + "name": "_id", + "description": "", + "type": "String" + }, + { + "name": "_name", + "description": "", + "type": "String" + }, + { + "name": "_triggerSelector", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n $( 'div.js_bizDropdownTree' ).each( function(){\n var _ins = JC.BaseMVC.getInstance( $(this), Bizs.DropdownTree );\n _ins \n && _ins.on( 'DropdownTreeSelected', function( _evt, _id, _name, _triggerSelector ){\n JC.log( [ _evt, _id, _name ] );\n });\n });" + ], + "class": "window.Bizs.DropdownTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 331, + "description": "获取或设置 FormLogic 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "FormLogic instance" + }, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 349, + "description": "处理 form 或者 _selector 的所有form.js_bizsFormLogic", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "Array of FormLogicInstance", + "type": "Array" + }, + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 370, + "description": "msgbox 提示框的自动关闭时间", + "itemtype": "property", + "name": "popupCloseMs", + "type": "int", + "default": "2000", + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 378, + "description": "AJAX 表单的提交类型\n
            plugins, form\n
            plugins 可以支持文件上传", + "itemtype": "property", + "name": "popupCloseMs", + "type": "string", + "default": "empty", + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 388, + "description": "表单提交后, 是否禁用提交按钮", + "itemtype": "property", + "name": "submitDisable", + "type": "bool", + "default": "true", + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 396, + "description": "表单提交后, 是否重置表单内容", + "itemtype": "property", + "name": "resetAfterSubmit", + "type": "bool", + "default": "true", + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 404, + "description": "表单提交时, 内容填写不完整时触发的全局回调", + "itemtype": "property", + "name": "processErrorCb", + "type": "function", + "default": "null", + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 412, + "description": "全局返回数据处理回调\n
            所有换回结果都会调用\n
            arg: _data[string of result]", + "itemtype": "property", + "name": "GLOBAL_AJAX_CHECK", + "type": "function", + "default": "null", + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 423, + "description": "全局数据解析函数\n
            所有换回结果都会调用\n
            arg: _data[string of result]", + "itemtype": "property", + "name": "DATA_PARSE", + "type": "function", + "default": "null", + "return": { + "description": "Object" + }, + "static": 1, + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 453, + "description": "默认 form 提交处理事件\n这个如果是 AJAX 的话, 无法上传 文件", + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 551, + "description": "全局 AJAX 提交完成后的处理事件", + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 560, + "description": "这是个神奇的BUG\nchrome 如果没有 reset button, 触发 reset 会导致页面刷新", + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 610, + "description": "表单内容验证通过后, 开始提交前的处理事件", + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/FormLogic/FormLogic.js", + "line": 938, + "description": "这个回调的 this 指针是 window", + "class": "window.Bizs.FormLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/InputSelect/InputSelect.js", + "line": 67, + "description": "初始化可识别的 InputSelect 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of InputSelectInstance" + }, + "class": "window.Bizs.InputSelect", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 54, + "description": "处理 _selector 的所有 child", + "itemtype": "method", + "name": "process", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_ignoreSameLinkText", + "description": "", + "type": "Bool" + } + ], + "return": { + "description": "", + "type": "KillISPCacheInstance" + }, + "class": "window.Bizs.KillISPCache", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 81, + "description": "获取 KillISPCache 实例 ( 单例模式 )", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "KillISPCacheInstance" + }, + "class": "window.Bizs.KillISPCache", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 93, + "description": "是否忽略 url 跟 文本 相同的节点", + "itemtype": "property", + "name": "ignoreSameLinkText", + "type": "bool", + "default": "true", + "static": 1, + "class": "window.Bizs.KillISPCache", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 101, + "description": "自定义随机数的参数名", + "itemtype": "property", + "name": "randName", + "type": "string", + "default": "empty", + "static": 1, + "class": "window.Bizs.KillISPCache", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 109, + "description": "添加忽略随机数的 ULR", + "itemtype": "method", + "name": "ignoreUrl", + "params": [ + { + "name": "_url!~YUIDOC_LINE~!return", + "description": "Array", + "type": "String|Array" + } + ], + "static": 1, + "class": "window.Bizs.KillISPCache", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/KillISPCache/KillISPCache.js", + "line": 120, + "description": "添加忽略随机数的 选择器", + "itemtype": "method", + "name": "ignoreSelector", + "params": [ + { + "name": "_selector!~YUIDOC_LINE~!return", + "description": "Array", + "type": "Selector|Array" + } + ], + "static": 1, + "class": "window.Bizs.KillISPCache", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MoneyTips/MoneyTips.js", + "line": 66, + "description": "获取或设置 MoneyTips 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "MoneyTipsInstance" + }, + "class": "window.Bizs.MoneyTips", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MoneyTips/MoneyTips.js", + "line": 82, + "description": "初始化可识别的 MoneyTips 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of MoneyTipsInstance" + }, + "class": "window.Bizs.MoneyTips", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MoneyTips/MoneyTips.js", + "line": 105, + "description": "格式化 node 的 value/html", + "itemtype": "method", + "name": "format", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_outputSelector", + "description": "指定显示格式化内容的 node, 默认为 selector 本身\n
            , 还可以通过 html 属性 bmtFormatOutput 指定单独的 _outputSelector", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "_selector" + }, + "class": "window.Bizs.MoneyTips", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MoneyTips/MoneyTips.js", + "line": 211, + "description": "更新 tips 的值", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_val", + "description": "", + "type": "Int|string" + } + ], + "class": "window.Bizs.MoneyTips", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiAutoComplete/MultiAutoComplete.js", + "line": 182, + "description": "初始化可识别的 MultiAutoComplete 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of MultiAutoCompleteInstance" + }, + "class": "window.Bizs.MultiAutoComplete", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiChangeLogic/MultiChangeLogic.js", + "line": 33, + "description": "初始化可识别的 MultiChangeLogic 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of MultiChangeLogicInstance" + }, + "class": "window.Bizs.MultiChangeLogic", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiDate/MultiDate.js", + "line": 154, + "description": "获取或设置 MultiDate 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "MultiDateInstance" + }, + "class": "window.Bizs.MultiDate", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiDate/MultiDate.js", + "line": 170, + "description": "判断 selector 是否可以初始化 MultiDate", + "itemtype": "method", + "name": "isMultiDate", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "bool" + }, + "class": "window.Bizs.MultiDate", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiSelect/MultiSelect.js", + "line": 124, + "description": "初始化可识别的 MultiSelect 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of MultiSelectInstance" + }, + "class": "window.Bizs.MultiSelect", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiSelect/MultiSelect.js", + "line": 148, + "description": "定义全局数据过滤函数", + "itemtype": "method", + "name": "dataFilter", + "params": [ + { + "name": "_json", + "description": "", + "type": "Json" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Json" + }, + "class": "window.Bizs.MultiSelect", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiSelectTree/MultiSelectTree.js", + "line": 33, + "description": "explain~", + "itemtype": "method", + "name": "expandChild", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "class": "window.Bizs.MultiSelectTree", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 122, + "description": "初始化可识别的 MultiUpload 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of MultiUploadInstance" + }, + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 213, + "description": "更新按钮的状态", + "itemtype": "method", + "name": "updateStatus", + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 394, + "description": "Bizs.MultiUpload 初始化后触发的事件", + "itemtype": "event", + "name": "inited", + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 398, + "description": "ajax 上传完毕后触发的事件", + "itemtype": "event", + "name": "AjaxDone", + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 402, + "description": "添加上传内容后触发的事件", + "itemtype": "event", + "name": "ItemAdded", + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 406, + "description": "删除上传内容后触发的事件", + "itemtype": "event", + "name": "ItemDeleted", + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiUpload/MultiUpload.js", + "line": 410, + "description": "修正按钮状态的事件", + "itemtype": "event", + "name": "CheckItemLimit", + "class": "window.Bizs.MultiUpload", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/MultiselectPanel/MultiselectPanel.js", + "line": 99, + "description": "初始化可识别的 MultiselectPanel 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of MultiselectPanelInstance" + }, + "class": "window.Bizs.MultiselectPanel", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/TaskViewer/TaskViewer.js", + "line": 52, + "description": "获取或设置 TaskViewer 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "TaskViewerInstance" + }, + "class": "window.Bizs.TaskViewer", + "namespace": "window.Bizs" + }, + { + "file": "../bizs/TaskViewer/TaskViewer.js", + "line": 68, + "description": "初始化可识别的 TaskViewer 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of TaskViewerInstance" + }, + "class": "window.Bizs.TaskViewer", + "namespace": "window.Bizs" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 119, + "description": "初始化可识别的 AjaxTree 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of AjaxTreeInstance" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 144, + "description": "树的数据过滤函数\n
            如果树的初始数据格式不符合要求, 可通过该属性定义函数进行数据修正", + "itemtype": "property", + "name": "dataFilter", + "type": "function", + "default": "undefined", + "static": 1, + "example": [ + "\n JC.AjaxTree.dataFilter =\n function( _data ){\n var _r = {};\n\n if( _data ){\n if( _data.root.length > 2 ){\n _data.root.shift();\n _r.root = _data.root;\n }\n _r.data = {};\n for( var k in _data.data ){\n _r.data[ k ] = [];\n for( var i = 0, j = _data.data[k].length; i < j; i++ ){\n if( _data.data[k][i].length < 3 ) continue;\n _data.data[k][i].shift();\n _r.data[k].push( _data.data[k][i] );\n }\n }\n }\n return _r;\n };" + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 264, + "description": "展开树到某个具体节点, 或者展开树的所有节点", + "itemtype": "method", + "name": "open", + "params": [ + { + "name": "_nodeId", + "description": "如果_nodeId='undefined', 将会展开树的所有节点\n
            _nodeId 不为空, 将展开树到 _nodeId 所在的节点", + "type": "String|int" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 283, + "description": "展开树到某个具体节点, 或者展开树的所有节点", + "itemtype": "method", + "name": "openUI", + "params": [ + { + "name": "_nodeId", + "description": "如果_nodeId='undefined', 将会展开树的所有节点\n
            _nodeId 不为空, 将展开树到 _nodeId 所在的节点", + "type": "String|int" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 299, + "description": "关闭某个节点, 或者关闭整个树", + "itemtype": "method", + "name": "close", + "params": [ + { + "name": "_nodeId", + "description": "如果_nodeId='undefined', 将会关闭树的所有节点\n
            _nodeId 不为空, 将关闭树 _nodeId 所在的节点", + "type": "String|int" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 315, + "description": "新增节点方法", + "itemtype": "method", + "name": "add", + "params": [ + { + "name": "_parentId", + "description": "父节点ID", + "type": "String" + }, + { + "name": "_data", + "description": "新增的数据对象( 对象会通过ajax请求传递,ajax的url读取dom属性“data-addUrl” )", + "type": "Object" + }, + { + "name": "_needFresh", + "description": "是否刷新父节点", + "type": "Boolean" + }, + { + "name": "_cb", + "description": "添加请求完毕后的回调函数,请求结果为第一个参数", + "type": "Function" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 350, + "description": "刷新某个节点", + "itemtype": "method", + "name": "refreshNode", + "params": [ + { + "name": "_nodeId", + "description": "节点ID", + "type": "String" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 360, + "description": "获取树的 ID 前缀\n
            每个树都会有自己的随机ID前缀", + "itemtype": "method", + "name": "idPrefix", + "return": { + "description": "树的ID前缀", + "type": "String" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 367, + "description": "获取树的节点 label", + "itemtype": "method", + "name": "getItem", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String|int" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 378, + "description": "获取或设置树的高亮节点", + "itemtype": "method", + "name": "selectedItem", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 402, + "description": "展现树需要的数据", + "type": "object", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 407, + "description": "树的随机ID前缀", + "type": "string", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 412, + "description": "树当前的高亮节点", + "type": "selector", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 417, + "description": "保存树的所有绑定事件", + "type": "object", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 457, + "description": "获取树所要展示的容器", + "return": { + "description": "selector" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 462, + "description": "获取节点将要显示的ID", + "params": [ + { + "name": "_id", + "description": "节点的原始ID", + "type": "String" + } + ], + "return": { + "description": "string 节点的最终ID" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 468, + "description": "获取树的随机ID前缀", + "return": { + "description": "string" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 473, + "description": "获取树的原始数据", + "return": { + "description": "object" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 485, + "description": "获取树生成后的根节点", + "return": { + "description": "selector" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 490, + "description": "获取ID的具体节点", + "params": [ + { + "name": "_id", + "description": "", + "type": "String" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 500, + "description": "判断原始数据的某个ID是否有子级节点", + "params": [ + { + "name": "_id", + "description": "", + "type": "String" + } + ], + "return": { + "description": "bool" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 506, + "description": "获取或设置树的高亮节点\n
            注意: 这个只是数据层面的设置, 不会影响视觉效果", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 572, + "description": "初始化树的可视状态", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 580, + "description": "处理树的展现效果", + "params": [ + { + "name": "_data", + "description": "节点数据", + "type": "Array" + }, + { + "name": "_parentNode", + "description": "", + "type": "Selector" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 601, + "description": "初始化树根节点", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 644, + "description": "初始化树的文件夹节点", + "params": [ + { + "name": "_parentNode", + "description": "", + "type": "Selector" + }, + { + "name": "_data", + "description": "", + "type": "Object" + }, + { + "name": "_isLast", + "description": "", + "type": "Bool" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 674, + "description": "初始化树的文件节点", + "params": [ + { + "name": "_parentNode", + "description": "", + "type": "Selector" + }, + { + "name": "_data", + "description": "", + "type": "Object" + }, + { + "name": "_isLast", + "description": "", + "type": "Bool" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 693, + "description": "初始化树的节点标签", + "params": [ + { + "name": "_data", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 711, + "description": "展开树的所有节点", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 721, + "description": "关闭树的所有节点", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 732, + "description": "展开树到具体节点", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 767, + "description": "关闭树的具体节点", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 862, + "description": "更新树的具体节点", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String" + } + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 890, + "description": "树节点的点击事件", + "itemtype": "event", + "name": "click", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "example": [ + "\n $( document ).delegate( 'div.js_compAjaxTree', 'click', function( _evt, _item, _data, _box ){\n JC.dir( _item[0], _data, _box[0] );\n });" + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 899, + "description": "树节点的change事件", + "itemtype": "event", + "name": "change", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "example": [ + "\n $( document ).delegate( 'div.js_compAjaxTree', 'change', function( _evt, _item, _data, _box ){\n JC.dir( _item[0], _data, _box[0] );\n });" + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 909, + "description": "树节点的展现事件", + "itemtype": "event", + "name": "RenderLabel", + "params": [ + { + "name": "_data", + "description": "", + "type": "Array" + }, + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n _tree.on('RenderLabel', function( _data ){\n var _node = $(this);\n _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) );\n });" + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 921, + "description": "树文件夹的点击事件", + "itemtype": "event", + "name": "FolderClick", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "example": [ + "\n _tree.on('FolderClick', function( _evt ){\n var _p = $(this);\n alert( 'folder click' );\n });" + ], + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxTree/AjaxTree.js", + "line": 931, + "description": "树的最后的 hover 节点\n
            树的 hover 是全局属性, 页面上的所有树只会有一个当前 hover", + "itemtype": "property", + "name": "lastHover", + "type": "selector", + "default": "null", + "class": "JC.AjaxTree", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 173, + "description": "获取或设置 AjaxUpload 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "", + "type": "AjaxUploadInstance" + }, + "static": 1, + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 189, + "description": "初始化可识别的组件", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "instance array", + "type": "Array" + }, + "static": 1, + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 209, + "description": "frame 文件名", + "itemtype": "property", + "name": "frameFileName", + "type": "string", + "default": "\"default.html\"", + "static": 1, + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 217, + "description": "载入 frame 文件时, 是否添加随机数防止缓存", + "itemtype": "property", + "name": "randomFrame", + "type": "bool", + "default": "false", + "static": 1, + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 225, + "description": "frame 文件夹位于库的位置", + "itemtype": "property", + "name": "_FRAME_DIR", + "type": "string", + "default": "\"comps/AjaxUpload/frame/\"", + "static": 1, + "access": "private", + "tagname": "", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 235, + "description": "初始化 frame 时递增的统计变量", + "itemtype": "property", + "name": "_INS_COUNT", + "type": "int", + "default": "1", + "access": "protected", + "tagname": "", + "static": 1, + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 262, + "description": "iframe 加载完毕后触发的事件, 执行初始化操作", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 284, + "description": "文件大小错误", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 291, + "description": "文件扩展名错误", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 298, + "description": "上传前触发的事件", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 311, + "description": "上传完毕触发的事件", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 351, + "description": "frame 的按钮样式改变后触发的事件\n需要更新 frame 的宽高", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 396, + "description": "手动更新数据", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_d", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "AjaxUploadInstance" + }, + "example": [ + "\n JC.AjaxUpload.getInstance( _selector ).update( {\n \"errorno\": 0, \n \"data\":\n {\n \"url\": \"/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg\", \n \"name\": \"test.jpg\"\n }, \n \"errmsg\": \"\"\n });" + ], + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 412, + "description": "禁用上传按钮", + "itemtype": "method", + "name": "disable", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 417, + "description": "启用上传按钮", + "itemtype": "method", + "name": "enable", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AjaxUpload/AjaxUpload.js", + "line": 612, + "description": "恢复默认状态", + "class": "JC.AjaxUpload", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 104, + "description": "初始化 _selector 的所有 input[checktype][checkfor]", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 175, + "description": "更新 全选状态", + "itemtype": "method", + "name": "update", + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 184, + "description": "获取 显示 AutoChecked 的触发源选择器, 比如 a 标签", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 190, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "AutoCheckedInstance" + }, + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 198, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "AutoCheckedInstance" + }, + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 206, + "description": "获取或设置 AutoChecked 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "AutoChecked instance" + }, + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoChecked/AutoChecked.js", + "line": 222, + "description": "判断 selector 是否可以初始化 AutoChecked", + "itemtype": "method", + "name": "isAutoChecked", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "bool" + }, + "class": "JC.AutoChecked", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 158, + "description": "获取或设置 AutoComplete 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "AutoCompleteInstance" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 174, + "description": "初始化可识别的 AutoComplete 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of AutoCompleteInstance" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 197, + "description": "更新原始数据", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_data", + "description": "", + "type": "Json" + } + ], + "static": 1, + "return": { + "description": "", + "type": "AutoCompleteInstance" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 212, + "description": "使用 ajax 接口更新原始数据", + "itemtype": "method", + "name": "ajaxUpdate", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_url", + "description": "", + "type": "Url string" + }, + { + "name": "_cb", + "description": "", + "type": "Callback" + } + ], + "static": 1, + "return": { + "description": "", + "type": "AutoCompleteInstance" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 228, + "description": "定义全局数据过滤函数", + "itemtype": "method", + "name": "dataFilter", + "params": [ + { + "name": "_json", + "description": "", + "type": "Json" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Json" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 236, + "description": "是否将 HTML实体 转为 html", + "itemtype": "property", + "name": "fixHtmlEntity", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 244, + "description": "AJAX 获取数据式,是否缓存 AJAX 数据", + "itemtype": "property", + "name": "AJAX_NO_CACHE", + "type": "bool", + "default": "false", + "static": 1, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 331, + "description": "点击列表时, 阻止冒泡", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 417, + "description": "响应 li 点击时, 更新对应的内容", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 558, + "description": "获取 绑定的 id node", + "itemtype": "method", + "name": "idSelector", + "return": { + "description": "", + "type": "Selector" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 564, + "description": "获取/设置 id 值", + "itemtype": "method", + "name": "idVal", + "params": [ + { + "name": "_id", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Id string" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 575, + "description": "使用 ajax 接口更新原始数据", + "itemtype": "method", + "name": "ajaxUpdate", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Callback" + } + ], + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 586, + "description": "显示数据列表", + "itemtype": "method", + "name": "show", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 599, + "description": "隐藏数据列表", + "itemtype": "method", + "name": "hide", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 608, + "description": "获取数据列表 node", + "itemtype": "method", + "name": "popup", + "return": { + "description": "", + "type": "Selector" + }, + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 617, + "description": "更新原始数据", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_json", + "description": "", + "type": "Json" + } + ], + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 636, + "description": "清除 selector 和 idSelector 的默认值", + "itemtype": "method", + "name": "clear", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 645, + "description": "清除所有数据", + "itemtype": "method", + "name": "clearAll", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 656, + "description": "校正数据列表的显示位置", + "itemtype": "method", + "name": "fixPosition", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoComplete/AutoComplete.js", + "line": 774, + "description": "验证 key && id 是否正确\n仅在 cacStrictData 为真的时候进行验证", + "class": "JC.AutoComplete", + "namespace": "JC" + }, + { + "file": "../comps/AutoFixed/AutoFixed.js", + "line": 77, + "description": "初始化可识别的 AutoFixed 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of AutoFixedInstance" + }, + "class": "JC.AutoFixed", + "namespace": "JC" + }, + { + "file": "../comps/AutoFixed/AutoFixed.js", + "line": 100, + "description": "初始化时是否添加延时", + "itemtype": "property", + "name": "INIT_DELAY", + "default": "0", + "type": "int", + "static": 1, + "class": "JC.AutoFixed", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 160, + "description": "判断 selector 是否为符合自动初始化联动框的要求", + "itemtype": "method", + "name": "isSelect", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "bool" + }, + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 177, + "description": "是否自动隐藏空值的级联下拉框, 起始下拉框不会被隐藏\n
            这个是全局设置, 如果需要对具体某个select进行处理, 对应的 HTML 属性 selecthideempty", + "itemtype": "property", + "name": "hideEmpty", + "type": "bool", + "default": "false", + "static": 1, + "example": [ + "\n AutoSelect.hideEmpty = true;" + ], + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 188, + "description": "级联下拉框的数据过滤函数\n
            默认数据格式: [ [id, name], [id, name] ... ]\n
            如果获取到的数据格式非默认格式, 可通过本函数进行数据过滤\n

            \n 注意, 这个是全局过滤, 如果要使用该函数进行数据过滤, 判断逻辑需要比较具体\n
            如果要对具体 select 进行数据过滤, 可以使用HTML属性 selectdatafilter 指定过滤函数\n

            ", + "itemtype": "property", + "name": "dataFilter", + "type": "function", + "default": "null", + "static": 1, + "example": [ + "\n AutoSelect.dataFilter = \n function( _data, _select ){\n var _r = _data;\n if( _data && !_data.length && _data.data ){\n _r = _data.data;\n }\n return _r;\n };" + ], + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 211, + "description": "下拉框初始化功能都是未初始化 数据之前的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectbeforeInited", + "itemtype": "property", + "name": "beforeInited", + "type": "function", + "default": "null", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 220, + "description": "下拉框第一次初始完所有数据的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectinited", + "itemtype": "property", + "name": "inited", + "type": "function", + "default": "null", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 229, + "description": "下拉框每个项数据变更后的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectchange", + "itemtype": "property", + "name": "change", + "type": "function", + "default": "null", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 238, + "description": "下拉框所有项数据变更后的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectallchanged", + "itemtype": "property", + "name": "allChanged", + "type": "function", + "default": "null", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 247, + "description": "第一次初始化所有联动框时, 是否触发 change 事件\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selecttriggerinitchange", + "itemtype": "property", + "name": "triggerInitChange", + "type": "bool", + "default": "false", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 256, + "description": "ajax 请求数据时, 是否添加随机参数防止缓存\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectrandomurl", + "itemtype": "property", + "name": "randomurl", + "type": "bool", + "default": "false", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 265, + "description": "处理 ajax url 的回调处理函数\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectprocessurl", + "itemtype": "property", + "name": "processUrl", + "type": "function", + "default": "null", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 274, + "description": "首次初始化时, 是否需要请求新数据\n
            有时 联动框太多, 载入页面时, 后端直接把初始数据输出, 避免请求过多", + "itemtype": "property", + "name": "ignoreInitRequest", + "type": "bool", + "default": "false", + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 283, + "description": "获取或设置 selector 的实例引用", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_ins", + "description": "", + "type": "AutoSelectControlerInstance" + } + ], + "return": { + "description": "AutoSelectControlerInstance" + }, + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 300, + "description": "清除 select 的 所有 option, 带有属性 defaultoption 例外", + "itemtype": "method", + "name": "removeItems", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "deleted items number", + "type": "Int" + }, + "static": 1, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 381, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "AutoSelectInstance" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 389, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "AutoSelectInstance" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 396, + "description": "获取第一个 select", + "itemtype": "method", + "name": "first", + "return": { + "description": "selector" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 402, + "description": "获取最后一个 select", + "itemtype": "method", + "name": "last", + "return": { + "description": "selector" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 408, + "description": "获取所有 select", + "itemtype": "method", + "name": "items", + "return": { + "description": "selector" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 414, + "description": "是否为第一个 select", + "itemtype": "method", + "name": "isFirst", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 421, + "description": "是否为最后一个 select", + "itemtype": "method", + "name": "isLast", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 428, + "description": "是否已经初始化过", + "itemtype": "method", + "name": "isInited", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 435, + "description": "获取 select 的数据", + "itemtype": "method", + "name": "data", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "JSON" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 442, + "description": "更新默认选中列表", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_ls", + "description": "ids for selected, (string with \",\" or array of ids );", + "type": "Array|string" + } + ], + "return": { + "description": "AutoSelectInstance" + }, + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 892, + "description": "判断下拉框的option里是否有给定的值", + "params": [ + { + "name": "_select", + "description": "", + "type": "Selector" + }, + { + "name": "_val", + "description": "要查找的值", + "type": "String" + } + ], + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 978, + "description": "初始化之事的事件", + "itemtype": "event", + "name": "SelectBeforeInited", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 982, + "description": "初始化后的事件", + "itemtype": "event", + "name": "SelectInited", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 986, + "description": "响应每个 select 的 change 事件", + "itemtype": "event", + "name": "SelectChange", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 990, + "description": "最后一个 select change 后的事件", + "itemtype": "event", + "name": "SelectAllChanged", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 994, + "description": "select 更新数据之前触发的事件", + "itemtype": "event", + "name": "SelectItemBeforeUpdate", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 998, + "description": "select 更新数据之后触发的事件", + "itemtype": "event", + "name": "SelectItemUpdated", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/AutoSelect/AutoSelect.js", + "line": 1002, + "description": "页面加载完毕时, 延时进行自动化, 延时可以避免来自其他逻辑的干扰", + "class": "JC.AutoSelect", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 31, + "description": "内部初始化方法", + "itemtype": "method", + "name": "_init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "access": "private", + "tagname": "", + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 60, + "description": "初始化之前调用的方法", + "itemtype": "method", + "name": "_beforeInit", + "access": "private", + "tagname": "", + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 68, + "description": "内部事件初始化方法", + "itemtype": "method", + "name": "_initHanlderEvent", + "access": "private", + "tagname": "", + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 76, + "description": "内部初始化完毕时, 调用的方法", + "itemtype": "method", + "name": "_inited", + "access": "private", + "tagname": "", + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 84, + "description": "获取 显示 BaseMVC 的触发源选择器, 比如 a 标签", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 90, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "BaseMVCInstance" + }, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 98, + "description": "使用 jquery trigger 触发绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "return": { + "description": "BaseMVCInstance" + }, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 106, + "description": "使用 jquery triggerHandler 触发绑定事件", + "itemtype": "method", + "name": "triggerHandler", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "return": { + "description": "", + "type": "*" + }, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 114, + "description": "通知选择器有新事件\n
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件", + "itemtype": "method", + "name": "notification", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 125, + "description": "通知选择器有新事件, 有返回结果\n
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件", + "itemtype": "method", + "name": "notificationHandler", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "return": { + "description": "", + "type": "*" + }, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 139, + "description": "获取或设置组件实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_staticClass", + "description": "", + "type": "Class" + }, + { + "name": "_classInstance", + "description": "", + "type": "ClassInstance" + } + ], + "static": 1, + "return": { + "description": "", + "type": "ClassInstance | null" + }, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 166, + "description": "是否自动初始化", + "itemtype": "property", + "name": "autoInit", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 174, + "description": "复制 BaseMVC 的所有方法到 _outClass", + "itemtype": "method", + "name": "build", + "params": [ + { + "name": "_outClass", + "description": "", + "type": "Class" + } + ], + "static": 1, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 192, + "description": "复制 _inClass 的所有方法到 _outClass", + "itemtype": "method", + "name": "buildClass", + "params": [ + { + "name": "_inClass", + "description": "", + "type": "Class" + }, + { + "name": "_outClass", + "description": "", + "type": "Class" + } + ], + "static": 1, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 221, + "description": "为 _outClass 生成一个通用 Model 类", + "itemtype": "method", + "name": "buildModel", + "params": [ + { + "name": "_outClass", + "description": "", + "type": "Class" + } + ], + "static": 1, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 234, + "description": "为 _outClass 生成一个通用 View 类", + "itemtype": "method", + "name": "buildView", + "params": [ + { + "name": "_outClass", + "description": "", + "type": "Class" + } + ], + "static": 1, + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 244, + "description": "初始化 BaseMVC Model 类 和 View 类", + "class": "JC.BaseMVC", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 264, + "description": "设置 selector 实例引用的 data 属性名", + "itemtype": "property", + "name": "_instanceName", + "type": "string", + "default": "BaseMVCIns", + "access": "private", + "tagname": "", + "static": 1, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 278, + "description": "使用 jquery on 为 controler 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 289, + "description": "使用 jquery trigger 触发 controler 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 303, + "description": "使用 jquery trigger 触发 controler 绑定事件( 有换回数据 )", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "return": { + "description": "", + "type": "*" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 317, + "description": "通知选择器有新事件", + "itemtype": "method", + "name": "notification", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 329, + "description": "通知选择器有新事件", + "itemtype": "method", + "name": "notificationHandler", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_args", + "description": "", + "type": "*|Array" + } + ], + "return": { + "description": "", + "type": "*" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 344, + "description": "初始化的 jq 选择器", + "itemtype": "method", + "name": "selector", + "params": [ + { + "name": "_setter", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 355, + "description": "读取 int 属性的值", + "itemtype": "method", + "name": "intProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "int" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 376, + "description": "读取 float 属性的值", + "itemtype": "method", + "name": "floatProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "float" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 397, + "description": "读取 string 属性的值", + "itemtype": "method", + "name": "stringProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 415, + "description": "读取 html 属性值\n
            这个跟 stringProp 的区别是不会强制转换为小写", + "itemtype": "method", + "name": "attrProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 438, + "description": "读取 boolean 属性的值", + "itemtype": "method", + "name": "boolProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String|bool" + }, + { + "name": "_defalut", + "description": "", + "type": "Bool" + } + ], + "return": { + "description": "", + "type": "Bool|undefined" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 464, + "description": "读取 callback 属性的值", + "itemtype": "method", + "name": "callbackProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Function|undefined" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 487, + "description": "获取与属性名匹配的 window 变量", + "itemtype": "method", + "name": "windowProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Window variable" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 498, + "description": "获取 selector 属性的 jquery 选择器", + "itemtype": "method", + "name": "selectorProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "bool" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 521, + "description": "获取 脚本模板 jquery 选择器", + "itemtype": "method", + "name": "scriptTplProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 546, + "description": "获取 脚本数据 jquery 选择器", + "itemtype": "method", + "name": "scriptDataProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "object" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 568, + "description": "获取 selector 属性的 json 数据", + "itemtype": "method", + "name": "jsonProp", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Json | null" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 592, + "description": "判断 _selector 是否具体某种特征", + "itemtype": "method", + "name": "is", + "params": [ + { + "name": "_selector", + "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", + "type": "Selector|string" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "bool" + }, + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 621, + "description": "使用 jquery on 为 controler 绑定事件", + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/BaseMVC/BaseMVC.js", + "line": 629, + "description": "使用 jquery trigger 触发 controler 绑定事件", + "class": "JC.BaseMVC.Model", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 228, + "description": "内部初始化函数", + "itemtype": "method", + "name": "_init", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 253, + "description": "初始化相关操作事件", + "itemtype": "method", + "name": "_initHanlderEvent", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 348, + "description": "显示 Calendar", + "itemtype": "method", + "name": "show", + "return": { + "description": "CalendarInstance" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 361, + "description": "隐藏 Calendar", + "itemtype": "method", + "name": "hide", + "return": { + "description": "CalendarInstance" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 372, + "description": "获取 显示 Calendar 的触发源选择器, 比如 a 标签", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 378, + "description": "获取 Calendar 外观的 选择器", + "itemtype": "method", + "name": "layout", + "return": { + "description": "selector" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 384, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "CalendarInstance" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 392, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "CalendarInstance" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 399, + "description": "用户操作日期控件时响应改变", + "itemtype": "method", + "name": "updateLayout", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 408, + "description": "切换到不同日期控件源时, 更新对应的控件源", + "itemtype": "method", + "name": "updateSelector", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 419, + "description": "用户改变年份时, 更新到对应的年份", + "itemtype": "method", + "name": "updateYear", + "params": [ + { + "name": "_offset", + "description": "", + "type": "Int" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 430, + "description": "用户改变月份时, 更新到对应的月份", + "itemtype": "method", + "name": "updateMonth", + "params": [ + { + "name": "_offset", + "description": "", + "type": "Int" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 441, + "description": "把选中的值赋给控件源\n
            用户点击日期/确定按钮", + "itemtype": "method", + "name": "updateSelected", + "params": [ + { + "name": "_userSelectedItem", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 453, + "description": "显示日历外观到对应的控件源", + "itemtype": "method", + "name": "updatePosition", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 462, + "description": "清除控件源内容", + "itemtype": "method", + "name": "clear", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 473, + "description": "用户点击取消按钮时隐藏日历外观", + "itemtype": "method", + "name": "cancel", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 483, + "description": "返回日历外观是否可见", + "itemtype": "method", + "name": "visible", + "return": { + "description": "bool" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 497, + "description": "获取控件源的初始日期对象", + "itemtype": "method", + "name": "defaultDate", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 509, + "description": "获取或设置 Calendar 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Calendar instance" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 525, + "description": "保存所有类型的 Calendar 日期实例 \n
            目前有 date, week, month, season 四种类型的实例\n
            每种类型都是单例模式", + "prototype": "_ins", + "type": "object", + "default": "empty", + "access": "private", + "tagname": "", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 536, + "description": "获取控件源的实例类型\n
            目前有 date, week, month, season 四种类型的实例", + "itemtype": "method", + "name": "type", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 563, + "description": "判断选择器是否为日历组件的对象", + "itemtype": "method", + "name": "isCalendar", + "static": 1, + "params": [ + { + "name": "_selector!~YUIDOC_LINE~!return", + "description": "bool", + "type": "Selector" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 597, + "description": "请使用 isCalendar, 这个方法是为了向后兼容", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 601, + "description": "弹出日期选择框", + "itemtype": "method", + "name": "pickDate", + "static": 1, + "params": [ + { + "name": "_selector", + "description": "需要显示日期选择框的input[text]", + "type": "Selector" + } + ], + "example": [ + "\n
            \n
            \n \n manual JC.Calendar.pickDate\n
            \n
            \n \n manual JC.Calendar.pickDate\n
            \n
            \n " + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 639, + "description": "设置是否在 DOM 加载完毕后, 自动初始化所有日期控件", + "itemtype": "property", + "name": "autoInit", + "default": "true", + "type": "{bool}", + "static": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 648, + "description": "设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年", + "itemtype": "property", + "name": "defaultDateSpan", + "type": "{int}", + "default": "20", + "static": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 657, + "description": "最后一个显示日历组件的文本框", + "itemtype": "property", + "name": "lastIpt", + "type": "selector", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 664, + "description": "自定义日历组件模板\n

            默认模板为_logic.tpl

            \n

            如果用户显示定义JC.Calendar.tpl的话, 将采用用户的模板

            ", + "itemtype": "property", + "name": "tpl", + "type": "{string}", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 674, + "description": "初始化外观后的回调函数", + "itemtype": "property", + "name": "layoutInitedCallback", + "type": "function", + "static": 1, + "default": "null", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 682, + "description": "显示为可见时的回调", + "itemtype": "property", + "name": "layoutShowCallback", + "type": "function", + "static": 1, + "default": "null", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 690, + "description": "日历隐藏后的回调函数", + "itemtype": "property", + "name": "layoutHideCallback", + "type": "function", + "static": 1, + "default": "null", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 698, + "description": "DOM 点击的过滤函数\n
            默认 dom 点击时, 判断事件源不为 input[datatype=date|daterange] 会隐藏 Calendar\n
            通过该回调可自定义过滤, 返回 false 不执行隐藏操作", + "itemtype": "property", + "name": "domClickFilter", + "type": "function", + "static": 1, + "default": "null", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 708, + "description": "隐藏日历组件", + "itemtype": "method", + "name": "hide", + "static": 1, + "example": [ + "\n " + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 725, + "description": "获取初始日期对象\n

            这个方法将要废除, 请使用 instance.defaultDate()

            ", + "itemtype": "method", + "name": "getDate", + "static": 1, + "params": [ + { + "name": "_selector", + "description": "显示日历组件的input\nreturn { date: date, minvalue: date|null, maxvalue: date|null, enddate: date|null }", + "type": "Selector" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 737, + "description": "每周的中文对应数字", + "itemtype": "property", + "name": "cnWeek", + "type": "string", + "static": 1, + "default": "日一二三四五六", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 745, + "description": "100以内的中文对应数字", + "itemtype": "property", + "name": "cnUnit", + "type": "string", + "static": 1, + "default": "十一二三四五六七八九", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 753, + "description": "转换 100 以内的数字为中文数字", + "itemtype": "method", + "name": "getCnNum", + "static": 1, + "params": [ + { + "name": "_num", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "string" + }, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 767, + "description": "设置日历组件的显示位置", + "itemtype": "method", + "name": "position", + "static": 1, + "params": [ + { + "name": "_ipt", + "description": "需要显示日历组件的文本框", + "type": "Selector" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 778, + "description": "这个方法后续版本不再使用, 请使用 Calendar.position", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 782, + "description": "初始化日历组件的触发按钮", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 918, + "description": "克隆 Calendar 默认 Model, View 的原型属性", + "itemtype": "method", + "name": "clone", + "params": [ + { + "name": "_model", + "description": "", + "type": "NewModel" + }, + { + "name": "_view", + "description": "", + "type": "NewView" + } + ], + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1883, + "description": "捕获用户更改年份 \n

            监听 年份下拉框

            ", + "itemtype": "event", + "name": "year change", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1893, + "description": "捕获用户更改年份 \n

            监听 下一年按钮

            ", + "itemtype": "event", + "name": "next year", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1903, + "description": "捕获用户更改年份 \n

            监听 上一年按钮

            ", + "itemtype": "event", + "name": "previous year", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1913, + "description": "增加或者减少一年\n

            监听 年份map

            ", + "itemtype": "event", + "name": "year map click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1927, + "description": "增加或者减少一个月\n

            监听 月份map

            ", + "itemtype": "event", + "name": "month map click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1941, + "description": "捕获用户更改月份 \n

            监听 下一月按钮

            ", + "itemtype": "event", + "name": "next year", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1951, + "description": "捕获用户更改月份\n

            监听 上一月按钮

            ", + "itemtype": "event", + "name": "previous year", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1962, + "description": "日期点击事件", + "itemtype": "event", + "name": "date click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1975, + "description": "选择当前日期\n

            监听确定按钮

            ", + "itemtype": "event", + "name": "confirm click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1985, + "description": "清除文本框内容\n

            监听 清空按钮

            ", + "itemtype": "event", + "name": "clear click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 1995, + "description": "取消日历组件, 相当于隐藏\n

            监听 取消按钮

            ", + "itemtype": "event", + "name": "cancel click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 2005, + "description": "日历组件按钮点击事件", + "itemtype": "event", + "name": "calendar button click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 2020, + "description": "日历组件点击事件, 阻止冒泡, 防止被 document click事件隐藏", + "itemtype": "event", + "name": "UXCCalendar click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 2029, + "description": "DOM 加载完毕后, 初始化日历组件相关事件", + "itemtype": "event", + "name": "dom ready", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 2035, + "description": "延迟200毫秒初始化页面的所有日历控件\n之所以要延迟是可以让用户自己设置是否需要自动初始化", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 2043, + "description": "监听窗口滚动和改变大小, 实时变更日历组件显示位置", + "itemtype": "event", + "name": "window scroll, window resize", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.date.js", + "line": 2052, + "description": "dom 点击时, 检查事件源是否为日历组件对象, 如果不是则会隐藏日历组件", + "itemtype": "event", + "name": "dom click", + "access": "private", + "tagname": "", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.js", + "line": 5, + "description": "�����ж���Ϊ���������� JC 0.1\nʹ�� requirejs ����Ŀ�����Ƴ������жϴ���", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.month.js", + "line": 5, + "description": "自定义月份弹框的模板HTML", + "itemtype": "property", + "name": "monthTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.monthday.js", + "line": 5, + "description": "多选日期弹框的模板HTML", + "itemtype": "property", + "name": "monthdayTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.monthday.js", + "line": 14, + "description": "多先日期弹框标题末尾的附加字样", + "itemtype": "property", + "name": "monthdayHeadAppendText", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.monthday.js", + "line": 215, + "description": "如果 atd 为空, 那么是 全选按钮触发的事件", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.season.js", + "line": 5, + "description": "自定义周弹框的模板HTML", + "itemtype": "property", + "name": "seasonTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.week.js", + "line": 5, + "description": "自定义周弹框的模板HTML", + "itemtype": "property", + "name": "weekTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.week.js", + "line": 14, + "description": "自定义周日历每周的起始日期 \n
            0 - 6, 0=周日, 1=周一", + "itemtype": "property", + "name": "weekDayOffset", + "static": 1, + "type": "int", + "default": "1", + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/Calendar/Calendar.year.js", + "line": 5, + "description": "自定义周弹框的模板HTML", + "itemtype": "property", + "name": "yearTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Calendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 159, + "description": "获取或设置 DCalendar 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "DCalendarInstance" + }, + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 182, + "description": "初始化可识别的 DCalendar 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_onlyStatus", + "description": "default = false", + "type": "Bool" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of DCalendarInstance" + }, + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 220, + "description": "初始化可识别的 DCalendar 的状态", + "itemtype": "method", + "name": "_initStatus", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "access": "protected", + "tagname": "", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 292, + "description": "弹出日期选择框", + "itemtype": "method", + "name": "pickDate", + "static": 1, + "params": [ + { + "name": "_selector", + "description": "需要显示日期选择框的标签", + "type": "Selector" + } + ], + "example": [ + "\n
            \n
            \n \n manual JC.DCalendar.pickDate\n
            \n
            \n \n manual JC.DCalendar.pickDate\n
            \n
            \n " + ], + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 584, + "description": "显示的月份面板为2到12个", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1107, + "description": "DCalendar显示时的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1118, + "description": "DCalendar隐藏时的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1129, + "description": "清除选中的日期后的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1140, + "description": "选择日期赋值后的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1151, + "description": "更改月份之前的回调,月历面板显示后", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1162, + "description": "更改月份后的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1173, + "description": "更改年份之前的回调,年份面板显示后", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1184, + "description": "更改年份后的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1195, + "description": "点击下一月的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1206, + "description": "点击上一月的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1217, + "description": "点击下一年的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1228, + "description": "点击上一年的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1239, + "description": "点击下一页年份的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.date.js", + "line": 1250, + "description": "点击上一页年份的回调", + "class": "JC.DCalendar", + "namespace": "JC" + }, + { + "file": "../comps/DCalendar/DCalendar.js", + "line": 4, + "description": "�����ж���Ϊ���������� JC 0.1\nʹ�� requirejs ����Ŀ�����Ƴ������жϴ���", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 378, + "description": "获取拖动的源节点", + "itemtype": "method", + "name": "dragTarget", + "return": { + "description": "selector" + }, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 384, + "description": "获取拖动时移动的节点, drag 使用 dragTarget, drop clone dragTarget", + "itemtype": "method", + "name": "dragMovingTarget", + "return": { + "description": "selector" + }, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 390, + "description": "获取可拖动范围的 [ 节点 | window ]", + "itemtype": "method", + "name": "dragIn", + "return": { + "description": "", + "type": "Selector|window" + }, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 396, + "description": "更新 dragMovingTarget 的位置", + "itemtype": "method", + "name": "_updatePosition", + "access": "protected", + "tagname": "", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 407, + "description": "初始化可识别的 Drag 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of DragInstance" + }, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 430, + "description": "设置/获取 拖动时所需的数据", + "itemtype": "method", + "name": "dragInfo", + "params": [ + { + "name": "_ins", + "description": "", + "type": "DragInstance" + }, + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "return": { + "description": "", + "type": "Json|null" + }, + "static": 1, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 449, + "description": "设置当前的拖动 selector", + "itemtype": "method", + "name": "draggingItem", + "params": [ + { + "name": "_setter", + "description": "", + "type": "Selector|null" + } + ], + "return": { + "description": "", + "type": "Selector|null" + }, + "static": 1, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 466, + "description": "清除拖动的相关数据", + "itemtype": "method", + "name": "cleanDragData", + "static": 1, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 480, + "description": "拖动时, 默认的 mousemove 函数", + "itemtype": "method", + "name": "defaultMouseMove", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Evt" + } + ], + "static": 1, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 512, + "description": "拖动时, 默认的 mouseup 函数", + "itemtype": "method", + "name": "defaultMouseUp", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Evt" + } + ], + "static": 1, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 529, + "description": "拖动时, 默认的 scroll 函数", + "itemtype": "method", + "name": "defaultScroll", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Evt" + } + ], + "static": 1, + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 989, + "description": "判断两个矩形是否有交集", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1000, + "description": "把坐标和宽高生成一个 rectangle 数据", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1012, + "description": "把 rectangle 数据 转换为 坐标数据", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1022, + "description": "计算两个坐标点之间的距离", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1032, + "description": "实例初始化后触发的事件", + "itemtype": "event", + "name": "JCDragInited", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1036, + "description": "拖动开始前触发的事件", + "itemtype": "event", + "name": "JCDragBefore", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1040, + "description": "拖动开始时触发的事件", + "itemtype": "event", + "name": "JCDragBegin", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1044, + "description": "拖动完成时触发的事件", + "itemtype": "event", + "name": "JCDragDone", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1048, + "description": "拖动完成之后触发的事件", + "itemtype": "event", + "name": "JCDragAfter", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1052, + "description": "拖动移动时触发的事件", + "itemtype": "event", + "name": "JCDraggingMoving", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1056, + "description": "拖放完成时触发的事件", + "itemtype": "event", + "name": "JCDropDone", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1060, + "description": "拖放完成后触发的事件", + "itemtype": "event", + "name": "JCDropDoneAfter", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/Drag/Drag.js", + "line": 1064, + "description": "手动触发拖动事件", + "itemtype": "event", + "name": "JCTriggerDrag", + "class": "JC.Drag", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 116, + "description": "初始化可识别的 DragSelect 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of DragSelectInstance" + }, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 139, + "description": "用于显示选取范围的矩形", + "itemtype": "method", + "name": "RECT", + "static": 1, + "return": { + "description": "selector" + }, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 153, + "description": "用于显示选取范围的矩形模板", + "itemtype": "property", + "name": "RECT_TPL", + "type": "string", + "default": "
            ", + "static": 1, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 161, + "description": "默认 mouseup 事件", + "itemtype": "method", + "name": "DEFAULT_MOUSEUP", + "static": 1, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 174, + "description": "默认 mousemove 事件", + "itemtype": "method", + "name": "DEFAULT_MOUSEMOVE", + "static": 1, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 190, + "description": "默认 selectstart 事件", + "itemtype": "method", + "name": "DEFAULT_SELECT_EVENT", + "static": 1, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 199, + "description": "获取当前拖动的相关数据", + "itemtype": "method", + "name": "DRAG_DATA", + "static": 1, + "return": { + "description": "object" + }, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 210, + "description": "最小拖动范围, 小于这个范围将不予处理", + "itemtype": "property", + "name": "MIN_RECT", + "type": "object", + "default": "width: 20, height: 20", + "static": 1, + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 555, + "description": "判断两个矩形是否有交集", + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/DragSelect/DragSelect.js", + "line": 592, + "description": "返回选择器的 矩形 位置", + "class": "JC.DragSelect", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 117, + "description": "初始化可识别的 FChart 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of FChartInstance" + }, + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 195, + "description": "更新数据", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "object", + "description": "_data" + } + ], + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 205, + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 219, + "description": "flash swf 路径映射\n
            你还可以使用其他属性进行定义路径映射\n 1. window.FCHART_SWF_FILE_MAP\n 2. JC.FCHART_SWF_FILE_MAP", + "itemtype": "property", + "name": "Model.SWF_FILE_MAP", + "type": "{object}", + "default": "null", + "static": 1, + "example": [ + "\n requirejs( [ 'JC.FChart' ], function( FChart ){\n FChart['Model'].SWF_FILE_MAP = {\n 'bar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Histogram.swf'\n , 'vbar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VHistogram.swf'\n , 'line': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/CurveGram.swf'\n , 'stack': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Stack.swf'\n , 'mix': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/MixChart.swf'\n\n , 'column': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/ZHistogram.swf'\n , 'hcolumn': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VZHistogram.swf'\n };\n });" + ], + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 244, + "description": "flash swf 路径\n
            {0} = JC.PATH\n
            {1} = chart file name", + "itemtype": "property", + "name": "Model.FLASH_PATH", + "type": "{string}", + "default": "{0}/flash/pub/charts/{1}.swf", + "static": 1, + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 255, + "description": "flash swf 缓存版本控制", + "itemtype": "property", + "name": "Model.VERSION", + "type": "{string}", + "default": "requirejs.s.contexts._.config.urlArgs || 'v=' + JC.pathPostfix || 'v=fchart'", + "static": 1, + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 272, + "description": "图表类型映射\n
            曲线图: line, curvegram\n
            柱状图: bar, histogram\n
            垂直柱状图: var, vhistogram\n
            饼状图: pie, piegraph\n
            圆环图: dount\n
            评分球: rate", + "itemtype": "property", + "name": "Model.TYPE_MAP", + "type": "{object}", + "static": 1, + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 337, + "description": "解析图表默认数据", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 359, + "description": "保存图表数据", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 370, + "description": "图表宽度", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 381, + "description": "图表高度", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 392, + "description": "图表宽度", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 403, + "description": "设置或保存图表的宽高", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 411, + "description": "图表画布", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 417, + "description": "画布圆角弧度", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 421, + "description": "清除图表数据", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 438, + "description": "清除图表状态", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 519, + "description": "渲染图表外观", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 559, + "description": "图表高度", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 563, + "description": "图表高度", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 567, + "description": "图表画布", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 571, + "description": "初始化的选择器", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 578, + "description": "清除图表数据", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 588, + "description": "清除图表状态", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/FChart/FChart.js", + "line": 594, + "description": "更新图表数据", + "class": "JC.FChart", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 53, + "description": "显示 Fixed", + "itemtype": "method", + "name": "show", + "return": { + "description": "FixedIns" + }, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 59, + "description": "隐藏 Fixed", + "itemtype": "method", + "name": "hide", + "return": { + "description": "FixedIns" + }, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 65, + "description": "获取 Fixed 外观的 选择器", + "itemtype": "method", + "name": "layout", + "return": { + "description": "selector" + }, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 71, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "FixedIns" + }, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 79, + "description": "使用 jquery trigger 绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", + "params": [ + { + "name": "_evtName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "FixedIns" + }, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 87, + "description": "获取或设置 Fixed 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Fixed instance" + }, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 103, + "description": "页面加载完毕时, 是否自动初始化\n
            识别 class=js_autoFixed", + "itemtype": "property", + "name": "autoInit", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 112, + "description": "滚动的持续时间( 时间运动 )", + "itemtype": "property", + "name": "durationms", + "type": "int", + "default": "300", + "static": 1, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 120, + "description": "每次滚动的时间间隔( 时间运动 )", + "itemtype": "property", + "name": "stepms", + "type": "int", + "default": "3", + "static": 1, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 128, + "description": "设置或者清除 interval\n
            避免多个 interval 造成的干扰", + "itemtype": "method", + "name": "interval", + "params": [ + { + "name": "_interval", + "description": "", + "type": "Interval" + } + ], + "static": 1, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/Fixed/Fixed.js", + "line": 467, + "description": "判断是否支持 CSS position: fixed", + "itemtype": "property", + "name": "$.support.isFixed", + "type": "bool", + "require": "jquery", + "static": 1, + "class": "JC.Fixed", + "namespace": "JC" + }, + { + "file": "../comps/FlowChart/FlowChart.js", "line": 1, - "description": "

            Dom 通用 添加删除 逻辑

            \n
            应用场景\n
            需要动态添加删除内容的地方可以使用这个类\n\n

            JC Project Site\n| API docs\n| demo link

            \n\na|button 需要 添加 class=\"js_autoCommonModify\"\n\n

            可用的 HTML 属性

            \n
            \n
            [cmtpl | cmtemplate] = script selector
            \n
            指定保存模板的 script 标签
            \n\n
            cmitem = selector
            \n
            添加时, 目标位置的 父节点/兄弟节点
            \n\n
            cmaction = string, [add, del], default = add
            \n
            操作类型
            \n\n
            cmappendtype = string, default = after
            \n
            指定 node 添加 dom 的方法, 可选类型: before, after, appendTo
            \n\n
            cmdonecallback = function
            \n
            \n 添加或删除完后会触发的回调, window 变量域\nfunction cmdonecallback( _ins, _boxParent ){\n var _trigger = $(this);\n JC.log( 'cmdonecallback', new Date().getTime() );\n}\n
            \n\n
            cmtplfiltercallback = function
            \n
            \n 模板内容过滤回调, window 变量域\nwindow.COUNT = 1;\nfunction cmtplfiltercallback( _tpl, _cmitem, _boxParent ){\n var _trigger = $(this);\n JC.log( 'cmtplfiltercallback', new Date().getTime() );\n _tpl = printf( _tpl, COUNT++ );\n\n return _tpl;\n}\n
            \n\n
            cmbeforeaddcallabck = function
            \n
            \n 添加之前的回调, 如果返回 false, 将不执行添加操作, window 变量域\nfunction cmbeforeaddcallabck( _cmitem, _boxParent ){\n var _trigger = $(this);\n JC.log( 'cmbeforeaddcallabck', new Date().getTime() );\n //return false;\n}\n
            \n\n
            cmaddcallback = function
            \n
            \n 添加完成的回调, window 变量域\nfunction cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){\n var _trigger = $(this);\n JC.log( 'cmaddcallback', new Date().getTime() );\n}\n
            \n\n
            cmbeforedelcallback = function
            \n
            \n 删除之前的回调, 如果返回 false, 将不执行删除操作, window 变量域\nfunction cmbeforedelcallback( _cmitem, _boxParent ){\n var _trigger = $(this);\n JC.log( 'cmbeforedelcallback', new Date().getTime() );\n //return false;\n}\n
            \n\n
            cmdelcallback = function
            \n
            \n 删除完成的回调, window 变量域\nfunction cmdelcallback( _ins, _boxParent ){\n JC.log( 'cmdelcallback', new Date().getTime() );\n}\n
            \n\n
            cmMaxItems = int
            \n
            \n 指定最多可添加数量\n
            要使 cmMaxItems 生效, 必须声明 cmAddedItemsSelector\n
            \n\n
            cmAddedItemsSelector = selector
            \n
            \n 指定查找所有上传项的选择器语法\n
            \n\n
            cmOutRangeMsg = string, default = \"最多只能上传 {0}个文件!\"
            \n
            \n 添加数量超出 cmMaxItems 时的提示信息\n
            \n
            ", - "extends": "JC.BaseMVC", - "is_constructor": 1, - "version": "dev 0.1 2013-09-04", - "author": "qiushaowei | 75 Team", + "description": "支持 多对多 关系( 目前只支持 一对多 和 多对一 )", + "class": "JC.FlowChart", + "namespace": "JC" + }, + { + "file": "../comps/FlowChart/FlowChart.js", + "line": 218, + "description": "初始化可识别的 FlowChart 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of FlowChartInstance" + }, + "class": "JC.FlowChart", + "namespace": "JC" + }, + { + "file": "../comps/FlowChart/FlowChart.js", + "line": 274, + "description": "初始化后 selector 触发的事件", + "itemtype": "event", + "name": "cfc_inited", "example": [ - "\n \n \n \n \n \n
            \n \n \n  \n + 添加\n \n
            \n\n " - ] + "\n
            \n$( document ).delegate( \n   'div.js_compFlowChart'\n   , JC.FlowChart.Model.INITED\n   , function( _evt, _ins, _chartData ){\n       JC.log( 'js_compFlowChart inited' );\n   }\n);\n
            " + ], + "class": "JC.FlowChart", + "namespace": "JC" + }, + { + "file": "../comps/FlowChart/FlowChart.js", + "line": 289, + "description": "dom 节点初始化后 触发的事件", + "itemtype": "event", + "name": "cfc_nodeInited", + "example": [ + "\n
            \n$( document ).delegate( \n   'div.js_compFlowChart'\n   , JC.FlowChart.Model.ITEM_INITED\n   , function( _evt, _domNode, _itemData, _listData, _chartData ){\n       JC.log( _domNode.prop( 'nodeName' ) );\n   }\n);\n
            " + ], + "class": "JC.FlowChart", + "namespace": "JC" + }, + { + "file": "../comps/FlowChart/FlowChart.js", + "line": 304, + "description": "dom节点初始化前的事件\n
            节点如果有特殊显示需求的话, 可以从这个事件进行相关操作", + "itemtype": "event", + "name": "cfc_beforeInitItem", + "example": [ + "\n
            \n$( document ).delegate( \n   'div.js_compFlowChart'\n   , JC.FlowChart.Model.BEFORE_INIT_ITEM\n   , function( _evt, _itemData, _listData, _chartData ){\n       if( _itemData.tipsHtml ){\n           _itemData.tipsHtml += '   test';\n       }\n       _itemData.name = JC.f.printf( '~{0}~', _itemData.name );\n   }\n);\n
            " + ], + "class": "JC.FlowChart", + "namespace": "JC" + }, + { + "file": "../comps/FlowChart/FlowChart.js", + "line": 796, + "description": "这里的逻辑认为 起始节点 和 结束节点都只有一个", + "class": "JC.FlowChart", + "namespace": "JC" + }, + { + "file": "../comps/Form/Form.js", + "line": 23, + "description": "禁用按钮一定时间, 默认为1秒\n
            这个方法已停止维护\n, 请使用 Bizs.ActionLogic.disableButton", + "itemtype": "method", + "name": "disableButton", + "static": 1, + "params": [ + { + "name": "_selector", + "description": "要禁用button的选择器", + "type": "Selector" + }, + { + "name": "_durationMs", + "description": "禁用多少时间, 单位毫秒, 默认1秒", + "type": "Int" + } + ], + "class": "JC.Form", + "namespace": "JC" + }, + { + "file": "../comps/Form/Form.js", + "line": 43, + "description": "select 级联下拉框无限联动\n
            这个方法已经摘取出来, 单独成为一个类.\n
            详情请见: JC.AutoSelect\n
            目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法", + "itemtype": "method", + "name": "initAutoSelect", + "static": 1, + "class": "JC.Form", + "namespace": "JC" + }, + { + "file": "../comps/Form/Form.js", + "line": 52, + "description": "全选/反选\n
            这个方法已经摘取出来, 单独成为一个类.\n
            详情请见: JC.AutoChecked\n
            目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法", + "itemtype": "method", + "name": "initCheckAll", + "static": 1, + "class": "JC.Form", + "namespace": "JC" + }, + { + "file": "../comps/Form/Form.js", + "line": 61, + "description": "表单自动填充 URL GET 参数\n
            这个方法已经摘取出来, 单独成为一个类.\n
            详情请见: JC.FormFillUrl", + "itemtype": "method", + "name": "initAutoFill", + "params": [ + { + "name": "_selector", + "description": "显示指定要初始化的区域, 默认为 document", + "type": "Selector|url string" + }, + { + "name": "_url", + "description": "显示指定, 取初始化值的 URL, 默认为 location.href", + "type": "String" + } + ], + "static": 1, + "class": "JC.Form", + "namespace": "JC" + }, + { + "file": "../comps/FormFillUrl/FormFillUrl.js", + "line": 61, + "description": "初始化可识别的 FormFillUrl 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "return": { + "description": "", + "type": "Array of FormFillUrlInstance" + }, + "class": "JC.FormFillUrl", + "namespace": "JC" + }, + { + "file": "../comps/FormFillUrl/FormFillUrl.js", + "line": 92, + "description": "自定义 URI decode 函数", + "itemtype": "property", + "name": "decoder", + "type": "function", + "default": "decodeURIComponent", + "static": 1, + "class": "JC.FormFillUrl", + "namespace": "JC" + }, + { + "file": "../comps/FormFillUrl/FormFillUrl.js", + "line": 101, + "description": "自定义 URI encode 函数", + "itemtype": "property", + "name": "encoder", + "type": "function", + "default": "encodeURIComponent", + "static": 1, + "class": "JC.FormFillUrl", + "namespace": "JC" + }, + { + "file": "../comps/FormFillUrl/FormFillUrl.js", + "line": 110, + "description": "判断下拉框的option里是否有给定的值", + "itemtype": "method", + "name": "selectHasVal", + "params": [ + { + "name": "_select", + "description": "", + "type": "Selector" + }, + { + "name": "_val", + "description": "要查找的值", + "type": "String" + } + ], + "static": 1, + "class": "JC.FormFillUrl", + "namespace": "JC" + }, + { + "file": "../comps/FormFillUrl/FormFillUrl.js", + "line": 165, + "description": "手动填充 URL 值", + "itemtype": "method", + "name": "fill", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_url", + "description": "", + "type": "String" + } + ], + "return": { + "description": "FormFillUrlInstance" + }, + "class": "JC.FormFillUrl", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 22, + "description": "事件保存与触发对象", + "itemtype": "property", + "name": "eventHost", + "type": "object", + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 28, + "description": "frame 高度偏移值", + "itemtype": "property", + "name": "heightOffset", + "type": "int", + "default": "0", + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 35, + "description": "自动大小的间隔\n
            单位毫秒", + "itemtype": "property", + "name": "autoUpdateSizeMs", + "type": "int", + "default": "1000", + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 43, + "description": "设置自适应大小应用的属性\n
            1: height\n
            2: width\n
            3: height + width", + "itemtype": "property", + "name": "childSizePattern", + "type": "int", + "default": "1", + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 53, + "description": "是否自动响应关闭事件", + "itemtype": "property", + "name": "isChildAutoClose", + "type": "boolean", + "default": "true", + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 60, + "description": "是否自动响应大小改变事件", + "itemtype": "property", + "name": "isChildAutoSize", + "type": "boolean", + "default": "true", + "class": "JC.FrameUtil", + "namespace": "JC" }, - "window.Bizs.DisableLogic": { - "name": "window.Bizs.DisableLogic", - "shortname": "window.Bizs.DisableLogic", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window.Bizs", - "file": "../bizs/DisableLogic/DisableLogic.js", - "line": 1, - "description": "

            Form Control禁用启用逻辑

            \n
            应用场景
            \n
            表单操作时, 选择某个 radio 时, 对应的 内容有效,\n
            但选择其他 radio 时, 其他的内容无效\n
            checkbox / select 也可使用( 带change事件的标签 )\n\n

            JC Project Site\n| API docs\n| demo link

            \n\ndiv 需要 添加 class=\"js_bizsDisableLogic\"\n\n

            box 的 HTML 属性

            \n
            \n
            dltrigger
            \n
            触发禁用/起用的control
            \n\n
            dltarget
            \n
            需要禁用/起用的control
            \n\n
            dlhidetarget
            \n
            需要根据禁用起用隐藏/可见的标签
            \n\n
            dldonecallback = function
            \n
            \n 启用/禁用后会触发的回调, window 变量域\nfunction dldonecallback( _triggerItem, _boxItem ){\n var _ins = this;\n JC.log( 'dldonecallback', new Date().getTime() );\n}\n
            \n\n
            dlenablecallback = function
            \n
            \n 启用后的回调, window 变量域\nfunction dlenablecallback( _triggerItem, _boxItem ){\n var _ins = this;\n JC.log( 'dlenablecallback', new Date().getTime() );\n}\n
            \n\n
            dldisablecallback = function
            \n
            \n 禁用后的回调, window 变量域\nfunction dldisablecallback( _triggerItem, _boxItem ){\n var _ins = this;\n JC.log( 'dldisablecallback', new Date().getTime() );\n}\n
            \n
            \n\n

            trigger 的 HTML 属性

            \n
            \n
            dldisable = bool, default = false
            \n
            \n 指定 dltarget 是否置为无效\n
            还可以根据这个属性 指定 dlhidetarget 是否显示\n
            \n\n
            dldisplay = bool
            \n
            指定 dlhidetarget 是否显示
            \n\n
            dlhidetargetsub = selector
            \n
            根据 trigger 的 checked 状态 显示或者隐藏 dlhidetargetsub node
            \n
            \n\n

            hide target 的 HTML 属性

            \n
            \n
            dlhidetoggle = bool
            \n
            显示或显示的时候, 是否与他项相反
            \n
            ", - "is_constructor": 1, - "version": "dev 0.1 2013-09-04", - "author": "qiushaowei | 75 Team", - "example": [ - "\n
            \n
            \n \n \n
            " - ] + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 67, + "description": "获取 JC.FrameUtil 唯一id\n
            id = location.url_timestamp", + "itemtype": "method", + "name": "id", + "return": { + "description": "string" + }, + "class": "JC.FrameUtil", + "namespace": "JC" }, - "window.Bizs.FormLogic": { - "name": "window.Bizs.FormLogic", - "shortname": "window.Bizs.FormLogic", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window.Bizs", - "file": "../bizs/FormLogic/FormLogic.js", - "line": 3, - "description": "

            提交表单控制逻辑

            \n应用场景\n
            get 查询表单\n
            post 提交表单\n
            ajax 提交表单\n

            JC Project Site\n| API docs\n| demo link

            \nrequire: jQuery\n
            require: JC.Valid\n
            require: JC.Form\n
            require: JC.Panel\n\n

            页面只要引用本文件, 默认会自动初始化 from class=\"js_bizsFormLogic\" 的表单

            \n

            Form 可用的 HTML 属性

            \n
            \n
            formType = string, default = get
            \n
            \n form 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性\n
            类型有: get, post, ajax \n
            \n\n
            formSubmitDisable = bool, default = true
            \n
            表单提交后, 是否禁用提交按钮
            \n\n
            formResetAfterSubmit = bool, default = true
            \n
            表单提交后, 是否重置内容
            \n\n
            formBeforeProcess = function
            \n
            \n 表单开始提交时且没开始验证时, 触发的回调, window 变量域\nfunction formBeforeProcess( _evt, _ins ){\n var _form = $(this);\n JC.log( 'formBeforeProcess', new Date().getTime() );\n //return false;\n}\n
            \n\n
            formProcessError = function
            \n
            \n 提交时, 验证未通过时, 触发的回调, window 变量域\nfunction formProcessError( _evt, _ins ){\n var _form = $(this);\n JC.log( 'formProcessError', new Date().getTime() );\n //return false;\n}\n
            \n\n
            formAfterProcess = function
            \n
            \n 表单开始提交时且验证通过后, 触发的回调, window 变量域\nfunction formAfterProcess( _evt, _ins ){\n var _form = $(this);\n JC.log( 'formAfterProcess', new Date().getTime() );\n //return false;\n}\n
            \n\n
            formConfirmPopupType = string, default = dialog
            \n
            定义提示框的类型: dialog, popup
            \n\n
            formResetUrl = url
            \n
            表单重置时, 返回的URL
            \n\n
            formPopupCloseMs = int, default = 2000
            \n
            msgbox 弹框的显示时间
            \n\n
            formAjaxResultType = string, default = json
            \n
            AJAX 返回的数据类型: json, html
            \n\n
            formAjaxMethod = string, default = get
            \n
            \n 类型有: get, post\n
            ajax 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性\n
            \n\n
            formAjaxAction = url
            \n
            ajax 的提交URL, 如果没有显式声明, 将视为 form 的 action 属性
            \n\n
            formAjaxDone = function, default = system defined
            \n
            \n AJAX 提交完成后的回调, window 变量域\n
            如果没有显式声明, FormLogic将自行处理\nfunction formAjaxDone( _json, _submitButton, _ins ){\n var _form = $(this);\n JC.log( 'custom formAjaxDone', new Date().getTime() );\n\n if( _json.errorno ){\n _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 );\n }else{\n _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){\n reloadPage( \"?donetype=custom\" );\n });\n }\n};\n
            \n\n
            formAjaxDoneAction = url
            \n
            声明 ajax 提交完成后的返回路径, 如果没有, 提交完成后将不继续跳转操作
            \n
            \n\n

            submit button 可用的 html 属性

            \n
            \n
            \n 基本上 form 可用的 html 属性, submit 就可用, 区别在于 submit 优化级更高\n
            \n\n
            formSubmitConfirm = string
            \n
            提交表单时进行二次确认的提示信息\n\n
            formConfirmCheckSelector = selector
            \n
            提交表单时, 进行二次确认的条件判断\n\n
            formConfirmCheckCallback = function
            \n
            \n 提交表单时, 进行二次确认的条件判断, window 变量域\nfunction formConfirmCheckCallback( _trigger, _evt, _ins ){\n var _form = $(this);\n JC.log( 'formConfirmCheckCallback', new Date().getTime() );\n return _form.find('td.js_confirmCheck input[value=0]:checked').length;\n}\n \n
            \n\n

            reset button 可用的 html 属性

            \n
            \n
            \n 如果 form 和 reset 定义了相同属性, reset 优先级更高\n
            \n
            formConfirmPopupType = string, default = dialog
            \n
            定义提示框的类型: dialog, popup
            \n\n
            formResetUrl = url
            \n
            表单重置时, 返回的URL
            \n\n
            formResetConfirm = string
            \n
            重置表单时进行二次确认的提示信息\n\n
            formPopupCloseMs = int, default = 2000
            \n
            msgbox 弹框的显示时间
            \n
            \n\n

            普通 [a | button] 可用的 html 属性

            \n
            \n
            buttonReturnUrl
            \n
            点击button时, 返回的URL
            \n\n
            returnConfirm = string
            \n
            二次确认提示信息
            \n\n
            popupType = string, default = confirm
            \n
            弹框类型: confirm, dialog.confirm
            \n\n
            popupstatus = int, default = 2
            \n
            提示状态: 0: 成功, 1: 失败, 2: 警告
            \n
            ", - "extends": "JC.BaseMVC", - "is_constructor": 1, - "version": "dev 0.1 2013-09-08", - "author": "qiushaowei | 75 Team", - "example": [ - "\n \n\n
            \n
            Bizs.FormLogic, get form example 3, nothing at done
            \n
            \n
            \n
            \n
            \n
            \n 文件框: \n
            \n
            \n 日期: \n \n
            \n
            \n 下拉框:\n \n
            \n
            \n \n \n \n\n \n \n back\n
            \n
            \n
            \n
            \n
            \n
            " - ] + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 74, + "description": "通知父窗口更新frame大小", + "itemtype": "method", + "name": "noticeSize", + "params": [ + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" }, - "window.Bizs.KillISPCache": { - "name": "window.Bizs.KillISPCache", - "shortname": "window.Bizs.KillISPCache", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window.Bizs", - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 2, - "description": "应用场景\n
            ISP 缓存问题 引起的用户串号\n
            ajax 或者动态添加的内容, 请显式调用 JC.KillISPCache.getInstance().process( newNodeContainer )\n
            这是个单例类\n \n

            JC Project Site\n| API docs\n| demo link

            \nrequire: jQuery\n\n

            页面只要引用本文件, 默认会自动初始化 KillISPCache 逻辑

            \n
            \n
            影响到的地方:
            \n
            每个 a node 会添加 isp 参数
            \n
            每个 form node 会添加 isp 参数
            \n
            每个 ajax get 请求会添加 isp 参数
            \n
            ", - "extends": "JC.BaseMVC", - "is_constructor": 1, - "version": "dev 0.1 2013-09-07", - "author": "qiushaowei | 75 Team", - "example": [ - "\n " - ] + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 91, + "description": "自动通知父窗口更新frame大小", + "itemtype": "method", + "name": "autoNoticeSize", + "params": [ + { + "name": "_ms", + "description": "", + "type": "Int" + }, + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" }, - "window.Bizs.MultiDate": { - "name": "window.Bizs.MultiDate", - "shortname": "window.Bizs.MultiDate", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window.Bizs", - "file": "../bizs/MultiDate/MultiDate.js", - "line": 3, - "description": "MultiDate 复合日历业务逻辑\n

            \n require: JC.Calendar\n
            require: jQuery\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "is_constructor": 1, - "access": "private", - "tagname": "", - "version": "dev 0.1 2013-09-03", - "author": "qiushaowei | 75 Team" + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 110, + "description": "订阅 frame 的事件\n
            目前有以下事件:\n
            close: 关闭\n
            size: 更新大小\n
            data: json 数据", + "itemtype": "method", + "name": "subscribeEvent", + "params": [ + { + "name": "_name", + "description": "", + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" }, - "JC.AjaxUpload": { - "name": "JC.AjaxUpload", - "shortname": "JC.AjaxUpload", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 3, - "description": "Ajax 文件上传\n

            \n JC Project Site\n | API docs\n | demo link\n

            \n

            \n require: jQuery\n

            \n

            可用的 html attribute

            \n
            \n
            cauStyle = string, default = g1
            \n
            \n 按钮显示的样式, 可选样式:\n
            \n
            绿色按钮
            \n
            g1, g2, g3
            \n\n
            白色/银色按钮
            \n
            w1, w2, w3
            \n
            \n
            \n\n
            cauButtonText = string, default = 上传文件
            \n
            定义上传按钮的显示文本
            \n\n
            cauHideButton = bool, default = false( no label ), true( has label )
            \n
            \n 上传完成后是否隐藏上传按钮\n
            \n\n
            cauUrl = url, require
            \n
            上传文件的接口地址
            \n\n
            cauFileExt = file ext, optional
            \n
            允许上传的文件扩展名, 例: \".jpg, .jpeg, .png, .gif\"
            \n\n
            cauFileName = string, default = file
            \n
            上传文件的 name 属性
            \n\n
            cauValueKey = string, default = url
            \n
            返回数据用于赋值给 hidden/textbox 的字段
            \n\n
            cauLabelKey = string, default = name
            \n
            返回数据用于显示的字段
            \n\n
            cauSaveLabelSelector = selector
            \n
            指定保存 cauLabelKey 值的 selector
            \n\n
            cauStatusLabel = selector, optional
            \n
            开始上传时, 用于显示状态的 selector
            \n\n
            cauDisplayLabel = selector, optional
            \n
            上传完毕后, 用于显示文件名的 selector
            \n\n
            cauUploadDoneCallback = function, optional
            \n
            \n 文件上传完毕时, 触发的回调\nfunction cauUploadDoneCallback( _json, _selector, _frame ){\n var _ins = this;\n //alert( _json ); //object object\n}\n
            \n\n
            cauUploadErrorCallback = function, optional
            \n
            \n 文件上传完毕时, 发生错误触发的回调\nfunction cauUploadErrorCallback( _json, _selector, _frame ){\n var _ins = this;\n //alert( _json ); //object object\n}\n
            \n\n
            cauDisplayLabelCallback = function, optional, return = string
            \n
            \n 自定义上传完毕后显示的内容 模板\nfunction cauDisplayLabelCallback( _json, _label, _value ){\n var _selector = this\n , _label = printf( '<a href=\"{0}\" class=\"green js_auLink\" target=\"_blank\">{1}</a>{2}'\n , _value, _label\n , '&nbsp;<a href=\"javascript:\" class=\"btn btn-cls2 js_cleanCauData\"></a>&nbsp;&nbsp;'\n )\n ;\n return _label;\n}\n
            \n
            ", - "extends": "JC.BaseMVC", - "is_constructor": 1, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 126, + "description": "通知父级有数据交互", + "itemtype": "method", + "name": "noticeData", "params": [ { - "name": "_selector", + "name": "_data", + "description": "", + "type": "Json" + }, + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 145, + "description": "通知父级刷新页面", + "itemtype": "method", + "name": "noticeReload", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 160, + "description": "通知父级已经初始化完毕", + "itemtype": "method", + "name": "noticeReady", + "params": [ + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 178, + "description": "通知子级有数据交互", + "itemtype": "method", + "name": "noticeChildData", + "params": [ + { + "name": "_params", + "description": "", + "type": "Json" + }, + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 192, + "description": "通知父级关闭窗口", + "itemtype": "method", + "name": "noticeClose", + "params": [ + { + "name": "_type", + "description": "", + "type": "String" + } + ], + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 207, + "description": "获取窗口信息", + "itemtype": "method", + "name": "info", + "return": { + "description": "$, width, height, bodyWidth, bodyHeight, id", + "type": "Object" + }, + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 232, + "description": "获取父级窗口信息", + "itemtype": "method", + "name": "parent", + "return": { + "description": "$, win, jwin, JC, FrameUtil, eventHost, jEventHost, id", + "type": "Object" + }, + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 261, + "description": "获取子级窗口信息", + "itemtype": "method", + "name": "parent", + "return": { + "description": "$, width, height, bodyWidth, bodyHeight, win, doc, type, id", + "type": "Object" + }, + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 312, + "description": "获取窗口类型\n
            这个方法的作用可用 id() + childIdMap() 替代", + "itemtype": "method", + "name": "type", + "default": "window.name", + "return": { + "description": "string" + }, + "class": "JC.FrameUtil", + "namespace": "JC" + }, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 335, + "description": "批量更新 frame 大小", + "itemtype": "method", + "name": "updateChildrenSize", + "params": [ + { + "name": "_frames", "description": "", "type": "Selector" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 team", - "date": "2013-09-26", - "example": [ - "\n
            \n \n \n \n
            \n\n POST 数据:\n ------WebKitFormBoundaryb1Xd1FMBhVgBoEKD\n Content-Disposition: form-data; name=\"file\"; filename=\"disk.jpg\"\n Content-Type: image/jpeg\n\n 返回数据:\n {\n \"errorno\": 0, \n \"data\":\n {\n \"url\": \"/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg\", \n \"name\": \"test.jpg\"\n }, \n \"errmsg\": \"\"\n }" - ] + "class": "JC.FrameUtil", + "namespace": "JC" }, - "JC.AutoChecked": { - "name": "JC.AutoChecked", - "shortname": "JC.AutoChecked", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 2, - "description": "全选/反选\n

            JC Project Site\n| API docs\n| demo link

            \n

            require: jQuery

            \n

            input[type=checkbox] 可用的 HTML 属性

            \n
            \n
            checktype = string
            \n
            \n 类型: all(全选), inverse(反选)\n
            \n\n
            checkfor = selector
            \n
            需要全选/反选的 checkbox
            \n\n
            checkall = selector
            \n
            声明 checkall input, 仅在 checktype = inverse 时才需要
            \n\n
            checktrigger = string of event name
            \n
            点击全选反选后触发的事件, 可选
            \n
            ", - "is_constructor": 1, - "version": "dev 0.1 2013-06-11", - "author": "qiushaowei | 75 team", + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 349, + "description": "更新 frame 大小", + "itemtype": "method", + "name": "updateChildSize", "params": [ { - "name": "_selector", - "description": "要初始化的全选反选的父级节点 或 input[checktype][checkfor]", + "name": "_frame", + "description": "", "type": "Selector" } ], - "example": [ - "\n

            AJAX data:

            \n
            \n
            checkall example 24
            \n
            \n \n \n
            \n
            \n \n \n \n \n \n
            \n
            \n\n " - ] + "class": "JC.FrameUtil", + "namespace": "JC" }, - "JC.AutoSelect": { - "name": "JC.AutoSelect", - "shortname": "JC.AutoSelect", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 3, - "description": "

            select 级联下拉框无限联动

            \n
            只要引用本脚本, 页面加载完毕时就会自动初始化级联下拉框功能\n

            动态添加的 DOM 需要显式调用 JC.AutoSelect( domSelector ) 进行初始化\n

            要使页面上的级联下拉框功能能够自动初始化, 需要在select标签上加入一些HTML 属性\n

            JC Project Site\n| API docs\n| demo link

            \n

            requires: jQuery

            \n

            select 标签可用的 HTML 属性

            \n
            \n
            defaultselect, 这个属性不需要赋值
            \n
            该属性声明这是级联下拉框的第一个下拉框, 这是必填项,初始化时以这个为入口
            \n\n
            selectvalue = string
            \n
            下拉框的默认选中值
            \n\n
            selecturl = AJAX 数据请求的URL
            \n
            下拉框的数据请求接口, 符号 {0} 代表下拉框值的占位符
            \n\n
            selectignoreinitrequest = bool, default = false
            \n
            \n 首次初始化时, 是否需要请求新数据\n
            有时 联动框太多, 载入页面时, 后端直接把初始数据输出, 避免请求过多\n
            \n\n
            selecttarget = selector
            \n
            下一级下拉框的选择器语法
            \n\n
            selectdatacb = 静态数据请求回调
            \n
            如果数据不需要 AJAX 请求, 可使用这个属性, 自行定义数据处理方式
            \n\n
            selectrandomurl = bool, default = false
            \n
            AJAX 请求时, 添加随机参数, 防止数据缓存
            \n\n
            selecttriggerinitchange = bool, default = true
            \n
            首次初始化时, 是否触发 change 事件
            \n\n
            selecthideempty = bool, default = false
            \n
            是否隐藏没有数据的 selecct
            \n\n
            selectdatafilter = 请求数据后的处理回调
            \n
            如果接口的数据不符合 select 的要求, 可通过这个属性定义数据过滤函数
            \n\n
            selectbeforeinited = 初始化之前的回调
            \n\n
            selectinited = 初始化后的回调
            \n
            function selectinited( _items ){\n var _ins = this;\n}\n
            \n\n
            selectallchanged = 所有select请求完数据之后的回调, window 变量域
            \n
            function selectallchanged( _items ){\n var _ins = this;\n}\n
            \n
            \n

            option 标签可用的 HTML 属性

            \n
            \n
            defaultoption, 这个属性不需要赋值
            \n
            声明默认 option 选项, 更新option时, 有该属性的项不会被清除
            \n
            \n

            数据格式

            \n

            \n [ [id, name], [id, name] ... ]\n
            如果获取到的数据格式不是默认格式,\n 可以通过 AutoSelect.dataFilter 属性自定义函数, 进行数据过滤\n

            ", - "static": 1, - "version": "dev 0.2", - "author": "qiushaowei | 75 Team", - "date": "2013-07-28(.2), 2013-06-11(.1)", + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 368, + "description": "自动批量更新 frame 大小", + "itemtype": "method", + "name": "childrenAutoSize", "params": [ { - "name": "_selector", - "description": "要初始化的级联下拉框父级节点", + "name": "_frames", + "description": "", "type": "Selector" + }, + { + "name": "_ms", + "description": "", + "type": "Int" } ], - "example": [ - "\n

            AJAX 返回内容

            \n \n
            \n \n \n \n
            \n
            \n " - ] - }, - "JC.Calendar": { - "name": "JC.Calendar", - "shortname": "JC.Calendar", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Calendar/Calendar.js", - "line": 3, - "description": "日期选择组件\n
            全局访问请使用 JC.Calendar 或 Calendar\n
            DOM 加载完毕后\n, Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签\n
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector )\n
            _selector 可以是 新加载的容器, 也可以是新加载的所有input\n

            require: jQuery\n
            require: window.cloneDate\n
            require: window.parseISODate\n
            require: window.formatISODate\n
            require: window.maxDayOfMonth\n
            require: window.isSameDay\n
            require: window.isSameMonth\n

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season)

            \n
            \n
            defaultdate = ISO Date
            \n
            默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性
            \n\n
            datatype = string
            \n
            \n 声明日历控件的类型:\n

            date: 日期日历

            \n

            week: 周日历

            \n

            month: 月日历

            \n

            season: 季日历

            \n

            monthday: 多选日期日历

            \n
            \n\n
            multidate = string
            \n
            \n 与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突\n
            \n\n
            calendarshow = function
            \n
            显示日历时的回调
            \n\n
            calendarhide = function
            \n
            隐藏日历时的回调
            \n\n
            calendarlayoutchange = function
            \n
            用户点击日历控件操作按钮后, 外观产生变化时触发的回调
            \n\n
            calendarupdate = function
            \n
            \n 赋值后触发的回调\n
            \n
            参数:
            \n
            _startDate: 开始日期
            \n
            _endDate: 结束日期
            \n
            \n
            \n\n
            calendarclear = function
            \n
            清空日期触发的回调
            \n\n
            minvalue = ISO Date
            \n
            日期的最小时间, YYYY-MM-DD
            \n\n
            maxvalue = ISO Date
            \n
            日期的最大时间, YYYY-MM-DD
            \n\n
            currentcanselect = bool, default = true
            \n
            当前日期是否能选择
            \n\n
            multiselect = bool (目前支持 month: default=false, monthday: default = treu)
            \n
            是否为多选日历
            \n\n
            calendarupdatemultiselect = function
            \n
            \n 多选日历赋值后触发的回调\n
            \n
            参数: _data:
            \n
            \n [{\"start\": Date,\"end\": Date}[, {\"start\": Date,\"end\": Date}... ] ]\n
            \n
            \n
            \n
            ", - "version": "dev 0.1, 2013-06-04", - "author": "qiushaowei | 75 team" + "class": "JC.FrameUtil", + "namespace": "JC" }, - "JC.Fixed": { - "name": "JC.Fixed", - "shortname": "JC.Fixed", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Fixed/Fixed.js", - "line": 6, - "description": "内容固定于屏幕某个位置显示\n
            \n
            require: jQuery
            \n
            require: $.support.isFixed
            \n
            \n

            JC Project Site\n| API docs\n| demo link

            ", - "is_constructor": 1, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 394, + "description": "通过 id 比对 frame 的 FrameUtil.id() 获取 frame", + "itemtype": "method", + "name": "childIdMap", "params": [ { - "name": "_selector", + "name": "_id", "description": "", - "type": "Selector|string" + "type": "String" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 Team", - "date": "2013-08-18", - "example": [ - "" - ] - }, - "JC.Form": { - "name": "JC.Form", - "shortname": "JC.Form", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Form/Form.js", - "line": 2, - "description": "表单常用功能类 JC.Form\n

            requires: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "static": 1, - "version": "dev 0.1", - "author": "qiushaowei | 75 team", - "date": "2013-06-11" + "return": { + "description": "selector | null" + }, + "class": "JC.FrameUtil", + "namespace": "JC" }, - "JC.LunarCalendar": { - "name": "JC.LunarCalendar", - "shortname": "JC.LunarCalendar", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.LunarCalendar", - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 6, - "description": "农历日历组件\n
            全局访问请使用 JC.LunarCalendar 或 LunarCalendar\n
            DOM 加载完毕后\n, LunarCalendar会自动初始化页面所有具备识别符的日历, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar\n
            Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 var ins = new JC.LunarCalendar( _selector );\n

            \n 初始化时, 如果日历是添加到某个selector里, 那么selector可以指定一些设置属性\n
            hidecontrol: 如果设置该属性, 那么日历将隐藏操作控件\n
            minvalue: 设置日历的有效最小选择范围, 格式YYYY-mm-dd\n
            maxvalue: 设置日历的有效最大选择范围, 格式YYYY-mm-dd\n
            nopreviousfestivals: 不显示上个月的节日\n
            nonextfestivals: 不显示下个月的节日\n

            \n

            require: jQuery\n
            require: window.cloneDate\n
            require: window.parseISODate\n
            require: window.maxDayOfMonth\n
            require: window.isSameDay\n
            require: window.isSameMonth\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "is_constructor": 1, + { + "file": "../comps/FrameUtil/FrameUtil.js", + "line": 427, + "description": "通过 FrameUtil.childSizePattern 获取对应的 css 样式", + "itemtype": "method", + "name": "cssFromSizePattern", "params": [ { - "name": "_container", - "description": "指定要显示日历的选择器, 如果不显示指定该值, 默认为 document.body", - "type": "Selector" + "name": "_pattern", + "description": "", + "type": "Int" }, { - "name": "_date", - "description": "日历的当前日期, 如果不显示指定该值, 默认为当天", - "type": "Date" + "name": "_params", + "description": "", + "type": "Json" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 team", - "date": "2013-06-13" + "return": { + "description": "json" + }, + "class": "JC.FrameUtil", + "namespace": "JC" }, - "JC.LunarCalendar.View": { - "name": "JC.LunarCalendar.View", - "shortname": "JC.LunarCalendar.View", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.LunarCalendar", - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 498, - "description": "LunarCalendar 视图类", - "is_constructor": 1, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 168, + "description": "初始化可识别的 ImageCutter 实例", + "itemtype": "method", + "name": "init", "params": [ { - "name": "_model", + "name": "_selector", "description": "", - "type": "JC.LunarCalendar.Model" + "type": "Selector" } - ] + ], + "static": 1, + "return": { + "description": "", + "type": "Array of ImageCutterInstance" + }, + "class": "JC.ImageCutter", + "namespace": "JC" }, - "JC.LunarCalendar.Model": { - "name": "JC.LunarCalendar.Model", - "shortname": "JC.LunarCalendar.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.LunarCalendar", - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 692, - "description": "LunarCalendar 数据模型类", - "is_constructor": 1, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 191, + "description": "裁切范围的最小边长", + "itemtype": "property", + "name": "minRectSidelength", + "type": "int", + "default": "50", + "static": 1, + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 199, + "description": "图片的最小边长", + "itemtype": "property", + "name": "minImageSidelength", + "type": "int", + "default": "50", + "static": 1, + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 207, + "description": "图片的最大边长", + "itemtype": "property", + "name": "maxImageSidelength", + "type": "int", + "static": 1, + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 214, + "description": "上下左右方向键移动的步长", + "itemtype": "property", + "name": "moveStep", + "type": "int", + "default": "1", + "static": 1, + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 222, + "description": "进行坐标计算的偏移值", + "itemtype": "property", + "name": "_positionPoint", + "type": "int", + "default": "10000", + "static": 1, + "access": "protected", + "tagname": "", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 231, + "description": "默认的 CSS cursor", + "itemtype": "property", + "name": "_defaultCursor", + "type": "string", + "default": "auto", + "static": 1, + "access": "protected", + "tagname": "", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 240, + "description": "获取 拖动 的相关信息", + "itemtype": "method", + "name": "dragInfo", "params": [ { - "name": "_container", + "name": "_p", "description": "", - "type": "Selector" + "type": "ImageCutterInstance" + }, + { + "name": "_evt", + "description": "", + "type": "Event" + }, + { + "name": "_size", + "description": "", + "type": "Object" }, { - "name": "_date", + "name": "_srcSelector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 271, + "description": "清除拖动信息", + "itemtype": "method", + "name": "cleanInfo", + "static": 1, + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 630, + "description": "更新图片", + "itemtype": "method", + "name": "update", + "params": [ + { + "name": "_imgUrl", + "description": "", + "type": "String" + } + ], + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 641, + "description": "清除拖动的所有内容", + "itemtype": "method", + "name": "clean", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 652, + "description": "更新拖动位置", + "itemtype": "method", + "name": "updatePosition", + "params": [ + { + "name": "_size", "description": "", - "type": "Date" + "type": "Object" } - ] + ], + "class": "JC.ImageCutter", + "namespace": "JC" }, - "JC.Panel": { - "name": "JC.Panel", - "shortname": "JC.Panel", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Panel/Panel.js", - "line": 4, - "description": "弹出层基础类 JC.Panel\n

            JC Project Site\n| API docs\n| demo link

            \n

            require: jQuery

            \n

            Panel Layout 可用的 html attribute

            \n
            \n
            panelclickclose = bool
            \n
            点击 Panel 外时, 是否关闭 panel
            \n\n
            panelautoclose = bool
            \n
            Panel 是否自动关闭, 默认关闭时间间隔 = 2000 ms
            \n\n
            panelautoclosems = int, default = 2000 ms
            \n
            自动关闭 Panel 的时间间隔
            \n
            \n

            a, button 可用的 html attribute( 自动生成弹框)

            \n
            \n
            paneltype = string, require
            \n
            \n 弹框类型: alert, confirm, msgbox, panel \n
            dialog.alert, dialog.confirm, dialog.msgbox, dialog\n
            \n\n
            panelmsg = string
            \n
            要显示的内容
            \n\n
            panelmsgBox = script selector
            \n
            要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
            \n\n
            panelstatus = int, default = 0
            \n
            \n 弹框状态: 0: 成功, 1: 失败, 2: 警告 \n
            类型不为 panel, dialog 时生效\n
            \n\n
            panelcallback = function
            \n
            \n 点击确定按钮的回调, window 变量域\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}\n
            \n\n
            panelcancelcallback = function
            \n
            \n 点击取消按钮的回调, window 变量域\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}\n
            \n\n
            panelclosecallback = function
            \n
            \n 弹框关闭时的回调, window 变量域\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}\n
            \n\n
            panelbutton = int, default = 0
            \n
            \n 要显示的按钮, 0: 无, 1: 确定, 2: 确定, 取消\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelheader = string
            \n
            \n panel header 的显示内容\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelheaderBox = script selector
            \n
            \n panel header 的显示内容\n
            要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelfooterbox = script selector
            \n
            \n panel footer 的显示内容\n
            要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性\n
            类型为 panel, dialog 时生效\n
            \n\n
            panelhideclose = bool, default = false
            \n
            \n 是否隐藏关闭按钮\n
            类型为 panel, dialog 时生效\n
            \n
            ", - "is_constructor": 1, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 658, + "description": "设置拖动信息", + "itemtype": "method", + "name": "_size", "params": [ { - "name": "_selector", - "description": "自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers", - "type": "Selector|string" - }, - { - "name": "_headers", - "description": "定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys", - "type": "String" - }, - { - "name": "_bodys", - "description": "定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers", - "type": "String" - }, - { - "name": "_footers", - "description": "定义模板的 footer 文字", - "type": "String" + "name": "_size", + "description": "", + "type": "Object" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 team", - "date": "2013-06-04", - "example": [ - "\n \n \n " - ] + "access": "protected", + "tagname": "", + "class": "JC.ImageCutter", + "namespace": "JC" }, - "JC.Panel.Model": { - "name": "JC.Panel.Model", - "shortname": "JC.Panel.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Panel", - "file": "../comps/Panel/Panel.js", - "line": 676, - "description": "存储 Panel 的基础数据类\n
            这个类为 Panel 的私有类", - "is_constructor": 1, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 665, + "description": "向左移动, 移动步长为 ImageCutter.moveStep 定义的步长", + "itemtype": "method", + "name": "moveLeft", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 670, + "description": "向上移动, 移动步长为 ImageCutter.moveStep 定义的步长", + "itemtype": "method", + "name": "moveUp", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 675, + "description": "向右移动, 移动步长为 ImageCutter.moveStep 定义的步长", + "itemtype": "method", + "name": "moveRight", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 680, + "description": "向下移动, 移动步长为 ImageCutter.moveStep 定义的步长", + "itemtype": "method", + "name": "moveDown", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1700, + "description": "初始化实例时触发的事件", + "itemtype": "event", + "name": "ImageCutterInited", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1704, + "description": "初始化预览时触发的事件", + "itemtype": "event", + "name": "CICInitPreview", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1708, + "description": "拖动完成时触发的事件", + "itemtype": "event", + "name": "CICDragDone", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1712, + "description": "更新拖动块时触发的事件", + "itemtype": "event", + "name": "CICUpdateDragger", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1716, + "description": "更新预览时触发的事件", + "itemtype": "event", + "name": "CICUpdatePreview", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1720, + "description": "更新坐标值时触发的事件", + "itemtype": "event", + "name": "CICUpdateCoordinate", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1724, + "description": "图片加载完毕时触发的事件", + "itemtype": "event", + "name": "CICImageLoad", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1728, + "description": "图片加载失败时触发的事件", + "itemtype": "event", + "name": "CICImageLoadError", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1732, + "description": "发生错误时触发的事件", + "itemtype": "event", + "name": "CICError", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1736, + "description": "图片大小不符合要求时触发的事件", + "itemtype": "event", + "name": "CICSizeError", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1740, + "description": "图片缩放后大小不符合要求时触发的事件", + "itemtype": "event", + "name": "CICPreviewError", + "class": "JC.ImageCutter", + "namespace": "JC" + }, + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1744, + "description": "按比例缩放图片\n
            返回: { width: int, height: int }", "params": [ { - "name": "_selector", - "description": "自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers", - "type": "Selector|string" + "name": "_w", + "description": "", + "type": "Int" }, { - "name": "_headers", - "description": "定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys", - "type": "String" + "name": "_h", + "description": "", + "type": "Int" }, { - "name": "_bodys", - "description": "定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers", - "type": "String" + "name": "_newWidth", + "description": "", + "type": "Int" }, { - "name": "_footers", - "description": "定义模板的 footer 文字", - "type": "String" + "name": "_newHeight", + "description": "", + "type": "Int" } - ] + ], + "return": { + "description": "width, height", + "type": "Object" + }, + "class": "JC.ImageCutter", + "namespace": "JC" }, - "JC.Panel.View": { - "name": "JC.Panel.View", - "shortname": "View", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1768, + "description": "计算两个坐标点之间的距离", + "class": "JC.ImageCutter", "namespace": "JC" }, - "JC.hideAllPanel": { - "name": "JC.hideAllPanel", - "shortname": "JC.hideAllPanel", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Panel/Panel.js", - "line": 1065, - "description": "隐藏或者清除所有 Panel\n

            使用这个方法应当谨慎, 容易为DOM造成垃圾Panel

            \n
            注意: 这是个方法, 写成class是为了方便生成文档", - "is_constructor": 1, - "static": 1, - "params": [ - { - "name": "_isClose", - "description": "从DOM清除/隐藏所有Panel(包刮 JC.alert, JC.confirm, JC.Panel, JC.Dialog)\n
            , true = 从DOM 清除, false = 隐藏, 默认 = false( 隐藏 )", - "type": "Bool" - } - ], - "example": [ - "\n JC.hideAllPanel(); //隐藏所有Panel\n JC.hideAllPanel( true ); //从DOM 清除所有Panel" - ] + { + "file": "../comps/ImageCutter/ImageCutter.js", + "line": 1778, + "description": "从长度和角度求坐标点", + "class": "JC.ImageCutter", + "namespace": "JC" }, - "JC.hideAllPopup": { - "name": "JC.hideAllPopup", - "shortname": "JC.hideAllPopup", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Panel/Panel.js", - "line": 1088, - "description": "隐藏 或 从DOM清除所有 JC.alert/JC.confirm\n
            注意, 这是个方法, 写 @class 属性是为了生成文档", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 71, + "description": "LunarCalendar 的数据模型对象", + "itemtype": "property", + "name": "_model", + "type": "JC.LunarCalendar.Model", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 78, + "description": "LunarCalendar 的视图对像", + "itemtype": "property", + "name": "_view", + "type": "JC.LunarCalendar.View", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 90, + "description": "自定义日历组件模板\n

            默认模板为JC.LunarCalendar.Model#tpl

            \n

            如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板

            ", + "itemtype": "property", + "name": "tpl", + "type": "{string}", + "default": "empty", "static": 1, - "is_constructor": 1, - "params": [ - { - "name": "_isClose", - "description": "为真从DOM清除JC.alert/JC.confirm, 为假隐藏, 默认为false", - "type": "Bool" - } - ], - "example": [ - "\n JC.hideAllPopup(); //隐藏所有JC.alert, JC.confirm\n JC.hideAllPopup( true ); //从 DOM 清除所有 JC.alert, JC.confirm" - ] + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 100, + "description": "设置是否在 dom 加载完毕后, 自动初始化所有日期控件", + "itemtype": "property", + "name": "autoinit", + "default": "true", + "type": "{bool}", + "static": "", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 109, + "description": "设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年", + "itemtype": "property", + "name": "defaultYearSpan", + "type": "{int}", + "default": "20", + "static": "", + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.msgbox": { - "name": "JC.msgbox", - "shortname": "JC.msgbox", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Panel/Panel.js", - "line": 1286, - "description": "msgbox 提示 popup\n
            这个是不带蒙板 不带按钮的 popup 弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            requires: jQuery, Panel

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 118, + "description": "从所有的LunarCalendar取得当前选中的日期\n
            如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined", + "itemtype": "method", + "name": "getSelectedItemGlobal", "static": 1, - "is_constructor": 1, + "return": { + "description": "如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td }", + "type": "Object|undefined" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 142, + "description": "初始化可识别的 LunarCalendar 实例", + "itemtype": "method", + "name": "init", "params": [ { - "name": "_msg", - "description": "提示内容", - "type": "String" - }, - { - "name": "_popupSrc", - "description": "触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示", + "name": "_selector", + "description": "", "type": "Selector" - }, - { - "name": "_status", - "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", - "type": "Int" - }, - { - "name": "_cb", - "description": "弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" - }, - { - "name": "_closeMs", - "description": "自动关闭的间隔, 单位毫秒, 默认 2000", - "type": "Int" } ], + "static": 1, "return": { - "description": "JC.Panel" - } + "description": "", + "type": "Array of LunarCalendarInstance" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.alert": { - "name": "JC.alert", - "shortname": "JC.alert", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Panel/Panel.js", - "line": 1333, - "description": "alert 提示 popup\n
            这个是不带 蒙板的 popup 弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            requires: jQuery, Panel

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 165, + "description": "从所有的LunarCalendar取得当前选中日期的日期对象\n
            如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined", + "itemtype": "method", + "name": "getSelectedDateGlobal", "static": 1, - "is_constructor": 1, - "params": [ - { - "name": "_msg", - "description": "提示内容", - "type": "String" - }, - { - "name": "_popupSrc", - "description": "触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示", - "type": "Selector" - }, - { - "name": "_status", - "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", - "type": "Int" - }, - { - "name": "_cb", - "description": "点击弹框确定按钮的回调\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" - } - ], "return": { - "description": "JC.Panel" - } + "description": "", + "type": "Date|undefined" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.confirm": { - "name": "JC.confirm", - "shortname": "JC.confirm", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Panel/Panel.js", - "line": 1371, - "description": "confirm 提示 popup\n
            这个是不带 蒙板的 popup 弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            private property see: JC.alert\n

            requires: jQuery, Panel

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 178, + "description": "从时间截获取选择器对象", + "itemtype": "method", + "name": "getItemByTimestamp", "static": 1, - "is_constructor": 1, "params": [ { - "name": "_msg", - "description": "提示内容", - "type": "String" - }, - { - "name": "_popupSrc", - "description": "触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示", - "type": "Selector" - }, - { - "name": "_status", - "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", + "name": "_tm", + "description": "时间截, 如果时间截少于13位, 将自动补0到13位, ps: php时间截为10位", "type": "Int" - }, - { - "name": "_cb", - "description": "点击弹框确定按钮的回调\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" - }, - { - "name": "_cancelCb", - "description": "点击弹框取消按钮的回调\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" } ], "return": { - "description": "JC.Panel" - } + "description": "td selector, 如果 td class unable 不可选, 将忽略", + "type": "Selector|undefined" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Dialog": { - "name": "JC.Dialog", - "shortname": "JC.Dialog", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Dialog", - "file": "../comps/Panel/Panel.js", - "line": 1869, - "description": "带蒙板的会话弹框\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            requires: jQuery, Panel

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 201, + "description": "添加或者清除工作日样式", + "itemtype": "method", + "name": "workday", "static": 1, - "is_constructor": 1, "params": [ { - "name": "_selector", - "description": "自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers", - "type": "Selector|string" - }, - { - "name": "_headers", - "description": "定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys", - "type": "String" - }, - { - "name": "_bodys", - "description": "定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers", - "type": "String" + "name": "_td", + "description": "要设置为工作日状态的 td", + "type": "Selector" }, { - "name": "_footers", - "description": "定义模板的 footer 文字", - "type": "String" + "name": "_customSet", + "description": "如果 _customSet 为 undefined, 将设为工作日. \n 如果 _customSet 非 undefined, 那么根据真假值判断清除工作日/添加工作日", + "type": "Any" } ], - "return": { - "description": "JC.Panel" - } + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Dialog.msgbox": { - "name": "JC.Dialog.msgbox", - "shortname": "JC.Dialog.msgbox", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Dialog", - "file": "../comps/Panel/Panel.js", - "line": 1930, - "description": "会话框 msgbox 提示 (不带按钮)\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            private property see: JC.Dialog\n

            requires: jQuery, Panel, Dialog

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 217, + "description": "判断 td 是否为工作日状态", + "itemtype": "method", + "name": "isWorkday", "static": 1, - "is_constructor": 1, "params": [ { - "name": "_msg", - "description": "提示内容", - "type": "String" - }, - { - "name": "_status", - "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", - "type": "Int" - }, - { - "name": "_cb", - "description": "弹框自动关闭后的的回调, 如果 _cb 为 int 值, 将视为 _closeMs\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" - }, - { - "name": "_closeMs", - "description": "自动关闭的间隔, 单位毫秒, 默认 2000", - "type": "Int" + "name": "_td", + "description": "", + "type": "Selector" } ], "return": { - "description": "JC.Panel" - } + "description": "", + "type": "Bool" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Dialog.alert": { - "name": "JC.Dialog.alert", - "shortname": "JC.Dialog.alert", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Dialog", - "file": "../comps/Panel/Panel.js", - "line": 1974, - "description": "会话框 alert 提示\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            private property see: JC.Dialog\n

            requires: jQuery, Panel, Dialog

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 229, + "description": "添加或者清除假日样式", + "itemtype": "method", + "name": "holiday", "static": 1, - "is_constructor": 1, "params": [ { - "name": "_msg", - "description": "提示内容", - "type": "String" - }, - { - "name": "_status", - "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", - "type": "Int" + "name": "_td", + "description": "要设置为假日状态的 td", + "type": "Selector" }, { - "name": "_cb", - "description": "点击弹框确定按钮的回调\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" + "name": "_customSet", + "description": "如果 _customSet 为 undefined, 将设为假日. \n 如果 _customSet 非 undefined, 那么根据真假值判断清除假日/添加假日", + "type": "Any" } ], - "return": { - "description": "JC.Panel" - } + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Dialog.confirm": { - "name": "JC.Dialog.confirm", - "shortname": "JC.Dialog.confirm", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Dialog", - "file": "../comps/Panel/Panel.js", - "line": 2015, - "description": "会话框 confirm 提示\n
            注意, 这是个方法, 写 @class 属性是为了生成文档\n

            private property see: JC.Dialog\n

            requires: jQuery, Panel, Dialog

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "extends": "JC.Panel", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 245, + "description": "判断 td 是否为假日状态", + "itemtype": "method", + "name": "isHoliday", "static": 1, - "is_constructor": 1, "params": [ { - "name": "_msg", - "description": "提示内容", - "type": "String" - }, - { - "name": "_status", - "description": "显示弹框的状态, 0: 成功, 1: 错误, 2: 警告", - "type": "Int" - }, - { - "name": "_cb", - "description": "点击弹框确定按钮的回调\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" - }, - { - "name": "_cancelCb", - "description": "点击弹框取消按钮的回调\nfunction( _evtName, _panelIns ){\n var _btn = $(this);\n}", - "type": "Function" + "name": "_td", + "description": "", + "type": "Selector" } ], "return": { - "description": "JC.Panel" - } + "description": "", + "type": "Bool" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Dialog.mask": { - "name": "JC.Dialog.mask", - "shortname": "JC.Dialog.mask", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Dialog", - "file": "../comps/Panel/Panel.js", - "line": 2061, - "description": "显示或隐藏 蒙板\n
            注意, 这是个方法, 写 @class 属性是为了生成文档", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 257, + "description": "添加或者清除注释", + "itemtype": "method", + "name": "comment", "static": 1, - "is_constructor": 1, "params": [ { - "name": "_isHide", - "description": "空/假 显示蒙板, 为真 隐藏蒙板", - "type": "Bool" + "name": "_td", + "description": "要设置注释的 td", + "type": "Selector" + }, + { + "name": "_customSet", + "description": "如果 _customSet 为 undefined, 将清除注释. \n 如果 _customSet 为 string, 将添加注释", + "type": "String|bool" } - ] + ], + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Placeholder": { - "name": "JC.Placeholder", - "shortname": "JC.Placeholder", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Placeholder/Placeholder.js", - "line": 1, - "description": "Placeholder 占位符提示功能\n

            JC Project Site\n| API docs\n| demo link

            \n

            require: jQuery

            ", - "extends": "JC.BaseMVC", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 284, + "description": "判断 td 是否为注释状态", + "itemtype": "method", + "name": "isComment", + "static": 1, "params": [ { - "name": "_selector", + "name": "_td", "description": "", - "type": "Selector|string" + "type": "Selector" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 Team", - "date": "2013-10-19" + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Slider": { - "name": "JC.Slider", - "shortname": "JC.Slider", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Slider", - "file": "../comps/Slider/Slider.js", - "line": 3, - "description": "Slider 划动菜单类\n
            页面加载完毕后, Slider 会查找那些有 class = js_autoSlider 的标签进行自动初始化\n

            requires: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的 html attribute

            \n
            \n
            slidersubitems
            \n
            指定具体子元素是那些, selector ( 子元素默认是 layout的子标签 )
            \n\n
            sliderleft
            \n
            左移的触发selector
            \n\n
            sliderright
            \n
            右移的触发selector
            \n\n
            sliderwidth
            \n
            主容器宽度
            \n\n
            slideritemwidth
            \n
            子元素的宽度
            \n\n
            sliderhowmanyitem
            \n
            每次滚动多少个子元素, 默认1
            \n\n
            sliderdefaultpage
            \n
            默认显示第几页
            \n\n
            sliderstepms
            \n
            滚动效果运动的间隔时间(毫秒), 默认 5
            \n\n
            sliderdurationms
            \n
            滚动效果的总时间
            \n\n
            sliderdirection
            \n
            滚动的方向, 默认 horizontal, { horizontal, vertical }
            \n\n
            sliderloop
            \n
            是否循环滚动
            \n\n
            sliderinitedcb
            \n
            初始完毕后的回调函数, 便于进行更详细的声明
            \n\n
            sliderautomove
            \n
            是否自动滚动
            \n\n
            sliderautomovems
            \n
            自动滚动的间隔
            \n
            ", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 296, + "description": "返回 td 的注释", + "itemtype": "method", + "name": "getComment", + "static": 1, "params": [ { - "name": "_selector", + "name": "_td", "description": "", - "type": "Selector|string" + "type": "Selector" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 Team", - "date": "2013-07-20", - "example": [ - "\n \n \n \n \n \n \n \n \n \n \n
            \n 左边滚动\n \n
            dd\" sliderleft=\"a.js_slideleft\" sliderright=\"a.js_slideright\" \n sliderwidth=\"820\" slideritemwidth=\"160\"\n sliderdirection=\"horizontal\" sliderhowmanyitem=\"5\"\n sliderloop=\"false\" sliderdurationms=\"300\"\n sliderinitedcb=\"sliderinitedcb\"\n >\n
            content...
            \n
            content...
            \n
            content...
            \n
            \n
            \n 右边滚动\n
            \n" - ] + "return": { + "description": "", + "type": "String" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Slider.Model": { - "name": "JC.Slider.Model", - "shortname": "JC.Slider.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Slider", - "file": "../comps/Slider/Slider.js", - "line": 423, - "description": "Slider 的通用模型类", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 311, + "description": "用于分隔默认title和注释的分隔符", + "itemtype": "property", + "name": "commentSeparator", + "type": "string", + "default": "==========comment==========", + "static": 1, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 319, + "description": "把注释添加到 a title 里", + "itemtype": "method", + "name": "commentTitle", + "static": 1, "params": [ { - "name": "_layout", - "description": "", + "name": "_td", + "description": "要设置注释的 a 父容器 td", "type": "Selector" + }, + { + "name": "_title", + "description": "如果 _title 为真, 将把注释添加到a title里. \n 如果 _title 为假, 将从 a title 里删除注释", + "type": "String|undefined" } - ] + ], + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Suggest": { - "name": "JC.Suggest", - "shortname": "JC.Suggest", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Suggest/Suggest.js", - "line": 3, - "description": "Suggest 关键词补全提示类\n

            requires: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的 HTML attribute

            \n
            \n
            sugwidth: int
            \n
            显示列表的宽度
            \n\n
            suglayout: selector
            \n
            显示列表的容器
            \n\n
            sugdatacallback: string
            \n
            \n 请求 JSONP 数据的回调名\n
            注意: 是字符串, 不是函数, 并且确保 window 下没有同名函数\n
            \n\n
            suginitedcallback: string
            \n
            \n 初始化完毕后的回调名称\n
            \n\n
            sugurl: string
            \n
            \n 数据请求 URL API\n
            例: http://sug.so.360.cn/suggest/word?callback={1}&encodein=utf-8&encodeout=utf-8&word={0} \n
            {0}=关键词, {1}=回调名称\n
            \n\n
            sugqueryinterval: int, default = 200
            \n
            \n 设置用户输入内容时, 响应的间隔, 避免不必要的请求\n
            \n\n
            sugneedscripttag: bool, default=true
            \n
            \n 是否需要 自动添加 script 标签\n
            Sugggest 设计为支持三种数据格式: JSONP, AJAX, static data\n
            目前只支持 JSONP 数据\n
            \n\n
            sugselectedcallback: function
            \n
            用户鼠标点击选择关键词后的回调
            \n\n
            sugdatafilter: function
            \n
            数据过滤回调
            \n\n
            sugsubtagname: string, default = dd
            \n
            显式定义 suggest 列表的子标签名
            \n\n
            suglayouttpl: string
            \n
            显式定义 suggest 列表显示模板
            \n\n
            sugautoposition: bool, default = false
            \n
            式声明是否要自动识别显示位置
            \n\n
            sugoffsetleft: int, default = 0
            \n
            声明显示时, x轴的偏移像素
            \n\n
            sugoffsettop: int, default = 0
            \n
            声明显示时, y轴的偏移像素
            \n\n
            sugoffsetwidth: int, default = 0
            \n
            首次初始化时, layout的偏移宽度
            \n\n
            sugplaceholder: selector
            \n
            声明自动定位时, 显示位置的占位符标签
            \n\n
            sugprevententer: bool, default = false
            \n
            回车时, 是否阻止默认事件, 为真将阻止表单提交事件
            \n
            ", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 345, + "description": "从JSON数据更新日历状态( 工作日, 休息日, 注释 )\n
            注意, 该方法更新页面上所有的 LunarCalendar", + "itemtype": "method", + "name": "updateStatus", + "static": 1, "params": [ { - "name": "_selector", - "description": "", - "type": "Selector|string" + "name": "_data", + "description": "{ phpTimestamp:{ dayaction: 0|1|2, comment: string}, ... }\n
                  \n         dayaction: \n         0: delete workday/holiday\n         1: workday\n         2: holiday\n
            ", + "type": "Object" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 Team", - "date": "2013-08-11", "example": [ - "" - ] + "\n LunarCalendar.updateStatus( {\n \"1369843200\": {\n \"dayaction\": 2,\n \"comment\": \"dfdfgdsfgsdfgsdg'\\\"'asdf\\\"\\\"'sdf\"\n },\n \"1370966400\": {\n \"dayaction\": 0,\n \"comment\": \"asdfasdfsa\"\n },\n \"1371139200\": {\n \"dayaction\": 1\n },\n \"1371225600\": {\n \"dayaction\": 0,\n \"comment\": \"dddd\"\n }\n });" + ], + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Tab": { - "name": "JC.Tab", - "shortname": "JC.Tab", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tab", - "file": "../comps/Tab/Tab.js", - "line": 3, - "description": "Tab 菜单类\n
            DOM 加载完毕后\n, 只要鼠标移动到具有识别符的Tab上面, Tab就会自动初始化, 目前可识别: .js_autoTab( CSS class )\n
            需要手动初始化, 请使用: var ins = new JC.Tab( _tabSelector );\n

            JC Project Site\n| API docs\n| demo link

            \n

            require: jQuery

            \n

            Tab 容器的HTML属性

            \n
            \n
            tablabels
            \n
            声明 tab 标签的选择器语法
            \n\n
            tabcontainers
            \n
            声明 tab 容器的选择器语法
            \n\n
            tabactiveclass
            \n
            声明 tab当前标签的显示样式名, 默认为 cur
            \n\n
            tablabelparent
            \n
            声明 tab的当前显示样式是在父节点, 默认为 tab label 节点
            \n\n
            tabactivecallback
            \n
            当 tab label 被触发时的回调
            \n\n
            tabchangecallback
            \n
            当 tab label 变更时的回调
            \n
            \n

            Label(标签) 容器的HTML属性(AJAX)

            \n
            \n
            tabajaxurl
            \n
            ajax 请求的 URL 地址
            \n\n
            tabajaxmethod
            \n
            ajax 请求的方法( get|post ), 默认 get
            \n\n
            tabajaxdata
            \n
            ajax 请求的 数据, json
            \n\n
            tabajaxcallback
            \n
            ajax 请求的回调
            \n
            ", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 432, + "description": "LunarCalendar 内部初始化", + "itemtype": "method", + "name": "_init", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 463, + "description": "更新日历视图为自定义的日期", + "itemtype": "method", + "name": "update", "params": [ { - "name": "_selector", - "description": "要初始化的 Tab 选择器", - "type": "Selector|string" - }, - { - "name": "_triggerTarget", - "description": "初始完毕后要触发的 label", - "type": "Selector|string" + "name": "_date", + "description": "更新日历视图为 _date 所在日期的月份", + "type": "Date" } ], - "version": "dev 0.1", - "author": "qiushaowei | 360 75 Team", - "date": "2013-07-04", - "example": [ - "\n \n \n \n\n
            \n
            JC.Tab 示例 - 静态内容
            \n
            \n
            li > a\" tabcontainers=\"div.js_tabContent > div\" \n tabactiveclass=\"active\" tablabelparent=\"li\" \n tabactivecallback=\"tabactive\" tabchangecallback=\"tabchange\"\n >\n \n
            \n
            1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。
            \n
            2. 相送黄血富打万念却烟会华它表本雷烟形烟消卷效难标否标滑固小实。
            \n
            3. 理往局背剧养认被站推简沉形括於穿短,精白自没路绿往优八益是入。
            \n
            4. 鲁杆格滑那双来班五材实死听顶脱本续克修先课丝另乡型茶父报孔图。
            \n
            \n
            \n
            \n
            \n\n
            \n
            JC.Tab 示例 - 动态内容 - AJAX
            \n
            \n
            li > a\" tabcontainers=\"div.js_tabContent2 > div\" \n tabactiveclass=\"active\" tablabelparent=\"li\" \n tabactivecallback=\"tabactive\" tabchangecallback=\"tabchange\"\n >\n \n
            \n
            1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            " - ] + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Tab.Model": { - "name": "JC.Tab.Model", - "shortname": "JC.Tab.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tab", - "file": "../comps/Tab/Tab.js", - "line": 304, - "description": "Tab 数据模型类", - "is_constructor": 1, - "params": [ - { - "name": "_selector", - "description": "要初始化的 Tab 选择器", - "type": "Selector|string" - }, - { - "name": "_triggerTarget", - "description": "初始完毕后要触发的 label", - "type": "Selector|string" - } - ] + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 473, + "description": "显示下一个月的日期", + "itemtype": "method", + "name": "nextMonth", + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Tab.View": { - "name": "JC.Tab.View", - "shortname": "JC.Tab.View", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tab", - "file": "../comps/Tab/Tab.js", + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 483, + "description": "显示上一个月的日期", + "itemtype": "method", + "name": "preMonth", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 493, + "description": "显示下一年的日期", + "itemtype": "method", + "name": "nextYear", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 503, + "description": "显示上一年的日期", + "itemtype": "method", + "name": "preYear", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 513, + "description": "获取默认时间对象", + "itemtype": "method", + "name": "getDate", + "return": { + "description": "", + "type": "Date" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 519, + "description": "获取所有的默认时间对象", + "itemtype": "method", + "name": "getAllDate", + "return": { + "description": "{ date: 默认时间, minvalue: 有效最小时间\n , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 }", + "type": "Object" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 526, + "description": "获取当前选中的日期, 如果用户没有显式选择, 将查找当前日期, 如果两者都没有的话返回undefined", + "itemtype": "method", + "name": "getSelectedDate", + "return": { + "description": "", + "type": "Date" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 549, + "description": "获取初始化日历的选择器对象", + "itemtype": "method", + "name": "getContainer", + "return": { + "description": "selector" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", "line": 555, - "description": "Tab 视图模型类", - "is_constructor": 1, + "description": "获取日历的主选择器对象", + "itemtype": "method", + "name": "getLayout", + "return": { + "description": "selector" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 561, + "description": "判断日历是否隐藏操作控件", + "itemtype": "method", + "name": "isHideControl", + "return": { + "description": "bool" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 567, + "description": "使用 jquery on 绑定事件", + "itemtype": "method", + "name": "on", + "type": "String", "params": [ { - "name": "_model", + "name": "_evtName", "description": "", - "type": "JC.Tab.Model" - } - ] - }, - "JC.Tips": { - "name": "JC.Tips", - "shortname": "JC.Tips", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tips", - "file": "../comps/Tips/Tips.js", - "line": 3, - "description": "Tips 提示信息类\n
            显示标签的 title/tipsData 属性 为 Tips 样式\n

            导入该类后, 页面加载完毕后, 会自己初始化所有带 title/tipsData 属性的标签为 Tips效果的标签\n
            如果要禁用自动初始化, 请把静态属性 Tips.autoInit 置为 false

            \n

            注意: Tips 默认构造函数只处理单一标签\n
            , 如果需要处理多个标签, 请使用静态方法 Tips.init( _selector )

            \n

            requires: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            可用的 html attribute

            \n
            \n
            tipsinitedcallback: function
            \n
            初始完毕时的回调
            \n\n
            tipsshowcallback: function
            \n
            显示后的回调
            \n\n
            tipshidecallback: function
            \n
            隐藏后的回调
            \n\n
            tipstemplatebox: selector
            \n
            指定tips的显示模板
            \n\n
            tipsupdateonce: bool
            \n
            tips 内容只更新一次, 这个属性应当与 tipstemplatebox同时使用
            \n\n
            ", - "is_constructor": 1, - "params": [ + "type": "String" + }, { - "name": "_selector", - "description": "要显示 Tips 效果的标签, 这是单一标签, 需要显示多个请显示 Tips.init 方法", - "type": "Selector|string" + "name": "_cb", + "description": "", + "type": "Function" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 team", - "date": "2013-06-23", - "example": [ - "\n \n " - ] + "return": { + "description": "BaseMVCInstance" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Tips.Model": { - "name": "JC.Tips.Model", - "shortname": "JC.Tips.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tips", - "file": "../comps/Tips/Tips.js", - "line": 294, - "description": "Tips 数据模型类", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 575, + "description": "使用 jquery trigger 触发绑定事件", + "itemtype": "method", + "name": "trigger", + "type": "String", "params": [ { - "name": "_selector", + "name": "_evtName", "description": "", - "type": "Selector" + "type": "String" } - ] + ], + "return": { + "description": "BaseMVCInstance" + }, + "class": "JC.LunarCalendar", + "namespace": "JC" }, - "JC.Tips.View": { - "name": "JC.Tips.View", - "shortname": "JC.Tips.View", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tips", - "file": "../comps/Tips/Tips.js", - "line": 443, - "description": "Tips 视图类", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 583, + "description": "选择日期时触发的事件", + "itemtype": "event", + "name": "CLCSelectedItem", + "class": "JC.LunarCalendar", + "namespace": "JC" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 595, + "description": "LunarCalendar model 对象", + "itemtype": "property", + "name": "_model", + "type": "JC.LunarCalendar.Model", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 602, + "description": "LunarCalendar 的主容器", + "itemtype": "property", + "name": "layout", + "type": "selector", + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 611, + "description": "初始化 View", + "itemtype": "method", + "name": "_init", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 623, + "description": "初始化日历外观", + "itemtype": "method", + "name": "initLayout", "params": [ { - "name": "_model", + "name": "_date", "description": "", - "type": "JC.Tips.Model" + "type": "Date" } - ] + ], + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" }, - "JC.Tree": { - "name": "JC.Tree", - "shortname": "JC.Tree", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tree", - "file": "../comps/Tree/Tree.js", - "line": 3, - "description": "树菜单类 JC.Tree\n

            requires: jQuery, \nwindow.printf

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 638, + "description": "初始化年份", + "itemtype": "method", + "name": "initYear", "params": [ { - "name": "_selector", - "description": "树要显示的选择器", - "type": "Selector" - }, - { - "name": "_data", - "description": "树菜单的数据", - "type": "Object" + "name": "_dateObj", + "description": "", + "type": "DateObject" } ], - "version": "dev 0.1", - "author": "qiushaowei | 75 Team", - "date": "2013-06-29", - "example": [ - "\n \n \n \n
            " - ] - }, - "JC.Tree.Model": { - "name": "JC.Tree.Model", - "shortname": "JC.Tree.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC.Tree", - "file": "../comps/Tree/Tree.js", - "line": 238, - "description": "树的数据模型类", - "is_constructor": 1 - }, - "JC.Valid": { - "name": "JC.Valid", - "shortname": "JC.Valid", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../comps/Valid/Valid.js", - "line": 4, - "description": "表单验证 (单例模式)\n
            全局访问请使用 JC.Valid 或 Valid\n

            requires: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            \n

            Form 的可用 html attribute

            \n
            \n
            errorabort = bool, default = true
            \n
            \n 查检Form Control时, 如果发生错误是否继续检查下一个\n
            true: 继续检查, false, 停止检查下一个\n
            \n\n
            validmsg = bool | string
            \n
            \n 内容填写正确时显示的 提示信息, class=validmsg\n
            如果 = 0, false, 将不显示提示信息\n
            如果 = 1, true, 将不显示提示文本\n
            \n\n
            validemdisplaytype = string, default = inline
            \n
            \n 设置 表单所有控件的 em CSS display 显示类型\n
            \n
            \n

            Form Control的可用 html attribute

            \n
            \n
            reqmsg = 错误提示
            \n
            值不能为空, class=error errormsg
            \n\n
            errmsg = 错误提示
            \n
            格式错误, 但不验证为空的值, class=error errormsg
            \n\n
            focusmsg = 控件获得焦点的提示信息
            \n
            \n 这个只作提示用, class=focusmsg\n
            \n\n
            validmsg = bool | string
            \n
            \n 内容填写正确时显示的 提示信息, class=validmsg\n
            如果 = 0, false, 将不显示提示信息\n
            如果 = 1, true, 将不显示提示文本\n
            \n\n
            emel = selector
            \n
            显示错误信息的selector
            \n\n
            validel = selector
            \n
            显示正确信息的selector
            \n\n
            focusel = selector
            \n
            显示提示信息的selector
            \n\n
            validemdisplaytype = string, default = inline
            \n
            \n 设置 em 的 CSS display 显示类型\n
            \n\n
            ignoreprocess = bool, default = false
            \n
            验证表单控件时, 是否忽略
            \n\n
            minlength = int(最小长度)
            \n
            验证内容的最小长度, 但不验证为空的值
            \n\n
            maxlength = int(最大长度)
            \n
            验证内容的最大长度, 但不验证为空的值
            \n\n
            minvalue = [number|ISO date](最小值)
            \n
            验证内容的最小值, 但不验证为空的值
            \n\n
            maxvalue = [number|ISO date](最大值)
            \n
            验证内容的最大值, 但不验证为空的值
            \n\n
            validitemcallback = function name
            \n
            \n 对一个 control 作检查后的回调, 无论正确与否都会触发, window 变量域\nfunction validItemCallback( _item, _isValid){\n JC.log( _item.attr('name'), _isValid );\n}\n
            \n\n
            datatype: 常用数据类型
            \n
            n: 检查是否为正确的数字
            \n
            n-i.f: 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], n-7.2 = 0.00 ~ 9999999.99
            \n
            \n nrange: 检查两个control的数值范围\n
            \n
            html attr fromNEl: 指定开始的 control
            \n
            html attr toNEl: 指定结束的 control
            \n
            如果不指定 fromNEl, toNEl, 默认是从父节点下面找到 nrange, 按顺序定为 fromNEl, toNEl
            \n
            \n
            \n
            d: 检查是否为正确的日期, YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD
            \n
            \n daterange: 检查两个control的日期范围\n
            \n
            html attr fromDateEl: 指定开始的 control
            \n
            html attr toDateEl: 指定结束的 control
            \n
            如果不指定 fromDateEl, toDateEl, 默认是从父节点下面找到 daterange, 按顺序定为 fromDateEl, toDateEl
            \n
            \n
            \n
            time: 是否为正确的时间, hh:mm:ss
            \n
            minute: 是否为正确的时间, hh:mm
            \n
            \n bankcard: 是否为正确的银行卡\n
            格式为: d{15}, d{16}, d{17}, d{19}\n
            \n
            \n cnname: 中文姓名\n
            格式: 汉字和大小写字母\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节\n
            \n
            \n username: 注册用户名\n
            格式: a-zA-Z0-9_-\n
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30\n
            \n
            idnumber: 身份证号码, 15~18 位
            \n
            mobilecode: 手机号码, 11位, (13|14|15|16|18|19)[\\d]{9}
            \n
            mobile: mobilecode 的别名
            \n
            mobilezonecode: 带 国家代码的手机号码, [+国家代码] [零]11位数字
            \n
            phonecode: 电话号码, 7~8 位数字, [1-9][0-9]{6,7}
            \n
            phone: 带区号的电话号码, [区号][空格|空白|-]7~8位电话号码
            \n
            phoneall: 带国家代码, 区号, 分机号的电话号码, [+国家代码][区号][空格|空白|-]7~8位电话号码#1~6位
            \n
            phonezone: 电话区号, 3~4位数字. phonezone-n,m 可指定位数长度
            \n
            phoneext: 电话分机号, 1~6位数字
            \n
            countrycode: 地区代码, [+]1~6位数字
            \n
            mobilephone: mobilecode | phone
            \n
            mobilephoneall: mobilezonecode | phoneall
            \n
            reg: 自定义正则校验, /正则规则/[igm]
            \n
            \n vcode: 验证码, 0-9a-zA-Z, 长度 默认为4\n
            可通过 vcode-[\\d], 指定验证码长度\n
            \n
            \n text: 显示声明检查的内容为文本类型\n
            默认就是 text, 没有特殊原因其实不用显示声明\n
            \n
            \n bytetext: 声明按字节检查文本长度\n
            ASCII 算一个字符, 非 ASCII 算两个字符\n
            \n
            url: URL 格式, ftp, http, https
            \n
            domain: 匹配域名, 宽松模式, 允许匹配 http(s), 且结尾允许匹配反斜扛(/)
            \n
            stricdomain: 匹配域名, 严格模式, 不允许匹配 http(s), 且结尾不允许匹配反斜扛(/)
            \n
            email: 电子邮件
            \n
            zipcode: 邮政编码, 0~6位数字
            \n
            taxcode: 纳税人识别号, 长度: 15, 18, 20
            \n\n
            \n
            \n
            checkbox: 默认需要至少选中N 个 checkbox
            \n
            \n 默认必须选中一个 checkbox\n
            如果需要选中N个, 用这种格式 checkbox-n, checkbox-3 = 必须选中三个\n
            datatarget: 声明所有 checkbox 的选择器\n
            \n
            \n
            \n\n
            \n
            \n
            file: 判断文件扩展名
            \n
            属性名(文件扩展名列表): fileext
            \n
            格式: .ext[, .ext]
            \n
            \n <input type=\"file\" \n reqmsg=\"文件\" \n errmsg=\"允许上传的文件类型: .gif, .jpg, .jpeg, .png\"\n datatype=\"file\" \n fileext=\".gif, .jpg, .jpeg, .png\" \n />\n <label>.gif, .jpg, .jpeg, .png</label>\n <em class=\"error\"></em>\n <em class=\"validmsg\"></em>\n\n
            \n
            \n
            \n\n
            subdatatype: 特殊数据类型, 以逗号分隔多个属性
            \n
            \n
            \n
            alternative: N 个 Control 必须至少有一个非空的值
            \n
            datatarget: 显式指定同一组 control, 默认在父级下查找[subdatatype=alternative]
            \n
            alternativedatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            alternativemsg: N 选一的错误提示
            \n\n
            \n alternativeReqTarget: 为 alternative node 指定一个不能为空的 node\n
            请使用 subdatatype = reqtarget, 这个附加属性将弃除\n
            \n
            alternativeReqmsg: alternativeReqTarget 目标 node 的html属性, 错误时显示的提示信息
            \n
            \n
            \n
            \n
            \n
            reqtarget: 如果 selector 的值非空, 那么 datatarget 的值也不能为空
            \n
            datatarget: 显式指定 目标 target
            \n
            reqTargetDatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            reqtargetmsg: target node 用于显示错误提示的 html 属性
            \n
            \n
            \n
            \n
            \n
            reconfirm: N 个 Control 的值必须保持一致
            \n
            datatarget: 显式指定同一组 control, 默认在父级下查找[subdatatype=reconfirm]
            \n
            reconfirmdatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            reconfirmmsg: 值不一致时的错误提示
            \n
            \n
            \n
            \n
            \n
            unique: N 个 Control 的值必须保持唯一性, 不能有重复
            \n
            datatarget: 显式指定同一组 control, 默认在父级下查找[subdatatype=unique]
            \n
            uniquedatatarget: 与 datatarget相同, 区别是优先级高于 datatarget
            \n
            uniquemsg: 值有重复的提示信息
            \n
            uniqueIgnoreCase: 是否忽略大小写
            \n
            uniqueIgnoreEmpty: 是否忽略空的值, 如果组中有空值也会被忽略
            \n
            unique-n 可以指定 N 个为一组的匹配, unique-2 = 2个一组, unique-3: 三个一组
            \n
            \n
            \n
            \n
            \n
            datavalid: 判断 control 的值是否合法( 通过HTTP请求验证 )
            \n
            datavalidMsg: 值不合法时的提示信息
            \n
            \n datavalidUrl: 验证内容正确与否的 url api\n

            {\"errorno\":0,\"errmsg\":\"\"}

            \n errorno: 0( 正确 ), 非0( 错误 )\n

            datavalidurl=\"./data/handler.php?key={0}\"

            \n {0} 代表 value\n
            \n
            \n datavalidCallback: 请求 datavalidUrl 后调用的回调\nfunction datavalidCallback( _json ){\n var _selector = $(this);\n});\n
            \n datavalidKeyupCallback: 每次 keyup 的回调\nfunction datavalidKeyupCallback( _evt ){\n var _selector = $(this);\n});\n
            \n
            \n datavalidUrlFilter: 请求数据前对 url 进行操作的回调\nfunction datavalidUrlFilter( _url ){\n var _selector = $(this);\n _url = addUrlParams( _url, { 'xtest': 'customData' } );\n return _url;\n});\n
            \n
            \n \n
            \n
            \n
            hidden: 验证隐藏域的值
            \n
            \n 有些特殊情况需要验证隐藏域的值, 请使用 subdatatype=\"hidden\"\n
            \n
            \n
            \n", - "static": 1, - "version": "0.1, 2013-05-22", - "author": "qiushaowei | 75 team" - }, - "window.jQuery": { - "name": "window.jQuery", - "shortname": "window.jQuery", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window", - "file": "../lib.js", - "line": 1, - "description": "jQuery JavaScript Library v1.9.1\n
            http://jquery.com/\n\nIncludes Sizzle.js\nhttp://sizzlejs.com/\n\nCopyright 2005, 2012 jQuery Foundation, Inc. and other contributors\nReleased under the MIT license\nhttp://jquery.org/license\nDate: 2013-2-4
            ", - "global": "" - }, - ".window": { - "name": ".window", - "shortname": ".window", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "", - "file": "../lib.js", - "line": 23, - "description": "全局函数", - "static": 1 - }, - "window.JC": { - "name": "window.JC", - "shortname": "window.JC", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window", - "file": "../lib.js", - "line": 859, - "description": "JC jquery 组件库 资源调用控制类\n
            这是一个单例模式, 全局访问使用 JC 或 window.JC\n

            requires: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "static": 1, - "example": [ - " \n JC.use( 组件名[,组件名] );" - ], - "author": "qiushaowei | 75 team", - "date": "2013-08-04" - }, - "window.UXC": { - "name": "window.UXC", - "shortname": "window.UXC", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "window", - "file": "../lib.js", - "line": 1146, - "description": "UXC 是 JC 的别名\n
            存在这个变量是为了向后兼容\n
            20130804 之前的命名空间是 UXC, 这个命名空间在一段时间后将会清除, 请使用 JC 命名空间\n

            see: JC

            ", - "static": 1, - "date": "2013-05-22" - }, - "JC.Bizs": { - "name": "JC.Bizs", - "shortname": "window.Bizs", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../lib.js", - "line": 1165, - "description": "

            业务逻辑命名空间

            \n
            这个命名空间的组件主要为满足业务需求, 不是通用组件~\n
            但在某个项目中应该是常用组件~\n
            \n
            业务组件的存放位置:
            \n
            libpath/bizs/
            \n\n
            使用业务组件
            \n
            JC.use( 'Bizs.BizComps' ); // libpath/bizs/BizComps/BizComps.js
            \n\n
            使用业务文件
            \n
            JC.use( 'bizs.BizFile' ); // libpath/bizs/BizFile.js
            \n
            ", - "static": 1 + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" }, - "JC.BaseMVC": { - "name": "JC.BaseMVC", - "shortname": "JC.BaseMVC", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../lib.js", - "line": 1190, - "description": "MVC 抽象类 ( 仅供扩展用 )\n

            这个类默认已经包含在lib.js里面, 不需要显式引用

            \n

            require: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 647, + "description": "初始化月份", + "itemtype": "method", + "name": "initMonth", "params": [ { - "name": "_selector", + "name": "_dateObj", "description": "", - "type": "Selector|string" + "type": "DateObject" } ], - "version": "dev 0.1 2013-09-07", - "author": "qiushaowei | 75 Team" + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" }, - "JC.BaseMVC.Model": { - "name": "JC.BaseMVC.Model", - "shortname": "JC.BaseMVC.Model", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "namespace": "JC", - "file": "../lib.js", - "line": 1396, - "description": "MVC Model 类( 仅供扩展用 )\n

            这个类默认已经包含在lib.js里面, 不需要显式引用

            \n

            require: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            ", - "is_constructor": 1, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 656, + "description": "初始化月份的所有日期", + "itemtype": "method", + "name": "_logic.initMonthDate", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector|string" + "name": "_dateObj", + "description": "保存所有相关日期的对象", + "type": "DateObjects" } ], - "version": "dev 0.1 2013-09-11", - "author": "qiushaowei | 75 Team" - } - }, - "classitems": [ + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" + }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 117, - "description": "获取或设置 ActionLogic 的实例", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 757, + "description": "把具体的公历和农历日期写进a标签的title里", "itemtype": "method", - "name": "getInstance", + "name": "addTitle", "params": [ { - "name": "_selector", + "name": "_td", "description": "", "type": "Selector" } ], - "static": 1, - "return": { - "description": "", - "type": "ActionLogic instance" - }, - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 133, - "description": "判断 selector 是否可以初始化 ActionLogic", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 767, + "description": "检查是否要隐藏操作控件", + "itemtype": "method", + "name": "hideControl", + "class": "JC.LunarCalendar.View", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 788, + "description": "LunarCalendar 所要显示的selector", + "itemtype": "property", + "name": "container", + "type": "selector", + "default": "document.body", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 795, + "description": "初始化时的时期", + "itemtype": "property", + "name": "date", + "type": "date", + "default": "new Date()", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 802, + "description": "日历默认模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "JC.LunarCalendar._deftpl", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 809, + "description": "显示日历时所需要的所有日期对象", + "itemtype": "property", + "name": "dateObj", + "type": "Object", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 815, + "description": "a 标签 title 的临时存储对象", + "itemtype": "property", + "name": "_titleObj", + "type": "Object", + "default": "{}", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 859, + "description": "获取初始日期对象", "itemtype": "method", - "name": "isActionLogic", + "name": "getDate", "params": [ { "name": "_selector", - "description": "", + "description": "显示日历组件的input", "type": "Selector" } ], - "static": 1, - "return": { - "description": "bool" - }, - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 148, - "description": "批量初始化 ActionLogic\n
            页面加载完毕时, 已使用 事件代理 初始化\n
            如果是弹框中的 ActionLogic, 由于事件冒泡被阻止了, 需要显示调用 init 方法", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 883, + "description": "把日期赋值给文本框", "itemtype": "method", - "name": "init", + "name": "setDate", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "_timestamp", + "description": "日期对象的时间戳", + "type": "Int" } ], - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 167, - "description": "初始化 ActionLogic, 并执行", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 893, + "description": "给文本框赋值, 日期为控件的当前日期", "itemtype": "method", - "name": "process", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], + "name": "setSelectedDate", "return": { - "description": "", - "type": "Instance|null" + "description": "0/1", + "type": "Int" }, + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 925, + "description": "LunarCalendar 日历默认模板", + "itemtype": "property", + "name": "_deftpl", + "type": "string", "static": 1, - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 195, - "description": "脚本模板 Panel", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 999, + "description": "监听上一年按钮", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 201, - "description": "显示 Panel", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1008, + "description": "监听上一月按钮", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 213, - "description": "ajax Panel", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1017, + "description": "监听下一月按钮", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 243, - "description": "跳转到 URL", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1026, + "description": "监听下一年按钮", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 252, - "description": "ajax 执行操作", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1035, + "description": "监听年份按钮, 是否要显示年份列表", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 286, - "description": "处理错误提示", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1057, + "description": "监听月份按钮, 是否要显示月份列表", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 318, - "description": "处理二次确认", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1072, + "description": "监听年份列表选择状态", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 338, - "description": "处理成功提示", - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1084, + "description": "监听月份列表选择状态", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/ActionLogic/ActionLogic.js", - "line": 371, - "description": "执行操作", - "itemtype": "method", - "name": "process", - "return": { - "description": "", - "type": "ActionLogicInstance" - }, - "class": "window.Bizs.ActionLogic", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1096, + "description": "监听日期单元格点击事件", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/CommonModify/CommonModify.js", - "line": 204, - "description": "获取 显示 CommonModify 的触发源选择器, 比如 a 标签", - "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" - }, - "class": "window.Bizs.CommonModify", - "namespace": "window.Bizs" + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1127, + "description": "监听body点击事件, 点击时隐藏日历控件的年份和月份列表", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/CommonModify/CommonModify.js", - "line": 210, - "description": "使用 jquery on 绑定事件", + "file": "../comps/LunarCalendar/LunarCalendar.default.js", + "line": 1133, + "description": "DOM 加载完毕后, 初始化日历组件", + "itemtype": "event", + "name": "dom ready", + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar.Model", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.getFestival.js", + "line": 3, + "description": "返回农历和国历的所在日期的所有节日\n
            假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 }\n
            返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 }", "itemtype": "method", - "name": "on", - "type": "String", + "name": "getFestivals", + "static": 1, "params": [ { - "name": "_evtName", - "description": "", - "type": "String" + "name": "_lunarDate", + "description": "农历日期对象, 由JC.LunarCalendar.gregorianToLunar 获取", + "type": "Object" }, { - "name": "_cb", - "description": "", - "type": "Function" + "name": "_greDate", + "description": "日期对象", + "type": "Date" } ], "return": { - "description": "CommonModifyInstance" + "description": "Object" }, - "class": "window.Bizs.CommonModify", - "namespace": "window.Bizs" + "class": "JC.LunarCalendar", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/CommonModify/CommonModify.js", - "line": 218, - "description": "使用 jquery trigger 绑定事件", + "file": "../comps/LunarCalendar/LunarCalendar.getFestival.js", + "line": 195, + "description": "为数字添加前置0", "itemtype": "method", - "name": "trigger", - "type": "String", + "name": "JC.LunarCalendar.getFestival.intPad", "params": [ { - "name": "_evtName", - "description": "", - "type": "String" + "name": "_n", + "description": "需要添加前置0的数字", + "type": "Int" + }, + { + "name": "_len", + "description": "需要添加_len个0, 默认为2", + "type": "Int" } ], "return": { - "description": "CommonModifyInstance" + "description": "", + "type": "String" }, - "class": "window.Bizs.CommonModify", - "namespace": "window.Bizs" - }, - { - "file": "../bizs/CommonModify/CommonModify.js", - "line": 229, - "description": "update current selector", - "class": "window.Bizs.CommonModify", - "namespace": "window.Bizs" + "static": 1, + "access": "private", + "tagname": "", + "class": "JC.LunarCalendar", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/CommonModify/CommonModify.js", - "line": 241, - "description": "获取或设置 CommonModify 的实例", + "file": "../comps/LunarCalendar/LunarCalendar.gregorianToLunar.js", + "line": 2, + "description": "从公历日期获得农历日期\n
            返回的数据格式\n
            \n       {\n           shengxiao: ''   //生肖\n           , ganzhi: ''    //干支\n           , yue: ''       //月份\n           , ri: ''        //日\n           , shi: ''       //时\n           , year: ''      //农历数字年\n           , month: ''     //农历数字月\n           , day: ''       //农历数字天\n           , hour: ''      //农历数字时\n       };\n
            ", "itemtype": "method", - "name": "getInstance", + "name": "gregorianToLunar", + "static": 1, "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "_date", + "description": "要获取农历日期的时间对象", + "type": "Date" } ], - "static": 1, "return": { - "description": "", - "type": "CommonModify instance" + "description": "Object" }, - "class": "window.Bizs.CommonModify", - "namespace": "window.Bizs" + "class": "JC.LunarCalendar", + "namespace": "JC.LunarCalendar" + }, + { + "file": "../comps/LunarCalendar/LunarCalendar.js", + "line": 8, + "description": "这个判断是为了向后兼容 JC 0.1\n使用 requirejs 的项目可以移除这段判断代码", + "class": "JC.NumericStepper", + "namespace": "JC.LunarCalendar" }, { - "file": "../bizs/CommonModify/CommonModify.js", - "line": 255, - "description": "判断 selector 是否可以初始化 CommonModify", + "file": "../comps/NumericStepper/NumericStepper.js", + "line": 100, + "description": "初始化可识别的 NumericStepper 实例", "itemtype": "method", - "name": "isCommonModify", + "name": "init", "params": [ { "name": "_selector", @@ -1781,74 +10396,81 @@ ], "static": 1, "return": { - "description": "bool" + "description": "", + "type": "Array of NumericStepperInstance" }, - "class": "window.Bizs.CommonModify", - "namespace": "window.Bizs" + "class": "JC.NumericStepper", + "namespace": "JC" }, { - "file": "../bizs/DisableLogic/DisableLogic.js", - "line": 162, - "description": "获取 显示 DisableLogic 的触发源选择器, 比如 a 标签", + "file": "../comps/NumericStepper/NumericStepper.js", + "line": 123, + "description": "按下鼠标时 重复执行的频率", + "itemtype": "property", + "name": "redoMs", + "type": "ms", + "default": "100", + "static": 1, + "class": "JC.NumericStepper", + "namespace": "JC" + }, + { + "file": "../comps/NumericStepper/NumericStepper.js", + "line": 131, + "description": "按下鼠标时 延迟 多少毫秒执行重复执行", + "itemtype": "property", + "name": "timeoutMs", + "type": "ms", + "default": "100", + "static": 1, + "class": "JC.NumericStepper", + "namespace": "JC" + }, + { + "file": "../comps/NumericStepper/NumericStepper.js", + "line": 248, + "description": "增加一个 step", "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" - }, - "class": "window.Bizs.DisableLogic", - "namespace": "window.Bizs" + "name": "plus", + "class": "JC.NumericStepper", + "namespace": "JC" }, { - "file": "../bizs/DisableLogic/DisableLogic.js", - "line": 168, - "description": "使用 jquery on 绑定事件", + "file": "../comps/NumericStepper/NumericStepper.js", + "line": 257, + "description": "减少一个 step", "itemtype": "method", - "name": "on", - "type": "String", - "params": [ - { - "name": "_evtName", - "description": "", - "type": "String" - }, - { - "name": "_cb", - "description": "", - "type": "Function" - } - ], - "return": { - "description": "DisableLogicInstance" - }, - "class": "window.Bizs.DisableLogic", - "namespace": "window.Bizs" + "name": "minus", + "class": "JC.NumericStepper", + "namespace": "JC" }, { - "file": "../bizs/DisableLogic/DisableLogic.js", - "line": 176, - "description": "使用 jquery trigger 绑定事件", + "file": "../comps/Paginator/Paginator.js", + "line": 62, + "description": "获取或设置 Paginator 的实例", "itemtype": "method", - "name": "trigger", - "type": "String", + "name": "getInstance", "params": [ { - "name": "_evtName", + "name": "_selector", "description": "", - "type": "String" + "type": "Selector" } ], + "static": 1, "return": { - "description": "DisableLogicInstance" + "description": "", + "type": "PaginatorInstance" }, - "class": "window.Bizs.DisableLogic", - "namespace": "window.Bizs" + "class": "JC.Paginator", + "namespace": "JC" }, { - "file": "../bizs/DisableLogic/DisableLogic.js", - "line": 184, - "description": "获取或设置 DisableLogic 的实例", + "file": "../comps/Paginator/Paginator.js", + "line": 77, + "description": "初始化可识别的 Paginator 实例", "itemtype": "method", - "name": "getInstance", + "name": "init", "params": [ { "name": "_selector", @@ -1859,467 +10481,658 @@ "static": 1, "return": { "description": "", - "type": "DisableLogic instance" + "type": "Array of PaginatorInstance" }, - "class": "window.Bizs.DisableLogic", - "namespace": "window.Bizs" + "class": "JC.Paginator", + "namespace": "JC" }, { - "file": "../bizs/DisableLogic/DisableLogic.js", - "line": 204, - "description": "初始化 _selector | document 可识别的 DisableLogic HTML属性", + "file": "../comps/Paginator/Paginator.js", + "line": 327, + "description": "显示表格内容", + "class": "JC.Paginator", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 74, + "description": "是否支持多层蒙板", + "itemtype": "property", + "name": "MULTI_MASK", + "type": "boolean", + "default": "true", + "static": 1, + "class": "JC.Dialog", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 98, + "description": "会话弹框逻辑处理方法集", + "itemtype": "property", + "name": "_logic", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 105, + "description": "设置会话弹框的唯一性", "itemtype": "method", - "name": "init", + "name": "_logic.dialogIdentifier", + "access": "private", + "tagname": "", "params": [ { - "name": "_selector,", - "description": "default = document", - "type": "Selector" + "name": "_panel", + "description": "", + "type": "JC.Panel" } ], + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 129, + "description": "隐藏蒙板", + "itemtype": "method", + "name": "_logic.hideMask", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 182, + "description": "显示蒙板", + "itemtype": "method", + "name": "_logic.showMask", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 202, + "description": "延时处理的指针属性", + "itemtype": "property", + "name": "_logic.timeout", + "type": "setTimeout", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 210, + "description": "延时显示弹框\n
            延时是为了使用户绑定的 show 事件能够被执行", + "itemtype": "property", + "name": "_logic.showMs", + "type": "int millisecond", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 219, + "description": "窗口改变大小时, 改变蒙板的大小,\n
            这个方法主要为了兼容 IE6", + "itemtype": "method", + "name": "_logic.setMaskSizeForIe6", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 242, + "description": "保存会话弹框的所有默认模板", + "itemtype": "property", + "name": "_logic.tpls", + "type": "Object", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 250, + "description": "会话弹框的蒙板模板", + "itemtype": "property", + "name": "_logic.tpls.mask", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.js", + "line": 264, + "description": "响应窗口改变大小和滚动", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.popup.js", + "line": 37, + "description": "自定义 JC.Dialog.alert 的显示模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "undefined", "static": 1, - "class": "window.Bizs.DisableLogic", - "namespace": "window.Bizs" + "class": "JC.Dialog.msgbox", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 253, - "description": "获取或设置 FormLogic 的实例", + "file": "../comps/Panel/Dialog.popup.js", + "line": 77, + "description": "自定义 JC.Dialog.alert 的显示模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "undefined", + "static": 1, + "class": "JC.Dialog.alert", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.popup.js", + "line": 122, + "description": "自定义 JC.Dialog.confirm 的显示模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "undefined", + "static": 1, + "class": "JC.Dialog.confirm", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.popup.js", + "line": 132, + "description": "弹框最小宽度", + "itemtype": "property", + "name": "_logic.minWidth", + "type": "int", + "default": "180", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.popup.js", + "line": 141, + "description": "弹框最大宽度", + "itemtype": "property", + "name": "_logic.maxWidth", + "type": "int", + "default": "500", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" + }, + { + "file": "../comps/Panel/Dialog.popup.js", + "line": 150, + "description": "获取弹框的显示状态, 默认为0(成功)", "itemtype": "method", - "name": "getInstance", + "name": "_logic.fixWidth", + "access": "private", + "tagname": "", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "_status", + "description": "弹框状态: 0:成功, 1:失败, 2:警告", + "type": "Int" } ], - "static": 1, "return": { "description": "", - "type": "FormLogic instance" + "type": "Int" }, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "class": "JC.Dialog", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 275, - "description": "处理 form 或者 _selector 的所有form.js_bizsFormLogic", + "file": "../comps/Panel/Dialog.popup.js", + "line": 168, + "description": "修正弹框的默认显示宽度", "itemtype": "method", - "name": "init", + "name": "_logic.fixWidth", + "access": "private", + "tagname": "", "params": [ { - "name": "_selector", + "name": "_msg", + "description": "查显示的文本", + "type": "String" + }, + { + "name": "_panel", "description": "", - "type": "Selector" + "type": "JC.Panel" } ], - "return": { - "description": "Array of FormLogicInstance", - "type": "Array" - }, - "static": 1, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "class": "JC.Dialog", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 296, - "description": "msgbox 提示框的自动关闭时间", + "file": "../comps/Panel/Dialog.popup.js", + "line": 184, + "description": "保存会话弹框的所有默认模板", "itemtype": "property", - "name": "popupCloseMs", - "type": "int", - "default": "2000", - "static": 1, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "name": "_logic.tpls", + "type": "Object", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 304, - "description": "AJAX 表单的提交类型\n
            plugins, form\n
            plugins 可以支持文件上传", + "file": "../comps/Panel/Dialog.popup.js", + "line": 192, + "description": "msgbox 会话弹框的默认模板", "itemtype": "property", - "name": "popupCloseMs", + "name": "_logic.tpls.msgbox", "type": "string", - "default": "empty", - "static": 1, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 314, - "description": "表单提交后, 是否禁用提交按钮", + "file": "../comps/Panel/Dialog.popup.js", + "line": 212, + "description": "alert 会话弹框的默认模板", "itemtype": "property", - "name": "submitDisable", - "type": "bool", - "default": "true", - "static": 1, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "name": "_logic.tpls.alert", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 322, - "description": "表单提交后, 是否重置表单内容", + "file": "../comps/Panel/Dialog.popup.js", + "line": 235, + "description": "confirm 会话弹框的默认模板", "itemtype": "property", - "name": "resetAfterSubmit", - "type": "bool", - "default": "true", - "static": 1, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "name": "_logic.tpls.confirm", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.Dialog", + "namespace": "JC.Dialog" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 330, - "description": "表单提交时, 内容填写不完整时触发的全局回调", + "file": "../comps/Panel/Panel.default.js", + "line": 146, + "description": "存放数据的model层, see Panel.Model", "itemtype": "property", - "name": "processErrorCb", - "type": "function", - "default": "null", - "static": 1, - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" - }, - { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 352, - "description": "默认 form 提交处理事件\n这个如果是 AJAX 的话, 无法上传 文件", - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" - }, - { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 413, - "description": "全局 AJAX 提交完成后的处理事件", - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" - }, - { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 417, - "description": "这是个神奇的BUG\nchrome 如果没有 reset button, 触发 reset 会导致页面刷新", - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "name": "_model", + "access": "private", + "tagname": "", + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/FormLogic/FormLogic.js", - "line": 461, - "description": "表单内容验证通过后, 开始提交前的处理事件", - "class": "window.Bizs.FormLogic", - "namespace": "window.Bizs" + "file": "../comps/Panel/Panel.default.js", + "line": 152, + "description": "控制视图的view层, see Panel.View", + "itemtype": "property", + "name": "_view", + "access": "private", + "tagname": "", + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 52, - "description": "处理 _selector 的所有 child", + "file": "../comps/Panel/Panel.default.js", + "line": 161, + "description": "从 selector 获取 Panel 的实例\n
            如果从DOM初始化, 不进行判断的话, 会重复初始化多次", "itemtype": "method", - "name": "process", + "name": "getInstance", "params": [ { "name": "_selector", "description": "", "type": "Selector" - }, - { - "name": "_ignoreSameLinkText", - "description": "", - "type": "Bool" } ], + "static": 1, "return": { "description": "", - "type": "KillISPCacheInstance" + "type": "Panel instance" }, - "class": "window.Bizs.KillISPCache", - "namespace": "window.Bizs" + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 79, - "description": "获取 KillISPCache 实例 ( 单例模式 )", - "itemtype": "method", - "name": "getInstance", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], + "file": "../comps/Panel/Panel.default.js", + "line": 176, + "description": "显示Panel时, 是否 fixed 居中", + "itemtype": "property", + "name": "FIXED", + "type": "bool", + "default": "false", "static": 1, - "return": { - "description": "", - "type": "KillISPCacheInstance" - }, - "class": "window.Bizs.KillISPCache", - "namespace": "window.Bizs" + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 91, - "description": "是否忽略 url 跟 文本 相同的节点", + "file": "../comps/Panel/Panel.default.js", + "line": 184, + "description": "显示Panel时, 是否 focus 到 按钮上\nfocusButton", "itemtype": "property", - "name": "ignoreSameLinkText", + "name": "focusButton", "type": "bool", "default": "true", "static": 1, - "class": "window.Bizs.KillISPCache", - "namespace": "window.Bizs" + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 99, - "description": "自定义随机数的参数名", + "file": "../comps/Panel/Panel.default.js", + "line": 193, + "description": "页面点击时, 是否自动关闭 Panel", "itemtype": "property", - "name": "randName", - "type": "string", - "default": "empty", + "name": "clickClose", + "type": "bool", + "default": "true", "static": 1, - "class": "window.Bizs.KillISPCache", - "namespace": "window.Bizs" + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 107, - "description": "添加忽略随机数的 ULR", + "file": "../comps/Panel/Panel.default.js", + "line": 201, + "description": "自动关闭的时间间隔, 单位毫秒\n
            调用 ins.autoClose() 时生效", + "itemtype": "property", + "name": "autoCloseMs", + "type": "int", + "default": "2000", + "static": 1, + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 210, + "description": "修正弹框的默认显示宽度", "itemtype": "method", - "name": "ignoreUrl", + "name": "_fixWidth", "params": [ { - "name": "_url!~YUIDOC_LINE~!return", - "description": "Array", - "type": "String|Array" + "name": "_msg", + "description": "查显示的文本", + "type": "String" + }, + { + "name": "_panel", + "description": "", + "type": "JC.Panel" + }, + { + "name": "_minWidth", + "description": "", + "type": "Int" + }, + { + "name": "_maxWidth", + "description": "", + "type": "Int" } ], "static": 1, - "class": "window.Bizs.KillISPCache", - "namespace": "window.Bizs" + "access": "private", + "tagname": "", + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/KillISPCache/KillISPCache.js", - "line": 118, - "description": "添加忽略随机数的 选择器", + "file": "../comps/Panel/Panel.default.js", + "line": 233, + "description": "获取 显示的 BUTTON", "itemtype": "method", - "name": "ignoreSelector", + "name": "_getButton", "params": [ { - "name": "_selector!~YUIDOC_LINE~!return", - "description": "Array", - "type": "Selector|Array" + "name": "_type", + "description": "0: 没有 BUTTON, 1: confirm, 2: confirm + cancel", + "type": "Int" } ], "static": 1, - "class": "window.Bizs.KillISPCache", - "namespace": "window.Bizs" + "access": "private", + "tagname": "", + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/MultiDate/MultiDate.js", - "line": 124, - "description": "获取或设置 MultiDate 的实例", + "file": "../comps/Panel/Panel.default.js", + "line": 257, + "description": "初始化Panel", "itemtype": "method", - "name": "getInstance", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "static": 1, - "return": { - "description": "", - "type": "MultiDateInstance" - }, - "class": "window.Bizs.MultiDate", - "namespace": "window.Bizs" + "name": "_init", + "access": "private", + "tagname": "", + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../bizs/MultiDate/MultiDate.js", - "line": 140, - "description": "判断 selector 是否可以初始化 MultiDate", + "file": "../comps/Panel/Panel.default.js", + "line": 267, + "description": "初始化Panel 默认事件", + "access": "private", + "tagname": "", + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 290, + "description": "为Panel绑定事件\n
            内置事件类型有 show, hide, close, center, confirm, cancel\n, beforeshow, beforehide, beforeclose, beforecenter\n
            用户可通过 HTML eventtype 属性自定义事件类型", "itemtype": "method", - "name": "isMultiDate", + "name": "on", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "_evtName", + "description": "要绑定的事件名", + "type": "String" + }, + { + "name": "_cb", + "description": "要绑定的事件回调函数", + "type": "Function" } ], - "static": 1, - "return": { - "description": "bool" - }, - "class": "window.Bizs.MultiDate", - "namespace": "window.Bizs" + "example": [ + "\n //绑定内置事件\n \n \n\n //绑定自定义事件\n \n " + ], + "class": "JC.Panel", + "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 147, - "description": "获取或设置 AjaxUpload 的实例", + "file": "../comps/Panel/Panel.default.js", + "line": 316, + "description": "显示 Panel\n
            Panel初始后, 默认是隐藏状态, 显示 Panel 需要显式调用 show 方法", "itemtype": "method", - "name": "getInstance", + "name": "show", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "_position", + "description": "指定 panel 要显示的位置, \n
            如果 _position 为 int: 0, 表示屏幕居中显示\n
            如果 _position 为 selector: Paenl 的显示位置将基于 _position 的上下左右", + "type": "Int|selector" } ], - "return": { - "description": "", - "type": "AjaxUploadInstance" - }, - "static": 1, - "class": "JC.AjaxUpload", + "example": [ + "\n panelInstace.show(); //默认显示\n panelInstace.show( 0 ); //居中显示\n panelInstace.show( _selector ); //位于 _selector 的上下左右" + ], + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 163, - "description": "初始化可识别的组件", + "file": "../comps/Panel/Panel.default.js", + "line": 370, + "description": "设置Panel的显示位置基于 _src 的左右上下", "itemtype": "method", - "name": "init", + "name": "positionWith", "params": [ { - "name": "_selector", + "name": "_src", "description": "", "type": "Selector" + }, + { + "name": "_selectorDiretion", + "description": "如果 _src 为 selector, _selectorDiretion 可以指定 top, 显示在上方", + "type": "String" } ], - "return": { - "description": "instance array", - "type": "Array" - }, - "static": 1, - "class": "JC.AjaxUpload", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 183, - "description": "frame 文件名", - "itemtype": "property", - "name": "frameFileName", - "type": "string", - "default": "\"default.html\"", - "static": 1, - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 382, + "description": "隐藏 Panel\n
            隐藏 Panel 设置 css display:none, 不会从DOM 删除 Panel", + "itemtype": "method", + "name": "hide", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 191, - "description": "载入 frame 文件时, 是否添加随机数防止缓存", - "itemtype": "property", - "name": "randomFrame", - "type": "bool", - "default": "false", - "static": 1, - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 393, + "description": "关闭 Panel\n
            关闭 Panel 是直接从 DOM 中删除 Panel", + "itemtype": "method", + "name": "close", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 199, - "description": "frame 文件夹位于库的位置", - "itemtype": "property", - "name": "_FRAME_DIR", - "type": "string", - "default": "\"comps/AjaxUpload/frame/\"", - "static": 1, - "access": "private", - "tagname": "", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 405, + "description": "判断点击页面时, 是否自动关闭 Panel", + "itemtype": "method", + "name": "isClickClose", + "return": { + "description": "bool" + }, + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 208, - "description": "初始化 frame 时递增的统计变量", - "itemtype": "property", - "name": "_INS_COUNT", - "type": "int", - "default": "1", - "access": "protected", - "tagname": "", - "static": 1, - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 414, + "description": "点击页面时, 添加自动隐藏功能", + "itemtype": "method", + "name": "clickClose", + "params": [ + { + "name": "_removeAutoClose", + "description": "", + "type": "Bool" + } + ], + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 228, - "description": "iframe 加载完毕后触发的事件, 执行初始化操作", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 425, + "description": "clickClose 的别名\n
            这个方法的存在是为了向后兼容, 请使用 clickClose", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 262, - "description": "文件扩展名错误", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 434, + "description": "添加自动关闭功能", + "itemtype": "method", + "name": "autoClose", + "params": [ + { + "name": "_removeAutoClose", + "description": "", + "type": "Bool" + } + ], + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 269, - "description": "上传前触发的事件", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 460, + "description": "focus 到 button\n
            优先查找 input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]\n
            input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]", + "itemtype": "method", + "name": "focusButton", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 275, - "description": "上传完毕触发的事件", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 467, + "description": "从DOM清除Panel\n
            close 方法清除 Panel可以被用户阻止, 该方法不会被用户阻止", + "itemtype": "method", + "name": "dispose", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 312, - "description": "frame 的按钮样式改变后触发的事件\n需要更新 frame 的宽高", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 478, + "description": "把 Panel 位置设为屏幕居中", + "itemtype": "method", + "name": "center", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 329, - "description": "手动更新数据", + "file": "../comps/Panel/Panel.default.js", + "line": 489, + "description": "返回 Panel 的 jquery dom选择器对象\n
            这个方法以后将会清除, 请使用 layout 方法", "itemtype": "method", - "name": "update", - "params": [ - { - "name": "_d", - "description": "", - "type": "Object" - } - ], + "name": "selector", "return": { - "description": "AjaxUploadInstance" + "description": "", + "type": "Selector" }, - "example": [ - "\n JC.AjaxUpload.getInstance( _selector ).update( {\n \"errorno\": 0, \n \"data\":\n {\n \"url\": \"/ignore/JQueryComps_dev/comps/AjaxUpload/_demo/data/images/test.jpg\", \n \"name\": \"test.jpg\"\n }, \n \"errmsg\": \"\"\n });" - ], - "class": "JC.AjaxUpload", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AjaxUpload/AjaxUpload.js", - "line": 451, - "description": "恢复默认状态", - "class": "JC.AjaxUpload", + "file": "../comps/Panel/Panel.default.js", + "line": 496, + "description": "返回 Panel 的 jquery dom选择器对象", + "itemtype": "method", + "name": "layout", + "return": { + "description": "", + "type": "Selector" + }, + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 101, - "description": "初始化 _selector 的所有 input[checktype][checkfor]", + "file": "../comps/Panel/Panel.default.js", + "line": 502, + "description": "从 Panel 选择器中查找内容\n
            添加这个方法是为了方便jquery 使用者的习惯", "itemtype": "method", - "name": "init", + "name": "find", "params": [ { "name": "_selector", @@ -2327,812 +11140,990 @@ "type": "Selector" } ], - "static": 1, - "class": "JC.AutoChecked", - "namespace": "JC" - }, - { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 172, - "description": "更新 全选状态", - "itemtype": "method", - "name": "update", - "class": "JC.AutoChecked", - "namespace": "JC" - }, - { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 181, - "description": "获取 显示 AutoChecked 的触发源选择器, 比如 a 标签", - "itemtype": "method", - "name": "selector", "return": { "description": "selector" }, - "class": "JC.AutoChecked", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 187, - "description": "使用 jquery on 绑定事件", + "file": "../comps/Panel/Panel.default.js", + "line": 510, + "description": "触发 Panel 已绑定的事件\n
            用户可以使用该方法主动触发绑定的事件", "itemtype": "method", - "name": "on", - "type": "String", + "name": "trigger", "params": [ { "name": "_evtName", - "description": "", + "description": "要触发的事件名, 必填参数", "type": "String" }, { - "name": "_cb", + "name": "_srcElement", + "description": "触发事件的源对象, 可选参数", + "type": "Selector" + } + ], + "example": [ + "\n panelInstace.trigger('close');\n panelInstace.trigger('userevent', sourceElement);" + ], + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 546, + "description": "获取或者设置 Panel Header 的HTML内容\n
            如果 Panel默认没有 Header的话, 使用该方法 _html 非空可动态创建一个Header", + "itemtype": "method", + "name": "header", + "params": [ + { + "name": "_html", "description": "", - "type": "Function" + "type": "String" } ], "return": { - "description": "AutoCheckedInstance" + "description": "header 的HTML内容", + "type": "String" }, - "class": "JC.AutoChecked", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 195, - "description": "使用 jquery trigger 绑定事件", + "file": "../comps/Panel/Panel.default.js", + "line": 560, + "description": "获取或者设置 Panel body 的HTML内容", "itemtype": "method", - "name": "trigger", - "type": "String", + "name": "body", "params": [ { - "name": "_evtName", + "name": "_html", "description": "", "type": "String" } ], "return": { - "description": "AutoCheckedInstance" + "description": "body 的HTML内容", + "type": "String" }, - "class": "JC.AutoChecked", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 203, - "description": "获取或设置 AutoChecked 的实例", + "file": "../comps/Panel/Panel.default.js", + "line": 573, + "description": "获取或者设置 Panel footer 的HTML内容\n
            如果 Panel默认没有 footer的话, 使用该方法 _html 非空可动态创建一个footer", "itemtype": "method", - "name": "getInstance", + "name": "footer", "params": [ { - "name": "_selector", + "name": "_html", "description": "", - "type": "Selector" + "type": "String" } ], - "static": 1, "return": { - "description": "", - "type": "AutoChecked instance" + "description": "footer 的HTML内容", + "type": "String" }, - "class": "JC.AutoChecked", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoChecked/AutoChecked.js", - "line": 219, - "description": "判断 selector 是否可以初始化 AutoChecked", + "file": "../comps/Panel/Panel.default.js", + "line": 587, + "description": "获取或者设置 Panel 的HTML内容", "itemtype": "method", - "name": "isAutoChecked", + "name": "panel", "params": [ { - "name": "_selector", + "name": "_html", "description": "", - "type": "Selector" + "type": "String" } ], - "static": 1, "return": { - "description": "bool" + "description": "panel 的HTML内容", + "type": "String" }, - "class": "JC.AutoChecked", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 128, - "description": "判断 selector 是否为符合自动初始化联动框的要求", + "file": "../comps/Panel/Panel.default.js", + "line": 600, + "description": "获取 html popup/dialog 的触发 node", "itemtype": "method", - "name": "isSelect", + "name": "triggerSelector", "params": [ { - "name": "_selector", + "name": "_setterSelector", "description": "", "type": "Selector" } ], "return": { - "description": "bool" + "description": "", + "type": "Selector|null" }, - "static": 1, - "class": "JC.AutoSelect", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 145, - "description": "是否自动隐藏空值的级联下拉框, 起始下拉框不会被隐藏\n
            这个是全局设置, 如果需要对具体某个select进行处理, 对应的 HTML 属性 selecthideempty", - "itemtype": "property", - "name": "hideEmpty", - "type": "bool", - "default": "false", - "static": 1, + "file": "../comps/Panel/Panel.default.js", + "line": 614, + "description": "Panel 显示前会触发的事件
            \n这个事件在用户调用 _panelInstance.show() 时触发", + "itemtype": "event", + "name": "beforeshow", + "type": "function", "example": [ - "\n AutoSelect.hideEmpty = true;" + " \n panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });" ], - "class": "JC.AutoSelect", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 156, - "description": "级联下拉框的数据过滤函数\n
            默认数据格式: [ [id, name], [id, name] ... ]\n
            如果获取到的数据格式非默认格式, 可通过本函数进行数据过滤\n

            \n 注意, 这个是全局过滤, 如果要使用该函数进行数据过滤, 判断逻辑需要比较具体\n
            如果要对具体 select 进行数据过滤, 可以使用HTML属性 selectdatafilter 指定过滤函数\n

            ", - "itemtype": "property", - "name": "dataFilter", + "file": "../comps/Panel/Panel.default.js", + "line": 622, + "description": "显示Panel时会触发的事件", + "itemtype": "event", + "name": "show", "type": "function", - "default": "null", - "static": 1, "example": [ - "\n AutoSelect.dataFilter = \n function( _data, _select ){\n var _r = _data;\n if( _data && !_data.length && _data.data ){\n _r = _data.data;\n }\n return _r;\n };" + " \n panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });" ], - "class": "JC.AutoSelect", + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 179, - "description": "下拉框初始化功能都是未初始化 数据之前的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectbeforeInited", - "itemtype": "property", - "name": "beforeInited", + "file": "../comps/Panel/Panel.default.js", + "line": 629, + "description": "Panel 隐藏前会触发的事件
            \n
            这个事件在用户调用 _panelInstance.hide() 时触发", + "itemtype": "event", + "name": "beforehide", "type": "function", - "default": "null", - "static": 1, - "class": "JC.AutoSelect", + "example": [ + " \n panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });" + ], + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 637, + "description": "Panel 隐藏时会触发的事件
            \n
            这个事件在用户调用 _panelInstance.hide() 时触发", + "itemtype": "event", + "name": "hide", + "type": "function", + "example": [ + " \n panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });" + ], + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 645, + "description": "Panel 关闭前会触发的事件
            \n这个事件在用户调用 _panelInstance.close() 时触发", + "itemtype": "event", + "name": "beforeclose", + "type": "function", + "example": [ + " \n \n " + ], + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 656, + "description": "关闭事件", + "itemtype": "event", + "name": "close", + "type": "function", + "example": [ + " \n \n " + ], + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 666, + "description": "Panel 居中显示前会触发的事件
            \n这个事件在用户调用 _panelInstance.center() 时触发", + "itemtype": "event", + "name": "beforecenter", + "type": "function", + "example": [ + " \n panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });" + ], + "class": "JC.Panel", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 674, + "description": "Panel 居中后会触发的事件", + "itemtype": "event", + "name": "center", + "type": "function", + "example": [ + " \n panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });" + ], + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 188, - "description": "下拉框第一次初始完所有数据的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectinited", - "itemtype": "property", - "name": "inited", + "file": "../comps/Panel/Panel.default.js", + "line": 681, + "description": "Panel 点击确认按钮触发的事件", + "itemtype": "event", + "name": "confirm", "type": "function", - "default": "null", - "static": 1, - "class": "JC.AutoSelect", + "example": [ + " \n \n " + ], + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 197, - "description": "下拉框每个项数据变更后的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectchange", - "itemtype": "property", - "name": "change", + "file": "../comps/Panel/Panel.default.js", + "line": 691, + "description": "Panel 点击确取消按钮触发的事件", + "itemtype": "event", + "name": "cancel", "type": "function", - "default": "null", - "static": 1, - "class": "JC.AutoSelect", + "example": [ + " \n \n " + ], + "class": "JC.Panel", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 206, - "description": "下拉框所有项数据变更后的回调\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectallchanged", + "file": "../comps/Panel/Panel.default.js", + "line": 714, + "description": "panel 的 HTML 对象或者字符串\n
            这是初始化时的原始数据", "itemtype": "property", - "name": "allChanged", - "type": "function", - "default": "null", - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "selector", + "type": "selector|string", + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 215, - "description": "第一次初始化所有联动框时, 是否触发 change 事件\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selecttriggerinitchange", + "file": "../comps/Panel/Panel.default.js", + "line": 721, + "description": "header 内容 \n
            这是初始化时的原始数据", "itemtype": "property", - "name": "triggerInitChange", - "type": "bool", - "default": "false", - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "headers", + "type": "string", + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 224, - "description": "ajax 请求数据时, 是否添加随机参数防止缓存\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectrandomurl", + "file": "../comps/Panel/Panel.default.js", + "line": 728, + "description": "body 内容\n
            这是初始化时的原始数据", "itemtype": "property", - "name": "randomurl", - "type": "bool", - "default": "false", - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "bodys", + "type": "string", + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 233, - "description": "处理 ajax url 的回调处理函数\n
            这个是全局回调, 如果需要对具体某一组进行处理, 对应的 HTML 属性 selectprocessurl", + "file": "../comps/Panel/Panel.default.js", + "line": 735, + "description": "footers 内容\n
            这是初始化时的原始数据", "itemtype": "property", - "name": "processUrl", - "type": "function", - "default": "null", - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "footers", + "type": "string", + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 242, - "description": "首次初始化时, 是否需要请求新数据\n
            有时 联动框太多, 载入页面时, 后端直接把初始数据输出, 避免请求过多", + "file": "../comps/Panel/Panel.default.js", + "line": 742, + "description": "panel 初始化后的 selector 对象", "itemtype": "property", - "name": "ignoreInitRequest", - "type": "bool", - "default": "false", - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "panel", + "type": "selector", + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 251, - "description": "获取或设置 selector 的实例引用", - "itemtype": "method", - "name": "getInstance", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - }, - { - "name": "_ins", - "description": "", - "type": "AutoSelectControlerInstance" - } - ], - "return": { - "description": "AutoSelectControlerInstance" - }, - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "file": "../comps/Panel/Panel.default.js", + "line": 748, + "description": "存储用户事件和默认事件的对象", + "itemtype": "property", + "name": "_events", + "type": "Object", + "access": "private", + "tagname": "", + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 268, - "description": "清除 select 的 所有 option, 带有属性 defaultoption 例外", + "file": "../comps/Panel/Panel.default.js", + "line": 759, + "description": "Model 初始化方法", "itemtype": "method", - "name": "removeItems", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], + "name": "_init", + "access": "private", + "tagname": "", "return": { - "description": "deleted items number", - "type": "Int" + "description": "", + "type": "Model instance" }, - "static": 1, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 349, - "description": "使用 jquery on 绑定事件", + "file": "../comps/Panel/Panel.default.js", + "line": 803, + "description": "添加事件方法", "itemtype": "method", - "name": "on", - "type": "String", + "name": "addEvent", "params": [ { "name": "_evtName", - "description": "", + "description": "事件名", "type": "String" }, { "name": "_cb", - "description": "", + "description": "事件的回调函数", "type": "Function" } ], - "return": { - "description": "AutoSelectInstance" - }, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 357, - "description": "使用 jquery trigger 绑定事件", + "file": "../comps/Panel/Panel.default.js", + "line": 819, + "description": "获取事件方法", "itemtype": "method", - "name": "trigger", - "type": "String", + "name": "getEvent", "params": [ { "name": "_evtName", - "description": "", + "description": "事件名", "type": "String" } ], "return": { - "description": "AutoSelectInstance" + "description": "某类事件类型的所有回调", + "type": "Array" }, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.Model", + "namespace": "JC.Panel" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 364, - "description": "获取第一个 select", + "file": "../comps/Panel/Panel.default.js", + "line": 881, + "description": "Panel的基础数据类, see Panel.Model", + "itemtype": "property", + "name": "_model", + "type": "Panel.Model", + "access": "private", + "tagname": "", + "class": "JC.Panel.View", + "namespace": "JC.Panel" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 888, + "description": "默认模板", + "prototype": "_tpl", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.Panel.View", + "namespace": "JC.Panel" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 900, + "description": "View 的初始方法", "itemtype": "method", - "name": "first", - "return": { - "description": "selector" - }, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "_init", + "access": "private", + "tagname": "", + "class": "JC.Panel.View" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 924, + "description": "设置Panel的显示位置基于 _src 的左右上下", + "itemtype": "method", + "name": "positionWith", + "params": [ + { + "name": "_src", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Panel.View" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 963, + "description": "显示 Panel", + "itemtype": "method", + "name": "show", + "class": "JC.Panel.View" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 972, + "description": "focus button", + "itemtype": "method", + "name": "focus button", + "class": "JC.Panel.View" + }, + { + "file": "../comps/Panel/Panel.default.js", + "line": 983, + "description": "隐藏 Panel", + "itemtype": "method", + "name": "hide", + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 370, - "description": "获取最后一个 select", + "file": "../comps/Panel/Panel.default.js", + "line": 991, + "description": "关闭 Panel", "itemtype": "method", - "name": "last", - "return": { - "description": "selector" - }, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "close", + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 376, - "description": "获取所有 select", + "file": "../comps/Panel/Panel.default.js", + "line": 1000, + "description": "获取 Panel 的 selector 对象", "itemtype": "method", - "name": "items", + "name": "getPanel", "return": { "description": "selector" }, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 382, - "description": "是否为第一个 select", + "file": "../comps/Panel/Panel.default.js", + "line": 1012, + "description": "获取或设置Panel的 header 内容, see Panel.header", "itemtype": "method", - "name": "isFirst", + "name": "getHeader", "params": [ { - "name": "_selector", + "name": "_udata", "description": "", - "type": "Selector" + "type": "String" } ], "return": { - "description": "selector" + "description": "string" }, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 389, - "description": "是否为最后一个 select", + "file": "../comps/Panel/Panel.default.js", + "line": 1032, + "description": "获取或设置Panel的 body 内容, see Panel.body", "itemtype": "method", - "name": "isLast", + "name": "getBody", "params": [ { - "name": "_selector", + "name": "_udata", "description": "", - "type": "Selector" + "type": "String" } ], "return": { - "description": "selector" + "description": "string" }, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 396, - "description": "是否已经初始化过", + "file": "../comps/Panel/Panel.default.js", + "line": 1048, + "description": "获取或设置Panel的 footer 内容, see Panel.footer", "itemtype": "method", - "name": "isInited", + "name": "getFooter", "params": [ { - "name": "_selector", + "name": "_udata", "description": "", - "type": "Selector" + "type": "String" } ], "return": { - "description": "selector" + "description": "string" }, - "class": "JC.AutoSelect", - "namespace": "JC" + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 403, - "description": "获取 select 的数据", + "file": "../comps/Panel/Panel.default.js", + "line": 1068, + "description": "居中显示 Panel", "itemtype": "method", - "name": "data", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "JSON" - }, - "class": "JC.AutoSelect", - "namespace": "JC" + "name": "center", + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 410, - "description": "更新默认选中列表", - "itemtype": "method", - "name": "update", - "params": [ - { - "name": "_ls", - "description": "ids for selected, (string with \",\" or array of ids );", - "type": "Array|string" - } - ], - "return": { - "description": "AutoSelectInstance" - }, - "class": "JC.AutoSelect", - "namespace": "JC" + "file": "../comps/Panel/Panel.default.js", + "line": 1164, + "description": "Panel 的默认模板", + "access": "private", + "tagname": "", + "class": "JC.Panel.View" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 852, - "description": "判断下拉框的option里是否有给定的值", - "params": [ - { - "name": "_select", - "description": "", - "type": "Selector" - }, - { - "name": "_val", - "description": "要查找的值", - "type": "String" - } - ], - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.default.js", + "line": 1222, + "description": "监听Panel的所有点击事件\n
            如果事件源有 eventtype 属性, 则会触发eventtype的事件类型", + "itemtype": "event", + "name": "Panel click", + "access": "private", + "tagname": "", + "class": "JC.hideAllPopup", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 925, - "description": "初始化之事的事件", - "itemtype": "event", - "name": "SelectBeforeInited", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.default.js", + "line": 1312, + "description": "返回选择器的 矩形 位置", + "class": "JC.hideAllPopup", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 929, - "description": "初始化后的事件", - "itemtype": "event", - "name": "SelectInited", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.default.js", + "line": 1349, + "description": "从 HTML 属性 自动执行 popup", + "attr": "{function} panelcancelcallback cancel 回调", + "class": "JC.hideAllPopup", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 933, - "description": "响应每个 select 的 change 事件", - "itemtype": "event", - "name": "SelectChange", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.default.js", + "line": 1391, + "description": "隐藏关闭按钮", + "class": "JC.hideAllPopup", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 937, - "description": "最后一个 select change 后的事件", - "itemtype": "event", - "name": "SelectAllChanged", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.js", + "line": 3, + "description": "这个判断是为了向后兼容 JC 0.1\n使用 requirejs 的项目可以移除这段判断代码", + "class": "JC.msgbox", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 941, - "description": "select 更新数据之前触发的事件", - "itemtype": "event", - "name": "SelectItemBeforeUpdate", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.popup.js", + "line": 41, + "description": "自定义 JC.msgbox 的显示模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "undefined", + "static": 1, + "class": "JC.msgbox", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 945, - "description": "select 更新数据之后触发的事件", - "itemtype": "event", - "name": "SelectItemUpdated", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.popup.js", + "line": 79, + "description": "自定义 JC.alert 的显示模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "undefined", + "static": 1, + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/AutoSelect/AutoSelect.js", - "line": 949, - "description": "页面加载完毕时, 延时进行自动化, 延时可以避免来自其他逻辑的干扰", - "class": "JC.AutoSelect", + "file": "../comps/Panel/Panel.popup.js", + "line": 123, + "description": "自定义 JC.confirm 的显示模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "undefined", + "static": 1, + "class": "JC.confirm", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 139, - "description": "内部初始化函数", - "itemtype": "method", - "name": "_init", + "file": "../comps/Panel/Panel.popup.js", + "line": 131, + "description": "弹框逻辑处理方法集", + "itemtype": "property", + "name": "_logic", "access": "private", "tagname": "", - "class": "JC.Calendar", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 164, - "description": "初始化相关操作事件", - "itemtype": "method", - "name": "_initHanlderEvent", + "file": "../comps/Panel/Panel.popup.js", + "line": 138, + "description": "弹框最小宽度", + "itemtype": "property", + "name": "_logic.minWidth", + "type": "int", + "default": "180", "access": "private", "tagname": "", - "class": "JC.Calendar", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 246, - "description": "显示 Calendar", - "itemtype": "method", - "name": "show", - "return": { - "description": "CalendarInstance" - }, - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 147, + "description": "弹框最大宽度", + "itemtype": "property", + "name": "_logic.maxWidth", + "type": "int", + "default": "500", + "access": "private", + "tagname": "", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 259, - "description": "隐藏 Calendar", - "itemtype": "method", - "name": "hide", - "return": { - "description": "CalendarInstance" - }, - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 156, + "description": "显示时 X轴的偏移值", + "itemtype": "property", + "name": "_logic.xoffset", + "type": "number", + "default": "9", + "access": "private", + "tagname": "", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 270, - "description": "获取 显示 Calendar 的触发源选择器, 比如 a 标签", - "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" - }, - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 165, + "description": "显示时 Y轴的偏移值", + "itemtype": "property", + "name": "_logic.yoffset", + "type": "number", + "default": "3", + "access": "private", + "tagname": "", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 276, - "description": "获取 Calendar 外观的 选择器", + "file": "../comps/Panel/Panel.popup.js", + "line": 174, + "description": "设置弹框的唯一性", "itemtype": "method", - "name": "layout", - "return": { - "description": "selector" - }, - "class": "JC.Calendar", + "name": "_logic.popupIdentifier", + "access": "private", + "tagname": "", + "params": [ + { + "name": "_panel", + "description": "", + "type": "JC.Panel" + } + ], + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 282, - "description": "使用 jquery on 绑定事件", + "file": "../comps/Panel/Panel.popup.js", + "line": 198, + "description": "弹框通用处理方法", "itemtype": "method", - "name": "on", - "type": "String", + "name": "_logic.popup", + "access": "private", + "tagname": "", "params": [ { - "name": "_evtName", - "description": "", + "name": "_tpl", + "description": "弹框模板", + "type": "String" + }, + { + "name": "_msg", + "description": "弹框提示", "type": "String" }, + { + "name": "_popupSrc", + "description": "弹框事件源对象", + "type": "Selector" + }, + { + "name": "_status", + "description": "弹框状态", + "type": "Int" + }, { "name": "_cb", - "description": "", + "description": "confirm 回调", "type": "Function" } ], "return": { - "description": "CalendarInstance" + "description": "JC.Panel" }, - "class": "JC.Calendar", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 290, - "description": "使用 jquery trigger 绑定事件", + "file": "../comps/Panel/Panel.popup.js", + "line": 270, + "description": "隐藏弹框缓动效果", "itemtype": "method", - "name": "trigger", - "type": "String", + "name": "_logic.hideEffect", + "access": "private", + "tagname": "", "params": [ { - "name": "_evtName", + "name": "_panel", "description": "", - "type": "String" + "type": "JC.Panel" + }, + { + "name": "_popupSrc", + "description": "", + "type": "Selector" + }, + { + "name": "_doneCb", + "description": "缓动完成后的回调", + "type": "Function" } ], - "return": { - "description": "CalendarInstance" - }, - "class": "JC.Calendar", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 297, - "description": "用户操作日期控件时响应改变", + "file": "../comps/Panel/Panel.popup.js", + "line": 323, + "description": "隐藏弹框缓动效果", "itemtype": "method", - "name": "updateLayout", - "class": "JC.Calendar", + "name": "_logic.showEffect", + "access": "private", + "tagname": "", + "params": [ + { + "name": "_panel", + "description": "", + "type": "JC.Panel" + }, + { + "name": "_popupSrc", + "description": "", + "type": "Selector" + } + ], + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 306, - "description": "切换到不同日期控件源时, 更新对应的控件源", + "file": "../comps/Panel/Panel.popup.js", + "line": 378, + "description": "设置 Panel 的默认X,Y轴", "itemtype": "method", - "name": "updateSelector", + "name": "_logic.onresize", + "access": "private", + "tagname": "", "params": [ { - "name": "_selector", + "name": "_panel", "description": "", "type": "Selector" } ], - "class": "JC.Calendar", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 317, - "description": "用户改变年份时, 更新到对应的年份", + "file": "../comps/Panel/Panel.popup.js", + "line": 414, + "description": "取得弹框最要显示的 y 轴", "itemtype": "method", - "name": "updateYear", + "name": "_logic.getTop", + "access": "private", + "tagname": "", "params": [ + { + "name": "_scrTop", + "description": "滚动条Y位置", + "type": "Number" + }, + { + "name": "_srcHeight", + "description": "事件源 高度", + "type": "Number" + }, + { + "name": "_targetHeight", + "description": "弹框高度", + "type": "Number" + }, { "name": "_offset", - "description": "", - "type": "Int" + "description": "Y轴偏移值", + "type": "Number" } ], - "class": "JC.Calendar", + "return": { + "description": "", + "type": "Number" + }, + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 328, - "description": "用户改变月份时, 更新到对应的月份", + "file": "../comps/Panel/Panel.popup.js", + "line": 435, + "description": "取得弹框最要显示的 x 轴", "itemtype": "method", - "name": "updateMonth", + "name": "_logic.getLeft", + "access": "private", + "tagname": "", "params": [ + { + "name": "_scrTop", + "description": "滚动条Y位置", + "type": "Number" + }, + { + "name": "_srcHeight", + "description": "事件源 高度", + "type": "Number" + }, + { + "name": "_targetHeight", + "description": "弹框高度", + "type": "Number" + }, { "name": "_offset", - "description": "", - "type": "Int" + "description": "Y轴偏移值", + "type": "Number" } ], - "class": "JC.Calendar", + "return": { + "description": "", + "type": "Number" + }, + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 339, - "description": "把选中的值赋给控件源\n
            用户点击日期/确定按钮", + "file": "../comps/Panel/Panel.popup.js", + "line": 458, + "description": "修正弹框的默认显示宽度", "itemtype": "method", - "name": "updateSelected", + "name": "_logic.fixWidth", + "access": "private", + "tagname": "", "params": [ { - "name": "_userSelectedItem", + "name": "_msg", + "description": "查显示的文本", + "type": "String" + }, + { + "name": "_panel", "description": "", - "type": "Selector" + "type": "JC.Panel" } ], - "class": "JC.Calendar", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 351, - "description": "显示日历外观到对应的控件源", + "file": "../comps/Panel/Panel.popup.js", + "line": 475, + "description": "获取弹框的显示状态, 默认为0(成功)", "itemtype": "method", - "name": "updatePosition", - "class": "JC.Calendar", + "name": "_logic.fixWidth", + "access": "private", + "tagname": "", + "params": [ + { + "name": "_status", + "description": "弹框状态: 0:成功, 1:失败, 2:警告", + "type": "Int" + } + ], + "return": { + "description": "", + "type": "Int" + }, + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 360, - "description": "清除控件源内容", - "itemtype": "method", - "name": "clear", - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 493, + "description": "保存弹框的所有默认模板", + "itemtype": "property", + "name": "_logic.tpls", + "type": "Object", + "access": "private", + "tagname": "", + "class": "JC.alert", + "namespace": "JC" + }, + { + "file": "../comps/Panel/Panel.popup.js", + "line": 501, + "description": "msgbox 弹框的默认模板", + "itemtype": "property", + "name": "_logic.tpls.msgbox", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 371, - "description": "用户点击取消按钮时隐藏日历外观", - "itemtype": "method", - "name": "cancel", - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 521, + "description": "alert 弹框的默认模板", + "itemtype": "property", + "name": "_logic.tpls.alert", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 381, - "description": "返回日历外观是否可见", - "itemtype": "method", - "name": "visible", - "return": { - "description": "bool" - }, - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 544, + "description": "confirm 弹框的默认模板", + "itemtype": "property", + "name": "_logic.tpls.confirm", + "type": "string", + "access": "private", + "tagname": "", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 395, - "description": "获取控件源的初始日期对象", - "itemtype": "method", - "name": "defaultDate", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "class": "JC.Calendar", + "file": "../comps/Panel/Panel.popup.js", + "line": 570, + "description": "响应窗口改变大小", + "class": "JC.alert", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 405, - "description": "获取或设置 Calendar 的实例", + "file": "../comps/Placeholder/Placeholder.js", + "line": 42, + "description": "获取或设置 Placeholder 的实例", "itemtype": "method", "name": "getInstance", "params": [ @@ -3145,30 +12136,17 @@ "static": 1, "return": { "description": "", - "type": "Calendar instance" + "type": "PlaceholderInstance" }, - "class": "JC.Calendar", - "namespace": "JC" - }, - { - "file": "../comps/Calendar/Calendar.js", - "line": 421, - "description": "保存所有类型的 Calendar 日期实例 \n
            目前有 date, week, month, season 四种类型的实例\n
            每种类型都是单例模式", - "prototype": "_ins", - "type": "object", - "default": "empty", - "access": "private", - "tagname": "", - "static": 1, - "class": "JC.Calendar", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 432, - "description": "获取控件源的实例类型\n
            目前有 date, week, month, season 四种类型的实例", + "file": "../comps/Placeholder/Placeholder.js", + "line": 58, + "description": "初始化可识别的 Placeholder 实例", "itemtype": "method", - "name": "type", + "name": "init", "params": [ { "name": "_selector", @@ -3176,3704 +12154,3723 @@ "type": "Selector" } ], + "static": 1, "return": { - "description": "string" + "description": "", + "type": "Array of PlaceholderInstance" }, - "static": 1, - "class": "JC.Calendar", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 458, - "description": "判断选择器是否为日历组件的对象", + "file": "../comps/Placeholder/Placeholder.js", + "line": 103, + "description": "更新所有 placeholder 的状态", "itemtype": "method", - "name": "isCalendar", + "name": "update", "static": 1, - "params": [ - { - "name": "_selector!~YUIDOC_LINE~!return", - "description": "bool", - "type": "Selector" - } - ], - "class": "JC.Calendar", - "namespace": "JC" - }, - { - "file": "../comps/Calendar/Calendar.js", - "line": 492, - "description": "请使用 isCalendar, 这个方法是为了向后兼容", - "class": "JC.Calendar", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 496, - "description": "弹出日期选择框", - "itemtype": "method", - "name": "pickDate", + "file": "../comps/Placeholder/Placeholder.js", + "line": 118, + "description": "设置 Placeholder 的默认 className", + "itemtype": "property", + "name": "className", + "type": "string", + "default": "xplaceholder", "static": 1, - "params": [ - { - "name": "_selector", - "description": "需要显示日期选择框的input[text]", - "type": "Selector" - } - ], - "example": [ - "\n
            \n
            \n \n manual JC.Calendar.pickDate\n
            \n
            \n \n manual JC.Calendar.pickDate\n
            \n
            \n " - ], - "class": "JC.Calendar", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 534, - "description": "设置是否在 DOM 加载完毕后, 自动初始化所有日期控件", + "file": "../comps/Placeholder/Placeholder.js", + "line": 126, + "description": "判断 input/textarea 默认是否支持 placeholder 功能", "itemtype": "property", - "name": "autoInit", - "default": "true", - "type": "{bool}", - "static": "", - "class": "JC.Calendar", + "name": "isSupport", + "type": "bool", + "static": 1, + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 543, - "description": "设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年", - "itemtype": "property", - "name": "defaultDateSpan", - "type": "{int}", - "default": "20", - "static": "", - "class": "JC.Calendar", + "file": "../comps/Placeholder/Placeholder.js", + "line": 181, + "description": "更新 placeholder 状态", + "itemtype": "method", + "name": "update", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 552, - "description": "最后一个显示日历组件的文本框", - "itemtype": "property", - "name": "lastIpt", - "type": "selector", - "static": 1, - "class": "JC.Calendar", + "file": "../comps/Placeholder/Placeholder.js", + "line": 301, + "description": "设置 控件 光标位置\nx@btbtd.org 2012-3-1", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 559, - "description": "自定义日历组件模板\n

            默认模板为_logic.tpl

            \n

            如果用户显示定义JC.Calendar.tpl的话, 将采用用户的模板

            ", - "itemtype": "property", - "name": "tpl", - "type": "{string}", - "default": "empty", - "static": 1, - "class": "JC.Calendar", + "file": "../comps/Placeholder/Placeholder.js", + "line": 338, + "description": "inject jquery show, hide func, for Placeholder change event", + "class": "JC.Placeholder", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 569, - "description": "初始化外观后的回调函数", - "itemtype": "property", - "name": "layoutInitedCallback", - "type": "function", + "file": "../comps/PopTips/PopTips.js", + "line": 154, + "description": "获取或设置 PopTips 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], "static": 1, - "default": "null", - "class": "JC.Calendar", + "return": { + "description": "", + "type": "PopTipsInstance" + }, + "class": "JC.PopTips", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 577, - "description": "显示为可见时的回调", - "itemtype": "property", - "name": "layoutShowCallback", - "type": "function", + "file": "../comps/PopTips/PopTips.js", + "line": 169, + "description": "初始化可识别的 PopTips 实例", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], "static": 1, - "default": "null", - "class": "JC.Calendar", + "return": { + "description": "", + "type": "Array of PopTipsInstance" + }, + "class": "JC.PopTips", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 585, - "description": "日历隐藏后的回调函数", - "itemtype": "property", - "name": "layoutHideCallback", - "type": "function", - "static": 1, - "default": "null", - "class": "JC.Calendar", + "file": "../comps/PopTips/PopTips.js", + "line": 314, + "description": "更新 PopTips 状态", + "itemtype": "method", + "name": "update", + "class": "JC.PopTips", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 593, - "description": "DOM 点击的过滤函数\n
            默认 dom 点击时, 判断事件源不为 input[datatype=date|daterange] 会隐藏 Calendar\n
            通过该回调可自定义过滤, 返回 false 不执行隐藏操作", - "itemtype": "property", - "name": "domClickFilter", - "type": "function", - "static": 1, - "default": "null", - "class": "JC.Calendar", + "file": "../comps/PopTips/PopTips.js", + "line": 569, + "description": "设置 left top 之后, 获取高度不准确", + "class": "JC.PopTips", "namespace": "JC" }, - { - "file": "../comps/Calendar/Calendar.js", - "line": 603, - "description": "隐藏日历组件", - "itemtype": "method", - "name": "hide", - "static": 1, - "example": [ - "\n " - ], - "class": "JC.Calendar", + { + "file": "../comps/PopTips/PopTips.js", + "line": 707, + "description": "PopTips显示前的回调", + "class": "JC.PopTips", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 620, - "description": "获取初始日期对象\n

            这个方法将要废除, 请使用 instance.defaultDate()

            ", + "file": "../comps/PopTips/PopTips.js", + "line": 718, + "description": "PopTips隐藏后的回调", + "class": "JC.PopTips", + "namespace": "JC" + }, + { + "file": "../comps/ServerSort/ServerSort.js", + "line": 125, + "description": "初始化可识别的 ServerSort 实例", "itemtype": "method", - "name": "getDate", - "static": 1, + "name": "init", "params": [ { "name": "_selector", - "description": "显示日历组件的input\nreturn { date: date, minvalue: date|null, maxvalue: date|null, enddate: date|null }", + "description": "", "type": "Selector" } ], - "class": "JC.Calendar", + "static": 1, + "return": { + "description": "", + "type": "Array of ServerSortInstance" + }, + "class": "JC.ServerSort", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 632, - "description": "每周的中文对应数字", - "itemtype": "property", - "name": "cnWeek", - "type": "string", - "static": 1, - "default": "日一二三四五六", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 135, + "description": "初始化数据模型", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 640, - "description": "100以内的中文对应数字", - "itemtype": "property", - "name": "cnUnit", - "type": "string", - "static": 1, - "default": "十一二三四五六七八九", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 139, + "description": "初始化视图模型( 根据不同的滚动方向, 初始化不同的视图类 )", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 648, - "description": "转换 100 以内的数字为中文数字", + "file": "../comps/Slider/Slider.js", + "line": 151, + "description": "内部初始化方法", "itemtype": "method", - "name": "getCnNum", - "static": 1, + "name": "_init", + "access": "private", + "tagname": "", + "return": { + "description": "bool" + }, + "class": "JC.Slider", + "namespace": "JC" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 179, + "description": "自定义事件绑定函数\n
            使用 jquery on 方法绑定 为 Slider 实例绑定事件", + "itemtype": "method", + "name": "on", "params": [ { - "name": "_num", + "name": "_evtName", "description": "", - "type": "Int" + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" } ], "return": { - "description": "string" + "description": "SliderInstance" }, - "class": "JC.Calendar", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 662, - "description": "设置日历组件的显示位置", + "file": "../comps/Slider/Slider.js", + "line": 192, + "description": "自定义事件触发函数\n
            使用 jquery trigger 方法绑定 为 Slider 实例函数自定义事件", "itemtype": "method", - "name": "position", - "static": 1, + "name": "trigger", "params": [ { - "name": "_ipt", - "description": "需要显示日历组件的文本框", - "type": "Selector" + "name": "_evtName", + "description": "", + "type": "String" } ], - "class": "JC.Calendar", + "return": { + "description": "SliderInstance" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 673, - "description": "这个方法后续版本不再使用, 请使用 Calendar.position", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 204, + "description": "控制 Slider 向左或向右划动", + "itemtype": "method", + "name": "move", + "params": [ + { + "name": "_backwrad", + "description": "_backwrad = ture(向左), false(向右), 默认false", + "type": "Bool" + } + ], + "return": { + "description": "SliderInstance" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 677, - "description": "初始化日历组件的触发按钮", + "file": "../comps/Slider/Slider.js", + "line": 211, + "description": "控制 Slider 划动到指定索引", "itemtype": "method", - "name": "_logic.initTrigger", + "name": "moveTo", "params": [ { - "name": "_selector", + "name": "_newpointer", "description": "", - "type": "Selector" + "type": "Int" } ], - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "return": { + "description": "SliderInstance" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 759, - "description": "克隆 Calendar 默认 Model, View 的原型属性", + "file": "../comps/Slider/Slider.js", + "line": 218, + "description": "获取 Slider 的总索引数", "itemtype": "method", - "name": "clone", + "name": "totalpage", + "return": { + "description": "int" + }, + "class": "JC.Slider", + "namespace": "JC" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 224, + "description": "获取 Slider 的当前索引数", + "itemtype": "method", + "name": "pointer", + "return": { + "description": "int" + }, + "class": "JC.Slider", + "namespace": "JC" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 230, + "description": "获取指定索引页的 selector 对象", + "itemtype": "method", + "name": "page", "params": [ { - "name": "_model", - "description": "", - "type": "NewModel" - }, - { - "name": "_view", + "name": "_ix", "description": "", - "type": "NewView" + "type": "Int" } ], - "class": "JC.Calendar", - "namespace": "JC" - }, - { - "file": "../comps/Calendar/Calendar.js", - "line": 1382, - "description": "捕获用户更改年份 \n

            监听 年份下拉框

            ", - "itemtype": "event", - "name": "year change", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "return": { + "description": "array" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1392, - "description": "捕获用户更改年份 \n

            监听 下一年按钮

            ", - "itemtype": "event", - "name": "next year", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 237, + "description": "获取 Slider 的主外观容器", + "itemtype": "method", + "name": "layout", + "return": { + "description": "selector" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1402, - "description": "捕获用户更改年份 \n

            监听 上一年按钮

            ", - "itemtype": "event", - "name": "previous year", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 243, + "description": "查找 layout 的内容", + "itemtype": "method", + "name": "find", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1412, - "description": "增加或者减少一年\n

            监听 年份map

            ", - "itemtype": "event", - "name": "year map click", + "file": "../comps/Slider/Slider.js", + "line": 284, + "description": "初始化自动滚动\n
            如果 layout 的 html属性 sliderautomove=ture, 则会执行本函数", + "itemtype": "method", + "name": "_initAutoMove", "access": "private", "tagname": "", - "class": "JC.Calendar", + "return": { + "description": "SliderInstance" + }, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1426, - "description": "增加或者减少一个月\n

            监听 月份map

            ", + "file": "../comps/Slider/Slider.js", + "line": 345, "itemtype": "event", - "name": "month map click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "name": "inited", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1440, - "description": "捕获用户更改月份 \n

            监听 下一月按钮

            ", + "file": "../comps/Slider/Slider.js", + "line": 348, "itemtype": "event", - "name": "next year", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "name": "beforemove", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1450, - "description": "捕获用户更改月份\n

            监听 上一月按钮

            ", + "file": "../comps/Slider/Slider.js", + "line": 351, "itemtype": "event", - "name": "previous year", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "name": "movedone", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1461, - "description": "日期点击事件", + "file": "../comps/Slider/Slider.js", + "line": 354, "itemtype": "event", - "name": "date click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "name": "outmin", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1474, - "description": "选择当前日期\n

            监听确定按钮

            ", + "file": "../comps/Slider/Slider.js", + "line": 357, "itemtype": "event", - "name": "confirm click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "name": "outmax", + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1484, - "description": "清除文本框内容\n

            监听 清空按钮

            ", - "itemtype": "event", - "name": "clear click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 360, + "description": "页面加载完毕后, 是否自动初始化 带有 class=js_autoSlider 的应用", + "itemtype": "property", + "name": "autoInit", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1494, - "description": "取消日历组件, 相当于隐藏\n

            监听 取消按钮

            ", - "itemtype": "event", - "name": "cancel click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 368, + "description": "批量初始化 Slider", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "array" + }, + "static": 1, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1504, - "description": "日历组件按钮点击事件", - "itemtype": "event", - "name": "calendar button click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 401, + "description": "从 selector 获得 或 设置 Slider 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_ins", + "description": "", + "type": "SliderInstance" + } + ], + "return": { + "description": "SliderInstance" + }, + "static": 1, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1519, - "description": "日历组件点击事件, 阻止冒泡, 防止被 document click事件隐藏", - "itemtype": "event", - "name": "UXCCalendar click", - "access": "private", - "tagname": "", - "class": "JC.Calendar", + "file": "../comps/Slider/Slider.js", + "line": 414, + "description": "判断 selector 是否具备 实例化 Slider 的条件", + "itemtype": "method", + "name": "isSlider", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "bool" + }, + "static": 1, + "class": "JC.Slider", "namespace": "JC" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1528, - "description": "DOM 加载完毕后, 初始化日历组件相关事件", - "itemtype": "event", - "name": "dom ready", + "file": "../comps/Slider/Slider.js", + "line": 435, + "description": "保存 layout 的引用", + "itemtype": "property", + "name": "_layout", + "type": "selector", "access": "private", "tagname": "", - "class": "JC.Calendar", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1534, - "description": "延迟200毫秒初始化页面的所有日历控件\n之所以要延迟是可以让用户自己设置是否需要自动初始化", - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 442, + "description": "自动移动的方向\n
            true = 向右|向下, false = 向左|向上", + "itemtype": "property", + "name": "_moveDirection", + "type": "bool", + "default": "true", + "access": "private", + "tagname": "", + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1542, - "description": "监听窗口滚动和改变大小, 实时变更日历组件显示位置", - "itemtype": "event", - "name": "window scroll, window resize", + "file": "../comps/Slider/Slider.js", + "line": 451, + "description": "滚动时的 interval 引用", + "itemtype": "property", + "name": "_interval", + "type": "interval", "access": "private", "tagname": "", - "class": "JC.Calendar", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1551, - "description": "dom 点击时, 检查事件源是否为日历组件对象, 如果不是则会隐藏日历组件", - "itemtype": "event", - "name": "dom click", + "file": "../comps/Slider/Slider.js", + "line": 458, + "description": "自动滚动时的 timeout 引用", + "itemtype": "property", + "name": "_timeout", + "type": "timeout", "access": "private", "tagname": "", - "class": "JC.Calendar", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1580, - "description": "日历组件文本框获得焦点", - "itemtype": "event", - "name": "input focus", + "file": "../comps/Slider/Slider.js", + "line": 470, + "description": "内部初始化方法", + "itemtype": "method", + "name": "_init", "access": "private", "tagname": "", - "class": "JC.Calendar", - "namespace": "JC" + "return": { + "description": "Slider.Model" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1601, - "description": "自定义周弹框的模板HTML", - "itemtype": "property", - "name": "weekTpl", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 491, + "description": "获取 slider 外观的 selector", + "itemtype": "method", + "name": "layout", + "return": { + "description": "selector" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1610, - "description": "自定义周日历每周的起始日期 \n
            0 - 6, 0=周日, 1=周一", - "itemtype": "property", - "name": "weekDayOffset", - "static": 1, - "type": "int", - "default": "1", - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 497, + "description": "获取 左移的 selector", + "itemtype": "method", + "name": "leftbutton", + "return": { + "description": "selector" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 1809, - "description": "取一年中所有的星期, 及其开始结束日期", + "file": "../comps/Slider/Slider.js", + "line": 503, + "description": "获取 右移的 selector", "itemtype": "method", - "name": "weekOfYear", - "static": 1, + "name": "rightbutton", + "return": { + "description": "selector" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 509, + "description": "获取移动方向\n
            horizontal, vertical", + "itemtype": "method", + "name": "direction", + "default": "horizontal", + "return": { + "description": "string" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 517, + "description": "获取/设置自动移动的方向\n
            true = 向右|向下, false = 向左|向上", + "itemtype": "method", + "name": "moveDirection", "params": [ { - "name": "_year", + "name": "_setter", "description": "", - "type": "Int" - }, - { - "name": "_dayOffset", - "description": "每周的默认开始为周几, 默认0(周一)", - "type": "Int" + "type": "String" } ], "return": { - "description": "Array" + "description": "string" }, - "class": "JC.Calendar", - "namespace": "JC" - }, - { - "file": "../comps/Calendar/Calendar.js", - "line": 1821, - "description": "元旦开始的第一个星期一开始的一周为政治经济上的第一周", - "class": "JC.Calendar", - "namespace": "JC" - }, - { - "file": "../comps/Calendar/Calendar.js", - "line": 1848, - "description": "自定义月份弹框的模板HTML", - "itemtype": "property", - "name": "monthTpl", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Calendar", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 2067, - "description": "自定义周弹框的模板HTML", - "itemtype": "property", - "name": "seasonTpl", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 530, + "description": "获取每次移动多少项", + "itemtype": "method", + "name": "howmanyitem", + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 2243, - "description": "多选日期弹框的模板HTML", - "itemtype": "property", - "name": "monthdayTpl", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 536, + "description": "获取宽度", + "itemtype": "method", + "name": "width", + "default": "800", + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 2252, - "description": "多先日期弹框标题末尾的附加字样", - "itemtype": "property", - "name": "monthdayHeadAppendText", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 543, + "description": "获取高度", + "itemtype": "method", + "name": "height", + "default": "230", + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Calendar/Calendar.js", - "line": 2290, - "description": "如果 atd 为空, 那么是 全选按钮触发的事件", - "class": "JC.Calendar", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 550, + "description": "获取项宽度", + "itemtype": "method", + "name": "itemwidth", + "default": "160", + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 53, - "description": "显示 Fixed", + "file": "../comps/Slider/Slider.js", + "line": 557, + "description": "获取项高度", "itemtype": "method", - "name": "show", + "name": "itemheight", + "default": "230", "return": { - "description": "FixedIns" + "description": "int" }, - "class": "JC.Fixed", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 59, - "description": "隐藏 Fixed", + "file": "../comps/Slider/Slider.js", + "line": 564, + "description": "每次移动的总时间, 单位毫秒", "itemtype": "method", - "name": "hide", + "name": "loop", + "default": "false", "return": { - "description": "FixedIns" + "description": "bool" }, - "class": "JC.Fixed", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 65, - "description": "获取 Fixed 外观的 选择器", + "file": "../comps/Slider/Slider.js", + "line": 571, + "description": "获取每次移动间隔的毫秒数", "itemtype": "method", - "name": "layout", + "name": "stepms", + "default": "10", "return": { - "description": "selector" + "description": "int" }, - "class": "JC.Fixed", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 71, - "description": "使用 jquery on 绑定事件", + "file": "../comps/Slider/Slider.js", + "line": 578, + "description": "获取每次移动持续的毫秒数", "itemtype": "method", - "name": "on", - "type": "String", - "params": [ - { - "name": "_evtName", - "description": "", - "type": "String" - }, - { - "name": "_cb", - "description": "", - "type": "Function" - } - ], + "name": "durationms", + "default": "300", "return": { - "description": "FixedIns" + "description": "int" }, - "class": "JC.Fixed", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 79, - "description": "使用 jquery trigger 绑定事件", + "file": "../comps/Slider/Slider.js", + "line": 585, + "description": "获取自动滚动的间隔", "itemtype": "method", - "name": "trigger", - "type": "String", - "params": [ - { - "name": "_evtName", - "description": "", - "type": "String" - } - ], + "name": "automovems", + "default": "2000", "return": { - "description": "FixedIns" + "description": "int" }, - "class": "JC.Fixed", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 87, - "description": "获取或设置 Fixed 的实例", + "file": "../comps/Slider/Slider.js", + "line": 592, + "description": "获取是否自动滚动", "itemtype": "method", - "name": "getInstance", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "static": 1, + "name": "automove", + "default": "false", "return": { - "description": "", - "type": "Fixed instance" + "description": "bool" }, - "class": "JC.Fixed", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 103, - "description": "页面加载完毕时, 是否自动初始化\n
            识别 class=js_autoFixed", - "itemtype": "property", - "name": "autoInit", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Fixed", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 599, + "description": "获取默认显示的索引", + "itemtype": "method", + "name": "defaultpage", + "return": { + "description": "int" + }, + "default": "0", + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 112, - "description": "滚动的持续时间( 时间运动 )", - "itemtype": "property", - "name": "durationms", - "type": "int", - "default": "300", - "static": 1, - "class": "JC.Fixed", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 606, + "description": "获取划动的所有项", + "itemtype": "method", + "name": "subitems", + "return": { + "description": "selector" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 120, - "description": "每次滚动的时间间隔( 时间运动 )", - "itemtype": "property", - "name": "stepms", - "type": "int", - "default": "3", - "static": 1, - "class": "JC.Fixed", - "namespace": "JC" + "file": "../comps/Slider/Slider.js", + "line": 620, + "description": "获取分页总数\n
            Math.ceil( subitems / howmanyitem )", + "itemtype": "method", + "name": "totalpage", + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Fixed/Fixed.js", - "line": 128, - "description": "设置或者清除 interval\n
            避免多个 interval 造成的干扰", + "file": "../comps/Slider/Slider.js", + "line": 636, + "description": "获取指定页的所有划动项", "itemtype": "method", - "name": "interval", + "name": "page", "params": [ { - "name": "_interval", + "name": "_index", "description": "", - "type": "Interval" + "type": "Int" } ], - "static": 1, - "class": "JC.Fixed", - "namespace": "JC" + "return": { + "description": "array" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Form/Form.js", - "line": 16, - "description": "禁用按钮一定时间, 默认为1秒", + "file": "../comps/Slider/Slider.js", + "line": 655, + "description": "获取/设置当前索引位置", "itemtype": "method", - "name": "disableButton", - "static": 1, + "name": "pointer", "params": [ { - "name": "_selector", - "description": "要禁用button的选择器", - "type": "Selector" - }, - { - "name": "_durationMs", - "description": "禁用多少时间, 单位毫秒, 默认1秒", + "name": "_setter", + "description": "", "type": "Int" } ], - "class": "JC.Form", - "namespace": "JC" - }, - { - "file": "../comps/Form/Form.js", - "line": 34, - "description": "select 级联下拉框无限联动\n
            这个方法已经摘取出来, 单独成为一个类.\n
            详情请见: JC.AutoSelect.html\n
            目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法", - "itemtype": "method", - "name": "initAutoSelect", - "static": 1, - "class": "JC.Form", - "namespace": "JC" - }, - { - "file": "../comps/Form/Form.js", - "line": 43, - "description": "全选/反选\n
            这个方法已经摘取出来, 单独成为一个类.\n
            详情请见: JC.AutoChecked.html\n
            目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法", - "itemtype": "method", - "name": "initCheckAll", - "static": 1, - "class": "JC.Form", - "namespace": "JC" + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Form/Form.js", - "line": 56, - "description": "表单自动填充 URL GET 参数\n
            只要引用本脚本, DOM 加载完毕后, 页面上所有带 class js_autoFillUrlForm 的 form 都会自动初始化默认值\n

            requires: jQuery

            \n

            JC Project Site\n| API docs", + "file": "../comps/Slider/Slider.js", + "line": 667, + "description": "获取新的划动位置\n
            根据划向的方向 和 是否循环", "itemtype": "method", - "name": "initAutoFill", - "static": 1, - "version": "dev 0.1", - "author": "qiushaowei | 75 team", - "date": "2013-06-13", + "name": "newpointer", "params": [ { - "name": "_selector", - "description": "显示指定要初始化的区域, 默认为 document", - "type": "Selector|url string" - }, - { - "name": "_url", - "description": "显示指定, 取初始化值的 URL, 默认为 location.href", - "type": "String" + "name": "_isbackward", + "description": "", + "type": "Bool" } ], - "example": [ - "\n JC.Form.initAutoFill( myCustomSelector, myUrl );" - ], - "class": "JC.Form", - "namespace": "JC" - }, - { - "file": "../comps/Form/Form.js", - "line": 158, - "description": "自定义 URI decode 函数", - "itemtype": "property", - "name": "initAutoFill.decodeFunc", - "static": 1, - "type": "function", - "default": "null", - "class": "JC.Form", - "namespace": "JC" + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Form/Form.js", - "line": 174, - "description": "判断下拉框的option里是否有给定的值", + "file": "../comps/Slider/Slider.js", + "line": 683, + "description": "修正指针的索引位置, 防止范围溢出", "itemtype": "method", - "name": "initAutoFill.selectHasVal", - "access": "private", - "tagname": "", - "static": 1, + "name": "fixpointer", "params": [ { - "name": "_select", + "name": "_pointer", "description": "", - "type": "Selector" - }, - { - "name": "_val", - "description": "要查找的值", - "type": "String" + "type": "Int" } ], - "class": "JC.Form", - "namespace": "JC" + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/Form/Form.js", - "line": 203, - "description": "文本框 值增减 应用\n
            只要引用本脚本, 页面加载完毕时就会自动初始化 NumericStepper\n
            所有带 class js_NStepperPlus, js_NStepperMinus 视为值加减按钮\n

            目标文本框可以添加一些HTML属性自己的规则, \n
            nsminvalue=最小值(默认=0), nsmaxvalue=最大值(默认=100), nsstep=步长(默认=1), nsfixed=小数点位数(默认=0)\n
            nschangecallback=值变改后的回调", + "file": "../comps/Slider/Slider.js", + "line": 701, + "description": "获取自动萌动的新索引", "itemtype": "method", - "name": "initNumericStepper", - "static": 1, - "version": "dev 0.1", - "author": "qiushaowei | 360 75 Team", - "date": "2013-07-05", - "params": [ - { - "name": "_selector", - "description": "要初始化的全选反选的父级节点", - "type": "Selector" - } - ], - "example": [ - "\n

            \n
            JC.Form.initNumericStepper 默认值 0 - 100, step 1, fixed 0
            \n
            \n \n \n \n
            \n
            \n\n
            \n
            JC.Form.initNumericStepper -10 ~ 10, step 2, fixed 2
            \n
            \n \n \n \n
            \n
            " - ], - "class": "JC.Form", - "namespace": "JC" - }, - { - "file": "../comps/Form/Form.js", - "line": 262, - "description": "文本框 值增减 值变改后的回调\n
            这个是定义全局的回调函数, 要定义局部回调请在目标文本框上添加 nschangecallback=回调 HTML属性", - "itemtype": "property", - "name": "initNumericStepper.onchange", - "type": "function", - "static": 1, - "class": "JC.Form", - "namespace": "JC" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 46, - "description": "LunarCalendar 的数据模型对象", - "itemtype": "property", - "name": "_model", - "type": "JC.LunarCalendar.Model", - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar", - "namespace": "JC" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 53, - "description": "LunarCalendar 的视图对像", - "itemtype": "property", - "name": "_view", - "type": "JC.LunarCalendar.View", - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar", - "namespace": "JC" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 63, - "description": "自定义日历组件模板\n

            默认模板为JC.LunarCalendar.Model#tpl

            \n

            如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板

            ", - "itemtype": "property", - "name": "tpl", - "type": "{string}", - "default": "empty", - "static": 1, - "class": "JC.LunarCalendar", - "namespace": "JC" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 73, - "description": "设置是否在 dom 加载完毕后, 自动初始化所有日期控件", - "itemtype": "property", - "name": "autoinit", - "default": "true", - "type": "{bool}", - "static": "", - "class": "JC.LunarCalendar", - "namespace": "JC" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 82, - "description": "设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年", - "itemtype": "property", - "name": "defaultYearSpan", - "type": "{int}", - "default": "20", - "static": "", - "class": "JC.LunarCalendar", - "namespace": "JC" + "name": "automoveNewPointer", + "return": { + "description": "int" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 91, - "description": "从所有的LunarCalendar取得当前选中的日期\n
            如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined", + "file": "../comps/Slider/Slider.js", + "line": 732, + "description": "获取/设置 划动的 interval 对象", "itemtype": "method", - "name": "getSelectedItemGlobal", - "static": 1, + "name": "interval", + "params": [ + { + "name": "_setter", + "description": "", + "type": "Interval" + } + ], "return": { - "description": "如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td }", - "type": "Object|undefined" + "description": "interval" }, - "class": "JC.LunarCalendar", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 115, - "description": "从所有的LunarCalendar取得当前选中日期的日期对象\n
            如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined", + "file": "../comps/Slider/Slider.js", + "line": 743, + "description": "清除划动的 interval", "itemtype": "method", - "name": "getSelectedDateGlobal", - "static": 1, - "return": { - "description": "", - "type": "Date|undefined" - }, - "class": "JC.LunarCalendar", - "namespace": "JC" + "name": "clearInterval", + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 128, - "description": "从时间截获取选择器对象", + "file": "../comps/Slider/Slider.js", + "line": 751, + "description": "获取/设置 自动划动的 timeout", "itemtype": "method", - "name": "getItemByTimestamp", - "static": 1, + "name": "timeout", "params": [ { - "name": "_tm", - "description": "时间截, 如果时间截少于13位, 将自动补0到13位, ps: php时间截为10位", - "type": "Int" + "name": "_setter", + "description": "", + "type": "Timeout" } ], "return": { - "description": "td selector, 如果 td class unable 不可选, 将忽略", - "type": "Selector|undefined" + "description": "timeout" }, - "class": "JC.LunarCalendar", - "namespace": "JC" + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 151, - "description": "添加或者清除工作日样式", + "file": "../comps/Slider/Slider.js", + "line": 762, + "description": "清除自动划动的 timeout", "itemtype": "method", - "name": "workday", - "static": 1, + "name": "clearTimeout", + "class": "JC.Slider.Model", + "namespace": "JC.Slider" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 770, + "description": "获取/设置当前鼠标是否位于 slider 及其控件上面", + "itemtype": "method", + "name": "controlover", "params": [ { - "name": "_td", - "description": "要设置为工作日状态的 td", - "type": "Selector" - }, - { - "name": "_customSet", - "description": "如果 _customSet 为 undefined, 将设为工作日. \n 如果 _customSet 非 undefined, 那么根据真假值判断清除工作日/添加工作日", - "type": "Any" + "name": "_setter", + "description": "", + "type": "Bool" } ], - "class": "JC.LunarCalendar", - "namespace": "JC" + "return": { + "description": "bool" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 167, - "description": "判断 td 是否为工作日状态", + "file": "../comps/Slider/Slider.js", + "line": 781, + "description": "获取初始化后的回调函数", "itemtype": "method", - "name": "isWorkday", - "static": 1, + "name": "initedcb", + "return": { + "description": "function|undefined" + }, + "class": "JC.Slider.Model", + "namespace": "JC.Slider" + }, + { + "file": "../comps/Slider/Slider.js", + "line": 968, + "description": "页面加载后, 自动初始化符合 Slider 规则的 Slider", + "class": "JC.Slider.Model", + "namespace": "JC.Slider" + }, + { + "file": "../comps/StepControl/StepControl.js", + "line": 52, + "description": "初始化可识别的 StepControl 实例", + "itemtype": "method", + "name": "init", "params": [ { - "name": "_td", + "name": "_selector", "description": "", "type": "Selector" } ], + "static": 1, "return": { "description": "", - "type": "Bool" + "type": "Array of StepControlInstance" }, - "class": "JC.LunarCalendar", + "class": "JC.StepControl", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 179, - "description": "添加或者清除假日样式", + "file": "../comps/Suggest/Suggest.js", + "line": 104, + "description": "获取或设置 Suggest 的实例", "itemtype": "method", - "name": "holiday", - "static": 1, + "name": "getInstance", "params": [ { - "name": "_td", - "description": "要设置为假日状态的 td", + "name": "_selector", + "description": "", "type": "Selector" }, { - "name": "_customSet", - "description": "如果 _customSet 为 undefined, 将设为假日. \n 如果 _customSet 非 undefined, 那么根据真假值判断清除假日/添加假日", - "type": "Any" + "name": "_setter", + "description": "", + "type": "SuggestInstace|null" } ], - "class": "JC.LunarCalendar", + "static": 1, + "return": { + "description": "", + "type": "Suggest instance" + }, + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 195, - "description": "判断 td 是否为假日状态", + "file": "../comps/Suggest/Suggest.js", + "line": 116, + "description": "判断 selector 是否可以初始化 Suggest", "itemtype": "method", - "name": "isHoliday", - "static": 1, + "name": "isSuggest", "params": [ { - "name": "_td", + "name": "_selector", "description": "", "type": "Selector" } ], + "static": 1, "return": { - "description": "", - "type": "Bool" + "description": "bool" }, - "class": "JC.LunarCalendar", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 207, - "description": "添加或者清除注释", - "itemtype": "method", - "name": "comment", + "file": "../comps/Suggest/Suggest.js", + "line": 131, + "description": "设置 Suggest 是否需要自动初始化", + "itemtype": "property", + "name": "autoInit", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 139, + "description": "自定义列表显示模板", + "itemtype": "property", + "name": "layoutTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 147, + "description": "Suggest 返回列表的内容是否只使用", + "itemtype": "property", + "name": "layoutTpl", + "type": "string", + "default": "empty", + "static": 1, + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 155, + "description": "数据过滤回调", + "itemtype": "property", + "name": "dataFilter", + "type": "function", + "default": "undefined", + "static": 1, + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 163, + "description": "保存所有初始化过的实例", + "itemtype": "property", + "name": "_allIns", + "type": "array", + "default": "[]", + "access": "private", + "tagname": "", "static": 1, + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 172, + "description": "隐藏其他 Suggest 显示列表", + "itemtype": "method", + "name": "_hideOther", "params": [ { - "name": "_td", - "description": "要设置注释的 td", - "type": "Selector" - }, - { - "name": "_customSet", - "description": "如果 _customSet 为 undefined, 将清除注释. \n 如果 _customSet 为 string, 将添加注释", - "type": "String|bool" + "name": "_ins", + "description": "", + "type": "SuggestInstance" } ], - "class": "JC.LunarCalendar", + "access": "private", + "tagname": "", + "static": 1, + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 213, + "description": "suggest_so({ \"p\" : true,\n \"q\" : \"shinee\",\n \"s\" : [ \"shinee 综艺\",\n \"shinee美好的一天\",\n \"shinee hello baby\",\n \"shinee吧\",\n \"shinee泰民\",\n \"shinee fx\",\n \"shinee快乐大本营\",\n \"shinee钟铉车祸\",\n \"shinee年下男的约会\",\n \"shinee dream girl\"\n ]\n });", + "class": "JC.Suggest", + "namespace": "JC" + }, + { + "file": "../comps/Suggest/Suggest.js", + "line": 246, + "description": "显示 Suggest", + "itemtype": "method", + "name": "show", + "return": { + "description": "SuggestInstance" + }, + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 234, - "description": "判断 td 是否为注释状态", + "file": "../comps/Suggest/Suggest.js", + "line": 252, + "description": "隐藏 Suggest", "itemtype": "method", - "name": "isComment", - "static": 1, - "params": [ - { - "name": "_td", - "description": "", - "type": "Selector" - } - ], + "name": "hide", "return": { - "description": "", - "type": "Bool" + "description": "SuggestInstance" }, - "class": "JC.LunarCalendar", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 246, - "description": "返回 td 的注释", + "file": "../comps/Suggest/Suggest.js", + "line": 258, + "description": "获取 显示 Suggest 的触发源选择器, 比如 a 标签", "itemtype": "method", - "name": "getComment", - "static": 1, - "params": [ - { - "name": "_td", - "description": "", - "type": "Selector" - } - ], + "name": "selector", "return": { - "description": "", - "type": "String" + "description": "selector" }, - "class": "JC.LunarCalendar", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 261, - "description": "用于分隔默认title和注释的分隔符", - "itemtype": "property", - "name": "commentSeparator", - "type": "string", - "default": "==========comment==========", - "static": 1, - "class": "JC.LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 264, + "description": "获取 Suggest 外观的 选择器", + "itemtype": "method", + "name": "layout", + "return": { + "description": "selector" + }, + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 269, - "description": "把注释添加到 a title 里", + "file": "../comps/Suggest/Suggest.js", + "line": 270, + "description": "使用 jquery on 绑定事件", "itemtype": "method", - "name": "commentTitle", - "static": 1, + "name": "on", + "type": "String", "params": [ { - "name": "_td", - "description": "要设置注释的 a 父容器 td", - "type": "Selector" + "name": "_evtName", + "description": "", + "type": "String" }, { - "name": "_title", - "description": "如果 _title 为真, 将把注释添加到a title里. \n 如果 _title 为假, 将从 a title 里删除注释", - "type": "String|undefined" + "name": "_cb", + "description": "", + "type": "Function" } ], - "class": "JC.LunarCalendar", + "return": { + "description": "SuggestInstance" + }, + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 295, - "description": "从JSON数据更新日历状态( 工作日, 休息日, 注释 )\n
            注意, 该方法更新页面上所有的 LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 278, + "description": "使用 jquery trigger 绑定事件", "itemtype": "method", - "name": "updateStatus", - "static": 1, + "name": "trigger", + "type": "String", "params": [ { - "name": "_data", - "description": "{ phpTimestamp:{ dayaction: 0|1|2, comment: string}, ... }\n
                  \n         dayaction: \n         0: delete workday/holiday\n         1: workday\n         2: holiday\n
            ", - "type": "Object" + "name": "_evtName", + "description": "", + "type": "String" } ], - "example": [ - "\n LunarCalendar.updateStatus( {\n \"1369843200\": {\n \"dayaction\": 2,\n \"comment\": \"dfdfgdsfgsdfgsdg'\\\"'asdf\\\"\\\"'sdf\"\n },\n \"1370966400\": {\n \"dayaction\": 0,\n \"comment\": \"asdfasdfsa\"\n },\n \"1371139200\": {\n \"dayaction\": 1\n },\n \"1371225600\": {\n \"dayaction\": 0,\n \"comment\": \"dddd\"\n }\n });" - ], - "class": "JC.LunarCalendar", + "return": { + "description": "SuggestInstance" + }, + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 382, - "description": "LunarCalendar 内部初始化", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 827, + "description": "初始化完后的事件", + "itemtype": "event", + "name": "SuggestInited", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 393, - "description": "更新日历视图为自定义的日期", - "itemtype": "method", - "name": "update", - "params": [ - { - "name": "_date", - "description": "更新日历视图为 _date 所在日期的月份", - "type": "Date" - } - ], - "class": "JC.LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 831, + "description": "获得新数据的事件", + "itemtype": "event", + "name": "SuggestUpdate", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 403, - "description": "显示下一个月的日期", - "itemtype": "method", - "name": "nextMonth", - "class": "JC.LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 835, + "description": "数据更新完毕后的事件", + "itemtype": "event", + "name": "SuggestUpdated", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 413, - "description": "显示上一个月的日期", - "itemtype": "method", - "name": "preMonth", - "class": "JC.LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 839, + "description": "显示前的事件", + "itemtype": "event", + "name": "SuggestBeforeShow", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 423, - "description": "显示下一年的日期", - "itemtype": "method", - "name": "nextYear", - "class": "JC.LunarCalendar", + "file": "../comps/Suggest/Suggest.js", + "line": 843, + "description": "显示后的事件", + "itemtype": "event", + "name": "SuggestShow", + "class": "JC.Suggest", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 433, - "description": "显示上一年的日期", - "itemtype": "method", - "name": "preYear", - "class": "JC.LunarCalendar", + "file": "../comps/Tab/Tab.js", + "line": 162, + "description": "Tab 模型类的实例", + "itemtype": "property", + "name": "_model", + "type": "JC.Tab.Model", + "access": "private", + "tagname": "", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 443, - "description": "获取默认时间对象", - "itemtype": "method", - "name": "getDate", - "return": { - "description": "", - "type": "Date" - }, - "class": "JC.LunarCalendar", + "file": "../comps/Tab/Tab.js", + "line": 169, + "description": "Tab 视图类的实例", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 449, - "description": "获取所有的默认时间对象", - "itemtype": "method", - "name": "getAllDate", - "return": { - "description": "{ date: 默认时间, minvalue: 有效最小时间\n , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 }", - "type": "Object" - }, - "class": "JC.LunarCalendar", + "file": "../comps/Tab/Tab.js", + "line": 176, + "description": "页面加载完毕后, 是否要添加自动初始化事件\n
            自动初始化是 鼠标移动到 Tab 容器时去执行的, 不是页面加载完毕后就开始自动初始化", + "itemtype": "property", + "name": "autoInit", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 456, - "description": "获取当前选中的日期, 如果用户没有显式选择, 将查找当前日期, 如果两者都没有的话返回undefined", - "itemtype": "method", - "name": "getSelectedDate", - "return": { - "description": "", - "type": "Date" - }, - "class": "JC.LunarCalendar", + "file": "../comps/Tab/Tab.js", + "line": 185, + "description": "label 当前状态的样式", + "itemtype": "property", + "name": "activeClass", + "type": "string", + "default": "cur", + "static": 1, + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 479, - "description": "获取初始化日历的选择器对象", + "file": "../comps/Tab/Tab.js", + "line": 193, + "description": "label 的触发事件", + "itemtype": "property", + "name": "activeEvent", + "type": "string", + "default": "click", + "static": 1, + "class": "JC.Tab", + "namespace": "JC" + }, + { + "file": "../comps/Tab/Tab.js", + "line": 201, + "description": "获取或设置 Tab 容器的 Tab 实例属性", "itemtype": "method", - "name": "getContainer", - "return": { - "description": "selector" - }, - "class": "JC.LunarCalendar", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_setter", + "description": "_setter 不为空是设置", + "type": "JC.Tab" + } + ], + "static": 1, + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 485, - "description": "获取日历的主选择器对象", + "file": "../comps/Tab/Tab.js", + "line": 239, + "description": "初始化可识别的 Tab 实例", "itemtype": "method", - "name": "getLayout", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, "return": { - "description": "selector" + "description": "", + "type": "Array of TabInstance" }, - "class": "JC.LunarCalendar", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 491, - "description": "判断日历是否隐藏操作控件", - "itemtype": "method", - "name": "isHideControl", + "file": "../comps/Tab/Tab.js", + "line": 262, + "description": "判断一个容器是否 符合 Tab 数据要求", "return": { "description": "bool" }, - "class": "JC.LunarCalendar", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 506, - "description": "LunarCalendar model 对象", + "file": "../comps/Tab/Tab.js", + "line": 277, + "description": "全局的 ajax 处理回调", "itemtype": "property", - "name": "_model", - "type": "JC.LunarCalendar.Model", - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "name": "ajaxCallback", + "type": "function", + "default": "null", + "static": 1, + "example": [ + "\n $(document).ready( function(){\n JC.Tab.ajaxCallback =\n function( _data, _label, _container, _textStatus, _jqXHR ){\n _data && ( _data = $.parseJSON( _data ) );\n if( _data && _data.errorno === 0 ){\n _container.html( JC.f.printf( '

            JC.Tab.ajaxCallback

            {0}', _data.data ) );\n }else{\n Tab.isAjaxInited( _label, 0 );\n _container.html( '

            内容加载失败!

            ' );\n }\n };\n });" + ], + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 513, - "description": "LunarCalendar 的主容器", + "file": "../comps/Tab/Tab.js", + "line": 298, + "description": "ajax 请求是否添加随机参数 rnd, 以防止页面缓存的结果差异", "itemtype": "property", - "name": "layout", - "type": "selector", - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 524, - "description": "初始化 View", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "name": "ajaxRandom", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 536, - "description": "初始化日历外观", + "file": "../comps/Tab/Tab.js", + "line": 306, + "description": "判断一个 label 是否为 ajax", "itemtype": "method", - "name": "initLayout", + "name": "isAjax", + "static": 1, "params": [ { - "name": "_date", + "name": "_label", "description": "", - "type": "Date" + "type": "Selector" } ], - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "return": { + "description": "", + "type": "String|undefined" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 551, - "description": "初始化年份", + "file": "../comps/Tab/Tab.js", + "line": 317, + "description": "判断一个 ajax label 是否已经初始化过\n
            这个方法需要跟 Tab.isAjax 结合判断才更为准确", "itemtype": "method", - "name": "initYear", + "name": "isAjaxInited", + "static": 1, "params": [ { - "name": "_dateObj", + "name": "_label", "description": "", - "type": "DateObject" + "type": "Selector" + }, + { + "name": "_setter", + "description": "如果 _setter 不为空, 则进行赋值", + "type": "Bool" } ], - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "example": [ + "\n function tabactive( _evt, _container, _tabIns ){\n var _label = $(this);\n JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );\n if( JC.Tab.isAjax( _label ) && ! JC.Tab.isAjaxInited( _label ) ){\n _container.html( '

            内容加载中...

            ' );\n }\n }" + ], + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 560, - "description": "初始化月份", + "file": "../comps/Tab/Tab.js", + "line": 338, "itemtype": "method", - "name": "initMonth", + "name": "isIframe", + "static": 1, "params": [ { - "name": "_dateObj", + "name": "_label", "description": "", - "type": "DateObject" + "type": "Selector" } ], - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "return": { + "description": "", + "type": "String|undefined" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 569, - "description": "初始化月份的所有日期", + "file": "../comps/Tab/Tab.js", + "line": 348, + "description": "判断一个 iframe label 是否已经初始化过\n
            这个方法需要跟 Tab.isIframe 结合判断才更为准确", "itemtype": "method", - "name": "_logic.initMonthDate", + "name": "isIframeInited", + "static": 1, "params": [ { - "name": "_dateObj", - "description": "保存所有相关日期的对象", - "type": "DateObjects" + "name": "_label", + "description": "", + "type": "Selector" + }, + { + "name": "_setter", + "description": "如果 _setter 不为空, 则进行赋值", + "type": "Bool" } ], - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "example": [ + "\n function tabactive( _evt, _container, _tabIns ){\n var _label = $(this);\n JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );\n if( JC.Tab.isIframe( _label ) && ! JC.Tab.isIframeInited( _label ) ){\n _container.html( '

            内容加载中...

            ' );\n }\n }" + ], + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 670, - "description": "把具体的公历和农历日期写进a标签的title里", - "itemtype": "method", - "name": "addTitle", + "file": "../comps/Tab/Tab.js", + "line": 369, + "description": "Tab 数据模型类", "params": [ { - "name": "_td", - "description": "", - "type": "Selector" + "name": "_selector", + "description": "要初始化的 Tab 选择器", + "type": "Selector|string" + }, + { + "name": "_triggerTarget", + "description": "初始完毕后要触发的 label", + "type": "Selector|string" } ], - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 680, - "description": "检查是否要隐藏操作控件", - "itemtype": "method", - "name": "hideControl", - "class": "JC.LunarCalendar.View", - "namespace": "JC.LunarCalendar" + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 701, - "description": "LunarCalendar 所要显示的selector", - "itemtype": "property", - "name": "container", + "file": "../comps/Tab/Tab.js", + "line": 376, + "description": "Tab 的主容器", "type": "selector", - "default": "document.body", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "access": "private", + "tagname": "", + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 708, - "description": "初始化时的时期", - "itemtype": "property", - "name": "date", - "type": "date", - "default": "new Date()", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 382, + "description": "Tab 初始完毕后要触发的label, 可选", + "type": "selector", + "access": "private", + "tagname": "", + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 715, - "description": "日历默认模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "JC.LunarCalendar._deftpl", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 388, + "description": "Tab 的标签列表选择器", + "type": "selector", + "access": "private", + "tagname": "", + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 722, - "description": "显示日历时所需要的所有日期对象", - "itemtype": "property", - "name": "dateObj", - "type": "Object", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 394, + "description": "Tab 的内容列表选择器", + "type": "selector", + "access": "private", + "tagname": "", + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 728, - "description": "a 标签 title 的临时存储对象", - "itemtype": "property", - "name": "_titleObj", - "type": "Object", - "default": "{}", + "file": "../comps/Tab/Tab.js", + "line": 400, + "description": "当前标签的所在索引位置", + "type": "int", + "class": "JC.Tab", + "namespace": "JC" + }, + { + "file": "../comps/Tab/Tab.js", + "line": 411, + "description": "Tab 内部初始化方法", + "itemtype": "method", + "name": "_init", "access": "private", "tagname": "", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 758, - "description": "获取初始日期对象", + "file": "../comps/Tab/Tab.js", + "line": 427, + "description": "把 _label 设置为活动状态", "itemtype": "method", - "name": "getDate", + "name": "active", "params": [ { - "name": "_selector", - "description": "显示日历组件的input", + "name": "_label", + "description": "", "type": "Selector" } ], - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 779, - "description": "把日期赋值给文本框", - "itemtype": "method", - "name": "setDate", + "file": "../comps/Tab/Tab.js", + "line": 452, + "description": "Tab Model 内部初始化方法", + "class": "JC.Tab", + "namespace": "JC" + }, + { + "file": "../comps/Tab/Tab.js", + "line": 482, + "description": "判断是否从 selector 下查找内容", + "class": "JC.Tab", + "namespace": "JC" + }, + { + "file": "../comps/Tab/Tab.js", + "line": 489, + "description": "获取 Tab 所有 label 或 特定索引的 label", "params": [ { - "name": "_timestamp", - "description": "日期对象的时间戳", + "name": "_ix", + "description": "", "type": "Int" } ], - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 789, - "description": "给文本框赋值, 日期为控件的当前日期", - "itemtype": "method", - "name": "setSelectedDate", "return": { - "description": "0/1", - "type": "Int" + "description": "selector" }, - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 805, - "description": "监听上一年按钮", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 814, - "description": "监听上一月按钮", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 823, - "description": "监听下一月按钮", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 832, - "description": "监听下一年按钮", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 498, + "description": "获取 Tab 所有内容container 或 特定索引的 container", + "params": [ + { + "name": "_ix", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 841, - "description": "监听年份按钮, 是否要显示年份列表", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 507, + "description": "获取初始化要触发的 label", + "return": { + "description": "selector" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 863, - "description": "监听月份按钮, 是否要显示月份列表", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 512, + "description": "获取 Tab 活动状态的 class", + "return": { + "description": "string" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 877, - "description": "监听年份列表选择状态", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 517, + "description": "获取 Tab label 的触发事件名称", + "itemtype": "method", + "name": "activeEvent", + "return": { + "description": "string" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 887, - "description": "监听月份列表选择状态", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 523, + "description": "判断 label 是否符合要求, 或者设置一个 label为符合要求", + "params": [ + { + "name": "_setter", + "description": "", + "type": "Bool" + } + ], + "return": { + "description": "bool" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 897, - "description": "监听日期单元格点击事件", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 535, + "description": "判断 container 是否符合要求, 或者设置一个 container为符合要求", + "params": [ + { + "name": "_content", + "description": "", + "type": "Selector" + }, + { + "name": "_setter", + "description": "", + "type": "Bool" + } + ], + "return": { + "description": "bool" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 919, - "description": "监听body点击事件, 点击时隐藏日历控件的年份和月份列表", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 548, + "description": "获取或设置 label 的索引位置", + "params": [ + { + "name": "_label", + "description": "", + "type": "Selector" + }, + { + "name": "_setter", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "int" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 925, - "description": "DOM 加载完毕后, 初始化日历组件", - "itemtype": "event", - "name": "dom ready", - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 561, + "description": "获取Tab label 触发事件后的回调", + "return": { + "description": "function" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 939, - "description": "LunarCalendar 日历默认模板", - "itemtype": "property", - "name": "_deftpl", - "type": "string", - "static": 1, - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar.Model", - "namespace": "JC.LunarCalendar" + "file": "../comps/Tab/Tab.js", + "line": 571, + "description": "获取 Tab label 变更后的回调", + "return": { + "description": "function" + }, + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 1020, - "description": "返回农历和国历的所在日期的所有节日\n
            假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 }\n
            返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 }", - "itemtype": "method", - "name": "getFestivals", - "static": 1, + "file": "../comps/Tab/Tab.js", + "line": 581, + "description": "获取 Tab label 活动状态显示样式的标签", "params": [ { - "name": "_lunarDate", - "description": "农历日期对象, 由JC.LunarCalendar.gregorianToLunar 获取", - "type": "Object" - }, - { - "name": "_greDate", - "description": "日期对象", - "type": "Date" + "name": "_label", + "description": "", + "type": "Selector" } ], "return": { - "description": "Object" + "description": "selector" }, - "class": "JC.LunarCalendar", - "namespace": "JC.LunarCalendar" + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 1212, - "description": "为数字添加前置0", - "itemtype": "method", - "name": "JC.LunarCalendar.getFestival.intPad", + "file": "../comps/Tab/Tab.js", + "line": 594, + "description": "获取 ajax label 的 URL", "params": [ { - "name": "_n", - "description": "需要添加前置0的数字", - "type": "Int" - }, - { - "name": "_len", - "description": "需要添加_len个0, 默认为2", - "type": "Int" + "name": "_label", + "description": "", + "type": "Selector" } ], "return": { - "description": "", - "type": "String" + "description": "string" }, - "static": 1, - "access": "private", - "tagname": "", - "class": "JC.LunarCalendar", - "namespace": "JC.LunarCalendar" + "class": "JC.Tab", + "namespace": "JC" }, { - "file": "../comps/LunarCalendar/LunarCalendar.js", - "line": 1231, - "description": "从公历日期获得农历日期\n
            返回的数据格式\n
            \n       {\n           shengxiao: ''   //生肖\n           , ganzhi: ''    //干支\n           , yue: ''       //月份\n           , ri: ''        //日\n           , shi: ''       //时\n           , year: ''      //农历数字年\n           , month: ''     //农历数字月\n           , day: ''       //农历数字天\n           , hour: ''      //农历数字时\n       };\n
            ", - "itemtype": "method", - "name": "gregorianToLunar", - "static": 1, + "file": "../comps/Tab/Tab.js", + "line": 600, + "description": "获取 iframe label 的 URL", "params": [ { - "name": "_date", - "description": "要获取农历日期的时间对象", - "type": "Date" + "name": "_label", + "description": "", + "type": "Selector" } ], "return": { - "description": "Object" + "description": "string" }, - "class": "JC.LunarCalendar", - "namespace": "JC.LunarCalendar" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 132, - "description": "存放数据的model层, see Panel.Model", - "itemtype": "property", - "name": "_model", - "access": "private", - "tagname": "", - "class": "JC.Panel", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 138, - "description": "控制视图的view层, see Panel.View", - "itemtype": "property", - "name": "_view", - "access": "private", - "tagname": "", - "class": "JC.Panel", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 147, - "description": "从 selector 获取 Panel 的实例\n
            如果从DOM初始化, 不进行判断的话, 会重复初始化多次", - "itemtype": "method", - "name": "getInstance", + "file": "../comps/Tab/Tab.js", + "line": 606, + "description": "获取 ajax label 的请求方法 get/post", "params": [ { - "name": "_selector", + "name": "_label", "description": "", "type": "Selector" } ], - "static": 1, "return": { - "description": "", - "type": "Panel instance" + "description": "string" }, - "class": "JC.Panel", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 162, - "description": "显示Panel时, 是否 focus 到 按钮上\nfocusButton", - "itemtype": "property", - "name": "focusButton", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Panel", + "file": "../comps/Tab/Tab.js", + "line": 612, + "description": "获取 ajax label 的请求数据", + "params": [ + { + "name": "_label", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "object" + }, + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 171, - "description": "页面点击时, 是否自动关闭 Panel", - "itemtype": "property", - "name": "clickClose", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Panel", + "file": "../comps/Tab/Tab.js", + "line": 625, + "description": "获取 ajax label 请求URL后的回调", + "params": [ + { + "name": "_label", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "function" + }, + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 179, - "description": "自动关闭的时间间隔, 单位毫秒\n
            调用 ins.autoClose() 时生效", - "itemtype": "property", - "name": "autoCloseMs", - "type": "int", - "default": "2000", - "static": 1, - "class": "JC.Panel", + "file": "../comps/Tab/Tab.js", + "line": 639, + "description": "Tab 视图类初始化方法", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 188, - "description": "修正弹框的默认显示宽度", - "itemtype": "method", - "name": "_fixWidth", + "file": "../comps/Tab/Tab.js", + "line": 660, + "description": "设置特定索引位置的 label 为活动状态", "params": [ { - "name": "_msg", - "description": "查显示的文本", - "type": "String" - }, - { - "name": "_panel", - "description": "", - "type": "JC.Panel" - }, - { - "name": "_minWidth", - "description": "", - "type": "Int" - }, - { - "name": "_maxWidth", + "name": "_ix", "description": "", "type": "Int" } ], - "static": 1, - "access": "private", - "tagname": "", - "class": "JC.Panel", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 211, - "description": "获取 显示的 BUTTON", - "itemtype": "method", - "name": "_getButton", + "file": "../comps/Tab/Tab.js", + "line": 684, + "description": "请求特定索引位置的 ajax tab 数据", "params": [ { - "name": "_type", - "description": "0: 没有 BUTTON, 1: confirm, 2: confirm + cancel", + "name": "_ix", + "description": "", "type": "Int" } ], - "static": 1, - "access": "private", - "tagname": "", - "class": "JC.Panel", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 235, - "description": "初始化Panel", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.Panel", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 245, - "description": "初始化Panel 默认事件", - "access": "private", - "tagname": "", - "class": "JC.Panel", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 268, - "description": "为Panel绑定事件\n
            内置事件类型有 show, hide, close, center, confirm, cancel\n, beforeshow, beforehide, beforeclose, beforecenter\n
            用户可通过 HTML eventtype 属性自定义事件类型", - "itemtype": "method", - "name": "on", + "file": "../comps/Tab/Tab.js", + "line": 705, + "description": "请求特定索引位置的 ajax tab 数据", "params": [ { - "name": "_evtName", - "description": "要绑定的事件名", - "type": "String" - }, - { - "name": "_cb", - "description": "要绑定的事件回调函数", - "type": "Function" + "name": "_ix", + "description": "", + "type": "Int" } ], - "example": [ - "\n //绑定内置事件\n \n \n\n //绑定自定义事件\n \n " - ], - "class": "JC.Panel", + "class": "JC.Tab", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 294, - "description": "显示 Panel\n
            Panel初始后, 默认是隐藏状态, 显示 Panel 需要显式调用 show 方法", + "file": "../comps/Tab/Tab.js", + "line": 723, + "description": "自动化初始 Tab 实例\n如果 Tab.autoInit = true, 鼠标移至 Tab 后会自动初始化 Tab", + "class": "JC.Tab", + "namespace": "JC" + }, + { + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 212, + "description": "获取或设置 TableFreeze 的实例", "itemtype": "method", - "name": "show", + "name": "getInstance", "params": [ { - "name": "_position", - "description": "指定 panel 要显示的位置, \n
            如果 _position 为 int: 0, 表示屏幕居中显示\n
            如果 _position 为 selector: Paenl 的显示位置将基于 _position 的上下左右", - "type": "Int|selector" + "name": "_selector", + "description": "", + "type": "Selector" } ], - "example": [ - "\n panelInstace.show(); //默认显示\n panelInstace.show( 0 ); //居中显示\n panelInstace.show( _selector ); //位于 _selector 的上下左右" - ], - "class": "JC.Panel", + "static": 1, + "return": { + "description": "", + "type": "TableFreezeInstance" + }, + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 347, - "description": "设置Panel的显示位置基于 _src 的左右上下", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 227, + "description": "初始化可识别的 TableFreeze 实例", "itemtype": "method", - "name": "positionWith", + "name": "init", "params": [ { - "name": "_src", + "name": "_selector", "description": "", "type": "Selector" - }, - { - "name": "_selectorDiretion", - "description": "如果 _src 为 selector, _selectorDiretion 可以指定 top, 显示在上方", - "type": "String" } ], - "class": "JC.Panel", + "static": 1, + "return": { + "description": "", + "type": "Array of TableFreezeInstance" + }, + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 359, - "description": "隐藏 Panel\n
            隐藏 Panel 设置 css display:none, 不会从DOM 删除 Panel", - "itemtype": "method", - "name": "hide", - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 258, + "description": "为了解决ie6下表格的宽度超出父容器的宽度,父容器的宽度会跟随表格的宽度", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 370, - "description": "关闭 Panel\n
            关闭 Panel 是直接从 DOM 中删除 Panel", - "itemtype": "method", - "name": "close", - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 341, + "description": "冻结类型:prev, both, last; 默认为prev", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 382, - "description": "判断点击页面时, 是否自动关闭 Panel", - "itemtype": "method", - "name": "isClickClose", - "return": { - "description": "bool" - }, - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 352, + "description": "冻结列数:num,num 默认为1", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 391, - "description": "点击页面时, 添加自动隐藏功能", - "itemtype": "method", - "name": "clickClose", - "params": [ - { - "name": "_removeAutoClose", - "description": "", - "type": "Bool" - } - ], - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 384, + "description": "滚动区域的宽度默认120%", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 402, - "description": "clickClose 的别名\n
            这个方法的存在是为了向后兼容, 请使用 clickClose", - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 395, + "description": "tr 是否需要hover效果,默认为true", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 411, - "description": "添加自动关闭功能", - "itemtype": "method", - "name": "autoClose", - "params": [ - { - "name": "_removeAutoClose", - "description": "", - "type": "Bool" - } - ], - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 414, + "description": "tr的隔行换色", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 437, - "description": "focus 到 button\n
            优先查找 input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]\n
            input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]", - "itemtype": "method", - "name": "focusButton", - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 718, + "description": "TableFreeze调用前的回调", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 444, - "description": "从DOM清除Panel\n
            close 方法清除 Panel可以被用户阻止, 该方法不会被用户阻止", - "itemtype": "method", - "name": "dispose", - "class": "JC.Panel", + "file": "../comps/TableFreeze/TableFreeze.js", + "line": 729, + "description": "TableFreeze调用后的回调", + "class": "JC.TableFreeze", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 455, - "description": "把 Panel 位置设为屏幕居中", - "itemtype": "method", - "name": "center", - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 62, + "description": "数据模型类实例引用", + "itemtype": "property", + "name": "_model", + "type": "JC.Tips.Model", + "access": "private", + "tagname": "", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 466, - "description": "返回 Panel 的 jquery dom选择器对象\n
            这个方法以后将会清除, 请使用 layout 方法", - "itemtype": "method", - "name": "selector", - "return": { - "description": "", - "type": "Selector" - }, - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 69, + "description": "视图类实例引用", + "itemtype": "property", + "name": "_view", + "type": "JC.Tips.View", + "access": "private", + "tagname": "", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 473, - "description": "返回 Panel 的 jquery dom选择器对象", + "file": "../comps/Tips/Tips.js", + "line": 81, + "description": "初始化 Tips 内部属性", "itemtype": "method", - "name": "layout", - "return": { - "description": "", - "type": "Selector" - }, - "class": "JC.Panel", + "name": "_init", + "access": "private", + "tagname": "", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 479, - "description": "从 Panel 选择器中查找内容\n
            添加这个方法是为了方便jquery 使用者的习惯", + "file": "../comps/Tips/Tips.js", + "line": 103, + "description": "显示 Tips", "itemtype": "method", - "name": "find", + "name": "show", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "_evt", + "description": "_evt 可以是事件/或者带 pageX && pageY 属性的 Object\n
            pageX 和 pageY 是显示位于整个文档的绝对 x/y 轴位置", + "type": "Event|object" } ], "return": { - "description": "selector" + "description": "TipsInstance" }, - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 487, - "description": "触发 Panel 已绑定的事件\n
            用户可以使用该方法主动触发绑定的事件", + "file": "../comps/Tips/Tips.js", + "line": 115, + "description": "隐藏 Tips", "itemtype": "method", - "name": "trigger", - "params": [ - { - "name": "_evtName", - "description": "要触发的事件名, 必填参数", - "type": "String" - }, - { - "name": "_srcElement", - "description": "触发事件的源对象, 可选参数", - "type": "Selector" - } - ], - "example": [ - "\n panelInstace.trigger('close');\n panelInstace.trigger('userevent', sourceElement);" - ], - "class": "JC.Panel", + "name": "hide", + "return": { + "description": "TipsInstance" + }, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 523, - "description": "获取或者设置 Panel Header 的HTML内容\n
            如果 Panel默认没有 Header的话, 使用该方法 _html 非空可动态创建一个Header", + "file": "../comps/Tips/Tips.js", + "line": 121, + "description": "获取 显示 tips 的触发源选择器, 比如 a 标签", "itemtype": "method", - "name": "header", - "params": [ - { - "name": "_html", - "description": "", - "type": "String" - } - ], + "name": "selector", "return": { - "description": "header 的HTML内容", - "type": "String" + "description": "selector" }, - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 537, - "description": "获取或者设置 Panel body 的HTML内容", + "file": "../comps/Tips/Tips.js", + "line": 127, + "description": "获取 tips 外观的 选择器", "itemtype": "method", - "name": "body", + "name": "layout", "params": [ { - "name": "_html", - "description": "", - "type": "String" + "name": "_update", + "description": "是否更新 Tips 数据", + "type": "Bool" } ], "return": { - "description": "body 的HTML内容", - "type": "String" + "description": "selector" + }, + "class": "JC.Tips", + "namespace": "JC" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 134, + "description": "获取 tips 显示的内容", + "itemtype": "method", + "name": "data", + "return": { + "description": "string" }, - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 550, - "description": "获取或者设置 Panel footer 的HTML内容\n
            如果 Panel默认没有 footer的话, 使用该方法 _html 非空可动态创建一个footer", + "file": "../comps/Tips/Tips.js", + "line": 140, + "description": "使用 jquery on 绑定事件", "itemtype": "method", - "name": "footer", + "name": "on", + "type": "String", "params": [ { - "name": "_html", + "name": "_evtName", "description": "", "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" } ], "return": { - "description": "footer 的HTML内容", - "type": "String" + "description": "TipsInstance" }, - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 564, - "description": "获取或者设置 Panel 的HTML内容", + "file": "../comps/Tips/Tips.js", + "line": 148, + "description": "使用 jquery trigger 绑定事件", "itemtype": "method", - "name": "panel", + "name": "trigger", + "type": "String", "params": [ { - "name": "_html", + "name": "_evtName", "description": "", "type": "String" } ], "return": { - "description": "panel 的HTML内容", - "type": "String" + "description": "TipsInstance" }, - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 577, - "description": "获取 html popup/dialog 的触发 node", - "itemtype": "method", - "name": "triggerSelector", - "params": [ - { - "name": "_setterSelector", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "", - "type": "Selector|null" - }, - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 156, + "description": "tips 初始化实例后的触发的事件\n
            在HTML属性定义回调 tipsinitedcallback =\"function name\"", + "itemtype": "event", + "name": "TipsInited", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 588, - "description": "Panel 显示前会触发的事件
            \n这个事件在用户调用 _panelInstance.show() 时触发", + "file": "../comps/Tips/Tips.js", + "line": 161, + "description": "tips 显示后的回调\n
            在HTML属性定义回调 tipsshowcallback=\"function name\"", "itemtype": "event", - "name": "beforeshow", - "type": "function", - "example": [ - " \n panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });" - ], - "class": "JC.Panel", + "name": "TipsShow", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 596, - "description": "显示Panel时会触发的事件", + "file": "../comps/Tips/Tips.js", + "line": 166, + "description": "tips 显示前的回调\n
            在HTML属性定义回调 tipsbeforeshowcallback=\"function name\"", "itemtype": "event", - "name": "show", - "type": "function", - "example": [ - " \n panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });" - ], - "class": "JC.Panel", + "name": "TipsBeforeShow", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 603, - "description": "Panel 隐藏前会触发的事件
            \n
            这个事件在用户调用 _panelInstance.hide() 时触发", + "file": "../comps/Tips/Tips.js", + "line": 171, + "description": "tips 隐藏后的回调\n
            在HTML属性定义回调 tipshidecallback=\"function name\"", "itemtype": "event", - "name": "beforehide", - "type": "function", + "name": "TipsHide", + "class": "JC.Tips", + "namespace": "JC" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 176, + "description": "批量初始化 Tips 效果", + "itemtype": "method", + "name": "init", + "params": [ + { + "name": "_selector", + "description": "选择器列表对象, 如果带 title/tipsData 属性则会初始化 Tips 效果", + "type": "Selector" + } + ], + "static": 1, "example": [ - " \n panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });" + "\n \n \n " ], - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 611, - "description": "Panel 隐藏时会触发的事件
            \n
            这个事件在用户调用 _panelInstance.hide() 时触发", - "itemtype": "event", + "file": "../comps/Tips/Tips.js", + "line": 204, + "description": "隐藏 Tips", + "itemtype": "method", "name": "hide", - "type": "function", - "example": [ - " \n panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });" - ], - "class": "JC.Panel", + "static": 1, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 619, - "description": "Panel 关闭前会触发的事件
            \n这个事件在用户调用 _panelInstance.close() 时触发", - "itemtype": "event", - "name": "beforeclose", - "type": "function", - "example": [ - " \n \n " - ], - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 213, + "description": "页面加载完毕后, 是否自动初始化", + "itemtype": "property", + "name": "autoInit", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 630, - "description": "关闭事件", - "itemtype": "event", - "name": "close", - "type": "function", - "example": [ - " \n \n " - ], - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 221, + "description": "用户自定义模板\n
            如果用户显式覆盖此属性, Tips 会使用用户定义的模板", + "itemtype": "property", + "name": "tpl", + "type": "string", + "default": "null", + "static": 1, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 640, - "description": "Panel 居中显示前会触发的事件
            \n这个事件在用户调用 _panelInstance.center() 时触发", - "itemtype": "event", - "name": "beforecenter", - "type": "function", - "example": [ - " \n panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });" - ], - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 230, + "description": "设置 Tips 超过边界的默认偏移像素\n

            \nbottom: 边界超过屏幕底部的偏移\n
            left: 边界低于屏幕左侧的偏移\n
            top: 边界低于屏幕顶部的偏移\n

            ", + "itemtype": "property", + "name": "offset", + "type": "{point object}", + "default": "{ 'bottom': { 'x': 15, 'y': 15 }, 'left': { 'x': -28, 'y': 5 }, 'top': { 'x': -2, 'y': -22 } };", + "static": 1, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 648, - "description": "Panel 居中后会触发的事件", - "itemtype": "event", - "name": "center", - "type": "function", - "example": [ - " \n panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });" - ], - "class": "JC.Panel", + "file": "../comps/Tips/Tips.js", + "line": 247, + "description": "Tips 的最小宽度", + "itemtype": "property", + "name": "minWidth", + "type": "int", + "default": "200", + "static": 1, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 655, - "description": "Panel 点击确认按钮触发的事件", - "itemtype": "event", - "name": "confirm", - "type": "function", - "example": [ - " \n \n " + "file": "../comps/Tips/Tips.js", + "line": 255, + "description": "Tips 的最大宽度", + "itemtype": "property", + "name": "maxWidth", + "type": "int", + "default": "400", + "static": 1, + "class": "JC.Tips", + "namespace": "JC" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 263, + "description": "把 tag 的 title 属性 转为 tipsData \n

            注意: 这个方法只有当 Tips.autoInit 为假时, 或者浏览器会 IE时才会生效\n
            Tips.autoInit 为真时, 非IE浏览器无需转换\n
            如果为IE浏览器, 无论 Tips.autoInit 为真假, 都会进行转换\n
            方法内部已经做了判断, 可以直接调用, 对IE会生效\n, 这个方法的存在是因为 IE 的 title为延时显示, 所以tips显示后, 默认title会盖在tips上面\n

            ", + "itemtype": "method", + "name": "titleToTipsdata", + "params": [ + { + "name": "_selector", + "description": "要转title 为 tipsData的选择器列表", + "type": "Selector" + } ], - "class": "JC.Panel", + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 665, - "description": "Panel 点击确取消按钮触发的事件", - "itemtype": "event", - "name": "cancel", - "type": "function", - "example": [ - " \n \n " + "file": "../comps/Tips/Tips.js", + "line": 283, + "description": "从 selector 获得 或 设置 Tips 的实例", + "itemtype": "method", + "name": "getInstance", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_ins", + "description": "", + "type": "TipsInstance" + } ], - "class": "JC.Panel", + "return": { + "description": "TipsInstance" + }, + "static": 1, + "class": "JC.Tips", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 688, - "description": "panel 的 HTML 对象或者字符串\n
            这是初始化时的原始数据", + "file": "../comps/Tips/Tips.js", + "line": 305, + "description": "tips 默认模板", "itemtype": "property", - "name": "selector", - "type": "selector|string", - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "name": "tpl", + "type": "string", + "default": "
            ", + "class": "JC.Tips.Model", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 695, - "description": "header 内容 \n
            这是初始化时的原始数据", + "file": "../comps/Tips/Tips.js", + "line": 312, + "description": "保存 tips 的触发源选择器", "itemtype": "property", - "name": "headers", - "type": "string", - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "name": "_selector", + "type": "selector", + "access": "private", + "tagname": "", + "class": "JC.Tips.Model", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 702, - "description": "body 内容\n
            这是初始化时的原始数据", + "file": "../comps/Tips/Tips.js", + "line": 319, + "description": "tips 的显示内容\n
            标签的 title/tipsData 会保存在这个属性, 然后 title/tipsData 会被清除掉", "itemtype": "property", - "name": "bodys", + "name": "_data", "type": "string", - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "access": "private", + "tagname": "", + "class": "JC.Tips.Model", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 709, - "description": "footers 内容\n
            这是初始化时的原始数据", - "itemtype": "property", - "name": "footers", - "type": "string", - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "file": "../comps/Tips/Tips.js", + "line": 331, + "description": "初始化 tips 模型类", + "itemtype": "method", + "name": "_init", + "access": "private", + "tagname": "", + "static": 1, + "class": "JC.Tips.Model", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 716, - "description": "panel 初始化后的 selector 对象", + "file": "../comps/Tips/Tips.js", + "line": 343, + "description": "获取/更新 tips 显示内容", + "itemtype": "method", + "name": "data", + "params": [ + { + "name": "_update", + "description": "是否更新 tips 数据", + "type": "Bool" + } + ], + "return": { + "description": "string" + }, + "class": "JC.Tips.Model", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 354, + "description": "更新 tips 数据", + "itemtype": "method", + "name": "update", + "class": "JC.Tips.Model", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 367, + "description": "判断 selector 是否初始化过 Tips 功能", + "itemtype": "method", + "name": "isInited", + "params": [ + { + "name": "_setter", + "description": "", + "type": "Bool" + } + ], + "return": { + "description": "bool" + }, + "class": "JC.Tips.Model", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 378, + "description": "获取 tips 触发源选择器", + "itemtype": "method", + "name": "selector", + "return": { + "description": "selector" + }, + "class": "JC.Tips.Model", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 454, + "description": "保存 Tips 数据模型类的实例引用", "itemtype": "property", - "name": "panel", - "type": "selector", - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "name": "_model", + "type": "JC.Tips.Model", + "access": "private", + "tagname": "", + "class": "JC.Tips.View", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 722, - "description": "存储用户事件和默认事件的对象", + "file": "../comps/Tips/Tips.js", + "line": 461, + "description": "保存 Tips 的显示外观选择器", "itemtype": "property", - "name": "_events", - "type": "Object", + "name": "_layout", + "type": "selector", "access": "private", "tagname": "", - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "class": "JC.Tips.View", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 733, - "description": "Model 初始化方法", + "file": "../comps/Tips/Tips.js", + "line": 471, + "description": "初始化 Tips 视图类", "itemtype": "method", "name": "_init", "access": "private", "tagname": "", - "return": { - "description": "", - "type": "Model instance" - }, - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "class": "JC.Tips.View", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 766, - "description": "添加事件方法", + "file": "../comps/Tips/Tips.js", + "line": 483, + "description": "显示 Tips", "itemtype": "method", - "name": "addEvent", + "name": "show", "params": [ { - "name": "_evtName", - "description": "事件名", - "type": "String" - }, - { - "name": "_cb", - "description": "事件的回调函数", - "type": "Function" + "name": "_evt", + "description": "_evt 可以是事件/或者带 pageX && pageY 属性的 Object\n
            pageX 和 pageY 是显示位于整个文档的绝对 x/y 轴位置", + "type": "Event|object" } ], - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "class": "JC.Tips.View", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 782, - "description": "获取事件方法", + "file": "../comps/Tips/Tips.js", + "line": 520, + "description": "隐藏 Tips", "itemtype": "method", - "name": "getEvent", + "name": "hide", + "class": "JC.Tips.View", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 528, + "description": "获取 Tips 外观的 选择器", + "itemtype": "method", + "name": "layout", "params": [ { - "name": "_evtName", - "description": "事件名", - "type": "String" + "name": "_update", + "description": "是否更新 Tips 数据", + "type": "Bool" } ], "return": { - "description": "某类事件类型的所有回调", - "type": "Array" + "description": "selector" }, - "class": "JC.Panel.Model", - "namespace": "JC.Panel" + "class": "JC.Tips.View", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 835, - "description": "Panel的基础数据类, see Panel.Model", + "file": "../comps/Tips/Tips.js", + "line": 558, + "description": "鼠标移动到 Tips 触发源的触发事件", + "itemtype": "method", + "name": "tipMouseenter", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "access": "private", + "tagname": "", + "static": 1, + "class": "JC.Tips.View", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 590, + "description": "Tips 的默认模板", "itemtype": "property", - "name": "_model", - "type": "Panel.Model", + "name": "_defTpl", + "type": "string", "access": "private", "tagname": "", - "class": "JC.Panel.View", - "namespace": "JC.Panel" + "class": "JC.Tips.View", + "namespace": "JC.Tips" + }, + { + "file": "../comps/Tips/Tips.js", + "line": 598, + "description": "页面加载完毕后, 是否自动初始化 Tips", + "class": "JC.Tips.View", + "namespace": "JC.Tips" }, { - "file": "../comps/Panel/Panel.js", - "line": 842, - "description": "默认模板", - "prototype": "_tpl", - "type": "string", + "file": "../comps/Tree/Tree.js", + "line": 52, + "description": "树的数据模型引用", + "itemtype": "property", + "name": "_model", + "type": "JC.Tree.Model", "access": "private", "tagname": "", - "class": "JC.Panel.View", - "namespace": "JC.Panel" + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 854, - "description": "View 的初始方法", - "itemtype": "method", - "name": "_init", + "file": "../comps/Tree/Tree.js", + "line": 59, + "description": "树的视图模型引用", + "itemtype": "property", + "name": "_view", + "type": "JC.Tree.View", "access": "private", "tagname": "", - "class": "JC.Panel.View" + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 878, - "description": "设置Panel的显示位置基于 _src 的左右上下", + "file": "../comps/Tree/Tree.js", + "line": 67, + "description": "从选择器获取 树的 实例, 如果实例有限, 加以判断可避免重复初始化", "itemtype": "method", - "name": "positionWith", + "name": "getInstance", "params": [ { - "name": "_src", + "name": "_selector", "description": "", "type": "Selector" } ], - "class": "JC.Panel.View" + "static": 1, + "return": { + "description": "", + "type": "JC.Tree Instance|undefined" + }, + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 915, - "description": "显示 Panel", - "itemtype": "method", - "name": "show", - "class": "JC.Panel.View" + "file": "../comps/Tree/Tree.js", + "line": 79, + "description": "树的数据过滤函数\n
            如果树的初始数据格式不符合要求, 可通过该属性定义函数进行数据修正", + "itemtype": "property", + "name": "dataFilter", + "type": "function", + "default": "undefined", + "static": 1, + "example": [ + "\n JC.Tree.dataFilter =\n function( _data ){\n var _r = {};\n\n if( _data ){\n if( _data.root.length > 2 ){\n _data.root.shift();\n _r.root = _data.root;\n }\n _r.data = {};\n for( var k in _data.data ){\n _r.data[ k ] = [];\n for( var i = 0, j = _data.data[k].length; i < j; i++ ){\n if( _data.data[k][i].length < 3 ) continue;\n _data.data[k][i].shift();\n _r.data[k].push( _data.data[k][i] );\n }\n }\n }\n return _r;\n };" + ], + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 924, - "description": "focus button", + "file": "../comps/Tree/Tree.js", + "line": 112, + "description": "初始化树\n
            实例化树后, 需要显式调用该方法初始化树的可视状态", "itemtype": "method", - "name": "focus button", - "class": "JC.Panel.View" + "name": "init", + "example": [ + "\n var _tree = new JC.Tree( $('#tree_box'), treeData );\n _tree.init();" + ], + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 935, - "description": "隐藏 Panel", + "file": "../comps/Tree/Tree.js", + "line": 126, + "description": "展开树到某个具体节点, 或者展开树的所有节点", "itemtype": "method", - "name": "hide", - "class": "JC.Panel.View" + "name": "open", + "params": [ + { + "name": "_nodeId", + "description": "如果_nodeId='undefined', 将会展开树的所有节点\n
            _nodeId 不为空, 将展开树到 _nodeId 所在的节点", + "type": "String|int" + } + ], + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 943, - "description": "关闭 Panel", + "file": "../comps/Tree/Tree.js", + "line": 141, + "description": "关闭某个节点, 或者关闭整个树", "itemtype": "method", "name": "close", - "class": "JC.Panel.View" + "params": [ + { + "name": "_nodeId", + "description": "如果_nodeId='undefined', 将会关闭树的所有节点\n
            _nodeId 不为空, 将关闭树 _nodeId 所在的节点", + "type": "String|int" + } + ], + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 952, - "description": "获取 Panel 的 selector 对象", + "file": "../comps/Tree/Tree.js", + "line": 156, + "description": "获取树的 ID 前缀\n
            每个树都会有自己的随机ID前缀", "itemtype": "method", - "name": "getPanel", + "name": "idPrefix", "return": { - "description": "selector" + "description": "树的ID前缀", + "type": "String" }, - "class": "JC.Panel.View" + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 964, - "description": "获取或设置Panel的 header 内容, see Panel.header", + "file": "../comps/Tree/Tree.js", + "line": 163, + "description": "获取树的节点 label", "itemtype": "method", - "name": "getHeader", + "name": "getItem", "params": [ { - "name": "_udata", + "name": "_nodeId", "description": "", - "type": "String" + "type": "String|int" } ], - "return": { - "description": "string" - }, - "class": "JC.Panel.View" + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 984, - "description": "获取或设置Panel的 body 内容, see Panel.body", + "file": "../comps/Tree/Tree.js", + "line": 174, + "description": "绑定树内部事件\n
            注意: 所有事件名最终会被转换成小写", "itemtype": "method", - "name": "getBody", + "name": "on", "params": [ { - "name": "_udata", + "name": "_evtName", "description": "", "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" } ], - "return": { - "description": "string" - }, - "class": "JC.Panel.View" + "class": "JC.Tree", + "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 1000, - "description": "获取或设置Panel的 footer 内容, see Panel.footer", + "file": "../comps/Tree/Tree.js", + "line": 187, + "description": "获取树的某类事件类型的所有回调", "itemtype": "method", - "name": "getFooter", + "name": "event", "params": [ { - "name": "_udata", + "name": "_evtName", "description": "", "type": "String" } ], "return": { - "description": "string" + "description": "", + "type": "Array" }, - "class": "JC.Panel.View" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1020, - "description": "居中显示 Panel", - "itemtype": "method", - "name": "center", - "class": "JC.Panel.View" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1052, - "description": "Panel 的默认模板", - "access": "private", - "tagname": "", - "class": "JC.Panel.View" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1110, - "description": "监听Panel的所有点击事件\n
            如果事件源有 eventtype 属性, 则会触发eventtype的事件类型", - "itemtype": "event", - "name": "Panel click", - "access": "private", - "tagname": "", - "class": "JC.hideAllPopup", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1163, - "description": "从 HTML 属性 自动执行 popup", - "attr": "{function} panelcancelcallback cancel 回调", - "class": "JC.hideAllPopup", + "class": "JC.Tree", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 1205, - "description": "隐藏关闭按钮", - "class": "JC.hideAllPopup", + "file": "../comps/Tree/Tree.js", + "line": 194, + "description": "获取或设置树的高亮节点", + "itemtype": "method", + "name": "selectedItem", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "selector" + }, + "class": "JC.Tree", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 1325, - "description": "自定义 JC.msgbox 的显示模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "undefined", - "static": 1, - "class": "JC.msgbox", + "file": "../comps/Tree/Tree.js", + "line": 214, + "description": "树节点的点击事件", + "itemtype": "event", + "name": "click", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "example": [ + "\n _tree.on('click', function( _evt ){\n var _p = $(this);\n JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') );\n });" + ], + "class": "JC.Tree", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 1363, - "description": "自定义 JC.alert 的显示模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "undefined", - "static": 1, - "class": "JC.alert", + "file": "../comps/Tree/Tree.js", + "line": 225, + "description": "树节点的展现事件", + "itemtype": "event", + "name": "RenderLabel", + "params": [ + { + "name": "_data", + "description": "", + "type": "Array" + }, + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n _tree.on('RenderLabel', function( _data ){\n var _node = $(this);\n _node.html( JC.f.printf( '{1}', _data[0], _data[1] ) );\n });" + ], + "class": "JC.Tree", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 1408, - "description": "自定义 JC.confirm 的显示模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "undefined", - "static": 1, - "class": "JC.confirm", + "file": "../comps/Tree/Tree.js", + "line": 237, + "description": "树文件夹的点击事件", + "itemtype": "event", + "name": "FolderClick", + "params": [ + { + "name": "_evt", + "description": "", + "type": "Event" + } + ], + "example": [ + "\n _tree.on('FolderClick', function( _evt ){\n var _p = $(this);\n alert( 'folder click' );\n });" + ], + "class": "JC.Tree", "namespace": "JC" }, { - "file": "../comps/Panel/Panel.js", - "line": 1416, - "description": "弹框逻辑处理方法集", + "file": "../comps/Tree/Tree.js", + "line": 255, + "description": "树要展示的容器", "itemtype": "property", - "name": "_logic", + "name": "_container", + "type": "selector", "access": "private", "tagname": "", - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1423, - "description": "弹框最小宽度", + "file": "../comps/Tree/Tree.js", + "line": 262, + "description": "展现树需要的数据", "itemtype": "property", - "name": "_logic.minWidth", - "type": "int", - "default": "180", + "name": "_data", + "type": "object", "access": "private", "tagname": "", - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1432, - "description": "弹框最大宽度", + "file": "../comps/Tree/Tree.js", + "line": 269, + "description": "树的随机ID前缀", "itemtype": "property", - "name": "_logic.maxWidth", - "type": "int", - "default": "500", + "name": "_id", + "type": "string", "access": "private", "tagname": "", - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1441, - "description": "显示时 X轴的偏移值", + "file": "../comps/Tree/Tree.js", + "line": 276, + "description": "树当前的高亮节点", "itemtype": "property", - "name": "_logic.xoffset", - "type": "number", - "default": "9", + "name": "_highlight", + "type": "selector", "access": "private", "tagname": "", - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1450, - "description": "显示时 Y轴的偏移值", + "file": "../comps/Tree/Tree.js", + "line": 283, + "description": "保存树的所有绑定事件", "itemtype": "property", - "name": "_logic.yoffset", - "type": "number", - "default": "3", + "name": "_events", + "type": "object", "access": "private", "tagname": "", - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1459, - "description": "设置弹框的唯一性", + "file": "../comps/Tree/Tree.js", + "line": 297, + "description": "树模型类内部初始化方法", "itemtype": "method", - "name": "_logic.popupIdentifier", + "name": "_init", "access": "private", "tagname": "", - "params": [ - { - "name": "_panel", - "description": "", - "type": "JC.Panel" - } - ], - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1483, - "description": "弹框通用处理方法", + "file": "../comps/Tree/Tree.js", + "line": 307, + "description": "获取树所要展示的容器", "itemtype": "method", - "name": "_logic.popup", - "access": "private", - "tagname": "", + "name": "container", + "return": { + "description": "selector" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" + }, + { + "file": "../comps/Tree/Tree.js", + "line": 313, + "description": "获取节点将要显示的ID", + "itemtype": "method", + "name": "id", "params": [ { - "name": "_tpl", - "description": "弹框模板", - "type": "String" - }, - { - "name": "_msg", - "description": "弹框提示", + "name": "_id", + "description": "节点的原始ID", "type": "String" - }, - { - "name": "_popupSrc", - "description": "弹框事件源对象", - "type": "Selector" - }, - { - "name": "_status", - "description": "弹框状态", - "type": "Int" - }, - { - "name": "_cb", - "description": "confirm 回调", - "type": "Function" } ], "return": { - "description": "JC.Panel" + "description": "string 节点的最终ID" }, - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1555, - "description": "隐藏弹框缓动效果", + "file": "../comps/Tree/Tree.js", + "line": 320, + "description": "获取树的随机ID前缀", "itemtype": "method", - "name": "_logic.hideEffect", - "access": "private", - "tagname": "", - "params": [ - { - "name": "_panel", - "description": "", - "type": "JC.Panel" - }, - { - "name": "_popupSrc", - "description": "", - "type": "Selector" - }, - { - "name": "_doneCb", - "description": "缓动完成后的回调", - "type": "Function" - } - ], - "class": "JC.alert", - "namespace": "JC" + "name": "idPrefix", + "return": { + "description": "string" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1608, - "description": "隐藏弹框缓动效果", + "file": "../comps/Tree/Tree.js", + "line": 326, + "description": "获取树的原始数据", "itemtype": "method", - "name": "_logic.showEffect", - "access": "private", - "tagname": "", - "params": [ - { - "name": "_panel", - "description": "", - "type": "JC.Panel" - }, - { - "name": "_popupSrc", - "description": "", - "type": "Selector" - } - ], - "class": "JC.alert", - "namespace": "JC" + "name": "data", + "return": { + "description": "object" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1663, - "description": "设置 Panel 的默认X,Y轴", + "file": "../comps/Tree/Tree.js", + "line": 332, + "description": "获取树生成后的根节点", "itemtype": "method", - "name": "_logic.onresize", - "access": "private", - "tagname": "", + "name": "root", + "return": { + "description": "selector" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" + }, + { + "file": "../comps/Tree/Tree.js", + "line": 338, + "description": "获取ID的具体节点", + "itemtype": "method", + "name": "child", "params": [ { - "name": "_panel", + "name": "_id", "description": "", - "type": "Selector" + "type": "String" } ], - "class": "JC.alert", - "namespace": "JC" + "return": { + "description": "selector" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1699, - "description": "取得弹框最要显示的 y 轴", + "file": "../comps/Tree/Tree.js", + "line": 349, + "description": "判断原始数据的某个ID是否有子级节点", "itemtype": "method", - "name": "_logic.getTop", - "access": "private", - "tagname": "", + "name": "hasChild", "params": [ { - "name": "_scrTop", - "description": "滚动条Y位置", - "type": "Number" - }, - { - "name": "_srcHeight", - "description": "事件源 高度", - "type": "Number" - }, - { - "name": "_targetHeight", - "description": "弹框高度", - "type": "Number" - }, - { - "name": "_offset", - "description": "Y轴偏移值", - "type": "Number" + "name": "_id", + "description": "", + "type": "String" } ], "return": { - "description": "", - "type": "Number" + "description": "bool" }, - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1720, - "description": "取得弹框最要显示的 x 轴", + "file": "../comps/Tree/Tree.js", + "line": 356, + "description": "获取树的某类绑定事件的所有回调", "itemtype": "method", - "name": "_logic.getLeft", - "access": "private", - "tagname": "", + "name": "event", "params": [ { - "name": "_scrTop", - "description": "滚动条Y位置", - "type": "Number" - }, - { - "name": "_srcHeight", - "description": "事件源 高度", - "type": "Number" - }, - { - "name": "_targetHeight", - "description": "弹框高度", - "type": "Number" - }, - { - "name": "_offset", - "description": "Y轴偏移值", - "type": "Number" + "name": "_evtName", + "description": "", + "type": "String" } ], "return": { "description": "", - "type": "Number" + "type": "Array|undefined" }, - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1743, - "description": "修正弹框的默认显示宽度", + "file": "../comps/Tree/Tree.js", + "line": 367, + "description": "添加树内部事件", "itemtype": "method", - "name": "_logic.fixWidth", - "access": "private", - "tagname": "", + "name": "addEvent", "params": [ { - "name": "_msg", - "description": "查显示的文本", + "name": "_evtName", + "description": "", "type": "String" }, { - "name": "_panel", + "name": "_cb", "description": "", - "type": "JC.Panel" + "type": "Function" } ], - "class": "JC.alert", - "namespace": "JC" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 1760, - "description": "获取弹框的显示状态, 默认为0(成功)", + "file": "../comps/Tree/Tree.js", + "line": 379, + "description": "获取或设置树的高亮节点\n
            注意: 这个只是数据层面的设置, 不会影响视觉效果", "itemtype": "method", - "name": "_logic.fixWidth", - "access": "private", - "tagname": "", + "name": "highlight", "params": [ { - "name": "_status", - "description": "弹框状态: 0:成功, 1:失败, 2:警告", - "type": "Int" + "name": "_item", + "description": "", + "type": "Selector" } ], "return": { - "description": "", - "type": "Int" + "description": "selector" }, - "class": "JC.alert", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1778, - "description": "保存弹框的所有默认模板", - "itemtype": "property", - "name": "_logic.tpls", - "type": "Object", - "access": "private", - "tagname": "", - "class": "JC.alert", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1786, - "description": "msgbox 弹框的默认模板", - "itemtype": "property", - "name": "_logic.tpls.msgbox", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.alert", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1806, - "description": "alert 弹框的默认模板", - "itemtype": "property", - "name": "_logic.tpls.alert", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.alert", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1829, - "description": "confirm 弹框的默认模板", - "itemtype": "property", - "name": "_logic.tpls.confirm", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.alert", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1855, - "description": "响应窗口改变大小", - "class": "JC.alert", - "namespace": "JC" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 1966, - "description": "自定义 JC.Dialog.alert 的显示模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "undefined", - "static": 1, - "class": "JC.Dialog.msgbox", - "namespace": "JC.Dialog" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 2007, - "description": "自定义 JC.Dialog.alert 的显示模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "undefined", - "static": 1, - "class": "JC.Dialog.alert", - "namespace": "JC.Dialog" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 2053, - "description": "自定义 JC.Dialog.confirm 的显示模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "undefined", - "static": 1, - "class": "JC.Dialog.confirm", - "namespace": "JC.Dialog" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 2075, - "description": "会话弹框逻辑处理方法集", - "itemtype": "property", - "name": "_logic", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" - }, - { - "file": "../comps/Panel/Panel.js", - "line": 2082, - "description": "延时处理的指针属性", - "itemtype": "property", - "name": "_logic.timeout", - "type": "setTimeout", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2090, - "description": "延时显示弹框\n
            延时是为了使用户绑定的 show 事件能够被执行", - "itemtype": "property", - "name": "_logic.showMs", - "type": "int millisecond", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "file": "../comps/Tree/Tree.js", + "line": 392, + "description": "树的视图模型类", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2099, - "description": "弹框最小宽度", + "file": "../comps/Tree/Tree.js", + "line": 396, + "description": "树的数据模型引用", "itemtype": "property", - "name": "_logic.minWidth", - "type": "int", - "default": "180", + "name": "_model", + "type": "JC.Tree.Model", "access": "private", "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2108, - "description": "弹框最大宽度", + "file": "../comps/Tree/Tree.js", + "line": 403, + "description": "树生成后的根节点", "itemtype": "property", - "name": "_logic.maxWidth", - "type": "int", - "default": "500", + "name": "_treeRoot", + "type": "selector", "access": "private", "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2117, - "description": "设置会话弹框的唯一性", + "file": "../comps/Tree/Tree.js", + "line": 413, + "description": "初始化树的可视状态", "itemtype": "method", - "name": "_logic.dialogIdentifier", - "access": "private", - "tagname": "", + "name": "init", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" + }, + { + "file": "../comps/Tree/Tree.js", + "line": 424, + "description": "获取或设置树生成后的根节点", + "itemtype": "method", + "name": "treeRoot", "params": [ { - "name": "_panel", + "name": "_setter", "description": "", - "type": "JC.Panel" + "type": "String" } ], - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "return": { + "description": "selector" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2140, - "description": "显示蒙板", + "file": "../comps/Tree/Tree.js", + "line": 435, + "description": "处理树的展现效果", "itemtype": "method", - "name": "_logic.showMask", + "name": "_process", + "params": [ + { + "name": "_data", + "description": "节点数据", + "type": "Array" + }, + { + "name": "_parentNode", + "description": "", + "type": "Selector" + } + ], "access": "private", "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2160, - "description": "隐藏蒙板", + "file": "../comps/Tree/Tree.js", + "line": 455, + "description": "初始化树根节点", "itemtype": "method", - "name": "_logic.hideMask", + "name": "_initRoot", "access": "private", "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2172, - "description": "窗口改变大小时, 改变蒙板的大小,\n
            这个方法主要为了兼容 IE6", + "file": "../comps/Tree/Tree.js", + "line": 485, + "description": "初始化树的文件夹节点", "itemtype": "method", - "name": "_logic.setMaskSizeForIe6", + "name": "_initFolder", + "params": [ + { + "name": "_parentNode", + "description": "", + "type": "Selector" + }, + { + "name": "_data", + "description": "", + "type": "Object" + }, + { + "name": "_isLast", + "description": "", + "type": "Bool" + } + ], "access": "private", "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2195, - "description": "获取弹框的显示状态, 默认为0(成功)", + "file": "../comps/Tree/Tree.js", + "line": 510, + "description": "初始化树的文件节点", "itemtype": "method", - "name": "_logic.fixWidth", - "access": "private", - "tagname": "", + "name": "_initFile", "params": [ { - "name": "_status", - "description": "弹框状态: 0:成功, 1:失败, 2:警告", - "type": "Int" + "name": "_parentNode", + "description": "", + "type": "Selector" + }, + { + "name": "_data", + "description": "", + "type": "Object" + }, + { + "name": "_isLast", + "description": "", + "type": "Bool" } ], - "return": { - "description": "", - "type": "Int" - }, - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "access": "private", + "tagname": "", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2213, - "description": "修正弹框的默认显示宽度", + "file": "../comps/Tree/Tree.js", + "line": 531, + "description": "初始化树的节点标签", "itemtype": "method", - "name": "_logic.fixWidth", + "name": "_initLabel", "access": "private", "tagname": "", "params": [ { - "name": "_msg", - "description": "查显示的文本", - "type": "String" - }, - { - "name": "_panel", + "name": "_data", "description": "", - "type": "JC.Panel" + "type": "Object" } ], - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "return": { + "description": "selector" + }, + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2229, - "description": "保存会话弹框的所有默认模板", - "itemtype": "property", - "name": "_logic.tpls", - "type": "Object", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "file": "../comps/Tree/Tree.js", + "line": 555, + "description": "展开树的所有节点", + "itemtype": "method", + "name": "openAll", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2237, - "description": "msgbox 会话弹框的默认模板", - "itemtype": "property", - "name": "_logic.tpls.msgbox", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "file": "../comps/Tree/Tree.js", + "line": 566, + "description": "关闭树的所有节点", + "itemtype": "method", + "name": "closeAll", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2257, - "description": "alert 会话弹框的默认模板", - "itemtype": "property", - "name": "_logic.tpls.alert", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "file": "../comps/Tree/Tree.js", + "line": 578, + "description": "展开树到具体节点", + "itemtype": "method", + "name": "open", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String" + } + ], + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2280, - "description": "confirm 会话弹框的默认模板", - "itemtype": "property", - "name": "_logic.tpls.confirm", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "file": "../comps/Tree/Tree.js", + "line": 614, + "description": "关闭树的具体节点", + "itemtype": "method", + "name": "close", + "params": [ + { + "name": "_nodeId", + "description": "", + "type": "String" + } + ], + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2304, - "description": "会话弹框的蒙板模板", + "file": "../comps/Tree/Tree.js", + "line": 633, + "description": "树的最后的 hover 节点\n
            树的 hover 是全局属性, 页面上的所有树只会有一个当前 hover", "itemtype": "property", - "name": "_logic.tpls.mask", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "name": "lastHover", + "type": "selector", + "default": "null", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" + }, + { + "file": "../comps/Tree/Tree.js", + "line": 649, + "description": "捕获树文件标签的点击事件", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Panel/Panel.js", - "line": 2318, - "description": "响应窗口改变大小和滚动", - "class": "JC.Dialog", - "namespace": "JC.Dialog" + "file": "../comps/Tree/Tree.js", + "line": 675, + "description": "捕获树文件夹图标的点击事件", + "class": "JC.Tree.Model", + "namespace": "JC.Tree" }, { - "file": "../comps/Placeholder/Placeholder.js", - "line": 39, - "description": "获取或设置 Placeholder 的实例", + "file": "../comps/Valid/Valid.js", + "line": 361, + "description": "兼容函数式使用", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 410, + "description": "使用 jquery on 绑定事件", "itemtype": "method", - "name": "getInstance", + "name": "on", + "type": "String", "params": [ { - "name": "_selector", + "name": "_evtName", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_cb", + "description": "", + "type": "Function" } ], - "static": 1, "return": { - "description": "", - "type": "PlaceholderInstance" + "description": "ValidInstance" }, - "class": "JC.Placeholder", + "access": "private", + "tagname": "", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Placeholder/Placeholder.js", - "line": 55, - "description": "初始化可识别的 Placeholder 实例", + "file": "../comps/Valid/Valid.js", + "line": 419, + "description": "使用 jquery trigger 绑定事件", "itemtype": "method", - "name": "init", + "name": "trigger", + "type": "String", "params": [ { - "name": "_selector", + "name": "_evtName", "description": "", - "type": "Selector" + "type": "String" } ], - "static": 1, "return": { - "description": "", - "type": "Array of PlaceholderInstance" + "description": "ValidInstance" }, - "class": "JC.Placeholder", - "namespace": "JC" - }, - { - "file": "../comps/Placeholder/Placeholder.js", - "line": 100, - "description": "更新所有 placeholder 实现的状态", - "itemtype": "method", - "name": "update", - "static": 1, - "class": "JC.Placeholder", - "namespace": "JC" - }, - { - "file": "../comps/Placeholder/Placeholder.js", - "line": 115, - "description": "设置 Placeholder 的默认 className", - "itemtype": "property", - "name": "className", - "type": "string", - "default": "xplaceholder", - "static": 1, - "class": "JC.Placeholder", - "namespace": "JC" - }, - { - "file": "../comps/Placeholder/Placeholder.js", - "line": 123, - "description": "判断 input/textarea 默认是否支持 placeholder 功能", - "itemtype": "property", - "name": "isSupport", - "type": "bool", - "static": 1, - "class": "JC.Placeholder", + "access": "private", + "tagname": "", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Placeholder/Placeholder.js", - "line": 178, - "description": "更新 placeholder 状态", + "file": "../comps/Valid/Valid.js", + "line": 427, + "description": "分析_item是否附合规则要求", "itemtype": "method", - "name": "update", - "class": "JC.Placeholder", - "namespace": "JC" - }, - { - "file": "../comps/Placeholder/Placeholder.js", - "line": 299, - "description": "设置 控件 光标位置\nx@btbtd.org 2012-3-1", - "class": "JC.Placeholder", - "namespace": "JC" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 131, - "description": "初始化数据模型", - "class": "JC.Slider", - "namespace": "JC" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 135, - "description": "初始化视图模型( 根据不同的滚动方向, 初始化不同的视图类 )", - "class": "JC.Slider", + "name": "parse", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "access": "private", + "tagname": "", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 147, - "description": "内部初始化方法", + "file": "../comps/Valid/Valid.js", + "line": 549, + "description": "验证一个表单项, 如 文本框, 下拉框, 复选框, 单选框, 文本域, 隐藏域", "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", + "name": "check", + "static": 1, + "params": [ + { + "name": "_item", + "description": "需要验证规则正确与否的表单/表单项( 可同时传递多个_item )", + "type": "Selector" + } + ], + "example": [ + " \n JC.Valid.check( $( selector ) );\n JC.Valid.check( $( selector ), $( anotherSelector );\n JC.Valid.check( document.getElementById( item ) );\n\n if( !JC.Valid.check( $('form') ) ){\n _evt.preventDefault();\n return false;\n }" + ], "return": { - "description": "bool" + "description": "", + "type": "Boolean" }, - "class": "JC.Slider", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 175, - "description": "自定义事件绑定函数\n
            使用 jquery on 方法绑定 为 Slider 实例绑定事件", + "file": "../comps/Valid/Valid.js", + "line": 567, + "description": "这个方法是 Valid.check 的别名", "itemtype": "method", - "name": "on", + "name": "checkAll", + "static": 1, "params": [ { - "name": "_evtName", - "description": "", - "type": "String" - }, - { - "name": "_cb", - "description": "", - "type": "Function" + "name": "_item", + "description": "- 需要验证规则正确与否的表单/表单项", + "type": "Selector" } ], - "return": { - "description": "SliderInstance" - }, - "class": "JC.Slider", + "see": [ + "Valid.check" + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 188, - "description": "自定义事件触发函数\n
            使用 jquery trigger 方法绑定 为 Slider 实例函数自定义事件", + "file": "../comps/Valid/Valid.js", + "line": 574, + "description": "获取 Valid 的实例 ( Valid 是单例模式 )", "itemtype": "method", - "name": "trigger", + "name": "getInstance", "params": [ { - "name": "_evtName", + "name": "_selector", "description": "", - "type": "String" + "type": "Selector" } ], + "static": 1, "return": { - "description": "SliderInstance" + "description": "", + "type": "Valid instance" }, - "class": "JC.Slider", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 200, - "description": "控制 Slider 向左或向右划动", + "file": "../comps/Valid/Valid.js", + "line": 582, + "description": "检查是否需要延时 check\n
            以 html 属性 validCheckTimeout 定义, int 类型, type = ms", "itemtype": "method", - "name": "move", + "name": "checkTimeout", "params": [ { - "name": "_backwrad", - "description": "_backwrad = ture(向左), false(向右), 默认false", - "type": "Bool" + "name": "_selector", + "description": "", + "type": "Selector" + }, + { + "name": "_tm", + "description": "", + "type": "Int" } ], + "static": 1, "return": { - "description": "SliderInstance" + "description": "", + "type": "Valid instance" }, - "class": "JC.Slider", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 207, - "description": "控制 Slider 划动到指定索引", + "file": "../comps/Valid/Valid.js", + "line": 606, + "description": "判断/设置 selector 的数据是否合法\n
            通过 datavalid 属性判断", "itemtype": "method", - "name": "moveTo", + "name": "dataValid", "params": [ { - "name": "_newpointer", + "name": "_selector", "description": "", - "type": "Int" + "type": "Selector" + }, + { + "name": "_settter", + "description": "", + "type": "Bool" + }, + { + "name": "_noStatus", + "description": "", + "type": "Bool" + }, + { + "name": "_customMsg", + "description": "", + "type": "String" } ], + "static": 1, "return": { - "description": "SliderInstance" + "description": "bool" }, - "class": "JC.Slider", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 214, - "description": "获取 Slider 的总索引数", + "file": "../comps/Valid/Valid.js", + "line": 642, + "description": "判断 selector 是否 Valid 的处理对象", "itemtype": "method", - "name": "totalpage", + "name": "isValid", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], "return": { - "description": "int" + "description": "bool" }, - "class": "JC.Slider", + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 220, - "description": "获取 Slider 的当前索引数", - "itemtype": "method", - "name": "pointer", - "return": { - "description": "int" - }, - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 650, + "description": "提供对各种显示状态 setTimeout 执行的正确性 控制逻辑", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 226, - "description": "获取指定索引页的 selector 对象", + "file": "../comps/Valid/Valid.js", + "line": 697, + "description": "把一个表单项的状态设为正确状态", "itemtype": "method", - "name": "page", + "name": "setValid", "params": [ { - "name": "_ix", + "name": "_items", "description": "", + "type": "Selector" + }, + { + "name": "_tm", + "description": "延时 _tm 毫秒显示处理结果, 默认=150", "type": "Int" } ], - "return": { - "description": "array" - }, - "class": "JC.Slider", + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 233, - "description": "获取 Slider 的主外观容器", + "file": "../comps/Valid/Valid.js", + "line": 714, + "description": "把一个表单项的状态设为错误状态", "itemtype": "method", - "name": "layout", - "return": { - "description": "selector" - }, - "class": "JC.Slider", + "name": "setError", + "params": [ + { + "name": "_items", + "description": "", + "type": "Selector" + }, + { + "name": "_msgAttr", + "description": "- 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名\n
            如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateErrorMsg", + "type": "String" + }, + { + "name": "_fullMsg", + "description": "- 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写", + "type": "Bool" + } + ], + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 239, - "description": "查找 layout 的内容", + "file": "../comps/Valid/Valid.js", + "line": 739, + "description": "显示 focusmsg 属性的提示信息( 如果有的话 )", "itemtype": "method", - "name": "find", + "name": "setFocusMsg", "params": [ { - "name": "_selector", + "name": "_items", "description": "", "type": "Selector" + }, + { + "name": "_setHide", + "description": "", + "type": "Bool" + }, + { + "name": "_msgAttr", + "description": "- 显示指定需要读取的focusmsg信息属性名, 默认为 focusmsg, 通过该属性可以指定别的属性名\n
            如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateFocusMsg", + "type": "String" } ], - "return": { - "description": "selector" - }, - "class": "JC.Slider", + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 280, - "description": "初始化自动滚动\n
            如果 layout 的 html属性 sliderautomove=ture, 则会执行本函数", - "itemtype": "method", - "name": "_initAutoMove", - "access": "private", - "tagname": "", - "return": { - "description": "SliderInstance" - }, - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 767, + "description": "focus 时,是否总是显示 focusmsg 提示信息", + "itemtype": "property", + "name": "focusmsgEverytime", + "type": "bool", + "default": "true", + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 341, - "itemtype": "event", - "name": "inited", - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 775, + "description": "设置 em 的 css display 属性", + "itemtype": "property", + "name": "emDisplayType", + "type": "string", + "default": "inline", + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 344, - "itemtype": "event", - "name": "beforemove", - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 784, + "description": "验证正确时, 是否显示正确的样式", + "itemtype": "property", + "name": "showValidStatus", + "type": "bool", + "default": "false", + "static": 1, + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 347, - "itemtype": "event", - "name": "movedone", - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 792, + "description": "清除Valid生成的错误样式", + "itemtype": "method", + "name": "clearError", + "static": 1, + "params": [ + { + "name": "_selector", + "description": "- 需要清除错误的选择器", + "type": "Form|input|textarea|select|file|password" + } + ], + "example": [ + "\n JC.Valid.clearError( 'form' );\n JC.Valid.clearError( 'input.some' );" + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 350, - "itemtype": "event", - "name": "outmin", - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 803, + "description": "验证发生错误时, 是否终止继续验证\n
            为真终止继续验证, 为假将验证表单的所有项, 默认为 false", + "itemtype": "property", + "name": "errorAbort", + "type": "bool", + "default": "false", + "static": 1, + "example": [ + "\n $(document).ready( function($evt){\n JC.Valid.errorAbort = true;\n });" + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 353, - "itemtype": "event", - "name": "outmax", - "class": "JC.Slider", + "file": "../comps/Valid/Valid.js", + "line": 816, + "description": "是否自动清除两边的空格", + "itemtype": "property", + "name": "autoTrim", + "type": "bool", + "default": "true", + "static": 1, + "example": [ + "\n $(document).ready( function($evt){\n JC.Valid.autoTrim = false;\n });" + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 356, - "description": "页面加载完毕后, 是否自动初始化 带有 class=js_autoSlider 的应用", + "file": "../comps/Valid/Valid.js", + "line": 828, + "description": "对一个 control 作检查后的回调, 无论正确与否都会触发", "itemtype": "property", - "name": "autoInit", - "type": "bool", - "default": "true", + "name": "itemCallback", + "type": "function", + "default": "undefined", "static": 1, - "class": "JC.Slider", + "example": [ + "\n $(document).ready( function($evt){\n JC.Valid.itemCallback =\n function( _item, _isValid ){\n JC.log( 'JC.Valid.itemCallback _isValid:', _isValid );\n };\n });" + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 364, - "description": "批量初始化 Slider", + "file": "../comps/Valid/Valid.js", + "line": 843, + "description": "判断 表单控件是否为忽略检查 或者 设置 表单控件是否为忽略检查", "itemtype": "method", - "name": "init", + "name": "ignore", "params": [ { - "name": "_selector", + "name": "_item", "description": "", "type": "Selector" + }, + { + "name": "_delIgnore", + "description": "是否删除忽略属性, 如果为 undefined 将不执行 添加删除操作", + "type": "Bool" } ], "return": { - "description": "array" + "description": "bool" }, "static": 1, - "class": "JC.Slider", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 397, - "description": "从 selector 获得 或 设置 Slider 的实例", - "itemtype": "method", - "name": "getInstance", - "params": [ + "file": "../comps/Valid/Valid.js", + "line": 875, + "description": "定义 form control", + "itemtype": "property", + "name": "_formControls", + "return": { + "description": "bool" + }, + "access": "private", + "tagname": "", + "static": 1, + "class": "JC.Valid", + "namespace": "JC", + "subprops": [ { "name": "_selector", "description": "", "type": "Selector" - }, - { - "name": "_ins", - "description": "", - "type": "SliderInstance" } - ], - "return": { - "description": "SliderInstance" - }, - "static": 1, - "class": "JC.Slider", - "namespace": "JC" + ] }, { - "file": "../comps/Slider/Slider.js", - "line": 410, - "description": "判断 selector 是否具备 实例化 Slider 的条件", + "file": "../comps/Valid/Valid.js", + "line": 884, + "description": "判断 _selector 是否为 form control", "itemtype": "method", - "name": "isSlider", + "name": "isFormControl", "params": [ { "name": "_selector", @@ -6885,3980 +15882,3562 @@ "description": "bool" }, "static": 1, - "class": "JC.Slider", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 431, - "description": "保存 layout 的引用", - "itemtype": "property", - "name": "_layout", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 438, - "description": "自动移动的方向\n
            true = 向右|向下, false = 向左|向上", + "file": "../comps/Valid/Valid.js", + "line": 900, + "description": "是否禁用 自动 check 事件( focus, blur, change )", "itemtype": "property", - "name": "_moveDirection", + "name": "ignoreAutoCheckEvent", "type": "bool", - "default": "true", - "access": "private", - "tagname": "", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 447, - "description": "滚动时的 interval 引用", - "itemtype": "property", - "name": "_interval", - "type": "interval", - "access": "private", - "tagname": "", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 454, - "description": "自动滚动时的 timeout 引用", - "itemtype": "property", - "name": "_timeout", - "type": "timeout", - "access": "private", - "tagname": "", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 466, - "description": "内部初始化方法", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "return": { - "description": "Slider.Model" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "default": "false", + "static": 1, + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 487, - "description": "获取 slider 外观的 selector", - "itemtype": "method", - "name": "layout", - "return": { - "description": "selector" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 935, + "description": "获取 _item 的检查类型", + "static": 1, + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector|string" + } + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 493, - "description": "获取 左移的 selector", - "itemtype": "method", - "name": "leftbutton", - "return": { - "description": "selector" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 950, + "description": "获取 _item 的检查子类型, 所有可用的检查子类型位于 _logic.subdatatype 对象", + "static": 1, + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector|string" + } + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 499, - "description": "获取 右移的 selector", - "itemtype": "method", - "name": "rightbutton", - "return": { - "description": "selector" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1123, + "description": "检查内容的长度", + "static": 1, + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{integer} maxlength 内容最大长度", + "example": [ + "\n
            \n 公司名称描述\n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 505, - "description": "获取移动方向\n
            horizontal, vertical", - "itemtype": "method", - "name": "direction", - "default": "horizontal", - "return": { - "description": "string" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1148, + "description": "根据特殊的 datatype 实现不同的计算方法", + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 513, - "description": "获取/设置自动移动的方向\n
            true = 向右|向下, false = 向左|向上", - "itemtype": "method", - "name": "moveDirection", + "file": "../comps/Valid/Valid.js", + "line": 1174, + "description": "检查是否为正确的数字
            \n
            默认范围 0 - Math.pow(10, 10)", + "static": 1, "params": [ { - "name": "_setter", + "name": "_item", "description": "", - "type": "String" + "type": "Selector" } ], - "return": { - "description": "string" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 526, - "description": "获取每次移动多少项", - "itemtype": "method", - "name": "howmanyitem", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "attr": "{integer|optional} maxvalue - 数值的上限", + "example": [ + "\n
            \n \n
            \n
            \n \n
            \n
            \n \n
            \n" + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 532, - "description": "获取宽度", - "itemtype": "method", - "name": "width", - "default": "800", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1246, + "description": "检查是否为正确的整数或者浮点数
            \n
            默认范围 0 - Math.pow(10, 10)", + "static": 1, + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{integer|optional} maxvalue - 数值的上限", + "example": [ + "\n
            \n \n
            \n
            \n \n
            \n
            \n \n
            \n" + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 539, - "description": "获取高度", - "itemtype": "method", - "name": "height", - "default": "230", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1320, + "description": "检查两个输入框的数值\n
            数字格式为 0-pow(10,10)\n
            带小数点使用 nrange-int.float, 例: nrange-1.2 nrange-2.2\n
            注意: 如果不显示指定 fromNEl, toNEl, \n 将会从父级查找 datatype=nrange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略", + "static": 1, + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{date string|optional} maxvalue - 数值的上限", + "example": [ + "\n
            \n \n 大\n - 小\n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 546, - "description": "获取项宽度", - "itemtype": "method", - "name": "itemwidth", - "default": "160", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1415, + "description": "检查是否为合法的日期,\n
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{date string|optional} maxvalue - 日期的上限", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 553, - "description": "获取项高度", - "itemtype": "method", - "name": "itemheight", - "default": "230", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1453, + "description": "检查两个输入框的日期\n
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD\n
            注意: 如果不显示指定 fromDateEl, toDateEl, \n 将会从父级查找 datatype=daterange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{date string|optional} maxvalue - 日期的上限", + "example": [ + "\n
            \n \n - \n
            \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 560, - "description": "每次移动的总时间, 单位毫秒", - "itemtype": "method", - "name": "loop", - "default": "false", - "return": { - "description": "bool" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1538, + "description": "检查时间格式, 格式为 hh:mm:ss", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 567, - "description": "获取每次移动间隔的毫秒数", - "itemtype": "method", - "name": "stepms", - "default": "10", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1552, + "description": "检查时间格式, 格式为 hh:mm", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 574, - "description": "获取每次移动持续的毫秒数", - "itemtype": "method", - "name": "durationms", - "default": "300", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1566, + "description": "检查银行卡号码\n
            格式为: d{15}, d{16}, d{17}, d{19}", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 581, - "description": "获取自动滚动的间隔", - "itemtype": "method", - "name": "automovems", - "default": "2000", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1589, + "description": "检查中文姓名\n
            格式: 汉字和大小写字母\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 588, - "description": "获取是否自动滚动", - "itemtype": "method", - "name": "automove", - "default": "false", - "return": { - "description": "bool" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1607, + "description": "检查英文\n
            格式: 大小写字母 + 空格\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 595, - "description": "获取默认显示的索引", - "itemtype": "method", - "name": "defaultpage", - "return": { - "description": "int" - }, - "default": "0", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1625, + "description": "检查 英文名称/中文名称\n
            allname = cnname + enname\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 602, - "description": "获取划动的所有项", - "itemtype": "method", - "name": "subitems", - "return": { - "description": "selector" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1645, + "description": "检查注册用户名\n
            格式: a-zA-Z0-9_-\n
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 616, - "description": "获取分页总数\n
            Math.ceil( subitems / howmanyitem )", - "itemtype": "method", - "name": "totalpage", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "file": "../comps/Valid/Valid.js", + "line": 1662, + "description": "检查身份证号码
            \n目前只使用最简单的位数判断~ 有待完善", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 632, - "description": "获取指定页的所有划动项", - "itemtype": "method", - "name": "page", + "file": "../comps/Valid/Valid.js", + "line": 1678, + "description": "检查QQ号码( 5 ~ 11位数字 )", "params": [ { - "name": "_index", + "name": "_item", + "description": "", + "type": "Selector" + }, + { + "name": "_noError", "description": "", - "type": "Int" + "type": "Bool" } ], - "return": { - "description": "array" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 651, - "description": "获取/设置当前索引位置", - "itemtype": "method", - "name": "pointer", + "file": "../comps/Valid/Valid.js", + "line": 1695, + "description": "检查QQ号码( 数字号码|电子邮件 )\n
            5 ~ 11位数字", "params": [ { - "name": "_setter", + "name": "_item", "description": "", - "type": "Int" + "type": "Selector" + }, + { + "name": "_noError", + "description": "", + "type": "Bool" } ], - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 663, - "description": "获取新的划动位置\n
            根据划向的方向 和 是否循环", - "itemtype": "method", - "name": "newpointer", + "file": "../comps/Valid/Valid.js", + "line": 1713, + "description": "检查手机号码
            ", "params": [ { - "name": "_isbackward", + "name": "_item", + "description": "", + "type": "Selector" + }, + { + "name": "_noError", "description": "", "type": "Bool" } ], - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 679, - "description": "修正指针的索引位置, 防止范围溢出", - "itemtype": "method", - "name": "fixpointer", + "file": "../comps/Valid/Valid.js", + "line": 1730, + "description": "检查手机号码\n
            这个方法是 mobilecode 的别名", "params": [ { - "name": "_pointer", + "name": "_item", "description": "", - "type": "Int" + "type": "Selector" + }, + { + "name": "_noError", + "description": "", + "type": "Bool" } ], - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 697, - "description": "获取自动萌动的新索引", - "itemtype": "method", - "name": "automoveNewPointer", - "return": { - "description": "int" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 728, - "description": "获取/设置 划动的 interval 对象", - "itemtype": "method", - "name": "interval", + "file": "../comps/Valid/Valid.js", + "line": 1740, + "description": "检查手机号码加强方法\n
            格式: [+国家代码] [零]11位数字", "params": [ { - "name": "_setter", + "name": "_item", "description": "", - "type": "Interval" + "type": "Selector" + }, + { + "name": "_noError", + "description": "", + "type": "Bool" } ], - "return": { - "description": "interval" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 739, - "description": "清除划动的 interval", - "itemtype": "method", - "name": "clearInterval", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 747, - "description": "获取/设置 自动划动的 timeout", - "itemtype": "method", - "name": "timeout", + "file": "../comps/Valid/Valid.js", + "line": 1758, + "description": "检查电话号码\n
            格式: 7/8位数字", "params": [ { - "name": "_setter", + "name": "_item", "description": "", - "type": "Timeout" + "type": "Selector" } ], - "return": { - "description": "timeout" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 758, - "description": "清除自动划动的 timeout", - "itemtype": "method", - "name": "clearTimeout", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Slider/Slider.js", - "line": 766, - "description": "获取/设置当前鼠标是否位于 slider 及其控件上面", - "itemtype": "method", - "name": "controlover", + "file": "../comps/Valid/Valid.js", + "line": 1774, + "description": "检查电话号码\n
            格式: [区号]7/8位电话号码", "params": [ { - "name": "_setter", + "name": "_item", + "description": "", + "type": "Selector" + }, + { + "name": "_noError", "description": "", "type": "Bool" } ], - "return": { - "description": "bool" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 777, - "description": "获取初始化后的回调函数", - "itemtype": "method", - "name": "initedcb", - "return": { - "description": "function|undefined" - }, - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Slider/Slider.js", - "line": 964, - "description": "页面加载后, 自动初始化符合 Slider 规则的 Slider", - "class": "JC.Slider.Model", - "namespace": "JC.Slider" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 122, - "description": "suggest_so({ \"p\" : true,\n \"q\" : \"shinee\",\n \"s\" : [ \"shinee 综艺\",\n \"shinee美好的一天\",\n \"shinee hello baby\",\n \"shinee吧\",\n \"shinee泰民\",\n \"shinee fx\",\n \"shinee快乐大本营\",\n \"shinee钟铉车祸\",\n \"shinee年下男的约会\",\n \"shinee dream girl\"\n ]\n });", - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 154, - "description": "显示 Suggest", - "itemtype": "method", - "name": "show", - "return": { - "description": "SuggestInstance" - }, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 160, - "description": "隐藏 Suggest", - "itemtype": "method", - "name": "hide", - "return": { - "description": "SuggestInstance" - }, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 166, - "description": "获取 显示 Suggest 的触发源选择器, 比如 a 标签", - "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" - }, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 172, - "description": "获取 Suggest 外观的 选择器", - "itemtype": "method", - "name": "layout", - "return": { - "description": "selector" - }, - "class": "JC.Suggest", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Suggest/Suggest.js", - "line": 178, - "description": "使用 jquery on 绑定事件", - "itemtype": "method", - "name": "on", - "type": "String", + "file": "../comps/Valid/Valid.js", + "line": 1792, + "description": "检查电话号码\n
            格式: [+国家代码][ ][电话区号][ ]7/8位电话号码[#分机号]", "params": [ { - "name": "_evtName", + "name": "_item", "description": "", - "type": "String" + "type": "Selector" }, { - "name": "_cb", + "name": "_noError", "description": "", - "type": "Function" + "type": "Bool" } ], - "return": { - "description": "SuggestInstance" - }, - "class": "JC.Suggest", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Suggest/Suggest.js", - "line": 186, - "description": "使用 jquery trigger 绑定事件", - "itemtype": "method", - "name": "trigger", - "type": "String", + "file": "../comps/Valid/Valid.js", + "line": 1811, + "description": "检查电话区号", "params": [ { - "name": "_evtName", + "name": "_item", "description": "", - "type": "String" + "type": "Selector" } ], - "return": { - "description": "SuggestInstance" - }, - "class": "JC.Suggest", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Suggest/Suggest.js", - "line": 354, - "description": "获取或设置 Suggest 的实例", - "itemtype": "method", - "name": "getInstance", + "file": "../comps/Valid/Valid.js", + "line": 1831, + "description": "检查电话分机号码", "params": [ { - "name": "_selector", + "name": "_item", "description": "", "type": "Selector" - }, - { - "name": "_setter", - "description": "", - "type": "SuggestInstace|null" } ], - "static": 1, - "return": { - "description": "", - "type": "Suggest instance" - }, - "class": "JC.Suggest", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Suggest/Suggest.js", - "line": 371, - "description": "判断 selector 是否可以初始化 Suggest", - "itemtype": "method", - "name": "isSuggest", + "file": "../comps/Valid/Valid.js", + "line": 1846, + "description": "检查手机号码/电话号码\n
            这个方法是原有方法的混合验证 mobilecode + phone", "params": [ { - "name": "_selector", + "name": "_item", "description": "", "type": "Selector" } ], - "static": 1, - "return": { - "description": "bool" - }, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 386, - "description": "设置 Suggest 是否需要自动初始化", - "itemtype": "property", - "name": "autoInit", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 394, - "description": "自定义列表显示模板", - "itemtype": "property", - "name": "layoutTpl", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 402, - "description": "Suggest 返回列表的内容是否只使用", - "itemtype": "property", - "name": "layoutTpl", - "type": "string", - "default": "empty", - "static": 1, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 410, - "description": "数据过滤回调", - "itemtype": "property", - "name": "dataFilter", - "type": "function", - "default": "undefined", - "static": 1, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 418, - "description": "保存所有初始化过的实例", - "itemtype": "property", - "name": "_allIns", - "type": "array", - "default": "[]", - "access": "private", - "tagname": "", - "static": 1, - "class": "JC.Suggest", + "example": [ + "\n
            \n \n
            \n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Suggest/Suggest.js", - "line": 427, - "description": "隐藏其他 Suggest 显示列表", - "itemtype": "method", - "name": "_hideOther", + "file": "../comps/Valid/Valid.js", + "line": 1867, + "description": "检查手机号码/电话号码, 泛匹配\n
            这个方法是原有方法的混合验证 mobilezonecode + phoneall", "params": [ { - "name": "_ins", + "name": "_item", "description": "", - "type": "SuggestInstance" + "type": "Selector" } ], - "access": "private", - "tagname": "", - "static": 1, - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 754, - "description": "初始化完后的事件", - "itemtype": "event", - "name": "SuggestInited", - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 758, - "description": "获得新数据的事件", - "itemtype": "event", - "name": "SuggestUpdate", - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 762, - "description": "数据更新完毕后的事件", - "itemtype": "event", - "name": "SuggestUpdated", - "class": "JC.Suggest", - "namespace": "JC" - }, - { - "file": "../comps/Suggest/Suggest.js", - "line": 766, - "description": "显示前的事件", - "itemtype": "event", - "name": "SuggestBeforeShow", - "class": "JC.Suggest", + "example": [ + "\n
            \n \n
            \n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Suggest/Suggest.js", - "line": 770, - "description": "显示后的事件", - "itemtype": "event", - "name": "SuggestShow", - "class": "JC.Suggest", + "file": "../comps/Valid/Valid.js", + "line": 1887, + "description": "自定义正则校验", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{string} reg-pattern 正则规则 /规则/选项", + "example": [ + "\n
            \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 151, - "description": "Tab 模型类的实例", - "itemtype": "property", - "name": "_model", - "type": "JC.Tab.Model", - "access": "private", - "tagname": "", - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 1910, + "description": "检查验证码
            \n格式: 为 0-9a-zA-Z, 长度 默认为4", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "attr": "{string} datatype vcode|vcode-[\\d]+", + "example": [ + "\n
            \n \n
            \n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 158, - "description": "Tab 视图类的实例", - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 1933, + "description": "检查文本长度", + "see": [ + "length" + ], + "attr": "{string} datatype text", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 166, - "description": "页面加载完毕后, 是否要添加自动初始化事件\n
            自动初始化是 鼠标移动到 Tab 容器时去执行的, 不是页面加载完毕后就开始自动初始化", - "itemtype": "property", - "name": "autoInit", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 1939, + "description": "检查文本的字节长度", + "see": [ + "length" + ], + "attr": "{string} datatype bytetext", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 175, - "description": "label 当前状态的样式", - "itemtype": "property", - "name": "activeClass", - "type": "string", - "default": "cur", - "static": 1, - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 1945, + "description": "检查富文本的字节\n
            TODO: 完成富文本长度检查", + "see": [ + "length" + ], + "attr": "{string} datatype richtext", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 183, - "description": "label 的触发事件", - "itemtype": "property", - "name": "activeEvent", - "type": "string", - "default": "click", - "static": 1, - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 1952, + "description": "计算字符串的字节长度, 非 ASCII 0-255的字符视为两个字节", + "params": [ + { + "name": "_s", + "description": "", + "type": "String" + } + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 191, - "description": "获取或设置 Tab 容器的 Tab 实例属性", - "itemtype": "method", - "name": "getInstance", + "file": "../comps/Valid/Valid.js", + "line": 1960, + "description": "检查URL", "params": [ { - "name": "_selector", + "name": "_item", "description": "", "type": "Selector" - }, - { - "name": "_setter", - "description": "_setter 不为空是设置", - "type": "JC.Tab" } ], - "static": 1, - "class": "JC.Tab", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 207, - "description": "全局的 ajax 处理回调", - "itemtype": "property", - "name": "ajaxCallback", - "type": "function", - "default": "null", - "static": 1, - "example": [ - "\n $(document).ready( function(){\n JC.Tab.ajaxCallback =\n function( _data, _label, _container, _textStatus, _jqXHR ){\n _data && ( _data = $.parseJSON( _data ) );\n if( _data && _data.errorno === 0 ){\n _container.html( printf( '

            JC.Tab.ajaxCallback

            {0}', _data.data ) );\n }else{\n Tab.isAjaxInited( _label, 0 );\n _container.html( '

            内容加载失败!

            ' );\n }\n };\n });" + "file": "../comps/Valid/Valid.js", + "line": 1978, + "description": "检查域名", + "params": [ + { + "name": "_item!~YUIDOC_LINE~!", + "description": "
            \n \n
            ", + "type": "Selector" + } ], - "class": "JC.Tab", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 228, - "description": "ajax 请求是否添加随机参数 rnd, 以防止页面缓存的结果差异", - "itemtype": "property", - "name": "ajaxRandom", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 1993, + "description": "检查域名", + "params": [ + { + "name": "_item!~YUIDOC_LINE~!", + "description": "
            \n \n
            ", + "type": "Selector" + } + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 236, - "description": "判断一个 label 是否为 ajax", - "itemtype": "method", - "name": "isAjax", - "static": 1, + "file": "../comps/Valid/Valid.js", + "line": 2007, + "description": "检查电子邮件", "params": [ { - "name": "_label", + "name": "_item", "description": "", "type": "Selector" } ], - "return": { - "description": "", - "type": "String|undefined" - }, - "class": "JC.Tab", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 247, - "description": "判断一个 ajax label 是否已经初始化过\n
            这个方法需要跟 Tab.isAjax 结合判断才更为准确", - "itemtype": "method", - "name": "isAjaxInited", - "static": 1, + "file": "../comps/Valid/Valid.js", + "line": 2021, + "description": "检查地区代码", "params": [ { - "name": "_label", + "name": "_item", "description": "", "type": "Selector" - }, - { - "name": "_setter", - "description": "如果 _setter 不为空, 则进行赋值", - "type": "Bool" } ], "example": [ - "\n function tabactive( _evt, _container, _tabIns ){\n var _label = $(this);\n JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() );\n if( JC.Tab.isAjax( _label ) && ! JC.Tab.isAjaxInited( _label ) ){\n _container.html( '

            内容加载中...

            ' );\n }\n }" + "\n
            \n \n
            " ], - "class": "JC.Tab", + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 270, - "description": "Tab 内部初始化方法", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.Tab", + "file": "../comps/Valid/Valid.js", + "line": 2035, + "description": "检查邮政编码", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 287, - "description": "把 _label 设置为活动状态", - "itemtype": "method", - "name": "active", + "file": "../comps/Valid/Valid.js", + "line": 2049, + "description": "纳税人识别号, 15, 18, 20位字符", "params": [ { - "name": "_label", + "name": "_item", "description": "", "type": "Selector" } ], - "class": "JC.Tab", + "example": [ + "\n
            \n \n
            " + ], + "class": "JC.Valid", "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 313, - "description": "Tab 的主容器", - "itemtype": "property", - "name": "_layout", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 320, - "description": "Tab 初始完毕后要触发的label, 可选", - "itemtype": "property", - "name": "_triggerTarget", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 327, - "description": "Tab 的标签列表选择器", - "itemtype": "property", - "name": "_tablabels", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 334, - "description": "Tab 的内容列表选择器", - "itemtype": "property", - "name": "_tabcontainers", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 341, - "description": "当前标签的所在索引位置", - "itemtype": "property", - "name": "currentIndex", - "type": "int", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 352, - "description": "Tab Model 内部初始化方法", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 380, - "description": "判断是否从 layout 下查找内容", - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../comps/Valid/Valid.js", + "line": 2067, + "description": "此类型检查 2|N 个对象填写的值必须一致\n常用于注意时密码验证/重置密码", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            \n \n
            \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 387, - "description": "获取 Tab 的主容器", - "itemtype": "method", - "name": "layout", - "return": { - "description": "selector" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../comps/Valid/Valid.js", + "line": 2155, + "description": "此类型检查 2|N个对象必须至少有一个是有输入内容的, \n
            常用于 手机/电话 二填一", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "example": [ + "\n
            \n
            \n \n
            \n
            \n \n - \n - \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            \n \n
            \n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 393, - "description": "获取 Tab 所有 label 或 特定索引的 label", - "itemtype": "method", - "name": "tablabels", + "file": "../comps/Valid/Valid.js", + "line": 2302, + "description": "如果 _item 的值非空, 那么 reqtarget 的值也不能为空", "params": [ { - "name": "_ix", + "name": "_item", "description": "", - "type": "Int" + "type": "Selector" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 403, - "description": "获取 Tab 所有内容container 或 特定索引的 container", - "itemtype": "method", - "name": "tabcontainers", + "file": "../comps/Valid/Valid.js", + "line": 2324, + "description": "数值必须为偶数", "params": [ { - "name": "_ix", + "name": "_item", "description": "", - "type": "Int" + "type": "Selector" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 413, - "description": "获取初始化要触发的 label", - "itemtype": "method", - "name": "triggerTarget", - "return": { - "description": "selector" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../comps/Valid/Valid.js", + "line": 2347, + "description": "数值必须为奇数", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 419, - "description": "判断一个容器是否 符合 Tab 数据要求", - "itemtype": "method", - "name": "layoutIsTab", - "return": { - "description": "bool" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../comps/Valid/Valid.js", + "line": 2386, + "description": "N 个值必须保持唯一性, 不能有重复", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 425, - "description": "获取 Tab 活动状态的 class", - "itemtype": "method", - "name": "activeClass", - "return": { - "description": "string" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../comps/Valid/Valid.js", + "line": 2562, + "description": "获取 _selector 对象\n
            这个方法的存在是为了向后兼容qwrap, qwrap DOM参数都为ID", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 431, - "description": "获取 Tab label 的触发事件名称", - "itemtype": "method", - "name": "activeEvent", - "return": { - "description": "string" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../comps/Valid/Valid.js", + "line": 2582, + "description": "获取对应的错误信息, 默认的错误信息有 reqmsg, errmsg,
            \n注意: 错误信息第一个字符如果为空格的话, 将完全使用用户定义的错误信息, 将不会动态添加 请上传/选择/填写", + "params": [ + { + "name": "_item", + "description": "", + "type": "Selector" + }, + { + "name": "_msgAttr", + "description": "- 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名", + "type": "String" + }, + { + "name": "_fullMsg", + "description": "- 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写", + "type": "Bool" + } + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 437, - "description": "判断 label 是否符合要求, 或者设置一个 label为符合要求", - "itemtype": "method", - "name": "tablabel", + "file": "../comps/Valid/Valid.js", + "line": 2614, + "description": "检查内容是否为空,\n
            如果声明了该属性, 那么 value 须不为空", "params": [ { - "name": "_setter", + "name": "_item", "description": "", - "type": "Bool" + "type": "Selector" } ], - "return": { - "description": "bool" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "example": [ + "\n
            \n 公司名称描述\n
            " + ], + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 450, - "description": "判断 container 是否符合要求, 或者设置一个 container为符合要求", - "itemtype": "method", - "name": "tabcontent", + "file": "../comps/Valid/Valid.js", + "line": 2698, + "description": "这里需要优化检查, 目前会重复检查(2次)", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 2823, + "description": "验证文件扩展名", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 2943, + "description": "显示正确的视觉效果", "params": [ { - "name": "_content", + "name": "_item", "description": "", "type": "Selector" }, { - "name": "_setter", + "name": "_tm", + "description": "", + "type": "Int" + }, + { + "name": "_noStyle", "description": "", "type": "Bool" } ], - "return": { - "description": "bool" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "JC.Valid", + "namespace": "JC" }, { - "file": "../comps/Tab/Tab.js", - "line": 464, - "description": "获取或设置 label 的索引位置", - "itemtype": "method", - "name": "tabindex", + "file": "../comps/Valid/Valid.js", + "line": 2998, + "description": "显示错误的视觉效果", "params": [ { - "name": "_label", + "name": "_item", "description": "", "type": "Selector" }, { - "name": "_setter", - "description": "", - "type": "Int" + "name": "_msgAttr", + "description": "- 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名", + "type": "String" + }, + { + "name": "_fullMsg", + "description": "- 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写", + "type": "Bool" } ], - "return": { - "description": "int" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3068, + "description": "解析错误时触发的时件", + "itemtype": "event", + "name": "ValidError", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3072, + "description": "解析正确时触发的时件", + "itemtype": "event", + "name": "ValidCorrect", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3076, + "description": "响应表单子对象的 blur事件, 触发事件时, 检查并显示错误或正确的视觉效果", + "access": "private", + "tagname": "", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3086, + "description": "响应没有 type 的 文本框", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3104, + "description": "响应表单子对象的 change 事件, 触发事件时, 检查并显示错误或正确的视觉效果", + "access": "private", + "tagname": "", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3114, + "description": "响应表单子对象的 focus 事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息", + "access": "private", + "tagname": "", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3125, + "description": "响应表单子对象的 blur事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息", + "access": "private", + "tagname": "", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../comps/Valid/Valid.js", + "line": 3153, + "description": "初始化 [ subdatatype = datavalid | exdatatype = datavalid ] 相关事件", + "class": "JC.Valid", + "namespace": "JC" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 3, + "description": "Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 10, + "access": "private", + "tagname": "", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 17, + "description": "Use jasmine.undefined instead of undefined, since undefined is just\na plain old variable and may be redefined by somebody else.", + "access": "private", + "tagname": "", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 478, - "description": "获取Tab label 触发事件后的回调", - "itemtype": "method", - "name": "tabactivecallback", - "return": { - "description": "function" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 25, + "description": "Show diagnostic messages in the console if set to true", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 489, - "description": "获取 Tab label 变更后的回调", - "itemtype": "method", - "name": "tabchangecallback", - "return": { - "description": "function" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 31, + "description": "Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 500, - "description": "获取 Tab label 活动状态显示样式的标签", - "itemtype": "method", - "name": "tablabelparent", - "params": [ - { - "name": "_label", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "selector" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 37, + "description": "Default timeout interval in milliseconds for waitsFor() blocks.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 514, - "description": "获取 ajax label 的 URL", - "itemtype": "method", - "name": "tabajaxurl", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 50, + "description": "Allows for bound functions to be compared. Internal use only.", + "ignore": "", + "access": "private", + "tagname": "", "params": [ { - "name": "_label", - "description": "", - "type": "Selector" + "name": "base", + "description": "bound 'this' for the function", + "type": "Object" + }, + { + "name": "name", + "description": "function to find", + "type": "Function" } ], - "return": { - "description": "string" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 521, - "description": "获取 ajax label 的请求方法 get/post", - "itemtype": "method", - "name": "tabajaxmethod", - "params": [ - { - "name": "_label", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "string" - }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 114, + "description": "Getter for the Jasmine environment. Ensures one gets created", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 528, - "description": "获取 ajax label 的请求数据", - "itemtype": "method", - "name": "tabajaxdata", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 122, + "ignore": "", + "access": "private", + "tagname": "", "params": [ { - "name": "_label", - "description": "", - "type": "Selector" + "name": "value", + "description": "" } ], "return": { - "description": "object" + "description": "", + "type": "Boolean" }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 542, - "description": "获取 ajax label 请求URL后的回调", - "itemtype": "method", - "name": "tabajaxcallback", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 132, + "ignore": "", + "access": "private", + "tagname": "", "params": [ { - "name": "_label", - "description": "", - "type": "Selector" + "name": "value", + "description": "" } ], "return": { - "description": "function" + "description": "", + "type": "Boolean" }, - "class": "JC.Tab.Model", - "namespace": "JC.Tab" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tab/Tab.js", - "line": 563, - "description": "Tab 数据模型类实例引用", - "itemtype": "property", - "name": "_model", - "type": "{JC.Tab.Model}", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 142, + "ignore": "", "access": "private", "tagname": "", - "class": "JC.Tab.View", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 573, - "description": "Tab 视图类初始化方法", - "itemtype": "method", - "name": "init", - "class": "JC.Tab.View", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 595, - "description": "设置特定索引位置的 label 为活动状态", - "itemtype": "method", - "name": "active", - "params": [ - { - "name": "_ix", - "description": "", - "type": "Int" - } - ], - "class": "JC.Tab.View", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 619, - "description": "请求特定索引位置的 ajax tab 数据", - "itemtype": "method", - "name": "activeAjax", "params": [ { - "name": "_ix", - "description": "", - "type": "Int" + "name": "value", + "description": "" } ], - "class": "JC.Tab.View", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tab/Tab.js", - "line": 647, - "description": "自动化初始 Tab 实例\n如果 Tab.autoInit = true, 鼠标移至 Tab 后会自动初始化 Tab", - "class": "JC.Tab.View", - "namespace": "JC.Tab" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 59, - "description": "数据模型类实例引用", - "itemtype": "property", - "name": "_model", - "type": "JC.Tips.Model", - "access": "private", - "tagname": "", - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 66, - "description": "视图类实例引用", - "itemtype": "property", - "name": "_view", - "type": "JC.Tips.View", - "access": "private", - "tagname": "", - "class": "JC.Tips", - "namespace": "JC" + "return": { + "description": "", + "type": "Boolean" + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 78, - "description": "初始化 Tips 内部属性", - "itemtype": "method", - "name": "_init", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 152, + "ignore": "", "access": "private", "tagname": "", - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 100, - "description": "显示 Tips", - "itemtype": "method", - "name": "show", "params": [ { - "name": "_evt", - "description": "_evt 可以是事件/或者带 pageX && pageY 属性的 Object\n
            pageX 和 pageY 是显示位于整个文档的绝对 x/y 轴位置", - "type": "Event|object" + "name": "typeName", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "" } ], "return": { - "description": "TipsInstance" - }, - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 112, - "description": "隐藏 Tips", - "itemtype": "method", - "name": "hide", - "return": { - "description": "TipsInstance" - }, - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 118, - "description": "获取 显示 tips 的触发源选择器, 比如 a 标签", - "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" + "description": "", + "type": "Boolean" }, - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 124, - "description": "获取 tips 外观的 选择器", - "itemtype": "method", - "name": "layout", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 163, + "description": "Pretty printer for expecations. Takes any object and turns it into a human-readable string.", "params": [ { - "name": "_update", - "description": "是否更新 Tips 数据", - "type": "Bool" + "name": "value", + "description": "an object to be outputted", + "type": "Object" } ], "return": { - "description": "selector" + "description": "", + "type": "String" }, - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 131, - "description": "获取 tips 显示的内容", - "itemtype": "method", - "name": "data", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 175, + "description": "Returns true if the object is a DOM Node.", + "params": [ + { + "name": "obj", + "description": "object to check", + "type": "Object" + } + ], "return": { - "description": "string" + "description": "", + "type": "Boolean" }, - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 137, - "description": "使用 jquery on 绑定事件", - "itemtype": "method", - "name": "on", - "type": "String", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 185, + "description": "Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter.", + "example": [ + "\n// don't care about which function is passed in, as long as it's a function\nexpect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));" + ], "params": [ { - "name": "_evtName", - "description": "", - "type": "String" - }, - { - "name": "_cb", + "name": "clazz", "description": "", - "type": "Function" + "type": "Class" } ], "return": { - "description": "TipsInstance" + "description": "matchable object of the type clazz" }, - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 145, - "description": "使用 jquery trigger 绑定事件", - "itemtype": "method", - "name": "trigger", - "type": "String", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 199, + "description": "Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the\nattributes on the object.", + "example": [ + "\n// don't care about any other attributes than foo.\nexpect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: \"bar\"});" + ], "params": [ { - "name": "_evtName", - "description": "", - "type": "String" + "name": "sample", + "description": "sample", + "type": "Object" } ], "return": { - "description": "TipsInstance" + "description": "matchable object for the sample" }, - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 153, - "description": "tips 初始化实例后的触发的事件\n
            在HTML属性定义回调 tipsinitedcallback =\"function name\"", - "itemtype": "event", - "name": "TipsInited", - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 214, + "description": "Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.\n\nSpies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine\nexpectation syntax. Spies can be checked if they were called or not and what the calling params were.\n\nA Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).\n\nSpies are torn down at the end of every spec.\n\nNote: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.", + "example": [ + "\n// a stub\nvar myStub = jasmine.createSpy('myStub'); // can be used anywhere\n\n// spy example\nvar foo = {\n not: function(bool) { return !bool; }\n}\n\n// actual foo.not will not be called, execution stops\nspyOn(foo, 'not');\n\n// foo.not spied upon, execution will continue to implementation\nspyOn(foo, 'not').andCallThrough();\n\n// fake example\nvar foo = {\n not: function(bool) { return !bool; }\n}\n\n// foo.not(val) will return val\nspyOn(foo, 'not').andCallFake(function(value) {return value;});\n\n// mock example\nfoo.not(7 == 7);\nexpect(foo.not).toHaveBeenCalled();\nexpect(foo.not).toHaveBeenCalledWith(true);" + ], + "is_constructor": 1, + "see": [ + "spyOn", + "jasmine.createSpy", + "jasmine.createSpyObj" + ], + "params": [ + { + "name": "name", + "description": "", + "type": "String" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 158, - "description": "tips 显示后的回调\n
            在HTML属性定义回调 tipsshowcallback=\"function name\"", - "itemtype": "event", - "name": "TipsShow", - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 259, + "description": "The name of the spy, if provided.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 163, - "description": "tips 显示前的回调\n
            在HTML属性定义回调 tipsbeforeshowcallback=\"function name\"", - "itemtype": "event", - "name": "TipsBeforeShow", - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 263, + "description": "Is this Object a spy?", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 168, - "description": "tips 隐藏后的回调\n
            在HTML属性定义回调 tipshidecallback=\"function name\"", - "itemtype": "event", - "name": "TipsHide", - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 267, + "description": "The actual function this spy stubs.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 173, - "description": "批量初始化 Tips 效果", - "itemtype": "method", - "name": "init", - "params": [ - { - "name": "_selector", - "description": "选择器列表对象, 如果带 title/tipsData 属性则会初始化 Tips 效果", - "type": "Selector" - } - ], - "static": 1, + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 272, + "description": "Tracking of the most recent call to the spy.", "example": [ - "\n \n " + "\nvar mySpy = jasmine.createSpy('foo');\nmySpy(1, 2);\nmySpy.mostRecentCall.args = [1, 2];" ], - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 201, - "description": "隐藏 Tips", - "itemtype": "method", - "name": "hide", - "static": 1, - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 210, - "description": "页面加载完毕后, 是否自动初始化", - "itemtype": "property", - "name": "autoInit", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 218, - "description": "用户自定义模板\n
            如果用户显式覆盖此属性, Tips 会使用用户定义的模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "null", - "static": 1, - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 281, + "description": "Holds arguments for each call to the spy, indexed by call count", + "example": [ + "\nvar mySpy = jasmine.createSpy('foo');\nmySpy(1, 2);\nmySpy(7, 8);\nmySpy.mostRecentCall.args = [7, 8];\nmySpy.argsForCall[0] = [1, 2];\nmySpy.argsForCall[1] = [7, 8];" + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 227, - "description": "设置 Tips 超过边界的默认偏移像素\n

            \nbottom: 边界超过屏幕底部的偏移\n
            left: 边界低于屏幕左侧的偏移\n
            top: 边界低于屏幕顶部的偏移\n

            ", - "itemtype": "property", - "name": "offset", - "type": "{point object}", - "default": "{ 'bottom': { 'x': 15, 'y': 15 }, 'left': { 'x': -28, 'y': 5 }, 'top': { 'x': -2, 'y': -22 } };", - "static": 1, - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 295, + "description": "Tells a spy to call through to the actual implemenatation.", + "example": [ + "\nvar foo = {\n bar: function() { // do some stuff }\n}\n\n// defining a spy on an existing property: foo.bar\nspyOn(foo, 'bar').andCallThrough();" + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 244, - "description": "Tips 的最小宽度", - "itemtype": "property", - "name": "minWidth", - "type": "int", - "default": "200", - "static": 1, - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 311, + "description": "For setting the return value of a spy.", + "example": [ + "\n// defining a spy from scratch: foo() returns 'baz'\nvar foo = jasmine.createSpy('spy on foo').andReturn('baz');\n\n// defining a spy on an existing property: foo.bar() returns 'baz'\nspyOn(foo, 'bar').andReturn('baz');" + ], + "params": [ + { + "name": "value", + "description": "", + "type": "Object" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 252, - "description": "Tips 的最大宽度", - "itemtype": "property", - "name": "maxWidth", - "type": "int", - "default": "400", - "static": 1, - "class": "JC.Tips", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 330, + "description": "For throwing an exception when a spy is called.", + "example": [ + "\n// defining a spy from scratch: foo() throws an exception w/ message 'ouch'\nvar foo = jasmine.createSpy('spy on foo').andThrow('baz');\n\n// defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'\nspyOn(foo, 'bar').andThrow('baz');" + ], + "params": [ + { + "name": "exceptionMsg", + "description": "", + "type": "String" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 260, - "description": "把 tag 的 title 属性 转为 tipsData \n

            注意: 这个方法只有当 Tips.autoInit 为假时, 或者浏览器会 IE时才会生效\n
            Tips.autoInit 为真时, 非IE浏览器无需转换\n
            如果为IE浏览器, 无论 Tips.autoInit 为真假, 都会进行转换\n
            方法内部已经做了判断, 可以直接调用, 对IE会生效\n, 这个方法的存在是因为 IE 的 title为延时显示, 所以tips显示后, 默认title会盖在tips上面\n

            ", - "itemtype": "method", - "name": "titleToTipsdata", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 349, + "description": "Calls an alternate implementation when a spy is called.", + "example": [ + "\nvar baz = function() {\n // do some stuff, return something\n}\n// defining a spy from scratch: foo() calls the function baz\nvar foo = jasmine.createSpy('spy on foo').andCall(baz);\n\n// defining a spy on an existing property: foo.bar() calls an anonymnous function\nspyOn(foo, 'bar').andCall(function() { return 'baz';} );" + ], "params": [ { - "name": "_selector", - "description": "要转title 为 tipsData的选择器列表", - "type": "Selector" + "name": "fakeFunc", + "description": "", + "type": "Function" } ], - "class": "JC.Tips", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 280, - "description": "从 selector 获得 或 设置 Tips 的实例", - "itemtype": "method", - "name": "getInstance", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 369, + "description": "Resets all of a spy's the tracking variables so that it can be used again.", + "example": [ + "\nspyOn(foo, 'bar');\n\nfoo.bar();\n\nexpect(foo.bar.callCount).toEqual(1);\n\nfoo.bar.reset();\n\nexpect(foo.bar.callCount).toEqual(0);" + ], + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 415, + "description": "Determines whether an object is a spy.", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" - }, - { - "name": "_ins", + "name": "putativeSpy", "description": "", - "type": "TipsInstance" + "type": "jasmine.Spy|Object" } ], "return": { - "description": "TipsInstance" + "description": "", + "type": "Boolean" }, - "static": 1, - "class": "JC.Tips", - "namespace": "JC" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 302, - "description": "tips 默认模板", - "itemtype": "property", - "name": "tpl", - "type": "string", - "default": "
            ", - "class": "JC.Tips.Model", - "namespace": "JC.Tips" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 309, - "description": "保存 tips 的触发源选择器", - "itemtype": "property", - "name": "_selector", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 316, - "description": "tips 的显示内容\n
            标签的 title/tipsData 会保存在这个属性, 然后 title/tipsData 会被清除掉", - "itemtype": "property", - "name": "_data", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 425, + "description": "Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something\nlarge in one call.", + "params": [ + { + "name": "baseName", + "description": "name of spy class", + "type": "String" + }, + { + "name": "methodNames", + "description": "array of names of methods to make spies", + "type": "Array" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 328, - "description": "初始化 tips 模型类", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "static": 1, - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 443, + "description": "All parameters are pretty-printed and concatenated together, then written to the current spec's output.\n\nBe careful not to leave calls to jasmine.log in production code.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 340, - "description": "获取/更新 tips 显示内容", - "itemtype": "method", - "name": "data", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 453, + "description": "Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.", + "example": [ + "\n// spy example\nvar foo = {\n not: function(bool) { return !bool; }\n}\nspyOn(foo, 'not'); // actual foo.not will not be called, execution stops" + ], + "see": [ + "jasmine.createSpy" + ], "params": [ { - "name": "_update", - "description": "是否更新 tips 数据", - "type": "Bool" + "name": "obj", + "description": "" + }, + { + "name": "methodName", + "description": "" } ], "return": { - "description": "string" + "description": "a Jasmine spy that can be chained with all spy methods" }, - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 351, - "description": "更新 tips 数据", - "itemtype": "method", - "name": "update", - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 473, + "description": "Creates a Jasmine spec that will be added to the current suite.\n\n// TODO: pending tests", + "example": [ + "\nit('should be true', function() {\n expect(true).toEqual(true);\n});" + ], + "params": [ + { + "name": "desc", + "description": "description of this specification", + "type": "String" + }, + { + "name": "func", + "description": "defines the preconditions and expectations of the spec", + "type": "Function" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 364, - "description": "判断 selector 是否初始化过 Tips 功能", - "itemtype": "method", - "name": "isInited", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 491, + "description": "Creates a disabled Jasmine spec.\n\nA convenience method that allows existing specs to be disabled temporarily during development.", "params": [ { - "name": "_setter", - "description": "", - "type": "Bool" + "name": "desc", + "description": "description of this specification", + "type": "String" + }, + { + "name": "func", + "description": "defines the preconditions and expectations of the spec", + "type": "Function" } ], - "return": { - "description": "bool" - }, - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 375, - "description": "获取 tips 触发源选择器", - "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" - }, - "class": "JC.Tips.Model", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 504, + "description": "Starts a chain for a Jasmine expectation.\n\nIt is passed an Object that is the actual value and should chain to one of the many\njasmine.Matchers functions.", + "params": [ + { + "name": "actual", + "description": "Actual value to test against and expected value", + "type": "Object" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 451, - "description": "保存 Tips 数据模型类的实例引用", - "itemtype": "property", - "name": "_model", - "type": "JC.Tips.Model", - "access": "private", - "tagname": "", - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 517, + "description": "Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.", + "params": [ + { + "name": "func", + "description": "Function that defines part of a jasmine spec.", + "type": "Function" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 458, - "description": "保存 Tips 的显示外观选择器", - "itemtype": "property", - "name": "_layout", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 527, + "description": "Waits a fixed time period before moving to the next block.", + "deprecated": true, + "deprecationMessage": "Use waitsFor() instead", + "params": [ + { + "name": "timeout", + "description": "milliseconds to wait", + "type": "Number" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 468, - "description": "初始化 Tips 视图类", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 538, + "description": "Waits for the latchFunction to return true before proceeding to the next block.", + "params": [ + { + "name": "latchFunction", + "description": "", + "type": "Function" + }, + { + "name": "optional_timeoutMessage", + "description": "", + "type": "String" + }, + { + "name": "optional_timeout", + "description": "", + "type": "Number" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 480, - "description": "显示 Tips", - "itemtype": "method", - "name": "show", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 550, + "description": "A function that is called before each spec in a suite.\n\nUsed for spec setup, including validating assumptions.", "params": [ { - "name": "_evt", - "description": "_evt 可以是事件/或者带 pageX && pageY 属性的 Object\n
            pageX 和 pageY 是显示位于整个文档的绝对 x/y 轴位置", - "type": "Event|object" + "name": "beforeEachFunction", + "description": "", + "type": "Function" } ], - "class": "JC.Tips.View", - "namespace": "JC.Tips" - }, - { - "file": "../comps/Tips/Tips.js", - "line": 517, - "description": "隐藏 Tips", - "itemtype": "method", - "name": "hide", - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 525, - "description": "获取 Tips 外观的 选择器", - "itemtype": "method", - "name": "layout", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 562, + "description": "A function that is called after each spec in a suite.\n\nUsed for restoring any state that is hijacked during spec execution.", "params": [ { - "name": "_update", - "description": "是否更新 Tips 数据", - "type": "Bool" + "name": "afterEachFunction", + "description": "", + "type": "Function" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 555, - "description": "鼠标移动到 Tips 触发源的触发事件", - "itemtype": "method", - "name": "tipMouseenter", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 574, + "description": "Defines a suite of specifications.\n\nStores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared\nare accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization\nof setup in some tests.", + "example": [ + "\n// TODO: a simple suite\n\n// TODO: a simple suite with a nested describe block" + ], "params": [ { - "name": "_evt", - "description": "", - "type": "Event" + "name": "description", + "description": "A string, usually the class under test.", + "type": "String" + }, + { + "name": "specDefinitions", + "description": "function that defines several specs.", + "type": "Function" } ], - "access": "private", - "tagname": "", - "static": 1, - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 587, - "description": "Tips 的默认模板", - "itemtype": "property", - "name": "_defTpl", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 594, + "description": "Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.", + "params": [ + { + "name": "description", + "description": "A string, usually the class under test.", + "type": "String" + }, + { + "name": "specDefinitions", + "description": "function that defines several specs.", + "type": "Function" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tips/Tips.js", - "line": 595, - "description": "页面加载完毕后, 是否自动初始化 Tips", - "class": "JC.Tips.View", - "namespace": "JC.Tips" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 633, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 50, - "description": "树的数据模型引用", - "itemtype": "property", - "name": "_model", - "type": "JC.Tree.Model", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 638, + "description": "Declare that a child class inherit it's prototype from the parent class.", "access": "private", "tagname": "", - "class": "JC.Tree", - "namespace": "JC" + "params": [ + { + "name": "childClass", + "description": "", + "type": "Function" + }, + { + "name": "parentClass", + "description": "", + "type": "Function" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 57, - "description": "树的视图模型引用", - "itemtype": "property", - "name": "_view", - "type": "JC.Tree.View", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 646, "access": "private", "tagname": "", - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 65, - "description": "从选择器获取 树的 实例, 如果实例有限, 加以判断可避免重复初始化", - "itemtype": "method", - "name": "getInstance", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "static": 1, + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 700, + "description": "Environment for Jasmine", + "is_constructor": 1, + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 738, "return": { - "description": "", - "type": "JC.Tree Instance|undefined" + "description": "an object containing jasmine version build info, if set." }, - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 77, - "description": "树的数据过滤函数\n
            如果树的初始数据格式不符合要求, 可通过该属性定义函数进行数据修正", - "itemtype": "property", - "name": "dataFilter", - "type": "function", - "default": "undefined", - "static": 1, - "example": [ - "\n JC.Tree.dataFilter =\n function( _data ){\n var _r = {};\n\n if( _data ){\n if( _data.root.length > 2 ){\n _data.root.shift();\n _r.root = _data.root;\n }\n _r.data = {};\n for( var k in _data.data ){\n _r.data[ k ] = [];\n for( var i = 0, j = _data.data[k].length; i < j; i++ ){\n if( _data.data[k][i].length < 3 ) continue;\n _data.data[k][i].shift();\n _r.data[k].push( _data.data[k][i] );\n }\n }\n }\n return _r;\n };" - ], - "class": "JC.Tree", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 749, + "return": { + "description": "string containing jasmine version build info, if set." + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 110, - "description": "初始化树\n
            实例化树后, 需要显式调用该方法初始化树的可视状态", - "itemtype": "method", - "name": "init", - "example": [ - "\n var _tree = new JC.Tree( $('#tree_box'), treeData );\n _tree.init();" - ], - "class": "JC.Tree", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 766, + "return": { + "description": "a sequential integer starting at 0" + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 124, - "description": "展开树到某个具体节点, 或者展开树的所有节点", - "itemtype": "method", - "name": "open", - "params": [ - { - "name": "_nodeId", - "description": "如果_nodeId='undefined', 将会展开树的所有节点\n
            _nodeId 不为空, 将展开树到 _nodeId 所在的节点", - "type": "String|int" - } - ], - "class": "JC.Tree", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 773, + "return": { + "description": "a sequential integer starting at 0" + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 139, - "description": "关闭某个节点, 或者关闭整个树", - "itemtype": "method", - "name": "close", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 780, + "description": "Register a reporter to receive status updates from Jasmine.", "params": [ { - "name": "_nodeId", - "description": "如果_nodeId='undefined', 将会关闭树的所有节点\n
            _nodeId 不为空, 将关闭树 _nodeId 所在的节点", - "type": "String|int" + "name": "reporter", + "description": "An object which will receive status updates.", + "type": "jasmine.Reporter" } ], - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 154, - "description": "获取树的 ID 前缀\n
            每个树都会有自己的随机ID前缀", - "itemtype": "method", - "name": "idPrefix", - "return": { - "description": "树的ID前缀", - "type": "String" - }, - "class": "JC.Tree", - "namespace": "JC" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 977, + "is_constructor": 1, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 161, - "description": "获取树的节点 label", - "itemtype": "method", - "name": "getItem", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1008, + "description": "Blocks are functions with executable code that make up a spec.", + "is_constructor": 1, "params": [ { - "name": "_nodeId", + "name": "env", "description": "", - "type": "String|int" + "type": "jasmine.Env" + }, + { + "name": "func", + "description": "", + "type": "Function" + }, + { + "name": "spec", + "description": "", + "type": "jasmine.Spec" } ], - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 172, - "description": "绑定树内部事件\n
            注意: 所有事件名最终会被转换成小写", - "itemtype": "method", - "name": "on", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1030, + "is_constructor": 1, + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1132, + "is_constructor": 1, "params": [ { - "name": "_evtName", + "name": "env", "description": "", - "type": "String" + "type": "jasmine.Env" }, { - "name": "_cb", + "name": "actual", + "description": "" + }, + { + "name": "spec", "description": "", - "type": "Function" + "type": "jasmine.Spec" } ], - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 185, - "description": "获取树的某类事件类型的所有回调", - "itemtype": "method", - "name": "event", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1209, + "description": "toBe: compares the actual to the expected using ===", "params": [ { - "name": "_evtName", - "description": "", - "type": "String" + "name": "expected", + "description": "" } ], - "return": { - "description": "", - "type": "Array" - }, - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 192, - "description": "获取或设置树的高亮节点\n
            注意: 这个只是数据层面的设置, 不会影响视觉效果", - "itemtype": "method", - "name": "highlight", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1217, + "description": "toNotBe: compares the actual to the expected using !==", "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "expected", + "description": "" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tree", - "namespace": "JC" + "deprecated": true, + "deprecationMessage": "as of 1.0. Use not.toBe() instead.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 204, - "description": "树节点的点击事件", - "itemtype": "event", - "name": "click", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1226, + "description": "toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.", "params": [ { - "name": "_evt", - "description": "", - "type": "Event" + "name": "expected", + "description": "" } ], - "example": [ - "\n _tree.on('click', function( _evt ){\n var _p = $(this);\n JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') );\n });" - ], - "class": "JC.Tree", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 215, - "description": "树节点的展现事件", - "itemtype": "event", - "name": "RenderLabel", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1235, + "description": "toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual", "params": [ { - "name": "_data", - "description": "", - "type": "Array" - }, - { - "name": "_item", - "description": "", - "type": "Selector" + "name": "expected", + "description": "" } ], - "example": [ - "\n _tree.on('RenderLabel', function( _data ){\n var _node = $(this);\n _node.html( printf( '{1}', _data[0], _data[1] ) );\n });" - ], - "class": "JC.Tree", - "namespace": "JC" + "deprecated": true, + "deprecationMessage": "as of 1.0. Use not.toEqual() instead.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 227, - "description": "树文件夹的点击事件", - "itemtype": "event", - "name": "FolderClick", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1244, + "description": "Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes\na pattern or a String.", "params": [ { - "name": "_evt", - "description": "", - "type": "Event" + "name": "expected", + "description": "" } ], - "example": [ - "\n _tree.on('FolderClick', function( _evt ){\n var _p = $(this);\n alert( 'folder click' );\n });" - ], - "class": "JC.Tree", - "namespace": "JC" - }, - { - "file": "../comps/Tree/Tree.js", - "line": 245, - "description": "树要展示的容器", - "itemtype": "property", - "name": "_container", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 252, - "description": "展现树需要的数据", - "itemtype": "property", - "name": "_data", - "type": "object", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1254, + "description": "Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch", + "params": [ + { + "name": "expected", + "description": "" + } + ], + "deprecated": true, + "deprecationMessage": "as of 1.0. Use not.toMatch() instead.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 259, - "description": "树的随机ID前缀", - "itemtype": "property", - "name": "_id", - "type": "string", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1263, + "description": "Matcher that compares the actual to jasmine.undefined.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 266, - "description": "树当前的高亮节点", - "itemtype": "property", - "name": "_highlight", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1270, + "description": "Matcher that compares the actual to jasmine.undefined.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 273, - "description": "保存树的所有绑定事件", - "itemtype": "property", - "name": "_events", - "type": "object", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1277, + "description": "Matcher that compares the actual to null.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 285, - "description": "树模型类内部初始化方法", - "itemtype": "method", - "name": "_init", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1284, + "description": "Matcher that boolean not-nots the actual.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 295, - "description": "获取树所要展示的容器", - "itemtype": "method", - "name": "container", - "return": { - "description": "selector" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1292, + "description": "Matcher that boolean nots the actual.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 301, - "description": "获取节点将要显示的ID", - "itemtype": "method", - "name": "id", - "params": [ - { - "name": "_id", - "description": "节点的原始ID", - "type": "String" - } - ], - "return": { - "description": "string 节点的最终ID" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1300, + "description": "Matcher that checks to see if the actual, a Jasmine spy, was called.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 308, - "description": "获取树的随机ID前缀", - "itemtype": "method", - "name": "idPrefix", - "return": { - "description": "string" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1322, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 314, - "description": "获取树的原始数据", - "itemtype": "method", - "name": "data", - "return": { - "description": "object" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1325, + "description": "Matcher that checks to see if the actual, a Jasmine spy, was not called.", + "deprecated": true, + "deprecationMessage": "Use expect(xxx).not.toHaveBeenCalled() instead", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 320, - "description": "获取树生成后的根节点", - "itemtype": "method", - "name": "root", - "return": { - "description": "selector" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1349, + "description": "Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.", + "example": [ + "\n" + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 326, - "description": "获取ID的具体节点", - "itemtype": "method", - "name": "child", - "params": [ - { - "name": "_id", - "description": "", - "type": "String" - } - ], - "return": { - "description": "selector" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1378, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 333, - "description": "判断原始数据的某个ID是否有子级节点", - "itemtype": "method", - "name": "hasChild", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1381, + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1398, + "description": "Matcher that checks that the expected item is an element in the actual Array.", "params": [ { - "name": "_id", + "name": "expected", "description": "", - "type": "String" + "type": "Object" } ], - "return": { - "description": "bool" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 340, - "description": "获取树的某类绑定事件的所有回调", - "itemtype": "method", - "name": "event", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1407, + "description": "Matcher that checks that the expected item is NOT an element in the actual Array.", "params": [ { - "name": "_evtName", + "name": "expected", "description": "", - "type": "String" + "type": "Object" } ], - "return": { - "description": "", - "type": "Array|undefined" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "deprecated": true, + "deprecationMessage": "as of 1.0. Use not.toContain() instead.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 351, - "description": "添加树内部事件", - "itemtype": "method", - "name": "addEvent", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1425, + "description": "Matcher that checks that the expected item is equal to the actual item\nup to a given level of decimal precision (default 2).", "params": [ { - "name": "_evtName", + "name": "expected", "description": "", - "type": "String" + "type": "Number" }, { - "name": "_cb", + "name": "precision", "description": "", - "type": "Function" + "type": "Number" } ], - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 363, - "description": "获取或设置树的高亮节点\n
            注意: 这个只是数据层面的设置, 不会影响视觉效果", - "itemtype": "method", - "name": "highlight", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1442, + "description": "Matcher that checks that the expected exception was thrown by the actual.", "params": [ { - "name": "_item", + "name": "expected", "description": "", - "type": "Selector" + "type": "String" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 376, - "description": "树的视图模型类", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1619, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 380, - "description": "树的数据模型引用", - "itemtype": "property", - "name": "_model", - "type": "JC.Tree.Model", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1715, + "is_constructor": 1, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 387, - "description": "树生成后的根节点", - "itemtype": "property", - "name": "_treeRoot", - "type": "selector", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1750, + "description": "Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults", + "is_constructor": 1, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 397, - "description": "初始化树的可视状态", - "itemtype": "method", - "name": "init", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1756, + "description": "The total count of results", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 407, - "description": "获取或设置树生成后的根节点", - "itemtype": "method", - "name": "treeRoot", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1760, + "description": "Number of passed results", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1764, + "description": "Number of failed results", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1768, + "description": "Was this suite/spec skipped?", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1772, + "ignore": "", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1778, + "description": "Roll up the result counts.", "params": [ { - "name": "_setter", - "description": "", - "type": "String" + "name": "result", + "description": "" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 418, - "description": "处理树的展现效果", - "itemtype": "method", - "name": "_process", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1789, + "description": "Adds a log message.", "params": [ { - "name": "_data", - "description": "节点数据", - "type": "Array" - }, + "name": "values", + "description": "Array of message parts which will be concatenated later." + } + ], + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1797, + "description": "Getter for the results: message & results.", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1804, + "description": "Adds a result, tracking counts (total, passed, & failed)", + "params": [ { - "name": "_parentNode", + "name": "result", "description": "", - "type": "Selector" + "type": "jasmine.ExpectationResult|jasmine.NestedResults" } ], - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1824, + "return": { + "description": "True if everything below passed", + "type": "Boolean" + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 439, - "description": "初始化树根节点", - "itemtype": "method", - "name": "_initRoot", - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1830, + "description": "Base class for pretty printing for expectation results.", + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 469, - "description": "初始化树的文件夹节点", - "itemtype": "method", - "name": "_initFolder", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 1837, + "description": "Formats a value in a nice, human-readable string.", "params": [ { - "name": "_parentNode", - "description": "", - "type": "Selector" - }, - { - "name": "_data", - "description": "", - "type": "Object" - }, + "name": "value", + "description": "" + } + ], + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2052, + "description": "Runner", + "is_constructor": 1, + "params": [ { - "name": "_isLast", + "name": "env", "description": "", - "type": "Bool" + "type": "jasmine.Env" } ], - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 494, - "description": "初始化树的文件节点", - "itemtype": "method", - "name": "_initFile", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2129, + "description": "Internal representation of a Jasmine specification, or test.", + "is_constructor": 1, "params": [ { - "name": "_parentNode", + "name": "env", "description": "", - "type": "Selector" + "type": "jasmine.Env" }, { - "name": "_data", + "name": "suite", "description": "", - "type": "Object" + "type": "jasmine.Suite" }, { - "name": "_isLast", + "name": "description", "description": "", - "type": "Bool" + "type": "String" } ], - "access": "private", - "tagname": "", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 515, - "description": "初始化树的节点标签", - "itemtype": "method", - "name": "_initLabel", - "access": "private", - "tagname": "", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2168, + "description": "All parameters are pretty-printed and concatenated together, then written to the spec's output.\n\nBe careful not to leave calls to jasmine.log in production code.", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2191, "params": [ { - "name": "_data", + "name": "result", "description": "", - "type": "Object" + "type": "jasmine.ExpectationResult" } ], - "return": { - "description": "selector" - }, - "class": "JC.Tree.Model", - "namespace": "JC.Tree" - }, - { - "file": "../comps/Tree/Tree.js", - "line": 539, - "description": "展开树的所有节点", - "itemtype": "method", - "name": "openAll", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 550, - "description": "关闭树的所有节点", - "itemtype": "method", - "name": "closeAll", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2204, + "description": "Waits a fixed time period before moving to the next block.", + "deprecated": true, + "deprecationMessage": "Use waitsFor() instead", + "params": [ + { + "name": "timeout", + "description": "milliseconds to wait", + "type": "Number" + } + ], + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 562, - "description": "展开树到具体节点", - "itemtype": "method", - "name": "open", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2216, + "description": "Waits for the latchFunction to return true before proceeding to the next block.", "params": [ { - "name": "_nodeId", + "name": "latchFunction", + "description": "", + "type": "Function" + }, + { + "name": "optional_timeoutMessage", "description": "", "type": "String" + }, + { + "name": "optional_timeout", + "description": "", + "type": "Number" } ], - "class": "JC.Tree.Model", - "namespace": "JC.Tree" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Tree/Tree.js", - "line": 587, - "description": "关闭树的具体节点", - "itemtype": "method", - "name": "close", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2372, + "description": "Internal representation of a Jasmine suite.", + "is_constructor": 1, "params": [ { - "name": "_nodeId", + "name": "env", + "description": "", + "type": "jasmine.Env" + }, + { + "name": "description", "description": "", "type": "String" + }, + { + "name": "specDefinitions", + "description": "", + "type": "Function" + }, + { + "name": "parentSuite", + "description": "", + "type": "jasmine.Suite" } ], - "class": "JC.Tree.Model", - "namespace": "JC.Tree" - }, - { - "file": "../comps/Tree/Tree.js", - "line": 606, - "description": "树的最后的 hover 节点\n
            树的 hover 是全局属性, 页面上的所有树只会有一个当前 hover", - "itemtype": "property", - "name": "lastHover", - "type": "selector", - "default": "null", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" - }, - { - "file": "../comps/Tree/Tree.js", - "line": 622, - "description": "捕获树文件标签的点击事件", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" - }, - { - "file": "../comps/Tree/Tree.js", - "line": 650, - "description": "捕获树文件夹图标的点击事件", - "class": "JC.Tree.Model", - "namespace": "JC.Tree" - }, - { - "file": "../comps/Valid/Valid.js", - "line": 280, - "description": "兼容函数式使用", - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 329, - "description": "使用 jquery on 绑定事件", - "itemtype": "method", - "name": "on", - "type": "String", + "file": "../plugins/rate/spec/lib/jasmine.js", + "line": 2469, + "description": "A block which waits for some condition to become true, with timeout.", + "is_constructor": 1, + "extends": "jasmine.Block", "params": [ { - "name": "_evtName", - "description": "", - "type": "String" + "name": "env", + "description": "The Jasmine environment.", + "type": "jasmine.Env" }, { - "name": "_cb", - "description": "", + "name": "timeout", + "description": "The maximum time in milliseconds to wait for the condition to become true.", + "type": "Number" + }, + { + "name": "latchFunction", + "description": "A function which returns true when the desired condition has been met.", "type": "Function" + }, + { + "name": "message", + "description": "The message to display if the desired condition hasn't been met within the given time period.", + "type": "String" + }, + { + "name": "spec", + "description": "The Jasmine spec.", + "type": "jasmine.Spec" } ], - "return": { - "description": "ValidInstance" - }, - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 338, - "description": "使用 jquery trigger 绑定事件", - "itemtype": "method", - "name": "trigger", - "type": "String", + "file": "../plugins/SWFUpload.js", + "line": 1, + "description": "SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com\n\nmmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/\n\nSWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:\nhttp://www.opensource.org/licenses/mit-license.php\n\nSWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:\nhttp://www.opensource.org/licenses/mit-license.php\n\nSWFObject v2.2 \n\tis released under the MIT License ", + "class": "window.jQuery.mousewheel" + }, + { + "file": "../plugins/aes.js", + "line": 8, + "description": "AES Cipher function: encrypt 'input' state with Rijndael algorithm\n applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage", "params": [ { - "name": "_evtName", - "description": "", - "type": "String" + "name": "input", + "description": "16-byte (128-bit) input state array", + "type": "Number[]" + }, + { + "name": "w", + "description": "Key schedule as 2D byte-array (Nr+1 x Nb bytes)", + "type": "Number[][]" } ], "return": { - "description": "ValidInstance" + "description": "Encrypted output state array", + "type": "Number[]" }, - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 346, - "description": "分析_item是否附合规则要求", - "itemtype": "method", - "name": "parse", + "file": "../plugins/aes.js", + "line": 41, + "description": "Perform Key Expansion to generate a Key Schedule", "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "key", + "description": "Key as 16/24/32-byte array", + "type": "Number[]" } ], - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Expanded key schedule as 2D byte-array (Nr+1 x Nb bytes)", + "type": "Number[][]" + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 451, - "description": "验证一个表单项, 如 文本框, 下拉框, 复选框, 单选框, 文本域, 隐藏域", - "itemtype": "method", - "name": "check", - "static": 1, + "file": "../plugins/aes.js", + "line": 171, + "description": "Encrypt a text using AES encryption in Counter mode of operation\n\nUnicode multi-byte character safe", "params": [ { - "name": "_item", - "description": "需要验证规则正确与否的表单/表单项( 可同时传递多个_item )", - "type": "Selector" + "name": "plaintext", + "description": "Source text to be encrypted", + "type": "String" + }, + { + "name": "password", + "description": "The password to use to generate a key", + "type": "String" + }, + { + "name": "nBits", + "description": "Number of bits to be used in the key (128, 192, or 256)", + "type": "Number" } ], - "example": [ - " \n JC.Valid.check( $( selector ) );\n JC.Valid.check( $( selector ), $( anotherSelector );\n JC.Valid.check( document.getElementById( item ) );\n\n if( !JC.Valid.check( $('form') ) ){\n _evt.preventDefault();\n return false;\n }" - ], "return": { - "description": "", - "type": "Boolean" + "description": "Encrypted text", + "type": "String" }, - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 469, - "description": "这个方法是 Valid.check 的别名", - "itemtype": "method", - "name": "checkAll", - "static": 1, + "file": "../plugins/aes.js", + "line": 248, + "description": "Decrypt a text encrypted by AES in counter mode of operation", "params": [ { - "name": "_item", - "description": "- 需要验证规则正确与否的表单/表单项", - "type": "Selector" + "name": "ciphertext", + "description": "Source text to be encrypted", + "type": "String" + }, + { + "name": "password", + "description": "The password to use to generate a key", + "type": "String" + }, + { + "name": "nBits", + "description": "Number of bits to be used in the key (128, 192, or 256)", + "type": "Number" } ], - "see": [ - "Valid.check" - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Decrypted text", + "type": "String" + }, + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 476, - "description": "获取 Valid 的实例 ( Valid 是单例模式 )", - "itemtype": "method", - "name": "getInstance", + "file": "../plugins/aes.js", + "line": 323, + "description": "Encode string into Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]\n(instance method extending String object). As per RFC 4648, no newlines are added.", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "str", + "description": "The string to be encoded as base-64", + "type": "String" + }, + { + "name": "utf8encode", + "description": "Flag to indicate whether str is Unicode string to be encoded \n to UTF8 before conversion to base64; otherwise string is assumed to be 8-bit characters", + "type": "Boolean", + "optional": true, + "optdefault": "false" } ], - "static": 1, "return": { - "description": "", - "type": "Valid instance" + "description": "Base64-encoded string", + "type": "String" }, - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 484, - "description": "判断/设置 selector 的数据是否合法\n
            通过 datavalid 属性判断", - "itemtype": "method", - "name": "dataValid", + "file": "../plugins/aes.js", + "line": 366, + "description": "Decode string from Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]\n(instance method extending String object). As per RFC 4648, newlines are not catered for.", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" - }, - { - "name": "_settter", - "description": "", - "type": "Bool" - }, - { - "name": "_noStatus", - "description": "", - "type": "Bool" + "name": "str", + "description": "The string to be decoded from base-64", + "type": "String" }, { - "name": "_customMsg", - "description": "", - "type": "String" + "name": "utf8decode", + "description": "Flag to indicate whether str is Unicode string to be decoded \n from UTF8 after conversion from base64", + "type": "Boolean", + "optional": true, + "optdefault": "false" } ], - "static": 1, "return": { - "description": "bool" + "description": "decoded string", + "type": "String" }, - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 520, - "description": "判断 selector 是否 Valid 的处理对象", - "itemtype": "method", - "name": "isValid", + "file": "../plugins/aes.js", + "line": 413, + "description": "Encode multi-byte Unicode string into utf-8 multiple single-byte characters \n(BMP / basic multilingual plane only)\n\nChars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars", "params": [ { - "name": "_selector", - "description": "", - "type": "Selector" + "name": "strUni", + "description": "Unicode string to be encoded as UTF-8", + "type": "String" } ], "return": { - "description": "bool" + "description": "encoded string", + "type": "String" }, - "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": "window.jQuery.mousewheel" }, { - "file": "../comps/Valid/Valid.js", - "line": 528, - "description": "把一个表单项的状态设为正确状态", - "itemtype": "method", - "name": "setValid", + "file": "../plugins/aes.js", + "line": 440, + "description": "Decode utf-8 encoded string back into multi-byte Unicode characters", "params": [ { - "name": "_item", - "description": "", - "type": "Selector" - }, - { - "name": "_tm", - "description": "延时 _tm 毫秒显示处理结果, 默认=150", - "type": "Int" + "name": "strUtf", + "description": "UTF-8 string to be decoded back to Unicode", + "type": "String" } ], + "return": { + "description": "decoded string", + "type": "String" + }, + "class": "window.jQuery.mousewheel" + }, + { + "file": "../JC.js", + "line": 46, + "description": "JC组件库所在路径", + "itemtype": "property", + "name": "PATH", "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "type": "{string}", + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 536, - "description": "把一个表单项的状态设为错误状态", + "file": "../JC.js", + "line": 56, + "description": "是否显示调试信息", + "itemtype": "property", + "name": "debug", + "static": 1, + "type": "{bool}", + "class": ".JC" + }, + { + "file": "../JC.js", + "line": 63, + "description": "导入JC组件", "itemtype": "method", - "name": "setError", + "name": "use", + "static": 1, "params": [ { - "name": "_item", - "description": "", - "type": "Selector" - }, - { - "name": "_msgAttr", - "description": "- 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名\n
            如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateErrorMsg", + "name": "_items", + "description": "- 模块名\n 或者模块下面的某个js文件(test/test1.js, 路径前面不带\"/\"将视为test模块下的test1.js)\n 或者一个绝对路径的js文件, 路径前面带 \"/\"", "type": "String" }, { - "name": "_fullMsg", - "description": "- 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写", - "type": "Bool" + "name": "_readyCb", + "description": "", + "type": "Callback" } ], - "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "example": [ + "\n JC.use( 'SomeClass' ); //导入类 SomeClass\n JC.use( 'SomeClass, AnotherClass' ); //导入类 SomeClass, AnotherClass\n //\n /// 导入类 SomeClass, SomeClass目录下的file1.js, \n /// AnotherClass, AnotherClass 下的file2.js\n //\n JC.use( 'SomeClass, comps/SomeClass/file1.js, comps/AnotherClass/file2.js' ); \n JC.use( 'SomeClass, plugins/swfobject.js., plugins/json2.js' ); \n JC.use( '/js/Test/Test1.js' ); //导入文件 /js/Test/Test1.js, 如果起始处为 \"/\", 将视为文件的绝对路径\n //\n /// 导入 URL 资源 // JC.use( 'http://test.com/file1.js', 'https://another.com/file2.js' ); \n //\n /// in libpath/_demo/\n //\n JC.use(\n [\n 'Panel' // ../comps/Panel/Panel.js\n , 'Tips' // ../comps/Tips/Tips.js\n , 'Valid' // ../comps/Valid/Valid.js\n , 'Bizs.KillISPCache' // ../bizs/KillISPCache/KillISPCache.js\n , 'bizs.TestBizFile' // ../bizs/TestBizFile.js\n , 'comps.TestCompFile' // ../comps/TestCompFile.js \n , 'Plugins.rate' // ../plugins/rate/rate.js\n , 'plugins.json2' // ../plugins/json2.js\n , '/js/fullpathtest.js' // /js/fullpathtest.js\n ].join()\n );" + ], + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 554, - "description": "显示 focusmsg 属性的提示信息( 如果有的话 )", + "file": "../JC.js", + "line": 176, + "description": "调用依赖的类\n
            这个方法的存在是因为有一些类调整了结构, 但是原有的引用因为向后兼容的需要, 暂时不能去掉", "itemtype": "method", - "name": "setFocusMsg", + "name": "_usePatch", "params": [ { - "name": "_item", + "name": "_items", "description": "", - "type": "Selector" + "type": "Array" }, { - "name": "_setHide", + "name": "_fromClass", "description": "", - "type": "Bool" + "type": "String" }, { - "name": "_msgAttr", - "description": "- 显示指定需要读取的focusmsg信息属性名, 默认为 focusmsg, 通过该属性可以指定别的属性名\n
            如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateFocusMsg", + "name": "_patchClass", + "description": "", "type": "String" } ], + "access": "private", + "tagname": "", "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 576, - "description": "focus 时,是否总是显示 focusmsg 提示信息", - "itemtype": "property", - "name": "focusmsgEverytime", - "type": "bool", - "default": "true", + "file": "../JC.js", + "line": 198, + "description": "输出调试信息, 可通过 JC.debug 指定是否显示调试信息", + "params": [ + { + "name": "任意参数任意长度的字符串内容", + "description": "", + "type": "[string[,string]]" + } + ], + "itemtype": "method", + "name": "log", "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 584, - "description": "设置 em 的 css display 属性", + "file": "../JC.js", + "line": 206, + "description": "定义输出路径的 v 参数, 以便控制缓存", "itemtype": "property", - "name": "emDisplayType", + "name": "pathPostfix", "type": "string", - "default": "inline", + "default": "empty", "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 593, - "description": "验证正确时, 是否显示正确的样式", + "file": "../JC.js", + "line": 214, + "description": "是否启用nginx concat 模块的路径格式", "itemtype": "property", - "name": "showValidStatus", + "name": "enableNginxStyle", "type": "bool", "default": "false", "static": 1, - "class": "JC.Valid", - "namespace": "JC" - }, - { - "file": "../comps/Valid/Valid.js", - "line": 601, - "description": "清除Valid生成的错误样式", - "itemtype": "method", - "name": "clearError", - "static": 1, - "params": [ - { - "name": "_selector", - "description": "- 需要清除错误的选择器", - "type": "Form|input|textarea|select|file|password" - } - ], - "example": [ - "\n JC.Valid.clearError( 'form' );\n JC.Valid.clearError( 'input.some' );" - ], - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 612, - "description": "验证发生错误时, 是否终止继续验证\n
            为真终止继续验证, 为假将验证表单的所有项, 默认为 false", + "file": "../JC.js", + "line": 222, + "description": "定义 nginx 合并文件时, URL 的最大长度", "itemtype": "property", - "name": "errorAbort", - "type": "bool", - "default": "false", + "name": "nginxUrlLen", + "type": "int", + "default": "200", "static": 1, - "example": [ - "\n $(document).ready( function($evt){\n JC.Valid.errorAbort = true;\n });" - ], - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 625, - "description": "是否自动清除两边的空格", + "file": "../JC.js", + "line": 230, + "description": "定义 nginx style 的基础路径\n
            注意: 如果这个属性为空, 即使 enableNginxStyle = true, 也是直接输出默认路径", "itemtype": "property", - "name": "autoTrim", - "type": "bool", - "default": "true", + "name": "nginxBasePath", + "type": "string", + "default": "empty", "static": 1, - "example": [ - "\n $(document).ready( function($evt){\n JC.Valid.autoTrim = false;\n });" - ], - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 637, - "description": "对一个 control 作检查后的回调, 无论正确与否都会触发", + "file": "../JC.js", + "line": 239, + "description": "资源路径映射对象\n
            设置 JC.use 逗号(',') 分隔项的 对应URL路径", "itemtype": "property", - "name": "itemCallback", - "type": "function", - "default": "undefined", + "name": "FILE_MAP", + "type": "object", + "default": "null", "static": 1, "example": [ - "\n $(document).ready( function($evt){\n JC.Valid.itemCallback =\n function( _item, _isValid ){\n JC.log( 'JC.Valid.itemCallback _isValid:', _isValid );\n };\n });" + "\n 以下例子假定 libpath = http://git.me.btbtd.org/ignore/JQueryComps_dev/\n \n\n output should be:\n http://git.me.btbtd.org/ignore/JQueryComps_dev/lib.js\n http://jc.openjavascript.org/comps/Panel/Panel.js\n http://jc.openjavascript.org/comps/Tips/Tips.js\n http://jc.openjavascript.org/comps/Valid/Valid.js\n http://jc.openjavascript.org/plugins/jquery.form.js" ], - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 652, - "description": "判断 表单控件是否为忽略检查 或者 设置 表单控件是否为忽略检查", + "file": "../JC.js", + "line": 334, + "description": "输出的脚本路径格式", "itemtype": "method", - "name": "ignore", + "name": "_writeNormalScript", "params": [ { - "name": "_item", + "name": "_paths", "description": "", - "type": "Selector" - }, - { - "name": "_delIgnore", - "description": "是否删除忽略属性, 如果为 undefined 将不执行 添加删除操作", - "type": "Bool" + "type": "Array" } ], - "return": { - "description": "bool" - }, + "access": "private", + "tagname": "", "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 684, - "description": "定义 form control", + "file": "../JC.js", + "line": 351, + "description": "保存 use 过的资源路径, 以便进行唯一性判断, 避免重复加载", "itemtype": "property", - "name": "_formControls", - "return": { - "description": "bool" - }, + "name": "_USE_CACHE", + "type": "object", + "default": "{}", "access": "private", "tagname": "", "static": 1, - "class": "JC.Valid", - "namespace": "JC", - "subprops": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ] + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 693, - "description": "判断 _selector 是否为 form control", - "itemtype": "method", - "name": "isFormControl", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "bool" - }, - "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "file": "../JC.js", + "line": 362, + "description": "UXC 是 JC 的别名\n
            存在这个变量是为了向后兼容\n
            20130804 之前的命名空间是 UXC, 这个命名空间在一段时间后将会清除, 请使用 JC 命名空间\n

            see: JC

            ", + "date": "2013-05-22", + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 731, - "description": "获取 _item 的检查类型", - "itemtype": "method", - "name": "parseDatatype", - "access": "private", - "tagname": "", - "static": 1, - "params": [ - { - "name": "_item", - "description": "", - "type": "Selector|string" - } - ], - "class": "JC.Valid", - "namespace": "JC" + "file": "../JC.js", + "line": 370, + "description": "自动识别组件库所在路径", + "class": ".JC" }, { - "file": "../comps/Valid/Valid.js", - "line": 748, - "description": "获取 _item 的检查子类型, 所有可用的检查子类型位于 _logic.subdatatype 对象", - "itemtype": "method", - "name": "parseSubdatatype", - "access": "private", - "tagname": "", - "static": 1, - "params": [ - { - "name": "_item", - "description": "", - "type": "Selector|string" - } - ], - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 4, + "description": "如果 console 不可用, 生成一个模拟的 console 对象", + "class": "JC.f" }, { - "file": "../comps/Valid/Valid.js", - "line": 911, - "description": "检查内容的长度", - "itemtype": "method", - "name": "lengthValid", - "access": "private", + "file": "../common.js", + "line": 16, + "description": "声明主要命名空间, 方便迁移", + "class": "JC.f" + }, + { + "file": "../common.js", + "line": 83, + "description": "保存需要自动识别的组件", + "itemtype": "property", + "name": "_AUTO_INIT_DATA", + "type": "Object", + "access": "protected", "tagname": "", - "static": 1, - "params": [ - { - "name": "_item", - "description": "", - "type": "Selector" - } - ], - "attr": "{integer} maxlength 内容最大长度", - "example": [ - "\n
            \n 公司名称描述\n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 938, - "description": "根据特殊的 datatype 实现不同的计算方法", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 122, + "description": "判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数", + "class": "JC.common" + }, + { + "file": "../common.js", + "line": 145, + "description": "jquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法", + "class": "JC.common" + }, + { + "file": "../common.js", + "line": 149, + "description": "兼容 低版本 ie Array 的 indexOf 方法", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 964, - "description": "检查是否为正确的数字
            \n
            默认范围 0 - Math.pow(10, 10)", - "itemtype": "method", - "name": "n", - "access": "private", - "tagname": "", + "file": "../common.js", + "line": 181, + "description": "全局 css z-index 控制属性\n
            注意: 这个变量是 window.ZINDEX_COUNT", + "itemtype": "property", + "name": "ZINDEX_COUNT", + "type": "int", + "default": "50001", "static": 1, + "class": "JC.common" + }, + { + "file": "../common.js", + "line": 199, + "description": "一维数组去重", + "itemtype": "method", + "name": "arrayId", "params": [ { - "name": "_item", + "name": "_ar", "description": "", - "type": "Selector" + "type": "Array" } ], - "attr": "{integer|optional} maxvalue - 数值的上限", - "example": [ - "\n
            \n \n
            \n
            \n \n
            \n
            \n \n
            \n" - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Array" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1036, - "description": "检查两个输入框的数值\n
            数字格式为 0-pow(10,10)\n
            带小数点使用 nrange-int.float, 例: nrange-1.2 nrange-2.2\n
            注意: 如果不显示指定 fromNEl, toNEl, \n 将会从父级查找 datatype=nrange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略", + "file": "../common.js", + "line": 218, + "description": "生成全局唯一ID", "itemtype": "method", - "name": "nrange", - "access": "private", - "tagname": "", + "name": "gid", + "return": { + "description": "string" + }, "static": 1, + "class": "JC.common" + }, + { + "file": "../common.js", + "line": 229, + "description": "把函数的参数转为数组", + "itemtype": "method", + "name": "sliceArgs", "params": [ { - "name": "_item", + "name": "args", "description": "", - "type": "Selector" + "type": "Arguments" } ], - "attr": "{date string|optional} maxvalue - 数值的上限", - "example": [ - "\n
            \n \n 大\n - 小\n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Array" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1110, - "description": "检查是否为合法的日期,\n
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD", + "file": "../common.js", + "line": 243, + "description": "取 URL 的 host name", "itemtype": "method", - "name": "d", - "access": "private", - "tagname": "", - "static": 1, + "name": "urlHostName", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" } ], - "attr": "{date string|optional} maxvalue - 日期的上限", - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1145, - "description": "检查两个输入框的日期\n
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD\n
            注意: 如果不显示指定 fromDateEl, toDateEl, \n 将会从父级查找 datatype=daterange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略", + "file": "../common.js", + "line": 259, + "description": "把 URL 相对路径 转换为 绝对路径", "itemtype": "method", - "name": "daterange", - "access": "private", - "tagname": "", - "static": 1, + "name": "relativePath", "params": [ { - "name": "_item", + "name": "_path", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_url", + "description": "", + "type": "String" } ], - "attr": "{date string|optional} maxvalue - 日期的上限", - "example": [ - "\n
            \n \n - \n
            \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1216, - "description": "检查时间格式, 格式为 hh:mm:ss", + "file": "../common.js", + "line": 287, + "description": "按格式输出字符串", "itemtype": "method", - "name": "time", - "access": "private", - "tagname": "", + "name": "printf", "static": 1, "params": [ { - "name": "_item", + "name": "_str", "description": "", - "type": "Selector" + "type": "String" } ], + "return": { + "description": "string" + }, "example": [ - "\n
            \n \n
            " + "\n printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );\n //return asdfasdf000sdfasdf1111" ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1233, - "description": "检查时间格式, 格式为 hh:mm", + "file": "../common.js", + "line": 303, + "description": "按格式输出字符串", "itemtype": "method", - "name": "minute", - "access": "private", - "tagname": "", + "name": "printKey", "static": 1, "params": [ { - "name": "_item", + "name": "_str", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_keys", + "description": "", + "type": "Object" } ], + "return": { + "description": "string" + }, "example": [ - "\n
            \n \n
            " + "\n JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );\n //return asdfasdf000sdfasdf1111,222" ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1250, - "description": "检查银行卡号码\n
            格式为: d{15}, d{16}, d{17}, d{19}", + "file": "../common.js", + "line": 321, + "description": "判断URL中是否有某个get参数", "itemtype": "method", - "name": "bankcard", - "access": "private", - "tagname": "", - "static": 1, + "name": "hasUrlParam", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_key", + "description": "", + "type": "String" } ], + "return": { + "description": "bool" + }, + "static": 1, "example": [ - "\n
            \n \n
            " + "\n var bool = hasUrlParam( 'getkey' );" ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1275, - "description": "检查中文姓名\n
            格式: 汉字和大小写字母\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "file": "../common.js", + "line": 343, + "description": "添加URL参数\n
            require: delUrlParam, filterXSS", "itemtype": "method", - "name": "cnname", - "access": "private", - "tagname": "", - "static": 1, + "name": "addUrlParams", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_params", + "description": "", + "type": "Object" } ], + "return": { + "description": "string" + }, + "static": 1, "example": [ - "\n
            \n \n
            " + "\n var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );" ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1296, - "description": "检查注册用户名\n
            格式: a-zA-Z0-9_-\n
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30", + "file": "../common.js", + "line": 369, + "description": "xss 过滤函数", "itemtype": "method", - "name": "username", - "access": "private", - "tagname": "", - "static": 1, + "name": "filterXSS", "params": [ { - "name": "_item", + "name": "_s", "description": "", - "type": "Selector" + "type": "String" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1316, - "description": "检查身份证号码
            \n目前只使用最简单的位数判断~ 有待完善", + "file": "../common.js", + "line": 384, + "description": "取URL参数的值\n
            require: filterXSS", "itemtype": "method", - "name": "idnumber", - "access": "private", - "tagname": "", - "static": 1, + "name": "getUrlParam", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_key", + "description": "", + "type": "String" } ], + "return": { + "description": "string" + }, + "static": 1, "example": [ - "\n
            \n \n
            " + "\n var defaultTag = getUrlParam(location.href, 'tag'); " ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1335, - "description": "检查手机号码
            ", + "file": "../common.js", + "line": 412, + "description": "取URL参数的值, 这个方法返回数组\n
            与 getUrlParam 的区别是可以获取 checkbox 的所有值\n
            require: filterXSS", "itemtype": "method", - "name": "mobilecode", - "access": "private", - "tagname": "", - "static": 1, + "name": "getUrlParams", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" }, { - "name": "_noError", + "name": "_key", "description": "", - "type": "Bool" + "type": "String" } ], + "return": { + "description": "Array" + }, + "static": 1, "example": [ - "\n
            \n \n
            " + "\n var params = getUrlParams(location.href, 'tag'); " ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1355, - "description": "检查手机号码\n
            这个方法是 mobilecode 的别名", + "file": "../common.js", + "line": 443, + "description": "删除URL参数\n
            require: filterXSS", "itemtype": "method", - "name": "mobile", - "access": "private", - "tagname": "", - "static": 1, + "name": "delUrlParam", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" }, { - "name": "_noError", + "name": "_key", "description": "", - "type": "Bool" + "type": "String" } ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "static": 1, + "example": [ + "\n var url = delUrlParam( location.href, 'tag' );" + ], + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1368, - "description": "检查手机号码加强方法\n
            格式: [+国家代码] [零]11位数字", + "file": "../common.js", + "line": 473, + "description": "批量删除URL参数\n
            require: delUrlParam", "itemtype": "method", - "name": "mobilezonecode", - "access": "private", - "tagname": "", - "static": 1, + "name": "delUrlParams", "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" }, { - "name": "_noError", + "name": "_keys", "description": "", - "type": "Bool" + "type": "Array" } ], + "return": { + "description": "string" + }, + "static": 1, "example": [ - "\n
            \n \n
            " + "\n var url = delUrlParam( location.href, [ 'k1', 'k2' ] );" ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1389, - "description": "检查电话号码\n
            格式: 7/8位数字", + "file": "../common.js", + "line": 489, + "description": "提示需要 HTTP 环境", "itemtype": "method", - "name": "phonecode", - "access": "private", - "tagname": "", + "name": "httpRequire", "static": 1, "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "_msg", + "description": "要提示的文字, 默认 \"本示例需要HTTP环境'", + "type": "String" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "bool 如果是HTTP环境返回true, 否则返回false" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1408, - "description": "检查电话号码\n
            格式: [区号]7/8位电话号码", + "file": "../common.js", + "line": 504, + "description": "删除 URL 的锚点\n
            require: addUrlParams, filterXSS", "itemtype": "method", - "name": "phone", - "access": "private", - "tagname": "", + "name": "removeUrlSharp", "static": 1, "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" }, { - "name": "_noError", - "description": "", + "name": "_nornd", + "description": "是否不添加随机参数", "type": "Bool" + }, + { + "name": "_rndName", + "description": "", + "type": "String" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1429, - "description": "检查电话号码\n
            格式: [+国家代码][ ][电话区号][ ]7/8位电话号码[#分机号]", + "file": "../common.js", + "line": 526, + "description": "重载页面\n
            require: removeUrlSharp, addUrlParams, filterXSS", "itemtype": "method", - "name": "phoneall", - "access": "private", - "tagname": "", + "name": "reloadPage", "static": 1, "params": [ { - "name": "_item", + "name": "_url", "description": "", - "type": "Selector" + "type": "String" }, { - "name": "_noError", + "name": "_nornd", "description": "", "type": "Bool" + }, + { + "name": "_delayms", + "description": "", + "type": "Int" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1451, - "description": "检查电话区号", + "file": "../common.js", + "line": 547, + "description": "取小数点的N位\n
            JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题", "itemtype": "method", - "name": "phonezone", - "access": "private", - "tagname": "", + "name": "parseFinance", "static": 1, "params": [ { - "name": "_item", + "name": "_i", "description": "", - "type": "Selector" + "type": "Number" + }, + { + "name": "_dot", + "description": "default = 2", + "type": "Int" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "number" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1474, - "description": "检查电话分机号码", + "file": "../common.js", + "line": 562, + "description": "js 附加字串函数", "itemtype": "method", - "name": "phoneext", - "access": "private", - "tagname": "", + "name": "padChar", "static": 1, "params": [ { - "name": "_item", + "name": "_str", "description": "", - "type": "Selector" + "type": "String" + }, + { + "name": "_len", + "description": "", + "type": "Intl" + }, + { + "name": "_char", + "description": "", + "type": "String" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1492, - "description": "检查手机号码/电话号码\n
            这个方法是原有方法的混合验证 mobilecode + phone", + "file": "../common.js", + "line": 578, + "description": "格式化日期为 YYYY-mm-dd 格式\n
            require: pad\\_char\\_f", "itemtype": "method", - "name": "mobilephone", - "access": "private", - "tagname": "", + "name": "formatISODate", "static": 1, "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "_date", + "description": "要格式化日期的日期对象", + "type": "Date" + }, + { + "name": "_split", + "description": "定义年月日的分隔符, 默认为 '-'", + "type": "String|undefined" } ], - "example": [ - "\n
            \n \n
            \n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1516, - "description": "检查手机号码/电话号码, 泛匹配\n
            这个方法是原有方法的混合验证 mobilezonecode + phoneall", + "file": "../common.js", + "line": 592, + "description": "从 ISODate 字符串解析日期对象", "itemtype": "method", - "name": "mobilephoneall", - "access": "private", - "tagname": "", + "name": "parseISODate", "static": 1, "params": [ { - "name": "_item", + "name": "_datestr", "description": "", - "type": "Selector" + "type": "String" } ], - "example": [ - "\n
            \n \n
            \n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "date" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1539, - "description": "自定义正则校验", + "file": "../common.js", + "line": 615, + "description": "从日期字符串解析日期对象\n
            兼容 JC.Calendar 日期格式", "itemtype": "method", - "name": "reg", - "access": "private", - "tagname": "", - "static": 1, + "name": "parseDate", "params": [ { - "name": "_item", + "name": "_date", "description": "", + "type": "Date" + }, + { + "name": "_selector", + "description": "如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化", "type": "Selector" + }, + { + "name": "_forceISO", + "description": "是否强制转换为ISO日期", + "type": "Boolean" } ], - "attr": "{string} reg-pattern 正则规则 /规则/选项", - "example": [ - "\n
            \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Date|null" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1565, - "description": "检查验证码
            \n格式: 为 0-9a-zA-Z, 长度 默认为4", + "file": "../common.js", + "line": 639, + "description": "获取不带 时分秒的 日期对象", "itemtype": "method", - "name": "vcode", - "access": "private", - "tagname": "", - "static": 1, + "name": "pureDate", "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "_d", + "description": "可选参数, 如果为空 = new Date", + "type": "Date" } ], - "attr": "{string} datatype vcode|vcode-[\\d]+", - "example": [ - "\n
            \n \n
            \n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" - }, - { - "file": "../comps/Valid/Valid.js", - "line": 1591, - "description": "检查文本长度", - "itemtype": "method", - "name": "text", - "access": "private", - "tagname": "", + "return": { + "description": "Date" + }, "static": 1, - "see": [ - "length" - ], - "attr": "{string} datatype text", - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1600, - "description": "检查文本的字节长度", + "file": "../common.js", + "line": 652, + "description": "克隆日期对象", "itemtype": "method", - "name": "bytetext", - "access": "private", - "tagname": "", + "name": "cloneDate", "static": 1, - "see": [ - "length" + "params": [ + { + "name": "_date", + "description": "需要克隆的日期", + "type": "Date" + } ], - "attr": "{string} datatype bytetext", - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Date" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1609, - "description": "检查富文本的字节\n
            TODO: 完成富文本长度检查", + "file": "../common.js", + "line": 660, + "description": "判断两个日期是否为同一天", "itemtype": "method", - "name": "richtext", - "access": "private", - "tagname": "", + "name": "isSameDay", "static": 1, - "see": [ - "length" + "params": [ + { + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" + } ], - "attr": "{string} datatype richtext", - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1619, - "description": "计算字符串的字节长度, 非 ASCII 0-255的字符视为两个字节", + "file": "../common.js", + "line": 672, + "description": "判断两个日期是否为同一月份", "itemtype": "method", - "name": "bytelen", - "access": "private", - "tagname": "", + "name": "isSameMonth", "static": 1, "params": [ { - "name": "_s", - "description": "", - "type": "String" + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" } ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1630, - "description": "检查URL", + "file": "../common.js", + "line": 685, + "description": "判断两个日期是否为同一季度", "itemtype": "method", - "name": "url", - "access": "private", - "tagname": "", + "name": "isSameWeek", "static": 1, "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1650, - "description": "检查域名", + "file": "../common.js", + "line": 716, + "description": "判断两个日期是否为同一季度", "itemtype": "method", - "name": "domain", - "access": "private", - "tagname": "", + "name": "isSameSeason", "static": 1, "params": [ { - "name": "_item!~YUIDOC_LINE~!", - "description": "
            \n \n
            ", - "type": "Selector" + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" } ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1668, - "description": "检查域名", + "file": "../common.js", + "line": 748, + "description": "判断两个日期是否为同一年", "itemtype": "method", - "name": "stricdomain", - "access": "private", - "tagname": "", + "name": "isSameYear", "static": 1, "params": [ { - "name": "_item!~YUIDOC_LINE~!", - "description": "
            \n \n
            ", - "type": "Selector" + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" } ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1685, - "description": "检查电子邮件", + "file": "../common.js", + "line": 760, + "description": "取一年中所有的星期, 及其开始结束日期", "itemtype": "method", - "name": "email", - "access": "private", - "tagname": "", + "name": "weekOfYear", "static": 1, "params": [ { - "name": "_item", + "name": "_year", "description": "", - "type": "Selector" + "type": "Int" + }, + { + "name": "_dayOffset", + "description": "每周的默认开始为周几, 默认0(周一)", + "type": "Int" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Array" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1702, - "description": "检查地区代码", + "file": "../common.js", + "line": 772, + "description": "元旦开始的第一个星期一开始的一周为政治经济上的第一周", + "class": "JC.common" + }, + { + "file": "../common.js", + "line": 797, + "description": "取一年中所有的季度, 及其开始结束日期", "itemtype": "method", - "name": "countrycode", - "access": "private", - "tagname": "", + "name": "seasonOfYear", "static": 1, "params": [ { - "name": "_item", + "name": "_year", "description": "", - "type": "Selector" + "type": "Int" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Array" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1719, - "description": "检查邮政编码", + "file": "../common.js", + "line": 833, + "description": "取某一天所在星期的开始结束日期,以及第几个星期", "itemtype": "method", - "name": "zipcode", - "access": "private", - "tagname": "", + "name": "dayOfWeek", "static": 1, "params": [ { - "name": "_item", + "name": "_date", "description": "", - "type": "Selector" + "type": "Iso date" + }, + { + "name": "_dayOffset", + "description": "", + "type": "Int" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Object" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1736, - "description": "纳税人识别号, 15, 18, 20位字符", + "file": "../common.js", + "line": 862, + "description": "取某一天所在季度的开始结束日期,以及第几个Q", "itemtype": "method", - "name": "taxcode", - "access": "private", - "tagname": "", + "name": "dayOfSeason", "static": 1, "params": [ { - "name": "_item", + "name": "_date", "description": "", - "type": "Selector" + "type": "Iso date" } ], - "example": [ - "\n
            \n \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "Object" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1757, - "description": "此类型检查 2|N 个对象填写的值必须一致\n常用于注意时密码验证/重置密码", + "file": "../common.js", + "line": 889, + "description": "取得一个月份中最大的一天", "itemtype": "method", - "name": "reconfirm", - "access": "private", - "tagname": "", + "name": "maxDayOfMonth", "static": 1, "params": [ { - "name": "_item", + "name": "_date", "description": "", - "type": "Selector" + "type": "Date" } ], - "example": [ - "\n
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            \n \n
            \n
            " - ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "月份中最大的一天", + "type": "Int" + }, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1845, - "description": "此类型检查 2|N个对象必须至少有一个是有输入内容的, \n
            常用于 手机/电话 二填一", + "file": "../common.js", + "line": 902, + "description": "取当前脚本标签的 src路径", "itemtype": "method", - "name": "alternative", - "access": "private", - "tagname": "", + "name": "scriptPath", + "static": 1, + "return": { + "description": "脚本所在目录的完整路径", + "type": "String" + }, + "class": "JC.common" + }, + { + "file": "../common.js", + "line": 914, + "description": "缓动函数, 动画效果为按时间缓动 \n
            这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval", + "itemtype": "method", + "name": "easyEffect", "static": 1, "params": [ { - "name": "_item", - "description": "", - "type": "Selector" + "name": "_cb", + "description": "缓动运动时的回调", + "type": "Function" + }, + { + "name": "_maxVal", + "description": "缓动的最大值, default = 200", + "type": "Number" + }, + { + "name": "_startVal", + "description": "缓动的起始值, default = 0", + "type": "Number" + }, + { + "name": "_duration", + "description": "缓动的总时间, 单位毫秒, default = 200", + "type": "Number" + }, + { + "name": "_stepMs", + "description": "缓动的间隔, 单位毫秒, default = 2", + "type": "Number" } ], + "return": { + "description": "interval" + }, "example": [ - "\n
            \n
            \n \n
            \n
            \n \n - \n - \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            \n \n
            \n
            " + "\n $(document).ready(function(){\n window.js_output = $('span.js_output');\n window.ls = [];\n window.EFF_INTERVAL = easyEffect( effectcallback, 100);\n });\n\n function effectcallback( _stepval, _done ){\n js_output.html( _stepval );\n ls.push( _stepval );\n\n !_done && js_output.html( _stepval );\n _done && js_output.html( _stepval + '
            ' + ls.join() );\n }" ], - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 1993, - "description": "如果 _item 的值非空, 那么 reqtarget 的值也不能为空", + "file": "../common.js", + "line": 968, + "description": "把输入值转换为布尔值", "itemtype": "method", - "name": "reqtarget", + "name": "parseBool", "params": [ { - "name": "_item", + "name": "_input", "description": "", - "type": "Selector" + "type": "*" } ], - "access": "private", - "tagname": "", + "return": { + "description": "bool" + }, "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2017, - "description": "N 个值必须保持唯一性, 不能有重复", + "file": "../common.js", + "line": 987, + "description": "绑定或清除 mousewheel 事件", "itemtype": "method", - "name": "unique", + "name": "mousewheelEvent", "params": [ { - "name": "_item", + "name": "_cb", + "description": "", + "type": "Function" + }, + { + "name": "_detach", "description": "", + "type": "Bool" + }, + { + "name": "_selector", + "description": "default = document", "type": "Selector" } ], - "access": "private", - "tagname": "", "static": 1, - "class": "JC.Valid", - "namespace": "JC" + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2163, - "description": "获取 _selector 对象\n
            这个方法的存在是为了向后兼容qwrap, qwrap DOM参数都为ID", + "file": "../common.js", + "line": 1011, + "description": "获取 selector 的指定父级标签", "itemtype": "method", - "name": "getElement", - "access": "private", - "tagname": "", - "static": 1, + "name": "getJqParent", "params": [ { "name": "_selector", "description": "", "type": "Selector" + }, + { + "name": "_filter", + "description": "", + "type": "Selector" } ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "selector" + }, + "require": "jquery", + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2186, - "description": "获取对应的错误信息, 默认的错误信息有 reqmsg, errmsg,
            \n注意: 错误信息第一个字符如果为空格的话, 将完全使用用户定义的错误信息, 将不会动态添加 请上传/选择/填写", + "file": "../common.js", + "line": 1037, + "description": "扩展 jquery 选择器\n
            扩展起始字符的 '/' 符号为 jquery 父节点选择器\n
            扩展起始字符的 '|' 符号为 jquery 子节点选择器\n
            扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )", "itemtype": "method", - "name": "errorMsg", - "access": "private", - "tagname": "", - "static": 1, + "name": "parentSelector", "params": [ { "name": "_item", @@ -10866,3702 +19445,2096 @@ "type": "Selector" }, { - "name": "_msgAttr", - "description": "- 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名", + "name": "_selector", + "description": "", "type": "String" }, { - "name": "_fullMsg", - "description": "- 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写", - "type": "Bool" + "name": "_finder", + "description": "", + "type": "Selector" } ], - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "selector" + }, + "require": "jquery", + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2221, - "description": "检查内容是否为空,\n
            如果声明了该属性, 那么 value 须不为空", + "file": "../common.js", + "line": 1105, + "description": "获取脚本模板的内容", "itemtype": "method", - "name": "reqmsg", - "access": "private", - "tagname": "", - "static": 1, + "name": "scriptContent", "params": [ { - "name": "_item", + "name": "_selector", "description": "", "type": "Selector" } ], - "example": [ - "\n
            \n 公司名称描述\n
            " - ], - "class": "JC.Valid", - "namespace": "JC" - }, - { - "file": "../comps/Valid/Valid.js", - "line": 2308, - "description": "这里需要优化检查, 目前会重复检查", - "class": "JC.Valid", - "namespace": "JC" + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2398, - "description": "验证文件扩展名", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1120, + "description": "取函数名 ( 匿名函数返回空 )", + "itemtype": "method", + "name": "funcName", + "params": [ + { + "name": "_func", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2447, - "description": "显示正确的视觉效果", + "file": "../common.js", + "line": 1135, + "description": "执行自动识别的组件", "itemtype": "method", - "name": "valid", - "access": "private", - "tagname": "", - "static": 1, + "name": "autoInit", "params": [ { - "name": "_item", + "name": "_selector", "description": "", "type": "Selector" - }, - { - "name": "_tm", - "description": "", - "type": "Int" - }, - { - "name": "_noStyle", - "description": "", - "type": "Bool" } ], - "class": "JC.Valid", - "namespace": "JC" + "static": 1, + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2518, - "description": "显示错误的视觉效果", + "file": "../common.js", + "line": 1152, + "description": "添加需要自动识别的组件", "itemtype": "method", - "name": "error", - "access": "private", - "tagname": "", - "static": 1, + "name": "addAutoInit", "params": [ { - "name": "_item", + "name": "_class", "description": "", - "type": "Selector" - }, - { - "name": "_msgAttr", - "description": "- 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名", - "type": "String" - }, - { - "name": "_fullMsg", - "description": "- 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写", - "type": "Bool" + "type": "Class" } ], - "class": "JC.Valid", - "namespace": "JC" + "static": 1, + "example": [ + "\n JC.f.addAutoInit( JC.Calendar );" + ], + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2617, - "description": "解析错误时触发的时件", - "itemtype": "event", - "name": "ValidError", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1171, + "description": "jcAutoInitComps 不久后将被清除\n请使用 JC.f.autoInit 和 JC.f.addAutoInit", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2621, - "description": "解析正确时触发的时件", - "itemtype": "event", - "name": "ValidCorrect", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1179, + "description": "联动下拉框", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2625, - "description": "响应表单子对象的 blur事件, 触发事件时, 检查并显示错误或正确的视觉效果", - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1183, + "description": "日历组件", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2633, - "description": "响应表单子对象的 change 事件, 触发事件时, 检查并显示错误或正确的视觉效果", - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1187, + "description": "双日历组件", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2640, - "description": "响应表单子对象的 focus 事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息", - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1191, + "description": "全选反选", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2650, - "description": "响应表单子对象的 blur事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息", - "access": "private", - "tagname": "", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1195, + "description": "Ajax 上传", + "class": "JC.common" }, { - "file": "../comps/Valid/Valid.js", - "line": 2675, - "description": "初始化 subdatatype = datavalid 相关事件", - "class": "JC.Valid", - "namespace": "JC" + "file": "../common.js", + "line": 1199, + "description": "占位符", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 3, - "description": "Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.", - "class": "window.jQuery" + "file": "../common.js", + "line": 1203, + "description": "表格冻结", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 10, - "access": "private", - "tagname": "", - "class": "window.jQuery" + "file": "../common.js", + "line": 1207, + "description": "拖曳", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 17, - "description": "Use jasmine.undefined instead of undefined, since undefined is just\na plain old variable and may be redefined by somebody else.", - "access": "private", - "tagname": "", - "class": "window.jQuery" + "file": "../common.js", + "line": 1211, + "description": "图片裁切", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 25, - "description": "Show diagnostic messages in the console if set to true", - "class": "window.jQuery" + "file": "../common.js", + "line": 1219, + "description": "disable / enable", + "class": "JC.common" }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 31, - "description": "Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.", - "class": "window.jQuery" + { + "file": "../common.js", + "line": 1223, + "description": "表单提交逻辑", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 37, - "description": "Default timeout interval in milliseconds for waitsFor() blocks.", - "class": "window.jQuery" + "file": "../common.js", + "line": 1227, + "description": "格式化金额", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 50, - "description": "Allows for bound functions to be compared. Internal use only.", - "ignore": "", - "access": "private", - "tagname": "", - "params": [ - { - "name": "base", - "description": "bound 'this' for the function", - "type": "Object" - }, - { - "name": "name", - "description": "function to find", - "type": "Function" - } - ], - "class": "window.jQuery" + "file": "../common.js", + "line": 1231, + "description": "自动完成", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 114, - "description": "Getter for the Jasmine environment. Ensures one gets created", - "class": "window.jQuery" + "file": "../common.js", + "line": 1238, + "description": "排期日期展示", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 122, - "ignore": "", - "access": "private", - "tagname": "", + "file": "../common.js", + "line": 1244, + "description": "URL 占位符识别功能\n
            require: addUrlParams, filterXSS", + "itemtype": "method", + "name": "urlDetect", "params": [ { - "name": "value", - "description": "" + "name": "_url", + "description": "如果 起始字符为 URL, 那么 URL 将祝为本页的URL", + "type": "String" } ], "return": { - "description": "", - "type": "Boolean" + "description": "string" }, - "class": "window.jQuery" + "static": 1, + "example": [ + "\n urlDetect( '?test' ); //output: ?test\n\n urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2\n urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2\n urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2" + ], + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 132, - "ignore": "", - "access": "private", - "tagname": "", + "file": "../common.js", + "line": 1285, + "description": "日期占位符识别功能", + "itemtype": "method", + "name": "dateDetect", "params": [ { - "name": "value", - "description": "" + "name": "_dateStr", + "description": "如果起始字符为 NOW, 那么将视为当前日期\n , 如果起始字符为 NOWFirst, 那么将视为当前月的1号", + "type": "String" } ], "return": { "description": "", - "type": "Boolean" + "type": "Date|null" }, - "class": "window.jQuery" + "static": 1, + "example": [ + "\n dateDetect( 'now' ); //2014-10-02\n dateDetect( 'now,3d' ); //2013-10-05\n dateDetect( 'now,-3d' ); //2013-09-29\n dateDetect( 'now,2w' ); //2013-10-16\n dateDetect( 'now,-2m' ); //2013-08-02\n dateDetect( 'now,4y' ); //2017-10-02\n\n dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10" + ], + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 142, - "ignore": "", - "access": "private", - "tagname": "", - "params": [ - { - "name": "value", - "description": "" - } - ], - "return": { - "description": "", - "type": "Boolean" - }, - "class": "window.jQuery" + "file": "../common.js", + "line": 1354, + "description": "inject jquery val func, for hidden change event", + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 152, - "ignore": "", - "access": "private", - "tagname": "", + "file": "../common.js", + "line": 1372, + "description": "逗号格式化金额", + "itemtype": "method", + "name": "moneyFormat", "params": [ { - "name": "typeName", + "name": "_number", "description": "", - "type": "String" + "type": "Int|string" }, { - "name": "value", - "description": "" + "name": "_len", + "description": "", + "type": "Int" + }, + { + "name": "_floatLen", + "description": "", + "type": "Int" + }, + { + "name": "_splitSymbol", + "description": "", + "type": "Int" } ], "return": { - "description": "", - "type": "Boolean" + "description": "string" }, - "class": "window.jQuery" + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 163, - "description": "Pretty printer for expecations. Takes any object and turns it into a human-readable string.", + "file": "../common.js", + "line": 1427, + "description": "日期格式化 (具体格式请查看 PHP Date Formats)", + "itemtype": "method", + "name": "dateFormat", "params": [ { - "name": "value", - "description": "an object to be outputted", - "type": "Object" + "name": "_date", + "description": "default = now", + "type": "Date" + }, + { + "name": "_format", + "description": "default = \"YY-MM-DD\"", + "type": "String" } ], "return": { - "description": "", - "type": "String" + "description": "string" }, - "class": "window.jQuery" + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 175, - "description": "Returns true if the object is a DOM Node.", + "file": "../common.js", + "line": 1508, + "description": "扩展对象属性", + "itemtype": "method", + "name": "extendObject", "params": [ { - "name": "obj", - "description": "object to check", + "name": "_source", + "description": "", + "type": "Object" + }, + { + "name": "_new", + "description": "", "type": "Object" + }, + { + "name": "_overwrite", + "description": "是否覆盖已有属性, default = true", + "type": "Bool" } ], "return": { - "description": "", - "type": "Boolean" + "description": "object" }, - "class": "window.jQuery" + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 185, - "description": "Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter.", - "example": [ - "\n// don't care about which function is passed in, as long as it's a function\nexpect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));" - ], + "file": "../common.js", + "line": 1530, + "description": "timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行", + "itemtype": "method", + "name": "safeTimeout", "params": [ { - "name": "clazz", + "name": "_timeout", "description": "", - "type": "Class" + "type": "Timeout|function" + }, + { + "name": "_obj", + "description": "default = window.TIMEOUT_HOST || {}", + "type": "Object" + }, + { + "name": "_name", + "description": "default = 'NORMAL'", + "type": "String" + }, + { + "name": "_ms", + "description": "default = 50", + "type": "Int" } ], "return": { - "description": "matchable object of the type clazz" + "description": "object" }, - "class": "window.jQuery" + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 199, - "description": "Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the\nattributes on the object.", - "example": [ - "\n// don't care about any other attributes than foo.\nexpect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: \"bar\"});" - ], + "file": "../common.js", + "line": 1551, + "description": "URL 请求时, 获取对URL参数进行编码的函数", + "itemtype": "method", + "name": "encoder", "params": [ { - "name": "sample", - "description": "sample", - "type": "Object" + "name": "_selector", + "description": "", + "type": "Selector" } ], "return": { - "description": "matchable object for the sample" + "description": "default encodeURIComponent", + "type": "Encode function" }, - "class": "window.jQuery" + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 214, - "description": "Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.\n\nSpies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine\nexpectation syntax. Spies can be checked if they were called or not and what the calling params were.\n\nA Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).\n\nSpies are torn down at the end of every spec.\n\nNote: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.", - "example": [ - "\n// a stub\nvar myStub = jasmine.createSpy('myStub'); // can be used anywhere\n\n// spy example\nvar foo = {\n not: function(bool) { return !bool; }\n}\n\n// actual foo.not will not be called, execution stops\nspyOn(foo, 'not');\n\n// foo.not spied upon, execution will continue to implementation\nspyOn(foo, 'not').andCallThrough();\n\n// fake example\nvar foo = {\n not: function(bool) { return !bool; }\n}\n\n// foo.not(val) will return val\nspyOn(foo, 'not').andCallFake(function(value) {return value;});\n\n// mock example\nfoo.not(7 == 7);\nexpect(foo.not).toHaveBeenCalled();\nexpect(foo.not).toHaveBeenCalledWith(true);" - ], - "is_constructor": 1, - "see": [ - "spyOn", - "jasmine.createSpy", - "jasmine.createSpyObj" - ], + "file": "../common.js", + "line": 1569, + "description": "深度克隆对象", + "itemtype": "method", + "name": "cloneObject", "params": [ { - "name": "name", + "name": "_inObj", "description": "", - "type": "String" + "type": "Object" } ], - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 259, - "description": "The name of the spy, if provided.", - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 263, - "description": "Is this Object a spy?", - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 267, - "description": "The actual function this spy stubs.", - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 272, - "description": "Tracking of the most recent call to the spy.", - "example": [ - "\nvar mySpy = jasmine.createSpy('foo');\nmySpy(1, 2);\nmySpy.mostRecentCall.args = [1, 2];" - ], - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 281, - "description": "Holds arguments for each call to the spy, indexed by call count", - "example": [ - "\nvar mySpy = jasmine.createSpy('foo');\nmySpy(1, 2);\nmySpy(7, 8);\nmySpy.mostRecentCall.args = [7, 8];\nmySpy.argsForCall[0] = [1, 2];\nmySpy.argsForCall[1] = [7, 8];" - ], - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 295, - "description": "Tells a spy to call through to the actual implemenatation.", - "example": [ - "\nvar foo = {\n bar: function() { // do some stuff }\n}\n\n// defining a spy on an existing property: foo.bar\nspyOn(foo, 'bar').andCallThrough();" - ], - "class": "window.jQuery" + "return": { + "description": "Object" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 311, - "description": "For setting the return value of a spy.", - "example": [ - "\n// defining a spy from scratch: foo() returns 'baz'\nvar foo = jasmine.createSpy('spy on foo').andReturn('baz');\n\n// defining a spy on an existing property: foo.bar() returns 'baz'\nspyOn(foo, 'bar').andReturn('baz');" - ], + "file": "../common.js", + "line": 1612, + "description": "获取 document 的 相关大小", + "itemtype": "method", + "name": "docSize", "params": [ { - "name": "value", + "name": "_doc", "description": "", - "type": "Object" + "type": "Document" } ], - "class": "window.jQuery" + "return": { + "description": "Object" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 330, - "description": "For throwing an exception when a spy is called.", - "example": [ - "\n// defining a spy from scratch: foo() throws an exception w/ message 'ouch'\nvar foo = jasmine.createSpy('spy on foo').andThrow('baz');\n\n// defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'\nspyOn(foo, 'bar').andThrow('baz');" - ], + "file": "../common.js", + "line": 1641, + "description": "获取 window 的 相关大小", + "itemtype": "method", + "name": "winSize", "params": [ { - "name": "exceptionMsg", - "description": "", - "type": "String" + "name": "_win,", + "description": "default = window", + "type": "Window" } ], - "class": "window.jQuery" + "return": { + "description": "Object" + }, + "static": 1, + "class": "JC.common" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 349, - "description": "Calls an alternate implementation when a spy is called.", - "example": [ - "\nvar baz = function() {\n // do some stuff, return something\n}\n// defining a spy from scratch: foo() calls the function baz\nvar foo = jasmine.createSpy('spy on foo').andCall(baz);\n\n// defining a spy on an existing property: foo.bar() calls an anonymnous function\nspyOn(foo, 'bar').andCall(function() { return 'baz';} );" - ], + "file": "../jquery.js", + "line": 3839, + "description": "For feature detection", "params": [ { - "name": "fakeFunc", - "description": "", + "name": "fn", + "description": "The function to test for native support", "type": "Function" } ], - "class": "window.jQuery" + "class": "window.jQuery", + "namespace": "window" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 369, - "description": "Resets all of a spy's the tracking variables so that it can be used again.", - "example": [ - "\nspyOn(foo, 'bar');\n\nfoo.bar();\n\nexpect(foo.bar.callCount).toEqual(1);\n\nfoo.bar.reset();\n\nexpect(foo.bar.callCount).toEqual(0);" - ], - "class": "window.jQuery" + "file": "../jquery.js", + "line": 3847, + "description": "Create key-value caches of limited size", + "return": { + "description": "Returns the Object data after storing it on itself with\n\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n\tdeleting the oldest entry", + "type": "Function(string, Object)" + }, + "class": "window.jQuery", + "namespace": "window" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 415, - "description": "Determines whether an object is a spy.", + "file": "../jquery.js", + "line": 3867, + "description": "Mark a function for special use by Sizzle", "params": [ { - "name": "putativeSpy", - "description": "", - "type": "jasmine.Spy|Object" + "name": "fn", + "description": "The function to mark", + "type": "Function" } ], - "return": { - "description": "", - "type": "Boolean" - }, - "class": "window.jQuery" + "class": "window.jQuery", + "namespace": "window" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 425, - "description": "Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something\nlarge in one call.", + "file": "../jquery.js", + "line": 3876, + "description": "Support testing using an element", "params": [ { - "name": "baseName", - "description": "name of spy class", - "type": "String" - }, - { - "name": "methodNames", - "description": "array of names of methods to make spies", - "type": "Array" + "name": "fn", + "description": "Passed the created div and expects a boolean result", + "type": "Function" } ], - "class": "window.jQuery" - }, - { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 443, - "description": "All parameters are pretty-printed and concatenated together, then written to the current spec's output.\n\nBe careful not to leave calls to jasmine.log in production code.", - "class": "window.jQuery" + "class": "window.jQuery", + "namespace": "window" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 453, - "description": "Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.", - "example": [ - "\n// spy example\nvar foo = {\n not: function(bool) { return !bool; }\n}\nspyOn(foo, 'not'); // actual foo.not will not be called, execution stops" - ], - "see": [ - "jasmine.createSpy" - ], + "file": "../jquery.js", + "line": 4003, + "description": "Detect xml", "params": [ { - "name": "obj", - "description": "" - }, - { - "name": "methodName", - "description": "" + "name": "elem", + "description": "An element or a document", + "type": "Element|Object" } ], - "return": { - "description": "a Jasmine spy that can be chained with all spy methods" - }, - "class": "window.jQuery" + "class": "window.jQuery", + "namespace": "window" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 473, - "description": "Creates a Jasmine spec that will be added to the current suite.\n\n// TODO: pending tests", - "example": [ - "\nit('should be true', function() {\n expect(true).toEqual(true);\n});" - ], + "file": "../jquery.js", + "line": 4014, + "description": "Sets document-related variables once based on the current document", "params": [ { - "name": "desc", - "description": "description of this specification", - "type": "String" - }, - { - "name": "func", - "description": "defines the preconditions and expectations of the spec", - "type": "Function" + "name": "doc", + "description": "An element or document object to use to set the document", + "type": "Element|Object", + "optional": true } ], - "class": "window.jQuery" + "return": { + "description": "Returns the current document", + "type": "Object" + }, + "class": "window.jQuery", + "namespace": "window" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 491, - "description": "Creates a disabled Jasmine spec.\n\nA convenience method that allows existing specs to be disabled temporarily during development.", + "file": "../jquery.js", + "line": 4507, + "description": "Utility function for retrieving the text value of an array of DOM nodes", "params": [ { - "name": "desc", - "description": "description of this specification", - "type": "String" - }, - { - "name": "func", - "description": "defines the preconditions and expectations of the spec", - "type": "Function" + "name": "elem", + "description": "", + "type": "Array|Element" } ], - "class": "window.jQuery" + "class": "window.jQuery", + "namespace": "window" + } + ], + "warnings": [ + { + "message": "unknown tag: version", + "line": " ../bizs/ActionLogic/ActionLogic.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/AutoSelectComplete/AutoSelectComplete.js:4" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/ChangeLogic/ChangeLogic.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/CommonModify/CommonModify.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/CustomColumn/CustomColumn.js:8" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/DMultiDate/DMultiDate.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/DisableLogic/DisableLogic.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/DropdownTree/DropdownTree.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/FormLogic/FormLogic.js:4" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/FormLogic/FormLogic.js:4" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/InputSelect/InputSelect.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/KillISPCache/KillISPCache.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MoneyTips/MoneyTips.js:4" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiAutoComplete/MultiAutoComplete.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiChangeLogic/MultiChangeLogic.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiDate/MultiDate.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiSelect/MultiSelect.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiSelectTree/MultiSelectTree.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiUpload/MultiUpload.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/MultiselectPanel/MultiselectPanel.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../bizs/TaskViewer/TaskViewer.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/AjaxTree/AjaxTree.js:7" + }, + { + "message": "unknown tag: version", + "line": " ../comps/AjaxUpload/AjaxUpload.js:3" + }, + { + "message": "unknown tag: date", + "line": " ../comps/AjaxUpload/AjaxUpload.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../comps/AutoChecked/AutoChecked.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/AutoComplete/AutoComplete.js:4" + }, + { + "message": "unknown tag: version", + "line": " ../comps/AutoFixed/AutoFixed.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../comps/AutoSelect/AutoSelect.js:3" + }, + { + "message": "unknown tag: date", + "line": " ../comps/AutoSelect/AutoSelect.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../comps/BaseMVC/BaseMVC.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../comps/BaseMVC/BaseMVC.js:249" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Calendar/Calendar.date.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Calendar/Calendar.date.js:3" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Calendar/Calendar.date.js:3" + }, + { + "message": "unknown tag: prototype", + "line": " ../comps/Calendar/Calendar.date.js:525" + }, + { + "message": "unknown tag: version", + "line": " ../comps/DCalendar/DCalendar.date.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Drag/Drag.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/DragSelect/DragSelect.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/FChart/FChart.js:7" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Fixed/Fixed.js:6" + }, + { + "message": "unknown tag: date", + "line": " ../comps/Fixed/Fixed.js:6" + }, + { + "message": "unknown tag: require", + "line": " ../comps/Fixed/Fixed.js:467" + }, + { + "message": "unknown tag: version", + "line": " ../comps/FlowChart/FlowChart.js:5" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Form/Form.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Form/Form.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/FormFillUrl/FormFillUrl.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 504, - "description": "Starts a chain for a Jasmine expectation.\n\nIt is passed an Object that is the actual value and should chain to one of the many\njasmine.Matchers functions.", - "params": [ - { - "name": "actual", - "description": "Actual value to test against and expected value", - "type": "Object" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/FrameUtil/FrameUtil.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 517, - "description": "Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.", - "params": [ - { - "name": "func", - "description": "Function that defines part of a jasmine spec.", - "type": "Function" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/ImageCutter/ImageCutter.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 527, - "description": "Waits a fixed time period before moving to the next block.", - "deprecated": true, - "deprecationMessage": "Use waitsFor() instead", - "params": [ - { - "name": "timeout", - "description": "milliseconds to wait", - "type": "Number" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:6" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 538, - "description": "Waits for the latchFunction to return true before proceeding to the next block.", - "params": [ - { - "name": "latchFunction", - "description": "", - "type": "Function" - }, - { - "name": "optional_timeoutMessage", - "description": "", - "type": "String" - }, - { - "name": "optional_timeout", - "description": "", - "type": "Number" - } - ], - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:6" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 550, - "description": "A function that is called before each spec in a suite.\n\nUsed for spec setup, including validating assumptions.", - "params": [ - { - "name": "beforeEachFunction", - "description": "", - "type": "Function" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/NumericStepper/NumericStepper.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 562, - "description": "A function that is called after each spec in a suite.\n\nUsed for restoring any state that is hijacked during spec execution.", - "params": [ - { - "name": "afterEachFunction", - "description": "", - "type": "Function" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Paginator/Paginator.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 574, - "description": "Defines a suite of specifications.\n\nStores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared\nare accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization\nof setup in some tests.", - "example": [ - "\n// TODO: a simple suite\n\n// TODO: a simple suite with a nested describe block" - ], - "params": [ - { - "name": "description", - "description": "A string, usually the class under test.", - "type": "String" - }, - { - "name": "specDefinitions", - "description": "function that defines several specs.", - "type": "Function" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Panel/Panel.default.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 594, - "description": "Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.", - "params": [ - { - "name": "description", - "description": "A string, usually the class under test.", - "type": "String" - }, - { - "name": "specDefinitions", - "description": "function that defines several specs.", - "type": "Function" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Panel/Panel.default.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 633, - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/Panel/Panel.default.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 638, - "description": "Declare that a child class inherit it's prototype from the parent class.", - "access": "private", - "tagname": "", - "params": [ - { - "name": "childClass", - "description": "", - "type": "Function" - }, - { - "name": "parentClass", - "description": "", - "type": "Function" - } - ], - "class": "window.jQuery" + "message": "unknown tag: prototype", + "line": " ../comps/Panel/Panel.default.js:888" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 646, - "access": "private", - "tagname": "", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Panel/Panel.default.js:1349" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 700, - "description": "Environment for Jasmine", - "is_constructor": 1, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Panel/Panel.default.js:1349" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 738, - "return": { - "description": "an object containing jasmine version build info, if set." - }, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Panel/Panel.default.js:1349" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 749, - "return": { - "description": "string containing jasmine version build info, if set." - }, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Panel/Panel.default.js:1349" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 766, - "return": { - "description": "a sequential integer starting at 0" - }, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Panel/Panel.default.js:1349" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 773, - "return": { - "description": "a sequential integer starting at 0" - }, - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Placeholder/Placeholder.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 780, - "description": "Register a reporter to receive status updates from Jasmine.", - "params": [ - { - "name": "reporter", - "description": "An object which will receive status updates.", - "type": "jasmine.Reporter" - } - ], - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/Placeholder/Placeholder.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 977, - "is_constructor": 1, - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/PopTips/PopTips.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1008, - "description": "Blocks are functions with executable code that make up a spec.", - "is_constructor": 1, - "params": [ - { - "name": "env", - "description": "", - "type": "jasmine.Env" - }, - { - "name": "func", - "description": "", - "type": "Function" - }, - { - "name": "spec", - "description": "", - "type": "jasmine.Spec" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/PopTips/PopTips.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1030, - "is_constructor": 1, - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/ServerSort/ServerSort.js:2" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1132, - "is_constructor": 1, - "params": [ - { - "name": "env", - "description": "", - "type": "jasmine.Env" - }, - { - "name": "actual", - "description": "" - }, - { - "name": "spec", - "description": "", - "type": "jasmine.Spec" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Slider/Slider.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1209, - "description": "toBe: compares the actual to the expected using ===", - "params": [ - { - "name": "expected", - "description": "" - } - ], - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/Slider/Slider.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1217, - "description": "toNotBe: compares the actual to the expected using !==", - "params": [ - { - "name": "expected", - "description": "" - } - ], - "deprecated": true, - "deprecationMessage": "as of 1.0. Use not.toBe() instead.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/StepControl/StepControl.js:2" + }, + { + "message": "unknown tag: version", + "line": " ../comps/Suggest/Suggest.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1226, - "description": "toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.", - "params": [ - { - "name": "expected", - "description": "" - } - ], - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/Suggest/Suggest.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1235, - "description": "toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual", - "params": [ - { - "name": "expected", - "description": "" - } - ], - "deprecated": true, - "deprecationMessage": "as of 1.0. Use not.toEqual() instead.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Tab/Tab.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1244, - "description": "Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes\na pattern or a String.", - "params": [ - { - "name": "expected", - "description": "" - } - ], - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Tab/Tab.js:4" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1254, - "description": "Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch", - "params": [ - { - "name": "expected", - "description": "" - } - ], - "deprecated": true, - "deprecationMessage": "as of 1.0. Use not.toMatch() instead.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/TableFreeze/TableFreeze.js:6" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1263, - "description": "Matcher that compares the actual to jasmine.undefined.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Tips/Tips.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1270, - "description": "Matcher that compares the actual to jasmine.undefined.", - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/Tips/Tips.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1277, - "description": "Matcher that compares the actual to null.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Tree/Tree.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1284, - "description": "Matcher that boolean not-nots the actual.", - "class": "window.jQuery" + "message": "unknown tag: date", + "line": " ../comps/Tree/Tree.js:3" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1292, - "description": "Matcher that boolean nots the actual.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Valid/Valid.js:6" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1300, - "description": "Matcher that checks to see if the actual, a Jasmine spy, was called.", - "class": "window.jQuery" + "message": "unknown tag: version", + "line": " ../comps/Valid/Valid.js:6" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1322, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1123" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1325, - "description": "Matcher that checks to see if the actual, a Jasmine spy, was not called.", - "deprecated": true, - "deprecationMessage": "Use expect(xxx).not.toHaveBeenCalled() instead", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1123" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1349, - "description": "Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.", - "example": [ - "\n" - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1123" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1378, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1174" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1381, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1174" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1398, - "description": "Matcher that checks that the expected item is an element in the actual Array.", - "params": [ - { - "name": "expected", - "description": "", - "type": "Object" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1174" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1407, - "description": "Matcher that checks that the expected item is NOT an element in the actual Array.", - "params": [ - { - "name": "expected", - "description": "", - "type": "Object" - } - ], - "deprecated": true, - "deprecationMessage": "as of 1.0. Use not.toContain() instead.", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1246" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1425, - "description": "Matcher that checks that the expected item is equal to the actual item\nup to a given level of decimal precision (default 2).", - "params": [ - { - "name": "expected", - "description": "", - "type": "Number" - }, - { - "name": "precision", - "description": "", - "type": "Number" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1246" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1442, - "description": "Matcher that checks that the expected exception was thrown by the actual.", - "params": [ - { - "name": "expected", - "description": "", - "type": "String" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1246" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1619, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1320" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1715, - "is_constructor": 1, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1320" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1750, - "description": "Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults", - "is_constructor": 1, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1320" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1756, - "description": "The total count of results", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1320" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1760, - "description": "Number of passed results", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1320" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1764, - "description": "Number of failed results", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1415" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1768, - "description": "Was this suite/spec skipped?", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1415" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1772, - "ignore": "", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1415" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1778, - "description": "Roll up the result counts.", - "params": [ - { - "name": "result", - "description": "" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1453" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1789, - "description": "Adds a log message.", - "params": [ - { - "name": "values", - "description": "Array of message parts which will be concatenated later." - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1453" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1797, - "description": "Getter for the results: message & results.", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1453" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1804, - "description": "Adds a result, tracking counts (total, passed, & failed)", - "params": [ - { - "name": "result", - "description": "", - "type": "jasmine.ExpectationResult|jasmine.NestedResults" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1453" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1824, - "return": { - "description": "True if everything below passed", - "type": "Boolean" - }, - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1453" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1830, - "description": "Base class for pretty printing for expectation results.", - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1887" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 1837, - "description": "Formats a value in a nice, human-readable string.", - "params": [ - { - "name": "value", - "description": "" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1910" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2052, - "description": "Runner", - "is_constructor": 1, - "params": [ - { - "name": "env", - "description": "", - "type": "jasmine.Env" - } - ], - "class": "window.jQuery" + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1933" + }, + { + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1939" + }, + { + "message": "unknown tag: attr", + "line": " ../comps/Valid/Valid.js:1945" + }, + { + "message": "unknown tag: ignore", + "line": " ../plugins/rate/spec/lib/jasmine.js:50" + }, + { + "message": "unknown tag: ignore", + "line": " ../plugins/rate/spec/lib/jasmine.js:122" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2129, - "description": "Internal representation of a Jasmine specification, or test.", - "is_constructor": 1, - "params": [ - { - "name": "env", - "description": "", - "type": "jasmine.Env" - }, - { - "name": "suite", - "description": "", - "type": "jasmine.Suite" - }, - { - "name": "description", - "description": "", - "type": "String" - } - ], - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:122" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2168, - "description": "All parameters are pretty-printed and concatenated together, then written to the spec's output.\n\nBe careful not to leave calls to jasmine.log in production code.", - "class": "window.jQuery" + "message": "unknown tag: ignore", + "line": " ../plugins/rate/spec/lib/jasmine.js:132" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2191, - "params": [ - { - "name": "result", - "description": "", - "type": "jasmine.ExpectationResult" - } - ], - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:132" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2204, - "description": "Waits a fixed time period before moving to the next block.", - "deprecated": true, - "deprecationMessage": "Use waitsFor() instead", - "params": [ - { - "name": "timeout", - "description": "milliseconds to wait", - "type": "Number" - } - ], - "class": "window.jQuery" + "message": "unknown tag: ignore", + "line": " ../plugins/rate/spec/lib/jasmine.js:142" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2216, - "description": "Waits for the latchFunction to return true before proceeding to the next block.", - "params": [ - { - "name": "latchFunction", - "description": "", - "type": "Function" - }, - { - "name": "optional_timeoutMessage", - "description": "", - "type": "String" - }, - { - "name": "optional_timeout", - "description": "", - "type": "Number" - } - ], - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:142" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2372, - "description": "Internal representation of a Jasmine suite.", - "is_constructor": 1, - "params": [ - { - "name": "env", - "description": "", - "type": "jasmine.Env" - }, - { - "name": "description", - "description": "", - "type": "String" - }, - { - "name": "specDefinitions", - "description": "", - "type": "Function" - }, - { - "name": "parentSuite", - "description": "", - "type": "jasmine.Suite" - } - ], - "class": "window.jQuery" + "message": "unknown tag: ignore", + "line": " ../plugins/rate/spec/lib/jasmine.js:152" }, { - "file": "../plugins/rate/spec/lib/jasmine.js", - "line": 2469, - "description": "A block which waits for some condition to become true, with timeout.", - "is_constructor": 1, - "extends": "jasmine.Block", - "params": [ - { - "name": "env", - "description": "The Jasmine environment.", - "type": "jasmine.Env" - }, - { - "name": "timeout", - "description": "The maximum time in milliseconds to wait for the condition to become true.", - "type": "Number" - }, - { - "name": "latchFunction", - "description": "A function which returns true when the desired condition has been met.", - "type": "Function" - }, - { - "name": "message", - "description": "The message to display if the desired condition hasn't been met within the given time period.", - "type": "String" - }, - { - "name": "spec", - "description": "The Jasmine spec.", - "type": "jasmine.Spec" - } - ], - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:152" }, { - "file": "../plugins/aes.js", - "line": 8, - "description": "AES Cipher function: encrypt 'input' state with Rijndael algorithm\n applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage", - "params": [ - { - "name": "input", - "description": "16-byte (128-bit) input state array", - "type": "Number[]" - }, - { - "name": "w", - "description": "Key schedule as 2D byte-array (Nr+1 x Nb bytes)", - "type": "Number[][]" - } - ], - "return": { - "description": "Encrypted output state array", - "type": "Number[]" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:163" }, { - "file": "../plugins/aes.js", - "line": 41, - "description": "Perform Key Expansion to generate a Key Schedule", - "params": [ - { - "name": "key", - "description": "Key as 16/24/32-byte array", - "type": "Number[]" - } - ], - "return": { - "description": "Expanded key schedule as 2D byte-array (Nr+1 x Nb bytes)", - "type": "Number[][]" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:175" }, { - "file": "../plugins/aes.js", - "line": 171, - "description": "Encrypt a text using AES encryption in Counter mode of operation\n\nUnicode multi-byte character safe", - "params": [ - { - "name": "plaintext", - "description": "Source text to be encrypted", - "type": "String" - }, - { - "name": "password", - "description": "The password to use to generate a key", - "type": "String" - }, - { - "name": "nBits", - "description": "Number of bits to be used in the key (128, 192, or 256)", - "type": "Number" - } - ], - "return": { - "description": "Encrypted text", - "type": "String" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:185" }, { - "file": "../plugins/aes.js", - "line": 248, - "description": "Decrypt a text encrypted by AES in counter mode of operation", - "params": [ - { - "name": "ciphertext", - "description": "Source text to be encrypted", - "type": "String" - }, - { - "name": "password", - "description": "The password to use to generate a key", - "type": "String" - }, - { - "name": "nBits", - "description": "Number of bits to be used in the key (128, 192, or 256)", - "type": "Number" - } - ], - "return": { - "description": "Decrypted text", - "type": "String" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:199" }, { - "file": "../plugins/aes.js", - "line": 323, - "description": "Encode string into Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]\n(instance method extending String object). As per RFC 4648, no newlines are added.", - "params": [ - { - "name": "str", - "description": "The string to be encoded as base-64", - "type": "String" - }, - { - "name": "utf8encode", - "description": "Flag to indicate whether str is Unicode string to be encoded \n to UTF8 before conversion to base64; otherwise string is assumed to be 8-bit characters", - "type": "Boolean", - "optional": true, - "optdefault": "false" - } - ], - "return": { - "description": "Base64-encoded string", - "type": "String" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:415" + }, + { + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:453" }, { - "file": "../plugins/aes.js", - "line": 366, - "description": "Decode string from Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]\n(instance method extending String object). As per RFC 4648, newlines are not catered for.", - "params": [ - { - "name": "str", - "description": "The string to be decoded from base-64", - "type": "String" - }, - { - "name": "utf8decode", - "description": "Flag to indicate whether str is Unicode string to be decoded \n from UTF8 after conversion from base64", - "type": "Boolean", - "optional": true, - "optdefault": "false" - } - ], - "return": { - "description": "decoded string", - "type": "String" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:738" }, { - "file": "../plugins/aes.js", - "line": 413, - "description": "Encode multi-byte Unicode string into utf-8 multiple single-byte characters \n(BMP / basic multilingual plane only)\n\nChars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars", - "params": [ - { - "name": "strUni", - "description": "Unicode string to be encoded as UTF-8", - "type": "String" - } - ], - "return": { - "description": "encoded string", - "type": "String" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:749" }, { - "file": "../plugins/aes.js", - "line": 440, - "description": "Decode utf-8 encoded string back into multi-byte Unicode characters", - "params": [ - { - "name": "strUtf", - "description": "UTF-8 string to be decoded back to Unicode", - "type": "String" - } - ], - "return": { - "description": "decoded string", - "type": "String" - }, - "class": "window.jQuery" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:766" }, { - "file": "../lib.js", - "line": 30, - "description": "如果 console 不可用, 则生成一个模拟的 console 对象", - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:773" }, { - "file": "../lib.js", - "line": 36, - "description": "声明主要命名空间, 方便迁移", - "class": ".window" + "message": "unknown tag: ignore", + "line": " ../plugins/rate/spec/lib/jasmine.js:1772" }, { - "file": "../lib.js", - "line": 43, - "description": "全局 css z-index 控制属性", - "itemtype": "property", - "name": "ZINDEX_COUNT", - "type": "int", - "default": "50001", - "static": 1, - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/rate/spec/lib/jasmine.js:1824" }, { - "file": "../lib.js", - "line": 51, - "description": "把函数的参数转为数组", - "itemtype": "method", - "name": "sliceArgs", - "params": [ - { - "name": "args", - "description": "", - "type": "Arguments" - } - ], - "return": { - "description": "Array" - }, - "static": 1, - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:8" }, { - "file": "../lib.js", - "line": 65, - "description": "按格式输出字符串", - "itemtype": "method", - "name": "printf", - "static": 1, - "params": [ - { - "name": "_str", - "description": "", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "example": [ - "\n printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );\n //return asdfasdf000sdfasdf1111" - ], - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:41" }, { - "file": "../lib.js", - "line": 81, - "description": "判断URL中是否有某个get参数", - "itemtype": "method", - "name": "hasUrlParam", - "static": 1, - "params": [ - { - "name": "_url", - "description": "", - "type": "String" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "bool" - }, - "example": [ - "\n var bool = hasUrlParam( 'getkey' );" - ], - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:171" }, { - "file": "../lib.js", - "line": 105, - "description": "添加URL参数\n
            require: delUrlParam", - "itemtype": "method", - "name": "addUrlParams", - "static": 1, - "params": [ - { - "name": "_url", - "description": "", - "type": "String" - }, - { - "name": "_params", - "description": "", - "type": "Object" - } - ], - "return": { - "description": "string" - }, - "example": [ - "\n var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );" - ], - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:248" }, { - "file": "../lib.js", - "line": 133, - "description": "取URL参数的值", - "itemtype": "method", - "name": "getUrlParam", - "static": 1, - "params": [ - { - "name": "_url", - "description": "", - "type": "String" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "example": [ - "\n var defaultTag = getUrlParam(location.href, 'tag'); " - ], - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:323" }, { - "file": "../lib.js", - "line": 162, - "description": "取URL参数的值, 这个方法返回数组\n
            与 getUrlParam 的区别是可以获取 checkbox 的所有值", - "itemtype": "method", - "name": "getUrlParams", - "static": 1, - "params": [ - { - "name": "_url", - "description": "", - "type": "String" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "Array" - }, - "example": [ - "\n var params = getUrlParams(location.href, 'tag'); " - ], - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:366" }, { - "file": "../lib.js", - "line": 191, - "description": "删除URL参数", - "itemtype": "method", - "name": "delUrlParam", - "static": 1, - "params": [ - { - "name": "_url", - "description": "", - "type": "String" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "example": [ - "\n var url = delUrlParam( location.href, 'tag' );" - ], - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:413" }, { - "file": "../lib.js", - "line": 221, - "description": "提示需要 HTTP 环境", - "itemtype": "method", - "name": "httpRequire", - "static": 1, - "params": [ - { - "name": "_msg", - "description": "要提示的文字, 默认 \"本示例需要HTTP环境'", - "type": "String" - } - ], - "return": { - "description": "bool 如果是HTTP环境返回true, 否则返回false" - }, - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../plugins/aes.js:440" }, { - "file": "../lib.js", - "line": 236, - "description": "删除 URL 的锚点\n
            require: addUrlParams", - "itemtype": "method", - "name": "removeUrlSharp", - "static": 1, - "params": [ - { - "name": "$url", - "description": "", - "type": "String" - }, - { - "name": "$nornd", - "description": "是否不添加随机参数", - "type": "Bool" - } - ], - "return": { - "description": "string" - }, - "class": ".window" + "message": "unknown tag: version", + "line": " ../plugins/json2.js:1" + }, + { + "message": "unknown tag: version", + "line": " ../plugins/raphael.js:1" }, { - "file": "../lib.js", - "line": 250, - "description": "重载页面\n
            require: removeUrlSharp\n
            require: addUrlParams", - "itemtype": "method", - "name": "reloadPage", - "static": 1, - "params": [ - { - "name": "$url", - "description": "", - "type": "String" - }, - { - "name": "$nornd", - "description": "", - "type": "Bool" - }, - { - "name": "$delayms", - "description": "", - "type": "Int" - } - ], - "class": ".window" + "message": "unknown tag: version", + "line": " ../plugins/swfobject.js:1" }, { - "file": "../lib.js", - "line": 270, - "description": "取小数点的N位\n
            JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题", - "itemtype": "method", - "name": "parseFinance", - "static": 1, - "params": [ - { - "name": "_i", - "description": "", - "type": "Number" - }, - { - "name": "_dot,", - "description": "default = 2", - "type": "Int" - } - ], - "return": { - "description": "number" - }, - "class": ".window" + "message": "unknown tag: date", + "line": " ../JC.js:26" }, { - "file": "../lib.js", - "line": 289, - "description": "js 附加字串函数", - "itemtype": "method", - "name": "padChar", - "static": 1, - "params": [ - { - "name": "_str", - "description": "", - "type": "String" - }, - { - "name": "_len", - "description": "", - "type": "Intl" - }, - { - "name": "_char", - "description": "", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "class": ".window" + "message": "unknown tag: date", + "line": " ../JC.js:362" }, { - "file": "../lib.js", - "line": 307, - "description": "格式化日期为 YYYY-mm-dd 格式\n
            require: pad\\_char\\_f", - "itemtype": "method", - "name": "formatISODate", - "static": 1, - "params": [ - { - "name": "_date", - "description": "要格式化日期的日期对象", - "type": "Date" - }, - { - "name": "_split", - "description": "定义年月日的分隔符, 默认为 '-'", - "type": "String|undefined" - } - ], - "return": { - "description": "string" - }, - "class": ".window" + "message": "unknown tag: version", + "line": " ../common.js:40" }, { - "file": "../lib.js", - "line": 321, - "description": "从 ISODate 字符串解析日期对象", - "itemtype": "method", - "name": "parseISODate", - "static": 1, - "params": [ - { - "name": "_datestr", - "description": "", - "type": "String" - } - ], - "return": { - "description": "date" - }, - "class": ".window" + "message": "unknown tag: version", + "line": " ../common.js:40" }, { - "file": "../lib.js", - "line": 339, - "description": "获取不带 时分秒的 日期对象", - "itemtype": "method", - "name": "pureDate", - "params": [ - { - "name": "_d", - "description": "可选参数, 如果为空 = new Date", - "type": "Date" - } - ], - "return": { - "description": "Date" - }, - "class": ".window" + "message": "unknown tag: version", + "line": " ../common.js:40" }, { - "file": "../lib.js", - "line": 351, - "description": "克隆日期对象", - "itemtype": "method", - "name": "cloneDate", - "static": 1, - "params": [ - { - "name": "_date", - "description": "需要克隆的日期", - "type": "Date" - } - ], - "return": { - "description": "需要克隆的日期对象", - "type": "Date" - }, - "class": ".window" + "message": "unknown tag: require", + "line": " ../common.js:1011" }, { - "file": "../lib.js", - "line": 359, - "description": "判断两个日期是否为同一天", - "itemtype": "method", - "name": "isSameDay", - "static": 1, - "params": [ - { - "name": "_d1", - "description": "需要判断的日期1", - "type": "Date" - }, - { - "name": "_d2", - "description": "需要判断的日期2", - "type": "Date" - } - ], - "return": { - "description": "", - "type": "Bool" - }, - "class": ".window" + "message": "unknown tag: require", + "line": " ../common.js:1037" }, { - "file": "../lib.js", - "line": 371, - "description": "判断两个日期是否为同一月份", - "itemtype": "method", - "name": "isSameMonth", - "static": 1, - "params": [ - { - "name": "_d1", - "description": "需要判断的日期1", - "type": "Date" - }, - { - "name": "_d2", - "description": "需要判断的日期2", - "type": "Date" - } - ], - "return": { - "description": "", - "type": "Bool" - }, - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../jquery.js:3847" }, { - "file": "../lib.js", - "line": 383, - "description": "取得一个月份中最大的一天", - "itemtype": "method", - "name": "maxDayOfMonth", - "static": 1, - "params": [ - { - "name": "_date", - "description": "", - "type": "Date" - } - ], - "return": { - "description": "月份中最大的一天", - "type": "Int" - }, - "class": ".window" + "message": "replacing incorrect tag: returns with return", + "line": " ../jquery.js:4014" }, { - "file": "../lib.js", - "line": 396, - "description": "取当前脚本标签的 src路径", - "itemtype": "method", - "name": "scriptPath", - "static": 1, - "return": { - "description": "脚本所在目录的完整路径", - "type": "String" - }, - "class": ".window" + "message": "Missing item type\n脚本模板 Panel", + "line": " ../bizs/ActionLogic/ActionLogic.js:256" }, { - "file": "../lib.js", - "line": 410, - "description": "缓动函数, 动画效果为按时间缓动 \n
            这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval", - "itemtype": "method", - "name": "easyEffect", - "static": 1, - "params": [ - { - "name": "_cb", - "description": "缓动运动时的回调", - "type": "Function" - }, - { - "name": "_maxVal", - "description": "缓动的最大值, default = 200", - "type": "Number" - }, - { - "name": "_startVal", - "description": "缓动的起始值, default = 0", - "type": "Number" - }, - { - "name": "_duration", - "description": "缓动的总时间, 单位毫秒, default = 200", - "type": "Number" - }, - { - "name": "_stepMs", - "description": "缓动的间隔, 单位毫秒, default = 2", - "type": "Number" - } - ], - "return": { - "description": "interval" - }, - "example": [ - "\n $(document).ready(function(){\n window.js_output = $('span.js_output');\n window.ls = [];\n window.EFF_INTERVAL = easyEffect( effectcallback, 100);\n });\n\n function effectcallback( _stepval, _done ){\n js_output.html( _stepval );\n ls.push( _stepval );\n\n !_done && js_output.html( _stepval );\n _done && js_output.html( _stepval + '
            ' + ls.join() );\n }" - ], - "class": ".window" + "message": "Missing item type\n显示 Panel", + "line": " ../bizs/ActionLogic/ActionLogic.js:262" + }, + { + "message": "Missing item type\najax Panel", + "line": " ../bizs/ActionLogic/ActionLogic.js:277" + }, + { + "message": "Missing item type\n跳转到 URL", + "line": " ../bizs/ActionLogic/ActionLogic.js:307" + }, + { + "message": "Missing item type\najax 执行操作", + "line": " ../bizs/ActionLogic/ActionLogic.js:316" + }, + { + "message": "Missing item type\n处理错误提示", + "line": " ../bizs/ActionLogic/ActionLogic.js:423" + }, + { + "message": "Missing item type\n处理二次确认", + "line": " ../bizs/ActionLogic/ActionLogic.js:455" }, { - "file": "../lib.js", - "line": 463, - "description": "把输入值转换为布尔值", - "itemtype": "method", - "name": "parseBool", - "params": [ - { - "name": "_input", - "description": "", - "type": "*" - } - ], - "return": { - "description": "bool" - }, - "static": 1, - "class": ".window" + "message": "Missing item type\n处理成功提示", + "line": " ../bizs/ActionLogic/ActionLogic.js:479" }, { - "file": "../lib.js", - "line": 482, - "description": "判断是否支持 CSS position: fixed", - "itemtype": "property", - "name": "$.support.isFixed", - "type": "bool", - "require": "jquery", - "static": 1, - "class": ".window" + "message": "Missing item type\nselectallchanged", + "line": " ../bizs/AutoSelectComplete/AutoSelectComplete.js:214" }, { - "file": "../lib.js", - "line": 511, - "description": "绑定或清除 mousewheel 事件", - "itemtype": "method", - "name": "mousewheelEvent", - "params": [ - { - "name": "_cb", - "description": "", - "type": "Function" - }, - { - "name": "_detach", - "description": "", - "type": "Bool" - } - ], - "static": 1, - "class": ".window" + "message": "Missing item type\nupdate current selector", + "line": " ../bizs/CommonModify/CommonModify.js:231" }, { - "file": "../lib.js", - "line": 533, - "description": "获取 selector 的指定父级标签", - "itemtype": "method", - "name": "getJqParent", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - }, - { - "name": "_filter", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "selector" - }, - "require": "jquery", - "static": 1, - "class": ".window" + "message": "Missing item type\n更新日历的类型day/week/season/year\n日历输入框,及隐藏域的值清空\n打开第一个日历输入框的日历面板", + "line": " ../bizs/DMultiDate/DMultiDate.js:101" }, { - "file": "../lib.js", - "line": 559, - "description": "扩展 jquery 选择器\n
            扩展起始字符的 '/' 符号为 jquery 父节点选择器\n
            扩展起始字符的 '|' 符号为 jquery 子节点选择器\n
            扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )", - "itemtype": "method", - "name": "parentSelector", - "params": [ - { - "name": "_item", - "description": "", - "type": "Selector" - }, - { - "name": "_selector", - "description": "", - "type": "String" - }, - { - "name": "_finder", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "selector" - }, - "require": "jquery", - "static": 1, - "class": ".window" + "message": "Missing item type\n默认 form 提交处理事件\n这个如果是 AJAX 的话, 无法上传 文件", + "line": " ../bizs/FormLogic/FormLogic.js:453" }, { - "file": "../lib.js", - "line": 627, - "description": "获取脚本模板的内容", - "itemtype": "method", - "name": "scriptContent", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "string" - }, - "static": 1, - "class": ".window" + "message": "Missing item type\n全局 AJAX 提交完成后的处理事件", + "line": " ../bizs/FormLogic/FormLogic.js:551" }, { - "file": "../lib.js", - "line": 642, - "description": "取函数名 ( 匿名函数返回空 )", - "itemtype": "method", - "name": "funcName", - "params": [ - { - "name": "_func", - "description": "", - "type": "Function" - } - ], - "return": { - "description": "string" - }, - "static": 1, - "class": ".window" + "message": "Missing item type\n这是个神奇的BUG\nchrome 如果没有 reset button, 触发 reset 会导致页面刷新", + "line": " ../bizs/FormLogic/FormLogic.js:560" }, { - "file": "../lib.js", - "line": 657, - "description": "动态添加内容时, 初始化可识别的组件\n
            \n
            目前会自动识别的组件,
            \n
            \n Bizs.CommonModify, JC.Panel, JC.Dialog\n
            自动识别的组件不用显式调用 jcAutoInitComps 去识别可识别的组件\n
            \n\n
            \n
            可识别的组件
            \n
            \n JC.AutoSelect, JC.Calendar, JC.AutoChecked, JC.AjaxUpload\n
            Bizs.DisableLogic, Bizs.FormLogic\n
            \n", - "itemtype": "method", - "name": "jcAutoInitComps", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "static": 1, - "class": ".window" + "message": "Missing item type\n表单内容验证通过后, 开始提交前的处理事件", + "line": " ../bizs/FormLogic/FormLogic.js:610" }, { - "file": "../lib.js", - "line": 681, - "description": "联动下拉框", - "class": ".window" + "message": "Missing item type\n这个回调的 this 指针是 window", + "line": " ../bizs/FormLogic/FormLogic.js:938" }, { - "file": "../lib.js", - "line": 685, - "description": "日历组件", - "class": ".window" + "message": "Missing item type\n展现树需要的数据", + "line": " ../comps/AjaxTree/AjaxTree.js:402" }, { - "file": "../lib.js", - "line": 689, - "description": "全选反选", - "class": ".window" + "message": "Missing item type\n树的随机ID前缀", + "line": " ../comps/AjaxTree/AjaxTree.js:407" }, { - "file": "../lib.js", - "line": 693, - "description": "Ajax 上传", - "class": ".window" + "message": "Missing item type\n树当前的高亮节点", + "line": " ../comps/AjaxTree/AjaxTree.js:412" }, { - "file": "../lib.js", - "line": 697, - "description": "Placeholder 占位符", - "class": ".window" + "message": "Missing item type\n保存树的所有绑定事件", + "line": " ../comps/AjaxTree/AjaxTree.js:417" }, { - "file": "../lib.js", - "line": 703, - "description": "disable / enable", - "class": ".window" + "message": "Missing item type\n获取树所要展示的容器", + "line": " ../comps/AjaxTree/AjaxTree.js:457" }, { - "file": "../lib.js", - "line": 707, - "description": "表单提交逻辑", - "class": ".window" + "message": "Missing item type\n获取节点将要显示的ID", + "line": " ../comps/AjaxTree/AjaxTree.js:462" }, { - "file": "../lib.js", - "line": 712, - "description": "URL 占位符识别功能", - "itemtype": "method", - "name": "urlDetect", - "params": [ - { - "name": "_url", - "description": "如果 起始字符为 URL, 那么 URL 将祝为本页的URL", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "static": 1, - "example": [ - "\n urlDetect( '?test' ); //output: ?test\n\n urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2\n urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2\n urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2" - ], - "class": ".window" + "message": "Missing item type\n获取树的随机ID前缀", + "line": " ../comps/AjaxTree/AjaxTree.js:468" }, { - "file": "../lib.js", - "line": 751, - "description": "日期占位符识别功能", - "itemtype": "method", - "name": "dateDetect", - "params": [ - { - "name": "_dateStr", - "description": "如果 起始字符为 NOW, 那么将视为当前日期", - "type": "String" - } - ], - "return": { - "description": "", - "type": "Date|null" - }, - "static": 1, - "example": [ - "\n dateDetect( 'now' ); //2014-10-02\n dateDetect( 'now,3d' ); //2013-10-05\n dateDetect( 'now,-3d' ); //2013-09-29\n dateDetect( 'now,2w' ); //2013-10-16\n dateDetect( 'now,-2m' ); //2013-08-02\n dateDetect( 'now,4y' ); //2017-10-02\n\n dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10" - ], - "class": ".window" + "message": "Missing item type\n获取树的原始数据", + "line": " ../comps/AjaxTree/AjaxTree.js:473" }, { - "file": "../lib.js", - "line": 809, - "description": "模块加载器自动识别函数\n
            目前可识别 requirejs\n
            计划支持的加载器 seajs", - "itemtype": "method", - "name": "loaderDetect", - "params": [ - { - "name": "_require", - "description": "", - "type": "Array of dependency|class" - }, - { - "name": "_class", - "description": "", - "type": "Class|callback" - }, - { - "name": "_cb", - "description": "", - "type": "Callback" - } - ], - "static": 1, - "example": [ - "\n loaderDetect( JC.AutoSelect );\n loaderDetect( [ 'JC.AutoSelect', 'JC.AutoChecked' ], JC.Form );" - ], - "class": ".window" + "message": "Missing item type\n获取树生成后的根节点", + "line": " ../comps/AjaxTree/AjaxTree.js:485" }, { - "file": "../lib.js", - "line": 835, - "description": "inject jquery val func, for hidden change event", - "class": ".window" + "message": "Missing item type\n获取ID的具体节点", + "line": " ../comps/AjaxTree/AjaxTree.js:490" }, { - "file": "../lib.js", - "line": 875, - "description": "JC组件库所在路径", - "itemtype": "property", - "name": "PATH", - "static": 1, - "type": "{string}", - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n判断原始数据的某个ID是否有子级节点", + "line": " ../comps/AjaxTree/AjaxTree.js:500" }, { - "file": "../lib.js", - "line": 885, - "description": "是否显示调试信息", - "itemtype": "property", - "name": "debug", - "static": 1, - "type": "{bool}", - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n获取或设置树的高亮节点\n
            注意: 这个只是数据层面的设置, 不会影响视觉效果", + "line": " ../comps/AjaxTree/AjaxTree.js:506" }, { - "file": "../lib.js", - "line": 892, - "description": "导入JC组件", - "itemtype": "method", - "name": "use", - "static": 1, - "params": [ - { - "name": "_names", - "description": "- 模块名\n 或者模块下面的某个js文件(test/test1.js, 路径前面不带\"/\"将视为test模块下的test1.js)\n 或者一个绝对路径的js文件, 路径前面带 \"/\"", - "type": "String" - }, - { - "name": "_basePath", - "description": "- 指定要导入资源所在的主目录, 这个主要应用于 nginx 路径输出", - "type": "String" - }, - { - "name": "_enableNginxStyle", - "description": "- 指定是否需要使用 nginx 路径输出脚本资源", - "type": "Bool" - } - ], - "example": [ - "\n JC.use( 'SomeClass' ); //导入类 SomeClass\n JC.use( 'SomeClass, AnotherClass' ); //导入类 SomeClass, AnotherClass\n //\n /// 导入类 SomeClass, SomeClass目录下的file1.js, \n /// AnotherClass, AnotherClass 下的file2.js\n //\n JC.use( 'SomeClass, comps/SomeClass/file1.js, comps/AnotherClass/file2.js' ); \n JC.use( 'SomeClass, plugins/swfobject.js., plugins/json2.js' ); \n JC.use( '/js/Test/Test1.js' ); //导入文件 /js/Test/Test1.js, 如果起始处为 \"/\", 将视为文件的绝对路径\n //\n /// 导入 URL 资源 // JC.use( 'http://test.com/file1.js', 'https://another.com/file2.js' ); \n //\n /// in libpath/_demo/\n //\n JC.use(\n [\n 'Panel' // ../comps/Panel/Panel.js\n , 'Tips' // ../comps/Tips/Tips.js\n , 'Valid' // ../comps/Valid/Valid.js\n , 'Bizs.KillISPCache' // ../bizs/KillISPCache/KillISPCache.js\n , 'bizs.TestBizFile' // ../bizs/TestBizFile.js\n , 'comps.TestCompFile' // ../comps/TestCompFile.js \n , 'Plugins.rate' // ../plugins/rate/rate.js\n , 'plugins.json2' // ../plugins/json2.js\n , '/js/fullpathtest.js' // /js/fullpathtest.js\n ].join()\n );" - ], - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n初始化树的可视状态", + "line": " ../comps/AjaxTree/AjaxTree.js:572" }, { - "file": "../lib.js", - "line": 999, - "description": "调用依赖的类\n
            这个方法的存在是因为有一些类调整了结构, 但是原有的引用因为向后兼容的需要, 暂时不能去掉", - "itemtype": "method", - "name": "_usePatch", - "params": [ - { - "name": "_items", - "description": "", - "type": "Array" - }, - { - "name": "_fromClass", - "description": "", - "type": "String" - }, - { - "name": "_patchClass", - "description": "", - "type": "String" - } - ], - "access": "private", - "tagname": "", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n处理树的展现效果", + "line": " ../comps/AjaxTree/AjaxTree.js:580" + }, + { + "message": "Missing item type\n初始化树根节点", + "line": " ../comps/AjaxTree/AjaxTree.js:601" }, { - "file": "../lib.js", - "line": 1021, - "description": "输出调试信息, 可通过 JC.debug 指定是否显示调试信息", - "params": [ - { - "name": "任意参数任意长度的字符串内容", - "description": "", - "type": "[string[,string]]" - } - ], - "itemtype": "method", - "name": "log", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n初始化树的文件夹节点", + "line": " ../comps/AjaxTree/AjaxTree.js:644" }, { - "file": "../lib.js", - "line": 1028, - "description": "定义输出路径的 v 参数, 以便控制缓存", - "itemtype": "property", - "name": "pathPostfix", - "type": "string", - "default": "empty", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n初始化树的文件节点", + "line": " ../comps/AjaxTree/AjaxTree.js:674" }, { - "file": "../lib.js", - "line": 1036, - "description": "是否启用nginx concat 模块的路径格式", - "itemtype": "property", - "name": "enableNginxStyle", - "type": "bool", - "default": "false", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n初始化树的节点标签", + "line": " ../comps/AjaxTree/AjaxTree.js:693" }, { - "file": "../lib.js", - "line": 1044, - "description": "定义 nginx style 的基础路径\n
            注意: 如果这个属性为空, 即使 enableNginxStyle = true, 也是直接输出默认路径", - "itemtype": "property", - "name": "nginxBasePath", - "type": "string", - "default": "empty", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n展开树的所有节点", + "line": " ../comps/AjaxTree/AjaxTree.js:711" }, { - "file": "../lib.js", - "line": 1053, - "description": "资源路径映射对象\n
            设置 JC.use 逗号(',') 分隔项的 对应URL路径", - "itemtype": "property", - "name": "FILE_MAP", - "type": "object", - "default": "null", - "static": 1, - "example": [ - "\n 以下例子假定 libpath = http://git.me.btbtd.org/ignore/JQueryComps_dev/\n \n\n output should be:\n http://git.me.btbtd.org/ignore/JQueryComps_dev/lib.js\n http://jc.openjavascript.org/comps/Panel/Panel.js\n http://jc.openjavascript.org/comps/Tips/Tips.js\n http://jc.openjavascript.org/comps/Valid/Valid.js\n http://jc.openjavascript.org/plugins/jquery.form.js" - ], - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n关闭树的所有节点", + "line": " ../comps/AjaxTree/AjaxTree.js:721" }, { - "file": "../lib.js", - "line": 1091, - "description": "输出 nginx concat 模块的脚本路径格式", - "itemtype": "method", - "name": "_writeNginxScript", - "params": [ - { - "name": "_paths", - "description": "", - "type": "Array" - } - ], - "access": "private", - "tagname": "", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n展开树到具体节点", + "line": " ../comps/AjaxTree/AjaxTree.js:732" }, { - "file": "../lib.js", - "line": 1119, - "description": "输出的脚本路径格式", - "itemtype": "method", - "name": "_writeNormalScript", - "params": [ - { - "name": "_paths", - "description": "", - "type": "Array" - } - ], - "access": "private", - "tagname": "", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n关闭树的具体节点", + "line": " ../comps/AjaxTree/AjaxTree.js:767" }, { - "file": "../lib.js", - "line": 1136, - "description": "保存 use 过的资源路径, 以便进行唯一性判断, 避免重复加载", - "itemtype": "property", - "name": "_USE_CACHE", - "type": "object", - "default": "{}", - "access": "private", - "tagname": "", - "static": 1, - "class": "window.JC", - "namespace": "window" + "message": "Missing item type\n更新树的具体节点", + "line": " ../comps/AjaxTree/AjaxTree.js:862" }, { - "file": "../lib.js", - "line": 1157, - "description": "自动识别组件库所在路径", - "class": "window.UXC", - "namespace": "window" + "message": "Missing item type\niframe 加载完毕后触发的事件, 执行初始化操作", + "line": " ../comps/AjaxUpload/AjaxUpload.js:262" }, { - "file": "../lib.js", - "line": 1217, - "description": "内部初始化方法", - "itemtype": "method", - "name": "_init", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "access": "private", - "tagname": "", - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n文件大小错误", + "line": " ../comps/AjaxUpload/AjaxUpload.js:284" }, { - "file": "../lib.js", - "line": 1246, - "description": "初始化之前调用的方法", - "itemtype": "method", - "name": "_beforeInit", - "access": "private", - "tagname": "", - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n文件扩展名错误", + "line": " ../comps/AjaxUpload/AjaxUpload.js:291" }, { - "file": "../lib.js", - "line": 1254, - "description": "内部事件初始化方法", - "itemtype": "method", - "name": "_initHanlderEvent", - "access": "private", - "tagname": "", - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n上传前触发的事件", + "line": " ../comps/AjaxUpload/AjaxUpload.js:298" }, { - "file": "../lib.js", - "line": 1262, - "description": "内部初始化完毕时, 调用的方法", - "itemtype": "method", - "name": "_inited", - "access": "private", - "tagname": "", - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n上传完毕触发的事件", + "line": " ../comps/AjaxUpload/AjaxUpload.js:311" }, { - "file": "../lib.js", - "line": 1270, - "description": "获取 显示 BaseMVC 的触发源选择器, 比如 a 标签", - "itemtype": "method", - "name": "selector", - "return": { - "description": "selector" - }, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\nframe 的按钮样式改变后触发的事件\n需要更新 frame 的宽高", + "line": " ../comps/AjaxUpload/AjaxUpload.js:351" }, { - "file": "../lib.js", - "line": 1276, - "description": "使用 jquery on 绑定事件", - "itemtype": "method", - "name": "on", - "type": "String", - "params": [ - { - "name": "_evtName", - "description": "", - "type": "String" - }, - { - "name": "_cb", - "description": "", - "type": "Function" - } - ], - "return": { - "description": "BaseMVCInstance" - }, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n恢复默认状态", + "line": " ../comps/AjaxUpload/AjaxUpload.js:612" }, { - "file": "../lib.js", - "line": 1284, - "description": "使用 jquery trigger 绑定事件", - "itemtype": "method", - "name": "trigger", - "type": "String", - "params": [ - { - "name": "_evtName", - "description": "", - "type": "String" - } - ], - "return": { - "description": "BaseMVCInstance" - }, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n点击列表时, 阻止冒泡", + "line": " ../comps/AutoComplete/AutoComplete.js:331" }, { - "file": "../lib.js", - "line": 1292, - "description": "获取或设置 BaseMVC 的实例", - "itemtype": "method", - "name": "getInstance", - "params": [ - { - "name": "_selector", - "description": "", - "type": "Selector" - } - ], - "static": 1, - "return": { - "description": "", - "type": "BaseMVCInstance" - }, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n响应 li 点击时, 更新对应的内容", + "line": " ../comps/AutoComplete/AutoComplete.js:417" }, { - "file": "../lib.js", - "line": 1310, - "description": "是否自动初始化", - "itemtype": "property", - "name": "autoInit", - "type": "bool", - "default": "true", - "static": 1, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n验证 key && id 是否正确\n仅在 cacStrictData 为真的时候进行验证", + "line": " ../comps/AutoComplete/AutoComplete.js:774" }, { - "file": "../lib.js", - "line": 1318, - "description": "复制 BaseMVC 的所有方法到 _outClass", - "itemtype": "method", - "name": "build", - "params": [ - { - "name": "_outClass", - "description": "", - "type": "Class" - } - ], - "static": 1, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n判断下拉框的option里是否有给定的值", + "line": " ../comps/AutoSelect/AutoSelect.js:892" }, { - "file": "../lib.js", - "line": 1333, - "description": "复制 _inClass 的所有方法到 _outClass", - "itemtype": "method", - "name": "buildClass", - "params": [ - { - "name": "_inClass", - "description": "", - "type": "Class" - }, - { - "name": "_outClass", - "description": "", - "type": "Class" - }, - { - "name": "_namespace", - "description": "default='JC', 如果是业务组件, 请显式指明为 'Bizs'", - "type": "String" - } - ], - "static": 1, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n页面加载完毕时, 延时进行自动化, 延时可以避免来自其他逻辑的干扰", + "line": " ../comps/AutoSelect/AutoSelect.js:1002" }, { - "file": "../lib.js", - "line": 1373, - "description": "为 _outClass 生成一个通用 Model 类", - "itemtype": "method", - "name": "buildModel", - "params": [ - { - "name": "_outClass", - "description": "", - "type": "Class" - } - ], - "static": 1, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n初始化 BaseMVC Model 类 和 View 类", + "line": " ../comps/BaseMVC/BaseMVC.js:244" + }, + { + "message": "Missing item type\n使用 jquery on 为 controler 绑定事件", + "line": " ../comps/BaseMVC/BaseMVC.js:621" + }, + { + "message": "Missing item type\n使用 jquery trigger 触发 controler 绑定事件", + "line": " ../comps/BaseMVC/BaseMVC.js:629" + }, + { + "message": "Missing item type\n保存所有类型的 Calendar 日期实例 \n
            目前有 date, week, month, season 四种类型的实例\n
            每种类型都是单例模式", + "line": " ../comps/Calendar/Calendar.date.js:525" + }, + { + "message": "Missing item type\n请使用 isCalendar, 这个方法是为了向后兼容", + "line": " ../comps/Calendar/Calendar.date.js:597" }, { - "file": "../lib.js", - "line": 1386, - "description": "为 _outClass 生成一个通用 View 类", - "itemtype": "method", - "name": "buildView", - "params": [ - { - "name": "_outClass", - "description": "", - "type": "Class" - } - ], - "static": 1, - "class": "JC.BaseMVC", - "namespace": "JC" + "message": "Missing item type\n这个方法后续版本不再使用, 请使用 Calendar.position", + "line": " ../comps/Calendar/Calendar.date.js:778" }, { - "file": "../lib.js", - "line": 1411, - "description": "设置 selector 实例引用的 data 属性名", - "itemtype": "property", - "name": "_instanceName", - "type": "string", - "default": "BaseMVCIns", - "access": "private", - "tagname": "", - "static": 1, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n延迟200毫秒初始化页面的所有日历控件\n之所以要延迟是可以让用户自己设置是否需要自动初始化", + "line": " ../comps/Calendar/Calendar.date.js:2035" }, { - "file": "../lib.js", - "line": 1425, - "description": "初始化的 jq 选择器", - "itemtype": "method", - "name": "selector", - "params": [ - { - "name": "_setter", - "description": "", - "type": "Selector" - } - ], - "return": { - "description": "selector" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n�����ж���Ϊ���������� JC 0.1\nʹ�� requirejs ����Ŀ�����Ƴ������жϴ���", + "line": " ../comps/Calendar/Calendar.js:5" }, { - "file": "../lib.js", - "line": 1436, - "description": "读取 int 属性的值", - "itemtype": "method", - "name": "intProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "int" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n如果 atd 为空, 那么是 全选按钮触发的事件", + "line": " ../comps/Calendar/Calendar.monthday.js:215" }, { - "file": "../lib.js", - "line": 1457, - "description": "读取 float 属性的值", - "itemtype": "method", - "name": "floatProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "float" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n显示的月份面板为2到12个", + "line": " ../comps/DCalendar/DCalendar.date.js:584" }, { - "file": "../lib.js", - "line": 1478, - "description": "读取 string 属性的值", - "itemtype": "method", - "name": "stringProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\nDCalendar显示时的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1107" }, { - "file": "../lib.js", - "line": 1496, - "description": "读取 html 属性值\n
            这个跟 stringProp 的区别是不会强制转换为小写", - "itemtype": "method", - "name": "attrProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "string" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\nDCalendar隐藏时的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1118" }, { - "file": "../lib.js", - "line": 1519, - "description": "读取 boolean 属性的值", - "itemtype": "method", - "name": "boolProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String|bool" - }, - { - "name": "_defalut", - "description": "", - "type": "Bool" - } - ], - "return": { - "description": "", - "type": "Bool|undefined" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n清除选中的日期后的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1129" }, { - "file": "../lib.js", - "line": 1545, - "description": "读取 callback 属性的值", - "itemtype": "method", - "name": "callbackProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "", - "type": "Function|undefined" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n选择日期赋值后的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1140" }, { - "file": "../lib.js", - "line": 1568, - "description": "获取 selector 属性的 jquery 选择器", - "itemtype": "method", - "name": "selectorProp", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "bool" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" + "message": "Missing item type\n更改月份之前的回调,月历面板显示后", + "line": " ../comps/DCalendar/DCalendar.date.js:1151" }, { - "file": "../lib.js", - "line": 1591, - "description": "判断 _selector 是否具体某种特征", - "itemtype": "method", - "name": "is", - "params": [ - { - "name": "_selector", - "description": "如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()", - "type": "Selector|string" - }, - { - "name": "_key", - "description": "", - "type": "String" - } - ], - "return": { - "description": "bool" - }, - "class": "JC.BaseMVC.Model", - "namespace": "JC" - } - ], - "warnings": [ + "message": "Missing item type\n更改月份后的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1162" + }, { - "message": "unknown tag: version", - "line": " ../bizs/ActionLogic/ActionLogic.js:1" + "message": "Missing item type\n更改年份之前的回调,年份面板显示后", + "line": " ../comps/DCalendar/DCalendar.date.js:1173" }, { - "message": "unknown tag: version", - "line": " ../bizs/CommonModify/CommonModify.js:1" + "message": "Missing item type\n更改年份后的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1184" }, { - "message": "unknown tag: version", - "line": " ../bizs/DisableLogic/DisableLogic.js:1" + "message": "Missing item type\n点击下一月的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1195" }, { - "message": "unknown tag: version", - "line": " ../bizs/FormLogic/FormLogic.js:3" + "message": "Missing item type\n点击上一月的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1206" }, { - "message": "unknown tag: version", - "line": " ../bizs/KillISPCache/KillISPCache.js:2" + "message": "Missing item type\n点击下一年的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1217" }, { - "message": "unknown tag: version", - "line": " ../bizs/MultiDate/MultiDate.js:3" + "message": "Missing item type\n点击上一年的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1228" }, { - "message": "unknown tag: version", - "line": " ../comps/AjaxUpload/AjaxUpload.js:3" + "message": "Missing item type\n点击下一页年份的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1239" }, { - "message": "unknown tag: date", - "line": " ../comps/AjaxUpload/AjaxUpload.js:3" + "message": "Missing item type\n点击上一页年份的回调", + "line": " ../comps/DCalendar/DCalendar.date.js:1250" }, { - "message": "unknown tag: version", - "line": " ../comps/AutoChecked/AutoChecked.js:2" + "message": "Missing item type\n�����ж���Ϊ���������� JC 0.1\nʹ�� requirejs ����Ŀ�����Ƴ������жϴ���", + "line": " ../comps/DCalendar/DCalendar.js:4" }, { - "message": "unknown tag: version", - "line": " ../comps/AutoSelect/AutoSelect.js:3" + "message": "Missing item type\n判断两个矩形是否有交集", + "line": " ../comps/Drag/Drag.js:989" }, { - "message": "unknown tag: date", - "line": " ../comps/AutoSelect/AutoSelect.js:3" + "message": "Missing item type\n把坐标和宽高生成一个 rectangle 数据", + "line": " ../comps/Drag/Drag.js:1000" }, { - "message": "unknown tag: version", - "line": " ../comps/Calendar/Calendar.js:3" + "message": "Missing item type\n把 rectangle 数据 转换为 坐标数据", + "line": " ../comps/Drag/Drag.js:1012" }, { - "message": "unknown tag: version", - "line": " ../comps/Calendar/Calendar.js:3" + "message": "Missing item type\n计算两个坐标点之间的距离", + "line": " ../comps/Drag/Drag.js:1022" }, { - "message": "unknown tag: prototype", - "line": " ../comps/Calendar/Calendar.js:421" + "message": "Missing item type\n判断两个矩形是否有交集", + "line": " ../comps/DragSelect/DragSelect.js:555" }, { - "message": "unknown tag: version", - "line": " ../comps/Fixed/Fixed.js:6" + "message": "Missing item type\n返回选择器的 矩形 位置", + "line": " ../comps/DragSelect/DragSelect.js:592" }, { - "message": "unknown tag: date", - "line": " ../comps/Fixed/Fixed.js:6" + "message": "Missing item type", + "line": " ../comps/FChart/FChart.js:205" }, { - "message": "unknown tag: version", - "line": " ../comps/Form/Form.js:2" + "message": "Missing item type\n解析图表默认数据", + "line": " ../comps/FChart/FChart.js:337" }, { - "message": "unknown tag: date", - "line": " ../comps/Form/Form.js:2" + "message": "Missing item type\n保存图表数据", + "line": " ../comps/FChart/FChart.js:359" }, { - "message": "unknown tag: version", - "line": " ../comps/Form/Form.js:56" + "message": "Missing item type\n图表宽度", + "line": " ../comps/FChart/FChart.js:370" }, { - "message": "unknown tag: date", - "line": " ../comps/Form/Form.js:56" + "message": "Missing item type\n图表高度", + "line": " ../comps/FChart/FChart.js:381" }, { - "message": "unknown tag: version", - "line": " ../comps/Form/Form.js:203" + "message": "Missing item type\n图表宽度", + "line": " ../comps/FChart/FChart.js:392" }, { - "message": "unknown tag: date", - "line": " ../comps/Form/Form.js:203" + "message": "Missing item type\n设置或保存图表的宽高", + "line": " ../comps/FChart/FChart.js:403" }, { - "message": "unknown tag: version", - "line": " ../comps/LunarCalendar/LunarCalendar.js:6" + "message": "Missing item type\n图表画布", + "line": " ../comps/FChart/FChart.js:411" }, { - "message": "unknown tag: date", - "line": " ../comps/LunarCalendar/LunarCalendar.js:6" + "message": "Missing item type\n画布圆角弧度", + "line": " ../comps/FChart/FChart.js:417" }, { - "message": "unknown tag: version", - "line": " ../comps/Panel/Panel.js:4" + "message": "Missing item type\n清除图表数据", + "line": " ../comps/FChart/FChart.js:421" }, { - "message": "unknown tag: date", - "line": " ../comps/Panel/Panel.js:4" + "message": "Missing item type\n清除图表状态", + "line": " ../comps/FChart/FChart.js:438" + }, + { + "message": "Missing item type\n渲染图表外观", + "line": " ../comps/FChart/FChart.js:519" + }, + { + "message": "Missing item type\n图表高度", + "line": " ../comps/FChart/FChart.js:559" }, { - "message": "unknown tag: prototype", - "line": " ../comps/Panel/Panel.js:842" + "message": "Missing item type\n图表高度", + "line": " ../comps/FChart/FChart.js:563" }, { - "message": "unknown tag: attr", - "line": " ../comps/Panel/Panel.js:1163" + "message": "Missing item type\n图表画布", + "line": " ../comps/FChart/FChart.js:567" }, { - "message": "unknown tag: attr", - "line": " ../comps/Panel/Panel.js:1163" + "message": "Missing item type\n初始化的选择器", + "line": " ../comps/FChart/FChart.js:571" }, { - "message": "unknown tag: attr", - "line": " ../comps/Panel/Panel.js:1163" + "message": "Missing item type\n清除图表数据", + "line": " ../comps/FChart/FChart.js:578" }, { - "message": "unknown tag: attr", - "line": " ../comps/Panel/Panel.js:1163" + "message": "Missing item type\n清除图表状态", + "line": " ../comps/FChart/FChart.js:588" }, { - "message": "unknown tag: attr", - "line": " ../comps/Panel/Panel.js:1163" + "message": "Missing item type\n更新图表数据", + "line": " ../comps/FChart/FChart.js:594" }, { - "message": "unknown tag: version", - "line": " ../comps/Placeholder/Placeholder.js:1" + "message": "Missing item type\n支持 多对多 关系( 目前只支持 一对多 和 多对一 )", + "line": " ../comps/FlowChart/FlowChart.js:1" }, { - "message": "unknown tag: date", - "line": " ../comps/Placeholder/Placeholder.js:1" + "message": "Missing item type\n这里的逻辑认为 起始节点 和 结束节点都只有一个", + "line": " ../comps/FlowChart/FlowChart.js:796" }, { - "message": "unknown tag: version", - "line": " ../comps/Slider/Slider.js:3" + "message": "Missing item type\n按比例缩放图片\n
            返回: { width: int, height: int }", + "line": " ../comps/ImageCutter/ImageCutter.js:1744" }, { - "message": "unknown tag: date", - "line": " ../comps/Slider/Slider.js:3" + "message": "Missing item type\n计算两个坐标点之间的距离", + "line": " ../comps/ImageCutter/ImageCutter.js:1768" }, { - "message": "unknown tag: version", - "line": " ../comps/Suggest/Suggest.js:3" + "message": "Missing item type\n从长度和角度求坐标点", + "line": " ../comps/ImageCutter/ImageCutter.js:1778" }, { - "message": "unknown tag: date", - "line": " ../comps/Suggest/Suggest.js:3" + "message": "Missing item type\n监听上一年按钮", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:999" }, { - "message": "unknown tag: version", - "line": " ../comps/Tab/Tab.js:3" + "message": "Missing item type\n监听上一月按钮", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1008" }, { - "message": "unknown tag: date", - "line": " ../comps/Tab/Tab.js:3" + "message": "Missing item type\n监听下一月按钮", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1017" }, { - "message": "unknown tag: version", - "line": " ../comps/Tips/Tips.js:3" + "message": "Missing item type\n监听下一年按钮", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1026" }, { - "message": "unknown tag: date", - "line": " ../comps/Tips/Tips.js:3" + "message": "Missing item type\n监听年份按钮, 是否要显示年份列表", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1035" }, { - "message": "unknown tag: version", - "line": " ../comps/Tree/Tree.js:3" + "message": "Missing item type\n监听月份按钮, 是否要显示月份列表", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1057" }, { - "message": "unknown tag: date", - "line": " ../comps/Tree/Tree.js:3" + "message": "Missing item type\n监听年份列表选择状态", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1072" }, { - "message": "unknown tag: version", - "line": " ../comps/Valid/Valid.js:4" + "message": "Missing item type\n监听月份列表选择状态", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1084" }, { - "message": "unknown tag: version", - "line": " ../comps/Valid/Valid.js:4" + "message": "Missing item type\n监听日期单元格点击事件", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1096" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:911" + "message": "Missing item type\n监听body点击事件, 点击时隐藏日历控件的年份和月份列表", + "line": " ../comps/LunarCalendar/LunarCalendar.default.js:1127" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:911" + "message": "Missing item type\n这个判断是为了向后兼容 JC 0.1\n使用 requirejs 的项目可以移除这段判断代码", + "line": " ../comps/LunarCalendar/LunarCalendar.js:8" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:911" + "message": "Missing item type\n显示表格内容", + "line": " ../comps/Paginator/Paginator.js:327" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:964" + "message": "Missing item type\n响应窗口改变大小和滚动", + "line": " ../comps/Panel/Dialog.js:264" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:964" + "message": "Missing item type\n初始化Panel 默认事件", + "line": " ../comps/Panel/Panel.default.js:267" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:964" + "message": "Missing item type\nclickClose 的别名\n
            这个方法的存在是为了向后兼容, 请使用 clickClose", + "line": " ../comps/Panel/Panel.default.js:425" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1036" + "message": "Missing item type\n默认模板", + "line": " ../comps/Panel/Panel.default.js:888" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1036" + "message": "Missing item type\nPanel 的默认模板", + "line": " ../comps/Panel/Panel.default.js:1164" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1036" + "message": "Missing item type\n返回选择器的 矩形 位置", + "line": " ../comps/Panel/Panel.default.js:1312" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1036" + "message": "Missing item type\n从 HTML 属性 自动执行 popup", + "line": " ../comps/Panel/Panel.default.js:1349" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1036" + "message": "Missing item type\n隐藏关闭按钮", + "line": " ../comps/Panel/Panel.default.js:1391" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1110" + "message": "Missing item type\n这个判断是为了向后兼容 JC 0.1\n使用 requirejs 的项目可以移除这段判断代码", + "line": " ../comps/Panel/Panel.js:3" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1110" + "message": "Missing item type\n响应窗口改变大小", + "line": " ../comps/Panel/Panel.popup.js:570" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1110" + "message": "Missing item type\n设置 控件 光标位置\nx@btbtd.org 2012-3-1", + "line": " ../comps/Placeholder/Placeholder.js:301" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1145" + "message": "Missing item type\ninject jquery show, hide func, for Placeholder change event", + "line": " ../comps/Placeholder/Placeholder.js:338" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1145" + "message": "Missing item type\n设置 left top 之后, 获取高度不准确", + "line": " ../comps/PopTips/PopTips.js:569" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1145" + "message": "Missing item type\nPopTips显示前的回调", + "line": " ../comps/PopTips/PopTips.js:707" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1145" + "message": "Missing item type\nPopTips隐藏后的回调", + "line": " ../comps/PopTips/PopTips.js:718" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1145" + "message": "Missing item type\n初始化数据模型", + "line": " ../comps/Slider/Slider.js:135" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1539" + "message": "Missing item type\n初始化视图模型( 根据不同的滚动方向, 初始化不同的视图类 )", + "line": " ../comps/Slider/Slider.js:139" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1565" + "message": "Missing item type\n页面加载后, 自动初始化符合 Slider 规则的 Slider", + "line": " ../comps/Slider/Slider.js:968" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1591" + "message": "Missing item type\nsuggest_so({ \"p\" : true,\n \"q\" : \"shinee\",\n \"s\" : [ \"shinee 综艺\",\n \"shinee美好的一天\",\n \"shinee hello baby\",\n \"shinee吧\",\n \"shinee泰民\",\n \"shinee fx\",\n \"shinee快乐大本营\",\n \"shinee钟铉车祸\",\n \"shinee年下男的约会\",\n \"shinee dream girl\"\n ]\n });", + "line": " ../comps/Suggest/Suggest.js:213" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1600" + "message": "Missing item type\nTab 视图类的实例", + "line": " ../comps/Tab/Tab.js:169" }, { - "message": "unknown tag: attr", - "line": " ../comps/Valid/Valid.js:1609" + "message": "Missing item type\n判断一个容器是否 符合 Tab 数据要求", + "line": " ../comps/Tab/Tab.js:262" }, { - "message": "unknown tag: ignore", - "line": " ../plugins/rate/spec/lib/jasmine.js:50" + "message": "Missing item type\nTab 数据模型类", + "line": " ../comps/Tab/Tab.js:369" }, { - "message": "unknown tag: ignore", - "line": " ../plugins/rate/spec/lib/jasmine.js:122" + "message": "Missing item type\nTab 的主容器", + "line": " ../comps/Tab/Tab.js:376" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:122" + "message": "Missing item type\nTab 初始完毕后要触发的label, 可选", + "line": " ../comps/Tab/Tab.js:382" }, { - "message": "unknown tag: ignore", - "line": " ../plugins/rate/spec/lib/jasmine.js:132" + "message": "Missing item type\nTab 的标签列表选择器", + "line": " ../comps/Tab/Tab.js:388" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:132" + "message": "Missing item type\nTab 的内容列表选择器", + "line": " ../comps/Tab/Tab.js:394" }, { - "message": "unknown tag: ignore", - "line": " ../plugins/rate/spec/lib/jasmine.js:142" + "message": "Missing item type\n当前标签的所在索引位置", + "line": " ../comps/Tab/Tab.js:400" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:142" + "message": "Missing item type\nTab Model 内部初始化方法", + "line": " ../comps/Tab/Tab.js:452" }, { - "message": "unknown tag: ignore", - "line": " ../plugins/rate/spec/lib/jasmine.js:152" + "message": "Missing item type\n判断是否从 selector 下查找内容", + "line": " ../comps/Tab/Tab.js:482" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:152" + "message": "Missing item type\n获取 Tab 所有 label 或 特定索引的 label", + "line": " ../comps/Tab/Tab.js:489" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:163" + "message": "Missing item type\n获取 Tab 所有内容container 或 特定索引的 container", + "line": " ../comps/Tab/Tab.js:498" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:175" + "message": "Missing item type\n获取初始化要触发的 label", + "line": " ../comps/Tab/Tab.js:507" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:185" + "message": "Missing item type\n获取 Tab 活动状态的 class", + "line": " ../comps/Tab/Tab.js:512" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:199" + "message": "Missing item type\n判断 label 是否符合要求, 或者设置一个 label为符合要求", + "line": " ../comps/Tab/Tab.js:523" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:415" + "message": "Missing item type\n判断 container 是否符合要求, 或者设置一个 container为符合要求", + "line": " ../comps/Tab/Tab.js:535" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:453" + "message": "Missing item type\n获取或设置 label 的索引位置", + "line": " ../comps/Tab/Tab.js:548" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:738" + "message": "Missing item type\n获取Tab label 触发事件后的回调", + "line": " ../comps/Tab/Tab.js:561" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:749" + "message": "Missing item type\n获取 Tab label 变更后的回调", + "line": " ../comps/Tab/Tab.js:571" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:766" + "message": "Missing item type\n获取 Tab label 活动状态显示样式的标签", + "line": " ../comps/Tab/Tab.js:581" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:773" + "message": "Missing item type\n获取 ajax label 的 URL", + "line": " ../comps/Tab/Tab.js:594" }, { - "message": "unknown tag: ignore", - "line": " ../plugins/rate/spec/lib/jasmine.js:1772" + "message": "Missing item type\n获取 iframe label 的 URL", + "line": " ../comps/Tab/Tab.js:600" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/rate/spec/lib/jasmine.js:1824" + "message": "Missing item type\n获取 ajax label 的请求方法 get/post", + "line": " ../comps/Tab/Tab.js:606" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:8" + "message": "Missing item type\n获取 ajax label 的请求数据", + "line": " ../comps/Tab/Tab.js:612" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:41" + "message": "Missing item type\n获取 ajax label 请求URL后的回调", + "line": " ../comps/Tab/Tab.js:625" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:171" + "message": "Missing item type\nTab 视图类初始化方法", + "line": " ../comps/Tab/Tab.js:639" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:248" + "message": "Missing item type\n设置特定索引位置的 label 为活动状态", + "line": " ../comps/Tab/Tab.js:660" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:323" + "message": "Missing item type\n请求特定索引位置的 ajax tab 数据", + "line": " ../comps/Tab/Tab.js:684" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:366" + "message": "Missing item type\n请求特定索引位置的 ajax tab 数据", + "line": " ../comps/Tab/Tab.js:705" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:413" + "message": "Missing item type\n自动化初始 Tab 实例\n如果 Tab.autoInit = true, 鼠标移至 Tab 后会自动初始化 Tab", + "line": " ../comps/Tab/Tab.js:723" }, { - "message": "replacing incorrect tag: returns with return", - "line": " ../plugins/aes.js:440" + "message": "Missing item type\n为了解决ie6下表格的宽度超出父容器的宽度,父容器的宽度会跟随表格的宽度", + "line": " ../comps/TableFreeze/TableFreeze.js:258" }, { - "message": "unknown tag: require", - "line": " ../lib.js:482" + "message": "Missing item type\n冻结类型:prev, both, last; 默认为prev", + "line": " ../comps/TableFreeze/TableFreeze.js:341" }, { - "message": "unknown tag: require", - "line": " ../lib.js:533" + "message": "Missing item type\n冻结列数:num,num 默认为1", + "line": " ../comps/TableFreeze/TableFreeze.js:352" }, { - "message": "unknown tag: require", - "line": " ../lib.js:559" + "message": "Missing item type\n滚动区域的宽度默认120%", + "line": " ../comps/TableFreeze/TableFreeze.js:384" }, { - "message": "unknown tag: date", - "line": " ../lib.js:859" + "message": "Missing item type\ntr 是否需要hover效果,默认为true", + "line": " ../comps/TableFreeze/TableFreeze.js:395" }, { - "message": "unknown tag: date", - "line": " ../lib.js:1146" + "message": "Missing item type\ntr的隔行换色", + "line": " ../comps/TableFreeze/TableFreeze.js:414" }, { - "message": "unknown tag: version", - "line": " ../lib.js:1190" + "message": "Missing item type\nTableFreeze调用前的回调", + "line": " ../comps/TableFreeze/TableFreeze.js:718" }, { - "message": "unknown tag: version", - "line": " ../lib.js:1396" + "message": "Missing item type\nTableFreeze调用后的回调", + "line": " ../comps/TableFreeze/TableFreeze.js:729" }, { - "message": "Missing item type\n脚本模板 Panel", - "line": " ../bizs/ActionLogic/ActionLogic.js:195" + "message": "Missing item type\n页面加载完毕后, 是否自动初始化 Tips", + "line": " ../comps/Tips/Tips.js:598" }, { - "message": "Missing item type\n显示 Panel", - "line": " ../bizs/ActionLogic/ActionLogic.js:201" + "message": "Missing item type\n树的视图模型类", + "line": " ../comps/Tree/Tree.js:392" }, { - "message": "Missing item type\najax Panel", - "line": " ../bizs/ActionLogic/ActionLogic.js:213" + "message": "Missing item type\n捕获树文件标签的点击事件", + "line": " ../comps/Tree/Tree.js:649" }, { - "message": "Missing item type\n跳转到 URL", - "line": " ../bizs/ActionLogic/ActionLogic.js:243" + "message": "Missing item type\n捕获树文件夹图标的点击事件", + "line": " ../comps/Tree/Tree.js:675" }, { - "message": "Missing item type\najax 执行操作", - "line": " ../bizs/ActionLogic/ActionLogic.js:252" + "message": "Missing item type\n兼容函数式使用", + "line": " ../comps/Valid/Valid.js:361" }, { - "message": "Missing item type\n处理错误提示", - "line": " ../bizs/ActionLogic/ActionLogic.js:286" + "message": "Missing item type\n提供对各种显示状态 setTimeout 执行的正确性 控制逻辑", + "line": " ../comps/Valid/Valid.js:650" }, { - "message": "Missing item type\n处理二次确认", - "line": " ../bizs/ActionLogic/ActionLogic.js:318" + "message": "Missing item type\n获取 _item 的检查类型", + "line": " ../comps/Valid/Valid.js:935" }, { - "message": "Missing item type\n处理成功提示", - "line": " ../bizs/ActionLogic/ActionLogic.js:338" + "message": "Missing item type\n获取 _item 的检查子类型, 所有可用的检查子类型位于 _logic.subdatatype 对象", + "line": " ../comps/Valid/Valid.js:950" }, { - "message": "Missing item type\nupdate current selector", - "line": " ../bizs/CommonModify/CommonModify.js:229" + "message": "Missing item type\n检查内容的长度", + "line": " ../comps/Valid/Valid.js:1123" }, { - "message": "Missing item type\n默认 form 提交处理事件\n这个如果是 AJAX 的话, 无法上传 文件", - "line": " ../bizs/FormLogic/FormLogic.js:352" + "message": "Missing item type\n根据特殊的 datatype 实现不同的计算方法", + "line": " ../comps/Valid/Valid.js:1148" }, { - "message": "Missing item type\n全局 AJAX 提交完成后的处理事件", - "line": " ../bizs/FormLogic/FormLogic.js:413" + "message": "Missing item type\n检查是否为正确的数字
            \n
            默认范围 0 - Math.pow(10, 10)", + "line": " ../comps/Valid/Valid.js:1174" }, { - "message": "Missing item type\n这是个神奇的BUG\nchrome 如果没有 reset button, 触发 reset 会导致页面刷新", - "line": " ../bizs/FormLogic/FormLogic.js:417" + "message": "Missing item type\n检查是否为正确的整数或者浮点数
            \n
            默认范围 0 - Math.pow(10, 10)", + "line": " ../comps/Valid/Valid.js:1246" }, { - "message": "Missing item type\n表单内容验证通过后, 开始提交前的处理事件", - "line": " ../bizs/FormLogic/FormLogic.js:461" + "message": "Missing item type\n检查两个输入框的数值\n
            数字格式为 0-pow(10,10)\n
            带小数点使用 nrange-int.float, 例: nrange-1.2 nrange-2.2\n
            注意: 如果不显示指定 fromNEl, toNEl, \n 将会从父级查找 datatype=nrange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略", + "line": " ../comps/Valid/Valid.js:1320" }, { - "message": "Missing item type\niframe 加载完毕后触发的事件, 执行初始化操作", - "line": " ../comps/AjaxUpload/AjaxUpload.js:228" + "message": "Missing item type\n检查是否为合法的日期,\n
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD", + "line": " ../comps/Valid/Valid.js:1415" }, { - "message": "Missing item type\n文件扩展名错误", - "line": " ../comps/AjaxUpload/AjaxUpload.js:262" + "message": "Missing item type\n检查两个输入框的日期\n
            日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD\n
            注意: 如果不显示指定 fromDateEl, toDateEl, \n 将会从父级查找 datatype=daterange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略", + "line": " ../comps/Valid/Valid.js:1453" }, { - "message": "Missing item type\n上传前触发的事件", - "line": " ../comps/AjaxUpload/AjaxUpload.js:269" + "message": "Missing item type\n检查时间格式, 格式为 hh:mm:ss", + "line": " ../comps/Valid/Valid.js:1538" }, { - "message": "Missing item type\n上传完毕触发的事件", - "line": " ../comps/AjaxUpload/AjaxUpload.js:275" + "message": "Missing item type\n检查时间格式, 格式为 hh:mm", + "line": " ../comps/Valid/Valid.js:1552" }, { - "message": "Missing item type\nframe 的按钮样式改变后触发的事件\n需要更新 frame 的宽高", - "line": " ../comps/AjaxUpload/AjaxUpload.js:312" + "message": "Missing item type\n检查银行卡号码\n
            格式为: d{15}, d{16}, d{17}, d{19}", + "line": " ../comps/Valid/Valid.js:1566" }, { - "message": "Missing item type\n恢复默认状态", - "line": " ../comps/AjaxUpload/AjaxUpload.js:451" + "message": "Missing item type\n检查中文姓名\n
            格式: 汉字和大小写字母\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "line": " ../comps/Valid/Valid.js:1589" }, { - "message": "Missing item type\n判断下拉框的option里是否有给定的值", - "line": " ../comps/AutoSelect/AutoSelect.js:852" + "message": "Missing item type\n检查英文\n
            格式: 大小写字母 + 空格\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "line": " ../comps/Valid/Valid.js:1607" }, { - "message": "Missing item type\n页面加载完毕时, 延时进行自动化, 延时可以避免来自其他逻辑的干扰", - "line": " ../comps/AutoSelect/AutoSelect.js:949" + "message": "Missing item type\n检查 英文名称/中文名称\n
            allname = cnname + enname\n
            规则: 长度 2-32个字节, 非 ASCII 算2个字节", + "line": " ../comps/Valid/Valid.js:1625" }, { - "message": "Missing item type\n保存所有类型的 Calendar 日期实例 \n
            目前有 date, week, month, season 四种类型的实例\n
            每种类型都是单例模式", - "line": " ../comps/Calendar/Calendar.js:421" + "message": "Missing item type\n检查注册用户名\n
            格式: a-zA-Z0-9_-\n
            规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30", + "line": " ../comps/Valid/Valid.js:1645" }, { - "message": "Missing item type\n请使用 isCalendar, 这个方法是为了向后兼容", - "line": " ../comps/Calendar/Calendar.js:492" + "message": "Missing item type\n检查身份证号码
            \n目前只使用最简单的位数判断~ 有待完善", + "line": " ../comps/Valid/Valid.js:1662" }, { - "message": "Missing item type\n这个方法后续版本不再使用, 请使用 Calendar.position", - "line": " ../comps/Calendar/Calendar.js:673" + "message": "Missing item type\n检查QQ号码( 5 ~ 11位数字 )", + "line": " ../comps/Valid/Valid.js:1678" }, { - "message": "Missing item type\n延迟200毫秒初始化页面的所有日历控件\n之所以要延迟是可以让用户自己设置是否需要自动初始化", - "line": " ../comps/Calendar/Calendar.js:1534" + "message": "Missing item type\n检查QQ号码( 数字号码|电子邮件 )\n
            5 ~ 11位数字", + "line": " ../comps/Valid/Valid.js:1695" }, { - "message": "Missing item type\n元旦开始的第一个星期一开始的一周为政治经济上的第一周", - "line": " ../comps/Calendar/Calendar.js:1821" + "message": "Missing item type\n检查手机号码
            ", + "line": " ../comps/Valid/Valid.js:1713" }, { - "message": "Missing item type\n如果 atd 为空, 那么是 全选按钮触发的事件", - "line": " ../comps/Calendar/Calendar.js:2290" + "message": "Missing item type\n检查手机号码\n
            这个方法是 mobilecode 的别名", + "line": " ../comps/Valid/Valid.js:1730" }, { - "message": "Missing item type\n监听上一年按钮", - "line": " ../comps/LunarCalendar/LunarCalendar.js:805" + "message": "Missing item type\n检查手机号码加强方法\n
            格式: [+国家代码] [零]11位数字", + "line": " ../comps/Valid/Valid.js:1740" }, { - "message": "Missing item type\n监听上一月按钮", - "line": " ../comps/LunarCalendar/LunarCalendar.js:814" + "message": "Missing item type\n检查电话号码\n
            格式: 7/8位数字", + "line": " ../comps/Valid/Valid.js:1758" }, { - "message": "Missing item type\n监听下一月按钮", - "line": " ../comps/LunarCalendar/LunarCalendar.js:823" + "message": "Missing item type\n检查电话号码\n
            格式: [区号]7/8位电话号码", + "line": " ../comps/Valid/Valid.js:1774" }, { - "message": "Missing item type\n监听下一年按钮", - "line": " ../comps/LunarCalendar/LunarCalendar.js:832" + "message": "Missing item type\n检查电话号码\n
            格式: [+国家代码][ ][电话区号][ ]7/8位电话号码[#分机号]", + "line": " ../comps/Valid/Valid.js:1792" }, { - "message": "Missing item type\n监听年份按钮, 是否要显示年份列表", - "line": " ../comps/LunarCalendar/LunarCalendar.js:841" + "message": "Missing item type\n检查电话区号", + "line": " ../comps/Valid/Valid.js:1811" }, { - "message": "Missing item type\n监听月份按钮, 是否要显示月份列表", - "line": " ../comps/LunarCalendar/LunarCalendar.js:863" + "message": "Missing item type\n检查电话分机号码", + "line": " ../comps/Valid/Valid.js:1831" }, { - "message": "Missing item type\n监听年份列表选择状态", - "line": " ../comps/LunarCalendar/LunarCalendar.js:877" + "message": "Missing item type\n检查手机号码/电话号码\n
            这个方法是原有方法的混合验证 mobilecode + phone", + "line": " ../comps/Valid/Valid.js:1846" }, { - "message": "Missing item type\n监听月份列表选择状态", - "line": " ../comps/LunarCalendar/LunarCalendar.js:887" + "message": "Missing item type\n检查手机号码/电话号码, 泛匹配\n
            这个方法是原有方法的混合验证 mobilezonecode + phoneall", + "line": " ../comps/Valid/Valid.js:1867" }, { - "message": "Missing item type\n监听日期单元格点击事件", - "line": " ../comps/LunarCalendar/LunarCalendar.js:897" + "message": "Missing item type\n自定义正则校验", + "line": " ../comps/Valid/Valid.js:1887" }, { - "message": "Missing item type\n监听body点击事件, 点击时隐藏日历控件的年份和月份列表", - "line": " ../comps/LunarCalendar/LunarCalendar.js:919" + "message": "Missing item type\n检查验证码
            \n格式: 为 0-9a-zA-Z, 长度 默认为4", + "line": " ../comps/Valid/Valid.js:1910" }, { - "message": "Missing item type\n初始化Panel 默认事件", - "line": " ../comps/Panel/Panel.js:245" + "message": "Missing item type\n检查文本长度", + "line": " ../comps/Valid/Valid.js:1933" }, { - "message": "Missing item type\nclickClose 的别名\n
            这个方法的存在是为了向后兼容, 请使用 clickClose", - "line": " ../comps/Panel/Panel.js:402" + "message": "Missing item type\n检查文本的字节长度", + "line": " ../comps/Valid/Valid.js:1939" }, { - "message": "Missing item type\n默认模板", - "line": " ../comps/Panel/Panel.js:842" + "message": "Missing item type\n检查富文本的字节\n
            TODO: 完成富文本长度检查", + "line": " ../comps/Valid/Valid.js:1945" }, { - "message": "Missing item type\nPanel 的默认模板", - "line": " ../comps/Panel/Panel.js:1052" + "message": "Missing item type\n计算字符串的字节长度, 非 ASCII 0-255的字符视为两个字节", + "line": " ../comps/Valid/Valid.js:1952" }, { - "message": "Missing item type\n从 HTML 属性 自动执行 popup", - "line": " ../comps/Panel/Panel.js:1163" + "message": "Missing item type\n检查URL", + "line": " ../comps/Valid/Valid.js:1960" }, { - "message": "Missing item type\n隐藏关闭按钮", - "line": " ../comps/Panel/Panel.js:1205" + "message": "Missing item type\n检查域名", + "line": " ../comps/Valid/Valid.js:1978" }, { - "message": "Missing item type\n响应窗口改变大小", - "line": " ../comps/Panel/Panel.js:1855" + "message": "Missing item type\n检查域名", + "line": " ../comps/Valid/Valid.js:1993" }, { - "message": "Missing item type\n响应窗口改变大小和滚动", - "line": " ../comps/Panel/Panel.js:2318" + "message": "Missing item type\n检查电子邮件", + "line": " ../comps/Valid/Valid.js:2007" }, { - "message": "Missing item type\n设置 控件 光标位置\nx@btbtd.org 2012-3-1", - "line": " ../comps/Placeholder/Placeholder.js:299" + "message": "Missing item type\n检查地区代码", + "line": " ../comps/Valid/Valid.js:2021" }, { - "message": "Missing item type\n初始化数据模型", - "line": " ../comps/Slider/Slider.js:131" + "message": "Missing item type\n检查邮政编码", + "line": " ../comps/Valid/Valid.js:2035" }, { - "message": "Missing item type\n初始化视图模型( 根据不同的滚动方向, 初始化不同的视图类 )", - "line": " ../comps/Slider/Slider.js:135" + "message": "Missing item type\n纳税人识别号, 15, 18, 20位字符", + "line": " ../comps/Valid/Valid.js:2049" }, { - "message": "Missing item type\n页面加载后, 自动初始化符合 Slider 规则的 Slider", - "line": " ../comps/Slider/Slider.js:964" + "message": "Missing item type\n此类型检查 2|N 个对象填写的值必须一致\n常用于注意时密码验证/重置密码", + "line": " ../comps/Valid/Valid.js:2067" }, { - "message": "Missing item type\nsuggest_so({ \"p\" : true,\n \"q\" : \"shinee\",\n \"s\" : [ \"shinee 综艺\",\n \"shinee美好的一天\",\n \"shinee hello baby\",\n \"shinee吧\",\n \"shinee泰民\",\n \"shinee fx\",\n \"shinee快乐大本营\",\n \"shinee钟铉车祸\",\n \"shinee年下男的约会\",\n \"shinee dream girl\"\n ]\n });", - "line": " ../comps/Suggest/Suggest.js:122" + "message": "Missing item type\n此类型检查 2|N个对象必须至少有一个是有输入内容的, \n
            常用于 手机/电话 二填一", + "line": " ../comps/Valid/Valid.js:2155" }, { - "message": "Missing item type\nTab 视图类的实例", - "line": " ../comps/Tab/Tab.js:158" + "message": "Missing item type\n如果 _item 的值非空, 那么 reqtarget 的值也不能为空", + "line": " ../comps/Valid/Valid.js:2302" }, { - "message": "Missing item type\n判断是否从 layout 下查找内容", - "line": " ../comps/Tab/Tab.js:380" + "message": "Missing item type\n数值必须为偶数", + "line": " ../comps/Valid/Valid.js:2324" }, { - "message": "Missing item type\n自动化初始 Tab 实例\n如果 Tab.autoInit = true, 鼠标移至 Tab 后会自动初始化 Tab", - "line": " ../comps/Tab/Tab.js:647" + "message": "Missing item type\n数值必须为奇数", + "line": " ../comps/Valid/Valid.js:2347" }, { - "message": "Missing item type\n页面加载完毕后, 是否自动初始化 Tips", - "line": " ../comps/Tips/Tips.js:595" + "message": "Missing item type\nN 个值必须保持唯一性, 不能有重复", + "line": " ../comps/Valid/Valid.js:2386" }, { - "message": "Missing item type\n树的视图模型类", - "line": " ../comps/Tree/Tree.js:376" + "message": "Missing item type\n获取 _selector 对象\n
            这个方法的存在是为了向后兼容qwrap, qwrap DOM参数都为ID", + "line": " ../comps/Valid/Valid.js:2562" }, { - "message": "Missing item type\n捕获树文件标签的点击事件", - "line": " ../comps/Tree/Tree.js:622" + "message": "Missing item type\n获取对应的错误信息, 默认的错误信息有 reqmsg, errmsg,
            \n注意: 错误信息第一个字符如果为空格的话, 将完全使用用户定义的错误信息, 将不会动态添加 请上传/选择/填写", + "line": " ../comps/Valid/Valid.js:2582" }, { - "message": "Missing item type\n捕获树文件夹图标的点击事件", - "line": " ../comps/Tree/Tree.js:650" + "message": "Missing item type\n检查内容是否为空,\n
            如果声明了该属性, 那么 value 须不为空", + "line": " ../comps/Valid/Valid.js:2614" }, { - "message": "Missing item type\n兼容函数式使用", - "line": " ../comps/Valid/Valid.js:280" + "message": "Missing item type\n这里需要优化检查, 目前会重复检查(2次)", + "line": " ../comps/Valid/Valid.js:2698" }, { - "message": "Missing item type\n根据特殊的 datatype 实现不同的计算方法", - "line": " ../comps/Valid/Valid.js:938" + "message": "Missing item type\n验证文件扩展名", + "line": " ../comps/Valid/Valid.js:2823" }, { - "message": "Missing item type\n这里需要优化检查, 目前会重复检查", - "line": " ../comps/Valid/Valid.js:2308" + "message": "Missing item type\n显示正确的视觉效果", + "line": " ../comps/Valid/Valid.js:2943" }, { - "message": "Missing item type\n验证文件扩展名", - "line": " ../comps/Valid/Valid.js:2398" + "message": "Missing item type\n显示错误的视觉效果", + "line": " ../comps/Valid/Valid.js:2998" }, { "message": "Missing item type\n响应表单子对象的 blur事件, 触发事件时, 检查并显示错误或正确的视觉效果", - "line": " ../comps/Valid/Valid.js:2625" + "line": " ../comps/Valid/Valid.js:3076" + }, + { + "message": "Missing item type\n响应没有 type 的 文本框", + "line": " ../comps/Valid/Valid.js:3086" }, { "message": "Missing item type\n响应表单子对象的 change 事件, 触发事件时, 检查并显示错误或正确的视觉效果", - "line": " ../comps/Valid/Valid.js:2633" + "line": " ../comps/Valid/Valid.js:3104" }, { "message": "Missing item type\n响应表单子对象的 focus 事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息", - "line": " ../comps/Valid/Valid.js:2640" + "line": " ../comps/Valid/Valid.js:3114" }, { "message": "Missing item type\n响应表单子对象的 blur事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息", - "line": " ../comps/Valid/Valid.js:2650" + "line": " ../comps/Valid/Valid.js:3125" }, { - "message": "Missing item type\n初始化 subdatatype = datavalid 相关事件", - "line": " ../comps/Valid/Valid.js:2675" + "message": "Missing item type\n初始化 [ subdatatype = datavalid | exdatatype = datavalid ] 相关事件", + "line": " ../comps/Valid/Valid.js:3153" }, { "message": "Missing item type\nTop level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.", @@ -14955,6 +21928,10 @@ "message": "Missing item type\nA block which waits for some condition to become true, with timeout.", "line": " ../plugins/rate/spec/lib/jasmine.js:2469" }, + { + "message": "Missing item type\nSWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com\n\nmmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/\n\nSWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:\nhttp://www.opensource.org/licenses/mit-license.php\n\nSWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:\nhttp://www.opensource.org/licenses/mit-license.php\n\nSWFObject v2.2 \n\tis released under the MIT License ", + "line": " ../plugins/SWFUpload.js:1" + }, { "message": "Missing item type\nAES Cipher function: encrypt 'input' state with Rijndael algorithm\n applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage", "line": " ../plugins/aes.js:8" @@ -14988,48 +21965,128 @@ "line": " ../plugins/aes.js:440" }, { - "message": "Missing item type\n如果 console 不可用, 则生成一个模拟的 console 对象", - "line": " ../lib.js:30" + "message": "Missing item type\nUXC 是 JC 的别名\n
            存在这个变量是为了向后兼容\n
            20130804 之前的命名空间是 UXC, 这个命名空间在一段时间后将会清除, 请使用 JC 命名空间\n

            see: JC

            ", + "line": " ../JC.js:362" + }, + { + "message": "Missing item type\n自动识别组件库所在路径", + "line": " ../JC.js:370" + }, + { + "message": "Missing item type\n如果 console 不可用, 生成一个模拟的 console 对象", + "line": " ../common.js:4" }, { "message": "Missing item type\n声明主要命名空间, 方便迁移", - "line": " ../lib.js:36" + "line": " ../common.js:16" + }, + { + "message": "Missing item type\n判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数", + "line": " ../common.js:122" + }, + { + "message": "Missing item type\njquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法", + "line": " ../common.js:145" + }, + { + "message": "Missing item type\n兼容 低版本 ie Array 的 indexOf 方法", + "line": " ../common.js:149" + }, + { + "message": "Missing item type\n元旦开始的第一个星期一开始的一周为政治经济上的第一周", + "line": " ../common.js:772" + }, + { + "message": "Missing item type\njcAutoInitComps 不久后将被清除\n请使用 JC.f.autoInit 和 JC.f.addAutoInit", + "line": " ../common.js:1171" }, { "message": "Missing item type\n联动下拉框", - "line": " ../lib.js:681" + "line": " ../common.js:1179" }, { "message": "Missing item type\n日历组件", - "line": " ../lib.js:685" + "line": " ../common.js:1183" + }, + { + "message": "Missing item type\n双日历组件", + "line": " ../common.js:1187" }, { "message": "Missing item type\n全选反选", - "line": " ../lib.js:689" + "line": " ../common.js:1191" }, { "message": "Missing item type\nAjax 上传", - "line": " ../lib.js:693" + "line": " ../common.js:1195" + }, + { + "message": "Missing item type\n占位符", + "line": " ../common.js:1199" + }, + { + "message": "Missing item type\n表格冻结", + "line": " ../common.js:1203" + }, + { + "message": "Missing item type\n拖曳", + "line": " ../common.js:1207" }, { - "message": "Missing item type\nPlaceholder 占位符", - "line": " ../lib.js:697" + "message": "Missing item type\n图片裁切", + "line": " ../common.js:1211" }, { "message": "Missing item type\ndisable / enable", - "line": " ../lib.js:703" + "line": " ../common.js:1219" }, { "message": "Missing item type\n表单提交逻辑", - "line": " ../lib.js:707" + "line": " ../common.js:1223" + }, + { + "message": "Missing item type\n格式化金额", + "line": " ../common.js:1227" + }, + { + "message": "Missing item type\n自动完成", + "line": " ../common.js:1231" + }, + { + "message": "Missing item type\n排期日期展示", + "line": " ../common.js:1238" }, { "message": "Missing item type\ninject jquery val func, for hidden change event", - "line": " ../lib.js:835" + "line": " ../common.js:1354" }, { - "message": "Missing item type\n自动识别组件库所在路径", - "line": " ../lib.js:1157" + "message": "Missing item type\nFor feature detection", + "line": " ../jquery.js:3839" + }, + { + "message": "Missing item type\nCreate key-value caches of limited size", + "line": " ../jquery.js:3847" + }, + { + "message": "Missing item type\nMark a function for special use by Sizzle", + "line": " ../jquery.js:3867" + }, + { + "message": "Missing item type\nSupport testing using an element", + "line": " ../jquery.js:3876" + }, + { + "message": "Missing item type\nDetect xml", + "line": " ../jquery.js:4003" + }, + { + "message": "Missing item type\nSets document-related variables once based on the current document", + "line": " ../jquery.js:4014" + }, + { + "message": "Missing item type\nUtility function for retrieving the text value of an array of DOM nodes", + "line": " ../jquery.js:4507" } ] } \ No newline at end of file diff --git a/docs_api/files/.._JC.js.html b/docs_api/files/.._JC.js.html new file mode 100644 index 000000000..656f08763 --- /dev/null +++ b/docs_api/files/.._JC.js.html @@ -0,0 +1,656 @@ + + + + + ../JC.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../JC.js

            + +
            +
            +//TODO: use 方法 nginx 模式添加 url 最大长度判断
            +//TODO: use add custom type
            +//TODO: 支持解析带 JC. 命名空间
            +/**
            + * <h2>业务逻辑命名空间</h2>
            + * <br />这个命名空间的组件主要为满足业务需求, 不是通用组件~
            + * <br />但在某个项目中应该是常用组件~
            + * <dl>
            + *      <dt>业务组件的存放位置:</dt>
            + *      <dd>libpath/bizs/</dd>
            + *
            + *      <dt>使用业务组件</dt>
            + *      <dd> JC.use( 'Bizs.BizComps' ); //  libpath/bizs/BizComps/BizComps.js </dd>
            + *
            + *      <dt>使用业务文件</dt>
            + *      <dd> JC.use( 'bizs.BizFile' ); //   libpath/bizs/BizFile.js </dd>
            + * </dl>
            + * @namespace 
            + * @class       Bizs
            + * @static
            + */
            +window.Bizs = window.Bizs || {};
            +;(function( $ ){
            +    if( window.JC && typeof JC.compsDir != 'undefined' ) return;
            +    window.JC && JC.f && JC.f.backward( 1 ); //这里启用 JC.common 的向后兼容, 为 window 注入全局静态函数变量
            +    /**
            +     * JC jquery 组件库 资源调用控制类
            +     * <br />这是一个单例模式, 全局访问使用 JC 或 window.JC
            +     * <p><b>require</b>: 
            +     *      <a href='.jQuery.html'>jQuery</a>
            +     *      , <a href='JC.common.html'>JC.common</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.html' target='_blank'>API docs</a>
            +     * | <a href='../../_demo' target='_blank'>demo link</a></p>
            +     * @namespace 
            +     * @class JC
            +     * @static
            +     * @example 
            +     *      JC.use( 组件名[,组件名] );
            +     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            +     * @date    2013-08-04
            +     */
            +    window.JC = window.JC || {};
            +    var CLASS = {
            +        /**
            +         * JC组件库所在路径
            +         * @property    PATH
            +         * @static
            +         * @type {string}
            +         */
            +        PATH: '/js'
            +        , compsDir: '/comps/'
            +        , bizsDir: '/bizs/'
            +        , pluginsDir: '/plugins/'
            +        /**
            +         * 是否显示调试信息
            +         * @property    debug
            +         * @static
            +         * @type {bool}
            +         */
            +        , debug: false
            +       /**
            +        * 导入JC组件
            +        * @method   use
            +        * @static
            +        * @param    {string}    _items -            模块名
            +        *                                           或者模块下面的某个js文件(test/test1.js, 路径前面不带"/"将视为test模块下的test1.js)
            +        *                                           或者一个绝对路径的js文件, 路径前面带 "/"
            +        * @param    {callback}  _readyCb            
            +        *
            +        *
            +        * @example
            +                JC.use( 'SomeClass' );                              //导入类 SomeClass
            +                JC.use( 'SomeClass, AnotherClass' );                //导入类 SomeClass, AnotherClass
            +                //
            +                ///  导入类 SomeClass, SomeClass目录下的file1.js, 
            +                ///  AnotherClass, AnotherClass 下的file2.js
            +                //
            +                JC.use( 'SomeClass, comps/SomeClass/file1.js, comps/AnotherClass/file2.js' );   
            +                JC.use( 'SomeClass, plugins/swfobject.js., plugins/json2.js' );   
            +                JC.use( '/js/Test/Test1.js' );     //导入文件  /js/Test/Test1.js, 如果起始处为 "/", 将视为文件的绝对路径
            +                //
            +                /// 导入 URL 资源 // JC.use( 'http://test.com/file1.js', 'https://another.com/file2.js' ); 
            +                //
            +                /// in libpath/_demo/
            +                //
            +                JC.use(
            +                    [
            +                        'Panel'                     //  ../comps/Panel/Panel.js
            +                        , 'Tips'                    //  ../comps/Tips/Tips.js
            +                        , 'Valid'                   //  ../comps/Valid/Valid.js
            +                        , 'Bizs.KillISPCache'       //  ../bizs/KillISPCache/KillISPCache.js
            +                        , 'bizs.TestBizFile'        //  ../bizs/TestBizFile.js
            +                        , 'comps.TestCompFile'      //  ../comps/TestCompFile.js 
            +                        , 'Plugins.rate'            //  ../plugins/rate/rate.js
            +                        , 'plugins.json2'           //  ../plugins/json2.js
            +                        , '/js/fullpathtest.js'     //  /js/fullpathtest.js
            +                    ].join()
            +                );
            +        */ 
            +        , use: function( _items, _readyCb ){
            +                if( ! _items ) return;
            +                _readyCb && $( document ).ready( function( _evt ){ _readyCb( _evt ); } );
            +                var _p = this
            +                    , _paths = []
            +                    , _parts = $.trim( _items ).split(/[\s]*?,[\s]*/)
            +                    , _urlRe = /\:\/\//
            +                    , _pathRplRe = /(\\)\1|(\/)\2/g
            +                    , _compRe = /[\/\\]/
            +                    , _compFileRe = /^comps\./
            +                    , _bizCompRe = /^Bizs\./
            +                    , _bizFileRe = /^bizs\./
            +                    , _pluginCompRe = /^Plugins\./
            +                    , _pluginFileRe = /^plugins\./
            +                    ;
            +
            +                _parts = JC._usePatch( _parts, 'Form', 'AutoSelect' );
            +                _parts = JC._usePatch( _parts, 'Form', 'AutoChecked' );
            +                _parts = JC._usePatch( _parts, 'Form', 'FormFillUrl' );
            +
            +                /*
            +                _parts = JC._usePatch( _parts, 'AjaxUpload', 'plugins.SWFUpload' );
            +                */
            +                _parts = JC._usePatch( _parts, 'AjaxUpload', 'Panel' );
            +
            +                $.each( _parts, function( _ix, _part ){
            +                    var _isComps = !_compRe.test( _part )
            +                        , _path
            +                        , _isFullpath = /^\//.test( _part )
            +                        ;
            +
            +                    if( _isComps && window.JC[ _part ] ) return;
            +
            +                    if( JC.FILE_MAP && JC.FILE_MAP[ _part ] ){
            +                        _paths.push( JC.FILE_MAP[ _part ] );
            +                        return;
            +                    }
            +
            +                    _path = _part;
            +                    if( _isComps ){
            +                        if( _bizCompRe.test( _path ) ){//业务组件
            +                            _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.bizsDir, _part.replace( _bizCompRe, '' ) );
            +                        }else if( _bizFileRe.test( _path ) ){//业务文件
            +                            _path = printf( '{0}{1}{2}.js', JC.PATH, JC.bizsDir, _part.replace( _bizFileRe, '' ) );
            +                        }else if( _pluginCompRe.test( _path ) ){//插件组件
            +                            _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.pluginsDir, _part.replace( _pluginCompRe, '' ) );
            +                        }else if( _pluginFileRe.test( _path ) ){//插件文件
            +                            _path = printf( '{0}{1}{2}.js', JC.PATH, JC.pluginsDir, _part.replace( _pluginFileRe, '' ) );
            +                        }else if( _compFileRe.test( _path ) ){//组件文件
            +                            _path = printf( '{0}{1}{2}.js', JC.PATH, JC.compsDir, _part.replace( _compFileRe, '' ) );
            +                        }else{//组件
            +                            _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.compsDir, _part.replace( /^JC\./, '' ) );
            +                        }
            +                    }
            +                    !_isComps && !_isFullpath && ( _path = printf( '{0}/{1}', JC.PATH, _part ) );
            +
            +                    if( /\:\/\//.test( _path ) ){
            +                        _path = _path.split('://');
            +                        _path[1] = $.trim( _path[1].replace( _pathRplRe, '$1$2' ) );
            +                        _path = _path.join('://');
            +                    }else{
            +                        _path = $.trim( _path.replace( _pathRplRe, '$1$2' ) );
            +                    }
            +
            +                    if( JC._USE_CACHE[ _path ] ) return;
            +                        JC._USE_CACHE[ _path ] = 1;
            +                    _paths.push( _path );
            +                });
            +
            +                //JC.log( _paths );
            +
            +                !JC.enableNginxStyle && JC._writeNormalScript( _paths );
            +                JC.enableNginxStyle && JC._writeNginxScript( _paths );
            +            }
            +        /**
            +         * 调用依赖的类
            +         * <br />这个方法的存在是因为有一些类调整了结构, 但是原有的引用因为向后兼容的需要, 暂时不能去掉
            +         * @method  _usePatch
            +         * @param   {array}     _items
            +         * @param   {string}    _fromClass
            +         * @param   {string}    _patchClass
            +         * @private
            +         * @static
            +         */
            +        , _usePatch:
            +            function( _items, _fromClass, _patchClass ){
            +                var i, j, k, l, _find;
            +                for( i = 0, j = _items.length; i < j; i++ ){
            +                    if( ( $.trim( _items[i].toString() ).replace( /^JC\./, '' ) == _fromClass ) ){
            +                        _find = true;
            +                        break;
            +                    }
            +                }
            +                _find && !JC[ _patchClass ] && _items.unshift( _patchClass );
            +                return _items;
            +            }
            +       /**
            +        * 输出调试信息, 可通过 JC.debug 指定是否显示调试信息
            +        * @param    {[string[,string]]}  任意参数任意长度的字符串内容
            +        * @method log
            +        * @static
            +        */
            +       //, log: function(){ JC.debug && window.console && console.log( sliceArgs( arguments ).join(' ') ); }
            +       //已在 JC.common 声明
            +       /**
            +        * 定义输出路径的 v 参数, 以便控制缓存
            +        * @property     pathPostfix
            +        * @type     string
            +        * @default  empty
            +        * @static
            +        */
            +       , pathPostfix: ''
            +       /**
            +        * 是否启用nginx concat 模块的路径格式  
            +        * @property     enableNginxStyle
            +        * @type bool
            +        * @default  false
            +        * @static
            +        */
            +       , enableNginxStyle: false
            +       /**
            +        * 定义 nginx 合并文件时, URL 的最大长度
            +        * @property     nginxUrlLen
            +        * @type int
            +        * @default  200
            +        * @static
            +        */
            +       , nginxUrlLen: 280
            +       /**
            +        * 定义 nginx style 的基础路径
            +        * <br /><b>注意:</b> 如果这个属性为空, 即使 enableNginxStyle = true, 也是直接输出默认路径 
            +        * @property     nginxBasePath
            +        * @type string
            +        * @default  empty
            +        * @static
            +        */
            +       , nginxBasePath: ''
            +       /**
            +        * 资源路径映射对象
            +        * <br />设置 JC.use 逗号(',') 分隔项的 对应URL路径
            +        * @property FILE_MAP
            +        * @type object
            +        * @default null
            +        * @static
            +        * @example
            +                以下例子假定 libpath = http://git.me.btbtd.org/ignore/JQueryComps_dev/
            +                <script>
            +                    JC.FILE_MAP = {
            +                        'Calendar': 'http://jc.openjavascript.org/comps/Calendar/Calendar.js'
            +                        , 'Form': 'http://jc.openjavascript.org/comps/Form/Form.js'
            +                        , 'LunarCalendar': 'http://jc.openjavascript.org/comps/LunarCalendar/LunarCalendar.js'
            +                        , 'Panel': 'http://jc.openjavascript.org/comps/Panel/Panel.js' 
            +                        , 'Tab': 'http://jc.openjavascript.org/comps/Tab/Tab.js'
            +                        , 'Tips': 'http://jc.openjavascript.org/comps/Tips/Tips.js' 
            +                        , 'Tree': 'http://jc.openjavascript.org/comps/Tree/Tree.js'
            +                        , 'Valid': 'http://jc.openjavascript.org/comps/Valid/Valid.js'
            +                        , 'plugins/jquery.form.js': 'http://jc.openjavascript.org/plugins/jquery.form.js'
            +                        , 'plugins/json2.js': 'http://jc.openjavascript.org/plugins/json2.js'
            +                    };
            +
            +                    JC.use( 'Panel, Tips, Valid, plugins/jquery.form.js' );
            +
            +                    $(document).ready(function(){
            +                        //JC.Dialog( 'JC.use example', 'test issue' );
            +                    });
            +                </script>
            +
            +                output should be:
            +                    http://git.me.btbtd.org/ignore/JQueryComps_dev/lib.js
            +                    http://jc.openjavascript.org/comps/Panel/Panel.js
            +                    http://jc.openjavascript.org/comps/Tips/Tips.js
            +                    http://jc.openjavascript.org/comps/Valid/Valid.js
            +                    http://jc.openjavascript.org/plugins/jquery.form.js
            +        */
            +       , FILE_MAP: null
            +       , _writeNginxScript:
            +            function( _paths ){
            +                if( !JC.enableNginxStyle ) return;
            +                for( var i = 0, j = _paths.length, _ngpath = [], _npath = []; i < j; i++ ){
            +                    //JC.log( _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase(), JC.nginxBasePath.toLowerCase() );
            +                    if(  
            +                         _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase() 
            +                        == JC.nginxBasePath.toLowerCase() )
            +                    {
            +                        _ngpath.push( _paths[i].slice( JC.nginxBasePath.length ) );
            +                    }else{
            +                        _npath.push( _paths[i] );
            +                    }
            +                }
            +
            +
            +                var _postfix = JC.pathPostfix ? '?v=' + JC.pathPostfix : '';
            +                /*
            +                _ngpath.length && document.write( printf( '<script src="{0}??{1}{2}"><\/script>'
            +                                                    , JC.nginxBasePath, _ngpath.join(','), _postfix ) );
            +                */
            +                JC._autoSplitNginxScript( _ngpath, _postfix );
            +
            +                _npath.length && JC._writeNormalScript( _npath );
            +            }
            +       , _autoSplitNginxScript:
            +           function( _paths, _postfix ){
            +               if( !( _paths&& _paths.length ) ) return;
            +               var _maxLen = JC.nginxUrlLen || 200
            +                   , _finalPaths = [ [] ]
            +                   , _prefix = JC.nginxBasePath
            +                   , _pattern = _prefix + '??{0}' + _postfix
            +                   , _hostLen = JC.f.urlHostName().length + 9
            +                   ;
            +               if( /(^\.\/|^\.\.\/)/.test( JC.nginxBasePath ) ){
            +                   _hostLen += JC.f.relativePath( JC.nginxBasePath ).length;
            +               }
            +               for( var i = 0, j = _paths.length; i < j; i++ ){
            +                   var _beforeLen = _hostLen + JC.f.printf( _pattern, _finalPaths[ _finalPaths.length - 1 ].join(',') ).length
            +                       , _afterLen = _beforeLen + _paths[i].length + 1
            +                       ;
            +
            +                   //JC.log( [ _beforeLen, _afterLen ] );
            +
            +                   if( _afterLen > _maxLen ){
            +                       _finalPaths.push( [] );
            +                   }
            +
            +                   _finalPaths[ _finalPaths.length - 1 ].push( _paths[ i ] );
            +               }
            +
            +               $.each( _finalPaths, function( _ix, _item ){
            +                    if( !_item.length ) return;
            +                    document.write( printf( '<script src="{0}??{1}{2}"><\/script>'
            +                    , JC.nginxBasePath, _item.join(','), _postfix ) );
            +               });
            +           }
            +       /**
            +        * 输出的脚本路径格式
            +        * @method   _writeNormalScript
            +        * @param    {array} _paths
            +        * @private
            +        * @static
            +        */
            +       , _writeNormalScript:
            +            function( _paths ){
            +                var _postfix = JC.pathPostfix ? '?v=' + JC.pathPostfix : '';
            +                for( var i = 0, j = _paths.length, _path; i < j; i++ ){
            +                    _path = _paths[i];
            +                    JC.pathPostfix && ( _path = addUrlParams( _path, { 'v': JC.pathPostfix } ) );
            +                    _paths[i] = printf( '<script src="{0}"><\/script>', _path );
            +                }
            +                _paths.length && document.write( _paths.join('') );
            +            }
            +       /**
            +        * 保存 use 过的资源路径, 以便进行唯一性判断, 避免重复加载
            +        * @property     _USE_CACHE
            +        * @type     object
            +        * @default  {}
            +        * @private
            +        * @static
            +        */
            +       , _USE_CACHE: {}
            +    };
            +    JC.f.extendObject( JC, CLASS );
            +    /**
            +     * UXC 是 JC 的别名
            +     * <br />存在这个变量是为了向后兼容
            +     * <br />20130804 之前的命名空间是 UXC, 这个命名空间在一段时间后将会清除, 请使用 JC 命名空间
            +     * <p><b>see</b>: <a href='window.JC.html'>JC</a></p>
            +     * @date    2013-05-22
            +     */
            +    window.UXC = JC;
            +    /**
            +     * 自动识别组件库所在路径
            +     */
            +    JC.PATH = scriptPath();
            +    if( /\:\/\//.test( location.href ) ){
            +        JC.PATH = JC.f.relativePath( JC.PATH, location.href );
            +    }
            +    //dev开发时因为脚本没合并, IE找不到库的正确路径, 这个判断仅针对dev开发分支
            +    /\/JQueryComps_dev\//i.test( location.href ) 
            +        && !( /file\:/.test( location.href ) || /\\/.test( location.href ) )
            +        && ( JC.PATH = '/ignore/JQueryComps_dev/' );
            +}(jQuery));
            +
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_ActionLogic_ActionLogic.js.html b/docs_api/files/.._bizs_ActionLogic_ActionLogic.js.html index d19ac9c2d..411b7bfa4 100644 --- a/docs_api/files/.._bizs_ActionLogic_ActionLogic.js.html +++ b/docs_api/files/.._bizs_ActionLogic_ActionLogic.js.html @@ -3,11 +3,17 @@ ../bizs/ActionLogic/ActionLogic.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,6 +252,7 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Panel' ], function(){
             /**
              * <h2>node 点击操作逻辑</h2>
              * 应用场景
            @@ -187,13 +260,14 @@ 

            File: ../bizs/ActionLogic/ActionLogic.js

            * <br/>点击后弹框( AJAX ) * <br/>点击后弹框( Dom 模板 ) * <br/>点击后执行 AJAX 操作 + * <p><b>require</b>: + * <a href='JC.BaseMVC.html'>JC.BaseMVC</a> + * , <a href='JC.Panel.html'>JC.Panel</a> + * </p> * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a> * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.ActionLogic.html' target='_blank'>API docs</a> * | <a href='../../bizs/ActionLogic/_demo' target='_blank'>demo link</a></p> * - * require: <a href='../classes/window.jQuery.html'>jQuery</a> - * <br/>require: <a href='../classes/JC.Panel.html'>JC.Panel</a> - * * a|button 需要 添加 class="js_bizsActionLogic" * * <h2>可用的 HTML 属性</h2> @@ -205,8 +279,13 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            * <dd>panel: 弹框</dd> * <dd>link: 链接跳转</dd> * <dd>ajaxaction: ajax操作, 删除, 启用, 禁用</dd> + * <dd>ec: 展开或收起(expand and contract)</dd> + * <dd>hit_value: 点击赋值</dd> * </dl> * </dd> + * + * <dt>balUnHtmlEntity = bool, default = false</dt> + * <dd>是否将 Panel 转义的 html 反转回来</dd> * </dl> * <h2>balType = panel 可用的 HTML 属性</h2> * <dl> @@ -222,10 +301,10 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            * <dt>balCallback = function</dt> * <dd> * 显示模板后的回调 -<xmp>function balPanelInitCb( _panelIns ){ +<pre>function balPanelInitCb( _panelIns ){ var _trigger = $(this); //return true; //如果返回真的话, 表单提交后会关闭弹框 -}</xmp> +}</pre> * </dd> * </dl> * <h2>balType = link 可用的 HTML 属性</h2> @@ -256,21 +335,58 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            * <dt>balSuccessPopupType = string, default = msgbox</dt> * <dd>错误提示的弹框类型: alert, msgbox, dialog.alert, dialog.msgbox</dd> * - * <dt>balCallback = function</dt> + * <dt>balCallback = function, <b>window 变量域</b></dt> * <dd> * 操作完成后的回调 -<xmp>function ajaxDelCallback( _d, _ins ){ +<pre>function ajaxDelCallback( _d, _ins ){ var _trigger = $(this); if( _d && !_d.errorno ){ JC.msgbox( _d.errmsg || '操作成功', _trigger, 0, function(){ - reloadPage( '?usercallback=ajaxaction' ); + JC.f.reloadPage( '?usercallback=ajaxaction' ); }); }else{ JC.Dialog.alert( _d && _d.errmsg ? _d.errmsg : '操作失败, 请重试!' , 1 ); } } -</xmp> +</pre> * </dd> + * + * <dt>balRequestData = json</dt> + * <dd>ajax 请求发送的数据</dd> + * + * <dt>balAjaxType = string, default = get</dt> + * <dd>ajax 请求的类型</dd> + * + * <dt>balDoneRemoveSelector = selector</dt> + * <dd>ajax 操作完成后要删除的 node</dd> + + * </dl> + * <h2>balType = ec( expand and contract) 可用的 HTML 属性</h2> + * <dl> + * <dt>balTarget = selector</dt> + * <dd>显示/隐藏的选择器</dd> + * + * <dt>balExpandWord = string, default = "展开"</dt> + * <dt>balExpandClass= string, default = "js_ecExpand"</dt> + * + * <dt>balContractWord = string, default = "收起"</dt> + * <dt>balContractClass = string, default = "js_ecContract"</dt> + * </dl> + * <h2>balType = hit_value 可用的 HTML 属性</h2> + * <dl> + * <dt>balTarget = selector</dt> + * <dd>显示/隐藏的选择器</dd> + * + * <dt>balValue = string, default = ""</dt> + * <dd>赋给 balTarget 的值</dd> + * </dl> + * <h2>balType = remove_element 可用的 HTML 属性</h2> + * <dl> + * <dt>balDoneRemoveSelector = selector</dt> + * <dd>点击操作完成后要删除的 node</dd> + * + * <dt>balDoneBeforeRemoveCallback= function, <b>window 变量域</b></dt> + * <dd>删除前的回调</dd> * </dl> * * @namespace window.Bizs @@ -280,7 +396,6 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            * @version dev 0.1 2013-09-17 * @author qiushaowei <suches@btbtd.org> | 75 Team */ -;(function($){ window.Bizs.ActionLogic = ActionLogic; function ActionLogic( _selector ){ @@ -294,7 +409,7 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            this._init(); } - !JC.Panel && JC.use( 'Panel' ); + !define.amd && JC.use && !JC.Panel && JC.use( 'Panel' ); /** * 获取或设置 ActionLogic 的实例 @@ -327,6 +442,23 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            && ( _r = _selector.is( '[baltype]' ) ); return _r; }; + /** + * 禁用按钮一定时间, 默认为1秒 + * @method disableButton + * @static + * @param {selector} _selector 要禁用button的选择器 + * @param {int} _durationMs 禁用多少时间, 单位毫秒, 默认1秒 + */ + ActionLogic.disableButton = + function( _selector, _durationMs ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _durationMs = _durationMs || 1000; + _selector.attr('disabled', true); + JC.f.safeTimeout( function(){ + _selector.attr('disabled', false); + }, _selector, 'DISABLE_BUTTON', _durationMs ); + }; /** * 批量初始化 ActionLogic * <br />页面加载完毕时, 已使用 事件代理 初始化 @@ -339,6 +471,7 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            _selector && $( _selector ).find( [ 'a.js_bizsActionLogic' + , 'span.js_bizsActionLogic' , 'input.js_bizsActionLogic' , 'button.js_bizsActionLogic' ].join() ).on( 'click', function( _evt ){ @@ -378,13 +511,16 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            * 脚本模板 Panel */ _p.on('StaticPanel', function( _evt, _item ){ - _p.trigger( 'ShowPanel', [ scriptContent( _item ) ] ); + _p.trigger( 'ShowPanel', [ JC.f.scriptContent( _item ) ] ); }); /** * 显示 Panel */ _p.on(ActionLogic.Model.SHOW_PANEL, function( _evt, _html){ + + _html = _p._model.unHtmlEntity( _html ); var _pins = JC.Dialog( _html ); + _pins.on('confirm', function(){ if( _p._model.balCallback() && _p._model.balCallback().call( _p._model.selector(), _pins, _p ) @@ -398,7 +534,7 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            _p.on('AjaxPanel', function( _evt, _type, _url ){ if( !( _type && _url ) ) return; _p._model.balRandom() - && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); + && ( _url = JC.f.addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); $.get( _url ).done( function( _d ){ switch( _type ){ @@ -428,42 +564,115 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            _p.on( 'Go', function( _evt, _url ){ if( !_url ) return; _p._model.balRandom() - && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - reloadPage( _url ); + && ( _url = JC.f.addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); + JC.f.reloadPage( _url ); }); /** * ajax 执行操作 */ - _p.on( 'AjaxAction', function( _evt, _url ){ + _p.on( 'AjaxAction', function( _evt, _url, _rdata, _rmethod ){ if( !_url ) return; _p._model.balRandom() - && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - $.get( _url ).done( function( _d ){ - try{ _d = $.parseJSON( _d ); }catch(ex){} + && ( _url = JC.f.addUrlParams( _url, { 'rnd': new Date().getTime() } ) ); - if( _p._model.balCallback() ){ - _p._model.balCallback().call( _p.selector(), _d, _p ); - }else{ - if( _d && 'errorno' in _d ){ - if( _d.errorno ){ - _p.trigger( 'ShowError', [ _d.errmsg || '操作失败, 请重试!', 1 ] ); + _rmethod = _p._model.balAjaxType() || _rmethod; + _rdata = _rdata || _p._model.balRequestData(); + + if( _p._model.balRequestData() ){ + $[ _rmethod ]( _url, _rdata ).done( innerDone ); + }else{ + $[ _rmethod ]( _url ).done( innerDone ); + } + + function innerDone( _d ){ + _p.trigger( 'AjaxActionDone', [ _d, _url ] ); + } + }); + + _p.on( 'AjaxActionDone', function( _evt, _d, _url ){ + try{ _d = $.parseJSON( _d ); }catch(ex){} + + if( _p._model.balCallback() ){ + _p._model.balCallback().call( _p.selector(), _d, _p ); + }else{ + if( _d && typeof _d != 'string' && 'errorno' in _d ){ + if( _d.errorno ){ + _p.trigger( 'ShowError', [ _d.errmsg || '操作失败, 请重试!', 1 ] ); + }else{ + + if( _d.data + && _d.data.balAction + && _d.data.balAction.url + && _d.data.balAction.msg + && _d.data.balAction.type + && _d.data.balAction.type.toLowerCase() == 'ajaxaction' + ){ + _p.trigger( 'AjaxAction_Custom_Confirm', [ _d ] ); }else{ _p.trigger( 'ShowSuccess', [ _d.errmsg || '操作完成' , function(){ + _p._model.balDoneRemoveSelector() + && _p._model.balDoneRemoveSelector().remove(); + _p._model.balDoneUrl() - && reloadPage( _p._model.balDoneUrl() || location.href ) + && JC.f.reloadPage( _p._model.balDoneUrl() || location.href ) ; } ] ); } - }else{ - JC.Dialog.alert( _d, 1 ); } + }else{ + var _msg = JC.f.printf( + '服务端错误, 无法解析返回数据: <p class="auExtErr" style="color:red">{0}</p>' + , _d.replace( /</g, '&lt;' ).replace( />/g, '&gt;' ) + ); + JC.Dialog.alert( _msg, 1 ); } - }); + } + }); + + _p.on( 'AjaxAction_Custom_Confirm', function( _evt, _d ){ + if( !_d ) return; + _p.trigger( 'ShowConfirm', + [ + _d.data.balAction.msg + , 2 + , function(){ + _p.trigger( 'AjaxAction', [ + _d.data.balAction.url + , _d.data.balAction.ajaxData + , _d.data.balAction.ajaxMethod + ] ); + } + , function(){ + var _rurl = _p._model.balDoneUrl(); + _rurl = _d.data.balAction.returnurl || _rurl; + _rurl && ( location.href = _rurl ); + } + , function( _panel ){ + if( _d.data.balAction.btnText ){ + $.each( _d.data.balAction.btnText, function( _ix, _item ){ + _panel.find( JC.f.printf( 'button[eventtype={0}]', _ix ) ).html( _item ); + }); + } + } + ] + ); + }); + + _p.on( 'RemoveElementAction', function( _evt ){ + var _list = _p._model.balDoneRemoveSelector(); + if( _p.selector().is( '[balDoneRemoveSelector]' ) ){ + _p._model.balDoneBeforeRemoveCallback() + && _list && _list.length + && _p._model.balDoneBeforeRemoveCallback().call( _p.selector(), _list, _p ); + try{ _list.remove(); }catch( ex ){} + }else{ + _p.selector().remove(); + } }); /** * 处理错误提示 @@ -500,19 +709,23 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            /** * 处理二次确认 */ - _p.on('ShowConfirm', function( _evt, _msg, _status, _cb ){ + _p.on('ShowConfirm', function( _evt, _msg, _status, _cb, _cancelCb, _eventCb ){ var _panel; switch( _p._model.balConfirmPopupType() ){ case 'dialog.confirm': { _panel = JC.Dialog.confirm( _msg, _status || 1 ); _cb && _panel.on('confirm', function(){ _cb() } ); + _cancelCb && _panel.on('cancel', function(){ _cancelCb() } ); + _eventCb && _eventCb( _panel ); break; } default: { _panel = JC.confirm( _msg, _p._model.selector(), _status || 1 ); _cb && _panel.on('confirm', function(){ _cb() } ); + _cancelCb && _panel.on('cancel', function(){ _cancelCb() } ); + _eventCb && _eventCb( _panel ); break; } } @@ -522,6 +735,10 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            */ _p.on('ShowSuccess', function( _evt, _msg, _cb ){ var _panel; + if( _p._model.balIgnoreSuccess() ){ + _cb && _cb(); + return; + } switch( _p._model.balSuccessPopupType() ){ case 'alert': { @@ -601,6 +818,48 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            } break; } + + case 'remove_element': + { + if( _p._model.is( '[balConfirmMsg]' ) ){ + var _panel = JC.confirm( _p._model.balConfirmMsg(), _p.selector(), 2 ); + _panel.on('confirm', function(){ + _p.trigger( 'RemoveElementAction' ); + }); + }else{ + _p.trigger( 'RemoveElementAction' ); + } + break; + } + + case 'ec'://expand and contract + { + var _target = _p._model.balTarget(); + if( !_target ) return; + + if( _target.is( ':visible' ) ){ + _target.hide(); + _p.selector() + .html( _p._model.balExpandWord() ) + .addClass( _p._model.balExpandClass() ) + .removeClass( _p._model.balContractClass() ) + ; + }else{ + _target.show(); + _p.selector() + .html( _p._model.balContractWord() ) + .addClass( _p._model.balContractClass() ) + .removeClass( _p._model.balExpandClass() ) + ; + } + } + + case 'hit_value': + { + var _target = _p._model.balTarget(); + if( !_target ) return; + _target.val( _p._model.balValue() ); + } } return this; } @@ -613,6 +872,38 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            init: function(){ } + + , balTarget: + function( ){ + var _r; + this.is( '[balTarget]' ) && ( _r = this.selectorProp( 'balTarget' ) ); + return _r; + } + + , balValue: function(){ return this.attrProp( 'balValue' ) || ''; } + + , balExpandWord: function(){ return this.attrProp( 'balExpandWord' ) || '展开'; } + , balExpandClass: function(){ return this.attrProp( 'balExpandClass' ) || 'js_ecExpand'; } + + , balContractWord: function(){ return this.attrProp( 'balContractWord' ) || '收起'; } + , balContractClass: function(){ return this.attrProp( 'balContractClass' ) || 'js_ecContract'; } + + , unHtmlEntity: + function( _html ){ + var _r = this.boolProp( 'balUnHtmlEntity' ); + _r && + _html + && ( $.isArray(_html) && ( _html = _html.join('') ) ) + && ( + _html = _html.replace( /\&gt;/g, '>' ) + .replace(/\&amp;/g, '&') + .replace( /\&lt;/g, '<') + .replace(/\&quot;/g, '"') + .replace(/\&nbsp;/g, ' ') + ); + + return _html; + } , baltype: function(){ return this.stringProp( 'baltype' ); } , balPanelTpl: @@ -632,7 +923,24 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            , balRandom: function(){ var _r = ActionLogic.random, _p = this; - _p.is('[balRandom]') && ( _r = parseBool( _p.stringProp( 'balRandom' ) ) ); + _p.is('[balRandom]') && ( _r = JC.f.parseBool( _p.stringProp( 'balRandom' ) ) ); + return _r; + } + , balRequestData: + function(){ + var _r; + if( this.attrProp( 'balRequestData' ) ){ + _r = eval( '(' + this.attrProp( 'balRequestData' ) + ')' ); + try{ + }catch( ex ){} + } + return _r; + } + , balAjaxType: + function(){ + var _r = 'get'; + this.balRequestData() && ( _r = 'post' ); + _r = this.attrProp( 'balAjaxType' ) || _r; return _r; } , balUrl: @@ -641,12 +949,20 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            _p.selector().prop('nodeName').toLowerCase() == 'a' && ( _r = _p.selector().attr('href') ); _p.is( '[balUrl]' ) && ( _r = _p.selector().attr('balUrl') ); - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } , balDoneUrl: function(){ var _r = this.attrProp( 'balDoneUrl' ); - return urlDetect( _r ); + return JC.f.urlDetect( _r ); + } + , balDoneRemoveSelector: + function(){ + return this.selectorProp( 'balDoneRemoveSelector' ); + } + , balDoneBeforeRemoveCallback: + function(){ + return this.callbackProp( 'balDoneBeforeRemoveCallback' ); } , balConfirmMsg: function(){ @@ -669,6 +985,10 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            var _r = this.stringProp('balConfirmPopupType') || 'confirm'; return _r; } + , balIgnoreSuccess: + function(){ + return this.boolProp( 'balIgnoreSuccess' ); + } } JC.BaseMVC.buildView( ActionLogic ); @@ -682,6 +1002,7 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            $(document).ready( function(){ $( document ).delegate( [ 'a.js_bizsActionLogic' + , 'span.js_bizsActionLogic' , 'input.js_bizsActionLogic' , 'button.js_bizsActionLogic' ].join(), 'click', function( _evt ){ @@ -690,7 +1011,16 @@

            File: ../bizs/ActionLogic/ActionLogic.js

            }); }); -}(jQuery)); + return Bizs.ActionLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._bizs_AutoSelectComplete_AutoSelectComplete.js.html b/docs_api/files/.._bizs_AutoSelectComplete_AutoSelectComplete.js.html new file mode 100644 index 000000000..639318d59 --- /dev/null +++ b/docs_api/files/.._bizs_AutoSelectComplete_AutoSelectComplete.js.html @@ -0,0 +1,573 @@ + + + + + ../bizs/AutoSelectComplete/AutoSelectComplete.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/AutoSelectComplete/AutoSelectComplete.js

            + +
            +
            +//TODO: 文本框 自动添加 autocomplete="off", 防止表单的默认提示
            +//列表项 添加 title 属性
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.AutoComplete', 'JC.AutoSelect' ], function(){
            +    /**
            +     * <h2>结合 JC.AutoSelect 与 JC.AutoComplete 综合使用的一个业务逻辑</h2>
            +     * <br />应用场景: CRM 多级广告位最后一级因为内容较多, 用户使用传统的下拉框选择比较不便
            +     * <br />这个业务组件结合 JC.AutoSelect 和 JC.AutoComplete 提供一种简便的可输入解决方案
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *      , <a href='JC.AutoComplete.html'>JC.AutoComplete</a>
            +     *      , <a href='JC.AutoSelect.html'>JC.AutoSelect</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.AutoSelectComplete.html' target='_blank'>API docs</a>
            +     * | <a href='../../bizs/AutoSelectComplete/_demo' target='_blank'>demo link</a></p>
            +     * <h2>可用的 HTML attribute</h2>
            +     * <dl>
            +     *      <dt>bascAjaxUrl = url</dt>
            +     *      <dd>
            +     *          获取 JC.AutoComplete 数据的 AJAX 接口
            +     *          <dl>
            +     *              <dt>数据格式</dt>
            +     *              <dd>
            +     *                  [ { "id": "id value", "label": "label value" }, ... ]
            +     *              </dd>
            +     *          </dl>
            +     *      </dd>
            +     *
            +     *      <dt>bascDefaultSelect = selector</dt>
            +     *      <dd>声明 JC.AutoSelect 的围住 select</dd>
            +     * </dl>
            +     * @namespace window.Bizs
            +     * @class AutoSelectComplete
            +     * @constructor
            +     * @param   {selector|string}   _selector   
            +     * @version dev 0.1 2013-11-25
            +     * @author  qiushaowei<suches@btbtd.org> | 75 Team
            +     * @example
            +     */
            +    Bizs.AutoSelectComplete = AutoSelectComplete;
            +    JC.f.addAutoInit && JC.f.addAutoInit( AutoSelectComplete );
            +
            +    function AutoSelectComplete( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        if( AutoSelectComplete.getInstance( _selector ) ) return AutoSelectComplete.getInstance( _selector );
            +        AutoSelectComplete.getInstance( _selector, this );
            +
            +        this._model = new AutoSelectComplete.Model( _selector );
            +        this._view = new AutoSelectComplete.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( 'AutoSelectComplete inited', new Date().getTime() );
            +    }
            +    /**
            +     * 获取或设置 AutoSelectComplete 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {AutoSelectCompleteInstance}
            +     */
            +    AutoSelectComplete.getInstance =
            +        function( _selector, _setter ){
            +            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +                    _selector = $(_selector);
            +            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +            typeof _setter != 'undefined' && _selector.data( AutoSelectComplete.Model._instanceName, _setter );
            +
            +            return _selector.data( AutoSelectComplete.Model._instanceName );
            +        };
            +    /**
            +     * 初始化可识别的 AutoSelectComplete 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of AutoSelectCompleteInstance}
            +     */
            +    AutoSelectComplete.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( '.js_bizAutoSelectComplete' )  ){
            +                    _r.push( new AutoSelectComplete( _selector ) );
            +                }else{
            +                    _selector.find( 'input.js_bizAutoSelectComplete' ).each( function(){
            +                        _r.push( new AutoSelectComplete( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +
            +    AutoSelectComplete.prototype = {
            +        _beforeInit:
            +            function(){
            +                JC.log( 'AutoSelectComplete _beforeInit', new Date().getTime() );
            +            }
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'BASC_SELECT_CHANGED', function( _evt, _select ){
            +
            +                    JC.log( 'Bizs.AutoSelectComplete all changed', new Date().getTime() );
            +                    _p.trigger( 'BASC_ALL_CHANGE', [ _select ] );
            +
            +                    var _id = _select.val(), _select, _id, _json;
            +
            +                    if( !_id ){
            +                        _p.trigger( 'BASC_CLEAR' );
            +                        _p.trigger( 'BASC_CHANGE', [ _select ] );
            +                    }else{
            +
            +                        JC.AutoComplete.ajaxUpdate( 
            +                            _p._model.selector()
            +                            , JC.f.printf( _p._model.bascAjaxUrl(), _id ) 
            +                            , function( _json ){
            +                                _p.trigger( 'BASC_CHANGE', [ _select, _id, _json ] );
            +
            +                                var _autoCompleteIns = this;
            +                                if( _p._model.firstUpdate() ){
            +                                    _p._model.firstUpdate( false );
            +                                    _p.trigger( 'BASC_FIRST_UPDATE', [ _json, _autoCompleteIns ] );
            +                                    return;
            +                                }
            +                                _p.trigger( 'BASC_CLEAR' );
            +                            }
            +                        );
            +                    }
            +                });
            +
            +                _p.on( 'BASC_CLEAR', function(){
            +                    var _acIns = JC.AutoComplete.getInstance( _p._model.selector() );
            +                    if( !_acIns ) return;
            +                    _acIns.clear();
            +                });
            +
            +                _p.on( 'BASC_ALL_CHANGE', function( _evt, _select ){
            +                    var _acIns = JC.AutoComplete.getInstance( _p._model.selector() );
            +                    if( _select.is( ':visible' ) && _select.val() ){
            +                        if( _acIns ){
            +                            _p._model.selector().show();
            +                        }else{
            +                            _p._model.selector().hide();
            +                        }
            +                    }else{
            +                        _p._model.selector().hide();
            +                    }
            +                });
            +
            +                _p.on( 'BASC_CHANGE', function( _evt, _select, _id, _json ){
            +                    JC.log( 'BASC_CHANGE', new Date().getTime(), _id, _json );
            +                    var _acIns = JC.AutoComplete.getInstance( _p._model.selector() );
            +                    if( !( _id && _json && _json.length ) ){
            +                        _p._model.selector().hide();
            +                        JC.log( 'hide' );
            +                    }else{
            +                        _p._model.selector().show();
            +                    }
            +                });
            +
            +                _p.on( 'BASC_FIRST_UPDATE', function( _evt, _json, _autoCompleteIns ){
            +                    var _id = _autoCompleteIns.idVal();
            +                    if( !_id ) return;
            +                    $.each( _json, function( _ix, _item ){
            +                        if( _item.id == _id ){
            +                            _autoCompleteIns.selector().val( _item.label );
            +                            return false;
            +                        }
            +                    });
            +                });
            +            }
            +        , _inited:
            +            function(){
            +                JC.log( 'AutoSelectComplete _inited', new Date().getTime() );
            +                this._model.selector().attr( 'cacDataFilter', AutoSelectComplete.Model.DATA_FILTER_NAME );
            +                this._model.injectDefaultSelectCallback();
            +            }
            +    };
            +
            +    BaseMVC.buildModel( AutoSelectComplete );
            +
            +    AutoSelectComplete.Model._instanceName = 'AutoSelectComplete';
            +    AutoSelectComplete.Model.INS_COUNT = 1;
            +
            +    AutoSelectComplete.Model.DATA_FILTER_NAME = 'BizsAutoSelectCompleteDataFilter';
            +
            +    AutoSelectComplete.Model.prototype = {
            +        init:
            +            function(){
            +                JC.log( 'AutoSelectComplete.Model.init:', new Date().getTime() );
            +
            +                this._insCount = AutoSelectComplete.Model.INS_COUNT++;
            +                this._firstUpdate = true;
            +            }
            +
            +        , firstUpdate:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._firstUpdate = _setter );
            +                return this._firstUpdate;
            +            }
            +
            +        , insCount: function(){ return this._insCount; }
            +
            +        , bascDefaultSelect:
            +            function(){
            +                var _r = this.selectorProp( 'bascDefaultSelect' );
            +                return _r;
            +            }
            +
            +        /**
            +         * selectallchanged
            +         */
            +        , injectDefaultSelectCallback:
            +            function(){
            +                var _p = this
            +                    , _cb = _p.callbackProp( _p.bascDefaultSelect(), 'selectallchanged' )
            +                    , _newCbName = 'AutoSelectComplete_inject_' + _p.insCount()
            +                    ;
            +                if( _p.bascDefaultSelect().attr( 'selectallchanged' ) == _newCbName ){
            +                    return;
            +                }
            +
            +                window[ _newCbName ] = 
            +                    function( _selectItems ){
            +                        if( _cb ){
            +                            _cb.apply( this, JC.f.sliceArgs( arguments ) );
            +                        }
            +
            +                        $( _p ).trigger( 'TriggerEvent', [ 'BASC_SELECT_CHANGED', _selectItems[ _selectItems.length - 1 ] ] );
            +                    };
            +                _p.bascDefaultSelect().attr( 'selectallchanged', _newCbName );
            +            }
            +
            +        , bascAjaxUrl:
            +            function(){
            +                var _r = this.attrProp( 'bascAjaxUrl' );
            +                return _r;
            +            }
            +
            +        , bascDefaultLabel:
            +            function(){
            +                var _r = this.attrProp( 'bascDefaultLabel' );
            +                return _r;
            +            }
            +
            +        , bascDefaultId:
            +            function(){
            +                var _r = this.attrProp( 'bascDefaultId' );
            +                return _r;
            +            }
            +    };
            +
            +    BaseMVC.buildView( AutoSelectComplete );
            +    AutoSelectComplete.View.prototype = {
            +        init:
            +            function(){
            +                JC.log( 'AutoSelectComplete.View.init:', new Date().getTime() );
            +            }
            +    };
            +
            +    BaseMVC.build( AutoSelectComplete, 'Bizs' );
            +
            +    window[ AutoSelectComplete.Model.DATA_FILTER_NAME ] =
            +        function ( _json ){
            +            if( _json.data && _json.data.length ){
            +                _json = _json.data;
            +            }
            +
            +            $.each( _json, function( _ix, _item ){
            +                _item.length &&
            +                    ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } )
            +                    ;
            +            });
            +
            +            return _json;
            +        };
            +
            +    $(document).ready( function(){
            +        var _insAr = 0;
            +        AutoSelectComplete.autoInit
            +            && ( _insAr = AutoSelectComplete.init() )
            +            //&& $( '<h2>AutoSelectComplete total ins: ' + _insAr.length + '<br/>' + new Date().getTime() + '</h2>' ).appendTo( document.body )
            +            ;
            +    });
            +
            +    return Bizs.AutoSelectComplete;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_ChangeLogic_ChangeLogic.js.html b/docs_api/files/.._bizs_ChangeLogic_ChangeLogic.js.html new file mode 100644 index 000000000..406ec97e2 --- /dev/null +++ b/docs_api/files/.._bizs_ChangeLogic_ChangeLogic.js.html @@ -0,0 +1,893 @@ + + + + + ../bizs/ChangeLogic/ChangeLogic.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/ChangeLogic/ChangeLogic.js

            + +
            +
            +//TODO: 完善 select 的相关判断逻辑
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * <h2>input[type=radio|type=checkbox], select change 事件的响应逻辑</h2>
            + * <br/>应用场景</br>
            + * <br/>表单操作时, 选择某个 radio 时, 对应的 内容有效,
            + * <br/>但选择其他 radio 时, 其他的内容无效
            + * <br/>checkbox / select 也可使用( 带change事件的标签 )
            + * <p><b>require</b>: 
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.ChangeLogic.html' target='_blank'>API docs</a>
            + * | <a href='../../bizs/ChangeLogic/_demo' target='_blank'>demo link</a></p>
            + *
            + * div 需要 添加 class="js_bizChangeLogic"
            + *
            + * <h2>box 的 HTML 属性</h2>
            + * <dl>
            + *      <dt>bclTrigger</dt>
            + *      <dd>触发禁用/起用的control</dd>
            + *
            + *      <dt>bclDisableTarget</dt>
            + *      <dd>需要禁用/起用的control</dd>
            + *
            + *      <dt>bclHideTarget</dt>
            + *      <dd>需要根据禁用起用隐藏/可见的标签</dd>
            + *
            + *      <dt>bclDoneCallback = function</dt>
            + *      <dd>
            + *      启用/禁用后会触发的回调, <b>window 变量域</b>
            +<pre>function bclDoneCallback( _triggerItem, _boxItem ){
            +    var _ins = this;
            +    JC.log( 'bclDoneCallback', new Date().getTime() );
            +}</pre>
            + *      </dd>
            + *
            + *      <dt>bclEnableCallback = function</dt>
            + *      <dd>
            + *      启用后的回调, <b>window 变量域</b>
            +<pre>function bclEnableCallback( _triggerItem, _boxItem ){
            +    var _ins = this;
            +    JC.log( 'bclEnableCallback', new Date().getTime() );
            +}</pre>
            + *      </dd>
            + *
            + *      <dt>bclDisableCallback = function</dt>
            + *      <dd>
            + *      禁用后的回调, <b>window 变量域</b>
            +<pre>function bclDisableCallback( _triggerItem, _boxItem ){
            +    var _ins = this;
            +    JC.log( 'bclDisableCallback', new Date().getTime() );
            +}</pre>
            + *      </dd>
            + *
            + *      <dt>bclChangeCleanTarget = selector</dt>
            + *      <dd>radio change 的时候, 清除目标选择器的 html 内容</dd>
            + *
            + *      <dt>bclTriggerChangeOnInit = bool, default = true</dt>
            + *      <dd>初始化实例时, 是否触发 change 事件</dd>
            + * </dl>
            + *
            + * <h2>trigger 的 HTML 属性</h2>
            + * <dl>
            + *      <dt>bclDisable = bool, default = false</dt>
            + *      <dd>
            + *          指定 bclDisableTarget 是否置为无效
            + *          <br />还可以根据这个属性 指定 bclHideTarget 是否显示
            + *      </dd>
            + *
            + *      <dt>bclDisplay = bool</dt>
            + *      <dd>指定 bclHideTarget 是否显示</dd>
            + *
            + *      <dt>bclDelimiter = string, default = "||"</dt>
            + *      <dd>bclDisplay 和 bclDisable 多值分隔符</dd>
            + *
            + *      <dt>bclHideTargetSub = selector</dt>
            + *      <dd>根据 trigger 的 checked 状态 显示或者隐藏 bclHideTargetSub node</dd>
            + *
            + *      <dt>bclShowToggleFilter = selector | html attr</dt>
            + *      <dd>显示的时候, 如果匹配到 filter, 那么将会隐藏</dd>
            + * </dl>
            + *
            + * <h2>hide target 的 HTML 属性</h2>
            + * <dl>
            + *      <dt>bclHideToggle = bool, default = false</dt>
            + *      <dd>显示或显示的时候, 是否与他项相反</dd>
            + *
            + *      <dt>bclDisableToggle= bool, default = false</dt>
            + *      <dd>disabled 的时候, 是否与他项相反</dd>
            + * </dl>
            + *
            + * @namespace   window.Bizs
            + * @class       ChangeLogic
            + * @constructor
            + * @version dev 0.1 2013-09-04
            + * @author  qiushaowei   <suches@btbtd.org> | 75 Team
            + *
            + * @example
            +        <div class="js_bizChangeLogic"
            +            bclTrigger="/input[type=radio]"
            +            bclDisableTarget="/input.js_disableItem"
            +            >
            +            <label>
            +                <input type="radio" name="discount" checked  
            +                bclDisable="true"
            +                />自本协议签订之日起10日内生效
            +            </label> <br>
            +            <label>
            +                <input type="radio" name="discount" 
            +                bclDisable="false"
            +                />生效时间点
            +            </label>
            +            <input type="text" class="ipt js_disableItem" datatype="date" value=""
            +            /><input type="button" class="UXCCalendar_btn">
            +        </div>
            + */
            +    window.Bizs.ChangeLogic = ChangeLogic;
            +    JC.f.addAutoInit && JC.f.addAutoInit( ChangeLogic );
            +
            +    function ChangeLogic( _selector ){
            +        if( ChangeLogic.getInstance( _selector ) ) return ChangeLogic.getInstance( _selector );
            +        ChangeLogic.getInstance( _selector, this );
            +
            +        //JC.log( 'Bizs.ChangeLogic:', new Date().getTime() );
            +
            +        this._model = new Model( _selector );
            +        this._view = new View( this._model );
            +
            +        this._init();
            +    }
            +    
            +    ChangeLogic.prototype = {
            +        _init:
            +            function(){
            +                var _p = this, _tmp;
            +
            +                _p._initHandlerEvent();
            +
            +                $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){
            +                    _p.on( _evtName, _cb );
            +                });
            +
            +                $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){
            +                    var _data = JC.f.sliceArgs( arguments ).slice( 2 );
            +                    _p.trigger( _evtName, _data );
            +                });
            +
            +                _p._model.init();
            +                _p._view.init();
            +
            +                _p._model.bclTrigger().on('change', function(_evt){
            +                    _p.trigger( 'item_change', [ $(this), _evt ] );
            +                });
            +
            +                _p.on( 'item_change', function( _evt, _item, _srcEvt ){
            +                    _item = $( _item );
            +                   
            +                    _p._view.change( _item );
            +
            +                    if( _p._model.ready() ){
            +                        _p._model.bclChangeCleanTarget() 
            +                            && _p._model.bclChangeCleanTarget().each( function(){
            +                                if (/(input|textarea)/i.test( $(this).prop( 'nodeName' ).toLowerCase() )) {
            +                                    $( this ).val( '' );
            +                                } else {
            +                                    $( this ).html( '' );
            +                                }
            +
            +                            });
            +                    }
            +                });
            +
            +                if( _p._model.bclTriggerChangeOnInit() ){
            +
            +                    ( _tmp = _p._model.bclTrigger( true ) ) 
            +                        && !_tmp.prop( 'disabled' )
            +                        && _tmp.trigger( 'change');
            +                }
            +
            +                _p._model.ready( true );
            +
            +                return _p;
            +            }    
            +        , _initHandlerEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'DisableItem', function( _evt, _triggerItem ){
            +                    _p._model.bclDisableCallback()
            +                        && _p._model.bclDisableCallback().call( _p, _triggerItem, _p._model.selector() );
            +                });
            +
            +                _p.on( 'EnableItem', function( _evt, _triggerItem ){
            +                    _p._model.bclEnableCallback()
            +                        && _p._model.bclEnableCallback().call( _p, _triggerItem, _p._model.selector() );
            +                });
            +
            +                _p.on( 'ChangeDone', function( _evt, _triggerItem ){
            +                    _p._model.bclDoneCallback()
            +                        && _p._model.bclDoneCallback().call( _p, _triggerItem, _p._model.selector() );
            +                });
            +            }
            +        /**
            +         * 获取 显示 ChangeLogic 的触发源选择器, 比如 a 标签
            +         * @method  selector
            +         * @return  selector
            +         */ 
            +        , selector: function(){ return this._model.selector(); }
            +        /**
            +         * 使用 jquery on 绑定事件
            +         * @method  {string}    on
            +         * @param   {string}    _evtName
            +         * @param   {function}  _cb
            +         * @return  ChangeLogicInstance
            +         */
            +        , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;}
            +        /**
            +         * 使用 jquery trigger 绑定事件
            +         * @method  {string}    trigger
            +         * @param   {string}    _evtName
            +         * @return  ChangeLogicInstance
            +         */
            +        , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;}
            +    }
            +    /**
            +     * 获取或设置 ChangeLogic 的实例
            +     * @method getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {ChangeLogic instance}
            +     */
            +    ChangeLogic.getInstance =
            +        function( _selector, _setter ){
            +            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +                    _selector = $(_selector);
            +            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +            typeof _setter != 'undefined' && _selector.data( 'ChangeLogicIns', _setter );
            +
            +            return _selector.data('ChangeLogicIns');
            +        };
            +
            +    ChangeLogic.doneCallback = null;
            +    ChangeLogic.enableCallback = null;
            +    ChangeLogic.disableCallback = null;
            +    /**
            +     * 初始化 _selector | document 可识别的 ChangeLogic HTML属性
            +     * @method  init
            +     * @param   {selector}  _selector, default = document
            +     * @static
            +     */
            +    ChangeLogic.init =
            +        function( _selector ){
            +            _selector = $( _selector || document );
            +            if( !( _selector && _selector.length ) ) return;
            +
            +            if( _selector.hasClass( 'js_bizChangeLogic' ) ){
            +                new ChangeLogic( _selector );
            +            }else{
            +                _selector.find(
            +                        [ 
            +                            'div.js_bizChangeLogic'
            +                            , 'dl.js_bizChangeLogic'
            +                            , 'table.js_bizChangeLogic'
            +                        ].join() 
            +                ).each( function(){
            +                    new ChangeLogic( $(this) );
            +                });
            +            }
            +        };
            +    
            +    function Model( _selector ){
            +        this._selector = _selector;
            +    }
            +    
            +    Model.prototype = {
            +        init:
            +            function(){
            +                return this;
            +            }
            +
            +        , ready:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._ready = _setter );
            +                return this._ready;
            +            }
            +
            +        , selector: function(){ return this._selector; }
            +
            +        , bclTrigger:
            +            function( _curItem ){
            +
            +                var _p = this, _r = JC.f.parentSelector( this.selector(), this.selector().attr('bclTrigger') ), _tmp;
            +                if( _curItem ){
            +                    _r.each( function(){
            +                        _tmp = $(this);
            +                        if( _tmp.prop('checked') || _tmp.prop('selected') ){
            +                            _r = _tmp;
            +                            return false;
            +                        }
            +                    });
            +                }
            +                return _r;
            +            }
            +
            +        , bclTriggerChangeOnInit:
            +            function(){
            +                var _r = true, _p = this;
            +                _p.selector().is( '[bclTriggerChangeOnInit] ' ) 
            +                    && ( _r = JC.f.parseBool( _p.selector().attr( 'bclTriggerChangeOnInit' ) ) );
            +                return _r;
            +            }
            +
            +        , bclChangeCleanTarget: 
            +            function(){ 
            +                var _p = this, _r, _tmp;
            +
            +                _p.selector().attr('bclChangeCleanTarget') 
            +                    && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('bclChangeCleanTarget') ) )
            +                    ;
            +                return _r;
            +            }
            +
            +        , bclDisableTarget:
            +            function( _triggerItem ){
            +                var _p = this, _r, _tmp;
            +
            +                _p.selector().attr('bclDisableTarget') 
            +                    && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('bclDisableTarget') ) )
            +                    ;
            +                _triggerItem 
            +                    && ( _triggerItem = $(_triggerItem) ).length 
            +                    && _triggerItem.attr('bclTrigger') 
            +                    && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('bclDisableTarget') ) )
            +                    ;
            +
            +                return _r;
            +            }
            +
            +        , bclDisable:
            +            function( _triggerItem ){
            +                var _r = false, _selectedItem;
            +                _triggerItem && ( _triggerItem = $( _triggerItem ) );
            +                if( !( _triggerItem && _triggerItem.length ) ) return _r;
            +
            +                if( _triggerItem.prop('nodeName').toLowerCase() == 'select' ){
            +                    _selectedItem = _triggerItem.find( ':selected' );
            +                    if( !_selectedItem.length ) return _r;
            +
            +                    if( _triggerItem.is('[bclDisable]') || _selectedItem.is( '[bclDisable]' ) ){
            +                        if( _triggerItem.is( '[bclDisable]' ) ){
            +                            _r = _triggerItem.attr('bclDisable') == _triggerItem.val();
            +                        }
            +                        if( _selectedItem.is( '[bclDisable]' ) ){
            +                            _r = JC.f.parseBool( _selectedItem.attr( 'bclDisable' ) );
            +                        }
            +                    }
            +                }else{
            +                    _triggerItem.is( '[bclDisable]' )
            +                    && ( _r = JC.f.parseBool( _triggerItem.attr('bclDisable') ) )
            +                    ;
            +                }
            +
            +                if( _triggerItem.prop('nodeName').toLowerCase() == 'input' 
            +                        && _triggerItem.attr('type').toLowerCase() == 'checkbox' ){
            +                    _r = !_triggerItem.prop('checked');
            +                }
            +
            +
            +                return _r;
            +            }
            +
            +        , bclDelimiter: 
            +            function( _trigger ){ 
            +                var _r = '||';
            +
            +                this.selector().is( '[bclDelimiter]' ) && ( _r = this.selector().attr( 'bclDelimiter' ) );
            +                _trigger && _trigger.is( '[bclDelimiter]' ) && ( _r = _trigger.attr( 'bclDelimiter' ) );
            +                return _r;
            +            }
            +
            +        , delimiterItems: 
            +            function( _item, _trigger ){ 
            +                return _item.split( this.bclDelimiter( _trigger ) );  
            +            }
            +
            +        , bclDisplay:
            +            function( _triggerItem ){
            +                var _r = false, _selectedItem, _p = this;
            +                _triggerItem && ( _triggerItem = $( _triggerItem ) );
            +                if( !( _triggerItem && _triggerItem.length ) ) return _r;
            +
            +                if( _triggerItem.prop('nodeName').toLowerCase() == 'select' ){
            +                    _selectedItem = _triggerItem.find( ':selected' );
            +                    if( !_selectedItem.length ) return _r;
            +                    if( !( _triggerItem.is('[bclDisplay]') || _selectedItem.is( '[bclDisplay]' ) ) ){
            +                        if( _triggerItem.is( '[bclDisable]' ) ){
            +                            _r = _p.delimiterItems( _triggerItem.attr('bclDisable'), _triggerItem ).indexOf( _triggerItem.val() ) > -1;
            +                        }
            +                        if( _selectedItem.is( '[bclDisable]' ) ){
            +                            _r = JC.f.parseBool( _selectedItem.attr( 'bclDisable' ) );
            +                        }
            +
            +                    }else{
            +                        if( _triggerItem.is( '[bclDisplay]' ) ){
            +                            _r = _p.delimiterItems( _triggerItem.attr('bclDisplay'), _triggerItem ).indexOf( _triggerItem.val() ) > -1;
            +                        }
            +                        if( _selectedItem.is( '[bclDisplay]' ) ){
            +                            _r = JC.f.parseBool( _selectedItem.attr( 'bclDisplay' ) );
            +                        }
            +                    }
            +                }else{
            +                    if( !_triggerItem.is('[bclDisplay]') ){
            +                        _triggerItem.is( '[bclDisable]' )
            +                        && ( _r = !JC.f.parseBool( _triggerItem.attr('bclDisable') ) )
            +                        ;
            +                    }else{
            +                        _triggerItem.is( '[bclDisplay]' )
            +                        && ( _r = JC.f.parseBool( _triggerItem.attr('bclDisplay') ) )
            +                        ;
            +                    }
            +                }
            +
            +                if( _triggerItem.prop('nodeName').toLowerCase() == 'input' 
            +                      && _triggerItem.attr('type').toLowerCase() == 'checkbox' ){
            +                    _r = _triggerItem.prop('checked');
            +                }
            +
            +                return _r;
            +            }
            +
            +        , bclHideTarget:
            +            function( _triggerItem ){
            +                var _p = this, _r, _tmp;
            +
            +                _p.selector().attr('bclHideTarget') 
            +                    && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('bclHideTarget') ) )
            +                    ;
            +
            +                _triggerItem 
            +                    && ( _triggerItem = $(_triggerItem) ).length 
            +                    && _triggerItem.attr('bclHideTarget') 
            +                    && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('bclHideTarget') ) )
            +                    ;
            +                return _r;
            +            }
            +
            +        , bclShowToggleFilter:
            +            function( _triggerItem ){
            +                var _r = '';
            +                _triggerItem.attr( 'bclShowToggleFilter' ) && ( _r = _triggerItem.attr( 'bclShowToggleFilter' ) );;
            +                return _r;
            +            }
            +
            +        , bclHideToggle:
            +            function( _hideTarget ){
            +                var _r;
            +                _hideTarget && _hideTarget.is( '[bclHideToggle]' ) 
            +                    && ( _r = JC.f.parseBool( _hideTarget.attr('bclHideToggle') ) );
            +                return _r;
            +            }
            +
            +        , bclDisableToggle:
            +            function( _target ){
            +                var _r;
            +                _target && _target.is( '[bclDisableToggle]' ) 
            +                    && ( _r = JC.f.parseBool( _target.attr('bclDisableToggle') ) );
            +                return _r;
            +            }
            +
            +        , bclDoneCallback:
            +            function(){
            +                var _r = ChangeLogic.doneCallback, _tmp;
            +
            +                this.selector() 
            +                    && ( _tmp = this.selector().attr('bclDoneCallback') )
            +                    && ( _tmp = window[ _tmp ] )
            +                    && ( _r = _tmp )
            +                    ;
            +
            +                return _r;
            +            }
            +
            +        , bclEnableCallback:
            +            function(){
            +                var _r = ChangeLogic.enableCallback, _tmp;
            +
            +                this.selector() 
            +                    && ( _tmp = this.selector().attr('bclEnableCallback') )
            +                    && ( _tmp = window[ _tmp ] )
            +                    && ( _r = _tmp )
            +                    ;
            +
            +                return _r;
            +            }
            +
            +        , bclDisableCallback:
            +            function(){
            +                var _r = ChangeLogic.disableCallback, _tmp;
            +
            +                this.selector() 
            +                    && ( _tmp = this.selector().attr('bclDisableCallback') )
            +                    && ( _tmp = window[ _tmp ] )
            +                    && ( _r = _tmp )
            +                    ;
            +
            +                return _r;
            +            }
            +
            +    };
            +    
            +    function View( _model ){
            +        this._model = _model;
            +    }
            +    
            +    View.prototype = {
            +        init:
            +            function() {
            +                return this;
            +            }
            +
            +        , change:
            +            function( _triggerItem ){
            +            
            +                _triggerItem && ( _triggerItem = $( _triggerItem ) );
            +                if( !( _triggerItem && _triggerItem.length && _triggerItem.is(':visible') ) ) return;
            +                var _p = this
            +                    , _isDisable = _p._model.bclDisable( _triggerItem )
            +                    , _bclDisableTarget = _p._model.bclDisableTarget( _triggerItem )
            +                    , _bclDisplay = _p._model.bclDisplay( _triggerItem )
            +                    , _bclHideTarget = _p._model.bclHideTarget( _triggerItem )
            +                    ;
            +
            +                if( _triggerItem.is( '[bclHideTargetSub]' ) ){
            +                    var _starget = JC.f.parentSelector( _triggerItem, _triggerItem.attr( 'bclHideTargetSub' ) );
            +                    if( _starget && _starget.length ){
            +                        if( _triggerItem.prop('checked') ){
            +                            _starget.show();
            +                        }else{
            +                            _starget.hide();
            +                        }
            +                    }
            +                }
            +
            +
            +                if( _bclDisableTarget && _bclDisableTarget.length ){
            +                    _bclDisableTarget.each( function(){ 
            +                        var _sp = $( this );
            +
            +                        if( _p._model.bclDisableToggle( _sp ) ){
            +                            _sp.attr('disabled', !_isDisable);
            +                        }else{
            +                            _sp.attr('disabled', _isDisable);
            +                        }
            +                        JC.Valid && JC.Valid.setValid( _sp );
            +
            +                        if( _sp.is( '[bclHideTargetSub]' ) ){
            +                            var _starget = JC.f.parentSelector( _sp, _sp.attr( 'bclHideTargetSub' ) );
            +                            if( !( _starget && _starget.length ) ) return;
            +                            if( _isDisable ){
            +                                _starget.hide();
            +                            }else{
            +                               if( _sp.prop('checked') ){
            +                                    _starget.show();
            +                                }else{
            +                                    _starget.hide();
            +                                }
            +                            }
            +                        }
            +                    });
            +                }
            +
            +                if( _bclHideTarget &&  _bclHideTarget.length  ){
            +                    _bclHideTarget.each( function(){
            +                        var _display = _p._model.bclHideToggle( $(this) ) ? !_bclDisplay : _bclDisplay, _sp = $( this );
            +                        if( _display ){
            +                            if( _p._model.bclShowToggleFilter( _triggerItem ) ){
            +                                if( _sp.is( _p._model.bclShowToggleFilter( _triggerItem ) ) ){
            +                                    _sp.hide();
            +                                }else{
            +                                    _sp.show();
            +                                }
            +                            }else{
            +                                _sp.show();
            +                            }
            +                        }else{
            +                            _sp.hide();
            +                        };
            +                        //JC.log( _display, new Date().getTime() );
            +                    });
            +                }
            +
            +                _isDisable 
            +                    ? $( _p ).trigger( 'TriggerEvent', [ 'DisableItem', _triggerItem ] )
            +                    : $( _p ).trigger( 'TriggerEvent', [ 'EnableItem', _triggerItem ] )
            +                    ;
            +
            +                $( _p ).trigger( 'TriggerEvent', [ 'ChangeDone', _triggerItem ] );
            +
            +                //JC.log( 'ChangeLogic view change', new Date().getTime(), _isDisable );
            +            }
            +    };
            +
            +    $(document).ready( function(){
            +        setTimeout( function(){
            +            ChangeLogic.init();
            +        }, 10);
            +    });
            +    
            +    return Bizs.ChangeLogic;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_CommonModify_CommonModify.js.html b/docs_api/files/.._bizs_CommonModify_CommonModify.js.html index e44e1f4e5..d07df2f7a 100644 --- a/docs_api/files/.._bizs_CommonModify_CommonModify.js.html +++ b/docs_api/files/.._bizs_CommonModify_CommonModify.js.html @@ -3,11 +3,17 @@ ../bizs/CommonModify/CommonModify.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,11 +252,14 @@

            File: ../bizs/CommonModify/CommonModify.js

            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
             /**
              * <h2>Dom 通用 添加删除 逻辑</h2>
              * <br/>应用场景
              * <br/>需要动态添加删除内容的地方可以使用这个类
            - *
            + * <p><b>require</b>: 
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
              * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
              * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.CommonModify.html' target='_blank'>API docs</a>
              * | <a href='../../bizs/CommonModify/_demo' target='_blank'>demo link</a></p>
            @@ -208,60 +283,60 @@ 

            File: ../bizs/CommonModify/CommonModify.js

            * <dt>cmdonecallback = function</dt> * <dd> * 添加或删除完后会触发的回调, <b>window 变量域</b> -<xmp>function cmdonecallback( _ins, _boxParent ){ +<pre>function cmdonecallback( _ins, _boxParent ){ var _trigger = $(this); JC.log( 'cmdonecallback', new Date().getTime() ); -}</xmp> +}</pre> * </dd> * * <dt>cmtplfiltercallback = function</dt> * <dd> * 模板内容过滤回调, <b>window 变量域</b> -<xmp>window.COUNT = 1; +<pre>window.COUNT = 1; function cmtplfiltercallback( _tpl, _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmtplfiltercallback', new Date().getTime() ); - _tpl = printf( _tpl, COUNT++ ); + _tpl = JC.f.printf( _tpl, COUNT++ ); return _tpl; -}</xmp> +}</pre> * </dd> * * <dt>cmbeforeaddcallabck = function</dt> * <dd> * 添加之前的回调, 如果返回 false, 将不执行添加操作, <b>window 变量域</b> -<xmp>function cmbeforeaddcallabck( _cmitem, _boxParent ){ +<pre>function cmbeforeaddcallabck( _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmbeforeaddcallabck', new Date().getTime() ); //return false; -}</xmp> +}</pre> * </dd> * * <dt>cmaddcallback = function</dt> * <dd> * 添加完成的回调, <b>window 变量域</b> -<xmp>function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){ +<pre>function cmaddcallback( _ins, _newItem, _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmaddcallback', new Date().getTime() ); -}</xmp> +}</pre> * </dd> * * <dt>cmbeforedelcallback = function</dt> * <dd> * 删除之前的回调, 如果返回 false, 将不执行删除操作, <b>window 变量域</b> -<xmp>function cmbeforedelcallback( _cmitem, _boxParent ){ +<pre>function cmbeforedelcallback( _cmitem, _boxParent ){ var _trigger = $(this); JC.log( 'cmbeforedelcallback', new Date().getTime() ); //return false; -}</xmp> +}</pre> * </dd> * * <dt>cmdelcallback = function</dt> * <dd> * 删除完成的回调, <b>window 变量域</b> -<xmp>function cmdelcallback( _ins, _boxParent ){ +<pre>function cmdelcallback( _ins, _boxParent ){ JC.log( 'cmdelcallback', new Date().getTime() ); -}</xmp> +}</pre> * </dd> * * <dt>cmMaxItems = int</dt> @@ -330,7 +405,6 @@

            File: ../bizs/CommonModify/CommonModify.js

            </tr> </script> */ -;(function($){ window.Bizs.CommonModify = CommonModify; function CommonModify( _selector ){ @@ -482,12 +556,12 @@

            File: ../bizs/CommonModify/CommonModify.js

            , cmtemplate: function(){ var _r = '', _tmp; - _tmp = parentSelector( this.selector(), this.selector().attr('cmtemplate') ); - !( _tmp && _tmp.length ) && ( _tmp = parentSelector( this.selector(), this.selector().attr('cmtpl') ) ); + _tmp = JC.f.parentSelector( this.selector(), this.selector().attr('cmtemplate') ); + !( _tmp && _tmp.length ) && ( _tmp = JC.f.parentSelector( this.selector(), this.selector().attr('cmtpl') ) ); this.selector() && ( _tmp && _tmp.length ) - && ( _r = scriptContent( _tmp ) ) + && ( _r = JC.f.scriptContent( _tmp ) ) ; return _r; } @@ -533,7 +607,7 @@

            File: ../bizs/CommonModify/CommonModify.js

            , cmOutRangeMsg: function(){ - var _r = printf( this.attrProp( 'cmOutRangeMsg' ) ||'最多只能上传 {0}个文件!', this.cmMaxItems() ); + var _r = JC.f.printf( this.attrProp( 'cmOutRangeMsg' ) ||'最多只能上传 {0}个文件!', this.cmMaxItems() ); return _r; } @@ -594,7 +668,7 @@

            File: ../bizs/CommonModify/CommonModify.js

            var _r, _tmp; this.selector() && ( _tmp = this.selector().attr('cmitem') ) - && ( _r = parentSelector( this.selector(), _tmp ) ) + && ( _r = JC.f.parentSelector( this.selector(), _tmp ) ) ; return _r; } @@ -658,7 +732,7 @@

            File: ../bizs/CommonModify/CommonModify.js

            default: _item.after( _newItem ); break; } - window.jcAutoInitComps && jcAutoInitComps( _newItem ); + JC.f.autoInit && JC.f.autoInit( _newItem ); $( _p ).trigger( 'TriggerEvent', [ 'add', _newItem, _boxParent ] ); $( _p ).trigger( 'TriggerEvent', [ 'done', _newItem, _boxParent ] ); @@ -687,10 +761,21 @@

            File: ../bizs/CommonModify/CommonModify.js

            $(document).delegate( 'a.js_autoCommonModify, button.js_autoCommonModify' + ', a.js_bizsCommonModify, button.js_bizsCommonModify', 'click', function( _evt ){ - CommonModify.getInstance().process( $(this) ); + var _p = $( this ); + _p.prop( 'nodeName' ).toLowerCase() == 'a' && _evt.preventDefault(); + CommonModify.getInstance().process( _p ); }); -}(jQuery)); + return Bizs.CommonModify; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._bizs_CustomColumn_CustomColumn.js.html b/docs_api/files/.._bizs_CustomColumn_CustomColumn.js.html new file mode 100644 index 000000000..636943904 --- /dev/null +++ b/docs_api/files/.._bizs_CustomColumn_CustomColumn.js.html @@ -0,0 +1,769 @@ + + + + + ../bizs/CustomColumn/CustomColumn.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/CustomColumn/CustomColumn.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Panel', 'JC.Valid', 'Bizs.FormLogic' ], function(){
            + if( JC.use ){
            +     !JC.Panel && JC.use( 'JC.Panel' );
            +     !JC.Valid && JC.use( 'JC.Valid' );
            +     !Bizs.FormLogic && JC.use( 'Bizs.FormLogic' );
            + }
            +
            +/**
            + * 组件用途简述
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.Panel.html'>JC.Panel</a>
            + *      , <a href='JC.Valid.html'>JC.Valid</a>
            + *      , <a href='Bizs.FormLogic.html'>Bizs.FormLogic</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.CustomColumn.html' target='_blank'>API docs</a>
            + *      | <a href='../../bizs/CustomColumn/_demo' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会自动处理 div class="js_bizCustomColumn" </h2>
            + *
            + *  <h2>可用的 HTML attribute</h2>
            + *
            + *  <dl>
            + *      <dt>[ data-url | data-query ] = url</dt>
            + *      <dd>提交数据的URL<dd>
            + *
            + *      <dt>data-data = json var name</dt>
            + *      <dd>自定义列的数据 变量名, <b>window 变量域</b></dd>
            + *
            + *      <dt>data-scriptData = script selector</dt>
            + *      <dd>脚本数据</dd>
            + *
            + *      <dt>data-id = string</dt>
            + *      <dd>{id}占位符的数值</dd>
            + *
            + *      <dt>data-minCol = int</dt>
            + *      <dd>最小需要选择多少列</dd>
            + *
            + *      <dt>data-maxCol = int</dt>
            + *      <dd>最多只能选择多少列</dd>
            + *
            + *      <dt>data-name = string</dt>
            + *      <dd>数据复选框的 name</dd>
            + *
            + *      <dt>data-saveSelector = selector</dt>
            + *      <dd>保存所要复选框值的选择器</dd>
            + *
            + *      <dt>data-tpl = script tpl</dt>
            + *      <dd>显示弹框的脚本模板</dd>
            + *
            + *      <dt>data-formDoneCallback = window function name</dt>
            + *      <dd>自定义提交数据后的响应函数</dd>
            + *
            + *      <dt>data-formAfterProcessCallback = window function name</dt>
            + *      <dd>自定义表单提交前的校验函数</dd>
            + *  </dl> 
            + *
            + * @namespace   window.Bizs
            + * @class       CustomColumn
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <h2>Bizs.CustomColumn 示例</h2>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    Bizs.CustomColumn = CustomColumn;
            +
            +    function CustomColumn( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, CustomColumn ) ) 
            +            return JC.BaseMVC.getInstance( _selector, CustomColumn );
            +
            +        JC.BaseMVC.getInstance( _selector, CustomColumn, this );
            +
            +        this._model = new CustomColumn.Model( _selector );
            +        this._view = new CustomColumn.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( CustomColumn.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 CustomColumn 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of CustomColumnInstance}
            +     */
            +    CustomColumn.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_bizCustomColumn' )  ){
            +                    _r.push( new CustomColumn( _selector ) );
            +                }else{
            +                    _selector.find( 'a.js_bizCustomColumn, button.js_bizCustomColumn' ).each( function(){
            +                        _r.push( new CustomColumn( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    CustomColumn.ID_COUNT = 1;
            +
            +    window.BizsCustomColumnFormDoneCallback =
            +        function( _json, _submitButton, _ins ){
            +               var _form = $(this), _panel;
            +               if( _json.errorno ){
            +                   _panel = JC.alert( _json.errmsg || '操作失败, 请重新尝试!', _submitButton, 1 );
            +               }else{
            +                   _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){
            +                       JC.f.reloadPage( _ins._model.formAjaxDoneAction() || JC.f.urlDetect( 'URL' ) );
            +                   });
            +               }
            +        };
            +
            +    window.BizsCustomColumnFormAfterProcessCallback =
            +        function formAfterProcess( _evt, _ins ){
            +           var _form = $(this)
            +               , _panel = JC.f.parentSelector( _form, 'div.UPanel' )
            +               , _cc
            +               ;
            +           if( !_panel ) return;
            +           _panel = JC.Panel.getInstance( _panel );
            +           if( !_panel ) return;
            +           _cc = _panel.CustomColumnIns;
            +           if( !_cc ) return;
            +
            +           var _saveSelector = _cc._model.saveSelector(), _tmp, _selected;
            +           if( _saveSelector && _saveSelector.length ){
            +               _tmp = [];
            +               _selected = _panel.selector().find( 'input.js_typeItem:checked' );
            +
            +               _cc.trigger( 'update_selected_status' );
            +
            +               if( _selected.length < _cc._model.minCol() ){
            +                   return false;
            +               }
            +
            +               if( _selected.length > _cc._model.maxCol() ){
            +                   return false;
            +               }
            +               
            +               _selected.each( function(){
            +                   _tmp.push( $( this ).val().trim() );
            +               });
            +               _saveSelector.val( _tmp.join(',') );
            +           }
            +        };
            +
            +    JC.BaseMVC.build( CustomColumn );
            +
            +    JC.f.extendObject( CustomColumn.prototype, {
            +        _beforeInit:
            +            function(){
            +                JC.log( 'CustomColumn _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +                });
            +
            +                _p.on( 'showPopup', function(){
            +                    _p._view.showPopup();
            +                });
            +
            +                _p.on( 'hidePopup', function(){
            +                    _p.view.hidePopup();
            +                });
            +
            +                _p.on( 'panel_inited', function( _evt, _panel ){
            +                    _p._model.currentPanel( _panel );
            +                    _panel.CustomColumnIns = _p;
            +                });
            +
            +                _p.on( 'update_default', function( _evt, _panel ){
            +                    _panel.selector().find( 'input.js_typeItem' ).each( function(){
            +                        var _sp = $( this )
            +                            , _dataItem = _p._model.data()[ _sp.attr( 'data-topIndex' ) ].content[ _sp.attr( 'data-subIndex' ) ]
            +                            ;
            +                        if( _dataItem.isdefault ){
            +                            _sp.prop( 'checked', true );
            +                        }else{
            +                            _sp.prop( 'checked', false );
            +                        }
            +                    });
            +                });
            +
            +                _p.on( 'update_custom', function( _evt, _panel ){
            +                    _panel.selector().find( 'input.js_typeItem' ).each( function(){
            +                        var _sp = $( this )
            +                            , _dataItem = _p._model.data()[ _sp.attr( 'data-topIndex' ) ].content[ _sp.attr( 'data-subIndex' ) ]
            +                            ;
            +                        if( _dataItem.ison ){
            +                            _sp.prop( 'checked', true );
            +                        }else{
            +                            _sp.prop( 'checked', false );
            +                        }
            +                    });
            +                });
            +
            +                _p.on( 'update_selected_status', function(){
            +                        var _panel = _p._model.currentPanel(), _selected, _em = _panel.find( 'em.js_bccErrEm' );
            +                       _selected = _panel.selector().find( 'input.js_typeItem:checked' );
            +
            +                       if( _selected.length < _p._model.minCol() ){
            +                           _em.html( '请选择数据列, 最少需要选择' + _p._model.minCol() + '个数据列!' ).show();
            +                           return;
            +                       }
            +
            +                       if( _selected.length > _p._model.maxCol() ){
            +                           _em.html( '最多只能选择' + _p._model.maxCol() + '个数据列!' ).show();
            +                           return;
            +                       }
            +                       _em.hide();
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                JC.log( 'CustomColumn _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +
            +        , show: function(){ this.trigger( 'showPopup' ); }
            +        , hide: function(){ this.trigger( 'hidePopup' ); }
            +        , close: function(){ this.trigger( 'hidePopup' ); }
            +    });
            +
            +    CustomColumn.Model._instanceName = 'JCCustomColumn';
            +    JC.f.extendObject( CustomColumn.Model.prototype, {
            +        init:
            +            function(){
            +                JC.log( 'CustomColumn.Model.init:', new Date().getTime() );
            +                this._gid = 'CustomColumnIns_' + CustomColumn.ID_COUNT;
            +                CustomColumn.ID_COUNT++;
            +            }
            +
            +        , currentPanel:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._currentPanel = _setter );
            +                return this._currentPanel;
            +            }
            +
            +        , gid: function(){ return this._gid; }
            +
            +        , url:
            +            function(){
            +                var _r = this.attrProp( 'data-query') || this.attrProp( 'data-url' ) || '?';
            +                return _r;
            +            }
            +
            +        , id:
            +            function(){
            +                var _r = this.attrProp( 'pagename') || this.attrProp( 'data-id' ) || '';
            +                return _r;
            +            }
            +
            +        , name:
            +            function(){
            +                var _r = this.attrProp( 'data-name' ) || 'selectedItem';
            +                return _r;
            +            }
            +
            +        , data:
            +            function(){
            +                if( !this._data ){
            +                    this.is( '[data-data]' ) && ( this._data = this.windowProp( 'data-data' ) );
            +                    this.is( '[data-scriptData]' ) && ( this._data = this.scriptDataProp( 'data-scriptData' ) );
            +                }
            +                return this._data;
            +            }
            +
            +        , typeSelector:
            +            function(){
            +                return this.attrProp( 'data-typeSelector' ) || 'js_selectType';
            +            }
            +
            +        , saveSelector:
            +            function(){
            +                if( this.is( '[data-saveSelector]' ) ){
            +                    return this.selectorProp( 'data-saveSelector' ) ;
            +                }else{
            +                    return this.selector().find( 'input.js_saveSelector' );
            +                }
            +            }
            +
            +        , maxCol: 
            +            function(){
            +                return this.intProp( 'data-maxCol' ) || 20;
            +            }
            +
            +        , minCol: 
            +            function(){
            +                return this.intProp( 'data-minCol' ) || 1;
            +            }
            +
            +        , tpl:
            +            function(){
            +                if( !this._tpl ){
            +                    this.is( '[data-tpl]' ) && ( this._tpl = this.scriptTplProp( 'data-tpl' ) );
            +                }
            +                return this._tpl;
            +            }
            +
            +        , formDoneCallback:
            +            function(){
            +                var _r = 'BizsCustomColumnFormDoneCallback';
            +                this.attrProp( 'data-formDoneCallback' ) 
            +                    && this.windowProp( 'data-formDoneCallback' ) 
            +                    && ( _r = this.attrProp( 'data-formDoneCallback' ) );
            +                return _r;
            +            }
            +
            +        , formAfterProcessCallback:
            +            function(){
            +                var _r = 'BizsCustomColumnFormAfterProcessCallback';
            +                this.attrProp( 'data-formAfterProcessCallback' ) 
            +                    && this.windowProp( 'data-formAfterProcessCallback' ) 
            +                    && ( _r = this.attrProp( 'data-formAfterProcessCallback' ) );
            +                return _r;
            +            }
            +
            +        , isDefault:
            +            function(){
            +                var _r = true, _p = this;
            +                $.each( _p.data(), function( _k, _item ){
            +                    $.each( _item.content, function( _sk, _sitem ){
            +                        if( ( _sitem.ison && !_sitem.isdefault ) || ( !( _sitem.ison || _sitem.dftchk ) && _sitem.isdefault ) ){
            +                            return _r = false;
            +                        }
            +                    });
            +                    if( !_r ) return false;
            +                });
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( CustomColumn.View.prototype, {
            +        init:
            +            function(){
            +                JC.log( 'CustomColumn.View.init:', new Date().getTime() );
            +            }
            +
            +        , showPopup:
            +            function(){
            +                var _p = this
            +                    , _tpl = _p._model.tpl()
            +                    , _panel
            +                    , _columns = []
            +                    , _isDefault = _p._model.isDefault()
            +                    ;
            +
            +                $.each( _p._model.data(), function( _k, _item ){
            +                    _columns.push( '<dl>' );
            +                    _columns.push( '<dt>' );
            +                    _item.name && ( _columns.push( _item.groupName  ) );
            +                    _columns.push( '</dt>' );
            +                    _columns.push( '<dd>' );
            +
            +                    if( _item.content ){
            +                        _columns.push( '<ul>' );
            +                        $.each( _item.content, function( _sk, _sitem ){
            +
            +                            if( !_sitem ){
            +                                return;
            +                            }
            +
            +                            var _isChecked = '', _dftchk = '', _class = '';
            +
            +                            _sitem.isdefault && ( _class = 'js_isDefaultItem' );
            +
            +                            if( _isDefault ){
            +                                _sitem.isdefault && ( _isChecked = ' checked="checked" ' );
            +                            }else{
            +                                _sitem.ison && ( _isChecked = ' checked="checked" ' );
            +                            }
            +
            +                            if( _sitem.isdefault && _sitem.dftchk ) {
            +                                ( _isChecked += ' disabled="disabled" ' );
            +                                _dftchk = '<input name="{3}" value="{1}" type="hidden" class="">';
            +                            }
            +
            +                            _columns.push( JC.f.printf( '<li><label><input name="{3}" value="{1}" '
            +                                + ' '
            +                                + ' type="checkbox" data-topIndex="{6}" data-subIndex="{7}" class="js_typeItem {5}" {4}>&nbsp;{2}{0}</label></li>'
            +                                , _dftchk
            +                                , _sitem.name, _sitem.title
            +                                , _p._model.name()
            +                                , _isChecked
            +                                , _class
            +                                , _k, _sk
            +                            ));
            +                        });
            +                        _columns.push( '</ul>' );
            +                    }
            +
            +                    _columns.push( '</dd>' );
            +                    _columns.push( '</dl>' );
            +                });
            +
            +                _tpl = JC.f.printKey( _tpl, { 
            +                    id: _p._model.id()
            +                    , url: _p._model.url()
            +                    , content: _columns.join( '' )
            +                    , formDoneCallback: _p._model.formDoneCallback()
            +                    , formAfterProcessCallback: _p._model.formAfterProcessCallback()
            +                } );
            +
            +                _panel = JC.Dialog( _tpl );
            +                _p.trigger( 'panel_inited', [ _panel ] );
            +
            +                if( _isDefault ){
            +                    _panel.find( 'input.js_defaultType' ).prop( 'checked', true );
            +                }else{
            +                    _panel.find( 'input.js_customType' ).prop( 'checked', true );
            +                }
            +
            +                _panel.find( 'input.js_customType' ).on( 'click', function( _sevt ){
            +                    if( _p._model.isDefault() ){
            +                        return false;
            +                    }
            +                    _p.trigger( 'update_custom', [ _panel ] );
            +                    _p.trigger( 'update_selected_status' );
            +                });
            +
            +                _panel.selector().delegate( 'input.js_selectType', 'change', function(){
            +                    var _sp = $( this );
            +                    if( _sp.val() != 'default' ) return;
            +                    _p.trigger( 'update_default', [ _panel ] );
            +                    _p.trigger( 'update_selected_status' );
            +                });
            +
            +                _panel.selector().delegate( 'input.js_typeItem', 'change', function(){
            +                    var _sp = $( this )
            +                        , _dataItem = _p._model.data()[ _sp.attr( 'data-topIndex' ) ].content[ _sp.attr( 'data-subIndex' ) ]
            +                        ;
            +                    if( _sp.prop( 'checked' ) ){
            +                        _dataItem.ison = true;
            +                    }else{
            +                        _dataItem.ison = false;
            +                    }
            +
            +                    if( _p._model.isDefault() ){
            +                        _panel.find( 'input.js_defaultType' ).prop( 'checked', true );
            +                    }else{
            +                        _panel.find( 'input.js_customType' ).prop( 'checked', true );
            +                    }
            +
            +                    _p.trigger( 'update_selected_status' );
            +                });
            +
            +                
            +            }
            +    });
            +
            +    _jdoc.ready( function(){
            +        /*
            +        JC.f.safeTimeout( function(){
            +            CustomColumn.autoInit && CustomColumn.init();
            +        }, null, 'CustomColumnasdfae', 1 );
            +        */
            +
            +        $( document ).delegate( 'button.js_bizCustomColumn, a.js_bizCustomColumn', 'click', function(){
            +            var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, CustomColumn );
            +            if( !_ins ){
            +                _ins = new CustomColumn( _p );
            +            }
            +            _ins && _ins.show();
            +        });
            +    });
            +
            +    return Bizs.CustomColumn;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_DMultiDate_DMultiDate.js.html b/docs_api/files/.._bizs_DMultiDate_DMultiDate.js.html new file mode 100644 index 000000000..fc3b6e5bd --- /dev/null +++ b/docs_api/files/.._bizs_DMultiDate_DMultiDate.js.html @@ -0,0 +1,1093 @@ + + + + + ../bizs/DMultiDate/DMultiDate.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/DMultiDate/DMultiDate.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Calendar' ], function(){
            +    window.Bizs.DMultiDate = DMultiDate;
            +    /**
            +     * DMultiDate 复合日历业务逻辑
            +     * <br/> Dom 加载后会自动加载页面上所有.js_autoDMultiDate的标签
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *      , <a href='JC.Calendar.html'>JC.Calendar</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.DMultiDate.html' target='_blank'>API docs</a>
            +     * | <a href='../../bizs/DMultiDate/_demo/' target='_blank'>demo link</a></p>
            +     *
            +     * <h2>可用的html属性</h2>
            +     * <dl>
            +     *    <dt>mddate = css selector</dt>
            +     *    <dd>声明日期input[type=text][datatype=daterange]的标签<br/>
            +     *        如果缺省则自动查找子元素.js_multidate</dd>
            +     *
            +     *    <dt>mdstartdate = css selector</dt>
            +     *    <dd>声明开始日期的隐藏域标签, 默认查找子元素.js_startdate</dd>
            +     *
            +     *    <dt>mdenddate = css selector</dt>
            +     *    <dd>声明结束日期的隐藏域标签, 默认查找子元素.js_enddate</dd>
            +     *
            +     *    <dt>mddayrange = num</dt>
            +     *    <dd>声明时间粒度为日时,最长可选取多少天,如果不需要则不声明此属性</dd>
            +     *
            +     *    <dt>mdweekrange = num</dt>
            +     *    <dd>声明时间粒度为周时,最长可选取多少周,如果不需要则不声明此属性</dd>
            +     *
            +     *    <dt>mdmonthrange = num</dt>
            +     *    <dd>声明时间粒度为月时,最长可选取多少月,如果不需要则不声明此属性</dd>
            +     *
            +     *    <dt>mdseasonrange = num</dt>
            +     *    <dd>声明时间粒度为季时,最长可选取多少季,如果不需要则不声明此属性</dd>
            +     *
            +     *    <dt>mdyearrange = num</dt>
            +     *    <dd>声明时间粒度为年时,最长可选取多少年,如果不需要则不声明此属性</dd>
            +     *
            +     *    <dt>mdIgnoreUrlFill = bool, default = false</dt>
            +     *    <dd>是否忽略 URL 自动填充</dd>
            +     *
            +     * </dl>
            +     *
            +     * @class   DMultiDate
            +     * @namespace   window.Bizs
            +     * @constructor
            +     * @private
            +     * @version dev 0.1 2014-03-03
            +     * @author  zuojing   <zuojing1013@gmail.com> | 75 Team
            +     */
            +    function DMultiDate( _selector ){
            +        if( DMultiDate.getInstance( _selector ) ) return DMultiDate.getInstance( _selector );
            +        DMultiDate.getInstance( _selector, this );
            +
            +        this._model = new DMultiDate.Model( _selector );
            +        this._view = new DMultiDate.View( this._model );
            +
            +        this._init();    
            +    }
            +    
            +    DMultiDate.prototype = {
            +        _beforeInit: function () {
            +            this._model.mddateEl().attr( 'ignoreInitCalendarDate', 'true' ).data( 'ignoreInitCalendarDate', true );
            +            DMultiDate.Model._defaultMaxvalue = this._model.mddateEl().eq(0).attr('maxvalue') || '';
            +            DMultiDate.Model._defaultMinvalue = this._model.mddateEl().eq(1).attr('minvalue') || '';
            +        },
            +
            +        _initHanlderEvent: function () {
            +            var _p = this,
            +                _count = DMultiDate.Model._inscount++,
            +                _updatestartcb = 'Bizs.DMultiDate_update_start' + _count,
            +                _updateendcb = 'Bizs.DMultiDate_update_end' + _count,
            +                _showstartcb = 'Bizs.DMultiDate_show_start' + _count,
            +                _showendcb = 'Bizs.DMultiDate_show_end' + _count,
            +                _hidestartcb = 'Bizs.DMultiDate_hide_start' + _count,
            +                _hideendcb = 'Bizs.DMultiDate_hide_end' + _count,
            +                _layoutchangestartcb = 'Bizs.DMultiDate_layoutchange_start' + _count,
            +                _layoutchangeendcb = 'Bizs.DMultiDate_layoutchange_end' + _count,
            +                _clearstartcb = 'Bizs.DMultiDate_clear_start' + _count,
            +                _clearendcb = 'Bizs.DMultiDate_clear_end' + _count,
            +                _parseweekdate = 'parsedateweek',
            +                _parsemonthdate = 'parsedatemonth',
            +                _parseseasondate = 'parsedateseason',
            +                _parseyeardate = 'parsedateyear';
            +
            +            //如果url上有参数则回填到html tag的value;
            +            _p._initDefaultData();
            +
            +            _p._model.calendarTypeEl().on('change', function (_evt, _flag) {
            +
            +                var _sp = $(this),
            +                    _type = _sp.val();
            +
            +                //日期日历类型crm后端用的是day类型,这里作一下转换
            +                if (_type === 'day') _type = 'date';
            +
            +                _p._model.updatemddateElProp(_type);
            +
            +                /**
            +                 *更新日历的类型day/week/season/year
            +                 *日历输入框,及隐藏域的值清空
            +                 *打开第一个日历输入框的日历面板
            +                 */
            +
            +                if( _type == 'custom' || _type == 'customized' ){
            +                    _p._model.lastIptBox().show();
            +                }else{
            +                    _p._model.lastIptBox().hide();
            +                }
            +
            +                if (_flag) return; 
            +
            +                setTimeout( function () {
            +                    _p._model.setmddate('');
            +                    _p._model.setHiddenStartdate('');
            +                    _p._model.setHiddenEnddate('');
            +                    Calendar.pickDate(_p._model.mddateEl().eq(0)[0]);
            +                }, 10);
            +
            +            });
            +
            +            _p._model.mddateEl().eq(0)
            +                .attr('calendarupdate', _updatestartcb)
            +                .attr('calendarshow', _showstartcb)
            +                .attr('calendarhide', _hidestartcb)
            +                .attr('calendarlayoutchange', _layoutchangestartcb)
            +                .attr('calendarclear', _clearstartcb);
            +
            +            _p._model.mddateEl().eq(1)
            +                .attr('calendarupdate', _updateendcb)
            +                .attr('calendarshow', _showendcb)
            +                .attr('calendarhide', _hideendcb)
            +                .attr('calendarlayoutchange', _layoutchangeendcb)
            +                .attr('calendarclear', _clearendcb);
            +
            +            window[_updatestartcb] = function (_d, _dend, _ins) {
            +                console.log("_updatestartcb", JC.f.formatISODate(_d), JC.f.formatISODate(_dend));
            +                var _mddateEl = _p._model.mddateEl(),
            +                    _type = _p._model.calendarType(),
            +                    _newmaxdate = JC.f.cloneDate(_d),
            +                    _curmaxdate = DMultiDate.Model._defaultMaxvalue,
            +                    _range;
            +
            +                _d = JC.f.formatISODate(_d);
            +                _curmaxdate && (_curmaxdate = JC.f.dateDetect(_curmaxdate));
            +
            +                switch ( _type ) {
            +                    case 'week':
            +                        _range = _p._model.weekrange();
            +                        _range && _newmaxdate.setDate( _newmaxdate.getDate() + (_range - 1) * 7 + 6);
            +                        break;
            +
            +                    case 'month':
            +                        _range = _p._model.monthrange();
            +                        
            +                        if (_range) {
            +                            _newmaxdate.setMonth( _newmaxdate.getMonth() + (_range - 1) );
            +                            _newmaxdate.setDate(JC.f.maxDayOfMonth(_newmaxdate));
            +                        }
            +                       
            +                        break;
            +
            +                    case 'season':
            +                    //case 'quarter':
            +                        _range = _p._model.seasonrange();
            +                        
            +                        if (_range) {
            +                            _newmaxdate.setMonth( _newmaxdate.getMonth() + (_range - 1) * 3  + 2 );
            +                            _newmaxdate.setDate(JC.f.maxDayOfMonth(_newmaxdate));
            +                        }
            +
            +                        break;
            +
            +                    case 'year':
            +                        _range = _p._model.yearrange();
            +                        _range && _newmaxdate.setYear( _newmaxdate.getFullYear() + _range - 1 );
            +                        break;
            +
            +                    case 'custom': 
            +                    case 'customized':
            +                        _range = _p._model.dayrange();
            +                        _range && _newmaxdate.setDate( _newmaxdate.getDate() + _range - 1 );
            +                        break;
            +
            +                    case 'date':
            +                    default:
            +                        _range = _p._model.dayrange();
            +                        _range && _newmaxdate.setDate( _newmaxdate.getDate() + _range - 1 );
            +                }
            +
            +                if ( _range ) {
            +
            +                    if ( _curmaxdate && ( _curmaxdate.getTime() <= _newmaxdate.getTime() ) ) {
            +                        _newmaxdate = _curmaxdate;
            +                    }
            +
            +                    _mddateEl.eq(1)
            +                        .attr('maxvalue', JC.f.formatISODate(_newmaxdate))
            +                        .attr('minvalue', _d)
            +                        .attr('defaultdate', _d);
            +                }
            +                _p._model.setHiddenStartdate(_d);
            +
            +                var _tmpNum = 0;
            +                $.each( _p._model.mddateEl(), function( _i, _item ){ 
            +                    if( !$( _item ).is(":hidden") ){
            +                        _tmpNum++;
            +                    }
            +                } );
            +
            +                if ( _tmpNum == 1 ) {
            +                    _p._model.setHiddenEnddate(JC.f.formatISODate(_dend));
            +                } else {
            +                    if (!_p._model.mddateEl().eq(1).is('reqmsg') &&  !_p._model.hiddenEnddateEl().val() ) {
            +                        _p._model.setHiddenEnddate(JC.f.formatISODate(_dend));
            +                    }
            +                }
            +            };
            +
            +            window[_updateendcb] = function (_d,_dend, _ins) {
            +                var _mddateEl = _p._model.mddateEl(),
            +                    _type = _p._model.calendarType(),
            +                    _mindate = new Date(_d.getFullYear(), _d.getMonth(), _d.getDate()),
            +                    _curmindate = DMultiDate.Model._defaultMinvalue,
            +                    _range,
            +                    _temp = new Date(_d.getFullYear(), _d.getMonth(), _d.getDate());
            +
            +                _curmindate && (_curmindate = JC.f.dateDetect(_curmindate));
            +
            +                switch (_type) {
            +                    case 'week':
            +                        _range = _p._model.weekrange();
            +                        _range && _mindate.setDate( _mindate.getDate() - (_range - 1) * 7 );
            +                        break;
            +
            +                    case 'month':
            +                        _range = _p._model.monthrange();
            +                        _range && (_mindate.setMonth( _mindate.getMonth() - (_range - 1) ) && _temp.setDate(JC.f.maxDayOfMonth(_d)));
            +                        break;
            +
            +                    case 'season':
            +                    //case 'quarter':
            +                        _range = _p._model.seasonrange();
            +                        _range && (_mindate.setMonth( _mindate.getMonth() - (_range - 1) * 3 ));
            +                        break;
            +
            +                    case 'year':
            +                        _range = _p._model.yearrange();
            +                        _range && (_mindate.setYear( _mindate.getFullYear() - _range + 1 ));
            +                        break;
            +
            +                    case 'custom':
            +                    case 'customized':
            +                        _range = _p._model.dayrange();
            +                        _range && _mindate.setDate(_mindate.getDate() - _range + 1  );    
            +                        break;
            +
            +                    case 'date':
            +                    default:
            +                        _range = _p._model.dayrange();
            +                        _range && _mindate.setDate(_mindate.getDate() - _range + 1  );    
            +                }
            +
            +                if (_range) {
            +
            +                    if ( _curmindate && _curmindate.getTime() > _mindate.getTime() ) {
            +                        _mindate = _curmindate;
            +                    }
            +
            +                    _mindate = JC.f.formatISODate(_mindate);
            +                    _mddateEl.eq(0)
            +                        .attr('maxvalue', JC.f.formatISODate(_temp))
            +                        .attr('minvalue', _mindate)
            +                        .attr('defaultdate', _mindate);
            +                }
            +
            +                _p._model.setHiddenEnddate(JC.f.formatISODate(_dend));
            +                if (!_p._model.mddateEl().eq(0).is('reqmsg') && !_p._model.hiddenStartdateEl().val() ) {
            +                    _p._model.setHiddenStartdate(JC.f.formatISODate(_d));
            +                }
            +            };
            +
            +            window[_showstartcb] = function () {
            +        
            +                var _layout = $('body > div.UXCCalendar:visible');
            +                
            +                _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') );
            +            };
            +
            +            window[_showendcb] = function () {
            +                var _layout = $('body > div.UXCCalendar:visible');
            +            
            +                _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') );
            +            };
            +            
            +            window[_hidestartcb] = function () {
            +                JC.Tips && JC.Tips.hide();
            +                if (!_p._model.hiddendateiso()) {
            +                    _p._model.updateHiddenStartdate();
            +                }
            +                
            +            };
            +
            +            window[_hideendcb] = function () {
            +                JC.Tips && JC.Tips.hide();
            +                if (!_p._model.hiddendateiso()) {
            +                    _p._model.updateHiddenEnddate();
            +                }
            +            };
            +
            +            window[_layoutchangestartcb] = function () {
            +                JC.Tips && JC.Tips.hide();
            +                var _layout = $('body > div.UXCCalendar:visible');
            +                _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') );
            +            };
            +
            +            window[_layoutchangeendcb] = function () {
            +                JC.Tips && JC.Tips.hide();
            +                var _layout = $('body > div.UXCCalendar:visible');
            +                _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') );
            +            };
            +
            +            window[_clearstartcb] = function ( _selector, _ins ) {
            +                var _enddateEl = _p._model.mddateEl().eq(1),
            +                    _maxdate = DMultiDate.Model._defaultMaxvalue,
            +                    _mindate = DMultiDate.Model._defaultMinvalue;
            +
            +                if ( _maxdate ) {
            +                    _enddateEl.attr('maxvalue', _maxdate)
            +                        .attr('defaultdate', _maxdate );
            +                } else {
            +                    _enddateEl.removeAttr('maxvalue')
            +                        .removeAttr('defaultdate');
            +                }
            +
            +                if ( _mindate ) {
            +                    _enddateEl.attr('minvalue', _mindate);
            +                } else {
            +                    _enddateEl.removeAttr('minvalue');
            +                }
            +                    
            +            };
            +
            +            window[_clearendcb] = function () {
            +                var _enddateEl = _p._model.mddateEl().eq(0),
            +                    _maxdate = DMultiDate.Model._defaultMaxvalue,
            +                    _mindate = DMultiDate.Model._defaultMinvalue;
            +
            +                if ( _maxdate ) {
            +                    _enddateEl.attr('maxvalue', _maxdate);
            +                } else {
            +                    _enddateEl.removeAttr('maxvalue');
            +                }
            +
            +                if ( _mindate ) {
            +                    _enddateEl.attr('minvalue', _mindate)
            +                        .attr('defaultdate', _mindate);
            +                } else {
            +                    _enddateEl.removeAttr('minvalue')
            +                        .removeAttr('defaultdate');
            +                } 
            +
            +            };
            +
            +            window[_parseweekdate] = function (_dateStr) {
            +                _dateStr = $.trim( _dateStr || '' );
            +                var _r = { start: null, end: null }, _normalDate;
            +
            +                if( _dateStr ){
            +                    _normalDate = _dateStr.replace( /[^\d]+/g, '' );
            +                    _dateStr = _dateStr.split( 'W' );
            +
            +                    if ( _normalDate.length === 8 ) {
            +                        _r.start = JC.f.parseISODate( _normalDate );
            +                        _r.end = _r.start;
            +                        return _r;
            +                    } else if( _normalDate.length === 16 ) {
            +                        _r.start = JC.f.parseISODate( _normalDate.slice( 0, 8 ) );
            +                        _r.end = JC.f.parseISODate( _normalDate.slice( 8, 16 ) );
            +                        return _r;
            +                    }
            +
            +                    var _year, _week, _sdate, _edate, _weeks, _date
            +
            +                    _year = parseInt( _dateStr[0], 10 );
            +                    _week = parseInt( _dateStr[1], 10 );
            +                    _sdate = JC.f.pureDate( new Date( _dateStr[0] ), 0, 1 );
            +                    _edate = JC.f.pureDate( new Date( _dateStr[1] ), 0, 1 );
            +                    _weeks = _weeks || JC.f.weekOfYear( _dateStr[0], JC.Calendar.weekDayOffset );
            +
            +                    $( _weeks ).each( function( _ix, _item ){
            +                        if( _item.week === _week ){
            +                            _r.start = new Date();
            +                            _r.end = new Date();
            +
            +                            _r.start.setTime( _item.start );
            +                            _r.end.setTime( _item.end );
            +                            return false;
            +                        }
            +                    });
            +                }
            +                
            +                return _r;
            +            };
            +
            +            window[_parsemonthdate] = function (_dateStr) {
            +                
            +                _dateStr = $.trim( _dateStr || '' );
            +                
            +                var _r = { start: null, end: null }, 
            +                    _normalDate;
            +
            +                if( _dateStr ){
            +                    _normalDate = _dateStr.replace( /[^\d]+/g, '' );
            +                    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +
            +                    if( _normalDate.length === 8 ){
            +                        _r.start = JC.f.parseISODate( _normalDate );
            +                        _r.end = _r.start;
            +                        return _r;
            +                    }else if( _normalDate.length === 16 ){
            +                        _r.start = JC.f.parseISODate( _normalDate.slice( 0, 8 ) );
            +                        _r.end = JC.f.parseISODate( _normalDate.slice( 8, 16 ) );
            +                        return _r;
            +                    }
            +
            +                    var _year = _dateStr.slice( 0, 4 ), 
            +                        _month = parseInt( _dateStr.slice( 4, 6 ), 10 ) - 1;
            +
            +                    _r.start = new Date( _year, _month, 1 );
            +                    _r.end = JC.f.cloneDate(_r.start);
            +                    _r.end.setDate(JC.f.maxDayOfMonth(_r.start));
            +                }
            +
            +                return _r;
            +            };
            +
            +            window[_parseseasondate] = function (_dateStr) {
            +                _dateStr = $.trim( _dateStr || '' );
            +                var _r = { start: null, end: null }, _normalDate;
            +
            +                if( _dateStr ){
            +                    _normalDate = _dateStr.replace( /[^\d]+/g, '' );
            +                    _dateStr = _dateStr.split( 'Q' );
            +
            +                    if( _normalDate.length === 8 ){
            +                        _r.start = JC.f.parseISODate( _normalDate );
            +                        _r.end = _r.start;
            +                        return _r;
            +                    }else if( _normalDate.length === 16 ){
            +                        _r.start = JC.f.parseISODate( _normalDate.slice( 0, 8 ) );
            +                        _r.end = JC.f.parseISODate( _normalDate.slice( 8, 16 ) );
            +                        return _r;
            +                    }
            +
            +                    var _year = parseInt( _dateStr[0], 10 ), _season = parseInt( _dateStr[1], 10 )
            +                        , _sdate = JC.f.pureDate( new Date( _dateStr[0] ), 0, 1 )
            +                        , _edate = JC.f.pureDate( new Date( _dateStr[1] ), 0, 1 )
            +                        , _seasons = JC.f.seasonOfYear( _dateStr[0] )
            +                        ;
            +
            +                    $( _seasons ).each( function( _ix, _item ){
            +                        if( _item.season === _season ){
            +                            _r.start = new Date();
            +                            _r.end = new Date();
            +
            +                            _r.start.setTime( _item.start );
            +                            _r.end.setTime( _item.end );
            +                            return false;
            +                        }
            +                    });
            +                }
            +
            +                return _r;
            +            };
            +
            +            window[_parseyeardate] = function (_dateStr) {
            +                _dateStr = $.trim( _dateStr || '' );
            +                var _r = { start: null, end: null }, _year;
            +
            +                if( _dateStr ){
            +                    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +                    _year = _dateStr.slice( 0, 4 );
            +                    _r.start = new Date( _year, 0, 1 );
            +                }
            +
            +                if( !_r.start ){
            +                    _r.start = new Date();
            +                    _r.end = new Date();
            +                }
            +                return _r;
            +            };
            +
            +            _p._model.calendarTypeEl().trigger( 'change', [ true ] );
            +
            +        },
            +
            +        _initDefaultData: function () {
            +
            +            if( this._model.mcIgnoreUrlFill() ){
            +                return;
            +            }
            +
            +            var _p = this,
            +                _startdate = _p._model.urlStartdate() || _p._model.mddateEl().eq(0).val(),
            +                _enddate = _p._model.urlEnddate() || _p._model.mddateEl().eq(1).val(),
            +                _type = _p._model.urlCalendarType() || _p._model.calendarType()
            +                ;
            +
            +            _p._model.calendarTypeEl().val(_type);
            +            _p._model.updatemddateElProp(_type);
            +            
            +            setTimeout(function () {
            +                _p._model.setmddate( _startdate, _enddate );
            +                _p._model.setHiddenStartdate(_startdate);
            +                _p._model.setHiddenEnddate(_enddate);
            +            }, 200);
            +            
            +        }, 
            +
            +        _inited:function () {
            +            //JC.log( 'DMultiDate _inited', new Date().getTime() );
            +        }
            +    }
            +
            +    /**
            +     * 获取或设置 DMultiDate 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {DMultiDateInstance}
            +     */
            +    DMultiDate.getInstance = function ( _selector, _setter ) {
            +        if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +                _selector = $(_selector);
            +        if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +        typeof _setter != 'undefined' && _selector.data( DMultiDate.Model._instanceName, _setter );
            +
            +        return _selector.data( DMultiDate.Model._instanceName );
            +    };
            +
            +    /**
            +     * 判断 selector 是否可以初始化 DMultiDate
            +     * @method  isDMultiDate
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  bool
            +     */
            +    DMultiDate.isDMultiDate = function( _selector ){
            +        var _r;
            +        _selector 
            +            && ( _selector = $(_selector) ).length 
            +            && ( _r = _selector.is( '[DMultiDatelayout]' ) );
            +        return _r;
            +    };
            +
            +    BaseMVC.buildModel( DMultiDate );
            +    DMultiDate.Model._instanceName = 'DMultiDate';
            +    DMultiDate.Model._inscount = 1;
            +    DMultiDate.Model._defaultMaxvalue = '';
            +    DMultiDate.Model._defaultMinvalue = '';
            +    
            +    DMultiDate.Model.prototype = {
            +        init: function () {
            +        },
            +
            +        disableDateLimit:function(){
            +            return this.boolProp('disabledatelimit');
            +        },
            +
            +        lastIptBox: function(){
            +            if( !this._lastIptBox ){
            +                this._lastIptBox = JC.f.parentSelector( this.selector(), this.selector().attr( 'lastIptBox' ) );
            +                !this._lastIptBox && ( this._lastIptBox = $( 'sdfasefasdfasfsadfasdfsdf' ) );
            +            }
            +            return this._lastIptBox;
            +        },
            +
            +        calendarTypeEl: function () {
            +            return this.selector().find('>select');
            +        },
            +
            +        mcIgnoreUrlFill: function() {
            +            return this.boolProp( 'mdIgnoreUrlFill' );
            +        },
            +
            +        calendarType: function () {
            +            return this.calendarTypeEl().val();
            +        },
            +
            +        mddateEl: function () {
            +            var _p = this,
            +                _el = _p.attrProp('mddateEl') || '.js_multidate';
            +
            +            return _p.selector().find(_el);
            +        },
            +
            +        setmddate: function (_starttime, _endtime) {
            +            var _el = this.mddateEl();
            +
            +            _starttime && ( _starttime = JC.f.dateFormat( JC.f.dateDetect( _starttime ), _el.eq(0).attr( 'dateformat' ) ) );
            +            _endtime && ( _endtime = JC.f.dateFormat( JC.f.dateDetect( _endtime ), _el.eq(1).attr( 'dateformat' ) ) );
            +
            +            _el.eq(0).val(_starttime);
            +            _el.eq(1).val(_endtime);
            +        },
            +
            +        updatemddateElProp: function (_setter) {
            +            var _p = this,
            +                _el = _p.mddateEl();
            +
            +            //_setter && ( _setter.toLowerCase() == 'quarter' ) && ( _setter = 'season' );
            +
            +            _el.attr('multidate', _setter);
            +
            +            if (_setter === 'date') {
            +                _el.removeAttr('dateparse')
            +                    .removeAttr('dateformat')
            +                    .removeAttr('fulldateformat');
            +            } else {
            +                _el.eq(0).attr('fulldateformat', '{0}');
            +                _el.eq(1).attr('fulldateformat', '{0}');
            +
            +                _el.attr('dateformat', _p.dateformartType(_setter))
            +                   .attr('dateparse', 'parsedate' + _setter);   
            +            }
            +
            +            if ( DMultiDate.Model._defaultMinvalue ) {
            +                _el.attr('minvalue', DMultiDate.Model._defaultMinvalue)
            +            } else {
            +                _el.removeAttr('minvalue');
            +            }
            +
            +            if ( DMultiDate.Model._defaultMaxvalue ) {
            +                _el.attr('maxvalue', DMultiDate.Model._defaultMaxvalue)
            +                    .attr('defaultdate', DMultiDate.Model._defaultMaxvalue);
            +            } else {
            +                _el.removeAttr('maxvalue').removeAttr('defaultdate');
            +            }
            +            
            +        },
            +
            +        dateformartType: function (_setter) {
            +            var _r;
            +
            +            switch (_setter) {
            +                case 'week':
            +                    _r = 'YYWWK';
            +                    break;
            +                case 'month':
            +                    _r = 'YY-MM';
            +                    break;
            +                case 'season':
            +                //case 'quarter':
            +                    _r = 'YYQYQ';
            +                    break;
            +                case 'year':
            +                    _r = 'YY';
            +                    break;
            +                case 'date':
            +                default:
            +                    _r = ''; 
            +            }
            +
            +            return _r;
            +        },
            +
            +        hiddenStartdateEl: function () {
            +            var _p = this,
            +                _el = _p.attrProp('mdstartdate') || '.js_startdate';
            +
            +            return _p.selector().find(_el);
            +        },
            +
            +        hiddenEnddateEl: function () {
            +            var _p = this,
            +                _el = _p.attrProp('mdenddate') || '.js_enddate';
            +
            +            return _p.selector().find(_el);
            +        },
            +
            +        setHiddenStartdate: function (_date) {
            +            var _p = this, _old = _date;
            +            if( _date ){
            +                _date = JC.f.parseDate( _date, _p.mddateEl().first() );
            +                _date && ( _date = JC.f.dateFormat( _date, _p.hiddendateiso() ? '' : _p.mddateEl().first().attr( 'dateformat' ) ) );
            +                !_date && ( _date = _old );
            +            }
            +            _p.hiddenStartdateEl().val(_date);
            +        },
            +
            +        setHiddenEnddate: function (_date) {
            +            var _p = this, _old = _date;
            +            if( _date ){
            +                _date = JC.f.parseDate( _date, _p.mddateEl().first() );
            +                _date && ( _date = JC.f.dateFormat( _date,  _p.hiddendateiso() ? '' : _p.mddateEl().first().attr( 'dateformat' ) ) );
            +                !_date && ( _date = _old );
            +            }
            +            _p.hiddenEnddateEl().val(_date);
            +        },
            +
            +        updateHiddenStartdate: function () {
            +            var _p = this,
            +                _date = _p.mddateEl().eq(0).val();
            +
            +            if ( !_date ) {
            +                _p.setHiddenStartdate('');
            +                return;
            +            }
            +
            +            _p.setHiddenStartdate(_date);
            +        },
            +
            +        updateHiddenEnddate: function () {
            +            var _p = this,
            +                _date = _p.mddateEl().eq(1).val();
            +
            +            if ( !_date ) {
            +                _p.setHiddenEnddate('');
            +                return;
            +            }
            +
            +            _p.setHiddenEnddate(_date);
            +        },
            +
            +        urlCalendarType: function () {
            +            var _p = this;
            +
            +            //需要转为小写
            +
            +            return _p.decodedata( JC.f.getUrlParam(_p.calendarTypeEl().attr('name') || '') || '' ).toLowerCase();
            +        },
            +
            +        urlStartdate: function () {
            +            var _p = this;
            +
            +            //不能转为小写
            +
            +            return _p.decodedata( JC.f.getUrlParam(_p.hiddenStartdateEl().attr('name') || '') || '');
            +        },
            +
            +        urlEnddate: function () {
            +            var _p = this;
            +
            +            //不能转为小写
            +
            +            return _p.decodedata( JC.f.getUrlParam(_p.hiddenEnddateEl().attr('name') || '') || '' );
            +        },
            +
            +        decodedata: function ( _d ) {
            +            _d = _d.replace( /[\+]/g, ' ' );
            +            
            +            //这里取url参数需要转码
            +            try { 
            +                _d = decodeURIComponent( _d ); 
            +            } catch (ex) {
            +
            +            }
            +
            +            return _d;
            +        },
            +
            +        dayrange: function () {
            +            return this.intProp('mddayrange');
            +        },
            +
            +        weekrange: function () {
            +            return this.intProp('mdweekrange');
            +        }, 
            +
            +        monthrange: function () {
            +            return this.intProp('mdmonthrange');
            +        },
            +
            +        seasonrange: function () {
            +            return this.intProp('mdseasonrange');
            +        },
            +
            +        yearrange: function () {
            +            return this.intProp('mdyearrange');
            +        },
            +
            +        hiddendateiso: function () {
            +            return this.boolProp('hiddendateiso');
            +        }
            +
            +    };
            +
            +    BaseMVC.buildView( DMultiDate );
            +    DMultiDate.View.prototype = {
            +        init: function () {
            +            return this;
            +        }
            +    };
            +
            +    BaseMVC.build( DMultiDate, 'Bizs' );
            +
            +    $(document).ready( function(){
            +
            +        JC.f.safeTimeout( function(){
            +            $('.js_autoDMultiDate').each( function(){
            +                new DMultiDate( $(this) );
            +            });
            +        }, null, 'DMultiDatesdfasd', 50 );
            +
            +    });
            +
            +    return Bizs.DMultiDate;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_DisableLogic_DisableLogic.js.html b/docs_api/files/.._bizs_DisableLogic_DisableLogic.js.html index bac084faa..052f700c3 100644 --- a/docs_api/files/.._bizs_DisableLogic_DisableLogic.js.html +++ b/docs_api/files/.._bizs_DisableLogic_DisableLogic.js.html @@ -3,11 +3,17 @@ ../bizs/DisableLogic/DisableLogic.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,13 +252,17 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
             /**
            + * <h2 style="color:red">这个应用将不再维护, 请使用 <a href='window.Bizs.ChangeLogic.html' style="color:red">Bizs.ChangeLogic</a> </h2>
              * <h2>Form Control禁用启用逻辑</h2>
              * <br/>应用场景</br>
              * <br/>表单操作时, 选择某个 radio 时, 对应的 内容有效,
              * <br/>但选择其他 radio 时, 其他的内容无效
              * <br/>checkbox / select 也可使用( 带change事件的标签 )
            - *
            + * <p><b>require</b>: 
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
              * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
              * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.DisableLogic.html' target='_blank'>API docs</a>
              * | <a href='../../bizs/DisableLogic/_demo' target='_blank'>demo link</a></p>
            @@ -207,28 +283,28 @@ 

            File: ../bizs/DisableLogic/DisableLogic.js

            * <dt>dldonecallback = function</dt> * <dd> * 启用/禁用后会触发的回调, <b>window 变量域</b> -<xmp>function dldonecallback( _triggerItem, _boxItem ){ +<pre>function dldonecallback( _triggerItem, _boxItem ){ var _ins = this; JC.log( 'dldonecallback', new Date().getTime() ); -}</xmp> +}</pre> * </dd> * * <dt>dlenablecallback = function</dt> * <dd> * 启用后的回调, <b>window 变量域</b> -<xmp>function dlenablecallback( _triggerItem, _boxItem ){ +<pre>function dlenablecallback( _triggerItem, _boxItem ){ var _ins = this; JC.log( 'dlenablecallback', new Date().getTime() ); -}</xmp> +}</pre> * </dd> * * <dt>dldisablecallback = function</dt> * <dd> * 禁用后的回调, <b>window 变量域</b> -<xmp>function dldisablecallback( _triggerItem, _boxItem ){ +<pre>function dldisablecallback( _triggerItem, _boxItem ){ var _ins = this; JC.log( 'dldisablecallback', new Date().getTime() ); -}</xmp> +}</pre> * </dd> * </dl> * @@ -249,8 +325,11 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            * * <h2>hide target 的 HTML 属性</h2> * <dl> - * <dt>dlhidetoggle = bool</dt> + * <dt>dlhidetoggle = bool, false</dt> * <dd>显示或显示的时候, 是否与他项相反</dd> + * + * <dt>dlDisableToggle = bool, default = false</dt> + * <dd>disabled 的时候, 是否与他项相反</dd> * </dl> * * @namespace window.Bizs @@ -278,9 +357,8 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            /><input type="button" class="UXCCalendar_btn"> </div> */ -;(function($){ - window.Bizs.DisableLogic = DisableLogic; + JC.f.addAutoInit && JC.f.addAutoInit( DisableLogic ); function DisableLogic( _selector ){ if( DisableLogic.getInstance( _selector ) ) return DisableLogic.getInstance( _selector ); @@ -306,7 +384,7 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ).slice( 2 ); + var _data = JC.f.sliceArgs( arguments ).slice( 2 ); _p.trigger( _evtName, _data ); }); @@ -417,7 +495,7 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            , dltrigger: function( _curItem ){ - var _p = this, _r = parentSelector( this.selector(), this.selector().attr('dltrigger') ), _tmp; + var _p = this, _r = JC.f.parentSelector( this.selector(), this.selector().attr('dltrigger') ), _tmp; if( _curItem ){ _r.each( function(){ _tmp = $(this); @@ -435,13 +513,13 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            var _p = this, _r, _tmp; _p.selector().attr('dltarget') - && ( _r = parentSelector( _p.selector(), _p.selector().attr('dltarget') ) ) + && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('dltarget') ) ) ; _triggerItem && ( _triggerItem = $(_triggerItem) ).length && _triggerItem.attr('dltrigger') - && ( _r = parentSelector( _triggerItem, _triggerItem.attr('dltarget') ) ) + && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('dltarget') ) ) ; return _r; } @@ -452,7 +530,7 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            _triggerItem && ( _triggerItem = $( _triggerItem ) ).length && _triggerItem.is( '[dldisable]' ) - && ( _r = parseBool( _triggerItem.attr('dldisable') ) ) + && ( _r = JC.f.parseBool( _triggerItem.attr('dldisable') ) ) ; if( _triggerItem.prop('nodeName').toLowerCase() == 'input' && _triggerItem.attr('type').toLowerCase() == 'checkbox' ){ @@ -467,12 +545,12 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            if( !_triggerItem.is('[dldisplay]') ){ ( _triggerItem = $( _triggerItem ) ).length && _triggerItem.is( '[dldisable]' ) - && ( _r = !parseBool( _triggerItem.attr('dldisable') ) ) + && ( _r = !JC.f.parseBool( _triggerItem.attr('dldisable') ) ) ; }else{ ( _triggerItem = $( _triggerItem ) ).length && _triggerItem.is( '[dldisplay]' ) - && ( _r = parseBool( _triggerItem.attr('dldisplay') ) ) + && ( _r = JC.f.parseBool( _triggerItem.attr('dldisplay') ) ) ; } @@ -488,13 +566,13 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            var _p = this, _r, _tmp; _p.selector().attr('dlhidetarget') - && ( _r = parentSelector( _p.selector(), _p.selector().attr('dlhidetarget') ) ) + && ( _r = JC.f.parentSelector( _p.selector(), _p.selector().attr('dlhidetarget') ) ) ; _triggerItem && ( _triggerItem = $(_triggerItem) ).length && _triggerItem.attr('dlhidetarget') - && ( _r = parentSelector( _triggerItem, _triggerItem.attr('dlhidetarget') ) ) + && ( _r = JC.f.parentSelector( _triggerItem, _triggerItem.attr('dlhidetarget') ) ) ; return _r; } @@ -503,7 +581,15 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            function( _hideTarget ){ var _r; _hideTarget && _hideTarget.is( '[dlhidetoggle]' ) - && ( _r = parseBool( _hideTarget.attr('dlhidetoggle') ) ); + && ( _r = JC.f.parseBool( _hideTarget.attr('dlhidetoggle') ) ); + return _r; + } + + , dlDisableToggle: + function( _target ){ + var _r; + _target && _target.is( '[dlDisableToggle]' ) + && ( _r = JC.f.parseBool( _target.attr('dlDisableToggle') ) ); return _r; } @@ -570,7 +656,7 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            ; if( _triggerItem.is( '[dlhidetargetsub]' ) ){ - var _starget = parentSelector( _triggerItem, _triggerItem.attr( 'dlhidetargetsub' ) ); + var _starget = JC.f.parentSelector( _triggerItem, _triggerItem.attr( 'dlhidetargetsub' ) ); if( _starget && _starget.length ){ if( _triggerItem.prop('checked') ){ _starget.show(); @@ -583,11 +669,15 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            if( _dlTarget && _dlTarget.length ){ _dlTarget.each( function(){ var _sp = $( this ); - _sp.attr('disabled', _isDisable); + if( _p._model.dlDisableToggle( _sp ) ){ + _sp.attr('disabled', !_isDisable); + }else{ + _sp.attr('disabled', _isDisable); + } JC.Valid && JC.Valid.setValid( _sp ); if( _sp.is( '[dlhidetargetsub]' ) ){ - var _starget = parentSelector( _sp, _sp.attr( 'dlhidetargetsub' ) ); + var _starget = JC.f.parentSelector( _sp, _sp.attr( 'dlhidetargetsub' ) ); if( !( _starget && _starget.length ) ) return; if( _isDisable ){ _starget.hide(); @@ -629,7 +719,16 @@

            File: ../bizs/DisableLogic/DisableLogic.js

            }, 10); }); -}(jQuery)); + return Bizs.DisableLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._bizs_DropdownTree_DropdownTree.js.html b/docs_api/files/.._bizs_DropdownTree_DropdownTree.js.html new file mode 100644 index 000000000..3f2d6a7fb --- /dev/null +++ b/docs_api/files/.._bizs_DropdownTree_DropdownTree.js.html @@ -0,0 +1,706 @@ + + + + + ../bizs/DropdownTree/DropdownTree.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/DropdownTree/DropdownTree.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Tree' ], function(){
            +/**
            + * 树菜单 形式模拟下拉框
            + *
            + *<p><b>require</b>:
            + *   <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *   , <a href='JC.Tree.html'>JC.Tree</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.DropdownTree.html' target='_blank'>API docs</a>
            + *   | <a href='../../bizs/DropdownTree/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会自动处理 div class="js_bizDropdownTree" </h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>bdtData = json, <b>window 变量域</b></dt>
            + *    <dd>
            + *        初始化的数据变量名
            + *        <dl><dt>数据格式:</dt>
            + *          <dd>
            + *<pre>            {
            + *                  root: [ id, label ]
            + *                  data: {
            + *                      id: [ [id, label], [id, label]... ] 
            + *                      , id: [ [id, label], [id, label]... ]...
            + *                  }
            + *              }</pre>
            + *          </dd>
            + *        </dl>
            + *    <dd>
            + *
            + *    <dt>bdtDefaultLabel = string</dt>
            + *    <dd>用于显示的 默认 label</dd>
            + *
            + *    <dt>bdtDefaultValue = string</dt>
            + *    <dd>默认选中 ID</dd>
            + *
            + *    <dt>bdtLabel = selector, default = "|.bdtLabel"</dt>
            + *    <dd>树的 label</dd>
            + *
            + *    <dt>bdtInput = selector, default = "|.bdtInput"</dt>
            + *    <dd>保存树 ID的 input</dd>
            + *
            + *    <dt>bdtTreeBox = selector, default = "|.bdtTreeBox"</dt>
            + *    <dd>树的 node</dd>
            + *</dl> 
            + *
            + * @namespace window.Bizs
            + * @class DropdownTree
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <div class="bdtBox js_bizDropdownTree" bdtData="treeData1" bdtDefaultLabel="请选择" bdtDefaultValue="0">
            +            <i class="bdtIcon"></i>
            +            <span class="bdtLabel"></span>
            +            <input type="hidden" name="tree03" value="" class="bdtInput" />                                            	
            +            <div class="bdtTreeBox"></div>
            +        </div>
            + */
            +    Bizs.DropdownTree = DropdownTree;
            +
            +    function DropdownTree( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, DropdownTree ) ) 
            +            return JC.BaseMVC.getInstance( _selector, DropdownTree );
            +
            +        JC.BaseMVC.getInstance( _selector, DropdownTree, this );
            +
            +        this._model = new DropdownTree.Model( _selector );
            +        this._view = new DropdownTree.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( DropdownTree.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 DropdownTree 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of DropdownTreeInstance}
            +     */
            +    DropdownTree.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( 'js_bizDropdownTree' )  ){
            +                    _r.push( new DropdownTree( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_bizDropdownTree' ).each( function(){
            +                        _r.push( new DropdownTree( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    BaseMVC.build( DropdownTree );
            +
            +    JC.f.extendObject( DropdownTree.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'DropdownTree _beforeInit', new Date().getTime() );
            +            }
            +    
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +                _p.on( 'DropdownTreeSelected', function( _evt, _id, _name, _triggerSelector ){
            +                    _p.hide();
            +                });
            +
            +                _p.on( 'INITED', function(){
            +                    _p.update();
            +                });
            +
            +                _p.on( 'INITED_STATUS', function( _evt, _userId ){
            +                    var _selectedId = _p._model.bdtInput().val().trim()
            +                        , _treeItem
            +                        ;
            +
            +                    typeof _userId != 'undefined' && ( _selectedId = _userId );
            +
            +                    _p._model.bdtInput().is( '[name]' ) 
            +                        && ( _selectedId = JC.f.getUrlParam( _p._model.bdtInput().attr('name') ) || _selectedId );
            +
            +                    _selectedId && ( _treeItem = _p._model.treeIns().getItem( _selectedId ) );
            +
            +                    if( !(_selectedId && _treeItem && _treeItem.length ) ){
            +                        if( _p._model.is( '[bdtDefaultLabel]' ) ){
            +                            _p._model.bdtLabel().html( _p._model.bdtDefaultLabel() );
            +                        }
            +
            +                        if( _p._model.is( '[bdtDefaultValue]' ) ){
            +                            _p._model.bdtInput().val( _p._model.bdtDefaultValue() );
            +                            _selectedId = _p._model.bdtDefaultValue();
            +                        }
            +                    }
            +
            +                    //JC.log( _selectedId );
            +                    _selectedId 
            +                        && _p._model.bdtLabel().html( _p._model.treeIns().getItem( _selectedId ).attr( 'dataname' ) )
            +                        && ( _p._model.bdtInput().val( _selectedId )
            +                            , _p._model.treeIns().selectedItem( _p._model.treeIns().getItem( _selectedId ) )
            +                           )
            +                        ;
            +                });
            +
            +                _p.on( 'CLEAR_STATUS', function(){
            +                     _p._model.bdtInput().val( '' );
            +                     _p._model.bdtLabel().html( '' );
            +                });
            +
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'DropdownTree _inited', new Date().getTime() );
            +                this.trigger( 'INITED' );
            +            }
            +        /**
            +         * 显示 树弹框
            +         * @method  show
            +         */
            +        , show: function(){ this._view.show(); return this; }
            +        /**
            +         * 隐藏 树弹框
            +         * @method  hide
            +         */
            +        , hide: function(){ this._view.hide(); return this; }
            +        /**
            +         * 显式/隐藏 树弹框
            +         * @method  toggle
            +         */
            +        , toggle: function(){ this._view.toggle(); return this; }
            +        /**
            +         * 更新树菜单数据
            +         * @method  update
            +         * @param   {json}      _data
            +         * @param   {string}    _selectedId
            +         */
            +        , update:
            +            function( _data, _selectedId ){
            +                //this.clear();
            +                var _isReload;
            +                _data && ( _isReload = true );
            +                _isReload && this.trigger( 'CLEAR_STATUS' );
            +                this._view.update( _data, _isReload );
            +                this.trigger( 'INITED_STATUS', [ _selectedId ] );
            +                return this;
            +            }
            +        /**
            +         * 清除选择数据
            +         * @method  clear
            +         */
            +        , clear:
            +            function(){
            +                var _p = this;
            +                if( _p._model.is( '[bdtDefaultLabel]' ) ){
            +                    _p._model.bdtLabel().html( _p._model.bdtDefaultLabel() );
            +                }else{
            +                    _p._model.bdtLabel().html( '' );
            +                }
            +
            +                if( _p._model.is( '[bdtDefaultValue]' ) ){
            +                    _p._model.bdtInput().val( _p._model.bdtDefaultValue() );
            +                }else{
            +                    _p._model.bdtInput().val( '' );
            +                }
            +                return this;
            +            }
            +        /**
            +         * 获取选中的 label
            +         * @method  label
            +         * @return  string
            +         */
            +        , label: function(){ return this._model.bdtLabel(); }
            +        /**
            +         * 获取或设置 选中的 id
            +         * @method  val
            +         * @param   {string}    _nodeId
            +         * @return  {string of id}
            +         */
            +        , val: 
            +            function( _nodeId ){ 
            +                typeof _nodeId != 'undefined' && this.getItem( _nodeId ).trigger( 'click' );
            +                return this._model.bdtInput().val();
            +            }
            +    });
            +
            +    DropdownTree.Model._instanceName = 'DropdownTreeIns';
            +    JC.f.extendObject( DropdownTree.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'DropdownTree.Model.init:', new Date().getTime() );
            +            }
            +
            +        , bdtData: function(){ return this.windowProp( 'bdtData' ) || {}; }
            +
            +        , bdtDefaultLabel: function(){ return this.attrProp( 'bdtDefaultLabel' ) }
            +        , bdtDefaultValue: function(){ return this.attrProp( 'bdtDefaultValue' ) }
            +
            +        , bdtTreeBox:
            +            function(){
            +                var _r = this.selector().find( '> .bdtTreeBox' );
            +                return _r;
            +            }
            +
            +        , bdtLabel:
            +            function(){
            +                var _r = this.selector().find( '> .bdtLabel' );
            +                return _r;
            +            }
            +
            +        , bdtInput:
            +            function(){
            +                var _r = this.selector().find( '> .bdtInput' );
            +                return _r;
            +            }
            +
            +        , treeIns:
            +            function( _setter ){
            +                this._treeIns = _setter || JC.Tree.getInstance( this.bdtTreeBox() );
            +                return this._treeIns;
            +            }
            +    });
            +
            +    JC.f.extendObject( DropdownTree.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'DropdownTree.View.init:', new Date().getTime() );
            +            }
            +
            +        , update:
            +            function( _data, _isReload ){
            +                var _p = this;
            +                _data = _data || _p._model.bdtData();
            +
            +                if( _isReload ){
            +                }
            +
            +                if( ( !_p._model.treeIns() ) || _isReload ){
            +                    _p._model.bdtTreeBox().html('');
            +                    _p._model.bdtTreeBox().data( JC.Tree.Model._instanceName , null );
            +                    _p._model.treeIns( new JC.Tree( _p._model.bdtTreeBox(), _data ) );
            +
            +                    _p._model.treeIns().on( 'click', function(){
            +                        var _sp = $(this)
            +                            , _dataid = _sp.attr('dataid')
            +                            , _dataname = _sp.attr('dataname');
            +                        
            +                        _p._model.bdtLabel().html( _dataname );
            +                        _p._model.bdtInput().val( _dataid );
            +
            +                        $( _p ).trigger( 'TriggerEvent', [ 'DropdownTreeSelected', _dataid, _dataname, _sp ] );
            +                     });
            +
            +                    _p._model.treeIns().on( 'RenderLabel', function( _data ){
            +                        var _node = $(this);
            +                        _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) );
            +                    });
            +
            +                    _p._model.treeIns().init();
            +                    _p._model.treeIns().open();
            +                }
            +            }
            +
            +        , show:
            +            function(){
            +                var _p = this;
            +                JC.f.safeTimeout( setTimeout( function(){}, 50), _p._model.selector(), 'DropdownTreeUi' );
            +                _p.updateZIndex();
            +                _p._model.selector().addClass( 'bdtBox-active' );
            +                _p._model.bdtTreeBox().show();
            +                _p._model.bdtTreeBox().css( { 'z-index': ZINDEX_COUNT++ } );
            +            }
            +
            +        , hide:
            +            function(){
            +                var _p = this;
            +                _p._model.bdtTreeBox().hide();
            +                JC.f.safeTimeout( setTimeout( function(){
            +                    _p._model.selector().removeClass( 'bdtBox-active' );
            +                }, 50), _p._model.selector(), 'DropdownTreeUi' );
            +            }
            +
            +        , toggle:
            +            function(){
            +                this.updateZIndex();
            +
            +                if( this._model.bdtTreeBox().is( ':visible' ) ){
            +                    this.hide();
            +                }else{
            +                    this.show();
            +                }
            +            }
            +
            +        , updateZIndex:
            +            function(){
            +                this._model.bdtTreeBox().css( { 'z-index': ZINDEX_COUNT++ } );
            +            }
            +    });
            +    /**
            +     * 选择树节点时触发的事件
            +     * @event   DropdownTreeSelected
            +     * @param   {object}    _evt
            +     * @param   {string}    _id
            +     * @param   {string}    _name
            +     * @param   {selector}  _triggerSelector
            +     * @example
            +            $( 'div.js_bizDropdownTree' ).each( function(){
            +                var _ins = JC.BaseMVC.getInstance( $(this), Bizs.DropdownTree );
            +                    _ins 
            +                        && _ins.on( 'DropdownTreeSelected', function( _evt, _id, _name, _triggerSelector ){
            +                            JC.log( [ _evt, _id, _name ] );
            +                        });
            +            });
            +     */
            +
            +    JC.Tree.dataFilter = JC.Tree.dataFilter ||
            +        function( _data ){
            +            var _r = {};
            +
            +            if( _data && _data.root && _data.root.length > 2 ){
            +                _data.root.shift();
            +                _r.root = _data.root;
            +                _r.data = {};
            +                for( var k in _data.data ){
            +                    _r.data[ k ] = [];
            +                    for( var i = 0, j = _data.data[k].length; i < j; i++ ){
            +                        if( _data.data[k][i].length < 3 ) {
            +                            _r.data[k].push( _data.data[k][i] );
            +                            continue;
            +                        }
            +                        _data.data[k][i].shift();
            +                        _r.data[k].push( _data.data[k][i] );
            +                    }
            +                }
            +            }else{
            +                _r = _data;
            +            }
            +            return _r;
            +        };
            +
            +    $(document).ready( function(){
            +        var _insAr = 0;
            +        DropdownTree.autoInit
            +            && ( _insAr = DropdownTree.init() )
            +            ;
            +    });
            +
            +    $(document).delegate( 'div.js_bizDropdownTree', 'click', function( _evt ){
            +        var _p = $(this), _ins;
            +
            +        JC.f.safeTimeout( function(){
            +            _ins = JC.BaseMVC.getInstance( _p, DropdownTree );
            +            !_ins && ( _ins = new DropdownTree( _p ) );
            +            _ins.toggle();
            +            JC.log( 'div.js_bizDropdownTree click', new Date().getTime() );
            +        }, _p, 'DropdownTreeClick', 50 );
            +    });
            +
            +    $(document).click( function(){
            +        $( 'div.js_bizDropdownTree' ).each( function(){
            +            var _ins = JC.BaseMVC.getInstance( $(this), DropdownTree );
            +                _ins && _ins.hide();
            +        });
            +    });
            +
            +    $(document).delegate( 'div.js_bizDropdownTree > .bdtTreeBox', 'click', function( _evt ){
            +        _evt.stopPropagation();
            +    });
            +
            +    return Bizs.DropdownTree;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_FormLogic_FormLogic.js.html b/docs_api/files/.._bizs_FormLogic_FormLogic.js.html index eaa60f46b..b939148b5 100644 --- a/docs_api/files/.._bizs_FormLogic_FormLogic.js.html +++ b/docs_api/files/.._bizs_FormLogic_FormLogic.js.html @@ -3,11 +3,17 @@ ../bizs/FormLogic/FormLogic.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -181,20 +253,25 @@

            File: ../bizs/FormLogic/FormLogic.js

             //TODO: 添加 disabled bind hidden 操作
            -;(function($){
            +//TODO: formSubmitIgnoreCheck 时, 如果在控件里回车提交的话, 控制逻辑可能会有问题, 需要仔细检查
            +;(function(define, _win) { 'use strict'; define( 'Bizs.FormLogic', [ 'JC.BaseMVC', 'JC.Valid', 'JC.Panel', 'JC.FormFillUrl' ], function(){
                 /**
                  * <h2>提交表单控制逻辑</h2>
                  * 应用场景
                  * <br />get 查询表单
                  * <br />post 提交表单
                  * <br />ajax 提交表单
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *      , <a href='JC.Valid.html'>JC.Valid</a>
            +     *      , <a href='JC.Panel.html'>JC.Panel</a>
            +     * </p>
            +     * <p><b>optional</b>: 
            +     *      <a href='JC.FormFillUrl.html'>JC.FormFillUrl</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.FormLogic.html' target='_blank'>API docs</a>
                  * | <a href='../../bizs/FormLogic/_demo' target='_blank'>demo link</a></p>
            -     * require: <a href='../classes/window.jQuery.html'>jQuery</a>
            -     * <br/>require: <a href='../classes/JC.Valid.html'>JC.Valid</a>
            -     * <br/>require: <a href='../classes/JC.Form.html'>JC.Form</a>
            -     * <br/>require: <a href='../classes/JC.Panel.html'>JC.Panel</a>
                  *
                  * <h2>页面只要引用本文件, 默认会自动初始化 from class="js_bizsFormLogic" 的表单</h2>
                  * <h2>Form 可用的 HTML 属性</h2>
            @@ -202,7 +279,7 @@ 

            File: ../bizs/FormLogic/FormLogic.js

            * <dt>formType = string, default = get</dt> * <dd> * form 的提交类型, 如果没有显式声明, 将视为 form 的 method 属性 - * <br/> 类型有: get, post, ajax + * <br/> 类型有: get, post, ajax, jsonp * </dd> * * <dt>formSubmitDisable = bool, default = true</dt> @@ -211,39 +288,52 @@

            File: ../bizs/FormLogic/FormLogic.js

            * <dt>formResetAfterSubmit = bool, default = true</dt> * <dd>表单提交后, 是否重置内容</dd> * - * <dt>formBeforeProcess = function</dt> + * <dt>formBeforeProcess = function, <b>window 变量域</b/></dt> * <dd> - * 表单开始提交时且没开始验证时, 触发的回调, <b>window 变量域</b> -<xmp>function formBeforeProcess( _evt, _ins ){ + * 表单开始提交时且没开始验证时, 触发的回调 +<pre>function formBeforeProcess( _evt, _ins ){ var _form = $(this); JC.log( 'formBeforeProcess', new Date().getTime() ); //return false; -}</xmp> +}</pre> * </dd> * - * <dt>formProcessError = function</dt> + * <dt>formProcessError = function, <b>window 变量域</b></dt> * <dd> - * 提交时, 验证未通过时, 触发的回调, <b>window 变量域</b> -<xmp>function formProcessError( _evt, _ins ){ + * 提交时, 验证未通过时, 触发的回调 +<pre>function formProcessError( _evt, _ins ){ var _form = $(this); JC.log( 'formProcessError', new Date().getTime() ); //return false; -}</xmp> +}</pre> * </dd> * - * <dt>formAfterProcess = function</dt> + * <dt>formAfterProcess = function, <b>window 变量域</b></dt> * <dd> - * 表单开始提交时且验证通过后, 触发的回调, <b>window 变量域</b> -<xmp>function formAfterProcess( _evt, _ins ){ + * 表单开始提交时且验证通过后, 触发的回调 +<pre>function formAfterProcess( _evt, _ins ){ var _form = $(this); JC.log( 'formAfterProcess', new Date().getTime() ); //return false; -}</xmp> +}</pre> * </dd> * - * <dt>formConfirmPopupType = string, default = dialog</dt> + * <dt>formBeforeSubmit = function, <b>window 变量域</b></dt> + * <dd> + * 表单开始发送数据到服务器之前的回调 +<pre>function formBeforeSubmit( _evt, _ins ){ + var _form = $(this); + JC.log( 'formBeforeSubmit', new Date().getTime() ); + //return false; +}</pre> + * </dd> + * + * <dt>formPopupType = string, default = dialog</dt> * <dd>定义提示框的类型: dialog, popup</dd> * + * <dt>formConfirmPopupType = string, default = dialog</dt> + * <dd>定义确认提示框的类型: dialog, popup</dd> + * * <dt>formResetUrl = url</dt> * <dd>表单重置时, 返回的URL</dd> * @@ -266,7 +356,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            * <dd> * AJAX 提交完成后的回调, <b>window 变量域</b> * <br />如果没有显式声明, FormLogic将自行处理 -<xmp>function formAjaxDone( _json, _submitButton, _ins ){ +<pre>function formAjaxDone( _json, _submitButton, _ins ){ var _form = $(this); JC.log( 'custom formAjaxDone', new Date().getTime() ); @@ -274,14 +364,44 @@

            File: ../bizs/FormLogic/FormLogic.js

            _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); }else{ _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){ - reloadPage( "?donetype=custom" ); + JC.f.reloadPage( "?donetype=custom" ); }); } -};</xmp> +};</pre> * </dd> * * <dt>formAjaxDoneAction = url</dt> * <dd>声明 ajax 提交完成后的返回路径, 如果没有, 提交完成后将不继续跳转操作</dd> + * + * <dt>formJsonpCb = function, default = FormLogic#_model._innerJsonpCb</dt> + * <dd>自定义 JSOPN 处理回调, <b>window 变量域</b> +<pre>function customFormJsonpCb( _data, _info ){ + if( !( _data && _info ) ) return; + + var _frm = $( 'form.' + _info ), _ins; + if( !_frm.length ) return; + _ins = JC.BaseMVC.getInstance( _frm, Bizs.FormLogic ); + if( !_ins ) return; + + _ins.trigger( Bizs.FormLogic.Model.AJAX_DONE, [ _data ] ); +}</pre> + +<pre>URL: <b>handler_jsonp.php?callbackInfo=FormLogic_1&callback=callback</b> +OUTPUT: +<b>&lt;script&gt; +window.parent + && window.parent != this + && window.parent&#91; 'callback' &#93; + && window.parent&#91; 'callback' &#93;( {"errorno":0,"errmsg":"","data":{"callbackInfo":"FormLogic_1","callback":"callback"}}, 'FormLogic_1' ) + ; +&lt;/script&gt;</b></pre> + * </dd> + * </dl> + * + * <h2>Form Control 可用的 html 属性</h2> + * <dl> + * <dt>ignoreResetClear = bool, default = false</dt> + * <dd>重置时, 是否忽略清空控件的值, 默认清空</dd> * </dl> * * <h2>submit button 可用的 html 属性</h2> @@ -299,12 +419,27 @@

            File: ../bizs/FormLogic/FormLogic.js

            * <dt>formConfirmCheckCallback = function</dt> * <dd> * 提交表单时, 进行二次确认的条件判断, <b>window 变量域</b> -<xmp>function formConfirmCheckCallback( _trigger, _evt, _ins ){ +<pre>function formConfirmCheckCallback( _trigger, _evt, _ins ){ var _form = $(this); JC.log( 'formConfirmCheckCallback', new Date().getTime() ); return _form.find('td.js_confirmCheck input[value=0]:checked').length; -}</xmp> - * </dt> +}</pre> + * </dd> + * + * <dt>formSubmitIgnoreCheck = bool, default = false</dt> + * <dd> + * 表单提交时, 是否忽略 JC.Valid 的验证 + * <br /><b>注意:</b> 仅忽略内容为空的项, 如果已经填写内容, 那么内容必须与验证规则匹配 + * <br /><b>注: 有时 提交操作 仅为保存为草稿的时候, 是不需要验证所有内容的, 不过还是会对值非空的项进行验证</b> + * </dd> + * + * <dt>formResetCallback = callback</dt> + * <dd>表单重置后的回调 +<pre>function formResetCallback( _evt, _ins ){ + var _form = $(this); + JC.log( 'formResetCallback', JC.f.ts() ); +}</pre> + * * </dl> * * <h2>reset button 可用的 html 属性</h2> @@ -323,6 +458,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            * * <dt>formPopupCloseMs = int, default = 2000</dt> * <dd>msgbox 弹框的显示时间</dd> + * </dd> * </dl> * * <h2>普通 [a | button] 可用的 html 属性</h2> @@ -338,11 +474,18 @@

            File: ../bizs/FormLogic/FormLogic.js

            * * <dt>popupstatus = int, default = 2</dt> * <dd>提示状态: 0: 成功, 1: 失败, 2: 警告</dd> + * + * <dt>buttonClickBindSelector = selector</dt> + * <dd> + * 点击按钮时, 把按钮的值赋值给 绑定的 控件 + * <br /><b>注意:</b> 这个属性仅支持 [input|button] 标签 + * </dd> * </dl> * @namespace window.Bizs * @class FormLogic * @extends JC.BaseMVC * @constructor + * @version dev 0.2 2014-01-22 * @version dev 0.1 2013-09-08 * @author qiushaowei <suches@btbtd.org> | 75 Team * @example @@ -369,7 +512,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); }else{ _panel = JC.msgbox( _json.errmsg || '操作成功', _submitButton, 0, function(){ - reloadPage( "?donetype=custom" ); + JC.f.reloadPage( "?donetype=custom" ); }); } }; @@ -422,15 +565,22 @@

            File: ../bizs/FormLogic/FormLogic.js

            </dl> */ Bizs.FormLogic = FormLogic; + JC.f.addAutoInit && JC.f.addAutoInit( FormLogic ); + function FormLogic( _selector ){ _selector && ( _selector = $( _selector ) ); - if( FormLogic.getInstance( _selector ) ) return FormLogic.getInstance( _selector ); - FormLogic.getInstance( _selector, this ); + + if( JC.BaseMVC.getInstance( _selector, FormLogic ) ) + return JC.BaseMVC.getInstance( _selector, FormLogic ); + + JC.BaseMVC.getInstance( _selector, FormLogic, this ); this._model = new FormLogic.Model( _selector ); this._view = new FormLogic.View( this._model ); this._init(); + + //JC.log( FormLogic.Model._instanceName, 'all inited', new Date().getTime() ); } /** * 获取或设置 FormLogic 的实例 @@ -441,18 +591,14 @@

            File: ../bizs/FormLogic/FormLogic.js

            */ FormLogic.getInstance = function( _selector, _setter ){ - if( typeof _selector == 'string' && !/</.test( _selector ) ) - _selector = $(_selector); - if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return; - typeof _setter != 'undefined' && _selector.data( 'FormLogicIns', _setter ); - - return _selector.data('FormLogicIns'); + return JC.BaseMVC.getInstance( _selector, FormLogic, _setter ); }; - !JC.Valid && JC.use( 'Valid' ); - !JC.Form && JC.use( 'Form' ); - !JC.Panel && JC.use( 'Panel' ); - !$(document).ajaxForm && JC.use( 'plugins.jquery.form' ); + if( !define.amd && JC.use ){ + !JC.Valid && JC.use( 'JC.Valid' ); + !JC.Panel && JC.use( 'JC.Panel' ); + !JC.FormFillUrl && JC.use( 'JC.FormFillUrl' ); + } /** * 处理 form 或者 _selector 的所有form.js_bizsFormLogic @@ -517,8 +663,35 @@

            File: ../bizs/FormLogic/FormLogic.js

            * @static */ FormLogic.processErrorCb; + /** + * 全局返回数据处理回调 + * <br />所有换回结果都会调用 + * <br />arg: _data[string of result] + * @property GLOBAL_AJAX_CHECK + * @type function + * @default null + * @static + */ + FormLogic.GLOBAL_AJAX_CHECK; + + /** + * 全局数据解析函数 + * <br />所有换回结果都会调用 + * <br />arg: _data[string of result] + * @property DATA_PARSE + * @type function + * @default null + * @return Object + * @static + */ + FormLogic.DATA_PARSE; - FormLogic.prototype = { + FormLogic._currentIns; + + + JC.BaseMVC.build( FormLogic ); + + JC.f.extendObject( FormLogic.prototype, { _beforeInit: function(){ //JC.log( 'FormLogic._beforeInit', new Date().getTime() ); @@ -538,18 +711,39 @@

            File: ../bizs/FormLogic/FormLogic.js

            _p.selector().on('submit', function( _evt ){ //_evt.preventDefault(); _p._model.isSubmited( true ); + FormLogic._currentIns = _p; + //JC.log( 1 ); + + var _ignoreCheck, _btn = _p.selector().data( FormLogic.Model.GENERIC_SUBMIT_BUTTON ); + _btn && ( _btn = $( _btn ) ); + if( _btn && _btn.length ){ + _ignoreCheck = JC.f.parseBool( _btn.attr( FormLogic.Model.IGNORE_KEY ) ); + JC.Valid.ignore( _p.selector(), !_ignoreCheck ); + }else{ + JC.Valid.ignore( _p.selector(), true ); + } if( _p._model.formBeforeProcess() ){ if( _p._model.formBeforeProcess().call( _p.selector(), _evt, _p ) === false ){ return _p._model.prevent( _evt ); } } + //JC.log( 2 ); + + if( !_ignoreCheck && !JC.Valid.check( _p.selector() ) ){ + _p._model.prevent( _evt ); + + if( !_p._model.checkDataValid() ){ + _p._view.dataValidError(); + return false; + } + //JC.log( 3 ); - if( !JC.Valid.check( _p.selector() ) ){ if( _p._model.formProcessError() ){ _p._model.formProcessError().call( _p.selector(), _evt, _p ); } - return _p._model.prevent( _evt ); + return false; + //JC.log( 4 ); } if( _p._model.formAfterProcess() ){ @@ -557,62 +751,87 @@

            File: ../bizs/FormLogic/FormLogic.js

            return _p._model.prevent( _evt ); } } + //JC.log( 5 ); if( _p.selector().data( FormLogic.Model.SUBMIT_CONFIRM_BUTTON ) ){ _p.trigger( FormLogic.Model.EVT_CONFIRM ); return _p._model.prevent( _evt ); } + //JC.log( 6 ); - _p.trigger( 'ProcessDone' ); - /* - if( _type == FormLogic.Model.AJAX ){ - _p.trigger( FormLogic.Model.EVT_AJAX_SUBMIT ); - return _p._model.prevent( _evt ); + + if( _p._model.formBeforeSubmit() ){ + if( _p._model.formBeforeSubmit().call( _p.selector(), _evt, _p ) === false ){ + return _p._model.prevent( _evt ); + } } - */ + + //JC.log( 7 ); + _p.trigger( FormLogic.Model.PROCESS_DONE ); + }); + + _p.on( FormLogic.Model.INITED, function( _evt ){ + _p.trigger( FormLogic.Model.INIT_JSONP ); + _p.trigger( FormLogic.Model.BIND_FORM ); + }); + + _p.on( FormLogic.Model.INIT_JSONP, function( _evt ){ + if( !( _type == FormLogic.Model.JSONP ) ) return; + + window[ _p._model.jsonpKey() ] = _p._model.jsonpCb(); }); - _p.on( 'BindFrame', function( _evt ){ + _p.on( FormLogic.Model.BIND_FORM, function( _evt ){ var _frame , _type = _p._model.formType() , _frameName ; - if( _type != FormLogic.Model.AJAX ) return; + if( !( _type == FormLogic.Model.AJAX || _type == FormLogic.Model.JSONP ) ) return; _frame = _p._model.frame(); _frame.on( 'load', function( _evt ){ + if( _p._model.formType() == FormLogic.Model.JSONP ) return; var _w = _frame.prop('contentWindow') , _wb = _w.document.body - , _d = $.trim( _wb.innerHTML ) + , _d = $( '<div>' + ( $.trim( _wb.innerHTML ) || '' ) + '</div>' ).text() ; if( !_p._model.isSubmited() ) return; - JC.log( 'common ajax done' ); - _p.trigger( 'AjaxDone', [ _d ] ); + //JC.log( 'common ajax done' ); + _p.trigger( FormLogic.Model.AJAX_DONE, [ _d ] ); }); }); /** * 全局 AJAX 提交完成后的处理事件 */ - _p.on('AjaxDone', function( _evt, _data ){ + _p.on( FormLogic.Model.AJAX_DONE, function( _evt, _data ){ + + _p.trigger( 'HIDE_PROMPT' ); + + FormLogic.GLOBAL_AJAX_CHECK + && FormLogic.GLOBAL_AJAX_CHECK( _data ); /** * 这是个神奇的BUG * chrome 如果没有 reset button, 触发 reset 会导致页面刷新 */ var _resetBtn = _p._model.selector().find('button[type=reset], input[type=reset]'); - _p._model.formSubmitDisable() && _p.trigger( 'EnableSubmit' ); + _p._model.formSubmitDisable() && _p.trigger( FormLogic.Model.ENABLE_SUBMIT ); + + _p._model.dataParse() && ( _data = _p._model.dataParse()( _data ) ); var _json, _fatalError, _resultType = _p._model.formAjaxResultType(); - if( _resultType == 'json' ){ + if( Object.prototype.toString.call( _data ) == '[object Object]' ){ + _json = _data; + }else if( _resultType == 'json' ){ try{ _json = $.parseJSON( _data ); }catch(ex){ _fatalError = true; _json = _data; } } if( _fatalError ){ - var _msg = printf( '服务端错误, 无法解析返回数据: <p class="auExtErr" style="color:red">{0}</p>' + var _msg = JC.f.printf( '服务端错误, 无法解析返回数据: <p class="auExtErr" style="color:red">{0}</p>' , _data ); - JC.Dialog.alert( _msg, 1 ) + _p.trigger( 'SHOW_POPUP', [ _p._model.formPopupType(), _msg, null, 1 ] ); return; } @@ -634,19 +853,23 @@

            File: ../bizs/FormLogic/FormLogic.js

            , _p ); + /* _p._model.formResetAfterSubmit() && !_p._model.userFormAjaxDone() && _resetBtn.length && _p.selector().trigger('reset'); + */ }); /** * 表单内容验证通过后, 开始提交前的处理事件 */ - _p.on('ProcessDone', function(){ + _p.on( FormLogic.Model.PROCESS_DONE, function( _evt ){ + _p.trigger( FormLogic.Model.BEFORE_SUBMIT ); + _p._model.formSubmitDisable() && _p.selector().find('input[type=submit], button[type=submit]').each( function(){ - $( this ).prop('disabled', true); + !_p._model.formIgnoreStatus() && $( this ).prop('disabled', true); }); }); @@ -656,13 +879,17 @@

            File: ../bizs/FormLogic/FormLogic.js

            _btn && ( _btn = $( _btn ) ); if( !( _btn && _btn.length ) ) return; - var _popup; + var _popup, _type = _p._model.formConfirmPopupType( _btn ) || 'dialog'; + _type += '.confirm'; + _popup = _p.triggerHandler( 'SHOW_POPUP', [ _type, _p._model.formSubmitConfirm( _btn ), _btn, 2 ] ); + /* if( _p._model.formConfirmPopupType( _btn ) == 'dialog' ){ _popup = JC.Dialog.confirm( _p._model.formSubmitConfirm( _btn ), 2 ); }else{ _popup = JC.confirm( _p._model.formSubmitConfirm( _btn ), _btn, 2 ); } + */ _popup.on('confirm', function(){ _p.selector().data( FormLogic.Model.SUBMIT_CONFIRM_BUTTON, null ); @@ -676,50 +903,117 @@

            File: ../bizs/FormLogic/FormLogic.js

            _p.selector().on('reset', function( _evt ){ if( _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON ) ){ - _p.trigger( FormLogic.Model.EVT_RESET ); + _p.trigger( FormLogic.Model.EVT_RESET, [ _evt ] ); return _p._model.prevent( _evt ); }else{ _p._view.reset(); - _p.trigger( 'EnableSubmit' ); + _p.trigger( FormLogic.Model.ENABLE_SUBMIT ); + _p.trigger( 'FORM_RESET', [ _evt ] ); } }); - _p.on( 'EnableSubmit', function(){ + _p.on( FormLogic.Model.ENABLE_SUBMIT, function(){ _p.selector().find('input[type=submit], button[type=submit]').each( function(){ - $( this ).prop('disabled', false ); + !_p._model.formIgnoreStatus() && $( this ).prop('disabled', false ); }); }); - _p.on( FormLogic.Model.EVT_RESET, function( _evt ){ + _p.on( FormLogic.Model.EVT_RESET, function( _evt, _srcEvt ){ var _btn = _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON ) ; _btn && ( _btn = $( _btn ) ); if( !( _btn && _btn.length ) ) return; - var _popup; + var _popup, _type = _p._model.formConfirmPopupType( _btn ) || 'dialog'; + _type += '.confirm'; + _popup = _p.triggerHandler( 'SHOW_POPUP', [ _type, _p._model.formResetConfirm( _btn ), _btn, 2 ] ); + /* if( _p._model.formConfirmPopupType( _btn ) == 'dialog' ){ _popup = JC.Dialog.confirm( _p._model.formResetConfirm( _btn ), 2 ); }else{ _popup = JC.confirm( _p._model.formResetConfirm( _btn ), _btn, 2 ); } + */ _popup.on('confirm', function(){ _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON, null ); _p.selector().trigger( 'reset' ); _p._view.reset(); - _p.trigger( 'EnableSubmit' ); + _p.trigger( FormLogic.Model.ENABLE_SUBMIT ); + _p.trigger( 'FORM_RESET', [ _srcEvt ] ); }); _popup.on('close', function(){ _p.selector().data( FormLogic.Model.RESET_CONFIRM_BUTTON, null ); }); }); - + + _p.on( FormLogic.Model.BEFORE_SUBMIT, function( _evt ){ + _p.trigger( 'SHOW_PROMPT' ); + if( _p._model.formType() != 'ajax' ){ + JC.f.safeTimeout( function(){ + _p.trigger( 'HIDE_PROMPT' ); + }, _p, 'hidePromptasdfasd', 2000 ); + } + }); + + _p.on( 'SHOW_PROMPT', function( _evt ){ + var _promptSelctor = _p._model.submitPromptSelector(); + if( !( _promptSelctor && _promptSelctor.length ) ) return; + _promptSelctor.html( _p._model.submitPromptMsg() ).show(); + }); + + _p.on( 'HIDE_PROMPT', function( _evt ){ + var _promptSelctor = _p._model.submitPromptSelector(); + if( !( _promptSelctor && _promptSelctor.length ) ) return; + _promptSelctor.hide(); + }); + + _p.on( 'FORM_RESET', function( _evt, _srcEvt ){ + JC.f.safeTimeout( function(){ + _p._model.formResetCallback() && _p._model.formResetCallback().call( _p.selector(), _srcEvt, _p ); + }, _p, 'asdfawerasdfase_reset', 100 ); + }); + + + _p.on( 'SHOW_POPUP', function( _evt, _type, _str, _src, _status, _cb ){ + _type = ( _type || '' ).toLowerCase(); + var _popup; + + switch( _type ){ + case 'dialog.confirm': { + _popup = JC.Dialog.confirm( _str, _status, _cb ); + break; + } + case 'popup.confirm': { + _popup = JC.confirm( _str, _src, _status, _cb ); + break; + } + case 'popup.msgbox': { + _popup = JC.msgbox( _str, _src, _status, _cb ); + break; + } + case 'dialog.msgbox': { + _popup = JC.Dialog.msgbox( _str, _status, _cb ); + break; + } + case 'popup': { + _popup = JC.alert( _str, _src, _status, _cb ); + break; + } + default: { + _popup = JC.Dialog.alert( _str, _status, _cb ); + break; + } + } + + return _popup; + }); } , _inited: function(){ - JC.log( 'FormLogic#_inited', new Date().getTime() ); + //JC.log( 'FormLogic#_inited', new Date().getTime() ); var _p = this , _files = _p.selector().find('input[type=file][name]') ; @@ -729,16 +1023,20 @@

            File: ../bizs/FormLogic/FormLogic.js

            && _p.selector().attr( 'encoding', 'multipart/form-data' ) ; - _p.trigger( 'BindFrame' ); + _p._model.trigger( FormLogic.Model.INITED ); } - }; - JC.BaseMVC.buildModel( FormLogic ); + }) ; + + FormLogic.Model._instanceName = 'FormLogic'; + + FormLogic.Model.INITED = 'inited'; + FormLogic.Model.INIT_JSONP = 'init_jsonp'; - FormLogic.Model._instanceName = 'FormLogicIns'; FormLogic.Model.GET = 'get'; FormLogic.Model.POST = 'post'; FormLogic.Model.AJAX = 'ajax'; + FormLogic.Model.JSONP = 'jsonp'; FormLogic.Model.IFRAME = 'iframe'; FormLogic.Model.SUBMIT_CONFIRM_BUTTON = 'SubmitButton'; @@ -749,21 +1047,163 @@

            File: ../bizs/FormLogic/FormLogic.js

            FormLogic.Model.EVT_CONFIRM = "ConfirmEvent" FormLogic.Model.EVT_RESET = "ResetEvent" - FormLogic.Model.EVT_AJAX_SUBMIT = "AjaxSubmit" FormLogic.Model.INS_COUNT = 1; - FormLogic.Model.prototype = { + FormLogic.Model.PROCESS_DONE = "ProcessDone"; + FormLogic.Model.BEFORE_SUBMIT = 'FORMBEFORESUBMIT'; + + FormLogic.Model.IGNORE_KEY = "formSubmitIgnoreCheck"; + FormLogic.Model.BIND_FORM = "BindFrame"; + FormLogic.Model.AJAX_DONE = "AjaxDone"; + FormLogic.Model.ENABLE_SUBMIT = "EnableSubmit"; + + FormLogic.Model.SHOW_DATA_VALID_ERROR = true; + + JC.f.extendObject( FormLogic.Model.prototype, { init: function(){ this.id(); + this.selector().addClass( FormLogic.Model._instanceName ); + this.selector().addClass( this.id() ); + + if( this.formType() == FormLogic.Model.JSONP ){ + var _r = this.attrProp( 'formAjaxAction' ) || this.attrProp( 'action' ) || '?'; + + this.attrProp( 'action' ) + && ( + this.selector().attr( 'action' + , JC.f.addUrlParams( this.attrProp( 'action' ), { 'callbackInfo': this.id() } ) ) + , this.selector().attr( 'action' + , JC.f.addUrlParams( this.attrProp( 'action' ), { 'callback': this.jsonpKey() } ) ) + ); + + this.attrProp( 'formAjaxAction' ) + && ( + this.selector().attr( 'formAjaxAction', + JC.f.addUrlParams( this.attr( 'formAjaxAction' ), { 'callbackInfo': this.id() } ) ) + , this.selector().attr( 'formAjaxAction', + JC.f.addUrlParams( this.attr( 'formAjaxAction' ), { 'callback': this.jsonpKey() } ) ) + ); + } + } + , submitPromptSelector: + function(){ + return this.selectorProp( 'formSubmitPromptSelector' ); + } + + , submitPromptMsg: + function( _btn ){ + var _r = '正在提交数据,请稍候...'; + _r = this.attrProp( 'formSubmitPromptMsg' ) || _r; + _btn && ( _r = this.attrProp( _btn, 'formSubmitPromptMsg' ) || _r ); + return _r; + } + + , showDataValidError: + function( _item ){ + var _p = this, _r = FormLogic.Model.SHOW_DATA_VALID_ERROR; + + _p.selector().is( '[formShowDataValidError]' ) && ( _r = JC.f.parseBool( _p.attrProp( 'formShowDataValidError' ) ) ); + _item && _item.is( '[formShowDataValidError]' ) && ( _r = JC.f.parseBool( _item.attr( 'formShowDataValidError' ) ) ); + + return _r; + } + + , formIgnoreStatus: + function(){ + return this.boolProp( 'formIgnoreStatus'); + } + + , checkDataValid: + function(){ + var _p = this,_r = true, _iv = true, i, j; + + for( i = 0, j = _p.selector()[0].length; i < j; i++ ){ + var _item = $(_p.selector()[0][i]); + var _v = _item.val().trim() + , _status = _item.attr('datavalid') + , _datatypestatus = _item.attr('datatypestatus') + ; + if( _v ){ + if( _status && _datatypestatus ){ + _r && ( _r = JC.f.parseBool( _status ) ); + }else if( _datatypestatus ){ + _iv && ( _iv = JC.f.parseBool( _datatypestatus ) ); + } + }else if( _datatypestatus ){ + _iv && ( _iv = JC.f.parseBool( _datatypestatus ) ); + if( ! _iv ) break; + } + + } + !_iv && ( _r = true ); + return _r; + } + + , dataValidItems: + function(){ + var _r = []; + this.selector().find( 'input[type=text][subdatatype]' ).each( function(){ + var _item = $(this); + if( !/datavalid/i.test( _item.attr( 'subdatatype' ) ) ) return; + _r.push( _item ); + }); + + return $( _r ); } + , id: function(){ if( ! this._id ){ - this._id = 'FormLogicIns_' + ( FormLogic.Model.INS_COUNT++ ); + this._id = FormLogic.Model._instanceName + '_' + ( FormLogic.Model.INS_COUNT++ ); } return this._id; } + + , jsonpCb: + function(){ + var _r = this._innerJsonpCb + , _action = this.formAjaxAction() + ; + + _r = this.callbackProp( 'formJsonpCb' ) || _r; + + if( JC.f.hasUrlParam( _action, 'callback' ) ){ + _r = this.windowProp( JC.f.getUrlParam( _action, 'callback' ) ) || _r; + } + + return _r; + } + + , jsonpKey: + function(){ + var _r = this.id() + '_JsonpCb' + , _action = this.formAjaxAction() + ; + + _r = this.attrProp( 'formJsonpCb' ) || _r; + + if( JC.f.hasUrlParam( _action, 'callback' ) ){ + _r = JC.f.getUrlParam( _action, 'callback' ) || _r; + } + + return _r; + } + /** + * 这个回调的 this 指针是 window + */ + , _innerJsonpCb: + function( _data, _info ){ + if( !( _data && _info ) ) return; + + var _frm = $( 'form.' + _info ), _ins; + if( !_frm.length ) return; + _ins = JC.BaseMVC.getInstance( _frm, Bizs.FormLogic ); + if( !_ins ) return; + + _ins.trigger( Bizs.FormLogic.Model.AJAX_DONE, [ _data ] ); + } + , isSubmited: function( _setter ){ typeof _setter != 'undefined' && ( this._submited = _setter ); @@ -784,12 +1224,12 @@

            File: ../bizs/FormLogic/FormLogic.js

            if( !( _p._frame && _p._frame.length && _p._frame.parent() ) ){ if( _p.selector().is('[target]') ){ - _p._frame = $( printf( 'iframe[name={0}]', _p.selector().attr('target') ) ); + _p._frame = $( JC.f.printf( 'iframe[name={0}]', _p.selector().attr('target') ) ); } if( !( _p._frame && _p._frame.length ) ) { _p.selector().prop( 'target', _p.frameId() ); - _p._frame = $( printf( FormLogic.frameTpl, _p.frameId() ) ); + _p._frame = $( JC.f.printf( FormLogic.frameTpl, _p.frameId() ) ); _p.selector().after( _p._frame ); } @@ -822,7 +1262,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            , formAjaxAction: function(){ var _r = this.attrProp( 'formAjaxAction' ) || this.attrProp( 'action' ) || '?'; - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } , formSubmitDisable: function(){ @@ -831,11 +1271,11 @@

            File: ../bizs/FormLogic/FormLogic.js

            ; _p.selector().is('[formSubmitDisable]') - && ( _r = parseBool( _p.selector().attr('formSubmitDisable') ) ); + && ( _r = JC.f.parseBool( _p.selector().attr('formSubmitDisable') ) ); _btn && _btn.is('[formSubmitDisable]') - && ( _r = parseBool( _btn.attr('formSubmitDisable') ) ); + && ( _r = JC.f.parseBool( _btn.attr('formSubmitDisable') ) ); return _r; } @@ -844,7 +1284,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            var _p = this, _r = FormLogic.resetAfterSubmit; _p.selector().is('[formResetAfterSubmit]') - && ( _r = parseBool( _p.selector().attr('formResetAfterSubmit') ) ); + && ( _r = JC.f.parseBool( _p.selector().attr('formResetAfterSubmit') ) ); return _r; } , formAjaxDone: @@ -855,6 +1295,13 @@

            File: ../bizs/FormLogic/FormLogic.js

            _r = _p.userFormAjaxDone() || _r; return _r; } + , dataParse: + function(){ + var _p = this, _r = FormLogic.DATA_PARSE; + _r = _p.windowProp( 'formDataParse' ) || _r; + return _r; + } + , userFormAjaxDone: function(){ var _p = this, _r @@ -875,6 +1322,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            var _form = $(this) , _panel , _url = '' + , _type = _p._model.formPopupType() + '.msgbox'; ; _json.data @@ -885,19 +1333,21 @@

            File: ../bizs/FormLogic/FormLogic.js

            && ( _url = _json.url ) ; + if( _json.errorno ){ - _panel = JC.Dialog.alert( _json.errmsg || '操作失败, 请重新尝试!', 1 ); + _p.triggerHandler( 'SHOW_POPUP', [ _type, _json.errmsg || '操作失败, 请重新尝试!', _btn, 1 ] ); }else{ - _panel = JC.Dialog.msgbox( _json.errmsg || '操作成功', 0, function(){ + _panel = _p.triggerHandler( 'SHOW_POPUP', [ _type, _json.errmsg || '操作成功', null, 0, function(){ _url = _url || _p._model.formAjaxDoneAction(); if( _url ){ try{_url = decodeURIComponent( _url ); } catch(ex){} - /^URL/.test( _url) && ( _url = urlDetect( _url ) ); - reloadPage( _url ); + /^URL/.test( _url) && ( _url = JC.f.urlDetect( _url ) ); + JC.f.reloadPage( _url ); } - }, _p._model.formPopupCloseMs() ); + }, _p._model.formPopupCloseMs() ] ); } } + , formPopupCloseMs: function( _btn ){ var _p = this @@ -927,29 +1377,45 @@

            File: ../bizs/FormLogic/FormLogic.js

            && ( _r = _p.attrProp( _btn, 'formAjaxDoneAction' ) || _r ) ; - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } - - , formBeforeProcess: function(){ return this.callbackProp( 'formBeforeProcess' ); } , formAfterProcess: function(){ return this.callbackProp( 'formAfterProcess' ); } + , formBeforeSubmit: function(){ return this.callbackProp( 'formBeforeSubmit' ); } , formProcessError: function(){ var _r = this.callbackProp( 'formProcessError' ) || FormLogic.processErrorCb; return _r; } + , formResetCallback: function(){ return this.callbackProp( 'formResetCallback'); } + , prevent: function( _evt ){ _evt && _evt.preventDefault(); return false; } , formConfirmPopupType: function( _btn ){ - var _r = this.stringProp( 'formConfirmPopupType' ) || 'dialog'; + var _r = this.stringProp( 'formConfirmPopupType' ); _btn && ( _btn = $( _btn ) ).length && _btn.is('[formConfirmPopupType]') && ( _r = _btn.attr('formConfirmPopupType') ) ; + + _r = _r || this.formPopupType( _btn ); + + return _r.toLowerCase(); + } + + , formPopupType: + function( _btn ){ + var _r = this.stringProp( 'formPopupType' ) || 'dialog'; + + _btn && ( _btn = $( _btn ) ).length + && _btn.is('[formPopupType]') + && ( _r = _btn.attr('formPopupType') ) + ; return _r.toLowerCase(); } + , formResetUrl: function(){ var _p = this @@ -961,7 +1427,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            && ( _r = _p.attrProp( _btn, 'formResetUrl' ) || _r ) ; - return urlDetect( _r ); + return JC.f.urlDetect( _r ); } , formSubmitConfirm: function( _btn ){ @@ -984,30 +1450,39 @@

            File: ../bizs/FormLogic/FormLogic.js

            return _r.trim(); } - }; + , datavalidFormLogicMsg: + function( _item ){ + var _msg = "需要表单异步验证后才能提交, 请重试..."; + _msg = $( _item ).attr( 'datavalidFormLogicMsg' ) || _msg; + return _msg; + } + }); - JC.BaseMVC.buildView( FormLogic ); - FormLogic.View.prototype = { + JC.f.extendObject( FormLogic.View.prototype, { initQueryVal: function(){ var _p = this; if( _p._model.formType() != FormLogic.Model.GET ) return; - JC.Form && JC.Form.initAutoFill( _p._model.selector() ); + JC.FormFillUrl && JC.FormFillUrl.init( _p._model.selector() ); } , reset: function( _btn ){ var _p = this, _resetUrl = _p._model.formResetUrl(); - _resetUrl && reloadPage( _resetUrl ); + _resetUrl && JC.f.reloadPage( _resetUrl ); _p._model.resetTimeout && clearTimeout( _p._model.resetTimeout ); _p._model.resetTimeout = setTimeout(function(){ var _form = _p._model.selector(); - _form.find('input[type=text], input[type=password], input[type=file], textarea').val(''); + _form.find('input[type=text], input[type=password], input[type=file], textarea').each( function(){ + if( $( this ).attr( 'ignoreResetClear' ) ) return; + $( this ).val( '' ); + }); _form.find('select').each( function() { + if( $( this ).attr( 'ignoreResetClear' ) ) return; var sp = $(this); var cs = sp.find('option'); if( cs.length > 1 ){ @@ -1027,20 +1502,39 @@

            File: ../bizs/FormLogic/FormLogic.js

            JC.hideAllPopup( 1 ); } - }; + , dataValidError: + function(){ + var _p = this; + $.each( this._model.dataValidItems(), function( _ix, _item ){ + var _v = _item.val().trim(), _status = _item.attr('datavalid'); + if( !( _v && _status ) ) return; - JC.BaseMVC.build( FormLogic, 'Bizs' ); + if( JC.f.parseBool( _status ) ) return; + + if( _p._model.showDataValidError( _item ) ){ + var _popupType = _p._model.formPopupType() + '.msgbox'; + _p.triggerHandler( 'SHOW_POPUP', [ _popupType, _p._model.datavalidFormLogicMsg( _item ), _item, 2 ] ); + + JC.f.safeTimeout( function(){ + _item.trigger( 'blur' ); + }, _item, 'FORMLOGIC_DATAVALID', 10 ); + } + return false; + }); + } + }); $(document).delegate( 'input[formSubmitConfirm], button[formSubmitConfirm]', 'click', function( _evt ){ var _p = $(this) - , _fm = getJqParent( _p, 'form' ) + , _fm = JC.f.getJqParent( _p, 'form' ) , _ins = FormLogic.getInstance( _fm ) , _tmp ; if( _fm && _fm.length ){ if( _ins ){ + _fm.data( FormLogic.Model.SUBMIT_CONFIRM_BUTTON, null ) if( _p.is('[formConfirmCheckSelector]') ){ - _tmp = parentSelector( _p, _p.attr('formConfirmCheckSelector') ); + _tmp = JC.f.parentSelector( _p, _p.attr('formConfirmCheckSelector') ); if( !( _tmp && _tmp.length ) ) return; } else if( _p.is( '[formConfirmCheckCallback]') ){ @@ -1055,26 +1549,32 @@

            File: ../bizs/FormLogic/FormLogic.js

            }); $(document).delegate( 'input[formResetConfirm], button[formResetConfirm]', 'click', function( _evt ){ - var _p = $(this), _fm = getJqParent( _p, 'form' ); + var _p = $(this), _fm = JC.f.getJqParent( _p, 'form' ); _fm && _fm.length && _fm.data( FormLogic.Model.RESET_CONFIRM_BUTTON, _p ) ; }); $(document).delegate( 'input[type=reset], button[type=reset]', 'click', function( _evt ){ - var _p = $(this), _fm = getJqParent( _p, 'form' ); + var _p = $(this), _fm = JC.f.getJqParent( _p, 'form' ); _fm && _fm.length && _fm.data( FormLogic.Model.GENERIC_RESET_BUTTON , _p ) ; }); $(document).delegate( 'input[type=submit], button[type=submit]', 'click', function( _evt ){ - var _p = $(this), _fm = getJqParent( _p, 'form' ); + var _p = $(this), _fm = JC.f.getJqParent( _p, 'form' ); _fm && _fm.length && _fm.data( FormLogic.Model.GENERIC_SUBMIT_BUTTON , _p ) ; }); + $(document).delegate( 'input[buttonClickBindSelector], button[buttonClickBindSelector]', 'click', function( _evt ){ + var _p = $(this), _target = JC.f.parentSelector( _p, _p.attr('buttonClickBindSelector') ); + if( !( _target && _target.length ) ) return; + _target.val( _p.val() || '' ); + }); + $(document).delegate( 'a[buttonReturnUrl], input[buttonReturnUrl], button[buttonReturnUrl]', 'click', function( _evt ){ var _p = $(this) , _url = _p.attr('buttonReturnUrl').trim() @@ -1085,7 +1585,7 @@

            File: ../bizs/FormLogic/FormLogic.js

            ; if( !_url ) return; - _url = urlDetect( _url ); + _url = JC.f.urlDetect( _url ); _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault(); @@ -1103,10 +1603,10 @@

            File: ../bizs/FormLogic/FormLogic.js

            } } _panel.on('confirm', function(){ - reloadPage( _url ); + JC.f.reloadPage( _url ); }); }else{ - reloadPage( _url ); + JC.f.reloadPage( _url ); } }); @@ -1118,7 +1618,16 @@

            File: ../bizs/FormLogic/FormLogic.js

            }, 1 ); }); -}(jQuery)); + return Bizs.FormLogic; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._bizs_InputSelect_InputSelect.js.html b/docs_api/files/.._bizs_InputSelect_InputSelect.js.html new file mode 100644 index 000000000..bdb26a00a --- /dev/null +++ b/docs_api/files/.._bizs_InputSelect_InputSelect.js.html @@ -0,0 +1,738 @@ + + + + + ../bizs/InputSelect/InputSelect.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/InputSelect/InputSelect.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * 输入下拉框
            + * 可以输入数据也可以通过点下拉箭头选择数据。
            + * 下拉的数据支持Ajax接口和php前段铺数据。
            + *
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.InputSelect.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/InputSelect/_demo' target='_blank'>demo link</a></p>
            + *  
            + * <h2>页面只要引用本脚本, 默认会自动处理 div class="js_bizInputSelect" </h2>
            + *
            + * <h2>可用的 HTML attribute</h2>
            + *
            + * <dl>
            + * <dt>iptseldatabox = string</dt>
            + * <dd>指定下拉数据存放的父容器</dd>
            + * <dt>iptseldataboxheight = int</dt>
            + * <dd>指定下拉数据存放的父容器的高度,默然为自适应</dd>
            + * <dt>iptseloption = string</dt>
            + * <dd>指定下拉数据选项</dd>
            + * <dt>iptselipt = string</dt>
            + * <dd>指定输入框</dd>
            + * <dt>iptselhideipt = string</dt>
            + * <dd>指定隐藏域</dd>
            + * <dt>iptselprevententer = bool</dt>
            + * <dd>回车键阻止表单提交, default = true</dd>
            + * <dt>iptselitemselected = function</dt>
            + * <dd>选择数据后的回调</dd>
            + *
            + * <dt>iptseldataurl = string</dt>
            + * <dd>指定下拉数据的ajax接口,要求返回json数据格式如下:
            + *   { errorno: 0,
            + *     data: [{label: 'item1', 'value': 0}]    
            + *   }</dd>
            + * </dl>
            + *
            + *
            + *
            + * @namespace window.Bizs
            + * @class InputSelect
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-12-02
            + * @author  zuojing <suches@btbtd.org> | 75 Team
            +
            + */
            +    Bizs.InputSelect = InputSelect;
            +    JC.f.addAutoInit && JC.f.addAutoInit( InputSelect );
            +
            +    function InputSelect( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, InputSelect ) ) 
            +            return JC.BaseMVC.getInstance( _selector, InputSelect );
            +
            +        JC.BaseMVC.getInstance( _selector, InputSelect, this );
            +
            +        this._model = new InputSelect.Model( _selector );
            +        this._view = new InputSelect.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( InputSelect.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 InputSelect 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of InputSelectInstance}
            +     */
            +    InputSelect.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_bizInputSelect' )  ){
            +                    _r.push( new InputSelect( _selector ) );
            +                }else{
            +                    _selector.find( '.js_bizInputSelect' ).each( function(){
            +                        _r.push( new InputSelect( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +
            +    BaseMVC.build( InputSelect );
            +
            +    JC.f.extendObject( InputSelect.prototype, {
            +        _beforeInit: function () {
            +           var p = this;
            +
            +            p._model.selector().addClass('IPTSEL-BOX').append('<span class="IPTSEL-ARROW"></span>');
            +            if ( p._model.iptselbox().length ) {
            +                p._model.iptselbox().addClass('IPTSEL-DROPDOWN');
            +                p._model.iptselboxheight() 
            +                    && p._model.iptselbox().css({'height': p._model.iptselboxheight() + 'px', 'overflow-y': 'auto'});
            +            }
            +            p._model.iptseloption().length && p._model.iptseloption().addClass('IPTSEL-ITEM');
            +            //JC.log( 'InputSelect _beforeInit', new Date().getTime() );
            +
            +        },
            +
            +        _initHanlderEvent: function () {
            +            var p = this;
            +
            +            p._model.selector().data('visible', 0);
            +
            +            p._model.iptselipt().on('keyup', function( _evt, _showPopup ){
            +                var _sp = $(this)
            +                    , _val = _sp.val().trim()
            +                    , _keycode = _evt.keyCode
            +                    , _ignoreTime = _sp.data('IgnoreTime')
            +                    ;
            +
            +                if( _keycode ){
            +                    switch( _keycode ){
            +                        case 38://up
            +                        case 40://down
            +                            {
            +                                _evt.preventDefault();
            +                            }
            +                        case 37: //left
            +                        case 39: //right
            +                            {
            +                                return;
            +                            }
            +                        case 27: //ESC
            +                            {
            +                                p._hide();
            +                                return;
            +                            }
            +                    }
            +                }
            + 
            +            });
            +
            +            //输入框事件处理
            +            p._model.iptselipt().on('click', function () {
            +                if ( p.selector().data('visible') ) {
            +                    p._hide();
            +                } else {
            +                    return;
            +                };
            +            });
            +
            +            //箭头事件处理
            +            p._model.iptselarrow().on('click', function (e) {
            +                e.stopPropagation();
            +                if (p._model.dataurl() && !p._model.dataready) {
            +                    p._model.ajaxdata();
            +                }
            +
            +                p[p._model.selector().data('visible') ? '_hide': '_show']();
            +            });
            +
            +            //键盘事件处理
            +            p._model.iptselipt().on('keydown', function (e) {
            +
            +                var keycode = e.keyCode, 
            +                    $this = $(this), 
            +                    keyindex, 
            +                    isBackward, 
            +                    items = p._model.iptseloption(), 
            +                    item;
            +
            +                keycode == 38 && ( isBackward = true );
            +                //JC.log( 'keyup', new Date().getTime(), keycode );
            +
            +                switch ( keycode ) {
            +                    case 38://up
            +                    case 40://down
            +                        {   
            +                            if (p._model.dataurl()) {
            +                                p._model.iptselarrow().trigger('click');
            +                            }
            +                            p._show();
            +                            keyindex = p._model.nextIndex( isBackward );
            +
            +                            if( keyindex >= 0 && keyindex < items.length ){
            +                                e.preventDefault();
            +                                item = $(items[keyindex]);
            +                                p._model.selectedIdentifier( item );
            +                                p._model.iptselipt().val( p._model.getKeyword(item ) );
            +                                p._model.iptselhideipt().val(item.data('value') || '');
            +                                return;
            +                            }
            +                            break;
            +                        }
            +                    case 9://tab
            +                        {
            +                            p._hide();
            +                            return;
            +                        }
            +                    case 13://回车
            +                        {
            +                            var tmpSelectedItem;
            +
            +                            if( p._model.iptselbox().is( ':visible' ) 
            +                                    && ( tmpSelectedItem = p._model.iptselbox().find( 'li.active') ) && tmpSelectedItem.length ){
            +                                p.trigger('iptselitemselected', [ tmpSelectedItem, p._model.getKeyword( tmpSelectedItem ) ]);
            +                            }
            +                            p._hide();
            +                            p._model.iptselprevententer() && e.preventDefault();
            +                            break;
            +                        }
            +                }
            +            });
            +
            +            //容器事件处理阻止冒泡
            +            p._model.iptselbox().on('mousedown', function (e) {
            +                e.stopPropagation();
            +            });
            +
            +            //选项mouseenter,mouseleave事件处理
            +            p._model.iptselbox()
            +                .delegate('.IPTSEL-ITEM', 'mouseenter', function (e) {
            +                    var $this = $(this);
            +                    p._model.selectedIdentifier($this, true);
            +                })
            +                .delegate('.IPTSEL-ITEM', 'mouseleave', function (e) {
            +                    var $this = $(this);
            +                    $this.removeClass('active');
            +                });
            +
            +            //选项click事件处理
            +            p._model.iptselbox().delegate('.IPTSEL-ITEM', 'click', function (e) {
            +                var $this = $(this),
            +                    keyword = $this.data('label'),
            +                    kvalue = $this.data('value') || '';
            +               
            +                p._model.iptselipt().val(keyword);
            +                p._model.iptselhideipt().val(kvalue);
            +                p._hide();
            +
            +                p.trigger('iptselitemselected', [$this, keyword, kvalue ]);
            +                JC.f.safeTimeout( function(){
            +                    p._model.iptselipt().trigger( 'blur' );
            +                }, null, 'IptSelItemClick', 200);
            +            });
            +
            +            p.on('iptselitemselected', function (e, sp, keyword, kvalue) {
            +                p._model.iptselitemselectedcallback() 
            +                && p._model.iptselitemselectedcallback().call(p, keyword, kvalue);
            +            });
            +
            +            //空白处点击处理
            +            $(document).on('mousedown', function () {
            +                p._hide();
            +            });
            +
            +        },
            +
            +        _inited: function () {
            +
            +        },
            +
            +        _show: function () {
            +            var p = this;
            +            p._view.show();
            +            p._model.selector().data('visible', 1);
            +            return this;
            +        },
            +
            +        _hide: function () {
            +            var p = this;
            +            p._view.hide();
            +            p._model.selector().data('visible', 0);
            +            return this;
            +        }
            +
            +    });
            +
            +    InputSelect.Model._instanceName = 'InputSelectIns';
            +
            +    JC.f.extendObject( InputSelect.Model.prototype, {
            +        init: function () {
            +        },
            +
            +        //输入框
            +        iptselipt: function () {
            +            var r = JC.f.parentSelector(this.selector(), this.attrProp('iptselipt'));
            +            r.length && r.addClass('IPTSEL-INPUT');
            +            return r;
            +        },
            +
            +        //隐藏域
            +        iptselhideipt: function () {
            +            var r = JC.f.parentSelector(this.selector(), this.attrProp('iptselhideipt'));
            +            r.length && r.addClass('IPTSEL-HIDE');
            +            return r;
            +        },
            +
            +        //箭头
            +        iptselarrow: function () {
            +            return this.selector().find('.IPTSEL-ARROW');
            +        },
            +
            +        //选项
            +        iptseloption: function () {
            +            var selector = this.selector();
            +            return JC.f.parentSelector(selector, this.attrProp('iptseloption'));
            +        },
            +
            +        //选项的容器
            +        iptselbox: function () {
            +            var p = this,
            +                r = p.attrProp('iptseldatabox');
            +
            +            return JC.f.parentSelector(p.selector(), r );
            +           
            +        },
            +
            +        //选项容器的高度
            +        iptselboxheight: function () {
            +            return this.intProp('iptselboxheight');
            +        },
            +
            +        //是否阻止enter提交表单
            +        iptselprevententer: function () {
            +            var r = true,
            +                selector = this.selector();
            +
            +            selector.is( '[iptselprevententer]' )
            +                && ( r = this.boolProp('iptselprevententer')  );
            +
            +            return r;
            +        },
            +
            +        //ajax数据url
            +        dataurl: function () {
            +            return this.attrProp('iptseldataurl');
            +        },
            +
            +        //获取ajax数据
            +        ajaxdata: function () {
            +            var p = this,
            +                url = this.dataurl();
            +
            +            $.get(url).done(function (res) {
            +                res = $.parseJSON(res);
            +                var tpl = '<ul>',
            +                    str = '<li data-label="{0}" data-keyindex="{1}" data-value="{2}" class="IPTSEL-ITEM">{0}</li>',
            +                    i = 0,
            +                    l;
            +
            +                if (res.errorno) {
            +                    JC.f.alert('操作失败', 2);
            +                } else {
            +                    l = res.data.length;
            +                    if (l === 0) {
            +                        tpl = '<li>暂无数据</li>';
            +                    } else {
            +                        for (i = 0; i < l; i++) {
            +                            tpl += JC.f.printf(str, res.data[i].label, i, res.data[i].value || '');
            +                        }
            +                    }
            +                    
            +                    tpl += '</ul>';
            +                  
            +                    p.iptselbox().html(tpl);
            +                    p.dataready = 1;
            +                }
            +            });
            +        },
            +
            +        nextIndex: function (isBackward) {
            +            var p = this,
            +                items = p.iptseloption(),
            +                len = items.length;
            +
            +            if (isBackward) {
            +                if (p.keyindex <= 0) {
            +                    p.keyindex = len - 1;
            +                } else {
            +                    p.keyindex--;
            +                }
            +            } else {
            +                if( p.keyindex >= len - 1 ) {
            +                    p.keyindex = 0;
            +                } else {
            +                    p.keyindex++;
            +                }
            +            }
            +
            +            return p.keyindex;
            +        },
            +
            +        //高亮显示选中项
            +        selectedIdentifier: function (selector, updateKeyIndex) {
            +            this.preSelected && this.preSelected.removeClass('active');
            +            selector.addClass('active');
            +            updateKeyIndex && (this.keyindex = parseInt(selector.data('keyindex')));
            +            this.preSelected = selector;
            +        },
            +
            +        //获取下拉选项的值
            +        getKeyword: function (selector) {
            +            var keyword = selector.data('label');
            +            try {
            +                keyword = decodeURIComponent(keyword);
            +            } catch (ex) {
            +
            +            }
            +            return keyword;
            +        },
            +
            +        keyindex: -1,
            +
            +        dataready: 0,
            +
            +        //下拉选中后的回调
            +        iptselitemselectedcallback: function () {
            +            var p = this;
            +
            +            p.selector().is('[iptselitemselectedcallback]')
            +                &&  (p._iptselselectedcallback = p.selector().attr('iptselitemselectedcallback'));
            +            
            +            return p._iptselselectedcallback ? window[p._iptselselectedcallback]: null;
            +        }
            +
            +    });
            +
            +    JC.f.extendObject( InputSelect.View.prototype, {
            +        init: function () {
            +
            +        },
            +
            +        show: function () {
            +            var p = this;
            +
            +            p._model.iptselbox().show().css('z-index', window.ZINDEX_COUNT++);
            +        },
            +
            +        hide: function () {
            +            var p = this;
            +            p._model.iptselbox().hide();
            +        }
            +        
            +    });
            +    
            +    var $doc = $(document);
            +
            +    $doc.ready( function(){
            +        var _insAr = 0;
            +        InputSelect.autoInit
            +            && ( _insAr = InputSelect.init() );
            +    });
            +
            +    return Bizs.InputSelect;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_KillISPCache_KillISPCache.js.html b/docs_api/files/.._bizs_KillISPCache_KillISPCache.js.html index f45df0ffd..36161df23 100644 --- a/docs_api/files/.._bizs_KillISPCache_KillISPCache.js.html +++ b/docs_api/files/.._bizs_KillISPCache_KillISPCache.js.html @@ -3,11 +3,17 @@ ../bizs/KillISPCache/KillISPCache.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,17 +252,19 @@

            File: ../bizs/KillISPCache/KillISPCache.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
                 /**
                  * 应用场景
                  * <br /><b>ISP 缓存问题 引起的用户串号</b>
                  * <br />ajax 或者动态添加的内容, 请显式调用  JC.KillISPCache.getInstance().process( newNodeContainer )
                  * <br /><b>这是个单例类</b>
            -     
            +     * <p><b>require</b>: 
            +     *      <a href='.jQuery.html'>jQuery</a>
            +     *      , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.KillISPCache.html' target='_blank'>API docs</a>
                  * | <a href='../../bizs/KillISPCache/_demo' target='_blank'>demo link</a></p>
            -     * require: <a href='../classes/window.jQuery.html'>jQuery</a>
                  *
                  * <h2>页面只要引用本文件, 默认会自动初始化 KillISPCache 逻辑</h2>
                  * <dl>
            @@ -314,7 +388,7 @@ 

            File: ../bizs/KillISPCache/KillISPCache.js

            KillISPCache.Model.prototype = { init: function(){ - this._postfix = printf( '{0}_{1}_' + this._postfix = JC.f.printf( '{0}_{1}_' , new Date().getTime().toString() , Math.round( Math.random() * 100000 ) ); @@ -373,7 +447,7 @@

            File: ../bizs/KillISPCache/KillISPCache.js

            if( _ignore ) return; - _url = addUrlParams( _url, _p.keyVal() ); + _url = JC.f.addUrlParams( _url, _p.keyVal() ); _sp.attr( 'href', _url ); _sp.html( _text ); }); @@ -415,7 +489,7 @@

            File: ../bizs/KillISPCache/KillISPCache.js

            _ignore = true; } }); - !_ignore && ( _settings.url = addUrlParams( _settings.url, _p.keyVal() ) ); + !_ignore && ( _settings.url = JC.f.addUrlParams( _settings.url, _p.keyVal() ) ); }); } , ignoreSameLinkText: @@ -445,7 +519,16 @@

            File: ../bizs/KillISPCache/KillISPCache.js

            }, 100 ); }); -}(jQuery)); + return Bizs.KillISPCache; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._bizs_MoneyTips_MoneyTips.js.html b/docs_api/files/.._bizs_MoneyTips_MoneyTips.js.html new file mode 100644 index 000000000..6c71a4782 --- /dev/null +++ b/docs_api/files/.._bizs_MoneyTips_MoneyTips.js.html @@ -0,0 +1,578 @@ + + + + + ../bizs/MoneyTips/MoneyTips.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MoneyTips/MoneyTips.js

            + +
            +
            +//TODO: 提供静态格式化方法
            +//TODO: 提供 页面载入时, 指定 class 进行格式化支持
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * <h2>金额格式化 业务逻辑</h2>
            + * <br/>应用场景
            + * <br/>用户在文本框输入金额时, 在指定的 node 显示以逗号分隔的金额
            + * <p><b>require</b>: 
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.MoneyTips.html' target='_blank'>API docs</a>
            + * | <a href='../../bizs/MoneyTips/_demo' target='_blank'>demo link</a></p>
            + *
            + * input[type=text] 需要 添加 class="js_bizMoneyTips"
            + * <br />只要带有 class = js_bizMoneyTips 的文本框, 默认会自动初始化 MoneyTips 实例
            + *
            + * <p>
            + *      页面载入时, Bizs.MoneyTips 会对 span.js_bmtLabel, label.js_bmtLabel 进行自动格式化
            + * </p>
            + *
            + * <h2>可用的 HTML 属性</h2>
            + * <dl>
            + *      <dt>bmtDisplayLabel = selector, default = span</dt>
            + *      <dd>
            + *          指定显示 格式化金额的 node, 如果没有显式指定 node, 那么将会动态生成一个用于显示的 span
            + *      </dd>
            + *
            + *      <dt>bmtPattern = string, default = {0}</dt>
            + *      <dd>
            + *          用于显示格式化金额的显示内容, {0} = 金额占位符
            + *          <br />example: &lt;input type="text" class="js_bizMoneyTips" bmtPattern="格式化金额: {0}" />
            + *      </dd>
            + * </dl>
            + *
            + * @namespace   window.Bizs
            + * @class       MoneyTips
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @version dev 0.1 2013-11-21
            + * @author  qiushaowei   <suches@btbtd.org> | 75 Team
            + *
            + * @example
            +        <div>
            +            金额: <input type="text" value="6543.21" 
            +            datatype="n-12.2" class="js_bizMoneyTips" bmtDisplayLabel="/span.js_bmtSpan" />
            +            <em class="error"></em>
            +            <span class="js_bmtSpan"></span>
            +        </div>
            + */
            +    Bizs.MoneyTips = MoneyTips;
            +    JC.f.addAutoInit && JC.f.addAutoInit( MoneyTips );
            +
            +    function MoneyTips( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        if( MoneyTips.getInstance( _selector ) ) return MoneyTips.getInstance( _selector );
            +        MoneyTips.getInstance( _selector, this );
            +
            +        this._model = new MoneyTips.Model( _selector );
            +        this._view = new MoneyTips.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( 'MoneyTips inited', new Date().getTime() );
            +    }
            +    /**
            +     * 获取或设置 MoneyTips 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {MoneyTipsInstance}
            +     */
            +    MoneyTips.getInstance =
            +        function( _selector, _setter ){
            +            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +                    _selector = $(_selector);
            +            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +            typeof _setter != 'undefined' && _selector.data( MoneyTips.Model._instanceName, _setter );
            +
            +            return _selector.data( MoneyTips.Model._instanceName );
            +        };
            +    /**
            +     * 初始化可识别的 MoneyTips 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of MoneyTipsInstance}
            +     */
            +    MoneyTips.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( '.js_bizMoneyTips' )  ){
            +                    _r.push( new MoneyTips( _selector ) );
            +                }else{
            +                    _selector.find( 'input.js_bizMoneyTips' ).each( function(){
            +                        _r.push( new MoneyTips( $(this) ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 格式化 node 的 value/html
            +     * @method  format
            +     * @param   {selector}      _selector
            +     * @param   {selector}      _outputSelector     指定显示格式化内容的 node, 默认为 selector 本身
            +     *                                              <br />, 还可以通过 html 属性 bmtFormatOutput 指定单独的 _outputSelector
            +     * @static
            +     * @return  _selector
            +     */
            +    MoneyTips.format = 
            +        function( _selector, _outputSelector ){
            +            _selector && ( _selector = $( _selector ) );
            +            _outputSelector && ( _outputSelector = $( _outputSelector ) );
            +            if( !( _selector && _selector.length ) ) return;
            +            _selector.each( function(){
            +                var _item = $(this)
            +                    , _v
            +                    , _subOutputSelector = JC.f.parentSelector( _item, _item.attr( 'bmtFormatOutput' ) )
            +                    , _floatLen = 2
            +                    ;
            +
            +                _item.is( '[floatLen]' ) && ( _floatLen = parseInt( _item.attr( 'floatLen' ) ) || 0 );
            +
            +                !( _subOutputSelector && _subOutputSelector.length ) && ( _subOutputSelector = _item );
            +                _outputSelector && _outputSelector.length && ( _subOutputSelector = _outputSelector );
            +                !( _subOutputSelector && _subOutputSelector.length ) && ( _subOutputSelector = _item );
            +
            +                if( 'value' in this ){
            +                    _v = _item.val().trim();
            +                }else{
            +                    _v = _item.html().trim();
            +                }
            +                _v = _v || 0;
            +
            +                if( 'value' in _subOutputSelector[0] ){
            +                    _subOutputSelector.val( JC.f.moneyFormat( _v, 3, _floatLen ) );
            +                }else{
            +                    _subOutputSelector.html( JC.f.moneyFormat( _v, 3, _floatLen ) );
            +                }
            +            });
            +
            +            return _selector;
            +        };
            +
            +    MoneyTips.getFloatLen = 
            +        function( _item ){
            +            var _r = 0;
            +            _item && ( _item = $( _item ) );
            +            _item 
            +                && _item.length 
            +                && _item.is( '[floatLen]' )
            +                && ( _r = parseInt( _item.attr( 'floatLen' ) ) || 0 )
            +                ;
            +
            +            return _r;
            +        };
            +
            +    MoneyTips.prototype = {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'MoneyTips _beforeInit', new Date().getTime() );
            +            }
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this; 
            +
            +                _p._model.selector().on( 'focus blur ', function( _evt ){
            +                    JC.log( 'focus or blur', new Date().getTime() );
            +                    _p.trigger( 'BMTUpdate', [ _p._model.selector().val().trim() ] );
            +                });
            +
            +                _p._model.selector().bind( 'input propertychange', function( _evt ){
            +                    JC.log( 'input or propertychange', new Date().getTime() );
            +                    _p.trigger( 'BMTUpdate', [ _p._model.selector().val().trim() ] );
            +                });
            +
            +                _p.on( 'BMTUpdate', function( _evt, _number ){
            +                    var _v = _number
            +                        , _number = JC.f.parseFinance( _v )
            +                        , _formated
            +                        , _floatLen = 2
            +                        , _dt = _p.selector().attr( 'datatype' )
            +                        ;
            +
            +                    _dt.replace( /n\-[\d]+\.([\d]+)/, function( $0, $1 ){
            +                        _floatLen = parseInt( $1 ) || _floatLen;
            +                    });
            +                    if( _p.selector().is( '[floatLen]' ) ){
            +                        _floatLen = MoneyTips.getFloatLen( _p.selector() );
            +                    }
            +
            +                    if( isNaN( _number ) || !_number ) {
            +                        _p._view.update();
            +                        return;
            +                    }
            +                    !_number && ( _number = 0 );
            +                    _formated = JC.f.moneyFormat( _v, 3, _floatLen );
            +                    _p._view.update( _formated );
            +                });
            +            }
            +        , _inited:
            +            function(){
            +                //JC.log( 'MoneyTips _inited', new Date().getTime() );
            +                var _p = this;
            +                _p.trigger( 'BMTUpdate', [ _p._model.selector().val().trim() ] );
            +            }
            +        /**
            +         * 更新 tips 的值
            +         * @method update
            +         * @param   {int|string}    _val
            +         */
            +        , update:
            +            function( _val ){
            +                this.trigger( 'BMTUpdate', [ _val || '' ] );
            +                return this;
            +            }
            +    };
            +
            +    BaseMVC.buildModel( MoneyTips );
            +    MoneyTips.Model._instanceName = 'MoneyTips';
            +    MoneyTips.Model.prototype = {
            +        init:
            +            function(){
            +                //JC.log( 'MoneyTips.Model.init:', new Date().getTime() );
            +            }
            +        
            +        , bmtDisplayLabel:
            +            function(){
            +                this._bmtDisplayLabel = this._bmtDisplayLabel || this.selectorProp( 'bmtDisplayLabel' );
            +
            +                if( !( this._bmtDisplayLabel && this._bmtDisplayLabel.length ) ){
            +                    this._bmtDisplayLabel = $( '<span class="js_bmtSpan"></span>' );
            +                    this.selector().after( this._bmtDisplayLabel );
            +                }
            +
            +                return this._bmtDisplayLabel; 
            +            }
            +
            +        , bmtPattern:
            +            function(){
            +                var _r = this.attrProp( 'bmtPattern' ) || '{0}';
            +                return _r;
            +            }
            +    };
            +
            +    BaseMVC.buildView( MoneyTips );
            +    MoneyTips.View.prototype = {
            +        init:
            +            function(){
            +                //JC.log( 'MoneyTips.View.init:', new Date().getTime() );
            +            }
            +
            +        , show:
            +            function(){
            +                this._model.bmtDisplayLabel().show();
            +            }
            +
            +        , hide:
            +            function(){
            +                this._model.bmtDisplayLabel().hide();
            +            }
            +
            +        , update:
            +            function( _val ){
            +                var _p = this;
            +                if( !_val ){
            +                    _p.hide();
            +                }else{
            +                    _p._model.bmtDisplayLabel().html( JC.f.printf( _p._model.bmtPattern(), _val ) );
            +                    _p.show();
            +                }
            +            }
            +    };
            +
            +    BaseMVC.build( MoneyTips, 'Bizs' );
            +
            +    $(document).ready( function(){
            +        var _insAr = 0;
            +        MoneyTips.autoInit
            +            && ( _insAr = MoneyTips.init() )
            +            && MoneyTips.format( $( 'span.js_bmtLabel, label.js_bmtLabel' ) )
            +            ;
            +    });
            +
            +    $(document).delegate( 'input.js_bizMoneyTips', 'focus click', function( _evt ){
            +        !MoneyTips.getInstance( $(this) )
            +            && new MoneyTips( $(this) )
            +            ;
            +    });
            +
            +    return Bizs.MoneyTips;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_MultiAutoComplete_MultiAutoComplete.js.html b/docs_api/files/.._bizs_MultiAutoComplete_MultiAutoComplete.js.html new file mode 100644 index 000000000..eaeab915c --- /dev/null +++ b/docs_api/files/.._bizs_MultiAutoComplete_MultiAutoComplete.js.html @@ -0,0 +1,1098 @@ + + + + + ../bizs/MultiAutoComplete/MultiAutoComplete.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MultiAutoComplete/MultiAutoComplete.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.AutoComplete', 'JC.AutoChecked', 'JC.Placeholder', 'JC.Panel' ], function(){
            +/**
            + * 级联 Suggest
            + *
            + *<p><b>require</b>:
            + *   <a href='JC.AutoComplete.html'>JC.AutoComplete</a>
            + *   , <a href='JC.Placeholder.html'>JC.Placeholder</a>
            + *   , <a href='JC.Panel.html'>JC.Panel</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.MultiAutoComplete.html' target='_blank'>API docs</a>
            + *   | <a href='../../bizs/MultiAutoComplete/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会自动处理 input[defaultMultiAutomComplete] </h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>defaultMultiAutomComplete = empty</dt>
            + *    <dd>声明第一级联动框</dd>
            + *
            + *    <dt>macUrl = url</dt>
            + *    <dd>获取数据的URL接口<dd>
            + *
            + *    <dt>macAddtionUrl = url</dt>
            + *    <dd>用于最后一级的附加数据接口, 如果所有父级没有选中内容, 将启用该接口</dd>
            + *
            + *    <dt>macAddtionBox = selector</dt>
            + *    <dd>指定用于保存选择内容的选择器</dd>
            + *
            + *    <dt>macAddtionBoxItemTpl = selector</dt>
            + *    <dd>保存内容项的模板</dd>
            + *
            + *    <dt>macAddtionBoxItemSelector = selector</dt>
            + *    <dd>保存内容项的选择器</dd>
            + *
            + *    <dt>macAddtionItemAddCallback = callback</dt>
            + *    <dd>添加保存内容项时的回调
            + <xmp>function macAddtionItemAddCallback( _item, _id, _label, _parent, _parentBox ){
            +    var _macIns = this;
            +    JC.log( 'macAddtionItemAddCallback', _id, _label );
            +}</xmp>
            + *    </dd>
            + *
            + *    <dt>macAddtionItemRemoveCallback = callback</dt>
            + *    <dd>删除保存内容项时的回调
            +<xmp>function macAddtionItemRemoveCallback( _item, _id, _label, _parent, _parentBox ){
            +    var _macIns = this;
            +    JC.log( 'macAddtionItemRemoveCallback', _id, _label );
            +}</xmp>
            + *    </dd>
            + *
            + *</dl>
            + *
            + * @namespace   window.Bizs
            + * @class       MultiAutoComplete
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +<xmp><div class="ui-sug-mod">
            +    <input type="text" class="ui-sug-ipt js_compAutoComplete js_k1" name="k1" value="" 
            +        autocomplete="off" 
            +
            +        cacPopup="/ul.js_compAutoCompleteBox"
            +        cacLabelKey="data-label"
            +        cacIdKey="data-id"
            +        cacIdSelector="/input.js_k1_id"
            +        cacStrictData="true"
            +        cacDataFilter="cacDataFilter"
            +        cacNoDataText="暂无数据!"
            +
            +        cacPreventEnter="true" 
            +
            +        defaultMultiAutomComplete=""
            +        macUrl="./data/shengshi_with_error_code.php?id=0"
            +        macTarget="/input.js_k2"
            +
            +        Placeholder="一级位置"
            +        />
            +    <input type="hidden" value="14" class="js_k1_id" name="k1_id" />
            +
            +    <input type="text" class="ui-sug-ipt js_compAutoComplete js_k2" name="k2" value="" 
            +        autocomplete="off" 
            +
            +        cacPopup="/ul.js_compAutoCompleteBox"
            +        cacLabelKey="data-label"
            +        cacIdKey="data-id"
            +        cacIdSelector="/input.js_k2_id"
            +        cacStrictData="true"
            +        cacDataFilter="cacDataFilter"
            +        cacNoDataText="暂无数据!"
            +
            +        cacPreventEnter="true" 
            +
            +        macUrl="./data/shengshi_with_error_code.php?id={0}"
            +        macTarget="/input.js_k3"
            +        Placeholder="二级位置"
            +        />
            +    <input type="hidden" value="2341" class="js_k2_id" name="k2_id" />
            +
            +    <input type="text" class="ui-sug-ipt js_compAutoComplete js_k3" name="k3" value="区" 
            +        autocomplete="off" 
            +        Placeholder="三级位置"
            +
            +        cacPopup="/ul.js_compAutoCompleteBox"
            +        cacLabelKey="data-label"
            +        cacIdKey="data-id"
            +        cacStrictData="false"
            +        cacDataFilter="cacDataFilter"
            +        cacNoDataText="暂无数据!"
            +        cacAddtionItem="true"
            +        cacListItemTpl="/script.cacItemTpl"
            +
            +        cacPreventEnter="true" 
            +
            +        macUrl="./data/shengshi_with_error_code.php?id={0}"
            +        macAddtionUrl="./data/shengshi_with_error_code.php?id=0"
            +        macAddtionBox="/.js_macAddtionBox"
            +        macAddtionBoxItemTpl="/script.macAddtionBoxItemTpl"
            +        macAddtionBoxItemSelector="> a"
            +        macAddtionItemAddCallback="macAddtionItemAddCallback"
            +        macAddtionItemRemoveCallback="macAddtionItemRemoveCallback"
            +        />
            +    <span class="js_macAddtionBox" style="display:none;">
            +        <span class="js_macAddtionBoxList">
            +            <a href="javascript:" class="js_macAddtionBoxItem" data-id="2345" id="macAddtionBoxItemId_1_2345" data-label="枫溪区">
            +                <label>枫溪区</label>
            +                <button type="button" class="AURemove"></button>
            +                <input type="hidden" name="condition[]" value="2345">
            +            </a>
            +        </span>
            +        <a href="javascript:" class="js_macClearAddtionList">
            +            清空<button type="button" class="AUClose"></button>
            +        </a>
            +    </span>
            +    <script type="text/template" class="cacItemTpl">
            +        <li data-id="{0}" data-label="{1}" data-index="{2}" class="AC_listItem {3} js_macAddtionBoxItemClick">
            +        <a href="javascript:;" data-id="{0}" data-label="{1}" data-index="{2}" class="AC_control AC_customAdd">添加</a>
            +        <label>{1} </label>
            +        </li> 
            +    </script>
            +    <script type="text/template" class="macAddtionBoxItemTpl">
            +        <a href="javascript:" class="js_macAddtionBoxItem" data-id="{0}" id="{2}" data-label="{1}">
            +            <label>{1}</label>
            +            <button type="button" class="AURemove"></button>
            +            <input type="hidden" name="condition[]" value="{0}" />
            +        </a>
            +    </script>
            +</div></xmp>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.use && (
            +        !JC.AutoComplete && JC.use( 'JC.AutoComplete' )
            +        , !JC.Placeholder && JC.use( 'JC.Placeholder' )
            +        , !JC.Panel && JC.use( 'JC.Panel' )
            +    );
            +
            +    Bizs.MultiAutoComplete = MultiAutoComplete;
            +
            +    function MultiAutoComplete( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, MultiAutoComplete ) ) 
            +            return JC.BaseMVC.getInstance( _selector, MultiAutoComplete );
            +
            +        JC.BaseMVC.getInstance( _selector, MultiAutoComplete, this );
            +
            +        this._model = new MultiAutoComplete.Model( _selector );
            +        this._view = new MultiAutoComplete.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( MultiAutoComplete.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    Bizs.MultiAutoComplete.insCount = 1;
            +    Bizs.MultiAutoComplete.AJAX_CACHE = {};
            +    /**
            +     * 初始化可识别的 MultiAutoComplete 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of MultiAutoCompleteInstance}
            +     */
            +    MultiAutoComplete.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.is( '[defaultMultiAutomComplete]' )  ){
            +                    _r.push( new MultiAutoComplete( _selector ) );
            +                }else{
            +                    _selector.find( 'input[defaultMultiAutomComplete]' ).each( function(){
            +                        _r.push( new MultiAutoComplete( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    MultiAutoComplete.ajaxRandom = true;
            +
            +    JC.BaseMVC.build( MultiAutoComplete );
            +
            +    JC.f.extendObject( MultiAutoComplete.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'MultiAutoComplete _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited' , function(){
            +                    _p.trigger( 'init_relationship' );
            +                    _p.trigger( 'fix_id_callback' );
            +                    _p.trigger( 'init_autoComplete' );
            +                    _p.trigger( 'update_selector', [ _p.selector() ] );
            +                    _p.trigger( 'init_user_input' );
            +                    _p._model.ready( true );
            +                    _p.trigger( 'inited_done' );
            +                });
            +
            +                _p.on( 'init_relationship', function( _evt ){
            +                    _p._model.init_relationship();
            +                });
            +
            +                _p.on( 'fix_id_callback', function( _evt ){
            +                    _p._model.fixIdCallback();
            +                });
            +
            +                _p.on( 'init_autoComplete', function( _evt ){
            +                    _p._model.each( function( _selector ){
            +                        var _acIns;
            +                        _selector.hasClass( 'js_compAutoComplete' )
            +                            && !( _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete ) )
            +                            && ( _acIns = new JC.AutoComplete( _selector ) )
            +                            ;
            +
            +                        _acIns.on( 'after_inited', function( _evt ){
            +                            _p.trigger( 'init_checked_status', [ _acIns ] );
            +                        });
            +                    });
            +                });
            +
            +                _p.on( 'update_selector', function( _evt, _selector, _ignoreClear ){
            +                    if( !( _selector && _selector.length ) ) return;
            +
            +                    !_ignoreClear && _p.trigger( 'clear_selector', [ _selector ] );
            +                    _p.trigger( 'ajax_data', [ _selector ] );
            +                });
            +
            +                _p.on( 'clear_selector', function( _evt, _selector ){
            +                    if( !_p._model.ready() ) return;
            +                    _p._model.clearData( _selector );
            +                });
            +
            +                _p.on( 'ajax_data', function( _evt, _selector, _noTriggerAllUpdated ){
            +                    if( !_selector ) return;
            +
            +                    _p._model.ajax_data( _selector, _noTriggerAllUpdated );
            +                });
            +
            +                _p.on( 'ajax_done', function( _evt, _data, _selector, _text, _noTriggerAllUpdated ){
            +                    if( _data && _data.errorno == 0 ){
            +                        _p.trigger( 'update', [ _data, _selector, _text, _noTriggerAllUpdated ] );
            +                    }else{
            +                        _p.trigger( 'ajax_error', [ _data, _selector, _text ] );
            +                    }
            +                });
            +
            +                _p.on( 'update', function( _evt, _data, _selector, _text, _noTriggerAllUpdated ){
            +                    var _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete )
            +                        , _nextSelector
            +                        , _macDefaultValue
            +                        ;
            +                    //JC.log( '_acIns:',  _acIns );
            +
            +                    if( !_acIns ) return;
            +                    _macDefaultValue = _p._model.macDefaultValue( _selector ) || undefined;
            +                    _acIns.update( _data.data, _macDefaultValue );
            +
            +                    _nextSelector = _p._model.nextSelector( _selector );
            +                    if( _nextSelector && _nextSelector.length && _data.data.length ){
            +                        _p.trigger( 'update_selector', [ _nextSelector, true ] );
            +                    }else{
            +                        !_noTriggerAllUpdated && _p.trigger( 'all_updated' );
            +                        if( _noTriggerAllUpdated ){
            +                            _acIns._model.layoutPopup().find( 'span.cacMultiSelectBarTplLabel' ).hide();
            +                        }else{
            +                            _acIns._model.layoutPopup().find( 'span.cacMultiSelectBarTplLabel' ).show();
            +                        }
            +                    }
            +                });
            +
            +                _p.on( 'all_updated', function(){
            +                    _p._model.checkLast();
            +                });
            +
            +                _p.on( 'init_user_input', function( _evt ){
            +                    _p._model.each( function( _selector ){
            +                        _selector.on( 'focus', function( _evt ){
            +                            _selector.data( 'old_value', _selector.val() );
            +                        });
            +
            +                        _selector.on( 'blur', function( _evt ){
            +
            +                            JC.f.safeTimeout( function(){
            +                                var _oldValue = _selector.data( 'old_value' )
            +                                    , _newValue = _selector.val()
            +                                    , _nextSelector
            +                                    ;
            +
            +                                //JC.log( JC.f.printf( 'oldValue: {0}, newValue: {1}', _oldValue, _newValue ) );
            +
            +                                if( _oldValue != _newValue ){
            +                                    _nextSelector = _p._model.nextSelector( _selector );
            +
            +
            +                                    _nextSelector 
            +                                        && _nextSelector.length
            +                                        && _p.trigger( 'update_selector', [ _nextSelector ] );
            +                                }
            +                            }, _selector, 'forMultiAutoCompleteSelectorBlur', 200 );
            +                        });
            +                    });
            +                });
            +
            +                _p.on( 'inited_done', function(){
            +                    _p._model.each( function( _selector ){
            +                        _p.trigger( 'init_addtionBox', [ _selector ] );
            +                    });
            +                });
            +
            +                _p.on( 'init_addtionBox', function( _evt, _selector ){
            +                    var _box = _p._model.macAddtionBox( _selector ), _boxList, _acIns;
            +                    if( !( _box && _box.length ) ) return;
            +                    _boxList = _box.find( '.js_macAddtionBoxList' );
            +                    if( !( _boxList && _boxList.length ) ) return;
            +                    _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete );
            +
            +                    _box.delegate( '.js_macClearAddtionList', 'click', function( _evt ){
            +                        JC.confirm( '是否清空内容', this, 2, function( _evt ){
            +                            _boxList.html( '' );
            +                            _box.hide();
            +                        });
            +                    });
            +
            +                    _box.delegate( '.js_macAddtionBoxItem', 'click', function( _evt ){
            +                        var _sp = $( this ), _id = _sp.attr( 'data-id' ), _label = _sp.attr( 'data-label' );
            +
            +                        _p._model.macAddtionItemRemoveCallback( _selector )
            +                            && _p._model.macAddtionItemRemoveCallback( _selector ).call( _p, _sp, _id, _label, _boxList, _box );
            +
            +                        _sp.remove();
            +                        _p.trigger( 'update_list_box_status', [ _acIns, true ] );
            +                    });
            +
            +                    _p.trigger( 'update_list_box_status', [ _acIns, true ] );
            +                });
            +
            +                _p.on( 'update_list_box_status', function( _evt, _acIns, _ignoreCheckStatus ){
            +                    var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList;
            +                    if( !( _box && _box.length ) ) return;
            +                    _boxList = _box.find( '.js_macAddtionBoxList' );
            +                    if( !( _boxList && _boxList.length ) ) return;
            +
            +                    var _items = _boxList.find( _p._model.macAddtionBoxItemSelector( _selector ) )
            +                    _items.length ? _box.show() : _box.hide();
            +
            +                    !_ignoreCheckStatus && _p.trigger( 'update_checked_status', [ _acIns, true ] );
            +                });
            +
            +                _p.on( 'init_checked_status', function( _evt, _acIns ){
            +
            +                    var _selector = _acIns.selector();
            +
            +                    if( _selector.is( 'macAddtionBox' ) ) return;
            +
            +                    _acIns.on( 'after_popup_show', function( _evt ){
            +                        //JC.log( 'after_popup_show', new Date().getTime() );
            +                    });
            +
            +                    _acIns.on( 'build_data', function(){
            +                        _p.trigger( 'update_checked_show_status', [ _acIns ] );
            +                        _p.trigger( 'fixed_checkAll_status', [ _acIns ] );
            +                    });
            +
            +                    _acIns._model.layoutPopup().delegate( 'input[schecktype=all]', 'change', function( _evt ){
            +                        var _sp = $( this );
            +                            _acIns._model.layoutPopup().find( 'input[schecktype=item]' ).prop( 'checked', _sp.prop( 'checked' ) );
            +
            +                        _p.trigger( 'update_checked_status', [ _acIns ] );
            +                        _p.trigger( 'fixed_checkAll_status', [ _acIns ] );
            +                    });
            +
            +                    _selector.on( 'cacItemClickHanlder', function( _evt, _sp, _acIns){
            +                        JC.f.safeTimeout( function(){
            +                            //_p.trigger( 'update_checked_status', [ _acIns ] );
            +                            var _ckItem = _sp.find( 'input[schecktype=item]' ), _d;
            +                            if( !_ckItem.length ) return;
            +                            _d = { item: _ckItem };
            +                            _p.trigger( 'update_list_item', [ _ckItem, _acIns ] );
            +                            _p.trigger( 'item_checked', [ _d, _d.item.prop( 'checked' ) ] );
            +                            _p.trigger( 'fixed_checkAll_status', [ _acIns ] );
            +
            +                        }, _acIns, 'adfasdfasdf', 50 );
            +                    });
            +                });
            +
            +                _p.on( 'fixed_checkAll_status', function( _evt, _acIns ){
            +                    var _checked = true;
            +                    _acIns._model.layoutPopup().find( 'input[schecktype=item]' ).each( function( _evt ){
            +                        var _sp = $( this );
            +                        if( !_sp.prop( 'checked' ) ){
            +                            _checked = false;
            +                            return false;
            +                        }
            +                    });
            +
            +                    _acIns._model.layoutPopup().find( 'input[schecktype=all]' ).prop( 'checked', _checked );
            +                });
            +
            +                _p.on( 'update_list_item', function( _evt, _sp, _acIns ){
            +                    var _d = { item: _sp };
            +                    if( !_d.item.length ) return;
            +
            +                    var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList, _sitem, _isAdd;
            +                    if( !( _box && _box.length ) ) return;
            +                    _boxList = _box.find( '.js_macAddtionBoxList' );
            +                    if( !( _boxList && _boxList.length ) ) return;
            +
            +                    if( _p._model.macAddtionBoxWithId( _selector ) ){
            +                        _sitem = $( JC.f.printf( '#macAddtionBoxItemId_{0}_{1}', _p._model.insCount(), _d.item.val() ) );
            +                    }else{
            +                        _sitem = [];
            +                        _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) + '[data-id]' ).each( function(){
            +                            if( $( this ).data( 'id' ) == _d.item.val() ){
            +                                _sitem.push( this );
            +                            }
            +                        });
            +                        _sitem = jQuery( _sitem );
            +                    }
            +
            +                    if( _d.item.prop( 'checked' ) ){
            +                        if( !_sitem.length ){
            +                            _p.trigger( 'add_list_item', [ _d.item, _acIns, _box, _boxList ] );
            +                            _isAdd = true;
            +                        }
            +                    }else{
            +                        _sitem.length && _sitem.remove();
            +                    }
            +
            +                    JC.f.safeTimeout( function(){
            +                        //if( !_acIns._model.layoutPopup().is( ':visible' ) ) return;
            +                        _isAdd && _p.trigger( 'sort_list_item', [ _boxList, _acIns ] );
            +                    }, _p, 'SORT_LIST_ITEM', 1000 );
            +                });
            +
            +                _p.on( 'update_checked_status', function( _evt, _acIns, _preventRecursive ){
            +                    if( !_acIns ) return;
            +                    var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList, _acIns;
            +                    if( !( _box && _box.length ) ) return;
            +                    _boxList = _box.find( '.js_macAddtionBoxList' );
            +                    if( !( _boxList && _boxList.length ) ) return;
            +
            +                    var _popupItems = _acIns._model.layoutPopup().find( 'input[schecktype=item]' )
            +                        , _popupItemAll = _acIns._model.layoutPopup().find( 'input[schecktype=all]' )
            +                        , _listItems = _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) )
            +                        ;
            +
            +
            +                    //JC.log( _popupItems.length, _popupItemAll.length, _listItems.length );
            +                    if( !_popupItems.length ) return;
            +
            +                    var _listItemsObj = {}, _popupItemsObj= {};
            +
            +                    _listItems.each( function(){
            +                        var _listSp = $( this );
            +                        _listItemsObj[ _listSp.attr( 'data-id' ) ] = {
            +                            item: _listSp
            +                        };
            +
            +                    });
            +
            +                    _popupItems.each( function( _ix ){
            +                        var _sp = $( this ), _sitem;
            +                        _p.trigger( 'update_list_item', [ _sp, _acIns ] );
            +                    });
            +
            +                    !_preventRecursive && _p.trigger( 'update_list_box_status', [ _acIns ] );
            +                });
            +
            +
            +                _p.on( 'update_checked_show_status', function( _evt, _acIns ){
            +                    if( !_acIns ) return;
            +                    var _selector = _acIns.selector(), _box = _p._model.macAddtionBox( _selector ), _boxList, _acIns;
            +                    if( !( _box && _box.length ) ) return;
            +                    _boxList = _box.find( '.js_macAddtionBoxList' );
            +                    if( !( _boxList && _boxList.length ) ) return;
            +
            +                    var _popupItems = _acIns._model.layoutPopup().find( 'input[schecktype=item]' )
            +                        , _popupItemAll = _acIns._model.layoutPopup().find( 'input[schecktype=all]' )
            +                        , _listItems = _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) )
            +                        ;
            +
            +                    if( !_popupItems.length ) return;
            +
            +                    var _allChecked = true, _popupItemsObj= {};
            +
            +                    _popupItems.each( function(){
            +                        var _sp = $( this );
            +                        _popupItemsObj[ _sp.val() ] = { item: _sp };
            +                    });
            +
            +                    _listItems.each( function(){
            +                        var _listSp = $( this ), _sitem;
            +                        if( _listSp.attr( 'data-id' ) in _popupItemsObj ){
            +                            _p.trigger( 'item_checked', [ _popupItemsObj[ _listSp.attr( 'data-id' ) ], true ] );
            +                        }
            +                    });
            +                });
            +
            +                _p.on( 'sort_list_item', function( _evt, _boxList, _acIns ){
            +                    var _items = _boxList.find( _p._model.macAddtionBoxItemSelector( _acIns.selector() ) );
            +
            +                   _items.each( function(){
            +                       var _item = $( this ), _id = _item.attr( 'data-id' ), _label = _item.attr( 'data-label' );
            +                       _items.each( function(){
            +                           var _sitem = $( this ), _sid = _sitem.attr( 'data-id' ), _slabel = _sitem.attr( 'data-label' );
            +                           if( _id == _sid ) return;
            +
            +                           if( _label.localeCompare( _slabel ) > 0 ){
            +                               _sitem.after( _item );
            +                           }
            +                       });
            +                   });
            +                });
            +
            +                _p.on( 'add_list_item', function( _evt, _sp, _acIns, _box, _boxList ){
            +                    var _pnt = JC.f.getJqParent( _sp, 'li' )
            +                        , _selector = _acIns.selector()
            +                        , _item
            +                        , _tpl = _p._model.macAddtionBoxItemTpl( _selector )
            +                        , _id = _pnt.attr( 'data-id' )
            +                        , _label = _pnt.attr( 'data-label' )
            +                        ;
            +
            +                        _item = $( JC.f.printf( _tpl, _id, _label, _p._model.insCount() ) );
            +                        _item.appendTo( _boxList );
            +                        _item.attr( 'data-id', _id );
            +                        _item.attr( 'data-label', _label );
            +                        _box.show();
            +                });
            +
            +                _p.on( 'item_checked', function( _evt, _data, _checked ){
            +                    _checked 
            +                        ? JC.f.getJqParent( _data.item, 'li' ).addClass( 'macDisable' )
            +                        : JC.f.getJqParent( _data.item, 'li' ).removeClass( 'macDisable' );
            +                    _data.item.prop( 'checked', _checked );
            +                });
            +
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'MultiAutoComplete _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +    });
            +
            +    MultiAutoComplete.Model._instanceName = 'JCMultiAutoComplete';
            +    JC.f.extendObject( MultiAutoComplete.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'MultiAutoComplete.Model.init:', new Date().getTime() );
            +                this.insCount( MultiAutoComplete.insCount++ );
            +            }
            +
            +        , insCount:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._insCount = _setter );
            +                return this._insCount;
            +            }
            +
            +        , macAddtionBoxWithId:
            +            function( _selector ){
            +                return JC.f.parseBool( _selector.attr( 'macAddtionBoxWithId' ) );
            +            }
            +
            +        , macAddtionItemAddCallback: function( _selector ){ return this.callbackProp( _selector, 'macAddtionItemAddCallback' ); }
            +        , macAddtionItemRemoveCallback: function( _selector ){ return this.callbackProp( _selector, 'macAddtionItemRemoveCallback' ); }
            +
            +        , macAddtionBoxItemSelector: function( _selector ){ return this.attrProp( _selector, 'macAddtionBoxItemSelector' ); }
            +        , macAddtionBoxItemTpl: 
            +            function( _selector ){ 
            +                return JC.f.scriptContent( this.selectorProp( _selector, 'macAddtionBoxItemTpl' ) ); 
            +            }
            +
            +        , macAddtionBox:
            +            function( _selector ){
            +                return this.selectorProp( _selector, 'macAddtionBox' );
            +            }
            +
            +        , ready:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._ready = _setter );
            +                return this._ready;
            +            }
            +
            +        , clearData:
            +            function( _selector ){
            +                var _p = this
            +                    , _nextSelector = _p.nextSelector( _selector )
            +                    , _acIns = JC.BaseMVC.getInstance( _selector, JC.AutoComplete )
            +                    ;
            +
            +                _acIns && _acIns.clearAll();
            +            
            +                _nextSelector && _p.clearData( _nextSelector );
            +            }
            +
            +        , init_relationship:
            +            function( _selector, _prevSelector ){
            +                var _p = this
            +                    , _selector = _selector || _p.selector()
            +                    , _nextSelector
            +                    ;
            +
            +                _prevSelector && ( _selector.data( 'prevSelector', _prevSelector ) );
            +
            +                if( _selector.is( '[macTarget]' ) ){
            +                    _nextSelector = JC.f.parentSelector( _selector, _selector.attr( 'macTarget' ) );
            +                    if( ( _nextSelector && _nextSelector.length ) ){
            +                        _selector.data( 'nextSelector', _nextSelector );
            +                        _p.init_relationship( _nextSelector, _selector );
            +                        //JC.log( _selector.attr( 'macTarget' ) );
            +                    }
            +                }else{
            +                    _p.lastSelecotr( _selector );
            +                }
            +            }
            +
            +        , fixIdCallback:
            +            function(){
            +                var _p = this;
            +                _p.each( function( _selector ){
            +                    //JC.log( _selector.attr( 'name' ) );
            +                    !_selector.is( '[macIdCallback]' )
            +                        && _selector.attr( 'macIdCallback', 'MultiAutoCompleteIdCallback' )
            +                        ;
            +
            +                    !_selector.is( '[cacDataFilter]' )
            +                        && _selector.attr( 'cacDataFilter', 'MultiAutoCompleteDataFilter' );
            +                });
            +            }
            +
            +        , firstSelector: function(){ return this.selector(); }
            +
            +        , lastSelecotr: 
            +            function( _selector ){
            +                _selector && ( this._lastSelecotr = _selector );
            +                return this._lastSelecotr;
            +            }
            +
            +        , nextSelector:
            +            function( _selector ){
            +                if( _selector ){
            +                    return $( _selector ).data( 'nextSelector' );
            +                }
            +            }
            +
            +        , prevSelector:
            +            function( _selector ){
            +                if( _selector ){
            +                    return $( _selector ).data( 'prevSelector' );
            +                }
            +            }
            +
            +        , macAddtionUrl: function( _selector ){ return _selector.attr( 'macAddtionUrl' ); }
            +
            +        , checkLast:
            +            function(){
            +                var _p = this
            +                    , _last = _p.lastSelecotr()
            +                    , _tmpSelector = _p.prevSelector( _last )
            +                    , _hasValue
            +                    ;
            +
            +                while( _tmpSelector && _tmpSelector.length ){
            +                    _tmpSelector.val() && ( _hasValue = true );
            +                    if( _hasValue ) break;
            +                    _tmpSelector = _p.prevSelector( _tmpSelector );
            +                }
            +
            +                !_hasValue 
            +                    && _p.macAddtionUrl( _last )
            +                    && _p.ajax_data( _last, true, _p.macAddtionUrl( _last ) )
            +                    ;
            +            }
            +
            +        , ajax_data:
            +            function( _selector, _noTriggerAllUpdated, _addUrl ){
            +                var _p = this
            +                    , _url = _addUrl || _selector.attr( 'macUrl' )
            +                    , _prevSelector
            +                    , _parentId
            +                    ;
            +                if( !_url ) return;
            +
            +                _p.ajax_random( _selector ) && ( _url = JC.f.addUrlParams( _url, { rnd: 0 } ) );
            +
            +                _prevSelector = _p.prevSelector( _selector );
            +
            +                if( _prevSelector && _prevSelector.length ){
            +                    _parentId = _p.macDefaultValue( _prevSelector );
            +
            +                    if( !_parentId ){
            +                        !_noTriggerAllUpdated && _p.trigger( 'all_updated' );
            +                        if( !_noTriggerAllUpdated ) return;
            +                    }
            +                    _url = JC.f.printf( _url, _parentId );
            +                }
            +
            +                if( _url in MultiAutoComplete.AJAX_CACHE ){
            +                    _p.trigger( 'ajax_done', [ MultiAutoComplete.AJAX_CACHE[ _url ], _selector, '', _noTriggerAllUpdated ] );
            +                }else{
            +                    $.get( _url ).done( function( _text ){
            +                        //JC.log( _text );
            +                        var _data = $.parseJSON( _text );
            +                        MultiAutoComplete.AJAX_CACHE[ _url ] = _data;
            +                        _p.trigger( 'ajax_done', [ _data, _selector, _text, _noTriggerAllUpdated ] );
            +                    });
            +                }
            +
            +            }
            +
            +        , ajax_random:
            +            function( _selector ){
            +                var _r = MultiAutoComplete.ajaxRandom;
            +                _selector.is( '[macAjaxRandom]' ) 
            +                    && ( _r = JC.f.parseBool( _selector.attr( 'macAjaxRandom' ) ) );
            +                return _r;
            +            }
            +
            +        , each:
            +            function( _cb, _selector ){
            +                var _p = this, _nextSelector;
            +                _selector = _selector || _p.selector();
            +
            +                if( _selector && _selector.length ){
            +                    _cb.call( _p, _selector );
            +                    _nextSelector = _p.nextSelector( _selector );
            +
            +                    _nextSelector 
            +                        && _nextSelector.length 
            +                        && _p.each( _cb, _nextSelector )
            +                        ;
            +                }
            +            }
            +
            +        , macDefaultValue:
            +            function( _selector ){
            +                var _r = _selector.attr( 'macDefaultValue' ), _idSelector;
            +
            +                if( _selector.is( '[cacIdSelector]' ) ){
            +                    _idSelector = JC.f.parentSelector( _selector, _selector.attr( 'cacIdSelector' ) );
            +
            +                    _idSelector
            +                        && _idSelector.length
            +                        && ( _r = _idSelector.val() );
            +                }
            +
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( MultiAutoComplete.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'MultiAutoComplete.View.init:', new Date().getTime() );
            +            }
            +    });
            +
            +    window.MultiAutoCompleteIdCallback =
            +        function(){
            +        };
            +
            +    window.MultiAutoCompleteDataFilter = 
            +        function ( _json ){
            +            if( _json.data && _json.data.length ){
            +                _json = _json.data;
            +            }
            +
            +            $.each( _json, function( _ix, _item ){
            +                _item.length &&
            +                    ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } )
            +                    ;
            +            });
            +            return _json;
            +        };
            +
            +    _jdoc.ready( function(){
            +        JC.f.safeTimeout( function(){
            +            MultiAutoComplete.autoInit && MultiAutoComplete.init();
            +        }, null, 'MultiAutoCompleteInit', 5 );
            +    });
            +
            +    return Bizs.MultiAutoComplete;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_MultiChangeLogic_MultiChangeLogic.js.html b/docs_api/files/.._bizs_MultiChangeLogic_MultiChangeLogic.js.html new file mode 100644 index 000000000..e1f02a1b2 --- /dev/null +++ b/docs_api/files/.._bizs_MultiChangeLogic_MultiChangeLogic.js.html @@ -0,0 +1,584 @@ + + + + + ../bizs/MultiChangeLogic/MultiChangeLogic.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MultiChangeLogic/MultiChangeLogic.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + *
            + * @namespace   window.Bizs
            + * @class       MultiChangeLogic
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version 2014-12-25
            + * @author  zuojing <zuojing1013@gmail.com> | 75 Team
            + * @example
            +        
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.MultiChangeLogic = MultiChangeLogic;
            +
            +    function MultiChangeLogic( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, MultiChangeLogic ) ) 
            +            return JC.BaseMVC.getInstance( _selector, MultiChangeLogic );
            +
            +        JC.BaseMVC.getInstance( _selector, MultiChangeLogic, this );
            +
            +        this._model = new MultiChangeLogic.Model( _selector );
            +        this._view = new MultiChangeLogic.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( MultiChangeLogic.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 MultiChangeLogic 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of MultiChangeLogicInstance}
            +     */
            +    MultiChangeLogic.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_bizsMultiChangeLogic' )  ){
            +                    _r.push( new MultiChangeLogic( _selector ) );
            +                }else{
            +                    _selector.find( '.js_bizsMultiChangeLogic' ).each( function(){
            +                        _r.push( new MultiChangeLogic( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( MultiChangeLogic );
            +
            +    JC.f.extendObject( MultiChangeLogic.prototype, {
            +        _beforeInit: function () {
            +            //JC.log( 'MultiChangeLogic _beforeInit', new Date().getTime() );
            +        }, 
            +
            +        _initHanlderEvent: function () {
            +            var p = this,
            +                tmp;
            +        
            +            //trigger Element change event
            +            p._model.bclTrigger().on('change', function () {
            +                var $cleanElement = p._model.bclChangeCleanTarget(),
            +                    $el = $(this);
            +
            +                if ( $cleanElement.length ) {
            +                    $.each($cleanElement, function () {
            +                        var $this = $(this);
            +                        if ( /(input|textarea|select)/i.test($this.prop('nodeName').toLowerCase()) ) {
            +                            $this.val('');
            +                        } else {
            +                            $this.html('');
            +                        }
            +
            +                    });
            +                }
            +
            +                p.trigger('itemchange', [$el]);
            +
            +            });
            +
            +            p.on('itemchange', function (evt, triggerElement) {
            +
            +                var $el = triggerElement,
            +                    $target,
            +                    $selfthidetarget,
            +                    isDisable = p._model.isDisable($el),
            +                    isDisplay = p._model.isDisplay($el);
            +
            +                p._model.bclHideTarget().each(function () {
            +                    var $this = $(this);
            +                   
            +                    $this[isDisplay? 'show': 'hide']();
            +                });
            +
            +                p._model.bclDisabledTarget().each(function () {
            +                    var $this = $(this);
            +                    
            +                    $this.prop('disabled', isDisable);
            +                });
            +
            +           
            +                if ( $el.attr('bclselfdisplaytarget') ) {
            +                 
            +                    $target = $( JC.f.parentSelector(triggerElement, $el.attr('bclselfdisplaytarget') ) );
            +                   
            +                    $.each($target, function () {
            +                        $(this).show();
            +                    });
            +
            +                    if ( $el.attr('bclselfhidetarget') ) {
            +                        $selfthidetarget = $( JC.f.parentSelector(triggerElement, $el.attr('bclselfhidetarget')) );
            +                        if ( $selfthidetarget.length ) {
            +                            $.each($selfthidetarget, function () {
            +                                var $this = $(this);
            +                                $this.hide();
            +                            });
            +                        }
            +                    }
            +                } 
            +
            +                if ( $el.attr('bclselfdisplayscript') ) {
            +                    $target = JC.f.scriptContent($el.attr('bclselfdisplayscript'));
            +                    p._model.bclHideScriptBox() && $(p._model.bclHideScriptBox()).html($target);
            +                }
            +                
            +            });
            +
            +            p.on('checkboxchange', function (evt, triggerElement) {
            +
            +            });
            +
            +            //这个逻辑是处理onload后选中的项
            +            if ( p._model.bclTriggerChangeOnInit() ) {
            +                ( tmp = p._model.bclTrigger(true) )
            +                    && (!tmp.prop('disabled'))
            +                    && (tmp.trigger('change'));
            +            }
            +
            +
            +        },
            +
            +        _inited: function () {
            +            JC.log("_inited:", new Date().getTime() );
            +        }
            +    });
            +
            +    MultiChangeLogic.Model._instanceName = 'MultiChangeLogic';
            +    JC.f.extendObject( MultiChangeLogic.Model.prototype, {
            +        init: function () {
            +
            +        },
            +
            +        bclTrigger: function (curItem) {
            +            var r = $(JC.f.parentSelector(this.selector(), this.attrProp('bclTrigger')));
            +            
            +            if ( curItem ) {
            +
            +                $.each(r, function () {
            +                    var $this = $(this);
            +                    if ( $this.prop('checked') || $this.prop('selected') ) {
            +                        r = $this;
            +                        return false;
            +                    }
            +                });
            +            }
            +
            +            return r;
            +        },
            +
            +        bclDisabledTarget: function () {
            +            return $(JC.f.parentSelector(this.selector(), this.attrProp('bclDisabledTarget')));
            +        },
            +
            +        bclHideTarget: function () {
            +            var r = $(JC.f.parentSelector(this.selector(), this.attrProp('bclHideTarget')));
            +
            +            return r;
            +        },
            +
            +        bclChangeCleanTarget: function () {
            +            return $(JC.f.parentSelector(this.selector(), this.attrProp('bclChangeCleanTarget')));
            +        },
            +
            +        bclTriggerChangeOnInit: function () {
            +            var r = true,
            +                attr = this.selector().attr('bclTriggerChangeOnInit');
            +
            +            attr && (r = this.boolProp('bclTriggerChangeOnInit'));
            +            return r;
            +        },
            +
            +        bclHideScriptBox: function () {
            +            return this.attrProp('bclHideScriptBox');
            +        },
            +
            +        bclDelimiter: function (triggerElement) {
            +            var r = '||';
            +                
            +            this.selector().is( '[bclDelimiter]' ) 
            +                && ( r = this.selector().attr( 'bclDelimiter' ) );
            +            triggerElement 
            +                && triggerElement.is( '[bclDelimiter]' ) 
            +                && ( r = triggerElement.attr( 'bclDelimiter' ) );
            +            
            +            return r;
            +        },
            +
            +        bclDelimeterItem: function (items, triggerElement) {
            +           
            +           return items.split(this.bclDelimiter(triggerElement)); 
            +        },
            +
            +        isDisplay: function (triggerElement) {
            +            var p = this,
            +                $el = triggerElement,
            +                $selectedItem,
            +                r = false,
            +                attr;
            +
            +            if (!$el.length) return false;
            +
            +            if (/(select)/i.test($el.prop('nodeName').toLowerCase())) {
            +                //处理没有option的select
            +                $selectedItem = $el.find(':selected');
            +                if (!$selectedItem.length) return false;
            +                
            +                if ( $el.attr('bcldisplay') ) {
            +                    r = p.bclDelimeterItem($el.attr('bcldisplay'), $el).indexOf($el.val()) > - 1;
            +                }
            +                
            +                if ( $selectedItem.attr('bcldisplay') ) {
            +                    r = JC.f.parseBool($selectedItem.attr('bcldisplay'));
            +                }
            +
            +            } else {
            +                if ( p.attrProp('bcldisplay') ) {
            +                    r = p.bclDelimeterItem(p.attrProp('bcldisplay'), p.selector()).indexOf($el.val()) > - 1;
            +                }
            +                attr = $el.attr('bcldisplay');
            +                attr && (r = JC.f.parseBool(attr));
            +
            +            }
            +
            +            return r;
            +        },
            +
            +        isDisable: function (triggerElement) {
            +            var p = this,
            +                $el = triggerElement,
            +                $selectedItem,
            +                r = false;
            +
            +            if ( !$el.length ) return false;
            +
            +            if (/(select)/i.test($el.prop('nodeName').toLowerCase())) {
            +                //处理没有option的select
            +                $selectedItem = $el.find(':selected');
            +                if (!$selectedItem.length) return false;
            +                
            +                if ( $el.attr('bcldisabled') ) {
            +                    r = p.bclDelimeterItem($el.attr('bcldisabled'), $el).indexOf($el.val()) > - 1;
            +                }
            +                
            +                if ( $selectedItem.attr('bcldisabled') ) {
            +                    r = JC.f.parseBool($selectedItem.attr('bcldisabled'));
            +                }
            +               
            +            } else {
            +                if ( p.attrProp('bcldisabled') ) {
            +                    r = p.bclDelimeterItem(p.attrProp('bcldisabled'), p.selector()).indexOf($el.val()) > - 1;
            +                }
            +                
            +                if ( $el.attr('bcldisabled') ) {
            +                    r = JC.f.parseBool($el.attr('bcldisabled'));
            +                }
            +                
            +            }
            +
            +            return r;
            +        }
            +    });
            +
            +    JC.f.extendObject( MultiChangeLogic.View.prototype, {
            +        init: function () {
            +
            +        }
            +    });
            +
            +    _jdoc.ready( function () {
            +        MultiChangeLogic.autoInit && MultiChangeLogic.init();
            +    });
            +
            +    return JC.MultiChangeLogic;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_MultiDate_MultiDate.js.html b/docs_api/files/.._bizs_MultiDate_MultiDate.js.html index 28f48885b..8413ac1e7 100644 --- a/docs_api/files/.._bizs_MultiDate_MultiDate.js.html +++ b/docs_api/files/.._bizs_MultiDate_MultiDate.js.html @@ -3,11 +3,17 @@ ../bizs/MultiDate/MultiDate.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,13 +252,14 @@

            File: ../bizs/MultiDate/MultiDate.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Calendar' ], function(){
                 window.Bizs.MultiDate = MultiDate;
                 /**
                  * MultiDate 复合日历业务逻辑
            -     * <p>
            -     *      <b>require</b>: <a href='JC.Calendar.html'>JC.Calendar</a>
            -     *      <br /><b>require</b>: <a href='window.jQuery.html'>jQuery</a>
            +     * 根据select选项弹出日、周、月、季日历,并计算出起始日期和结束日期
            +     * <p><b>require</b>: v
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *      , <a href='JC.Calendar.html'>JC.Calendar</a>
                  * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/window.Bizs.MultiDate.html' target='_blank'>API docs</a>
            @@ -211,55 +284,74 @@ 

            File: ../bizs/MultiDate/MultiDate.js

            MultiDate.prototype = { _beforeInit: function(){ + this._model.mdstartdate().attr( 'ignoreInitCalendarDate', true ).data( 'ignoreInitCalendarDate', true ); + this._model.mdenddate().attr( 'ignoreInitCalendarDate', true ).data( 'ignoreInitCalendarDate', true ); JC.log( 'MultiDate _beforeInit', new Date().getTime() ); } , _initHanlderEvent: function(){ var _p = this; + $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){ _p.on( _evtName, _cb ); }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ); _data.shift(); _data.shift(); + var _data = JC.f.sliceArgs( arguments ); _data.shift(); _data.shift(); _p.trigger( _evtName, _data ); + }); _p._initDefaultValue(); + JC.f.safeTimeout( function(){ + _p._initDefaultValue(); + }, _p.selector(), 'as3asdfasew3asdf', 201 ); _p._initHandlerEvent(); _p.selector().trigger( 'change', [ true ] ); } , _initDefaultValue: function(){ + //将url上带入的参数赋给各标签 var _p = this , _qs = _p._model.qstartdate() , _qe = _p._model.qenddate() , _mdcusStart = _p._model.mdCustomStartDate() , _mdcusEnd= _p._model.mdCustomEndDate() + , _type = _p._model.qtype() || _p._model.selector().val() + , _defaultBox = _p._model.mdDefaultBox() + , _customBox = _p._model.mdCustomBox() ; _p._model.selector( _p._model.qtype() ); _p._model.mdstartdate( _qs ); _p._model.mdenddate( _qe ); + //如果日期没有name属性,那么赋值 if( !_p._model.mddate().attr('name') ){ + if( _qs && _qe ){ if( _qs == _qe ){ - _p._model.mddate( formatISODate(parseISODate(_qs)) ); + _p._model.mddate( JC.f.formatISODate(JC.f.parseISODate(_qs)) ); }else{ - _p._model.mddate( printf( '{0} 至 {1}' - , formatISODate(parseISODate(_qs)) - , formatISODate(parseISODate(_qe)) + _p._model.mddate( JC.f.printf( '{0} 至 {1}' + , JC.f.formatISODate(JC.f.parseISODate(_qs)) + , JC.f.formatISODate(JC.f.parseISODate(_qe)) ) ); } } }else{ + //将url上的日期赋给日期控件 _p._model.mddate( _p._model.qdate() ); } - _mdcusStart && _mdcusStart.length && _mdcusStart.val( _qs ? formatISODate( parseISODate( _qs ) ) : _qs ); - _mdcusEnd&& _mdcusEnd.length && _mdcusEnd.val( _qe ? formatISODate( parseISODate( _qe ) ) : _qe ); + if (_type !== 'custom' && _p._model.mdlastdate() ) { + _p._model.setmaxdate(_type); + } + + //如果是daterange类型,那么将url上的起止时间赋值给他们。 + _mdcusStart && _mdcusStart.length && _mdcusStart.val( _qs ? JC.f.formatISODate( JC.f.parseISODate( _qs ) ) : _qs ); + _mdcusEnd && _mdcusEnd.length && _mdcusEnd.val( _qe ? JC.f.formatISODate( JC.f.parseISODate( _qe ) ) : _qe ); } , _initHandlerEvent: @@ -271,7 +363,7 @@

            File: ../bizs/MultiDate/MultiDate.js

            , _defaultBox = _p._model.mdDefaultBox() , _customBox = _p._model.mdCustomBox() ; - JC.log( 'type:', _type ); + if( _type == 'custom' ){ if( _defaultBox && _customBox && _defaultBox.length && _customBox.length ){ _defaultBox.hide(); @@ -282,18 +374,28 @@

            File: ../bizs/MultiDate/MultiDate.js

            } }else{ if( _defaultBox && _customBox && _defaultBox.length && _customBox.length ){ + _customBox.hide(); _customBox.find('input').prop( 'disabled', true); _defaultBox.find('input').prop( 'disabled', false); _defaultBox.show(); } + + if ( _p._model.mdlastdate() ) { + _p._model.setmaxdate(_type); + } + + //页面load,不需要显示日期面板,直接return; if( _noPick ) return; _p._model.settype( _type ); + setTimeout(function(){ JC.Calendar.pickDate( _p._model.mddate()[0] ); - _p._model.mdstartdate( '' ); - _p._model.mdenddate( '' ); + if (!_p._model.setdefaulthiddendate()) { + _p._model.mdstartdate( '' ); + _p._model.mdenddate( '' ); + } }, 10); } }); @@ -353,16 +455,16 @@

            File: ../bizs/MultiDate/MultiDate.js

            MultiDate.Model._inscount++; window[ _updatecb ] = - function( _type, _startDate, _endDate ){ - _p.mdstartdate( formatISODate( _startDate, '' ) ); - _p.mdenddate( formatISODate( _endDate, '' ) ); + function( _startDate, _endDate, _calendarIns ){ + _p.mdstartdate( JC.f.formatISODate( _startDate, '' ) ); + _p.mdenddate( JC.f.formatISODate( _endDate, '' ) ); }; _p.mddate().attr('calendarupdate', _updatecb); window[ _showcb ] = function(){ var _layout = $('body > div.UXCCalendar:visible'); - _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); + _layout.length && JC.Tips && JC.Tips.init( _layout.find('[title]') ); }; _p.mddate().attr('calendarshow', _showcb ); @@ -384,14 +486,20 @@

            File: ../bizs/MultiDate/MultiDate.js

            return _p; } - , mdDefaultBox: function(){ return this.selectorProp( 'mdDefaultBox' ); } - , mdCustomBox: function(){ return this.selectorProp( 'mdCustomBox' ); } + , mdDefaultBox: function(){ + return this.selectorProp( 'mdDefaultBox' ); + } + , mdCustomBox: function(){ + //datatype = datarange + return this.selectorProp( 'mdCustomBox' ); + } , mdCustomStartDate: function(){ return this.selectorProp( 'mdCustomStartDate' ); } , mdCustomEndDate: function(){ return this.selectorProp( 'mdCustomEndDate' ); } , selector: function( _setter ){ + typeof _setter != 'undefined' && this.hastype( this.qtype() ) && this._selector.val( _setter ) @@ -400,42 +508,62 @@

            File: ../bizs/MultiDate/MultiDate.js

            return this._selector; } + , mdlastdate: + function () { + var r = this.selector().attr('mdlastdate'); + r = JC.f.parseBool(r); + return r ; + } + , mddate: + //返回日期控件,如果有日期赋值 function( _setter ){ - var _r = parentSelector( this.selector(), this.selector().attr('mddate') ); + var _r = JC.f.parentSelector( this.selector(), this.selector().attr('mddate') ); typeof _setter != 'undefined' && _r.val( _setter ); + return _r; } , mdstartdate: + //隐藏域开始日期 function( _setter ){ - var _r = parentSelector( this.selector(), this.selector().attr('mdstartdate') ); + var _r = JC.f.parentSelector( this.selector(), this.selector().attr('mdstartdate') ); typeof _setter != 'undefined' && _r.val( _setter.replace(/[^\d]/g, '') ); return _r; } , mdenddate: + //隐藏域结束日期 function( _setter ){ - var _r = parentSelector( this.selector(), this.selector().attr('mdenddate') ); + var _r = JC.f.parentSelector( this.selector(), this.selector().attr('mdenddate') ); typeof _setter != 'undefined' && _r.val( _setter.replace(/[^\d]/g, '') ); return _r; } + , setdefaulthiddendate: function () { + return JC.f.parseBool(this.selector().attr('setdefaulthiddendate')); + } + , qtype: function(){ - return this.decodedata( getUrlParam( this.selector().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的日期类型参数 + return this.decodedata( JC.f.getUrlParam( this.selector().attr('name') || '' ) || '' ).toLowerCase(); } , qdate: function(){ - return this.decodedata( getUrlParam( this.mddate().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的日期值 + return this.decodedata( JC.f.getUrlParam( this.mddate().attr('name') || '' ) || '' ).toLowerCase(); } , qstartdate: function(){ - return this.decodedata( getUrlParam( this.mdstartdate().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的开始日期 + return this.decodedata( JC.f.getUrlParam( this.mdstartdate().attr('name') || '' ) || '' ).toLowerCase(); } , qenddate: function(){ - return this.decodedata( getUrlParam( this.mdenddate().attr('name') || '' ) || '' ).toLowerCase(); + //获取url上的结束日期 + return this.decodedata( JC.f.getUrlParam( this.mdenddate().attr('name') || '' ) || '' ).toLowerCase(); } , hastype: + //是否为可处理的日期类型 function( _type ){ var _r = false; this.selector().find('> option').each( function(){ @@ -448,6 +576,7 @@

            File: ../bizs/MultiDate/MultiDate.js

            } , settype: + //修改日期控件的日期类型日、周、月、季 function( _type ){ this.mddate().val('').attr( 'multidate', _type ); } @@ -458,6 +587,7 @@

            File: ../bizs/MultiDate/MultiDate.js

            return _d; } , updateHiddenDate: + //更新隐藏域开始结束日期的值,如果日期为空那么隐藏域的值为空,否则8位日期 function (){ var _date = $.trim( this.mddate().val() ); if( !_date ){ @@ -476,6 +606,52 @@

            File: ../bizs/MultiDate/MultiDate.js

            } } + , setmaxdate: function (_type) { + var _p = this, + _tmpDate, + _maxDate, + _startDate, + _strDate; + + switch( _type ) { + case 'week': + _tmpDate = JC.f.dateDetect('now -1w'); + _maxDate = JC.f.formatISODate(JC.f.dayOfWeek(_tmpDate).end); + _strDate = JC.f.formatISODate(JC.f.dayOfWeek(_tmpDate).start) + '至' + _maxDate; + break; + case 'month': + _tmpDate = JC.f.dateDetect('now -1m'); + _maxDate = JC.f.cloneDate(_tmpDate); + _maxDate.setDate(JC.f.maxDayOfMonth(_tmpDate)); + _maxDate = JC.f.formatISODate(_maxDate); + _startDate = JC.f.cloneDate(_tmpDate); + _startDate.setDate(1); + _strDate = JC.f.formatISODate(_startDate) + '至' + _maxDate; + break; + case 'season': + _tmpDate = JC.f.dayOfSeason(new Date()).q - 2; + _tmpDate > 0? _tmpDate: 0; + _maxDate = JC.f.seasonOfYear(new Date().getFullYear())[_tmpDate].end; + _maxDate = JC.f.formatISODate(_maxDate); + _startDate = JC.f.formatISODate(JC.f.seasonOfYear(new Date().getFullYear())[_tmpDate].start); + _strDate = _startDate + '至' + _maxDate; + break; + case 'date': + _maxDate = new Date(); + _maxDate.setDate(_maxDate.getDate() - 1); + _maxDate = JC.f.formatISODate(_maxDate); + _strDate = _maxDate + break; + } + + _p.mddate().attr('maxValue', _maxDate); + if (_p.setdefaulthiddendate()) { + setTimeout(function () { + _p.mddate().val(_strDate); + }, 30); + } + } + }; BaseMVC.buildView( MultiDate ); @@ -494,7 +670,7 @@

            File: ../bizs/MultiDate/MultiDate.js

            } }; - BaseMVC.build( MultiDate, 'Bizs' ); + BaseMVC.build( MultiDate, 'Bizs' ); $(document).ready( function(){ $('select.js_autoMultidate').each( function(){ @@ -502,7 +678,16 @@

            File: ../bizs/MultiDate/MultiDate.js

            }); }); -}(jQuery)); + return Bizs.MultiDate; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._bizs_MultiSelectTree_MultiSelectTree.js.html b/docs_api/files/.._bizs_MultiSelectTree_MultiSelectTree.js.html new file mode 100644 index 000000000..a8639da1c --- /dev/null +++ b/docs_api/files/.._bizs_MultiSelectTree_MultiSelectTree.js.html @@ -0,0 +1,401 @@ + + + + + ../bizs/MultiSelectTree/MultiSelectTree.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MultiSelectTree/MultiSelectTree.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common', 'JC.Tree' ], function(){
            +/**
            + * MultiSelect<br />
            + * 多选树<br/>
            + * 基于JC.Tree的扩展<br />
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.common.html'>JC.common</a>
            + *      , <a href='JC.Tree.html'>JC.Tree</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.MultiSelectTree.html' target='_blank'>API docs</a>
            + *      | <a href='../../bizs/MultiselectPanel/_demo' target='_blank'>demo link</a></p>
            + *  
            + * @namespace   window.Bizs
            + * @class       MultiSelectTree
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-06-19
            + * @author  sunlei <sunlei@360.cn> | 75 Team
            + */
            +    JC.use && !JC.Tree && JC.use( 'JC.Tree' );
            +    Bizs.MultiSelectTree = MultiSelectTree
            +
            +	function MultiSelectTree( _treeEle, _treeData, _cb, _renderTpl ){
            +		// init tree and callback
            +		this._tree = new JC.Tree( _treeEle, _treeData );
            +		this._getSelected = _cb;
            +        this._renderTpl = _renderTpl;
            +	}
            +	MultiSelectTree.prototype = {
            +        /**
            +         * explain~
            +         * @method expandChild
            +         * @param   {event} _evt
            +         */
            +		"expandChild" : function(_evt){
            +			var target = $(_evt.target);
            +			var dataid = target.attr('dataid');
            +			if(this._tree._model.hasChild(dataid)){
            +				this._tree._view.open(dataid);
            +				var children = this._tree._model.child(dataid);
            +				for(var i=0;i<children.length;i++){
            +					this.expandChild(children[i][0]);
            +				}
            +			}
            +		},
            +		"foldChild" : function(_evt){
            +			var target = $(_evt.target);
            +			var dataid = target.attr('dataid');
            +			this._tree._view.close(dataid);
            +		},
            +		"autoCheck" : function(target){
            +			if(target.attr("dataid") == this._tree._model.root()[0]){
            +				return;
            +			}
            +			var parent_ul = JC.f.getJqParent(target,"ul");
            +			var notCheckedCount = parent_ul.find('input.js_checkbox:not(:checked)').length;
            +			var parent_sel = parent_ul.prev().find('input.js_checkbox').eq(0);
            +			if(notCheckedCount === 0){
            +				parent_sel[0].checked = true;
            +				this.autoCheck(parent_sel);
            +			}
            +			else{
            +				parent_sel[0].checked = false;
            +				this.autoCheck(parent_sel);
            +			}
            +		},
            +		"update" : function(_evt){
            +			var target = $(_evt.target);
            +			if(target[0].nodeName.toLowerCase() !== 'input'){
            +				return;
            +			}  
            +			if(target[0].checked){
            +				var child = JC.f.getJqParent( target, 'div.node_ctn' ).next().find('input.js_checkbox');
            +				for(var i=0;i<child.length;i++){
            +					child[i].checked = true;
            +				}
            +			}
            +			else{
            +				var child = JC.f.getJqParent( target, 'div.node_ctn' ).next().find('input.js_checkbox');
            +				for(var i=0;i<child.length;i++){
            +					child[i].checked = false;
            +				}
            +			}
            +			this.autoCheck(target);
            +			
            +			// call getSelected callback
            +			var selectedArray = [];
            +			this._tree._model._container.find('input.js_checkbox:checked').each(function(){
            +				selectedArray.push($(this).attr("dataid"));
            +			});
            +			this._getSelected(selectedArray, this._tree);
            +		},
            +		"init" : function(){
            +            var _p = this;
            +			// add delegate
            +			this._tree._model._container.delegate('input.js_checkbox:checked', 'click', this.expandChild.bind(this));
            +			this._tree._model._container.delegate('input.js_checkbox:not(:checked)', 'click', this.foldChild.bind(this));
            +			
            +			// rewrite callback
            +			this._tree.on('RenderLabel', function( _data ){
            +				var _node = $(this);
            +				_node.html( JC.f.printf( _p._renderTpl 
            +                        || '<label dataid="{0}" dataname="{1}"><input type="checkbox" class="js_checkbox" dataid="{0}">{1}</label>'
            +                        , _data[0], _data[1] ) );
            +			});
            +			this._tree.on('change', this.update.bind(this));
            +			
            +			// triger tree init
            +			this._tree.init();
            +            return this._tree;
            +		}
            +        , tree: function(){ return this._tree; }
            +	};	
            +
            +    return JC.MultiSelectTree;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_MultiSelect_MultiSelect.js.html b/docs_api/files/.._bizs_MultiSelect_MultiSelect.js.html new file mode 100644 index 000000000..628d51155 --- /dev/null +++ b/docs_api/files/.._bizs_MultiSelect_MultiSelect.js.html @@ -0,0 +1,644 @@ + + + + + ../bizs/MultiSelect/MultiSelect.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MultiSelect/MultiSelect.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +//Todo:对于已选中的数据,自动铺出数据列表,展示数据
            +/**
            + * 模拟多选下拉框
            + * 框的click将列表拉出来。
            + * close和document的click将面板关闭,返回数据,并把数据铺到指定的面板里
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.MultiSelect.html' target='_blank'>API docs</a>
            + *   | <a href='../../bizs/MultiSelect/_demo/' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会自动处理 div class="js_bizMultiSelect" </h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>defaultLabel = string</dt>
            + *    <dd>
            + *      声明下拉框默认显示的文字信息
            + *    <dd>
            + *    <dt>binddatabox = string(selector)</dt>
            + *    <dd>声明选中数据,关闭下拉面板后,数据的回填区域<br/>
            + *     如果此属性为空,则不会在其他区域展示选中的数据
            + *    </dd>
            + *    <dt>ajaxurl = string</dt>
            + *    <dd>声明ajax加载数据的url
            + *          <dl>
            + *              <dt>数据格式</dt>
            + *              <dd>
            + *                  {errorno: 0,
            + *                  data: [ { "id": "id value", "label": "label value", "isChecked": "is checked" }, ... ],
            + *                  errormsg: ""}
            + *              </dd>
            + *          </dl></dd>
            + *    <dt>dataFilter = callback</dt>
            + *    <dd>
            + *           <dl>
            + *              <dt>如果 数据接口获取的数据不是默认格式, 
            + *                  可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式
            + *              </dt>
            + *              <dd>
            +<pre>function cacDataFilter( _json ){
            +if( _json.data && _json.data.length ){
            +    _json = _json.data;
            +}
            + 
            +$.each( _json, function( _ix, _item ){
            +    _item.length &&
            +        ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1], 'isChecked': _item[2] } )
            +        ;
            +});
            +return _json;
            +}</pre>
            + *              </dd>
            + *          </dl>
            + *    </dd>
            + *    <dt>dataname=string</dt>
            + *    <dd>声明checkbox的name属性, 适用于ajax接口的数据</dd>
            + *
            + *</dl>
            + *
            + * @namespace window.Bizs
            + * @class MultiSelect
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-02-20
            + * @author  zuojing <suches@btbtd.org> | 75 Team
            + * @example
            +     <div class="test">
            +        <div class="SELECTBOX js_bizMultiSelect" databindbox="(.test .js_box">
            +           <i class="SELECTIcon"></i>
            +           <span class="SELECTLabel">共选中<b class="red">2</b>条数据</span>                                         
            +           <div class="SELECTListBox" style="z-index: 50008; display: none;">
            +                <ul>
            +                    <li class="SELECTIgnore">
            +                       <label>
            +                           <input type="checkbox" value="" name="" checktype="all" checkfor="///input[type=checkbox]">
            +                           全选
            +                       </label>
            +                    </li>
            +                    <li>
            +                       <label>
            +                           <input type="checkbox" value="1" name="" data-text="北京天地在线广告有限公司">
            +                           北京天地在线广告有限公司
            +                       </label>
            +                    </li>
            +                    <li>
            +                       <label>
            +                           <input type="checkbox" value="2" name="" data-text="河南天地在线广告有限公司">
            +                           河南天地在线广告有限公司
            +                       </label>
            +                    </li>
            +                    <li>
            +                       <label>
            +                           <input type="checkbox" value="3" name="" data-text="河北天地在线广告有限公司">
            +                           河北天地在线广告有限公司
            +                       </label>
            +                    </li>
            +               </ul>
            +               <div class="SELECTClose"><a href="javascript:;" class="SELECTCloseBtn">关闭</a></div>
            +           </div>
            +        </div>
            +        <div class="js_box"><ul><li>北京天地在线广告有限公司</li> <li>河南天地在线广告有限公司</li></ul></div>
            +      </div>
            + */
            +    Bizs.MultiSelect = MultiSelect;
            +
            +    function MultiSelect( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, MultiSelect ) ) 
            +            return JC.BaseMVC.getInstance( _selector, MultiSelect );
            +
            +        JC.BaseMVC.getInstance( _selector, MultiSelect, this );
            +
            +        this._model = new MultiSelect.Model( _selector );
            +        this._view = new MultiSelect.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( MultiSelect.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 MultiSelect 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of MultiSelectInstance}
            +     */
            +    MultiSelect.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( 'js_bizMultiSelect' )  ){
            +                    _r.push( new MultiSelect( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_bizMultiSelect' ).each( function(){
            +                        _r.push( new MultiSelect( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    /**
            +     * 定义全局数据过滤函数
            +     * @method  dataFilter
            +     * @param   {json}      _json
            +     * @static
            +     * @return  {json}
            +     */
            +    MultiSelect.dataFilter;
            +
            +    BaseMVC.build( MultiSelect );
            +
            +    JC.f.extendObject( MultiSelect.prototype, {
            +        _beforeInit: function () {
            +            //JC.log( 'MultiSelect _beforeInit', new Date().getTime() );
            +        },
            +
            +        _initHanlderEvent: function () {
            +  
            +        },
            +
            +        _inited: function () {
            +
            +        },
            +
            +        show: function () {
            +            this._view.show();
            +            return this;
            +        },
            +
            +        hide: function () {
            +            this._view.hide();
            +            return this;
            +        }
            +           
            +    });
            +
            +    MultiSelect.Model._instanceName = 'MultiSelectIns';
            +    MultiSelect.Model.SHOW = 'SHOW';
            +    JC.f.extendObject( MultiSelect.Model.prototype, {
            +        init: function () {
            +
            +        },
            +
            +        defaultLabel: function () {
            +            return this.attrProp('defaultLabel');
            +        },
            +
            +        dataBindBox: function () {
            +            var _p = this,
            +                _r = _p.attrProp('dataBindBox');
            +
            +            return JC.f.parentSelector(_p.selector(), _r);
            +        },
            +
            +        listBox: function () {
            +            return this.selector().find('.SELECTListBox');
            +        },
            +
            +        ajaxUrl: function () {
            +            return this.attrProp('ajaxUrl');
            +        },
            +
            +        ajaxData: function () {
            +            var _p = this,
            +                _url = _p.ajaxUrl(),
            +                _name = _p.attrProp('dataname'),
            +                _tpl = [],
            +                _box = _p.listBox();
            +
            +            if ( !_url ) return;
            +
            +            _tpl.push('<ul><li class="SELECTIgnore"><label><input type="checkbox" value="" checktype="all" checkfor="///input[type=checkbox]">全选</label></li>');
            +
            +            $.get(_url, function (_res) {
            +                _res = _p.dataFilter( $.parseJSON(_res) );
            +  
            +                var i = 0,
            +                    l = _res.length,
            +                    _str = '',
            +                    _checked;
            +
            +                for (i = 0; i < l; i++) {
            +                    _checked = _res[i].isChecked? 'checked': '';
            +                    _str = '<li><label><input type="checkbox" value="'
            +                        + _res[i].id + '" name="' + _name + '" '
            +                        + _checked 
            +                        + ' data-text="' + _res[i].label + '" />'
            +                        + _res[i].label + '</label></li>';
            +                    
            +                    _tpl.push(_str);
            +                }
            +         
            +                _tpl.push('</ul>');
            +                $(_tpl.join(' ')).prependTo(_box);
            +                JC.f.autoInit && JC.f.autoInit(_box);
            +
            +            } );
            +
            +        },
            +
            +        dataFilter: function ( _data ) {
            +            var _p = this,
            +                _filter = _p.callbackProp('dataFilter') || MultiSelect.dataFilter;
            +
            +            _filter && ( _data = _filter(_data) );
            +
            +            return _data;
            +        },
            +
            +        dataList: function () {
            +            var _p = this,
            +                _list = _p.listBox().find('>ul>li').not('.SELECTIgnore'),
            +                _r = [];
            +
            +            ( _list.length === 0 ) &&  _p.ajaxUrl() && _p.ajaxData() ;
            +
            +            _list.each(function () {
            +                var _sp = $(this),
            +                    _str = '',
            +                    _ipt = _sp.find('input');
            +
            +                if ( _ipt.prop('checked') ) {
            +                    _str = '<li>' + _ipt.data('text') + '</li>' ;
            +                    _r.push(_str);
            +                }
            +
            +            });
            +
            +            return _r;
            +        },
            +
            +        bindData: function () {
            +            var _p = this,
            +                _box = _p.dataBindBox(),
            +                _datalist = _p.dataList(),
            +                _l = _datalist.length,
            +                _label = _p.defaultLabel(),
            +                _t = '';
            +            
            +            _box.html('<ul>' + _datalist.join(' ') + '</ul>');
            +            _t = _l ? '已选择' + _l + '个' +  _label: '请选择' + _label;
            +            _p.selector().find('.SELECTLabel').html(_t);
            +        }
            +
            +    });
            +
            +    JC.f.extendObject( MultiSelect.View.prototype, {
            +        init: function () {
            +
            +        },
            +
            +        show: function () {
            +            var _p = this,
            +                _selector = _p._model.selector();
            +
            +            JC.f.safeTimeout( setTimeout( function(){}, 50), _selector, 'SELECTListBoxUi' );
            +            _selector.addClass('SELECTBOX-active');
            +            _p._model.listBox().show().css( { 'z-index': ZINDEX_COUNT++ } );
            +        }, 
            +
            +        hide: function () {
            +            var _p = this,
            +                _selector = _p._model.selector();
            +
            +            _p._model.listBox().hide();
            +            JC.f.safeTimeout( setTimeout( function(){
            +                _selector.removeClass( 'SELECTBOX-active' );
            +                _p._model.bindData();
            +            }, 50), _selector, 'SELECTListBoxUi' );
            +        }
            +           
            +        
            +    });
            +    
            +    var doc = $(document);
            +
            +    doc.ready( function(){
            +        var _insAr = 0;
            +        MultiSelect.autoInit
            +            && ( _insAr = MultiSelect.init() );
            +    });
            +
            +    doc.delegate('.js_bizMultiSelect', 'click', function () {
            +        var _p = $(this), 
            +            _ins;
            + 
            +        JC.f.safeTimeout( function(){
            +            _ins = JC.BaseMVC.getInstance( _p, MultiSelect );
            +            !_ins && ( _ins = new MultiSelect( _p ) );
            +            _ins.show();
            +        }, _p, 'bizMultiSelectClick', 50 );
            +
            +    });
            +
            +    doc.on('mousedown', function () {
            +        JC.f.safeTimeout( function(){
            +            $('.js_bizMultiSelect').each( function(){
            +                var _ins = JC.BaseMVC.getInstance( $(this), MultiSelect );
            +                    _ins && _ins.hide();
            +            });
            +        }, null, 'CLOSE_MULTI_SELECT')
            +
            +    } );
            +
            +    doc.delegate('.SELECTCloseBtn', 'mousedown', function () {
            +        var _ins = JC.BaseMVC.getInstance( JC.f.getJqParent($(this), '.js_bizMultiSelect'), MultiSelect );
            +        _ins && _ins.hide();
            +    });
            +
            +    doc.delegate('.js_bizMultiSelect>.SELECTListBox', 'mousedown', function( _evt ){
            +        _evt.stopPropagation();
            +    });
            +
            +    return Bizs.MultiSelect;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_MultiUpload_MultiUpload.js.html b/docs_api/files/.._bizs_MultiUpload_MultiUpload.js.html new file mode 100644 index 000000000..05f88a85a --- /dev/null +++ b/docs_api/files/.._bizs_MultiUpload_MultiUpload.js.html @@ -0,0 +1,704 @@ + + + + + ../bizs/MultiUpload/MultiUpload.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MultiUpload/MultiUpload.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.AjaxUpload' ], function(){
            +/**
            + * 上传多个文件, 基于 JC.AjaxUpload
            + *
            + *<p><b>require</b>:
            + *   <a href="widnow..jQuery.html">jQuery</a>
            + *   , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *   , <a href='JC.AjaxUpload.html'>JC.AjaxUpload</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/Bizs.MultiUpload.html' target='_blank'>API docs</a>
            + *   | <a href='../../bizs/MultiUpload/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会自动处理 div class="js_bizMultiUpload" </h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>bmuItemLimit = int, default = 0</dt>
            + *    <dd>限制上传的数量, 0 为不限制, 非 0 为限制的数量<dd>
            + *
            + *    <dt>bmuBoxSelector = selector, default = '|.bmuBoxSelector'</dt>
            + *    <dd>上传内容的父容器</dd>
            + *
            + *    <dt>bmuTplSelector = selector, default = 组件生成</dt>
            + *    <dd>上传内容的模板内容, {0} = file url, {1} = file name</dd>
            + *
            + *    <dt>bmuAjaxUploadSelector = selector, default = '|.js_compAjaxUpload'</dt>
            + *    <dd>JC.AjaxUpload 的选择器</dd>
            + *
            + *    <dt>bmuItemDelegate = selector, default = '>'</dt>
            + *    <dd>bmuBoxSelector 的子级标签</dd>
            + *
            + *    <dt>bmuRemoveDelegate = selector, default = '.js_removeUploadItem'</dt> 
            + *    <dd>删除子级标签的选择器</dd>
            + *
            + *    <dt>bmuRemoveItemParentSelector = selector, default = '('</dt>
            + *    <dd>相对于 bmuRemoveDelegate 的子级标签父选择器</dd>
            + *
            + *    <dt>bmuItemAddedCallback = function</dt>
            + *    <dd>添加上传内容后的回调
            +<pre>function bmuItemAddedCallback( _newItem, _json, _boxSelector ){
            +    var _bmuIns = this;
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>bmuItemDeletedCallback = function</dt>
            + *    <dd>删除上传内容后的回调
            +<pre>function bmuItemDeletedCallback( _deletedItem, _boxSelector ){
            +    var _bmuIns = this;
            +}</pre>
            + *    </dd>
            + *
            + *</dl> 
            + *
            + * @namespace window.Bizs
            + * @class MultiUpload
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +<xmp><div class="js_bizMultiUpload"
            +    bmuBoxSelector="|.uploadItemBox"
            +    bmuTplSelector="|script"
            +    bmuItemDelegate=">"
            +    bmuRemoveDelegate=".js_removeUploadItem"
            +    bmuRemoveItemParentSelector="("
            +    bmuAjaxUploadSelector="|.js_compAjaxUpload"
            +    bmuItemLimit="2"
            +    >
            +    <div>
            +        <input type="hidden" class="ipt ipt-w180 js_compAjaxUpload" value=""
            +            cauStyle="w1"
            +            cauButtonText="上传资质文件"
            +            cauUrl="../_demo/data/handler.php"
            +            cauFileExt=".jpg, .jpeg, .png, .gif"
            +            cauFileName="file"
            +            cauValueKey="url"
            +            cauLabelKey="name"
            +            cauProgressBox="/span.AUProgressBox"
            +            />
            +            <span class="AUProgressBox" style="display:none;">
            +                <button type="button" class="AUProgress"><div class="AUPercent"></div></button>
            +                <button type="button" class="AUCancelProgress"></button>
            +            </span>
            +            .jpg, .jpeg, .png, .gif
            +            (最多上传2个)
            +    </div>
            +    <dl class="uploadItemBox">
            +    </dl>
            +    <script type="text/template">
            +        <dd class="js_multiUploadItem">
            +            <input type="hidden" name="file[]" value="{0}" class="js_multiUploadHidden" />
            +            <a href="{0}" target="_blank"><label class="js_multiUploadLabel">{1}</label></a>
            +            <button type="button" class="AURemove js_removeUploadItem"></button>
            +        </dd>
            +    </script>
            +</div></xmp>
            + */
            +    Bizs.MultiUpload = MultiUpload;
            +
            +    JC.use && !JC.AjaxUpload && JC.use( 'JC.AjaxUpload' );
            +
            +    function MultiUpload( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, MultiUpload ) ) 
            +            return JC.BaseMVC.getInstance( _selector, MultiUpload );
            +
            +        JC.BaseMVC.getInstance( _selector, MultiUpload, this );
            +
            +        this._model = new MultiUpload.Model( _selector );
            +        this._view = new MultiUpload.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( MultiUpload.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 MultiUpload 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of MultiUploadInstance}
            +     */
            +    MultiUpload.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( 'js_bizMultiUpload' )  ){
            +                    _r.push( new MultiUpload( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_bizMultiUpload' ).each( function(){
            +                        _r.push( new MultiUpload( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    BaseMVC.build( MultiUpload );
            +
            +    JC.f.extendObject( MultiUpload.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'MultiUpload _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +                    _p._model.saveAjaxUploadHandler();
            +                    _p._model.injectAjaxHandler();
            +
            +                    _p.trigger( 'CheckItemLimit' );
            +                });
            +
            +                //{"errorno":0,"errmsg":"","data":{"name":"test.jpg","url":"./data/images/test.jpg"}} 
            +                _p.on( 'AjaxDone', function( _evt, _json, _setter, _ajaxUpload ){
            +                    //JC.dir( _json );
            +                    //JC.log( JSON.stringify( _json ) );
            +                    
            +                    var _tpl = _p._model.bmuTpl()
            +                        , _boxSelector = _p._model.bmuBoxSelector()
            +                        ;
            +
            +                    if( !( _boxSelector && _boxSelector.length ) ) return;
            +
            +                    if( _json.errorno ) return;
            +                    _p._view.newItem( _json, _tpl, _boxSelector );
            +                });
            +
            +                _p.on( 'ItemAdded', function( _evt, _newItem, _json, _boxSelector ){
            +                    JC.f.safeTimeout( function(){ _p.trigger( 'CheckItemLimit' ); }, _p, 'OnItemAdded', 10 );
            +
            +                    _p._model.bmuItemAddedCallback()
            +                        && _p._model.bmuItemAddedCallback().call( _p, _newItem, _json, _boxSelector );
            +                });
            +
            +                _p.on( 'ItemDeleted', function( _evt, _deletedItem ){
            +                    _p._model.bmuItemDeletedCallback()
            +                        && _p._model.bmuItemDeletedCallback().call( _p, _deletedItem, _p._model.bmuBoxSelector() );
            +                });
            +
            +                _p.on( 'CheckItemLimit', function(){
            +                    _p._view.checkItemLimit();
            +                });
            +
            +
            +                _p._model.bmuBoxSelector().delegate( _p._model.bmuRemoveDelegate(), 'click', function(){
            +                    //JC.log( 'bmuRemoveDelegate click', new Date().getTime() );
            +                    var _pnt = JC.f.parentSelector( this, _p._model.bmuRemoveItemParentSelector() );
            +
            +                    _pnt && _pnt.length && _pnt.remove();
            +                    _p.updateStatus();
            +
            +                    _p.trigger( 'ItemDeleted', [ this ] );
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'MultiUpload _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +        /**
            +         * 更新按钮的状态
            +         * @method updateStatus
            +         */
            +        , updateStatus:
            +            function(){
            +                this.trigger( 'CheckItemLimit' );
            +                return this;
            +            }
            +    });
            +
            +    MultiUpload.Model._instanceName = 'MultiUpload';
            +    MultiUpload.Model._insCount = 1;
            +    MultiUpload.Model._handlerPrefix = 'bizMultiUploadHandler_';
            +
            +    JC.f.extendObject( MultiUpload.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'MultiUpload.Model.init:', new Date().getTime() );
            +               this._id = MultiUpload.Model._insCount++; 
            +            }
            +
            +        , bmuItemLimit: function(){ return this.intProp( 'bmuItemLimit' ); }
            +        
            +        , id: 
            +            function( _setter ){ 
            +                typeof _setter != 'undefined' && ( this._id = _setter );
            +                return this._id; 
            +            }
            +        , bmuBoxSelector: 
            +            function(){ 
            +                var _r = this._bmuBoxSelector || this.selectorProp( 'bmuBoxSelector' );
            +                !( _r && _r.length ) && ( _r = this.selector().find( '.bmuBoxSelector' ) );
            +                if( !( _r && _r.length ) ){
            +                    _r = this._bmuBoxSelector = $( '<dl class="bmuBoxSelector"></dl>' );
            +                    this._bmuBoxSelector.appendTo( this.selector() );
            +                }
            +                return _r;
            +            }
            +        , bmuTplSelector: 
            +            function(){ 
            +                var _r = this.selectorProp( 'bmuTplSelector' ); 
            +                !( _r && _r.length ) && ( _r = this.selector().find( '.bmuTplSelector' ) );
            +                return _r;
            +            }
            +        , bmuTpl:
            +            function(){
            +                var _r = [
            +                        '<dd class="js_multiUploadItem">'
            +                        ,'<input type="hidden" name="file[]" value="{0}" class="js_multiUploadHidden" />'
            +                        ,'<a href="{0}" target="_blank"><label class="js_multiUploadLabel">{1}</label></a>'
            +                        ,'&nbsp;<button type="button" class="AURemove js_removeUploadItem"></button>'
            +                        ,'</dd>'
            +                    ].join('')
            +                    , _tplSelector = this.bmuTplSelector()
            +                    ;
            +
            +                _tplSelector && _tplSelector.length && ( _r = JC.f.scriptContent( _tplSelector ) );
            +
            +                return _r;
            +            }
            +        , bmuAjaxUploadSelector: 
            +            function(){ 
            +                var _r = this.selectorProp( 'bmuAjaxUploadSelector' ); 
            +                !( _r && _r.length ) && ( _r = this.selector().find( '.js_compAjaxUpload' ) );
            +                return _r;
            +            }
            +
            +        , ajaxUploadIns:
            +            function(){
            +                var _r;
            +
            +                this.bmuAjaxUploadSelector() 
            +                    && this.bmuAjaxUploadSelector().length
            +                    && ( _r = JC.BaseMVC.getInstance( this.bmuAjaxUploadSelector(), JC.AjaxUpload ) )
            +                    ;
            +
            +                return _r;
            +            }
            +
            +        , bmuItemDelegate: function(){ return this.attrProp( 'bmuItemDelegate' ) || '>'; }
            +
            +        , bmuItems: function(){ return this.bmuBoxSelector().find( this.bmuItemDelegate() ); }
            +
            +        , bmuRemoveDelegate: function(){ return this.attrProp( 'bmuRemoveDelegate' ) || '.js_removeUploadItem'; }
            +        , bmuRemoveItemParentSelector: function(){ return this.attrProp( 'bmuRemoveItemParentSelector' ) || '('; }
            +
            +        , saveAjaxUploadHandler:
            +            function(){
            +                this._ajaxUploadDoneHandler = this.windowProp( this.bmuAjaxUploadSelector(), 'cauUploadDoneCallback' );
            +                this._ajaxUploadErrorHandler = this.windowProp( this.bmuAjaxUploadSelector(), 'cauUploadErrorCallback' );
            +            }
            +        , ajaxUploadDoneHandler: function(){ return this._ajaxUploadDoneHandler; }
            +        , ajaxUploadErrorHandler: function(){ return this._ajaxUploadErrorHandler; }
            +
            +        , injectAjaxHandler:
            +            function(){
            +                var _p = this
            +                    , _prefix = MultiUpload.Model._handlerPrefix
            +                    , _doneHandlerName = _prefix + 'done' + this.id()
            +                    , _errorHandlerName = _prefix + 'error' + this.id()
            +                    , _cancelHandlerName = _prefix + 'cancel' + this.id()
            +                    ;
            +
            +                this.setAjaxUplaodHandler( _doneHandlerName, 'cauUploadDoneCallback', 
            +                    function( _json, _selector ){
            +                        var _ajaxUpload = this;
            +
            +                        _p.ajaxUploadDoneHandler() 
            +                            && _p.ajaxUploadDoneHandler().call( _ajaxUpload, _json, _selector );
            +
            +                        _p.trigger( 'AjaxDone', [ _json, _selector, _ajaxUpload ] );
            +
            +                        //JC.log( 'cauUploadDoneCallback', new Date().getTime() );
            +                    });
            +
            +                this.setAjaxUplaodHandler( _errorHandlerName, 'cauBeforeUploadErrCallback', 
            +                    function( ){
            +                        JC.f.safeTimeout( function(){ _p.trigger( 'CheckItemLimit' ); }, _p, 'OnError', 10 );
            +                    });
            +
            +                this.setAjaxUplaodHandler( _cancelHandlerName, 'cauCancelCallback', 
            +                    function( ){
            +                        JC.f.safeTimeout( function(){ _p.trigger( 'CheckItemLimit' ); }, _p, 'OnCancel', 10 );
            +                    });
            +            }
            +
            +        , setAjaxUplaodHandler:
            +            function( _name, _attrName, _handler ){
            +                window[ _name ] = _handler;
            +                this.bmuAjaxUploadSelector().attr( _attrName, _name );
            +            }
            +        , bmuItemAddedCallback: function(){ return this.callbackProp('bmuItemAddedCallback'); }
            +        , bmuItemDeletedCallback: function(){ return this.callbackProp('bmuItemDeletedCallback'); }
            +    });
            +
            +    JC.f.extendObject( MultiUpload.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'MultiUpload.View.init:', new Date().getTime() );
            +            }
            +
            +        , newItem:
            +            function( _json, _tpl, _boxSelector ){
            +                JC.dir( _json );
            +                _tpl = JC.f.printf( _tpl, _json.data.url, _json.data.name );
            +                var _newItem = $( _tpl ); 
            +
            +                _newItem.appendTo( _boxSelector );
            +
            +                this.trigger( 'ItemAdded', [ _newItem, _json, _boxSelector ] );
            +
            +                JC.f.autoInit && JC.f.autoInit( _newItem );
            +            }
            +
            +        , checkItemLimit:
            +            function(){
            +                var _p = this
            +                    , _limit = this._model.bmuItemLimit()
            +                    , _items
            +                    , _ins = _p._model.ajaxUploadIns()
            +                    ;
            +                //JC.log( '_limit', _limit );
            +                if( !_limit ) return;
            +
            +                _items = _p._model.bmuItems();
            +                //if( !( _items && _items.length ) ) return;
            +                _items = _items || [];
            +
            +                if( !_ins ) return;
            +
            +                if( _items.length >= _limit ){
            +                    //JC.log( 'out limit', new Date().getTime() );
            +                    _ins.disable();
            +                }else{
            +                    //JC.log( 'in limit', new Date().getTime() );
            +                    _ins.enable();
            +                }
            +            }
            +
            +    });
            +    /**
            +     * Bizs.MultiUpload 初始化后触发的事件
            +     * @event   inited
            +     */
            +    /**
            +     * ajax 上传完毕后触发的事件
            +     * @event   AjaxDone
            +     */
            +    /**
            +     * 添加上传内容后触发的事件
            +     * @event ItemAdded
            +     */
            +    /**
            +     * 删除上传内容后触发的事件
            +     * @event ItemDeleted
            +     */
            +    /**
            +     * 修正按钮状态的事件
            +     * @event CheckItemLimit
            +     */
            +
            +    $(document).ready( function(){
            +        MultiUpload.autoInit
            +            && JC.f.safeTimeout( function(){ MultiUpload.init() }, null, 'MultiUploadInit', 2 )
            +            ;
            +    });
            +
            +    return Bizs.MultiUpload;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_MultiselectPanel_MultiselectPanel.js.html b/docs_api/files/.._bizs_MultiselectPanel_MultiselectPanel.js.html new file mode 100644 index 000000000..6896ad365 --- /dev/null +++ b/docs_api/files/.._bizs_MultiselectPanel_MultiselectPanel.js.html @@ -0,0 +1,777 @@ + + + + + ../bizs/MultiselectPanel/MultiselectPanel.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/MultiselectPanel/MultiselectPanel.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Panel' ], function(){
            +/**
            + * 二级分类复选弹框
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *      , <a href='JC.Panel.html'>JC.Panel</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc2.openjavascript.org/docs_api/classes/Bizs.MultiselectPanel.html' target='_blank'>API docs</a>
            + *      | <a href='../../modules/Bizs.MultiselectPanel/0.1/_demo' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会自动处理 [input|button] class="js_bizMultiselectPanel" </h2>
            + *
            + *  <h2>共用的 HTML attribute</h2>
            + *  <dl>
            + *    <dt>bmspUrl = url</dt>
            + *    <dd>获取一级分类数据的URL<dd>
            + *
            + *    <dt>bmspChildUrl = url</dt>
            + *    <dd>获取子级分类数据的URL, "{0}" 代表父级ID<dd>
            + *
            + *    <dt>bmspPopupHideButton = bool, default = false</dt>
            + *    <dd>显示弹框的时候, 是否遮盖触发源标签</dd>
            + *
            + *    <dt>bmspPanel = selector</dt>
            + *    <dd>显示内容的弹框</dd>
            + *
            + *    <dt>bmspPanelBoxSelector = selector</dt>
            + *    <dd>弹框里显示分类内容的容器</dd>
            + *
            + *    <dt>bmspTopTpl = script selector</dt>
            + *    <dd>一级分类的脚本模板</dd>
            + *
            + *    <dt>bmspChildTpl = script selector</dt>
            + *    <dd>子级分类的脚本模板</dd>
            + *
            + *    <dt>bmspOpenClass = css class name</dt>
            + *    <dd>展开子级分类的样式</dd>
            + *
            + *    <dt>bmspCloseClass = css class name</dt>
            + *    <dd>关闭子级分类的样式</dd>
            + *
            + *    <dt>bmspNoItemText = string</dt>
            + *    <dd>没有选择内容时的提示文本</dd>
            + *
            + *    <dt>bmspHasItemText = string</dt>
            + *    <dd>有选择内容时的提示文本, "{0}" 代表选择的数量</dd>
            + *
            + *    <dt>bmspSaveTopIdSelector = selector</dt>
            + *    <dd>保存一级分类ID的选择器</dd>
            + *  </dl> 
            + *
            + *  <h2>URL 回填的 HTML attribute</h2>
            + *  <dl>
            + *    <dt>bmspAutoFillTopKey = url arg name</dt>
            + *    <dd>回填一级分类的URL识别name</dd>
            + *
            + *    <dt>bmspAutoFillChildKey = url arg name</dt>
            + *    <dd>回填子级分类的URL识别name</dd>
            + *  </dl>
            + *
            + *  <h2>数据 回填的 HTML attribute</h2>
            + *  <dl>
            + *      <dt>bmspDefaultFillData = json data name, <b>window 变量域</b></dt>
            + *      <dd>初始化的数据变量名<pre>
            +window.testData = { "parents": [ 1, 2, 3 ], "children": [4, 5, 6, 7, 8 ] };
            +</pre></dd>
            + *  </dl>
            + *
            + * @namespace   window.Bizs
            + * @class       MultiselectPanel
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-05-09
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    Bizs.MultiselectPanel = MultiselectPanel;
            +
            +    function MultiselectPanel( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, MultiselectPanel ) ) 
            +            return JC.BaseMVC.getInstance( _selector, MultiselectPanel );
            +
            +        JC.BaseMVC.getInstance( _selector, MultiselectPanel, this );
            +
            +        this._model = new MultiselectPanel.Model( _selector );
            +        this._view = new MultiselectPanel.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( MultiselectPanel.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 MultiselectPanel 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of MultiselectPanelInstance}
            +     */
            +    MultiselectPanel.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_bizMultiselectPanel' )  ){
            +                    _r.push( new MultiselectPanel( _selector ) );
            +                }else{
            +                    _selector.find( 'input.js_bizMultiselectPanel, button.js_bizMultiselectPanel' ).each( function(){
            +                        _r.push( new MultiselectPanel( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( MultiselectPanel );
            +
            +    JC.f.extendObject( MultiselectPanel.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'MultiselectPanel _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +                    _p.trigger( 'init_top' );
            +                });
            +
            +                var _panel = new JC.Panel( _p._model.panel() );
            +                    _p._model.panelIns( _panel );
            +
            +                    _panel.on( 'close', function( _evt, _panel ){ _panel.hide(); return false; });
            +
            +                    _panel.on( 'hide', function(){
            +                        JC.f.safeTimeout( function(){
            +                            _p.trigger( 'updateStatus' );
            +                        }, _p.selector(), 'HIDE_PANEL', 50 );
            +                    });
            +
            +                    _panel.on( 'beforeshow', function(){
            +                        JC.hideAllPanel();
            +                    });
            +
            +                    _panel.layout().on( 'click', function( _evt ){
            +                        JC.f.safeTimeout( function(){
            +                            _p.trigger( 'saveParentId' );
            +                        }, _p.selector(), 'HIDE_PANEL', 50 );
            +                    });
            +
            +
            +                if( _p._model.popupHideButton() ){
            +                    _panel.offsetTop( -_p.selector().prop( 'offsetHeight' ) - 1 );
            +                }
            +
            +                _p.selector().on( 'click', function( _evt ){
            +                    _panel.show( _p.selector() );
            +                });
            +
            +                _p.on( 'init_top', function( _evt ){
            +                    _p._model.initTop();
            +                    _p.trigger( 'saveParentId' );
            +                });
            +
            +                _p.on( 'updateTop', function( _evt, _data, _d ){
            +                    _p._view.buildTop( _data );
            +                    _p.trigger( 'saveParentId' );
            +                });
            +
            +                _p.on( 'updateChild', function( _evt, _id, _data, _d ){
            +                    _p._view.buildChild( _id, _data );
            +                    var _pCk = _p._model.getCkItem( _id );
            +                    _p._view.topCk( _id, _pCk.prop( 'checked' ) );
            +                });
            +
            +                _panel.layout().delegate( '.' + _p._model.openClass(), 'click', function( _evt ){
            +                    var _sp = $( this ), _id = _sp.data('id');
            +                    _sp.addClass( _p._model.closeClass() ).removeClass( _p._model.openClass() );
            +                    _p._view.showChild( _id );
            +                    _p.trigger( 'initChildBox', [ _id ] );
            +                });
            +
            +                _p.on( 'initChildBox', function( _evt, _id ){
            +                    if( !_p._model.getChildBox( _id ).data( 'inited' ) ){
            +                        _p._model.getChildBox( _id ).data( 'inited', true );
            +                        _p._model.initChild( _id );
            +                    }
            +                });
            +
            +                _panel.layout().delegate( '.' + _p._model.closeClass(), 'click', function( _evt ){
            +                    var _sp = $( this ), _id = _sp.data('id');
            +                    _sp.addClass( _p._model.openClass() ).removeClass( _p._model.closeClass() );
            +                    _p._view.hideChild( _id );
            +                });
            +
            +                _panel.layout().delegate( 'input.js_bmspTopCk', 'change', function( _evt ){
            +                    var _sp = $( this ), _id = _sp.val();
            +                    _p._view.topCk( _id, _sp.prop( 'checked' ) );
            +
            +                    _sp.prop( 'checked' ) && _p.trigger( 'initChildBox', [ _id ] );
            +                });
            +
            +                _panel.layout().delegate( 'input.js_bmspChildCk', 'change', function( _evt ){
            +                    var _sp = $( this ), _id = _sp.val(), _parentid = _sp.data( 'parentid' );
            +                    _p._view.childCk( _parentid, _id );
            +                });
            +
            +                _p.on( 'updateStatus', function( _evt ){
            +                    var _cked = _panel.find( 'input.js_bmspChildCk:checked' );
            +                    if( _cked.length ){
            +                        _p.selector().val( JC.f.printf( _p._model.hasItemText(), _cked.length ) );
            +                    }else{
            +                        _p.selector().val( _p._model.noItemText() );
            +                    }
            +
            +                    _p.trigger( 'saveParentId' );
            +                });
            +
            +                _p.on( 'saveParentId', function( _evt ){
            +                    var _idSelector = _p._model.saveTopIdSelector();
            +                    if( _idSelector && _idSelector.length ){
            +                        var _pCk = _p._model.panelIns().find( 'input.js_bmspTopCk:checked' )
            +                            , _cCk = _p._model.panelIns().find( 'input.js_bmspChildCk:checked' )
            +                            , _tmp = {}
            +                            , _r = []
            +                            ;
            +
            +                        _pCk.each( function(){
            +                            var _id = $( this ).val();
            +
            +                            if( !( _id in _tmp ) ){
            +                                _r.push( _id );
            +                            }
            +                            _tmp[ _id ] = '';
            +                        });
            +
            +                        _cCk.each( function(){
            +                            var _id = $( this ).data( 'parentid' );
            +                            if( !( _id in _tmp ) ){
            +                                _r.push( _id );
            +                            }
            +                            _tmp[ _id ] = '';
            +                        });
            +
            +                        _idSelector.val( _r.join(',') );
            +                    }
            +                    
            +                });
            +
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'MultiselectPanel _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +    });
            +
            +    MultiselectPanel.Model._instanceName = 'JCMultiselectPanel';
            +    JC.f.extendObject( MultiselectPanel.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'MultiselectPanel.Model.init:', new Date().getTime() );
            +            }
            +
            +        , url: function(){ return this.attrProp( 'bmspUrl' ); }
            +        , childUrl: function(){ return this.attrProp( 'bmspChildUrl' ); }
            +        , popupHideButton: function(){ return this.boolProp( 'bmspPopupHideButton'); }
            +        , panel: function(){ return this.selectorProp( 'bmspPanel'); }
            +        , panelIns: 
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._panelIns = _setter );
            +                return this._panelIns;
            +            }
            +        , panelBoxSelector: function(){ return this.panelIns().find( this.attrProp( 'bmspPanelBoxSelector' ) || 'js_bmspPanelBox' ); }
            +        , topTpl: function(){ return this.scriptTplProp( 'bmspTopTpl' ) }
            +        , childTpl: function(){ return this.scriptTplProp( 'bmspChildTpl' ) }
            +        , childBox: function( _selector ){ return _selector.find( '.js_bmspChildBox' ); } 
            +
            +        , openClass: function(){ return this.attrProp( 'bmspOpenClass' ); } 
            +        , closeClass: function(){ return this.attrProp( 'bmspCloseClass' ); } 
            +
            +        , openSelector: function(){ return this.selectorProp( '.' + this.openClass() ); } 
            +        , closeSelector: function(){ return this.selectorProp( '.' + this.closeClass() ); } 
            +
            +        , saveTopIdSelector: function(){ return this.selectorProp( 'bmspSaveTopIdSelector'); }
            +
            +        , initTop:
            +            function(){
            +                var _p = this, _data;
            +                $.get( _p.url() ).done( function( _d ){
            +                    _data = $.parseJSON( _d );
            +                    _data 
            +                        && !_data.errorno 
            +                        && _data.data 
            +                        && _p.trigger( 'updateTop', [ _data.data, _d ] );
            +                });
            +            }
            +
            +        , initChild:
            +            function( _id ){
            +                var _p = this, _data;
            +                $.get( JC.f.printf( _p.childUrl(), _id ) ).done( function( _d ){
            +                   _data = $.parseJSON( _d );
            +                    _data 
            +                        && !_data.errorno 
            +                        && _data.data 
            +                        && _p.trigger( 'updateChild', [ _id, _data.data, _d ] );
            +                });
            +            }
            +
            +        , getChildBox: function( _id ){
            +            return this.panelIns().find( JC.f.printf( '.js_bmspChildBox[data-id={0}]', _id ) );
            +        }
            +
            +        , getIcon: function( _id ){
            +            return this.panelIns().find( JC.f.printf( '.js_bmspIcon[data-id={0}]', _id ) );
            +        }
            +
            +        , getCkItem: function( _id ){
            +             return this.panelIns().find( JC.f.printf( 'input.js_bmspCkItem[value={0}]', _id ) );
            +        }
            +
            +        , noItemText: function(){ return this.attrProp( 'bmspNoItemText' ); }
            +        , hasItemText: function(){ return this.attrProp( 'bmspHasItemText' ); }
            +
            +    });
            +
            +    JC.f.extendObject( MultiselectPanel.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'MultiselectPanel.View.init:', new Date().getTime() );
            +            }
            +
            +        , buildTop:
            +            function( _data ){
            +                var _p = this
            +                    , _box = _p._model.panelBoxSelector()
            +                    , _tpl = _p._model.topTpl()
            +                    , _r = []
            +                    ;
            +    
            +                $.each( _data, function( _ix, _item ){
            +                    _r.push( JC.f.printf( _tpl, _item[0], _item[1] ) );
            +                });
            +
            +                _box.html( _r.join('') );
            +            }
            +
            +        , buildChild:
            +            function( _id, _data ){
            +               var _p = this
            +                    , _box = _p._model.getChildBox( _id )
            +                    , _tpl = _p._model.childTpl()
            +                    , _r = []
            +                    ;
            +
            +                $.each( _data, function( _ix, _item ){
            +                    _r.push( JC.f.printf( _tpl, _item[0], _item[1], _id ) );
            +                });
            +
            +                _box.html( _r.join('') );
            +            }
            +
            +        , showChild:
            +            function( _id ){
            +                this._model.getChildBox( _id ).show();
            +            }
            +
            +        , hideChild:
            +            function( _id ){
            +                this._model.getChildBox( _id ).hide();
            +            }
            +
            +        , topCk:
            +            function( _id, _checked ){
            +                var _childBox = this._model.getChildBox( _id );
            +                _childBox.find( 'input.js_bmspChildCk' ).prop( 'checked', _checked );
            +            }
            +
            +        , childCk:
            +            function( _parentid, _id ){
            +                var _p = this
            +                    , _childBox = this._model.getChildBox( _parentid )
            +                    , _allCk = _p._model.getCkItem( _parentid )
            +                    ;
            +                if( _childBox.find( 'input.js_bmspChildCk:not(:checked)' ).length ){
            +                    _allCk.prop( 'checked', false );
            +                }else{
            +                    _allCk.prop( 'checked', true );
            +                }
            +            }
            +    });
            +
            +    _jwin.on( 'BMSP_AUTO_FILL_DEFAULT_DATA', function( _evt, _sp ){
            +        var _topKey, _childKey, _data;
            +        if( !( _sp && _sp.length 
            +                && _sp.attr( 'bmspDefaultFillData' ) 
            +                && ( _data = window[ _sp.attr( 'bmspDefaultFillData' ) ] ) ) 
            +                && _data.parents
            +        ){
            +            return;
            +        }
            +        _jwin.trigger( 'BMSP_AUTO_FILL', [ _sp, _data.parents, _data.children ] );
            +    });
            +
            +    _jwin.on( 'BMSP_AUTO_FILL_URL_DATA', function( _evt, _sp ){
            +        var _topKey, _childKey;
            +
            +        if( !( _sp.attr( 'bmspAutoFillTopKey' ) 
            +                && ( _topKey = JC.f.getUrlParams( _sp.attr( 'bmspAutoFillTopKey' ) ) ) && _topKey.length ) 
            +        ){
            +            return;
            +        }
            +        _topKey = decodeURIComponent( _topKey ).split( ',' );
            +        _childKey = JC.f.getUrlParams( _sp.attr( 'bmspAutoFillChildKey' ) );
            +
            +        _jwin.trigger( 'BMSP_AUTO_FILL', [ _sp, _topKey, _childKey ] );
            +    });
            +
            +    _jwin.on( 'BMSP_AUTO_FILL', function( _evt, _sp, _topKey, _childKey ){
            +        if( !( _sp && _sp.length && _topKey && _topKey.length ) ) return;
            +        var _cTopKey, _ins;
            +        _ins = JC.BaseMVC.getInstance( _sp, Bizs.MultiselectPanel ) || new Bizs.MultiselectPanel( _sp );
            +        _cTopKey = _topKey.slice();
            +        _ins.on( 'updateTop', function(){
            +            if( _topKey.length ){
            +                var _id = _topKey.shift();
            +                _ins.trigger( 'initChildBox', [ _id ] )
            +                _ins._model.getIcon( _id ).trigger( 'click' );
            +
            +                _ins.on( 'updateChild', function(){
            +                    if( _topKey.length ){
            +                        _id = _topKey.shift();
            +                        _ins.trigger( 'initChildBox', [ _id ] );
            +                        _ins._model.getIcon( _id ).trigger( 'click' );
            +                    }else if( _cTopKey.length ){
            +                        if( _childKey && _childKey.length ){
            +                            _childKey && _childKey.length 
            +                                && $.each( _childKey, function( _ix, _item ){
            +                                    _ins._model.getCkItem( _item ).prop( 'checked', true );
            +                                });
            +
            +                            $.each( _cTopKey, function( _ix, _item ){
            +                                _ins._view.childCk( _item );
            +                            });
            +
            +                            _ins.trigger( 'updateStatus' );
            +                        }
            +                        _cTopKey = [];
            +                    }
            +                });
            +            }
            +        });
            +
            +    });
            +
            +    _jdoc.ready( function(){
            +
            +        //Bizs.MultiselectPanel.autoInit && Bizs.MultiselectPanel.init();
            +
            +        _jdoc.delegate( 'input.js_bizMultiselectPanel', 'click', function( _evt ){
            +            var _sp = $( this ), _ins;
            +            if( !JC.BaseMVC.getInstance( _sp, Bizs.MultiselectPanel ) ){
            +                _ins = new Bizs.MultiselectPanel( _sp );
            +                _ins._model.panelIns().show( _sp );
            +            }
            +        });
            +
            +        //return;
            +
            +        $( 'input.js_bizMultiselectPanel' ).each( function(){
            +            var _sp = $( this )
            +
            +            if( _sp.attr( 'bmspDefaultFillData' ) && window[ _sp.attr( 'bmspDefaultFillData' ) ] ){
            +                _jwin.trigger( 'BMSP_AUTO_FILL_DEFAULT_DATA', [ _sp ] );
            +            }else if( _sp.attr( 'bmspAutoFillTopKey' ) ){
            +                _jwin.trigger( 'BMSP_AUTO_FILL_URL_DATA', [ _sp ] );
            +            }
            +        });
            +
            +    });
            +
            +
            +    return Bizs.MultiselectPanel;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._bizs_TaskViewer_TaskViewer.js.html b/docs_api/files/.._bizs_TaskViewer_TaskViewer.js.html new file mode 100644 index 000000000..8828bd8cb --- /dev/null +++ b/docs_api/files/.._bizs_TaskViewer_TaskViewer.js.html @@ -0,0 +1,669 @@ + + + + + ../bizs/TaskViewer/TaskViewer.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../bizs/TaskViewer/TaskViewer.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +    /**
            +     * TaskViewer 日历任务展示面板
            +     *
            +     *<p><b>require</b>:
            +     *   <a href="widnow.jQuery.html">jQuery</a>
            +     *   , <a href="JC.common.html">JC.common</a>
            +     *   , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *</p>
            +     *
            +     *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     *   | <a href='http://jc2.openjavascript.org/docs_api/classes/Bizs.TaskViewer.html' target='_blank'>API docs</a>
            +     *   | <a href='../../modules/Bizs.TaskViewer/0.1/_demo' target='_blank'>demo link</a></p>
            +     *  
            +     *<h2>页面只要引用本文件, 默认会自动初始化class="js_COMPTaskViewer"下的日期</h2>
            +     *
            +     *
            +     *<h2>可用的 HTML attribute</h2>
            +     *<dl>
            +     *<dt>taskselecteddates = selector</dt>
            +     *<dd>指定选定的日期标签</dd>
            +     *<dt>taskdeleteddates = selector</dt>
            +     *<dd>指定删除的日期标签</dd>
            +     *<dt>tasknewaddeddates = selector</dt>
            +     *<dd>指定新增的日期标签</dd>
            +     *</dl>
            +     *
            +     * @namespace window.Bizs
            +     * @class TaskViewer
            +     * @extends JC.BaseMVC
            +     * @constructor
            +     * @param   {selector|string}   _selector   
            +     * @version 0.1 2014-04-17
            +     * @author  zuojing   <zuojing1013@gmail.com> | 75 Team
            +    */
            +    window.Bizs.TaskViewer = TaskViewer;
            +    JC.f.addAutoInit && JC.f.addAutoInit( TaskViewer );
            +    
            +    function TaskViewer( _selector ){
            +        _selector && (_selector = $(_selector) );
            +        
            +        if (TaskViewer.getInstance(_selector))
            +            return TaskViewer.getInstance(_selector);
            +
            +        TaskViewer.getInstance(_selector, this);  
            +
            +        this._model = new TaskViewer.Model(_selector);
            +        this._view = new TaskViewer.View(this._model);
            +        this._init();
            +    }
            +
            +    /**
            +     * 获取或设置 TaskViewer 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {TaskViewerInstance}
            +     */
            +    TaskViewer.getInstance = function ( _selector, _setter ) {
            +        if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +            _selector = $(_selector);
            +        if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +        typeof _setter != 'undefined' && _selector.data( TaskViewer.Model._instanceName, _setter );
            + 
            +        return _selector.data( TaskViewer.Model._instanceName );
            +    };
            +
            +    /**
            +     * 初始化可识别的 TaskViewer 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of TaskViewerInstance}
            +     */
            +    TaskViewer.init = function ( _selector ) {
            +        var _r = [];
            +        
            +        _selector = $( _selector || document );
            + 
            +        if ( _selector.length ) {
            +            if ( _selector.hasClass('js_COMPTaskViewer') ) {
            +                _r.push( new TaskViewer(_selector) );
            +            } else {
            +                _selector.find('.js_COMPTaskViewer').each( function() {
            +                    _r.push( new TaskViewer( this ) );
            +                });
            +            }
            +        }
            +        
            +        return _r;
            +    };
            +
            +    BaseMVC.build( TaskViewer, 'Bizs' );
            +    
            +    JC.f.extendObject( TaskViewer.prototype, {
            +        _beforeInit: function () {
            +            this._model.allMonths = {};
            +            this._model.allDays = {};
            +        },
            +
            +        _initHanlderEvent: function () {
            +            JC.log( 'TaskViewer _initHanlderEvent', new Date().getTime() );
            +            var p = this;
            +    
            +            p._model.getAllDates();
            +
            +            p._view.layout();
            +
            +        },
            +
            +        _inited:function () {
            +
            +            
            +        }
            +    });
            +
            +    TaskViewer.Model._instanceName = 'TaskViewer';
            +    
            +    JC.f.extendObject( TaskViewer.Model.prototype, {
            +
            +        init: function () {
            +
            +        },
            +
            +        selectedDates: function () {
            +            var p = this,
            +                selector = p.attrProp('taskselecteddates'),
            +                $el;
            +
            +            $el = p.selector().find(selector);
            +            $el.length && p.dates($el, 'selected');
            +        },
            +
            +        delDates: function () {
            +            var p = this,
            +                selector = p.attrProp('taskdeleteddates'),
            +                $el;
            +
            +            $el = p.selector().find(selector);
            +            $el.length && p.dates($el, 'deleted');
            +        },
            +
            +        newAddDates: function () {
            +            var p = this,
            +                selector = p.attrProp('tasknewaddeddates'),
            +                $el;
            +
            +            $el = p.selector().find(selector);
            +            $el.length && p.dates($el, 'added');
            +           
            +        },
            +
            +        dates: function ($date, type) {
            +            var p = this,
            +                temp = [];
            +
            +            $date.each( function () {
            +                temp.push($(this).text().replace( /[^\d\-,]/g, '' ));
            +            });
            +
            +            $.each(temp, function (ix, item) {
            +                var key,
            +                    obj = {}, 
            +                    tempList = [];
            +
            +                item = item.replace( /[^\d]/g, '' );
            +                key = item.slice(0, 6);
            +
            +                if (item.length === 8) {
            +                    obj = {
            +                        'start': item,
            +                        'end': item,
            +                        'type': type
            +                    }
            +                }
            +
            +                if (item.length === 16) {
            +                    obj = {
            +                        'start': item.slice(0, 8),
            +                        'end': item.slice(8),
            +                        'type': type
            +                    };
            +                }
            +
            +                if ( !(key in p.allMonths) ) {
            +                    p.allMonths[key] = obj.start;
            +                    p.allDays[key] = [];
            +                } 
            +
            +                tempList.push(obj);
            +                p.allDays[key] = p.allDays[key].concat(tempList);
            +                
            +            });
            +
            +        },
            +
            +        getAllDates: function () {
            +            var p = this;
            +
            +            p.selectedDates();
            +            p.delDates();
            +            p.newAddDates();
            +        },
            +
            +        buildHeaderTpl: function (l) {
            +            var cnWeek = '日一二三四五六',
            +                i = 0,
            +                tpl = '<tr><th class="COMP_task_view_counter">已选天数</th><th style="width:80px; height:30px; padding:0!important;">'
            +                            + '<div class="COMP_task_view_slash">'
            +                                + '<b>星期</b>'
            +                                + '<em>日期</em>'
            +                            + '</div>'
            +                        + '</th>',
            +                style = '';
            +
            +            for ( i = 0; i < l; i++ ) {
            +                
            +                if ( i % 7 === 0 || i % 7 === 6 ) {
            +                    style = 'weekend';
            +                }  else {
            +                    style = '';
            +                }
            +
            +                tpl += '<th class="' + style + '">' + cnWeek.charAt(i % 7) + '</th>';
            +            }
            +            
            +            tpl += '</tr>'
            +            return tpl;
            +        },
            +
            +        buildMonthTpl: function () {
            +            var p = this,
            +                key,
            +                d,
            +                i,
            +                month,
            +                year,
            +                tempD,
            +                maxDay,
            +                day,
            +                placeholder = '',
            +                tpl = '';
            +
            +            for ( key in p.allMonths ) {
            +                d = JC.f.dateDetect(p.allMonths[key]);
            +                year = d.getFullYear();
            +                month = d.getMonth();
            +                maxDay = JC.f.maxDayOfMonth(d);
            +                placeholder = '';
            +                day = new Date(year, month, 1).getDay();      
            +                while(day--) {
            +                    placeholder += '<td>&nbsp;</td>'
            +                    if( day <= 0 ) break;
            +                }
            +                tpl += '<tr class="' + key + '"><td class="COMP_task_view_counter">&nbsp;</td><td class="COMP_task_view_date">' + year + '年' + (month + 1) + '月' +'</td>' + placeholder;
            +                for ( i = 1; i <= maxDay; i++) {
            +                    tempD = new Date(year, month, i);
            +                    tpl += '<td class="date" data-date="' + JC.f.formatISODate(tempD) + '" title="' + JC.f.formatISODate(tempD) + '">' + i +'</td>'
            +                }
            +                tpl += '</tr>';
            +            }
            +
            +            return '<tbody>' + tpl + '</tbody>'
            +        },
            +
            +        allDays: {},
            +
            +        allMonths: {}
            +    
            +    });
            +
            +    JC.f.extendObject( TaskViewer.View.prototype, {
            +        init: function () {
            +            return this;
            +        },
            +
            +        layout: function () {
            +            var p = this,
            +                tpl = '<table class="COMP_task_view"><thead></thead>',
            +                l ;
            +
            +            tpl = tpl + p._model.buildMonthTpl();
            +            p._model.selector().append(tpl);
            +            l = p.fixLayout();
            +            p._model.selector().find('.COMP_task_view>thead').append(p._model.buildHeaderTpl(l));
            +
            +            p.setSelected();
            +        },
            +
            +        fixLayout: function () {
            +            var p = this,
            +                trs = p.selector().find('.COMP_task_view>tbody>tr'),
            +                max = 0,
            +                len = [];
            +
            +            trs.each(function () {
            +                len.push($(this).find('td').length);
            +            });
            +
            +            
            +            max = Math.max.apply(Math, len);
            +
            +            trs.each( function (ix) {
            +                var sp = $(this),
            +                    l = sp.find('td').length,
            +                    i = 0,
            +                    placeholder = '';
            +                
            +                if ( max > l ) {
            +                    i = max - l;
            +                    while (i--) {
            +                        placeholder += '<td>&nbsp;</td>';
            +                    }
            +                    sp.append(placeholder);
            +                }
            +
            +            });
            +            
            +            return max - 2;
            +        },
            +
            +        setSelected: function () {
            +            var p = this,
            +                allDays = p._model.allDays,
            +                selector = p._model.selector(),
            +                pnt = selector.find('.COMP_task_view>tbody'),
            +                tds = pnt.find('.date'),
            +                trs = pnt.find('tr'),
            +                key;
            +            
            +            $.each(allDays, function (ix, item) {
            +                var selected = 0,
            +                    added = 0,
            +                    deleted = 0,
            +                    update = 0,
            +                    defaut = 0,
            +                    text = '',
            +                    $tr = pnt.find('tr.' + ix);
            +
            +                $.each(item, function (subix, subitem) {
            +                    var start = JC.f.dateDetect(subitem['start']).getTime(),
            +                        end = JC.f.dateDetect(subitem['end']).getTime(),
            +                        style = subitem['type'];
            +                    
            +                    $tr.find('.date').each ( function () {
            +                        var sp = $(this),
            +                            
            +                            d = JC.f.dateDetect(sp.data('date')).getTime();
            +
            +                        if (d >= start && d <= end) {
            +                            sp.addClass(style);
            +                        }
            +
            +                    });
            +
            +                    selected = $tr.find('.selected').length;
            +                    added = $tr.find('.added').length;
            +                    deleted = $tr.find('.deleted').length;
            +                    defaut = selected + deleted;
            +                    update = defaut + added - deleted;
            +
            +                    if (added || deleted) {
            +                        text = '<span class="updatedDays">' + update + '天</span>' 
            +                            + '<span class="defaultDays">' + defaut + '天</span>';
            +                    } else {
            +                        text = '<span>' + selected + '天</span>';
            +                    }
            +
            +                    $tr.find('td').eq(0).html(text); 
            +
            +                });
            +
            +            });
            +    
            +        }
            +    } );
            +    
            +    $(document).ready( function () {
            +        var _insAr = 0;
            + 
            +        TaskViewer.autoInit && ( _insAr = TaskViewer.init() );
            +            
            +    });
            + 
            +  
            +    return Bizs.TaskViewer;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._common.js.html b/docs_api/files/.._common.js.html new file mode 100644 index 000000000..89f122517 --- /dev/null +++ b/docs_api/files/.._common.js.html @@ -0,0 +1,1947 @@ + + + + + ../common.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../common.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( 'JC.common', [], function(){
            +    window.JWIN = window.JWIN || $( window );
            +    window.JDOC = window.JDOC || $( document );
            +    /**
            +     * 如果 console 不可用, 生成一个模拟的 console 对象
            +     */
            +    !window.console && ( window.console = { 
            +        log: function(){ window.status = sliceArgs( arguments ).join(' '); }
            +    });
            +    !console.dir && (
            +        console.dir = function(){}
            +    );
            +    !console.error && (
            +        console.error = function(){}
            +    );
            +    /**
            +     * 声明主要命名空间, 方便迁移
            +     */
            +    window.JC = window.JC || {};
            +    JC.log = function(){ JC.debug && console.log( sliceArgs( arguments ).join(' ') ); };
            +    JC.dir = function(){ 
            +        JC.debug && $.each( sliceArgs( arguments ), function( _ix, _item ){ console.dir( _item )} );
            +    };
            +    JC.error = function(){ 
            +        JC.debug && $.each( sliceArgs( arguments ), function( _ix, _item ){ console.error( _item )} );
            +    };
            +    JC.clear = function(){ 
            +        console.clear && console.clear();
            +    };
            +
            +    JC.PATH = JC.PATH || scriptPath();
            +
            +    window.Bizs = window.Bizs || {};
            +    /**
            +     * JC.f 是 JC.common 的别名
            +     * <br />具体使用请见 <a href='JC.common.html'>JC.common</a></p>
            +     * @class JC.f
            +     * @static
            +     */
            +    /**
            +     * JC 组件通用静态方法和属性 ( JC.common, <b>别名: JC.f</b> )
            +     * <br />所有 JC 组件都会依赖这个静态类
            +     * <p><b>require</b>: <a href='.jQuery.html'>jQuery</a></p>
            +     * <p><a  href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.common.html' target='_blank'>API docs</a>
            +     * @class JC.common
            +     * @static
            +     * @version dev 0.3 2014-12-09
            +     * @version dev 0.2 2013-11-06 
            +     * @version dev 0.1 2013-07-04
            +     * @author  qiushaowei   <suches@btbtd.org> | 360 75 Team
            +     */
            +    JC.common = JC.f = {
            +        "addUrlParams": addUrlParams
            +        , "cloneDate": cloneDate
            +        , "dateDetect": dateDetect
            +        , "delUrlParam": delUrlParam
            +        , "delUrlParams": delUrlParams
            +        , "easyEffect": easyEffect
            +        , "filterXSS": filterXSS
            +        , "formatISODate": formatISODate
            +        , "funcName": funcName
            +        , "getJqParent": getJqParent
            +
            +        , "getUrlParam": getUrlParam
            +        , "getUrlParams": getUrlParams
            +        , "hasUrlParam": hasUrlParam
            +        , 'urlHostName': urlHostName
            +        , "httpRequire": httpRequire
            +        , "isSameDay": isSameDay
            +        , "isSameWeek": isSameWeek
            +        , "isSameMonth": isSameMonth
            +        , "isSameSeason": isSameSeason
            +        , "isSameYear": isSameYear
            +        , "weekOfYear": weekOfYear
            +        , "seasonOfYear": seasonOfYear
            +        , "dayOfWeek": dayOfWeek
            +        , "dayOfSeason": dayOfSeason
            +        , "jcAutoInitComps": autoInit
            +
            +        , "autoInit": autoInit
            +        , "addAutoInit": addAutoInit
            +        /**
            +         * 保存需要自动识别的组件
            +         * @property    _AUTO_INIT_DATA
            +         * @type Object
            +         * @protected
            +         */
            +        , "_AUTO_INIT_DATA": {}
            +
            +        , "maxDayOfMonth": maxDayOfMonth
            +        , "mousewheelEvent": mousewheelEvent
            +        , "padChar": padChar
            +        , "parentSelector": parentSelector
            +        , "parseBool": parseBool
            +        , "parseFinance": parseFinance
            +        , "parseISODate": parseISODate
            +        , "parseDate": parseDate
            +        , "printf": printf
            +        , "printKey": printKey
            +        , "cloneObject": cloneObject
            +
            +        , "pureDate": pureDate
            +        , "reloadPage": reloadPage
            +        , "removeUrlSharp": removeUrlSharp
            +        , "relativePath": relativePath
            +        , "scriptContent": scriptContent
            +        , "scriptPath": scriptPath
            +        , "sliceArgs": sliceArgs
            +        , "urlDetect": urlDetect
            +        , "moneyFormat": moneyFormat
            +        , "dateFormat": dateFormat
            +        , "extendObject": extendObject
            +        , "safeTimeout": safeTimeout
            +        , "encoder": encoder
            +        , "fixPath": fixPath
            +        , "arrayId": arrayId
            +        , "docSize": docSize
            +        , "winSize": winSize
            +        , "gid": gid
            +
            +        /**
            +         * 判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数
            +         */
            +        , "backward":
            +            function( _setter ){
            +                if( window.JC_BACKWARD || _setter ){
            +                    for( var k in JC.common ){
            +                        if( k == 'backward' ) continue;
            +                        window[ k ] = window[ k ] || JC.common[ k ];
            +                    }
            +                }
            +            }
            +        , "has_url_param": hasUrlParam
            +        , "add_url_params": addUrlParams
            +        , "get_url_param": getUrlParam
            +        , "del_url_param": delUrlParam
            +        , "reload_page": reloadPage
            +        , "parse_finance_num": parseFinance
            +        , "pad_char_f": padChar
            +        , "script_path_f": scriptPath
            +        , "ts": function(){ return new Date().getTime(); }
            +    };
            +    JC.f.backward();
            +    /**
            +     * jquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法
            +     */
            +    !String.prototype.trim && ( String.prototype.trim = function(){ return $.trim( this ); } );
            +    /**
            +     * 兼容 低版本 ie Array 的 indexOf 方法
            +     */
            +    !Array.prototype.indexOf 
            +        && ( Array.prototype.indexOf =
            +            function( _v ){
            +                var _r = -1;
            +                $.each( this, function( _ix, _item ){
            +                    if( _item == _v ){
            +                        _r = _ix;
            +                        return false;
            +                    }
            +                });
            +                return _r;
            +            });
            +
            +    !Array.prototype.first 
            +        && ( Array.prototype.first = 
            +            function(){
            +                var _r;
            +                this.length && ( _r = this[0] );
            +                return _r;
            +        });
            +
            +    !Array.prototype.last
            +        && ( Array.prototype.last = 
            +            function(){
            +                var _r;
            +                this.length && ( _r = this[ this.length - 1] );
            +                return _r;
            +        });
            +
            +    /**
            +     * 全局 css z-index 控制属性
            +     * <br /> <b>注意</b>: 这个变量是 window.ZINDEX_COUNT
            +     * @property    ZINDEX_COUNT
            +     * @type        int
            +     * @default     50001
            +     * @static
            +     */
            +    window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001;
            +
            +    function fixPath( _url ){
            +        if( /\\/.test( _url ) ){
            +            _url = _url.replace( /[\\]+/g, '\\' );
            +        }else{
            +            _url = _url.replace( /[\/]+/g, '/' );
            +        }
            +        return _url;
            +    }
            +    /**
            +     * 一维数组去重
            +     * @method  arrayId
            +     * @param   {Array}     _ar
            +     * @return Array
            +     * @static
            +     */
            +    function arrayId( _ar ){
            +        var _r = [], _k = {};
            +        
            +        for( var i = 0, j = _ar.length; i < j; i++ ){
            +            if( !(_ar[i] in _k) ){
            +                _r.push( _ar[i] );
            +                _k[ _ar[i] ] = _ar[i];
            +            }
            +        }
            +        
            +        return _r;
            +    }
            +    /**
            +     * 生成全局唯一ID
            +     * @method  gid
            +     * @return string
            +     * @static
            +     */
            +    function gid(){
            +        return 'jc_gid_' + JC.f.ts() + '_' + (JC.GID_COUNT++);
            +    }
            +    JC.GID_COUNT = 1;
            +
            +    /**
            +     * 把函数的参数转为数组
            +     * @method  sliceArgs
            +     * @param   {arguments}     args
            +     * @return Array
            +     * @static
            +     */
            +    function sliceArgs( _arg ){
            +        var _r = [], _i, _len;
            +        for( _i = 0, _len = _arg.length; _i < _len; _i++){
            +            _r.push( _arg[_i] );
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 取 URL 的 host name
            +     * @method  urlHostName
            +     * @param   {string}    _url
            +     * @return  string
            +     * @static
            +     */
            +    function urlHostName( _url ){
            +        var _r = '', _url = _url || location.href;
            +        if( /\:\/\//.test( _url ) ){
            +            _url.replace( /^.*?\:\/\/([^\/]+)/, function( $0, $1 ){
            +                _r = $1;
            +            });
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 把 URL 相对路径 转换为 绝对路径
            +     * @method  relativePath
            +     * @param   {string}    _path
            +     * @param   {string}    _url
            +     * @return  string
            +     * @static
            +     */
            +    function relativePath( _path, _url ){
            +        _url = _url || document.URL;
            +        _url = _url.replace(/^.*?\:\/\/[^\/]+/, "").replace(/[^\/]+$/, "");
            +        if(!_path){return _url;}  
            +        if(!/\/$/.test(_url)){_url += "/";}
            +
            +        if(/(^\.\.\/|^\.\/)/.test(_path)){
            +            var Re = new RegExp("^\\.\\.\\/"), iCount = 0;    
            +            while(Re.exec(_path)!=null){
            +                _path = _path.replace(Re, "");
            +                iCount++;
            +            }       
            +            for(var i=0; i<iCount; i++){_url = _url.replace(/[^\/]+\/$/, "");}    
            +            if(_url=="") return "/";  
            +            _path = _path.replace(/^\.\//, ""); 
            +            _path.replace( /\/\/$/, '/' );
            +            return _url+_path;
            +        }   
            +        return _path;
            +    }
            +     /**
            +     * 按格式输出字符串
            +     * @method printf
            +     * @static
            +     * @param   {string}    _str
            +     * @return  string
            +     * @example
            +     *      printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
            +     *      //return asdfasdf000sdfasdf1111
            +     */
            +    function printf( _str ){
            +        for(var i = 1, _len = arguments.length; i < _len; i++){
            +            _str = _str.replace( new RegExp('\\{'+( i - 1 )+'\\}', 'g'), arguments[i] );
            +        }
            +        return _str;
            +    }
            +     /**
            +     * 按格式输出字符串
            +     * @method printKey
            +     * @static
            +     * @param   {string}    _str
            +     * @param   {object}    _keys
            +     * @return  string
            +     * @example
            +     *      JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );
            +     *      //return asdfasdf000sdfasdf1111,222
            +     */
            +    function printKey( _str, _keys ){
            +        for( var k in _keys ){
            +            _str = _str.replace( new RegExp('\\{'+( k )+'\\}', 'g'), _keys[k] );
            +        }
            +        return _str;
            +    }
            +
            +    /**
            +     * 判断URL中是否有某个get参数
            +     * @method  hasUrlParam
            +     * @param   {string}    _url
            +     * @param   {string}    _key
            +     * @return  bool
            +     * @static
            +     * @example
            +     *      var bool = hasUrlParam( 'getkey' );
            +     */
            +    function hasUrlParam( _url, _key ){
            +        var _r = false;
            +        if( !_key ){ _key = _url; _url = location.href; }
            +        if( /\?/.test( _url ) ){
            +            _url = _url.split( '?' ); _url = _url[ _url.length - 1 ];
            +            _url = _url.split('&');
            +            for( var i = 0, j = _url.length; i < j; i++ ){
            +                if( _url[i].split('=')[0].toLowerCase() == _key.toLowerCase() ){ _r = true; break; };
            +            }
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 添加URL参数
            +     * <br /><b>require:</b> delUrlParam, filterXSS
            +     * @method  addUrlParams
            +     * @param   {string}    _url
            +     * @param   {object}    _params
            +     * @return  string
            +     * @static
            +     * @example
            +            var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );
            +     */ 
            +    function addUrlParams( _url, _params ){
            +        var sharp = '';
            +        !_params && ( _params = _url, _url = location.href );
            +        _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] );
            +        for( var k in _params ){
            +            _url = delUrlParam(_url, k);
            +            _url.indexOf('?') > -1 
            +                ? _url += '&' + k +'=' + _params[k]
            +                : _url += '?' + k +'=' + _params[k];
            +        }
            +        sharp && ( _url += '#' + sharp );
            +        _url = filterXSS( _url.replace(/\?\&/g, '?' ) );
            +        return _url;   
            +
            +    }
            +    /**
            +     * xss 过滤函数
            +     * @method filterXSS
            +     * @param   {string}    _s
            +     * @return string
            +     * @static
            +     */
            +    function filterXSS( _s ){
            +        _s && (
            +            _s = _s
            +                    .replace( /</g, '&lt;' )
            +                    .replace( />/g, '&gt;' )
            +        );
            +        return _s;
            +    }
            +    /**
            +     * 取URL参数的值
            +     * <br /><b>require:</b> filterXSS
            +     * @method  getUrlParam
            +     * @param   {string}    _url
            +     * @param   {string}    _key
            +     * @return  string
            +     * @static
            +     * @example
            +            var defaultTag = getUrlParam(location.href, 'tag');  
            +     */ 
            +    function getUrlParam( _url, _key ){
            +        var _r = '', _ar, i, _items;
            +        !_key && ( _key = _url, _url = location.href );
            +        _url.indexOf('#') > -1 && ( _url = _url.split('#')[0] );
            +        if( _url.indexOf('?') > -1 ){
            +            _ar = _url.split('?')[1].split('&');
            +            for( i = 0; i < _ar.length; i++ ){
            +                _items = _ar[i].split('=');
            +                _items[0] = decodeURIComponent( _items[0] || '' ).replace(/^\s+|\s+$/g, '');
            +                if( _items[0].toLowerCase() == _key.toLowerCase() ){
            +                    _r = filterXSS( _items[1] || '' );
            +                    break;
            +                } 
            +            }
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 取URL参数的值, 这个方法返回数组
            +     * <br />与 getUrlParam 的区别是可以获取 checkbox 的所有值
            +     * <br /><b>require:</b> filterXSS
            +     * @method  getUrlParams
            +     * @param   {string}    _url
            +     * @param   {string}    _key
            +     * @return  Array
            +     * @static
            +     * @example
            +            var params = getUrlParams(location.href, 'tag');  
            +     */ 
            +    function getUrlParams( _url, _key ){
            +        var _r = [], _params, i, j, _items;
            +        !_key && ( _key = _url, _url = location.href );
            +        _url = _url.replace(/[\?]+/g, '?').split('?');
            +        if( _url.length > 1 ){
            +            _url = _url[1];
            +            _params = _url.split('&');
            +            if( _params.length ){
            +                for( i = 0, j = _params.length; i < j; i++ ){
            +                    _items = _params[i].split('=');
            +                    _items[0] = decodeURIComponent( _items[0] ) || '';
            +                    if( _items[0].trim() == _key ){
            +                        _r.push( filterXSS( _items[1] || '' ) );
            +                    }
            +                }
            +            }
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 删除URL参数
            +     * <br /><b>require:</b> filterXSS
            +     * @method  delUrlParam
            +     * @param  {string}    _url
            +     * @param  {string}    _key
            +     * @return  string
            +     * @static
            +     * @example
            +            var url = delUrlParam( location.href, 'tag' );
            +     */ 
            +    function delUrlParam( _url, _key ){
            +        var sharp = '', params, tmpParams = [], i, item;
            +        !_key && ( _key = _url, _url = location.href );
            +        _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] );
            +        if( _url.indexOf('?') > -1 ){
            +            params = _url.split('?')[1].split('&');
            +            _url = _url.split('?')[0];
            +            for( i = 0; i < params.length; i++ ){
            +                var items = params[i].split('=');
            +                items[0] = items[0].replace(/^\s+|\s+$/g, '');
            +                if( items[0].toLowerCase() == _key.toLowerCase() ) continue;
            +                tmpParams.push( items.join('=') )
            +            }
            +            _url += '?' + tmpParams.join('&');
            +        }
            +        sharp && ( _url += '#' + sharp );
            +       _url = filterXSS( _url );
            +        return _url;
            +    }
            +    /**
            +     * 批量删除URL参数
            +     * <br /><b>require:</b> delUrlParam
            +     * @method  delUrlParams
            +     * @param  {string}    _url
            +     * @param  {Array}    _keys
            +     * @return  string
            +     * @static
            +     * @example
            +            var url = delUrlParam( location.href, [ 'k1', 'k2' ] );
            +     */ 
            +    function delUrlParams( _url, _keys ){
            +        !_keys && ( _keys = _url, _url = location.href );
            +        for( var k in _keys ) _url = delUrlParam( _url, _keys[ k ] );
            +        return _url;
            +    }
            +    /**
            +     * 提示需要 HTTP 环境
            +     * @method  httpRequire
            +     * @static
            +     * @param  {string}  _msg   要提示的文字, 默认 "本示例需要HTTP环境'
            +     * @return  bool     如果是HTTP环境返回true, 否则返回false
            +     */
            +    function httpRequire( _msg ){
            +        _msg = _msg || '本示例需要HTTP环境';
            +        if( /file\:|\\/.test( location.href ) ){
            +            alert( _msg );
            +            return false;
            +        }
            +        return true;
            +    }
            +    /**
            +     * 删除 URL 的锚点
            +     * <br /><b>require:</b> addUrlParams, filterXSS
            +     * @method removeUrlSharp
            +     * @static
            +     * @param   {string}    _url
            +     * @param   {bool}      _nornd      是否不添加随机参数
            +     * @param   {string}    _rndName
            +     * @return  string
            +     */
            +    function removeUrlSharp( _url, _nornd, _rndName ){   
            +        !_url && ( _url = location.href );
            +        _url = _url.replace(/\#[\s\S]*/, '');
            +        _rndName = _rndName || 'rnd';
            +        var _rndO;
            +        !_nornd && ( _rndO = {}
            +                        , _rndO[ _rndName ] = new Date().getTime()
            +                        , _url = addUrlParams( _url, _rndO ) 
            +        );
            +        _url = filterXSS( _url );
            +        return _url;
            +    }
            +    /**
            +     * 重载页面
            +     * <br /><b>require:</b> removeUrlSharp, addUrlParams, filterXSS
            +     * @method reloadPage
            +     * @static
            +     * @param   {string}    _url
            +     * @param   {bool}      _nornd
            +     * @param   {int}       _delayms
            +     */ 
            +    function reloadPage( _url, _nornd, _delayMs  ){
            +        _delayMs = _delayMs || 0;
            +
            +        _url = removeUrlSharp( _url || location.href, _nornd );
            +        !_nornd && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) );
            +        _url = filterXSS( _url );
            +
            +        setTimeout( function(){
            +            location.href = _url;
            +        }, _delayMs);
            +        return _url;
            +    }
            +    /**
            +     * 取小数点的N位
            +     * <br />JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题
            +     * @method  parseFinance
            +     * @static
            +     * @param   {number}    _i
            +     * @param   {int}       _dot  default = 2
            +     * @return  number
            +     */
            +    function parseFinance( _i, _dot ){
            +        _i = parseFloat( _i ) || 0;
            +        typeof _dot == 'undefined' && ( _dot = 2 );
            +        _i && ( _i = parseFloat( _i.toFixed( _dot ) ) );
            +        return _i;
            +    }
            +    /**
            +     * js 附加字串函数
            +     * @method  padChar
            +     * @static
            +     * @param   {string}    _str
            +     * @param   {intl}      _len
            +     * @param   {string}    _char
            +     * @return  string
            +     */
            +    function padChar( _str, _len, _char ){
            +        _len  = _len || 2; _char = _char || "0"; 
            +        _str += '';
            +        if( _str.length >= _len ) return _str;
            +        _str = new Array( _len + 1 ).join( _char ) + _str
            +        return _str.slice( _str.length - _len );
            +    }
            +    /**
            +     * 格式化日期为 YYYY-mm-dd 格式
            +     * <br /><b>require</b>: pad\_char\_f
            +     * @method  formatISODate
            +     * @static
            +     * @param   {date}                  _date       要格式化日期的日期对象
            +     * @param   {string|undefined}      _split      定义年月日的分隔符, 默认为 '-'
            +     * @return  string
            +     *
            +     */
            +    function formatISODate( _date, _split ){
            +        _date = _date || new Date(); typeof _split == 'undefined' && ( _split = '-' );
            +        return [ _date.getFullYear(), padChar( _date.getMonth() + 1 ), padChar( _date.getDate() ) ].join(_split);
            +    }
            +    /**
            +     * 从 ISODate 字符串解析日期对象
            +     * @method  parseISODate
            +     * @static
            +     * @param   {string}    _datestr
            +     * @return  date
            +     */
            +    function parseISODate( _datestr ){
            +        if( !_datestr ) return;
            +        _datestr = _datestr.replace( /[^\d]+/g, '');
            +        var _r;
            +        if( _datestr.length === 8 ){
            +            _r = new Date( _datestr.slice( 0, 4 )
            +                            , parseInt( _datestr.slice( 4, 6 ), 10 ) - 1
            +                            , parseInt( _datestr.slice( 6 ), 10 ) );
            +        }else if( _datestr.length === 6 ){
            +            _r = new Date( _datestr.slice( 0, 4 )
            +                            , parseInt( _datestr.slice( 4, 6 ), 10 ) - 1
            +                            , 1 );
            +        }
            +
            +        return _r;
            +    }
            +    /**
            +     * 从日期字符串解析日期对象
            +     * <br />兼容 JC.Calendar 日期格式
            +     * @method  parseDate
            +     * @param   {date}      _date
            +     * @param   {selector}  _selector   如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化
            +     * @param   {boolean}   _forceISO   是否强制转换为ISO日期
            +     * @return  {date|null}
            +     * @static
            +     */
            +    function parseDate( _date, _selector, _forceISO ){
            +        if( !_date ) return null;
            +        var _parse = parseISODate;
            +            
            +        _selector && !_forceISO
            +            && ( _selector = $( _selector ) ).length
            +            && _selector.attr( 'dateParse' )
            +            && ( _parse = window[ _selector.attr( 'dateParse' ) ] || _parse )
            +            ;
            +        _date = _parse( _date );
            +        _date && _date.start && ( _date = _date.start );
            +        return _date;
            +    }
            +
            +    /**
            +     * 获取不带 时分秒的 日期对象
            +     * @method  pureDate
            +     * @param   {Date}  _d   可选参数, 如果为空 = new Date
            +     * @return  Date
            +     * @static
            +     */
            +    function pureDate( _d ){
            +        var _r;
            +        _d = _d || new Date();
            +        _r = new Date( _d.getFullYear(), _d.getMonth(), _d.getDate() );
            +        return _r;
            +    }
            +    /**
            +    * 克隆日期对象
            +    * @method  cloneDate
            +    * @static
            +    * @param   {Date}  _date   需要克隆的日期
            +    * @return  {Date}
            +    */
            +    function cloneDate( _date ){ var d = new Date(); d.setTime( _date.getTime() ); return d; }
            +    /**
            +     * 判断两个日期是否为同一天
            +     * @method  isSameDay
            +     * @static
            +     * @param   {Date}  _d1     需要判断的日期1
            +     * @param   {Date}  _d2     需要判断的日期2
            +     * @return {bool}
            +     */
            +    function isSameDay( _d1, _d2 ){
            +        return [_d1.getFullYear(), _d1.getMonth(), _d1.getDate()].join() === [
            +                _d2.getFullYear(), _d2.getMonth(), _d2.getDate()].join()
            +    }
            +    /**
            +     * 判断两个日期是否为同一月份
            +     * @method  isSameMonth
            +     * @static
            +     * @param   {Date}  _d1     需要判断的日期1
            +     * @param   {Date}  _d2     需要判断的日期2
            +     * @return {bool}
            +     */
            +    function isSameMonth( _d1, _d2 ){
            +        return [_d1.getFullYear(), _d1.getMonth()].join() === [
            +                _d2.getFullYear(), _d2.getMonth()].join()
            +    }
            +
            +    /**
            +     * 判断两个日期是否为同一季度
            +     * @method  isSameWeek
            +     * @static
            +     * @param   {Date}  _d1     需要判断的日期1
            +     * @param   {Date}  _d2     需要判断的日期2
            +     * @return {bool}
            +     */
            +    function isSameWeek( _d1, _d2 ){
            +        var _weeks = [],
            +            _r = false,
            +            i = 0,
            +            l;
            +
            +        _weeks = weekOfYear(_d1.getFullYear());
            +        
            +        _d1 = _d1.getTime();
            +        _d2 = _d2.getTime();
            +
            +        for ( i = 0, l = _weeks.length; i < l; i++ ) {
            +            if ( (_d1 >= _weeks[i].start && _d1 <= _weeks[i].end) 
            +                && ( _d2 >= _weeks[i].start && _d2 <= _weeks[i].end ) 
            +                ) {
            +                console.log(i, _d1, _weeks[i]);
            +                return true;
            +            }  
            +        }
            +
            +        return _r;
            +    }
            +
            +    /**
            +     * 判断两个日期是否为同一季度
            +     * @method  isSameSeason
            +     * @static
            +     * @param   {Date}  _d1     需要判断的日期1
            +     * @param   {Date}  _d2     需要判断的日期2
            +     * @return {bool}
            +     */
            +    function isSameSeason( _d1, _d2 ){
            +        var _seasons = [],
            +            _r = false,
            +            i = 0,
            +            l ;
            +
            +        if ( !isSameYear( _d1, _d2 ) ) {
            +            return false;
            +        }
            +
            +        _seasons = seasonOfYear( _d1.getFullYear() );
            +        _d1 = _d1.getTime();
            +        _d2 = _d2.getTime();
            +        
            +        for (i = 0, l = _seasons.length ; i < l; i++ ) {
            +            if ( (_d1 >= _seasons[i].start && _d1 <= _seasons[i].end) 
            +                && ( _d2 >= _seasons[i].start && _d2 <= _seasons[i].end ) ) {
            +                return true;
            +            }     
            +        }
            +
            +        return _r;
            +    }
            +
            +    /**
            +     * 判断两个日期是否为同一年
            +     * @method  isSameYear
            +     * @static
            +     * @param   {Date}  _d1     需要判断的日期1
            +     * @param   {Date}  _d2     需要判断的日期2
            +     * @return {bool}
            +     */
            +    function isSameYear( _d1, _d2 ) {
            +        return _d1.getFullYear() === _d2.getFullYear();
            +    }
            +
            +    /**
            +     * 取一年中所有的星期, 及其开始结束日期
            +     * @method  weekOfYear
            +     * @static
            +     * @param   {int}   _year
            +     * @param   {int}   _dayOffset  每周的默认开始为周几, 默认0(周一)
            +     * @return  Array
            +     */
            +    function weekOfYear( _year, _dayOffset ){
            +        var _r = [], _tmp, _count = 1, _dayOffset = _dayOffset || 0
            +            , _year = parseInt( _year, 10 )
            +            , _d = new Date( _year, 0, 1 );
            +        /**
            +         * 元旦开始的第一个星期一开始的一周为政治经济上的第一周
            +         */
            +         _d.getDay() > 1 && _d.setDate( _d.getDate() - _d.getDay() + 7 );
            +
            +         _d.getDay() === 0 && _d.setDate( _d.getDate() + 1 );
            +
            +         _dayOffset > 0 && ( _dayOffset = (new Date( 2000, 1, 2 ) - new Date( 2000, 1, 1 )) * _dayOffset );
            +
            +        while( _d.getFullYear() <= _year ){
            +            _tmp = { 'week': _count++, 'start': null, 'end': null };
            +            _tmp.start = _d.getTime() + _dayOffset;
            +            //_tmp.start = formatISODate(_d);
            +            _d.setDate( _d.getDate() + 6 );
            +            _tmp.end = _d.getTime() + _dayOffset;
            +            //_tmp.end = formatISODate(_d);
            +            _d.setDate( _d.getDate() + 1 );
            +            if( _d.getFullYear() > _year ) {
            +                _d = new Date( _d.getFullYear(), 0, 1 );
            +                if( _d.getDay() < 2 ) break;
            +             }
            +            _r.push( _tmp );
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 取一年中所有的季度, 及其开始结束日期
            +     * @method  seasonOfYear
            +     * @static
            +     * @param   {int}   _year
            +     * @return  Array
            +     */
            +    function seasonOfYear( _year ){
            +        var _r = []
            +            , _year = parseInt( _year, 10 )
            +            ;
            +
            +        _r.push( 
            +                {
            +                    start: pureDate( new Date( _year, 0, 1 ) )
            +                    , end: pureDate( new Date( _year, 2, 31 ) )
            +                    , season: 1
            +                }, {
            +                    start: pureDate( new Date( _year, 3, 1 ) )
            +                    , end: pureDate( new Date( _year, 5, 30 ) )
            +                    , season: 2
            +                }, {
            +                    start: pureDate( new Date( _year, 6, 1 ) )
            +                    , end: pureDate( new Date( _year, 8, 30 ) )
            +                    , season: 3
            +                }, {
            +                    start: pureDate( new Date( _year, 9, 1 ) )
            +                    , end: pureDate( new Date( _year, 11, 31 ) )
            +                    , season: 4
            +                }
            +        );
            +                
            +
            +        return _r;
            +    }
            +
            +    /**
            +     * 取某一天所在星期的开始结束日期,以及第几个星期
            +     * @method  dayOfWeek
            +     * @static
            +     * @param   {iso date}   _date
            +     * @param   {int}        _dayOffset
            +     * @return  Object
            +     */
            +    function dayOfWeek( _date, _dayOffset ) {
            +        var r = {},
            +            weeks = JC.f.weekOfYear(_date.getFullYear(), _dayOffset),
            +            i = 0,
            +            l = weeks.length,
            +            t = _date.getTime(),
            +            start = JC.f.pureDate( new Date() ),
            +            end = JC.f.pureDate( new Date() );
            +
            +        for (i; i <l; i++) {
            +            if (t >= weeks[i].start && t <= weeks[i].end) {
            +                start.setTime(weeks[i].start);
            +                end.setTime(weeks[i].end);
            +                r.start = start;
            +                r.end = end;
            +                r.w = i + 1
            +                return r;
            +            }
            +        }
            +    }
            +
            +    /**
            +     * 取某一天所在季度的开始结束日期,以及第几个Q
            +     * @method  dayOfSeason
            +     * @static
            +     * @param   {iso date}   _date
            +     * @return  Object
            +     */
            +
            +    function dayOfSeason(_date) {
            +        var year = _date.getFullYear(),
            +            q = JC.f.seasonOfYear(year),
            +            i,
            +            r = {},
            +            tmp,
            +            d = _date.getTime();
            +
            +        for (i = 0; i < 4; i++) {
            +            if (d >= q[i].start.getTime() && d <= q[i].end.getTime()) {
            +                r.start = q[i].start;
            +                r.end = q[i].end;
            +                r.q = i + 1;
            +                return r;
            +            }
            +        }
            +
            +    }
            +
            +    /**
            +     * 取得一个月份中最大的一天
            +     * @method  maxDayOfMonth
            +     * @static
            +     * @param   {Date}  _date
            +     * @return {int} 月份中最大的一天
            +     */
            +    function maxDayOfMonth( _date ){
            +        var _r, _d = new Date( _date.getFullYear(), _date.getMonth() + 1 );
            +            _d.setDate( _d.getDate() - 1 );
            +            _r = _d.getDate();
            +        return _r;
            +    }
            +    /**
            +     * 取当前脚本标签的 src路径 
            +     * @method  scriptPath
            +     * @static
            +     * @return  {string} 脚本所在目录的完整路径
            +     */
            +    function scriptPath(){
            +        var _sc = document.getElementsByTagName('script'), _sc = _sc[ _sc.length - 1 ], _path = _sc.getAttribute('src');
            +        if( /\//.test( _path ) ){ _path = _path.split('/'); _path.pop(); _path = _path.join('/') + '/'; }
            +        else if( /\\/.test( _path ) ){ _path = _path.split('\\'); _path.pop(); _path = _path.join('\\') + '/'; }
            +        return _path;
            +    }
            +    /**
            +     * 缓动函数, 动画效果为按时间缓动 
            +     * <br />这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval 
            +     * @method  easyEffect
            +     * @static
            +     * @param   {function}  _cb         缓动运动时的回调
            +     * @param   {number}    _maxVal     缓动的最大值, default = 200
            +     * @param   {number}    _startVal   缓动的起始值, default = 0
            +     * @param   {number}    _duration   缓动的总时间, 单位毫秒, default = 200
            +     * @param   {number}    _stepMs     缓动的间隔, 单位毫秒, default = 2
            +     * @return  interval
            +     * @example
            +            $(document).ready(function(){
            +                window.js_output = $('span.js_output');
            +                window.ls = [];
            +                window.EFF_INTERVAL = easyEffect( effectcallback, 100);
            +            });
            +
            +            function effectcallback( _stepval, _done ){
            +                js_output.html( _stepval );
            +                ls.push( _stepval );
            +
            +                !_done && js_output.html( _stepval );
            +                _done && js_output.html( _stepval + '<br />' + ls.join() );
            +            }
            +     */
            +    function easyEffect( _cb, _maxVal, _startVal, _duration, _stepMs ){
            +        var _beginDate = new Date(), _timepass
            +            , _maxVal = _maxVal || 200
            +            , _startVal = _startVal || 0
            +            , _maxVal = _maxVal - _startVal 
            +            , _tmp = 0
            +            , _done
            +            , _duration = _duration || 200
            +            , _stepMs = _stepMs || 2
            +            ;
            +        //JC.log( '_maxVal:', _maxVal, '_startVal:', _startVal, '_duration:', _duration, '_stepMs:', _stepMs );
            +
            +        var _interval = setInterval(
            +            function(){
            +                _timepass = new Date() - _beginDate;
            +                _tmp = _timepass / _duration * _maxVal;
            +                _tmp;
            +                if( _tmp >= _maxVal ){
            +                    _tmp = _maxVal;
            +                    _done = true;
            +                    clearInterval( _interval );
            +                }
            +
            +                _cb && _cb( _tmp + _startVal, _done, _timepass, _duration, _stepMs, _startVal, _maxVal );
            +            }, _stepMs );
            +
            +        return _interval;
            +    }
            +    /**
            +     * 把输入值转换为布尔值
            +     * @method parseBool
            +     * @param   {*} _input
            +     * @return bool
            +     * @static
            +     */
            +    function parseBool( _input ){
            +        if( typeof _input == 'string' ){
            +            _input = _input.replace( /[\s]/g, '' ).toLowerCase();
            +            if( _input && ( _input == 'false' 
            +                            || _input == '0' 
            +                            || _input == 'null'
            +                            || _input == 'undefined'
            +           )) _input = false;
            +           else if( _input ) _input = true;
            +        }
            +        return !!_input;
            +    }
            +    /**
            +     * 绑定或清除 mousewheel 事件
            +     * @method  mousewheelEvent
            +     * @param   {function}  _cb
            +     * @param   {bool}      _detach
            +     * @param   {selector}  _selector  default = document
            +     * @static
            +     */
            +    function mousewheelEvent( _cb, _detach, _selector ){
            +        _selector = _selector || document;
            +        var _evt =  (/Firefox/i.test(navigator.userAgent))
            +            ? "DOMMouseScroll" 
            +            : "mousewheel"
            +            ;
            +        _selector.attachEvent && ( _evt = 'on' + _evt );
            +
            +        if( _detach ){
            +            _selector.detachEvent && document.detachEvent( _evt, _cb )
            +            _selector.removeEventListener && document.removeEventListener( _evt, _cb );
            +        }else{
            +            _selector.attachEvent && document.attachEvent( _evt, _cb )
            +            _selector.addEventListener && document.addEventListener( _evt, _cb );
            +        }
            +    }
            +    /**
            +     * 获取 selector 的指定父级标签
            +     * @method  getJqParent
            +     * @param   {selector}  _selector
            +     * @param   {selector}  _filter
            +     * @return selector
            +     * @require jquery
            +     * @static
            +     */
            +    function getJqParent( _selector, _filter ){
            +        _selector = $(_selector);
            +        var _r;
            +
            +        if( _filter ){
            +            while( (_selector = _selector.parent()).length ){
            +                if( _selector.is( _filter ) ){
            +                    _r = _selector;
            +                    break;
            +                }
            +            }
            +        }else{
            +            _r = _selector.parent();
            +        }
            +
            +        return _r;
            +    }
            +    /**
            +     * 扩展 jquery 选择器
            +     * <br />扩展起始字符的 '/' 符号为 jquery 父节点选择器
            +     * <br />扩展起始字符的 '|' 符号为 jquery 子节点选择器
            +     * <br />扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )
            +     * @method  parentSelector
            +     * @param   {selector}  _item
            +     * @param   {String}    _selector
            +     * @param   {selector}  _finder
            +     * @return  selector
            +     * @require jquery
            +     * @static
            +     */
            +    function parentSelector( _item, _selector, _finder ){
            +        _item && ( _item = $( _item ) );
            +        if( /\,/.test( _selector ) ){
            +            var _multiSelector = [], _tmp;
            +            _selector = _selector.split(',');
            +            $.each( _selector, function( _ix, _subSelector ){
            +                _subSelector = _subSelector.trim();
            +                _tmp = parentSelector( _item, _subSelector, _finder );
            +                _tmp && _tmp.length 
            +                    &&  ( 
            +                            ( _tmp.each( function(){ _multiSelector.push( $(this) ) } ) )
            +                        );
            +            });
            +            return $( _multiSelector );
            +        }
            +        var _pntChildRe = /^([\/]+)/, _childRe = /^([\|]+)/, _pntRe = /^([<\(]+)/;
            +        if( _pntChildRe.test( _selector ) ){
            +            _selector = _selector.replace( _pntChildRe, function( $0, $1 ){
            +                for( var i = 0, j = $1.length; i < j; i++ ){
            +                    _item = _item.parent();
            +                }
            +                _finder = _item;
            +                return '';
            +            });
            +            _selector = _selector.trim();
            +            return _selector ? _finder.find( _selector ) : _finder;
            +        }else if( _childRe.test( _selector ) ){
            +            _selector = _selector.replace( _childRe, function( $0, $1 ){
            +                for( var i = 1, j = $1.length; i < j; i++ ){
            +                    _item = _item.parent();
            +                }
            +                _finder = _item;
            +                return '';
            +            });
            +            _selector = _selector.trim();
            +            return _selector ? _finder.find( _selector ) : _finder;
            +        }else if( _pntRe.test( _selector ) ){
            +            _selector = _selector.replace( _pntRe, '' ).trim();
            +            if( _selector ){
            +                if( /[\s]/.test( _selector ) ){
            +                    var _r;
            +                    _selector.replace( /^([^\s]+)([\s\S]+)/, function( $0, $1, $2 ){
            +                        _r = getJqParent( _item, $1 ).find( $2.trim() );
            +                    });
            +                    return _r || _selector;
            +                }else{
            +                    return getJqParent( _item, _selector );
            +                }
            +            }else{
            +                return _item.parent();
            +            }
            +        }else{
            +            return _finder ? _finder.find( _selector ) : jQuery( _selector );
            +        }
            +    }
            +    /**
            +     * 获取脚本模板的内容
            +     * @method  scriptContent
            +     * @param   {selector}  _selector
            +     * @return  string
            +     * @static
            +     */
            +    function scriptContent( _selector ){
            +        var _r = '';
            +        _selector 
            +            && ( _selector = $( _selector ) ).length 
            +            && ( _r = _selector.html().trim().replace( /[\r\n]/g, '') )
            +            ;
            +        return _r;
            +    }
            +    /**
            +     * 取函数名 ( 匿名函数返回空 )
            +     * @method  funcName
            +     * @param   {function}  _func
            +     * @return  string
            +     * @static
            +     */
            +    function funcName(_func){
            +      var _re = /^function\s+([^()]+)[\s\S]*/
            +          , _r = ''
            +          , _fStr = _func.toString();    
            +      //JC.log( _fStr );
            +      _re.test( _fStr ) && ( _r = _fStr.replace( _re, '$1' ) );
            +      return _r.trim();
            +    }
            +    /**
            +     * 执行自动识别的组件
            +     * @method  autoInit
            +     * @param   {selector}  _selector
            +     * @static
            +     */
            +    function autoInit( _selector ){
            +        _selector = $( _selector || document );
            +        if( !( _selector && _selector.length && window.JC ) ) return;
            +        if( !( JC.f && JC.f._AUTO_INIT_DATA ) ) return;
            +
            +        $.each( JC.f._AUTO_INIT_DATA, function( _k, _class ){
            +            if( !_class ) return;
            +            _class.init ? _class.init( _selector ) : _class( _selector );
            +        });
            +        return JC.f;
            +    }
            +    /**
            +     * 添加需要自动识别的组件
            +     * @method addAutoInit
            +     * @param   {class} _class
            +     * @static
            +     * @example
            +     *      JC.f.addAutoInit( JC.Calendar );
            +     */
            +    function addAutoInit( _class ){
            +        _class 
            +            && JC.f._AUTO_INIT_DATA 
            +            && ( JC.f._AUTO_INIT_DATA[ 
            +                    _class && _class.Model && _class.Model._instanceName 
            +                    ? _class.Model._instanceName
            +                    : _class.toString()
            +                ] = _class )
            +                ;
            +        return JC.f;
            +    }
            +    /**
            +     * jcAutoInitComps 不久后将被清除
            +     * 请使用 JC.f.autoInit 和 JC.f.addAutoInit
            +     */
            +    function jcAutoInitComps( _selector ){
            +        _selector = $( _selector || document );
            +        
            +        if( !( _selector && _selector.length && window.JC ) ) return;
            +        /**
            +         * 联动下拉框
            +         */
            +        JC.AutoSelect && JC.AutoSelect( _selector );
            +        /**
            +         * 日历组件
            +         */
            +        JC.Calendar && JC.Calendar.initTrigger( _selector );
            +        /**
            +         * 双日历组件
            +         */
            +        JC.DCalendar && JC.DCalendar.init && JC.DCalendar.init( _selector );
            +        /**
            +         * 全选反选
            +         */
            +        JC.AutoChecked && JC.AutoChecked( _selector );
            +        /**
            +         * Ajax 上传
            +         */
            +        JC.AjaxUpload && JC.AjaxUpload.init( _selector );
            +        /**
            +         * 占位符
            +         */
            +        JC.Placeholder && JC.Placeholder.init( _selector );
            +        /**
            +         * 表格冻结
            +         */
            +        JC.TableFreeze && JC.TableFreeze.init( _selector );
            +        /**
            +         * 拖曳
            +         */
            +        JC.Drag && JC.Drag.init( _selector );
            +        /**
            +         * 图片裁切
            +         */
            +        JC.ImageCutter && JC.ImageCutter.init( _selector );
            +
            +        JC.Tab && JC.Tab.init && JC.Tab.init( _selector );
            +
            +        if( !window.Bizs ) return;
            +        /**
            +         * disable / enable
            +         */
            +        Bizs.DisableLogic && Bizs.DisableLogic.init( _selector );
            +        /**
            +         * 表单提交逻辑
            +         */
            +        Bizs.FormLogic && Bizs.FormLogic.init( _selector );
            +        /**
            +         * 格式化金额
            +         */
            +        Bizs.MoneyTips && Bizs.MoneyTips.init( _selector );
            +        /**
            +         * 自动完成
            +         */
            +        Bizs.AutoSelectComplete && Bizs.AutoSelectComplete.init( _selector );
            +
            +        Bizs.InputSelect && Bizs.InputSelect.init( _selector );
            +
            +        /**
            +         *排期日期展示
            +        */
            +        Bizs.TaskViewer && Bizs.TaskViewer.init(_selector);
            +    }
            +
            +    /**
            +     * URL 占位符识别功能
            +     * <br /><b>require:</b> addUrlParams, filterXSS
            +     * @method  urlDetect
            +     * @param   {String}    _url    如果 起始字符为 URL, 那么 URL 将祝为本页的URL
            +     * @return  string
            +     * @static
            +     * @example
            +     *      urlDetect( '?test' ); //output: ?test
            +     *
            +     *      urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2
            +     *      urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2
            +     *      urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2
            +     */
            +    function urlDetect( _url ){
            +        _url = _url || '';
            +        var _r = _url, _tmp, i, j, _items;
            +        if( /^URL/.test( _url ) ){
            +            _tmp = _url.replace( /^URL/, '' ).replace( /[\s]*,[\s]*/g, ',' ).trim().split(',');
            +            _url = location.href;
            +            var _d = {}, _concat = [];
            +            if( _tmp.length ){
            +                for( i = 0, j = _tmp.length; i < j; i ++ ){
            +                     /\&/.test( _tmp[i] )
            +                         ? ( _concat = _concat.concat( _tmp[i].split('&') ) )
            +                         : ( _concat = _concat.concat( _tmp[i] ) )
            +                         ;
            +                }
            +                _tmp = _concat;
            +            }
            +            for( i = 0, j = _tmp.length; i < j; i++ ){
            +                _items = _tmp[i].replace(/[\s]+/g, '').split( '=' );
            +                if( !_items[0] ) continue;
            +                _d[ _items[0] ] = _items[1] || '';
            +            }
            +            _url = addUrlParams( _url, _d );
            +            _r = _url;
            +        }
            +        _r = filterXSS( _url );
            +        return _r;
            +    }
            +    /**
            +     * 日期占位符识别功能
            +     * @method  dateDetect
            +     * @param   {String}    _dateStr    如果起始字符为 NOW, 那么将视为当前日期
            +     *                                  , 如果起始字符为 NOWFirst, 那么将视为当前月的1号
            +     * @return  {date|null}
            +     * @static
            +     * @example
            +     *      dateDetect( 'now' ); //2014-10-02
            +     *      dateDetect( 'now,3d' ); //2013-10-05
            +     *      dateDetect( 'now,-3d' ); //2013-09-29
            +     *      dateDetect( 'now,2w' ); //2013-10-16
            +     *      dateDetect( 'now,-2m' ); //2013-08-02
            +     *      dateDetect( 'now,4y' ); //2017-10-02
            +     *
            +     *      dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10
            +     */
            +    function dateDetect( _dateStr ){
            +        var _r = null   
            +            , _re = /^now/i
            +            , _nowFirstRe = /^nowfirst/
            +            , _dateRe = /^([\d]{8}|[\d]{4}.[\d]{2}.[\d]{2})/
            +            , _d, _ar, _item
            +            ;
            +        if( _dateStr && typeof _dateStr == 'string' ){
            +            if( _re.test( _dateStr ) || _nowFirstRe.test( _dateStr ) || _dateRe.test( _dateStr ) ){
            +                _d = new Date();
            +                if( _nowFirstRe.test(_dateStr ) ){
            +                    _d.setDate( 1 );
            +                }
            +                if( _dateRe.test( _dateStr ) ){
            +                    _d = JC.f.parseISODate( _dateStr.replace( /[^\d]/g, '' ).slice( 0, 8 ) );
            +                    _dateStr = _dateStr.replace( _dateRe, '' );
            +                }
            +                _dateStr = _dateStr.replace( _re, '' ).replace(/[\s]+/g, '');
            +                _ar = _dateStr.split(',');
            +
            +                var _red = /d$/i
            +                    , _rew = /w$/i
            +                    , _rem = /m$/i
            +                    , _rey = /y$/i
            +                    ;
            +                for( var i = 0, j = _ar.length; i < j; i++ ){
            +                    _item = _ar[i] || '';
            +                    if( !_item ) continue;
            +                    _item = _item.replace( /[^\-\ddwmy]+/gi, '' );
            +
            +                    if( _red.test( _item ) ){
            +                        _item = parseInt( _item.replace( _red, '' ), 10 );
            +                        _item && _d.setDate( _d.getDate() + _item );
            +                    }else if( _rew.test( _item ) ){
            +                        _item = parseInt( _item.replace( _rew, '' ), 10 );
            +                        _item && _d.setDate( _d.getDate() + _item * 7 );
            +                    }else if( _rem.test( _item ) ){
            +                        _item = parseInt( _item.replace( _rem, '' ), 10 );
            +                        _item && _d.setMonth( _d.getMonth() + _item );
            +                    }else if( _rey.test( _item ) ){
            +                        _item = parseInt( _item.replace( _rey, '' ), 10 );
            +                        _item && _d.setFullYear( _d.getFullYear() + _item );
            +                    }
            +                }
            +                _r = _d;
            +            }else{
            +                _r = parseISODate( _dateStr );
            +            }
            +        }
            +        return _r;
            +    }
            +    ;(function(){
            +        /**
            +         * inject jquery val func, for hidden change event
            +         */
            +        if( !window.jQuery ) return;
            +        var _oldVal = $.fn.val;
            +        $.fn.val = 
            +            function(){
            +                var _r = _oldVal.apply( this, arguments ), _p = this;
            +                if( 
            +                    arguments.length
            +                    && ( this.prop('nodeName') || '').toLowerCase() == 'input' 
            +                    && ( this.attr('type') || '' ).toLowerCase() == 'hidden'
            +                ){
            +                    setTimeout( function(){ _p.trigger( 'change' ); }, 1 );
            +                }
            +                return _r;
            +            };
            +    }());
            +    /**
            +     * 逗号格式化金额
            +     * @method  moneyFormat
            +     * @param   {int|string}    _number
            +     * @param   {int}           _len
            +     * @param   {int}           _floatLen
            +     * @param   {int}           _splitSymbol
            +     * @return  string
            +     * @static
            +     */
            +    function moneyFormat(_number, _len, _floatLen, _splitSymbol){
            +        var _def = '0.00';
            +        !_len && ( _len = 3 );
            +        typeof _floatLen == 'undefined' && ( _floatLen = 2 );
            +        !_splitSymbol && ( _splitSymbol = ',' );
            +        var _isNegative = false, _r;
            +
            +        typeof _number == 'number' && ( _number = parseFinance( _number, _floatLen ) );
            +        if( typeof _number == 'string' ){
            +            _number = _number.replace( /[,]/g, '' );
            +            if( !/^[\d\.]+$/.test( _number ) ) return _def;
            +            if( _number.split('.').length > 2 ) return _def;
            +        }
            +
            +        _number = _number || 0;
            +        _number += ''; 
            +
            +        /^\-/.test( _number ) && ( _isNegative = true );
            +
            +        _number = _number.replace( /[^\d\.]/g, '' );
            +
            +        var _parts = _number.split('.'), _sparts = [];
            +
            +        while( _parts[0].length > _len ){
            +            var _tmp = _parts[0].slice( _parts[0].length - _len, _parts[0].length );
            +            //console.log( _tmp );
            +            _sparts.push( _tmp );
            +            _parts[0] = _parts[0].slice( 0, _parts[0].length - _len );
            +        }
            +        _sparts.push( _parts[0] );
            +
            +        _parts[0] = _sparts.reverse().join( _splitSymbol );
            +
            +        if( _floatLen ){
            +            !_parts[1] && ( _parts[1] = '' );
            +            _parts[1] += new Array( _floatLen + 1 ).join('0');
            +            _parts[1] = _parts[1].slice( 0, _floatLen );
            +        }else{
            +            _parts.length > 1 && _parts.pop();
            +        }
            +        _r = _parts.join('.');
            +        _isNegative && ( _r = '-' + _r );
            +
            +        return _r;
            +    }
            +    /**
            +     * 日期格式化 (具体格式请查看 PHP Date Formats)
            +     * @method  dateFormat
            +     * @param   {date}    _date     default = now
            +     * @param   {string}  _format   default = "YY-MM-DD"
            +     * @return  string
            +     * @static
            +     */
            +    function dateFormat( _date, _format ){
            +        typeof _date == 'string' && ( _format = _date, _date = new Date() );
            +        !_date && ( _date = new Date() );
            +        !_format && ( _format = 'YY-MM-DD' );
            +        var _r = _format, _tmp
            +            , _monthName = [ 'january', 'february', 'march', 'april', 'may', 'june'
            +                            , 'july', 'august', 'september', 'october', 'november', 'december' ] 
            +            , _monthShortName = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec' ]
            +            ;
            +
            +        _r = _r
            +            .replace( /YY/g, _date.getFullYear() )
            +            .replace( /WK/g, function(){
            +                var _r = 1, _offset = 0, _weeks;
            +
            +                JC.Calendar && ( _offset = JC.Calendar.weekDayOffset );
            +
            +                _weeks = weekOfYear( _date.getFullYear(), JC.Calendar.weekDayOffset );
            +
            +                $( _weeks ).each( function( _ix, _item ){
            +                    if( _date.getTime() >= _item.start && _date.getTime() <= _item.end ){
            +                        _r = _item.week;
            +                        return false;
            +                    }
            +                });
            +
            +                return _r;
            +            })
            +            .replace( /YQ/g, function(){
            +                var _r = 1, _offset = 0, _seasons;
            +
            +                _seasons = seasonOfYear( _date.getFullYear() );
            +
            +                $( _seasons ).each( function( _ix, _item ){
            +                    if( _date.getTime() >= _item.start && _date.getTime() <= _item.end ){
            +                        _r = _item.season;
            +                        return false;
            +                    }
            +                });
            +
            +                return _r;
            +            })
            +            .replace( /MM/g, padChar( _date.getMonth() + 1 ) )
            +            .replace( /DD/g, padChar( _date.getDate() ) )
            +
            +            .replace( /yy/g, function( $0 ){
            +                _tmp = padChar( _date.getYear() );
            +                //JC.log( _date.getYear(), _tmp.slice( _tmp.length - 2 ) );
            +                return _tmp.slice( _tmp.length - 2 );
            +            })
            +            .replace( /mm/g, _date.getMonth() + 1 )
            +            .replace( /dd/g, _date.getDate() )
            +            .replace( /d/g, _date.getDate() )
            +
            +            .replace( /y/g, _date.getFullYear() )
            +
            +            .replace( /m/g, function( $0 ){
            +                return _monthName[ _date.getMonth() ];          
            +            })
            +
            +            .replace( /M/g, function( $0 ){
            +                return _monthShortName[ _date.getMonth() ];          
            +            })
            +            .replace( /HH/g, padChar( _date.getHours() ) )
            +            .replace( /h/g, _date.getHours() )
            +            .replace( /NN/g, padChar( _date.getMinutes() ) )
            +            .replace( /n/g, _date.getMinutes() )
            +            .replace( /SS/g, padChar( _date.getSeconds() ) )
            +            .replace( /s/g, _date.getSeconds() )
            +            ;
            +
            +        return _r;
            +    }
            +    /**
            +     * 扩展对象属性
            +     * @method  extendObject
            +     * @param   {object}    _source
            +     * @param   {object}    _new
            +     * @param   {bool}      _overwrite      是否覆盖已有属性, default = true  
            +     * @return  object
            +     * @static
            +     */
            +    function extendObject( _source, _new, _overwrite ){
            +        typeof _overwrite == 'undefined' && ( _overwrite = true );
            +        if( _source && _new ){
            +            for( var k in _new ){
            +                if( _overwrite ){
            +                    _source[ k ] = _new[ k ];
            +                }else if( !( k in _source ) ){
            +                    _source[ k ] = _new[ k ];
            +                }
            +            }
            +        }
            +        return _source;
            +    }
            +    /**
            +     * timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行
            +     * @method  safeTimeout
            +     * @param   {timeout|function}  _timeout
            +     * @param   {object}            _obj    default = window.TIMEOUT_HOST || {}
            +     * @param   {string}            _name   default = 'NORMAL'
            +     * @param   {int}               _ms     default = 50
            +     * @return  object
            +     * @static
            +     */
            +    function safeTimeout( _timeout, _obj, _name, _ms ){
            +        if( typeof _timeout == 'undefined' ) return;
            +        _obj = $( _obj || ( window.TIMEOUT_HOST = window.TIMEOUT_HOST || {} ) );
            +        _name = _name || 'NORMAL';
            +
            +        typeof _timeout == 'function'
            +            && ( _timeout = setTimeout( _timeout, _ms || 50 ) );
            +
            +        _obj.data( _name ) && clearTimeout( _obj.data( _name ) );
            +        _obj.data( _name, _timeout );
            +    }
            +    /**
            +     * URL 请求时, 获取对URL参数进行编码的函数
            +     * @method  encoder
            +     * @param   {selector}  _selector
            +     * @return  {encode function}   default encodeURIComponent
            +     * @static
            +     */
            +    function encoder( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        var _r;
            +        if( _selector && _selector.length ){
            +            _r =_selector.attr( 'validEncoder' ) || 'encodeURIComponent';
            +            _r = window[ _r ] || encodeURIComponent;
            +        }else{
            +            _r = encodeURIComponent;
            +        }
            +        return _r;
            +    }
            +    /**
            +     * 深度克隆对象
            +     * @method  cloneObject
            +     * @param   {Object}    _inObj
            +     * @return  Object
            +     * @static
            +     */
            +    function cloneObject( _inObj, _outObj ){
            +        _outObj = _outObj || {};
            +        var k, i, j;
            +
            +        for( k in _inObj ){
            +            _outObj[ k ] = _inObj[ k ];
            +            switch( Object.prototype.toString.call( _outObj[ k ] ) ){
            +
            +                case '[object Object]': {
            +                      _outObj[ k ] = _outObj[ k ].constructor === Object
            +                        ?  cloneObject( _outObj[ k ] )
            +                        :  _outObj[ k ]
            +                        ;
            +                    break;
            +                }
            +
            +                case '[object Array]': {
            +                    _outObj[ k ] = _inObj[ k ].slice();
            +                    for( i = 0, j = _outObj[ k ].length; i < j; i++ ){
            +                        if( Object.prototype.toString.call( _outObj[ k ][i] ) == '[object Object]' )
            +                            _outObj[ k ][ i ] = cloneObject( _outObj[ k ][ i ] );
            +                    }
            +                    break;
            +                }
            +
            +                case '[object Date]': {
            +                    _outObj[ k ] = new Date(); _outObj[ k ].setTime( _inObj[ k ].getTime() );
            +                    break;
            +                }
            +
            +                default: _outObj[ k ] = _inObj[ k ];
            +            }
            +        }
            +
            +        return _outObj;
            +    }
            +    /**
            +     * 获取 document 的 相关大小
            +     * @method  docSize
            +     * @param   {document}    _doc
            +     * @return  Object
            +     * @static
            +     */
            +    function docSize( _doc ){
            +        _doc = _doc || document;
            +        var _r = {
            +            width: 0, height: 0, docWidth: 0, docHeight: 0, bodyWidth: 0, bodyHeight: 0, scrollWidth: 0, scrollHeight: 0
            +        };
            +
            +        _r.docWidth = _doc.documentElement.offsetWidth;
            +        _r.docHeight = _doc.documentElement.offsetHeight;
            +
            +        _doc.body && (
            +            _r.bodyWidth = _doc.body.offsetWidth
            +            , _r.bodyHeight = _doc.body.offsetHeight
            +        );
            +
            +        _r.scrollWidth = _doc.documentElement.scrollWidth
            +        _r.scrollHeight = _doc.documentElement.scrollHeight
            +
            +        _r.width = Math.max( _r.docWidth, _r.bodyWidth, _r.scrollHeight );
            +        _r.height = Math.max( _r.docHeight, _r.bodyHeight, _r.scrollHeight );
            +
            +        return _r;
            +    }
            +    /**
            +     * 获取 window 的 相关大小
            +     * @method  winSize
            +     * @param   {window}    _win,  default = window
            +     * @return  Object
            +     * @static
            +     */
            +    function winSize( _win ){
            +        _win = $( _win || window );
            +        var _r = {
            +                width: _win.width()
            +                , height: _win.height()
            +                , scrollLeft: _win.scrollLeft()
            +                , scrollTop: _win.scrollTop()
            +            };
            +        _r.viewportX = _r.scrollLeft;
            +        _r.maxViewportX = _r.scrollLeft + _r.width;
            +        _r.viewportY = _r.scrollTop;
            +        _r.maxViewportY = _r.scrollTop + _r.height;
            +        return _r;
            +    }
            +
            +    return JC.f;
            +
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_AjaxTree_AjaxTree.js.html b/docs_api/files/.._comps_AjaxTree_AjaxTree.js.html new file mode 100644 index 000000000..b5dbfdc33 --- /dev/null +++ b/docs_api/files/.._comps_AjaxTree_AjaxTree.js.html @@ -0,0 +1,1303 @@ + + + + + ../comps/AjaxTree/AjaxTree.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/AjaxTree/AjaxTree.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( 'JC.AjaxTree', [ 'JC.BaseMVC', 'plugins.json2' ], function(){
            +    JC.use 
            +        && !window.JSON 
            +        && JC.use( 'plugins.json2' )
            +        ;
            +    JC.AjaxTree = AjaxTree;
            +    /**
            +     * AJAX 树菜单类 JC.AjaxTree
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *      , <b>JSON2</b>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.AjaxTree.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/AjaxTree/_demo' target='_blank'>demo link</a></p>
            +     *
            +     * <h2>页面只要引用本文件, 默认会自动初始化 div class="js_compAjaxTree" 的树组件</h2>
            +     *
            +     * <h2>可用的 html attribute</h2>
            +     * <dl>
            +     *      <dt>data-defaultOpenRoot = bool, default = true</dt>
            +     *      <dd>如果没有默认选中节点, 是否展开根节点</dd>
            +     *
            +     *      <dt>data-cajScriptData = script selector</dt>
            +     *      <dd>从脚本模板解释数据</dd>
            +     *
            +     *      <dt>data-cajData = object name of window</dt>
            +     *      <dd>从window变量获取数据</dd>
            +     *
            +     *      <dt>data-cajUrl = url</dt>
            +     *      <dd>从 url 加载数据</dd>
            +     *
            +     *      <dt>data-rootId = node id, default = ''</dt>
            +     *      <dd>指定根节点ID</dd>
            +     *
            +     *      <dt>data-urlArgName = string, default = 'tree_node'</dt>
            +     *      <dd>书节点的URL参数名</dd>
            +     *
            +     *      <dt>data-typeIndex = int, default = 0</dt>
            +     *      <dd>数据节点中 节点类型 所在的索引位置</dd>
            +     *
            +     *      <dt>data-idIndex = int, default = 1</dt>
            +     *      <dd>数据节点中 节点id 所在的索引位置</dd>
            +     *
            +     *      <dt>data-nameIndex = int, default = 2</dt>
            +     *      <dd>数据节点中 节点name 所在的索引位置</dd>
            +     * </dl>
            +     *
            +     * @namespace       JC
            +     * @class           AjaxTree
            +     * @extends         JC.BaseMVC
            +     * @constructor
            +     * @param   {selector}          _selector   树要显示的选择器
            +     * @version dev 0.1 2014-11-13, qiushaowei <suches@btbtd.org>, pjk <pengjunkai@360.cn> | 75 Team
            +     *
            +     * @example
            +     *
            +           <div class="js_compAjaxTree js_tree2" data-cajData="TREE_2" data-urlArgName="node">
            +            <script>
            +                window.TREE_2 = {
            +                    root: [ 'folder', "23",'客户发展部']
            +                    , data: 
            +                        {
            +                            "24":
            +                            [
            +                                [
            +                                    'file',
            +                                    "25", 
            +                                    "二组一队"
            +                                ], 
            +                                [
            +                                    'file',
            +                                    "26", 
            +                                    "二组二队"
            +                                ], 
            +                                [
            +                                    'file',
            +                                    "27", 
            +                                    "二组三队"
            +                                ]
            +                            ], 
            +                            "23":
            +                            [
            +                                [
            +                                    'file',
            +                                    "28", 
            +                                    "销售二组"
            +                                ], 
            +                                [
            +                                    'folder', 
            +                                    "24", 
            +                                    "售前审核组"
            +                                ]
            +                            ]
            +                        }
            +                };           
            +
            +                $( document ).delegate( 'div.js_tree2', 'renderItem', function( _evt, _item, _data ){
            +                    _item.html( JC.f.printf( '<a href="?node={0}" data-id="{0}">{1}</a>', _data[1], _data[2] ) );
            +                });
            +
            +            </script>
            +        </div>
            +     */
            +    function AjaxTree( _selector ){
            +
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, AjaxTree ) ) 
            +            return JC.BaseMVC.getInstance( _selector, AjaxTree );
            +
            +        JC.BaseMVC.getInstance( _selector, AjaxTree, this );
            +
            +        this._model = new AjaxTree.Model( _selector );
            +        this._view = new AjaxTree.View( this._model );
            +
            +        this._init();
            +    }
            +    /**
            +     * 初始化可识别的 AjaxTree 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of AjaxTreeInstance}
            +     */
            +    AjaxTree.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compAjaxTree' )  ){
            +                    _r.push( new AjaxTree( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compAjaxTree' ).each( function(){
            +                        _r.push( new AjaxTree( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( AjaxTree );
            +    /**
            +     * 树的数据过滤函数
            +     * <br /> 如果树的初始数据格式不符合要求, 可通过该属性定义函数进行数据修正
            +     * @property    dataFilter
            +     * @type        function
            +     * @default     undefined
            +     * @static
            +     * @example
            +            JC.AjaxTree.dataFilter =
            +            function( _data ){
            +                var _r = {};
            +
            +                if( _data ){
            +                    if( _data.root.length > 2 ){
            +                        _data.root.shift();
            +                        _r.root = _data.root;
            +                     }
            +                    _r.data = {};
            +                    for( var k in _data.data ){
            +                        _r.data[ k ] = [];
            +                        for( var i = 0, j = _data.data[k].length; i < j; i++ ){
            +                            if( _data.data[k][i].length < 3 ) continue;
            +                            _data.data[k][i].shift();
            +                            _r.data[k].push( _data.data[k][i] );
            +                        }
            +                    }
            +                }
            +                return _r;
            +            };
            +     */
            +    AjaxTree.dataFilter;
            +    
            +    JC.f.extendObject( AjaxTree.prototype, {
            +        _beforeInit:
            +            function(){
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this, _data;
            +
            +                _p.on( 'inited', function(){
            +                    _data = _p._model.parseInitData();
            +
            +                    if( !_data && _p._model.url() ){
            +                        _data = { url: _p._model.url() };
            +                    }
            +
            +                    if( _data ){
            +                        _data.data = _data.data || {};
            +
            +                        _p._model.data( _data );
            +                        if( _data.root ){
            +                            _p.trigger( 'update_init_data', [ _data ] );
            +                        }else if( _data.url ){
            +                            _p._model.ajaxData( _p._model.rootId(), function( _sdata ){
            +                                if( _sdata && _sdata.data && _sdata.data[0] && _sdata.data[0].length ){
            +                                    _data.root = _sdata.data[0];
            +                                    _p.trigger( 'update_init_data', [ _data ] );
            +                                }
            +                            });
            +                        }
            +                    }
            +                });
            +
            +                _p.on( 'update_init_data', function( _evt, _data ){
            +                    if( !_data ) return;
            +                    _p._model.data( _data );
            +                    if( !( _p._model.data() && _p._model.root() ) ) return;
            +
            +                    _p._view._process( _p._model.child( _p._model.root()[ _p._model.idIndex() ] ), _p._view._initRoot() );
            +
            +                    _p.trigger( 'AT_OPEN_FOLDER' );
            +                });
            +
            +                _p.on( 'AT_OPEN_FOLDER', function(){
            +                    var _arg = ( JC.f.getUrlParam( _p._model.urlArgName() ) || '' ).trim()
            +                        , _list
            +                        ;
            +                    if( !_arg ) {
            +                        if( _p._model.defaultOpenRoot() && _p._model.root() ){
            +                            _p.open( _p._model.root()[ _p._model.idIndex ] );
            +                        };
            +                        return;
            +                    }
            +                    _list = _p.triggerHandler( 'AT_PROCESS_ID', [ _arg ] );
            +                    if( !_list.length ) return;
            +
            +                    _p.trigger( 'AT_OPEN_ALL_FOLDER', [ _list, 0 ] );
            +                });
            +
            +                _p.on( 'AT_OPEN_ALL_FOLDER', function( _evt, _list, _ix ){
            +                    if( _ix >= _list.length ) {
            +                        _p.openUI( _list.last() );
            +                        return;
            +                    }
            +                    var _id = _list[ _ix ]
            +                        , _node = _p.selector().find( JC.f.printf( 'div.node_ctn[data-id={0}]', _id ) )
            +                        , _nodeUl
            +                        ;
            +                    if( !( _node && _node.length ) ) return;
            +                    _p._view.openFolder( _id, function(){
            +                        _p.trigger( 'AT_OPEN_ALL_FOLDER', [ _list, ++_ix ] );
            +                    });
            +                });
            +
            +                _p.on( 'AT_PROCESS_ID', function( _evt, _ids ){
            +                    var _r = [];
            +                    typeof _ids != 'string' && ( _ids = _ids.toString() );
            +                    _ids = (_ids || '' ).replace( /[\s]+/g, '' );
            +                    _ids && ( _r = _ids.split( ',' ) );
            +                    return _r;
            +                });
            +
            +            }
            +
            +        , _inited:
            +            function(){
            +                this.trigger( 'inited' );
            +            }
            +        /**
            +         * 展开树到某个具体节点, 或者展开树的所有节点
            +         * @method  open
            +         * @param   {string|int}    _nodeId     如果_nodeId='undefined', 将会展开树的所有节点
            +         *                                      <br />_nodeId 不为空, 将展开树到 _nodeId 所在的节点
            +         */
            +        , open:
            +            function( _nodeId ){
            +                var _p = this;
            +                if( typeof _nodeId == 'undefined' ){
            +                    _p._view.openAll();
            +                    return _p;
            +                }
            +                var _list = _p.triggerHandler( 'AT_PROCESS_ID', [ _nodeId ] );
            +                if( _list.length ){
            +                    _p.trigger( 'AT_OPEN_ALL_FOLDER', [ _list, 0 ] );
            +                }
            +                return _p;
            +            }
            +        /**
            +         * 展开树到某个具体节点, 或者展开树的所有节点
            +         * @method  openUI
            +         * @param   {string|int}    _nodeId     如果_nodeId='undefined', 将会展开树的所有节点
            +         *                                      <br />_nodeId 不为空, 将展开树到 _nodeId 所在的节点
            +         */
            +        , openUI:
            +            function( _nodeId ){
            +                if( typeof _nodeId == 'undefined' ){
            +                    this._view.openAll();
            +                    return this;
            +                }
            +                this._view.openUI( _nodeId );
            +                return this;
            +            }
            +
            +        /**
            +         * 关闭某个节点, 或者关闭整个树
            +         * @method  close
            +         * @param   {string|int}    _nodeId     如果_nodeId='undefined', 将会关闭树的所有节点
            +         *                                      <br />_nodeId 不为空, 将关闭树 _nodeId 所在的节点
            +         */
            +        , close:
            +            function( _nodeId ){
            +                if( typeof _nodeId == 'undefined' ){
            +                    this._view.closeAll();
            +                    return this;
            +                }
            +                this._view.close( _nodeId );
            +                return this;
            +            }
            +
            +        /**
            +         * 新增节点方法
            +         * @method  add
            +         * @param   {string}    _parentId    父节点ID
            +         * @param   {object}    _data        新增的数据对象( 对象会通过ajax请求传递,ajax的url读取dom属性“data-addUrl” )
            +         * @param   {boolean}   _needFresh   是否刷新父节点
            +         * @param   {function}   _cb         添加请求完毕后的回调函数,请求结果为第一个参数
            +         */
            +        , add:
            +            function( _parentId, _data, _needFresh, _cb ) {
            +
            +                if( !_parentId ) {
            +                    return;
            +                }
            +
            +                var _p = this;
            +
            +                $.ajax( {
            +                    type: "POST"
            +                    , url: this._model.addUrl() || ''
            +                    , data: {
            +                        parentId: _parentId
            +                        , data: _data
            +                    }
            +                    , dataType: "json"
            +                    , success: function( _data ) {
            +                        if( _data ) {
            +                            _p._view.refreshNode( _parentId );
            +
            +                            _cb && _cb( _data );
            +                        }
            +                    }
            +                } );
            +            }
            +
            +        /**
            +         * 刷新某个节点
            +         * @method  refreshNode
            +         * @param   {string}    _nodeId    节点ID
            +         */
            +        , refreshNode:
            +            function( _nodeId ) {
            +                this._view.refreshNode( _nodeId );
            +            }
            +
            +        /**
            +         * 获取树的 ID 前缀
            +         * <br />每个树都会有自己的随机ID前缀
            +         * @method  idPrefix
            +         * @return  {string}    树的ID前缀
            +         */
            +        , idPrefix: function(){ return this._model.idPrefix(); }
            +        /**
            +         * 获取树的节点 label
            +         * @method  getItem
            +         * @param   {string|int}    _nodeId     
            +         */
            +        , getItem:
            +            function( _nodeId ){
            +                var _r;
            +                _nodeId && ( _r = $('#' + this._model.id( _nodeId ) ) );
            +                return _r;
            +            }
            +        /**
            +         * 获取或设置树的高亮节点
            +         * @method  selectedItem
            +         * @param   {selector}  _selector
            +         * @return  selector
            +         */
            +        , selectedItem:
            +            function( _selector ){
            +                return this._view.selectedItem( _selector );
            +            }
            +        , highlight:
            +            function(){
            +                return this.selectedItem.apply( this, JC.f.sliceArgs( arguments ) );
            +            }
            +        
            +    });
            +
            +    AjaxTree.Model._instanceName = 'JCAjaxTreeIns';
            +
            +    AjaxTree.Model._insCount = 1;
            +    
            +    JC.f.extendObject( AjaxTree.Model.prototype, {
            +        init:
            +            function(){
            +                /**
            +                 * 展现树需要的数据
            +                 * @type    object
            +                 */
            +                this._data
            +                /**
            +                 * 树的随机ID前缀
            +                 * @type    string
            +                 */
            +                this._id = JC.f.printf( 'tree_{0}_{1}_', new Date().getTime(), AjaxTree.Model._insCount++ );
            +                /**
            +                 * 树当前的高亮节点
            +                 * @type    selector
            +                 */
            +                this._highlight;
            +                /**
            +                 * 保存树的所有绑定事件
            +                 * @type    object
            +                 */
            +                this._events = {};
            +
            +            }
            +        , parseInitData:
            +            function(){
            +                var _p = this, _data;
            +                if( _p.is( '[data-cajScriptData]' ) ){
            +                    _data = _p.scriptDataProp( 'data-cajScriptData' );
            +                }else if( _p.is( '[data-cajData]' ) ){
            +                    _data = _p.windowProp( 'data-cajData' );
            +                    _data && ( _data = $.parseJSON( JSON.stringify( _data ) ) );
            +                }
            +                _data && ( _data.data = _data.data || {} );
            +                return _data;
            +            }
            +        , idIndex:
            +            function(){
            +                if( typeof this._idIndex == 'undefined' ){
            +                    this._idIndex = this.attrProp( 'data-idIndex' ) || 1;
            +                }
            +                return this._idIndex;
            +            }
            +        , nameIndex:
            +            function(){
            +                if( typeof this._nameIndex == 'undefined' ){
            +                    this._nameIndex = this.attrProp( 'data-nameIndex' ) || 2;
            +                }
            +                return this._nameIndex;
            +            }
            +        , typeIndex:
            +            function(){
            +                if( typeof this._typeIndex == 'undefined' ){
            +                    this._typeIndex = this.attrProp( 'data-typeIndex' ) || 0;
            +                }
            +                return this._typeIndex;
            +            }
            +        /**
            +         * 获取树所要展示的容器
            +         * @return  selector
            +         */
            +        , selector: function(){ return this._selector; }
            +        /**
            +         * 获取节点将要显示的ID
            +         * @param   {string}    _id 节点的原始ID
            +         * @return  string  节点的最终ID
            +         */
            +        , id: function( _id ){ return this._id + _id; }
            +        /**
            +         *  获取树的随机ID前缀
            +         *  @return string
            +         */
            +        , idPrefix: function(){ return this._id; }
            +        /**
            +         * 获取树的原始数据
            +         * @return  object
            +         */
            +        , data: 
            +            function( _setter ){ 
            +                if( typeof _setter != 'undefined' ){
            +                    this._data = _setter;
            +                    AjaxTree.dataFilter && ( this._data = AjaxTree.dataFilter( this._data ) );
            +                }
            +                return this._data; 
            +            }
            +        /**
            +         * 获取树生成后的根节点
            +         * @return  selector
            +         */
            +        , root: function(){ return this._data.root; }
            +        /**
            +         * 获取ID的具体节点
            +         * @param   {string}    _id
            +         * @return  selector
            +         */
            +        , child: function( _id ){ 
            +            var _r = this._data.data[ _id ]; 
            +            !( _r && _r.length ) && ( _r = [] );
            +            return _r;
            +        }
            +        /**
            +         * 判断原始数据的某个ID是否有子级节点
            +         * @param   {string}    _id
            +         * @return  bool
            +         */
            +        , hasChild: function( _id ){ return _id in this._data.data; }
            +        /**
            +         * 获取或设置树的高亮节点
            +         * <br /><b>注意:</b> 这个只是数据层面的设置, 不会影响视觉效果
            +         * @param   {selector}  _item
            +         * @return  selector
            +         */
            +        , highlight:
            +            function( _highlight ){
            +                _highlight && ( this._highlight = $( _highlight ) );
            +                return this._highlight;
            +            }
            +
            +        , urlArgName:
            +            function(){
            +                var _r = this.attrProp( 'data-urlArgName' ) || 'tree_node';
            +                return _r;
            +            }
            +
            +        , getNodeById:
            +            function( _nodeId ){
            +                var target = null;
            +                if( _nodeId ){
            +                    target = $( '#' + this.id( _nodeId ) );
            +                }
            +                return target;
            +            }
            +        , defaultOpenRoot:
            +            function(){
            +                var _r = true;
            +                this.is( '[data-defaultOpenRoot]' ) && ( _r = this.boolProp( 'data-defaultOpenRoot' ) );
            +                return _r;
            +            }
            +
            +        , ajaxData:
            +            function( _id, _cb ){
            +                _id = _id || '';
            +                var _url = JC.f.printf( this.data().url, _id );
            +
            +                $.ajax({
            +                    type: "GET",
            +                    url: _url,
            +                    dataType: "json",
            +                    success: function( _data ){
            +                        _cb && _cb( _data );
            +                    }
            +                });
            +                return this;
            +            }
            +
            +        , url:
            +            function(){
            +                return this.attrProp( 'data-cajUrl' ) || '';
            +            }
            +
            +        , rootId:
            +            function(){
            +                return this.attrProp( 'data-rootId' ) || '';
            +            }
            +
            +        , addUrl:
            +            function(){
            +                return this.attrProp( 'data-addUrl' ) || '';
            +            }
            +    });
            +
            +    JC.f.extendObject( AjaxTree.View.prototype, {
            +        /**
            +         * 初始化树的可视状态
            +         */
            +        init:
            +            function() {
            +
            +                return this;
            +            }
            +        /**
            +         * 处理树的展现效果
            +         * @param   {array}     _data   节点数据
            +         * @param   {selector}  _parentNode
            +         */
            +        , _process:
            +            function( _data, _parentNode ){
            +
            +                var _p = this;
            +                if( !( _data && _data.length ) ) return;
            +                for( var i = 0, j = _data.length, _item, _isLast; i < j; i++ ){
            +                    _item = _data[ i ];
            +                    _isLast = i === j - 1;
            +
            +                    if( 'folder' == _item[ _p._model.typeIndex() ] ){
            +                        this._initFolder( _parentNode, _item, _isLast );
            +                    }else{
            +                        this._initFile( _parentNode, _item, _isLast );
            +                    }
            +                }
            +            }
            +        /**
            +         * 初始化树根节点
            +         */
            +        , _initRoot:
            +            function(){
            +                var _p = this;
            +
            +                if( !_p._model.data().root ) return;
            +
            +                var _data, _parentNode, _label, _node, _span, _r;
            +                
            +                _data = _p._model.data().root;
            +                _parentNode = $( '<ul class="ajtree_wrap"></ul>' );
            +
            +                _label = this._initLabel( _data );
            +
            +
            +                if( !( _data[ _p._model.idIndex() ] in ( _p._model.data().data || {} ) ) ){
            +                    _node = $( '<li class="folder_closed"></li>' );
            +                    _span = $( '<span class="folder_img_root folderRoot folder_img_closed">&nbsp;</span>' );
            +                }else{
            +                    _node = $( '<li class="folder_open"></li>' );
            +                    _span = $( '<span class="folder_img_root folderRoot folder_img_open">&nbsp;</span>' );
            +                }
            +
            +                //_node.html( '<span class="folder_img_root folderRoot folder_img_open">&nbsp;</span>' );
            +                _span.appendTo( _node );
            +                _label.appendTo( _node );
            +
            +                _span.on( 'click', function( e ){
            +                    _p.folderClick( _data[ _p._model.idIndex() ] );
            +                });
            +
            +                _node.appendTo( _parentNode );
            +                _parentNode.appendTo( _p._model.selector() );
            +
            +                this.selector( _parentNode );
            +
            +                _r =  $( '<ul style="" class="ajtree_wrap_inner"></ul>' )
            +                _r.appendTo( _node );
            +
            +                return _r;
            +            }
            +        /**
            +         * 初始化树的文件夹节点
            +         * @param   {selector}  _parentNode
            +         * @param   {object}    _data
            +         * @param   {bool}      _isLast
            +         */
            +        , _initFolder:
            +            function( _parentNode, _data, _isLast ){
            +
            +                var _p = this, _last = '', _last1 = '';
            +                    _isLast && ( _last = 'folder_span_lst ', _last1 = 'folder_last' );
            +
            +                var _label = this._initLabel( _data );
            +
            +                var _node = $( JC.f.printf( '<span class="folder_img_closed folder {1}">&nbsp;</span>', _data[ _p._model.nameIndex() ], _last ) );
            +                var _li = $('<li></li>');
            +                    _li.addClass( JC.f.printf( 'folder_closed {0} folder', _last1 ));
            +                    _node.appendTo( _li );
            +                    _label.appendTo( _li );
            +
            +                var _r =  $( '<ul style="display:none;" class="folder_ul_lst" ></ul>' );
            +
            +                $( _node ).on( 'click', function( e ){
            +                    _p.folderClick( _data[ _p._model.idIndex() ] );
            +                });
            +                _r.appendTo( _li );
            +
            +                _li.appendTo( _parentNode );
            +                this._process( this._model.child( _data[ _p._model.idIndex() ] ), _r );
            +            }
            +        /**
            +         * 初始化树的文件节点
            +         * @param   {selector}  _parentNode
            +         * @param   {object}    _data
            +         * @param   {bool}      _isLast
            +         */
            +        , _initFile:
            +            function( _parentNode, _data, _isLast ){
            +                var _p = this, _last = 'folder_img_bottom ', _last1 = '';
            +                    _isLast && ( _last = 'folder_img_last ', _last1 = '' );
            +
            +                var _label = this._initLabel( _data );
            +
            +                var _node = $( JC.f.printf( '<li><span class="{1}file">&nbsp;</span></li>', _data[ _p._model.nameIndex() ], _last ) );
            +                    _node.addClass( 'folder_closed file');
            +                    _label.appendTo( _node );
            +
            +                    _node.appendTo( _parentNode );
            +            }
            +        /**
            +         * 初始化树的节点标签
            +         * @param   {object}    _data
            +         * @return  selector
            +         */
            +        , _initLabel:
            +            function( _data ){
            +                var _p = this, _label = $('<div class="node_ctn"></div>');
            +                    _label.attr( 'id', this._model.id( _data[ _p._model.idIndex() ] ) )
            +                        .attr( 'data-id', _data[ _p._model.idIndex() ] )
            +                        .attr( 'data-name', _data[ _p._model.nameIndex() ] )
            +                        .attr( 'data-type', _data[ _p._model.typeIndex() ] || '' )
            +                        .data( 'nodeData', _data );
            +
            +                _label.html( _data[ _p._model.nameIndex() ] || '没有标签' );
            +                _p.notification( 'renderItem', [ _label, _data ] );
            +                return _label;
            +            }
            +        /**
            +         * 展开树的所有节点
            +         */
            +        , openAll:
            +            function(){
            +                if( !this.selector() ) return;
            +                this.selector().find('span.folder_img_closed').each( function(){
            +                    $(this).trigger('click');
            +                });
            +            }
            +        /**
            +         * 关闭树的所有节点
            +         */
            +        , closeAll:
            +            function(){
            +                if( !this.selector() ) return;
            +                this.selector().find('span.folder_img_open, span.folder_img_root').each( function(){
            +                    if( $(this).hasClass( 'folder_img_closed' ) ) return;
            +                    $(this).trigger('click');
            +                });
            +            }
            +        /**
            +         * 展开树到具体节点
            +         * @param   {string}    _nodeId
            +         */
            +        , openUI: 
            +            function( _nodeId ){
            +                var _p = this;
            +                var _tgr = _p._model.getNodeById( _nodeId );
            +
            +                if( !_tgr.length ) return;
            +
            +                var lis = _tgr.parents('li');
            +                this.selectedItem( _tgr );
            +
            +                lis.each( function(){
            +                    var _sp = $(this), _child = _sp.find( '> span.folderRoot, > span.folder' );
            +                    if( _child.length ){
            +                        if( _child.hasClass( 'folder_img_open' ) ) return;
            +                        _child.trigger( 'click' );
            +                    }
            +                });
            +            }
            +        , selectedItem:
            +            function( _selector ){
            +                _selector && ( _selector = $( _selector ) );
            +                if( !( _selector && _selector.length ) ) return this._model.highlight();
            +
            +                if( this._model.highlight() ) {
            +                    this._model.highlight().removeClass('highlight').removeClass( 'selectedAjaxTreeNode' );
            +                }
            +                _selector.addClass( 'highlight' ).addClass( 'selectedAjaxTreeNode' );
            +
            +                this._model.highlight( _selector );
            +                return _selector;
            +            }
            +        /**
            +         * 关闭树的具体节点
            +         * @param   {string}    _nodeId
            +         */
            +        , close:
            +            function( _nodeId ){
            +                var _p = this;
            +                var _tgr = _p._model.getNodeById( _nodeId );
            +                
            +                if( !_tgr.length ) return;
            +
            +                var _child = _tgr.parent('li').find( '> span.folderRoot, > span.folder' );
            +                if( _child.length ){
            +                    if( _child.hasClass( 'folder_img_closed' ) ) return;
            +                    _child.trigger( 'click' );
            +                }
            +                
            +            }
            +        , nodeImgClick:
            +            function( _nodeId ){
            +                var _p = this, 
            +                    _node = _p._model.getNodeById( _nodeId ),
            +                    _nodeImg = _node.siblings('span'),
            +                    _pntLi = _node.parent('li'), 
            +                    _childUl = _pntLi.find( '> ul');
            +                var _treeselector = JC.f.getJqParent( _node, 'div.js_compAjaxTree' )
            +                    , _treeIns = _treeselector.data( AjaxTree.Model._instanceName )
            +                    ;
            +                if( !_treeIns ) return;
            +
            +                if( _nodeImg.hasClass( 'folder_img_open' ) ){
            +                    _nodeImg.removeClass( 'folder_img_open' ).addClass( 'folder_img_closed' );
            +                    _childUl.hide();
            +                }else if( _nodeImg.hasClass( 'folder_img_closed' ) ){
            +                    _nodeImg.addClass( 'folder_img_open' ).removeClass( 'folder_img_closed' );
            +                    _childUl.show();
            +                }
            +
            +                if( _pntLi.hasClass('folder_closed') ){
            +                    _pntLi.addClass('folder_open').removeClass('folder_closed');
            +                }else if( _pntLi.hasClass('folder_open') ){
            +                    _pntLi.removeClass('folder_open').addClass('folder_closed');
            +                }
            +            }
            +        , folderClick:
            +            function( _nodeId ){
            +
            +                var _p = this,
            +                    _model = _p._model,
            +                    _node = _model.getNodeById( _nodeId ),
            +                    _pntLi = _node.parent('li');
            +                if( _pntLi.hasClass( 'folder_open' ) ){
            +                    _p.nodeImgClick( _nodeId );
            +                } else {
            +                    _p.openFolder( _nodeId );
            +                }
            +            }
            +        , openFolder:
            +            function( _nodeId, _callback ){
            +                var _p = this,
            +                    _model = _p._model,
            +                    _node = _model.getNodeById( _nodeId ),
            +                    _pntLi = _node.parent('li'),
            +                    _nodeImg = _node.siblings('span'),
            +                    _nodeUl = _node.siblings('ul'),
            +                    _type = ( _node.attr( 'data-type' ) || 'file' )
            +                    ;
            +
            +                if( _type == 'file' ){
            +                    _callback && _callback();
            +                    return;
            +                }
            +                
            +                if( _nodeUl.data( 'inited' ) || _nodeUl.children('li').length > 0 ){/* 已经初始化子节点 展开 */
            +                    _p.nodeImgClick( _nodeId );
            +                    _callback && _callback();
            +                } else {/* 通过ajxa获取数据 */
            +                    _nodeImg.removeClass('folder_img_closed');
            +                    _p.showDataLoading( _node );
            +                    _nodeUl.data( 'inited', true );
            +
            +                    if( !_model.data().url ){
            +                        _p.hideDataLoading( _node );
            +                        return;
            +                    }
            +
            +                    _p._model.ajaxData( _nodeId, function( _data ){
            +                        _pntLi.addClass('folder_open').removeClass('folder_closed');
            +                        _p.hideDataLoading( _node );
            +                        _p._process( _data.data, _nodeUl.show() );
            +                        _callback && _callback();
            +                    });
            +                }
            +            }
            +
            +        /**
            +         * 更新树的具体节点
            +         * @param   {string}    _nodeId
            +         */
            +        , refreshNode: function( _nodeId ) {
            +            var _p = this
            +                , _model = _p._model
            +                , _node = _model.getNodeById( _nodeId )
            +                , _nodeUl = _node.siblings('ul')
            +                , _pntLi = _node.parent('li');
            +
            +            _node.closest( 'li' ).children('ul').children().remove();
            +
            +            _p._model.ajaxData( _nodeId, function( _data ){
            +                _pntLi.addClass('folder_open').removeClass('folder_closed');
            +                _p.hideDataLoading( _node );
            +                _p._process( _data.data, _nodeUl.show() );
            +            });
            +        }
            +
            +        , showDataLoading: function( _node ){
            +            _node.siblings('span').removeClass('folder_img_closed').addClass('folder_img_loading');
            +        }
            +
            +        , hideDataLoading: function( _node ){
            +            _node.siblings('span').removeClass('folder_img_loading').addClass('folder_img_open');
            +        }
            +    });
            +    /**
            +     * 树节点的点击事件
            +     * @event   click
            +     * @param   {event}     _evt
            +     * @example
            +            $( document ).delegate( 'div.js_compAjaxTree', 'click', function( _evt, _item, _data, _box ){
            +                JC.dir( _item[0], _data, _box[0] );
            +            });
            +     */
            +    /**
            +     * 树节点的change事件
            +     * @event   change
            +     * @param   {event}     _evt
            +     * @example
            +            $( document ).delegate( 'div.js_compAjaxTree', 'change', function( _evt, _item, _data, _box ){
            +                JC.dir( _item[0], _data, _box[0] );
            +            });
            +     */
            +
            +    /**
            +     * 树节点的展现事件
            +     * @event   RenderLabel
            +     * @param   {array}     _data
            +     * @param   {selector}  _item
            +     * @example
            +            _tree.on('RenderLabel', function( _data ){
            +                var _node = $(this);
            +                _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) );
            +            });
            +     */
            +
            +    /**
            +     * 树文件夹的点击事件
            +     * @event   FolderClick
            +     * @param   {event}     _evt
            +     * @example
            +            _tree.on('FolderClick', function( _evt ){
            +                var _p = $(this);
            +                alert( 'folder click' );
            +            });
            +     */
            +    /**
            +     * 树的最后的 hover 节点
            +     * <br />树的 hover 是全局属性, 页面上的所有树只会有一个当前 hover
            +     * @property    lastHover
            +     * @type    selector
            +     * @default null
            +     */
            +    AjaxTree.lastHover = null;
            +
            +    JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn', 'mouseenter', function(){
            +        if( AjaxTree.lastHover ) AjaxTree.lastHover.removeClass('ms_over');
            +        $(this).addClass('ms_over');
            +        AjaxTree.lastHover = $(this);
            +    });
            +    JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn', 'mouseleave', function(){
            +        if( AjaxTree.lastHover ) AjaxTree.lastHover.removeClass('ms_over');
            +    });
            +
            +    JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn a[href]', 'click', function( _evt ){
            +        var _p = $( this )
            +            , _href = ( _p.attr( 'href' ) || '' ).trim().replace( /[\s]+/g, '' )
            +            , _idList
            +            , _node 
            +            , _treeBox, _treeIns
            +            , _args
            +            ;
            +        if( /^(javascript\:|#)/.test( _href ) ) return;
            +
            +        _node = JC.f.getJqParent( _p, 'div.node_ctn' );
            +        if( !( _node && _node.length ) ) return;
            +
            +        _treeBox = JC.f.getJqParent( _p, '.js_compAjaxTree' );
            +        if( !( _treeBox && _treeBox.length ) ) return;
            +
            +        _treeIns = JC.BaseMVC.getInstance( _treeBox, JC.AjaxTree );
            +        if( !_treeIns ) return;
            +
            +        _idList = JWIN.triggerHandler( 'AJAXTREE_GET_PARENT_LIST', [ _node ] );
            +        _args = {};
            +        _args[ _treeIns._model.urlArgName() ] = _idList.join(',');
            +        _p.attr( 'href', JC.f.addUrlParams( _href, _args ) ); 
            +    });
            +
            +    JWIN.on( 'AJAXTREE_GET_PARENT_LIST', function( _evt, _node, _list ){
            +        _list = _list || [];
            +        _node = $( _node );
            +        var _pntUl, _pntNode;
            +
            +        _list.unshift( _node.attr( 'data-id' ) );
            +
            +        _pntUl = JC.f.getJqParent( _node, 'ul' );
            +        if( _pntUl 
            +            && _pntUl.length 
            +            && ( _pntUl.is( '.folder_ul_lst' ) || _pntUl.is( '.ajtree_wrap_inner' ) ) 
            +        ){
            +            _pntNode = _pntUl.prev( 'div.node_ctn' );
            +            if( _pntNode && _pntNode.length ){
            +                JWIN.trigger( 'AJAXTREE_GET_PARENT_LIST', [ _pntNode, _list ] );
            +            }
            +        }
            +
            +        return _list;
            +    });
            +
            +    JDOC.delegate( '.js_compAjaxTree ul.ajtree_wrap div.node_ctn', 'click', function( _evt ){
            +        var _p = $(this)
            +            , _treeselector = JC.f.getJqParent( _p, '.js_compAjaxTree' )
            +            , _treeIns = _treeselector.data( AjaxTree.Model._instanceName )
            +            , _nodeData, _tmpData
            +            , _isChange = true
            +            ;
            +
            +        if( !_treeIns ) return;
            +
            +        _treeIns.open( _p.attr( 'data-id' ) );
            +
            +        if( _treeselector.data( 'AT_PRESELECTED_ID' ) == _p.attr( 'data-id' ) ){
            +        }else{
            +            _treeselector.data( 'AT_PRESELECTED_ID', _p.attr( 'data-id' ) );
            +            _treeselector.trigger( 'change', [ _p, _p.data( 'nodeData' ), _treeselector ] );
            +        }
            +    });
            +
            +    JDOC.ready( function(){
            +        JC.f.safeTimeout( function(){
            +            AjaxTree.autoInit && AjaxTree.init();
            +        }, null, 'JCAjaxTreeInit', 1 );
            +    });
            +
            +    return JC.AjaxTree;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_AjaxUpload_AjaxUpload.js.html b/docs_api/files/.._comps_AjaxUpload_AjaxUpload.js.html index 0dbf1f623..8f5a22743 100644 --- a/docs_api/files/.._comps_AjaxUpload_AjaxUpload.js.html +++ b/docs_api/files/.._comps_AjaxUpload_AjaxUpload.js.html @@ -3,11 +3,17 @@ ../comps/AjaxUpload/AjaxUpload.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,18 +252,19 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            -;(function(define, _win) { 'use strict'; define( [ 'JC.common', 'JC.BaseMVC' ], function(){
            -;(function($){
            +//TODO: 添加文件大小判断
            +(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Panel' ], function(){
                 /**
                  * Ajax 文件上传
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     *      , <a href='JC.Panel.html'>JC.Panel</a>
            +     * </p>
                  * <p>
                  *      <a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  *      | <a href='http://jc.openjavascript.org/docs_api/classes/JC.AjaxUpload.html' target='_blank'>API docs</a>
                  *      | <a href='../../comps/AjaxUpload/_demo' target='_blank'>demo link</a>
                  * </p>
            -     * <p>
            -     *      <b>require</b>: <a href='window.jQuery.html'>jQuery</a>
            -     * </p>
                  * <h2>可用的 html attribute</h2>
                  * <dl>
                  *      <dt>cauStyle = string, default = g1</dt>
            @@ -214,12 +287,30 @@ 

            File: ../comps/AjaxUpload/AjaxUpload.js

            * 上传完成后是否隐藏上传按钮 * </dd> * + * <dt>cauButtonAfter= bool</dt> + * <dd>是否把上传按钮放在后面</dd> + * * <dt>cauUrl = url, require</dt> - * <dd>上传文件的接口地址</dd> + * <dd>上传文件的接口地址 + * <br />如果 url 带有参数 callback, 返回数据将以 jsonp 方式处理 + * </dd> + * + * <dt>cauJSONPName = function name</dt> + * <dd>显式声明上传后返回数据的 jsonp 回调名 + * <h3>jsonp 返回数据示例:</h3> +url: ?callback=callback +<br /> data: +&lt;script> + window.parent && window.parent.callback && window.parent.callback( {"errorno":0,"errmsg":"","data":{"name":"test.jpg","url":".\/data\/images\/test.jpg"}} ); +&lt;/script> + * </dd> * * <dt>cauFileExt = file ext, optional</dt> * <dd>允许上传的文件扩展名, 例: ".jpg, .jpeg, .png, .gif"</dd> * + * <dt>cauFileSize = [ KB | MB | GB ], default = 1024 MB</dt> + * <dd>上传文件大小限制</dd> + * * <dt>cauFileName = string, default = file</dt> * <dd>上传文件的 name 属性</dd> * @@ -241,34 +332,40 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            * <dt>cauUploadDoneCallback = function, optional</dt> * <dd> * 文件上传完毕时, 触发的回调 -<xmp>function cauUploadDoneCallback( _json, _selector, _frame ){ +<pre>function cauUploadDoneCallback( _json, _selector, _frame ){ var _ins = this; //alert( _json ); //object object -}</xmp> +}</pre> * </dd> * * <dt>cauUploadErrorCallback = function, optional</dt> * <dd> * 文件上传完毕时, 发生错误触发的回调 -<xmp>function cauUploadErrorCallback( _json, _selector, _frame ){ +<pre>function cauUploadErrorCallback( _json, _selector, _frame ){ var _ins = this; //alert( _json ); //object object -}</xmp> +}</pre> * </dd> * * <dt>cauDisplayLabelCallback = function, optional, return = string</dt> * <dd> * 自定义上传完毕后显示的内容 模板 -<xmp>function cauDisplayLabelCallback( _json, _label, _value ){ +<pre>function cauDisplayLabelCallback( _json, _label, _value ){ var _selector = this - , _label = printf( '<a href="{0}" class="green js_auLink" target="_blank">{1}</a>{2}' + , _label = JC.f.printf( '&lt;a href="{0}" class="green js_auLink" target="_blank">{1}&lt;/a>{2}' , _value, _label - , '&nbsp;<a href="javascript:" class="btn btn-cls2 js_cleanCauData"></a>&nbsp;&nbsp;' + , '&nbsp;&lt;a href="javascript:" class="btn btn-cls2 js_cleanCauData">&lt;/a>&nbsp;&nbsp;' ) ; return _label; -}</xmp> +}</pre> * </dd> + * + * <dt>cauViewFileBox = selector</dt> + * <dd>用于显示文件链接的容器</dd> + * + * <dt>cauViewFileBoxItemTpl = selector</dt> + * <dd>cauViewFileBox 的脚本模板</dd> * </dl> * @namespace JC * @class AjaxUpload @@ -312,6 +409,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            } */ JC.AjaxUpload = AjaxUpload; + JC.f.addAutoInit && JC.f.addAutoInit( AjaxUpload ); function AjaxUpload( _selector ){ if( AjaxUpload.getInstance( _selector ) ) return AjaxUpload.getInstance( _selector ); @@ -386,7 +484,8 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            * @static * @private */ - AjaxUpload._FRAME_DIR = "comps/AjaxUpload/frame/"; + AjaxUpload._FRAME_DIR = "modules/JC.AjaxUpload/0.1/frame/"; + define && !define.amd && ( AjaxUpload._FRAME_DIR = 'comps/AjaxUpload/frame/' ); /** * 初始化 frame 时递增的统计变量 * @property _INS_COUNT @@ -397,16 +496,23 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            */ AjaxUpload._INS_COUNT = 1; - AjaxUpload.prototype = { + BaseMVC.build( AjaxUpload ); + + JC.f.extendObject( AjaxUpload.prototype, { _beforeInit: function(){ var _p = this; - JC.log( 'AjaxUpload _beforeInit', new Date().getTime() ); + //JC.log( 'AjaxUpload _beforeInit', new Date().getTime() ); } , _initHanlderEvent: function(){ - var _p = this; + var _p = this, _fileBox = _p._model.cauViewFileBox(); + if( _fileBox && _fileBox.length ){ + _fileBox.delegate( '.js_clearAjaxUpload', 'click', function(){ + _p.clear(); + }); + } /** * iframe 加载完毕后触发的事件, 执行初始化操作 */ @@ -424,23 +530,18 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            }, 1); } - _p._model.selector().on( 'show', function( _evt ){ - JC.log( 'show'); - }); - - _p._model.selector().on( 'hide', function( _evt ){ - JC.log('hide'); - }); - - _p._model.frame().on( 'show', function( _evt ){ - JC.log( 'show'); - }); - - _p._model.frame().on( 'hide', function( _evt ){ - JC.log('hide'); - }); + _p._model.swfu( _w ); + _p._model.uploadReady( true ); + _p.trigger( 'UploadReady' ); }); + /** + * 文件大小错误 + */ + _p.on( 'ERR_FILE_SIZE', function( _evt, _flPath ){ + _p._view.errFileSize( _flPath ); + _p._view.updateChange(); + }); /** * 文件扩展名错误 */ @@ -453,12 +554,20 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            */ _p.on( 'BeforeUpload', function( _d ){ _p._view.beforeUpload(); + _p._model.cauBeforeUploadCallback() + && _p._model.cauBeforeUploadCallback().call( + _p + , _d + , _p._model.selector() + , _p._model.frame() + ); }); /** * 上传完毕触发的事件 */ - _p.on( 'UploadDone', function( _evt, _d ){ - JC.log( _d ); + _p.on( 'UploadDone', function( _evt, _d, _ignore ){ + if( _ignore ) return; + //JC.log( _d ); var _err = false, _od = _d; try{ typeof _d == 'string' && ( _d = $.parseJSON( _d ) ); @@ -471,11 +580,12 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            _p._view.updateChange(); _p._model.cauUploadErrorCallback() - && _p._model.cauUploadErrorCallback().call( _p - , _d - , _p._model.selector() - , _p._model.frame() - ); + && _p._model.cauUploadErrorCallback().call( + _p + , _d + , _p._model.selector() + , _p._model.frame() + ); }else{ if( _d.errorno ){ _p._view.errUpload( _d ); @@ -484,11 +594,12 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            _p._view.updateChange( _d ); } _p._model.cauUploadDoneCallback() - && _p._model.cauUploadDoneCallback().call( _p - , _d - , _p._model.selector() - , _p._model.frame() - ); + && _p._model.cauUploadDoneCallback().call( + _p + , _d + , _p._model.selector() + , _p._model.frame() + ); } }); /** @@ -498,15 +609,43 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            _p.on( 'AUUpdateLayout', function( _evt, _width, _height, _btn ){ _p._view.updateLayout( _width, _height, _btn ); }); + + _p.on( 'init', function(){ + _p._model.loadSWF( _p._model.getParams() ); + }); + + _p.on( 'disable', function(){ + if( !_p._model.uploadReady() ){ + _p._model.beforeReadyQueue( function(){ _p._view.disable(); } ); + } + _p._view.disable(); + }); + + _p.on( 'enable', function(){ + if( !_p._model.uploadReady() ){ + _p._model.beforeReadyQueue( function(){ _p._view.enable(); } ); + } + _p._view.enable(); + }); + + _p.on( 'UploadReady', function(){ + var _queue = _p._model.beforeReadyQueue(); + setTimeout( function(){ + $.each( _queue, function( _ix, _item ){ + _item(); + }); + }, 10 ); + }); + } , _inited: function(){ var _p = this; - JC.log( 'AjaxUpload _inited', new Date().getTime() ); + //JC.log( 'AjaxUpload _inited', new Date().getTime() ); _p._view.loadFrame(); AjaxUpload.getInstance( _p._model.frame(), _p ); - _p.trigger( 'AUInited' ); + _p.trigger( 'inited' ); } /** * 手动更新数据 @@ -524,6 +663,16 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            "errmsg": "" }); */ + /** + * 禁用上传按钮 + * @method disable + */ + , disable: function(){ this.trigger( 'disable' ); return this; } + /** + * 启用上传按钮 + * @method enable + */ + , enable: function(){ this.trigger( 'enable' ); return this; } , update: function( _d ){ var _p = this; @@ -531,14 +680,20 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            _d && _p.trigger('UploadDone', [ _d ] ); return this; } - }; - BaseMVC.buildModel( AjaxUpload ); + , clear: + function(){ + var _p = this; + $( _p._view ).trigger('UpdateDefaultStatus') + return this; + } + }); + AjaxUpload.Model._instanceName = 'AjaxUpload'; - AjaxUpload.Model.prototype = { + JC.f.extendObject( AjaxUpload.Model.prototype, { init: function(){ - JC.log( 'AjaxUpload.Model.init:', new Date().getTime() ); + //JC.log( 'AjaxUpload.Model.init:', new Date().getTime() ); } , cauStyle: function(){ return this.attrProp('cauStyle'); } @@ -548,6 +703,8 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            , cauFileExt: function(){ return this.stringProp( 'cauFileExt' ); } + , cauFileSize: function(){ return this.stringProp( 'cauFileSize' ) || '1024 MB'; } + , cauFileName: function(){ return this.attrProp('cauFileName') || this.attrProp('name'); @@ -578,6 +735,11 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            return this.boolProp( 'cauDefaultHide' ); } + , cauBeforeUploadCallback: + function(){ + return this.callbackProp( 'cauBeforeUploadCallback' ); + } + , cauUploadDoneCallback: function(){ return this.callbackProp( 'cauUploadDoneCallback' ); @@ -588,16 +750,27 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            return this.callbackProp( 'cauUploadErrorCallback' ); } + , cauJSONPName: + function(){ + var _r = AjaxUpload.JSONPName; + + _r = JC.f.getUrlParam( this.cauUrl(), 'callback' ) || _r; + _r = this.attrProp( 'cauJSONPName' ) || _r; + + return _r; + } + , framePath: function(){ var _fl = this.attrProp('cauFrameFileName') || AjaxUpload.frameFileName - , _r = printf( '{0}{1}{2}', JC.PATH, AjaxUpload._FRAME_DIR, _fl ) + , _r = JC.f.printf( '{0}{1}{2}', JC.PATH, AjaxUpload._FRAME_DIR, _fl ) ; this.randomFrame() - && ( _r = addUrlParams( _r, { 'rnd': new Date().getTime() } ) ) + && ( _r = JC.f.addUrlParams( _r, { 'rnd': new Date().getTime() } ) ) ; return _r; } + , cauButtonAfter: function(){ return this.boolProp( 'cauButtonAfter' ); } , randomFrame: function(){ var _r = AjaxUpload.randomFrame; @@ -612,7 +785,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            if( !this._iframe ){ var _tpl = AjaxUpload.frameTpl; if( this.selector().is('[cauFrameScriptTpl]') ){ - _tpl = scriptContent( parentSelector( + _tpl = JC.f.scriptContent( JC.f.parentSelector( this.selector() , this.selector().attr('cauFrameScriptTpl') ) @@ -622,14 +795,74 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            } return this._iframe; } - }; - BaseMVC.buildView( AjaxUpload ); - AjaxUpload.View.prototype = { + , cauCancelCallback: function(){ return this.callbackProp( 'cauCancelCallback' ); } + + , uploadReady: + function( _setter ){ + typeof _setter != 'undefined' && ( this._uploadReady = _setter ); + return this._uploadReady; + } + + , beforeReadyQueue: + function( _item ){ + !this._beforeReadyQueue && ( this._beforeReadyQueue = [] ); + _item && this._beforeReadyQueue.push( _item ); + return this._beforeReadyQueue; + } + + , cauButtonAutoStatus: + function(){ + var _r = true; + this.is( '[cauButtonAutoStatus]' ) && ( _r = this.boolProp( 'cauButtonAutoStatus' ) ); + return _r; + } + + , swfu: + function( _setter ){ + typeof _setter != 'undefined' && ( this._swfu = _setter ); + return this._swfu; + } + + , cauViewFileBox: function(){ return this.selectorProp( 'cauViewFileBox' ); } + + , cauViewFileBoxItemTpl: + function(){ + var _r = [ '<a href="javascript:;" data-name="{0}" data-url="{1}" class="js_clearAjaxUpload">清除</a>' + , '&nbsp;<a href="{1}" target="_blank" data-name="{0}" data-url="{1}" class="js_viewAjaxUpload">查看</a>' ].join('') + , _tmp + ; + + this.is( '[cauViewFileBoxItemTpl]' ) + && ( _tmp = this.selectorProp( 'cauViewFileBoxItemTpl' ) ) + && _tmp.length + && ( _r = JC.f.scriptContent( _tmp ) ) + ; + + return _r; + } + }); + + JC.f.extendObject( AjaxUpload.View.prototype, { init: function(){ - JC.log( 'AjaxUpload.View.init:', new Date().getTime() ); + //JC.log( 'AjaxUpload.View.init:', new Date().getTime() ); var _p = this; + + $( _p ).on( 'update_viewFileBox', function( _evt, _name, _url ){ + var _box = _p._model.cauViewFileBox(), _itemTpl; + if( !( _box && _box.length ) ) return; + _itemTpl = _p._model.cauViewFileBoxItemTpl(); + _itemTpl = JC.f.printf( _itemTpl, _name, _url ); + _box.html( _itemTpl ); + }); + + $( _p ).on( 'clear_viewFileBox', function(){ + var _box = _p._model.cauViewFileBox(); + if( !( _box && _box.length ) ) return; + _box.html( '' ); + }); + /** * 恢复默认状态 */ @@ -647,6 +880,8 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            ( _p._model.selector().attr('type') || '' ).toLowerCase() != 'hidden' && _p._model.selector().show() ; + $( _p ).trigger( 'clear_viewFileBox' ); + _p.trigger( 'UploadComplete' ); }); $( _p ).on( 'CAUUpdate', function( _evt, _d ){ @@ -666,7 +901,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            if( _p._model.cauDisplayLabelCallback() ){ _label = _p._model.cauDisplayLabelCallback().call( _p._model.selector(), _d, _label, _value ); }else{ - _label = printf( '<a href="{0}" class="green js_auLink" target="_blank">{1}</a>', _value, _label); + _label = JC.f.printf( '<a href="{0}" class="green js_auLink" target="_blank">{1}</a>', _value, _label); } _displayLabel && _displayLabel.length @@ -681,22 +916,26 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            , _frame = _p._model.frame() ; - JC.log( _path ); + //JC.log( _path ); _frame.attr( 'src', _path ); _frame.on( 'load', function(){ - $(_p).trigger( 'TriggerEvent', 'FrameLoad' ); + _p.trigger( 'FrameLoad' ); }); //_p._model.selector().hide(); + //return; - _p._model.selector().before( _frame ); + _p._model.cauButtonAfter() + ? _p.selector().after( _frame ) + : _p.selector().before( _frame ) + ; } , beforeUpload: function(){ var _p = this, _statusLabel = _p._model.cauStatusLabel(); - JC.log( 'AjaxUpload view#beforeUpload', new Date().getTime() ); + //JC.log( 'AjaxUpload view#beforeUpload', new Date().getTime() ); this.updateChange( null, true ); @@ -712,6 +951,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            var _p = this , _statusLabel = _p._model.cauStatusLabel() , _displayLabel = _p._model.cauDisplayLabel() + , _name, _url ; //JC.log( 'AjaxUpload view#updateChange', new Date().getTime() ); @@ -732,11 +972,16 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            if( _d && ( 'errorno' in _d ) && !_d.errorno ){ $(_p).trigger( 'CAUUpdate', [ _d ] ); + _name = _d.data[ _p._model.cauLabelKey() ]; + _url = _d.data[ _p._model.cauValueKey() ]; + _p._model.selector().val() && _p._model.selector().is(':visible') && _p._model.selector().prop('type').toLowerCase() == 'text' && _p._model.selector().trigger('blur') ; + + $( _p ).trigger( 'update_viewFileBox', [ _name, _url ] ); if( _displayLabel && _displayLabel.length ){ _p._model.selector().hide(); @@ -755,7 +1000,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            function( _width, _height, _btn ){ if( !( _width && _height ) ) return; var _p = this; - JC.log( 'AjaxUpload @event UpdateLayout', new Date().getTime(), _width, _height ); + //JC.log( 'AjaxUpload @event UpdateLayout', new Date().getTime(), _width, _height ); _p._model.frame().css({ 'width': _width + 'px' , 'height': _height + 'px' @@ -764,7 +1009,12 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            , errUpload: function( _d ){ - var _p = this, _cb = _p._model.callbackProp( 'cauUploadErrCallback' ); + var _p = this + , _beforeErrorCb = _p._model.callbackProp( 'cauBeforeUploadErrCallback' ) + , _cb = _p._model.callbackProp( 'cauUploadErrCallback' ) + ; + + _beforeErrorCb && _beforeErrorCb.call( _p._model.selector(), _d ); if( _cb ){ _cb.call( _p._model.selector(), _d, _p._model.frame() ); }else{ @@ -782,7 +1032,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            if( _cb ){ _cb.call( _p._model.selector(), _p._model.cauFileExt(), _flPath, _p._model.frame() ); }else{ - var _msg = printf( '类型错误, 允许上传的文件类型: {0} <p class="auExtErr" style="color:red">{1}</p>' + var _msg = JC.f.printf( '类型错误, 允许上传的文件类型: {0} <p class="auExtErr" style="color:red">{1}</p>' , _p._model.cauFileExt(), _flPath ); JC.Dialog ? JC.Dialog.alert( _msg, 1 ) @@ -790,6 +1040,22 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            ; } } + + , errFileSize: + function( _flPath ){ + var _p = this, _cb = _p._model.callbackProp( 'cauFileExtErrCallback' ); + if( _cb ){ + _cb.call( _p._model.selector(), _p._model.cauFileSize(), _flPath, _p._model.frame() ); + }else{ + var _msg = JC.f.printf( '文件大小错误, 允许上传的文件大小为: {0} <p class="auExtErr" style="color:red">{1}</p>' + , _p._model.cauFileSize(), _flPath ); + JC.Dialog + ? JC.Dialog.alert( _msg, 1 ) + : alert( _msg ) + ; + } + + } , errFatalError: function( _d ){ @@ -797,7 +1063,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            if( _cb ){ _cb.call( _p._model.selector(), _d, _p._model.frame() ); }else{ - var _msg = printf( '服务端错误, 无法解析返回数据: <p class="auExtErr" style="color:red">{0}</p>' + var _msg = JC.f.printf( '服务端错误, 无法解析返回数据: <p class="auExtErr" style="color:red">{0}</p>' , _d ); JC.Dialog ? JC.Dialog.alert( _msg, 1 ) @@ -805,10 +1071,20 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            ; } } + + , disable: + function(){ + var _p = this, _swfu = _p._model.swfu(); + _swfu && ( _swfu.setButtonDisabled( true ) ); + } + + , enable: + function(){ + var _p = this, _swfu = _p._model.swfu(); + _swfu && ( _swfu.setButtonDisabled( false ) ); + } - }; - - BaseMVC.build( AjaxUpload ); + }); $.event.special.AjaxUploadShowEvent = { show: @@ -820,7 +1096,7 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            }; AjaxUpload.frameTpl = - printf( + JC.f.printf( '<iframe src="about:blank" frameborder="0" class="AUIframe" style="{0}"></iframe>' , 'width: 84px; height: 24px;cursor: pointer; vertical-align: middle;' ); @@ -830,8 +1106,16 @@

            File: ../comps/AjaxUpload/AjaxUpload.js

            AjaxUpload.autoInit && AjaxUpload.init(); }); -}(jQuery)); -});}(typeof define === 'function' && define.amd ? define : function (_require, _cb) { _cb && _cb(); }, this)); + return JC.AjaxUpload; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_AutoChecked_AutoChecked.js.html b/docs_api/files/.._comps_AutoChecked_AutoChecked.js.html index bcb095541..3967069df 100644 --- a/docs_api/files/.._comps_AutoChecked_AutoChecked.js.html +++ b/docs_api/files/.._comps_AutoChecked_AutoChecked.js.html @@ -3,11 +3,17 @@ ../comps/AutoChecked/AutoChecked.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,13 +252,15 @@

            File: ../comps/AutoChecked/AutoChecked.js

            - ;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
                 /**
                  * 全选/反选
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.AutoChecked.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/AutoChecked/_demo' target='_blank'>demo link</a></p>
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a></p>
                  * <h2>input[type=checkbox] 可用的 HTML 属性</h2>
                  * <dl>
                  *      <dt>checktype = string</dt>
            @@ -263,6 +337,7 @@ 

            File: ../comps/AutoChecked/AutoChecked.js

            */ JC.Form && ( JC.Form.initCheckAll = AutoChecked ); JC.AutoChecked = AutoChecked; + JC.f.addAutoInit && JC.f.addAutoInit( AutoChecked ); function AutoChecked( _selector ){ _selector = $( _selector ); @@ -273,7 +348,7 @@

            File: ../comps/AutoChecked/AutoChecked.js

            if( AutoChecked.getInstance( _selector ) ) return AutoChecked.getInstance( _selector ); AutoChecked.getInstance( _selector, this ); - JC.log( 'AutoChecked init', new Date().getTime() ); + //JC.log( 'AutoChecked init', new Date().getTime() ); this._model = new Model( _selector ); this._view = new View( this._model ); @@ -314,7 +389,7 @@

            File: ../comps/AutoChecked/AutoChecked.js

            }); $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ); _data.shift(); _data.shift(); + var _data = JC.f.sliceArgs( arguments ); _data.shift(); _data.shift(); _p.trigger( _evtName, _data ); }); @@ -334,19 +409,19 @@

            File: ../comps/AutoChecked/AutoChecked.js

            }); _p.on('all', function(){ - JC.log( 'AutoChecked all', new Date().getTime() ); + //JC.log( 'AutoChecked all', new Date().getTime() ); _p._view.allChange(); }); _p.on('inverse', function(){ - JC.log( 'AutoChecked inverse', new Date().getTime() ); + //JC.log( 'AutoChecked inverse', new Date().getTime() ); _p._view.inverseChange(); }); if( !( _p._model.checktype() == 'inverse' && _p._model.hasCheckAll() ) ){ $( _p._model.delegateElement() ).delegate( _p._model.delegateSelector(), 'click', function( _evt ){ if( AutoChecked.isAutoChecked( $(this) ) ) return; - JC.log( 'AutoChecked change', new Date().getTime() ); + //JC.log( 'AutoChecked change', new Date().getTime() ); _p._view.itemChange(); }); } @@ -475,11 +550,11 @@

            File: ../comps/AutoChecked/AutoChecked.js

            if( this.isParentSelector() ){ if( Model.parentNodeRe.test( this.checkfor() ) ){ this.checkfor().replace( /^([^\s]+)/, function( $0, $1 ){ - _r = parentSelector( _p.selector(), $1 ); + _r = JC.f.parentSelector( _p.selector(), $1 ); }); }else{ _tmp = this.checkfor().replace( Model.parentSelectorRe, '' ); - _r = parentSelector( _p.selector(), _tmp ); + _r = JC.f.parentSelector( _p.selector(), _tmp ); } } return _r; @@ -498,7 +573,7 @@

            File: ../comps/AutoChecked/AutoChecked.js

            var _r; if( this.checktype() == 'inverse' ){ this.checkall() - && ( _r = parentSelector( this.selector(), this.checkall() ) ) + && ( _r = JC.f.parentSelector( this.selector(), this.checkall() ) ) ; }else{ _r = this.selector(); @@ -557,7 +632,7 @@

            File: ../comps/AutoChecked/AutoChecked.js

            if( !$(this).prop('checked') ) return _checkAll = false; }); - JC.log( '_fixAll:', _checkAll ); + //JC.log( '_fixAll:', _checkAll ); if( !_count ) _checkAll = false; @@ -576,8 +651,16 @@

            File: ../comps/AutoChecked/AutoChecked.js

            AutoChecked.init( $(document) ); }); -}(jQuery)); - + return JC.AutoChecked; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_AutoComplete_AutoComplete.js.html b/docs_api/files/.._comps_AutoComplete_AutoComplete.js.html new file mode 100644 index 000000000..780b8c758 --- /dev/null +++ b/docs_api/files/.._comps_AutoComplete_AutoComplete.js.html @@ -0,0 +1,1642 @@ + + + + + ../comps/AutoComplete/AutoComplete.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/AutoComplete/AutoComplete.js

            + +
            +
            +//TODO: 添加 IE6 支持
            +//TODO: 移动 左右 方向键时, 显示 首字符到光标的过滤条件
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +    /**
            +     * AutoComplete 文本框内容输入提示
            +     * <br />响应式初始化, 当光标焦点 foucs 到 文本框时, 会检查是否需要自动初始化 AutoComplete 实例
            +     * <p><b>require</b>: 
            +     *      <a href='.jQuery.html'>jQuery</a>
            +     *      , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     * </p>
            +     *
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.AutoComplete.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/AutoComplete/_demo' target='_blank'>demo link</a></p>
            +     *
            +     * <h2>可用的 HTML attribute</h2>
            +     * <dl>
            +     *      <dt>cacPopup = selector, optional</dt>
            +     *      <dd>显式指定用于显示数据列表的弹框, 如不指定, 载入数据时会自己生成 popup node</dd>
            +     *
            +     *      <dt>cacPreventEnter = bool, default = false</dt>
            +     *      <dd>文本框按回车键时, 是否阻止默认行为, 防止提交表单</dd>
            +     *
            +     *      <dt>cacLabelKey = string, default = data-label</dt>
            +     *      <dd>用于显示 label 的HTML属性</dd>
            +     *
            +     *      <dt>cacIdKey = string, default= data-id</dt>
            +     *      <dd>用于显示 ID 的HTML属性</dd>
            +     *
            +     *      <dt>cacIdSelector = selector</dt>
            +     *      <dd>用于保存 ID 值的 node</dd>
            +     *
            +     *      <dt>cacIdVal = string, optional</dt>
            +     *      <dd>用于初始化的默认ID, 如果 cacIdVal 为空将尝试读取 cacIdSelector 的值</dd>
            +     *
            +     *      <dt>cacStrictData = bool, default = false</dt>
            +     *      <dd>是否验证已填内容的合法性<br />仅在 cacIdSelector 和 cacIdKey 显式声明时有效</dd>
            +     *
            +     *      <dt>cacAjaxDataUrl = url</dt>
            +     *      <dd>
            +     *          获取 数据的 AJAX 接口
            +     *          <dl>
            +     *              <dt>数据格式</dt>
            +     *              <dd>
            +     *                  [ { "id": "id value", "label": "label value" }, ... ]
            +     *              </dd>
            +     *          </dl>
            +     *      </dd>
            +     *
            +     *      <dt>cacDataFilter = callback</dt>
            +     *      <dd>
            +     *          <dl>
            +     *              <dt>如果 数据接口获取的数据不是默认格式, 
            +     *                  可以使用这个属性定义一个数据过滤函数, 把数据转换为合适的格式
            +     *              </dt>
            +     *              <dd>
            +<pre>function cacDataFilter( _json ){
            +if( _json.data && _json.data.length ){
            +    _json = _json.data;
            +}
            +
            +$.each( _json, function( _ix, _item ){
            +    _item.length &&
            +        ( _json[ _ix ] = { 'id': _item[0], 'label': _item[1] } )
            +        ;
            +});
            +return _json;
            +}</pre>
            +     *              </dd>
            +     *          </dl>
            +     *      </dd>
            +     *
            +     *      <dt>cacBoxWidth = int</dt>
            +     *      <dd>定义 popup 的宽度, 如果没有显式定义, 将使用 selector 的宽度</dd>
            +     *
            +     *      <dt>cacCasesensitive = bool, default = false</dt>
            +     *      <dd>是否区分英文大小写</dd>
            +     *
            +     *      <dt>cacSubItemsSelector = selector string, default = "&gt; li"
            +     *      <dd>popup 查找数据项的选择器语法</dd>
            +     *
            +     *      <dt>cacNoDataText = string, default = "数据加载中, 请稍候..."</dt>
            +     *      <dd>加载数据时的默认提示文字</dd>
            +     *
            +     *      <dt>cacValidCheckTimeout = int, default = 1</dt>
            +     *      <dd>定义 JC.Valid blur 时执行 check 的时间间隔, 主要为防止点击列表时已经 Valid.check 的问题</dd>
            +     *
            +     *      <dt>cacFixHtmlEntity = bool</dt>
            +     *      <dd>是否将 HTML实体 转为 html</dd>
            +     *
            +     *      <dt>cacMultiSelect = bool, default = false</dt>
            +     *      <dd>是否为多选模式</dd>
            +     *
            +     *      <dt>cacListItemTpl= selector</dt>
            +     *      <dd>指定项内容的模板</dd>
            +     *
            +     *      <dt>cacListAll = bool</dt>
            +     *      <dd>popup是否显示所有内容</dd>
            +     *
            +     *      <dt>cacDisableSelectedBlur = bool</dt>
            +     *      <dd>在文本框里按方向键选择项内容并按回车键时, 是否禁止触发 blur事件</dd>
            +     *
            +     *      <dt>cacNoCache = bool, default = false</dt>
            +     *      <dd>AJAX 获取数据式,是否缓存 AJAX 数据</dd>
            +     * </dl>
            +     * @namespace JC
            +     * @class AutoComplete
            +     * @constructor
            +     * @param   {selector|string}   _selector   
            +     * @version dev 0.1 2013-11-01
            +     * @author  zuojing<zuojing1013@gmail.com>, qiushaowei<suches@btbtd.org> | 75 Team
            +     * @example
            +        <div class="ui-sug-mod">
            +            <input name="ac" type="text" class="ui-sug-ipt js_compAutoComplete" value="" 
            +                autocomplete="off" 
            +
            +                cacPopup="/ul.js_compAutoCompleteBox"
            +
            +                cacLabelKey="data-label"
            +                cacIdKey="data-id"
            +
            +                cacPreventEnter="true" 
            +                />
            +            <div style="height:200px"></div>
            +            <ul class="AC_box js_compAutoCompleteBox" style="display:none;">
            +                <li data-id="9" data-label="yy语音">yy语音</li>
            +                <li data-id="10" data-label="yy直播">yy直播</li>
            +                <li data-id="11" data-label="yy频道设计">yy频道设计</li>
            +                <li data-id="12" data-label="yy网页版">yy网页版</li>
            +                <li data-id="13" data-label="youku">youku</li>
            +                <li data-id="14" data-label="yeah">yeah</li>
            +                <li data-id="15" data-label="yahoo">yahoo</li>
            +                <li data-id="09" data-label="YY语音">YY语音</li>
            +                <li data-id="010" data-label="YY直播">YY直播</li>
            +                <li data-id="011" data-label="YY频道设计">YY频道设计</li>
            +                <li data-id="012" data-label="YY网页版">YY网页版</li>
            +                <li data-id="013" data-label="YOUKU">YOUKU</Li>
            +                <li data-id="014" data-label="YEAH">YEAH</LI>
            +            </ul>
            +        </div>
            +     */
            +    JC.AutoComplete = AutoComplete;
            +
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    function AutoComplete( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        if( AutoComplete.getInstance( _selector ) ) return AutoComplete.getInstance( _selector );
            +
            +        AutoComplete.getInstance( _selector, this );
            +
            +        this._model = new AutoComplete.Model( _selector );
            +        this._view = new AutoComplete.View( this._model );
            +        this._init();
            +
            +        JC.log( 'AutoComplete inited', new Date().getTime() );
            +    }
            +    /**
            +     * 获取或设置 AutoComplete 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {AutoCompleteInstance}
            +     */
            +    AutoComplete.getInstance =
            +        function( _selector, _setter ){
            +            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +                _selector = $(_selector);
            +            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +            typeof _setter != 'undefined' && _selector.data( AutoComplete.Model._instanceName, _setter );
            +
            +            return _selector.data( AutoComplete.Model._instanceName );
            +        };
            +    /**
            +     * 初始化可识别的 AutoComplete 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of AutoCompleteInstance}
            +     */
            +    AutoComplete.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( 'js_compAutoComplete' )  ){
            +                    _r.push( new AutoComplete( _selector ) );
            +                }else{
            +                    _selector.find( 'input.js_compAutoComplete' ).each( function(){
            +                        _r.push( new AutoComplete( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 更新原始数据
            +     * @method  update
            +     * @param   {selector}      _selector
            +     * @param   {json}          _data
            +     * @static
            +     * @return  {AutoCompleteInstance}
            +     */
            +    AutoComplete.update =
            +        function( _selector, _data, _selectedId ){
            +            var _ins = AutoComplete.getInstance( _selector );
            +                !_ins && ( _ins = new AutoComplete( _selector ) );
            +                _ins && _ins.update( _data, _selectedId );
            +            return _ins;
            +        };
            +    /**
            +     * 使用 ajax 接口更新原始数据
            +     * @method  ajaxUpdate
            +     * @param   {selector}      _selector
            +     * @param   {url string}    _url
            +     * @param   {callback}      _cb
            +     * @static
            +     * @return  {AutoCompleteInstance}
            +     */
            +    AutoComplete.ajaxUpdate =
            +        function( _selector, _url, _cb ){
            +            var _ins = AutoComplete.getInstance( _selector );
            +                !_ins && ( _ins = new AutoComplete( _selector ) );
            +                _ins && _ins.ajaxUpdate( _url, _cb );
            +            return _ins;
            +        };
            +    /**
            +     * 定义全局数据过滤函数
            +     * @method  dataFilter
            +     * @param   {json}      _json
            +     * @static
            +     * @return  {json}
            +     */
            +    AutoComplete.dataFilter;
            +    /**
            +     * 是否将 HTML实体 转为 html
            +     * @property    fixHtmlEntity
            +     * @type        bool
            +     * @default     true
            +     * @static
            +     */
            +    AutoComplete.fixHtmlEntity = true;
            +    /**
            +     * AJAX 获取数据式,是否缓存 AJAX 数据
            +     * @property    AJAX_NO_CACHE
            +     * @type        bool
            +     * @default     false
            +     * @static
            +     */
            +    AutoComplete.AJAX_NO_CACHE = false;
            +
            +    AutoComplete.hideAllPopup =
            +        function(){
            +            $( 'ul.js_compAutoCompleteBox' ).each( function(){
            +                var _sp = $( this ), _pnt = _sp.parent(), _box;
            +                if( _pnt.hasClass( 'AC_layoutBox' ) ){
            +                    _pnt.hide();
            +                    _box = _pnt;
            +                }else{
            +                    _sp.hide();
            +                    _box = _sp;
            +                }
            +
            +                _box.data( 'AC_INS' ) && _box.data( 'AC_INS' ).trigger( 'unbind_event' );
            +            });
            +        };
            +
            +    BaseMVC.build( AutoComplete );
            +
            +    JC.f.extendObject( AutoComplete.prototype, {
            +        _beforeInit: 
            +            function(){
            +                 // JC.log( 'AutoComplete _beforeInit', new Date().getTime() );
            +             } 
            +
            +        , _initHanlderEvent: 
            +            function(){
            +                //JC.log( 'AutoComplete _initHanlderEvent', new Date().getTime() );
            +                var _p = this;
            +
            +                _p._model.selector().on('click', function( _evt ) {
            +                    _evt.stopPropagation();
            +                    _p.trigger( 'bind_event' );
            +                    //JC.log( 'click' );
            +
            +                    JC.f.safeTimeout( function(){
            +                    }, _p._model.selector(), 'SHOW_AC_POPUP', 50 );
            +                    if( !_p._model.popup().is( ':visible' ) ){
            +                        _p.trigger( 'show_popup' );
            +                    }
            +                } );
            +
            +                _p._model.selector().on('focus', function() {
            +                    //JC.log( 'focus' );
            +                    _p.trigger( 'bind_event' );
            +                    _p.trigger( 'show_popup', [ _p._model.cacListAll() ] );
            +                } );
            +
            +                _p.on( 'show_popup', function( _evt, _listAll ){
            +                    _p.trigger( 'hide_all_popup' );
            +                    _p._view.updateList( _listAll );
            +
            +                    _p.trigger( AutoComplete.Model.SHOW );
            +                    _p.selector().addClass( AutoComplete.Model.CLASS_FAKE );
            +                });
            +
            +                _p._model.selector().on('blur', function() {
            +                    _p._model.preVal = _p._model.selector().val().trim();
            +                    _p.selector().removeClass( AutoComplete.Model.CLASS_FAKE );
            +                    _p._model.verifyKey();
            +                });
            +
            +                _jdoc.on( 'click', function(){
            +                    _p.trigger( 'unbind_event' );
            +                });
            +
            +                _p.on( 'bind_event', function( _evt ){
            +                    _p.trigger( 'unbind_event' );
            +                    _jdoc.on( 'keyup', innerKeyUp );
            +                    _jdoc.on( 'keydown', innerKeyDown );
            +                });
            +
            +                _p.on( 'unbind_event', function( _evt ){
            +                    _jdoc.off( 'keyup', innerKeyUp );
            +                    _jdoc.off( 'keydown', innerKeyDown );
            +                });
            +
            +                _p._model.layoutPopup().data( 'AC_INS', _p );
            +
            +                /**
            +                 * 点击列表时, 阻止冒泡
            +                 */
            +                _p._model.layoutPopup().on('click', function( _evt ){
            +                    _evt.stopPropagation();
            +                });
            +
            +                _p._model.layoutPopup().delegate( 'li', 'click', function( _evt, _ignoreBlur ){
            +                    var _item = $( this );
            +
            +                    _p.trigger( 'update_selected_item', [ _item, _ignoreBlur ] );
            +                });
            +
            +                _p.on( 'update_selected_item', function( _evt, _item, _ignoreBlur ){
            +                    if( !_item.is( '[' + _p._model.cacLabelKey() + ']' ) ) return;
            +
            +                    _p.trigger( 'before_click', [ _item, _p._model.layoutPopup(), _p ] );
            +                    if( _p._model.clickDisable() ) return;
            +
            +                    _p.trigger( AutoComplete.Model.CHANGE, [ _item ] );
            +
            +                    !_p._model.cacMultiSelect() && _p.trigger( AutoComplete.Model.HIDDEN );
            +
            +                    _p.selector().trigger( 'cacItemClickHanlder', [ _item, _p ] );
            +                    _p._model.cacItemClickHanlder() 
            +                        && _p._model.cacItemClickHanlder().call( _p, _item );
            +
            +                    !_ignoreBlur &&
            +                        _p._model.blurTimeout( setTimeout( function(){
            +                            _p._model.selector().trigger( 'blur' );
            +                        }, 50 ) );
            +                });
            +
            +                _p._model.layoutPopup().delegate( '.AC_closePopup', 'click', function( _evt ){
            +                    _p.trigger( 'hide_all_popup' );
            +                });
            +
            +                _p._model.layoutPopup().delegate( '.AC_clear', 'click', function( _evt ){
            +                    _p.selector().val( '' );
            +                });
            +
            +                _p.on( 'hide_all_popup', function(){
            +                    AutoComplete.hideAllPopup();
            +                });
            +
            +                _p.on( AutoComplete.Model.HIDDEN, function () {
            +                    _p._view.hide();
            +                });
            +
            +                _p.on( AutoComplete.Model.SHOW, function () {
            +                    _p._view.show();
            +                });
            +
            +                _p._model.layoutPopup().delegate( 'li', 'mouseenter'
            +                    , function mouseHandler( _evt ) {
            +                        if( AutoComplete.Model.isScroll ) return;
            +                        _p._view.updateIndex( $(this).attr('data-index'), true );
            +                    }
            +                );
            +
            +                _p.on( AutoComplete.Model.ENTER, function( _evt, _srcEvt ){
            +                    _p._model.cacPreventEnter() && _srcEvt.preventDefault();
            +                    var _selectedItem = _p._model.selectedItem();
            +                    _selectedItem 
            +                        && _selectedItem.length
            +                        && _p.trigger( 'update_selected_item', [ _selectedItem, _p._model.cacDisableSelectedBlur() ] )
            +                        ;
            +                    !_p._model.boolProp( 'cacMultiSelect' ) && _p.trigger( AutoComplete.Model.HIDDEN );
            +                });
            +
            +                _p.on( AutoComplete.Model.UPDATE_LIST_INDEX, function( _evt, _keyCode, _srcEvt ){
            +                    _srcEvt.preventDefault();
            +                    //JC.log( AutoComplete.Model.UPDATE_LIST_INDEX, _keyCode, new Date().getTime() );
            +                    _p._view.updateListIndex( _keyCode == 40 ? true : false );
            +
            +                    var _selectedItem = _p._model.selectedItem();
            +                    _selectedItem 
            +                        && _selectedItem.length
            +                        && _p.trigger( AutoComplete.Model.CHANGE, [ _selectedItem ] )
            +                        ;
            +                });
            +
            +                _p.on( AutoComplete.Model.UPDATE_LIST, function( _evt ){
            +                    this._view.updateList();
            +                });
            +
            +                /**
            +                 * 响应 li 点击时, 更新对应的内容
            +                 */
            +                _p.on( AutoComplete.Model.CHANGE, function( _evt, _srcSelector ){
            +                    _p._model.setSelectorData( _srcSelector );
            +                });
            +
            +                _p.on( AutoComplete.Model.UPDATE, function( _evt, _json, _cb ){
            +                    _p._model.initPopupData( _json );
            +
            +                    _p._view.build( _json );
            +                    _cb && _cb.call( _p, _json );
            +                });
            +
            +                _p.on( AutoComplete.Model.CLEAR, function( _evt ){
            +                    _p._model.selector().val( '' );
            +                    _p._model.setIdSelectorData();
            +                });
            +
            +                _p._model.selector().on( AutoComplete.Model.REMOVE, function(){
            +                    try{ _p._model.popup().remove(); } catch( _ex ){}
            +                });
            +
            +                _p.on( 'select_item', function( _evt, _id ){
            +                    //JC.log( 'select_item: ', _id );
            +                    if( typeof _id == 'undefined' ) return;
            +
            +                    var _popup = _p._model.popup(), _selectedItem;
            +                    if( !( _popup && _popup.length ) ) return;
            +                    _selectedItem = _popup.find( JC.f.printf( 'li[data-id={0}]', _id ) );
            +
            +                    _selectedItem 
            +                        && _selectedItem.length
            +                        && _selectedItem.trigger( 'click', [ true ] )
            +                        ;
            +                });
            +
            +                _p.on( AutoComplete.Model.CLEAR_DATA, function(){
            +                    _p.trigger( AutoComplete.Model.UPDATE, [ [] ] );
            +                });
            +
            +                function innerKeyUp( _evt ){
            +
            +                    var _keyCode = _evt.keyCode
            +                        , _sp = $(this)
            +                        , _val = _sp.val().trim()
            +                        ;
            +
            +                    if( _keyCode == 38 || _keyCode == 40 ){
            +                        AutoComplete.Model.isScroll = true;
            +                    }
            +                    //JC.log('keyup', _keyCode, new Date().getTime() );
            +
            +                    if ( _keyCode ) {
            +                        switch( _keyCode ){
            +                            case 38://up
            +                            case 40://down
            +                                {
            +                                    _evt.preventDefault();
            +                                }
            +                            case 37:
            +                            case 39:
            +                                {
            +                                    return;
            +                                }
            +                            case 27://esc
            +                                {
            +                                    _p.trigger( AutoComplete.Model.HIDDEN );
            +                                    return;
            +                                }
            +                        }
            +                    }
            +
            +                }
            +
            +                function innerKeyDown( _evt ){
            +
            +                    var _keyCode = _evt.keyCode
            +                        , _val = _p._model.selector().val().trim()
            +                        ;
            +
            +                    if( _keyCode == 38 || _keyCode == 40 ){
            +                        AutoComplete.Model.isScroll = true;
            +                    }
            +
            +                    //JC.log('keydown', _keyCode, new Date().getTime() );
            +
            +                    if ( _keyCode ) {
            +                        switch( _keyCode ){
            +                            case 40:
            +                            case 38:
            +                            case 13:
            +                                if( !_p._model.popup().is(':visible') ) return;
            +                                break;
            +                        }
            +
            +                        if( !_p._model.popup().is(':visible') ){
            +                            _p.trigger( AutoComplete.Model.SHOW );
            +                        }
            +
            +                        switch( _keyCode ) {
            +                            case 40:
            +                            case 38:
            +                                _p.trigger( AutoComplete.Model.UPDATE_LIST_INDEX, [ _keyCode, _evt ] );
            +                                return;
            +
            +                            case 37:
            +                            case 39:
            +                                return;
            +                            case 13: //enter
            +                                _p.trigger( AutoComplete.Model.ENTER, [ _evt ] );
            +                                return;
            +                            case 9: //tab
            +                            case 27: //esc
            +                                _p.trigger( AutoComplete.Model.HIDDEN );
            +                                return; 
            +                        }
            +                    }
            +
            +                    _p._model.keydownTimeout( setTimeout( function(){
            +                        _p.trigger( AutoComplete.Model.UPDATE_LIST );
            +                    }, 200 ));
            +
            +                }
            +            } 
            +
            +        , _inited: 
            +            function(){
            +                var _p = this;
            +                //JC.log( 'AutoComplete _inited', new Date().getTime() );
            +                _p._model.initData =  _p._model.dataItems();
            +                _p.ajaxUpdate();
            +
            +                if( !_p._model.selector().is( '[validCheckTimeout]' ) ){
            +                    _p._model.selector().attr( 'validCheckTimeout', _p._model.cacValidCheckTimeout() );
            +                }
            +
            +                JC.f.safeTimeout( function(){ _p.trigger( 'after_inited' ); }, _p.selector(), 'AutoComplete_inited', 1 );
            +                //alert( _p._model.initData.length );
            +                //window.JSON && JC.log( JSON.stringify( _p._model.initData ) );
            +            }
            +        /**
            +         * 获取 绑定的 id node
            +         * @method  idSelector
            +         * @return  {selector}
            +         */
            +        , idSelector: function(){ return this._model.cacIdSelector(); }
            +        /**
            +         * 获取/设置 id 值 
            +         * @method  idVal
            +         * @param   {string}    _id
            +         * @return  {id string}
            +         */
            +        , idVal: 
            +            function( _id ){ 
            +                typeof _id != 'undefined' && this.trigger( 'select_item' );
            +                return this._model.cacIdVal(); 
            +            }
            +        /**
            +         * 使用 ajax 接口更新原始数据
            +         * @method  ajaxUpdate
            +         * @param   {string}    _url
            +         * @param   {callback}   _cb
            +         */
            +        , ajaxUpdate:
            +            function( _url, _cb ){
            +                this._model.ajaxData( _url, _cb );
            +                return this;
            +            }
            +        /**
            +         * 显示数据列表
            +         * @method  show
            +         */
            +        , show:
            +            function(){
            +                var _p = this;
            +                setTimeout( function(){
            +                    _p.trigger( 'bind_event' );
            +                    _p.trigger( AutoComplete.Model.SHOW );
            +                }, 1);
            +                return _p;
            +            }
            +        /**
            +         * 隐藏数据列表
            +         * @method  hide
            +         */
            +        , hide:
            +            function(){
            +                this.trigger( AutoComplete.Model.HIDDEN );
            +                return this;
            +            }
            +        /**
            +         * 获取数据列表 node
            +         * @method  popup
            +         * @return  {selector}
            +         */
            +        , popup:
            +            function(){
            +                return this._model.popup();
            +            }
            +        /**
            +         * 更新原始数据
            +         * @method  update
            +         * @param   {json}  _json
            +         */
            +        , update:
            +            function( _json, _selectedId ){
            +                var _p = this;
            +                //JC.log( this.selector().attr( 'class' ), new Date().getTime() );
            +                _p._model.clearCache();
            +                !_p._model.firstUpdate && _p.clear();
            +                _p._model.firstUpdate = false;
            +                _json = _p._model.cacDataFilter( _json );
            +                _p.trigger( AutoComplete.Model.UPDATE, [ _json ] );
            +                _p.trigger( AutoComplete.Model.UPDATE_LIST );
            +                typeof _selectedId != 'undefined' && _p.trigger( 'select_item', [ _selectedId ] );
            +
            +                return _p;
            +            }
            +        /**
            +         * 清除 selector 和 idSelector 的默认值
            +         * @method  clear
            +         */
            +        , clear:
            +            function(){
            +                this.trigger( AutoComplete.Model.CLEAR );
            +                return this;
            +            }
            +        /**
            +         * 清除所有数据
            +         * @method  clearAll
            +         */
            +        , clearAll:
            +            function(){
            +                this.trigger( AutoComplete.Model.CLEAR );
            +                this.trigger( AutoComplete.Model.CLEAR_DATA );
            +                return this;
            +            }
            +
            +        /**
            +         * 校正数据列表的显示位置
            +         * @method  fixPosition
            +         */
            +        , fixPosition:
            +            function(){
            +                var _popup = this._model.popup();
            +                _popup 
            +                    && _popup.length 
            +                    && _popup.is( ':visible' )
            +                    && this._view.show()
            +                    ;
            +                return this;
            +            }
            +    });
            +
            +    AutoComplete.Model._instanceName = 'AutoComplete';
            +
            +    AutoComplete.Model.UPDATE = 'AC_UPDATE';
            +    AutoComplete.Model.CLEAR = 'AC_CLEAR';
            +    AutoComplete.Model.CLEAR_DATA = 'AC_CLEAR_DATA';
            +    AutoComplete.Model.ENTER = 'AC_ENTER';
            +    AutoComplete.Model.CHANGE = 'AC_CHANGE';
            +    AutoComplete.Model.HIDDEN = 'AC_HIDDEN';
            +    AutoComplete.Model.SHOW = 'AC_SHOW';
            +    AutoComplete.Model.UPDATE_LIST= 'AC_UPDATE_LIST';
            +    AutoComplete.Model.UPDATE_LIST_INDEX = 'AC_UPDATE_LIST_INDEX';
            +    AutoComplete.Model.REMOVE = 'AC_AUTOCOMPLETE_REMOVE';
            +
            +    AutoComplete.Model.CLASS_ACTIVE = 'AC_active';
            +    AutoComplete.Model.CLASS_FAKE = 'AC_fakebox';
            +
            +    AutoComplete.Model.AJAX_CACHE = {};
            +
            +    JC.f.extendObject( AutoComplete.Model.prototype, {
            +        init: 
            +            function() {
            +                // JC.log( 'AutoComplete.Model.init:', new Date().getTime() );
            +                this.initData;      //保存初始化的数据
            +                this._cache = {};
            +                this.firstUpdate = true;
            +            }
            +
            +        , cacDisableSelectedBlur: function(){ return this.boolProp( 'cacDisableSelectedBlur' ); }
            +
            +        , clickDisable:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._clickDisable = _setter );
            +                return this._clickDisable;
            +            }
            +
            +        , cacListAll: function(){ return this.boolProp( 'cacListAll' ); }
            +
            +        , listItemTpl: function() {
            +            var _tpl = JC.f.printf( '<li ' 
            +                                    + this.cacIdKey()+ '="{0}" ' 
            +                                    + this.cacLabelKey() + '="{1}"'
            +                                    + ' data-index="{2}" class="AC_listItem {3}">{1}</li>' 
            +                            );
            +            this.is( '[cacListItemTpl]' ) 
            +                && ( _tpl = JC.f.scriptContent( this.selectorProp( 'cacListItemTpl' ) ) )
            +                ;
            +            //JC.log( _tpl );
            +
            +            return _tpl;
            +        }
            +
            +        , cacItemClickHanlder: function(){ return this.callbackProp( 'cacItemClickHanlder' ); }
            +
            +        , cacBeforeShowHandler: function(){ return this.callbackProp( 'cacBeforeShowHandler' ); }
            +
            +        , popup: 
            +            function() {
            +                var _p = this, _r = _p.selector().data('AC_panel');
            +                    !_r && ( _r = this.selectorProp('cacPopup') );
            +
            +                    if( !( _r && _r.length ) ){
            +                        _r = $( JC.f.printf( '<ul class="AC_box js_compAutoCompleteBox"{0}>{1}</ul>'
            +                                            , ' style="position:absolute;"'
            +                                            , '<li class="AC_noData">' + _p.cacNoDataText() + '</li>'
            +                                            ));
            +                        //_p.selector().after( _r );
            +                        _p.selector().data( 'AC_panel', _r );
            +                        
            +
            +                        _p.cacMultiSelect() 
            +                            ? _r.appendTo( _p.layoutPopup() )
            +                            : _r.appendTo( document.body );
            +                            ;
            +                    }
            +
            +                    if( !this._inited ){
            +                        this._inited = true;
            +                        _r.css( { 'width': _p.cacBoxWidth() + 'px' } );
            +                    }
            +
            +                return _r;
            +            }
            +
            +        , layoutPopup:
            +            function(){
            +
            +                if( !this._layoutPopup ){
            +                    if( this.cacMultiSelect() ){
            +                        this._layoutPopup = $( '<div class="AC_layoutBox"></div>' );
            +                        this._layoutPopup.appendTo( document.body );
            +                    }else{
            +                        this._layoutPopup = this.popup();
            +                    }
            +                }
            +
            +                return this._layoutPopup;
            +            }
            +
            +        , initPopupData:
            +            function( _json ){
            +                this.initData = _json;
            +            }
            +        /**
            +         * 验证 key && id 是否正确
            +         * 仅在 cacStrictData 为真的时候进行验证
            +         */
            +        , verifyKey:
            +            function(){
            +                if( !this.cacStrictData() ) return;
            +                var _p = this
            +                    , _label = this.selector().val().trim()
            +                    , _findLs = []
            +                    , _definedIdKey = _p.selector().is( '[cacIdKey]' )
            +                    , _isCor
            +                    ;
            +
            +                if( !_label ){
            +                    _p.selector().val( '' );
            +                    _p.setIdSelectorData();
            +                    return;
            +                }
            +
            +                if( _label ){
            +                    var _id = _p.cacIdVal(), _findId, _findLabel;
            +
            +                    $.each( _p.initData, function( _ix, _item ){
            +                        //JC.log( _item.label, _item.id );
            +                        if( _definedIdKey ){
            +                            var _slabel = _item.label.trim();
            +                            //var _slabel = $( '<p>' + _item.label.trim() + '</p>' ).text();
            +
            +                            if( _slabel === _label ){
            +                                _isCor = true;
            +                                !_findLabel && _p.setIdSelectorData( _item.id );
            +                                _findLabel = true;
            +                            }
            +
            +                            if( _slabel === _label && !_id ){
            +                                _p.setIdSelectorData( _id = _item.id );
            +                            }
            +
            +                            if( _slabel === _label && _item.id === _id ){
            +                                _findLs.push( _item );
            +                                !_findId && ( _p.setIdSelectorData( _item.id ) );
            +                                _findId = true;
            +                                _isCor = true;
            +                                return false;
            +                            }
            +                        }else{
            +                            if( _item.label.trim() == _label ){
            +                                _findLs.push( _item );
            +                                _isCor = true;
            +                            }
            +                        }
            +                    });
            +                }
            +
            +                if( !_isCor ){
            +                    _p.selector().val( '' );
            +                    _p.setIdSelectorData();
            +                }
            +            }
            +
            +        , cache: 
            +            function ( _key ) {
            +
            +                //JC.log( '................cache', _key );
            +
            +                if( !( _key in this._cache ) ){
            +                    this._cache[ _key ] = this.keyData( _key ) || this.initData; 
            +                }
            +
            +                return this._cache[ _key ];
            +            }
            +
            +        , clearCache: function(){ this._cache = {}; }
            +
            +        , dataItems: 
            +            function() {
            +                var _p = this
            +                    , _el = _p.listItems()
            +                    , _result = []
            +                    ;
            +
            +                _el.each(function( _ix, _item ) {
            +                    var _sp = $(this);
            +
            +                    _result.push({
            +                        //'el': _item                   
            +                        'id': _sp.attr( _p.cacIdKey() ) || ''
            +                        , 'label': _sp.attr( _p.cacLabelKey() )
            +                    });
            +
            +                });
            +                return _result;
            +            }
            +
            +        , noCache: function(){ 
            +            var _r = AutoComplete.AJAX_NO_CACHE;
            +            this.is( '[cacNoCache]' ) && ( _r = this.boolProp( 'cacNoCache' ) );
            +            return _r;
            +        }
            +
            +        , ajaxData:
            +            function( _url, _cb ){
            +                var _p = this, _url = _url || _p.attrProp( 'cacAjaxDataUrl' );
            +                if( !_url ) return;
            +
            +                if( !_p.noCache() &&( _url in AutoComplete.Model.AJAX_CACHE ) ){
            +                    $( _p ).trigger( 'TriggerEvent'
            +                            , [ AutoComplete.Model.UPDATE, AutoComplete.Model.AJAX_CACHE[ _url ], _cb ] 
            +                            ); 
            +                    return;
            +                }
            +
            +                $.get( _url ).done( function( _d ){
            +                    _d = $.parseJSON( _d );
            +                    _d = _p.cacDataFilter( _d );
            +                    AutoComplete.Model.AJAX_CACHE[ _url ] = _d;
            +                    $( _p ).trigger( 'TriggerEvent', [ AutoComplete.Model.UPDATE
            +                                                        , AutoComplete.Model.AJAX_CACHE[ _url ]
            +                                                        , _cb
            +                                                    ] ); 
            +                    _p.clearCache();
            +                    _p.trigger( AutoComplete.Model.UPDATE_LIST );
            +                });
            +            }
            +
            +        , keyData: 
            +            function ( _key ) {
            +                var _p = this
            +                    , _dataItems = _p.initData
            +                    , _i = 0
            +                    , _caseSensitive = _p.cacCasesensitive()
            +                    , _lv = _key.toLowerCase()
            +                    , _sortData = [[], [], [], []]
            +                    , _finalData = [];
            +                    ;
            +
            +                for (_i = 0; _i < _dataItems.length; _i++) {
            +                    var _slv = _dataItems[_i].label.toLowerCase();
            +
            +                    if ( _dataItems[_i].label.indexOf( _key ) == 0 ) {
            +                        _sortData[ _dataItems[_i].tag = 0 ].push( _dataItems[_i] );
            +                    } else if( !_caseSensitive && _slv.indexOf( _lv ) == 0 ) {
            +                        _sortData[ _dataItems[_i].tag = 1 ].push( _dataItems[_i] );
            +                    } else if ( _dataItems[_i].label.indexOf( _key ) > 0 ) {
            +                        _sortData[ _dataItems[_i].tag = 2 ].push( _dataItems[_i] );
            +                    } else if( !_caseSensitive && _slv.indexOf( _lv ) > 0 ) {
            +                        _sortData[ _dataItems[_i].tag = 3 ].push( _dataItems[_i] );
            +                    } 
            +                }
            +
            +                $.each( _sortData, function( _ix, _item ){
            +                    _finalData = _finalData.concat( _item );
            +                });
            +
            +                return _finalData;
            +            }
            +
            +        , setSelectorData:
            +            function( _selector ){
            +                _selector && ( _selector = $( _selector ) );
            +                if( !( _selector && _selector.length ) ) return;
            +                var _p = this
            +                    , _label = _selector.attr( _p.cacLabelKey() ).trim()
            +                    , _id = _selector.attr( _p.cacIdKey() ).trim()
            +                    ;
            +
            +                _p.selector().val( _label );
            +
            +                _p.selector().attr( 'cacIdVal', _id );
            +                _p.setIdSelectorData( _id );
            +            }
            +
            +        , setIdSelectorData:
            +            function( _val ){
            +                var _p = this;
            +                if( !( _p.cacIdSelector() && _p.cacIdSelector().length ) ) return;
            +                if( typeof _val != 'undefined' ){
            +                    _p.cacIdSelector().val( _val );
            +                    _p.selector().attr( 'cacIdVal', _val );
            +                }else{
            +                    _p.cacIdSelector().val( '' );
            +                    _p.selector().attr( 'cacIdVal', '' );
            +                }
            +            }
            +
            +        , listItems:
            +            function(){
            +                var _r;
            +
            +                this.popup() 
            +                    && this.popup().length
            +                    && ( _r = this.popup().find( this.cacSubItemsSelector() ) )
            +                    ;
            +                return _r;
            +            }
            +
            +        , selectedItem:
            +            function(){
            +                var _r;
            +                this.listItems().each( function(){
            +                    var _sp = $(this);
            +                    if( _sp.hasClass( AutoComplete.Model.CLASS_ACTIVE ) ){
            +                        _r = _sp;
            +                        return false;
            +                    }
            +                });
            +                return _r;
            +            }
            +
            +        , keyupTimeout:
            +            function( _tm ){
            +                this._keyupTimeout && clearTimeout( this._keyupTimeout );
            +                this._keyupTimeout = _tm;
            +            }
            +
            +        , keydownTimeout:
            +            function( _tm ){
            +                this._keydownTimeout && clearTimeout( this._keydownTimeout );
            +                this._keydownTimeout = _tm;
            +            }
            +
            +        , blurTimeout:
            +            function( _tm ){
            +                this._blurTimeout && clearTimeout( this._blurTimeout );
            +                this._blurTimeout = _tm;
            +            }
            +
            +        , cacDataFilter:
            +            function( _d ){
            +                var _p = this, _filter = _p.callbackProp( 'cacDataFilter' ) || AutoComplete.dataFilter;
            +                _filter && ( _d = _filter( _d ) );
            +
            +                if( _p.cacFixHtmlEntity() ){
            +                    $.each( _d, function( _ix, _item ){
            +                        _item.label && ( _item.label = $( '<p>' + _item.label + '</p>' ).text() );
            +                    });
            +                }
            +                return _d;
            +            }
            +
            +        , cacNoDataText:
            +            function(){
            +                var _r = this.attrProp( 'cacNoDataText' ) || '数据加载中, 请稍候...';
            +                return _r;
            +            }
            +
            +        , cacValidCheckTimeout:
            +            function(){
            +                var _r = this.intProp( 'cacValidCheckTimeout' ) || AutoComplete.validCheckTimeout || 1;
            +                return _r;
            +            }
            +
            +        , cacStrictData:
            +            function(){
            +                var _r = this.boolProp( 'cacStrictData' );
            +                return _r;
            +            }
            +
            +        , cacFixHtmlEntity:
            +            function(){
            +                var _r = AutoComplete.fixHtmlEntity;
            +                this.selector().is( '[cacFixHtmlEntity]' )
            +                    && ( _r = this.boolProp( 'cacFixHtmlEntity' ) );
            +                return _r;
            +            }
            +
            +        , cacLabelKey:
            +            function(){
            +                var _r = this.attrProp( 'cacLabelKey' ) || 'data-label';
            +                return _r;
            +            }
            +
            +        , cacIdKey:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this.selector().attr( 'cacIdKey', _setter ) );
            +                var _r = this.attrProp( 'cacIdKey' ) || this.cacLabelKey();
            +                return _r;
            +            }
            +
            +        , cacIdVal:
            +            function(){
            +                var _p = this, _r = _p.attrProp( 'cacIdVal' );
            +
            +                _p.cacIdSelector()
            +                    && _p.cacIdSelector().length
            +                    && ( _r = _p.cacIdSelector().val() )
            +                    ;
            +                _r = ( _r || '' ).trim();
            +                return _r;
            +            }
            +
            +        , cacIdSelector:
            +            function(){
            +                var _r = this.selectorProp( 'cacIdSelector' );
            +                return _r;
            +            }
            +
            +        , cacPreventEnter: 
            +            function(){
            +                  var _r;
            +                  _r = this.selector().is( '[cacPreventEnter]' ) 
            +                      && JC.f.parseBool( this.selector().attr('cacPreventEnter') );
            +                  return _r;
            +            }
            +
            +        , cacBoxWidth:
            +            function(){
            +                var _r = 0 || this.intProp( 'cacBoxWidth' );
            +
            +                !_r && ( _r = this.selector().width() );
            +
            +                return _r;
            +            }
            +
            +        , cacCasesensitive:
            +            function(){
            +                return this.boolProp( 'cacCasesensitive' );
            +            }
            +
            +        , cacSubItemsSelector:
            +            function(){
            +                var _r = this.attrProp( 'cacSubItemsSelector' ) || 'li';
            +                    _r += '[' + this.cacLabelKey() + ']';
            +                return _r;
            +            }
            +
            +        , cacMultiSelect: function(){ return this.boolProp( 'cacMultiSelect' ); }
            +
            +        , cacMultiSelectBarTpl:
            +            function(){
            +                var _r = '<div><a href="javascript:;" class="AC_control AC_closePopup">关闭</a></div>', _tmp;
            +                this.is( '[cacMultiSelectBarTpl]' ) 
            +                    && ( _tmp = this.selectorProp( 'cacMultiSelectBarTpl' ) )
            +                    && _tmp.length
            +                    && ( _r = JC.f.scriptContent( _tmp ) );
            +                return _r;
            +            }
            +
            +    });
            +
            +    JC.f.extendObject( AutoComplete.View.prototype, {
            +        init: 
            +            function(){
            +                var _p = this;
            +
            +                _p._model.listItems().each( function( _ix ){
            +                    $(this).attr( 'data-index', _ix );
            +                })
            +                .removeClass( AutoComplete.Model.CLASS_ACTIVE )
            +                .first().addClass( AutoComplete.Model.CLASS_ACTIVE )
            +                ;
            +
            +                // JC.log( 'AutoComplete.View.init:', new Date().getTime() );
            +            },
            +
            +        build: 
            +            function( _data ) {
            +                var _p = this
            +                    , _i = 0
            +                    , _view = []
            +                    ;
            +
            +                if ( _data.length == 0 ) {
            +                    _p.hide();
            +                    _p._model.popup().html( JC.f.printf( '<li class="AC_noData">{0}</li>', _p._model.cacNoDataText() ) );
            +                } else {
            +                    var _tpl = _p._model.listItemTpl();
            +                    for ( ; _i < _data.length; _i++ ) {
            +                        _view.push( JC.f.printf( _tpl
            +                                    , _data[_i].id
            +                                    , JC.f.filterXSS( _data[_i].label || '' )
            +                                    , _i
            +                                    , _i === 0 ? AutoComplete.Model.CLASS_ACTIVE : ''
            +                                    ) );
            +                    }
            +
            +                    _p._model.popup().html( _view.join('') );
            +
            +                    _p._model.trigger( 'build_data' );
            +                }
            +
            +                _p._model.cacMultiSelect() 
            +                    && !_p._model.layoutPopup().find( '.AC_addtionItem' ).length
            +                    && $( JC.f.printf( 
            +                            '<div class="AC_addtionItem" style="text-align: right; padding-right: 5px;">{0}</div>'
            +                            , _p._model.cacMultiSelectBarTpl()
            +                        )).appendTo( _p._model.layoutPopup() )
            +                    ;
            +            },
            +
            +        hide: 
            +            function() {
            +                var _p = this;
            +
            +                _p._model.layoutPopup().hide();
            +            },
            +
            +        show: 
            +            function() {
            +                var _p = this
            +                    , _offset = _p._model.selector().offset()
            +                    , _h = _p._model.selector().prop( 'offsetHeight' )
            +                    , _w = _p._model.selector().prop( 'offsetWidth' )
            +                    ;
            +                _p._model.layoutPopup().css( {
            +                    'top': _offset.top + _h + 'px'
            +                    , 'left': _offset.left + 'px'
            +                });
            +
            +                var _selectedItem
            +                    , _label = _p._model.selector().val().trim()
            +                    , _id = _p._model.cacIdVal()
            +                    , _idCompare = _p._model.cacLabelKey() != _p._model.cacIdKey() 
            +                    ;
            +
            +                _p._model.listItems().each( function(){
            +                    var _sp = $(this)
            +                        , _slabel = _sp.attr( _p._model.cacLabelKey() )
            +                        , _sid = _sp.attr( _p._model.cacIdKey() )
            +                        ;
            +
            +                    //JC.log( _slabel, _sid, _label, _id );
            +
            +                    _sp.removeClass( AutoComplete.Model.CLASS_ACTIVE );
            +                    if( _label == _slabel ){
            +                        if( _idCompare && _id ){
            +                            _id == _sid && _sp.addClass( AutoComplete.Model.CLASS_ACTIVE );
            +                            _selectedItem = _sp;
            +                        }else{
            +                            _sp.addClass( AutoComplete.Model.CLASS_ACTIVE );
            +                            _selectedItem = _sp;
            +                        }
            +                    }
            +                });
            +
            +                if( !_selectedItem ){
            +                    _p._model.listItems().first().addClass( AutoComplete.Model.CLASS_ACTIVE );
            +                }
            +
            +                _p._model.layoutPopup().show();
            +                //!_p._model.key() && _p._model.list().show();
            +                _p.trigger( 'after_popup_show' );
            +            },
            +
            +        updateList: 
            +            function ( _listAll ) {
            +                var _p  = this
            +                    , _dataItems
            +                    , _view = []
            +                    , _label = _p._model.selector().val().trim()
            +                    , _id = _p._model.cacIdVal()
            +                    , _data
            +                    ;
            +
            +                if ( ( !_label ) || _listAll ) {
            +                    _data = _p._model.initData;
            +                }else{
            +                    _data = _p._model.cache( _label, _id );
            +                }
            +                _data && _p.build( _data );
            +            },
            +
            +        currentIndex:
            +            function( _isDown ){
            +                var _p = this
            +                    , _box = _p._model.popup()
            +                    , _listItems = _p._model.listItems()
            +                    , _ix = -1
            +                    ;
            +                if( !_listItems.length ) return;
            +
            +                _listItems.each( function( _six ){
            +                    var _sp = $(this);
            +                    if( _sp.hasClass( AutoComplete.Model.CLASS_ACTIVE ) ){
            +                        _ix = _six;
            +                        return false;
            +                    }
            +                });
            +                if( _ix < 0 ){
            +                    _ix = _isDown ? 0 : _listItems.length - 1;
            +                }else{
            +                    _ix = _isDown ? _ix + 1 : _ix - 1;
            +                    if( _ix < 0 ){
            +                        _ix = _listItems.length - 1;
            +                    }else if( _ix >= _listItems.length ){
            +                        _ix = 0;
            +                    }
            +                }
            +                return _ix;
            +            }
            +        , updateListIndex: 
            +            function( _isDown ){
            +                var _p = this, _ix = _p.currentIndex( _isDown );
            +                _p.updateIndex( _ix );
            +                //JC.log( 'updateListIndex', _ix, new Date().getTime() );
            +            }
            +
            +        , updateIndex:
            +            function( _ix, _ignoreScroll ){
            +                var _p = this, _listItems = _p._model.listItems();
            +                _p.removeActiveClass();
            +
            +                $( _listItems[ _ix ] ).addClass( AutoComplete.Model.CLASS_ACTIVE );
            +                !_ignoreScroll && _p.setScroll( _ix );
            +            }
            +
            +        , setScroll: 
            +            function( _keyIndex ) {
            +                var _p = this
            +                    , _el = _p._model.listItems().eq(_keyIndex)
            +                    , _position = _el.position()
            +                    ;
            +
            +                if( !_position ) return;
            +
            +                var _h = _el.position().top + _el.height()
            +                    , _ph = _p._model.popup().innerHeight()
            +                    , _top = _p._model.popup().scrollTop()
            +                    ;
            +
            +                _h = _h + _top;
            +
            +                if ( _keyIndex == -1 ) {
            +                    _p._model.selector().focus();
            +                    _p._model.listItems().removeClass( AutoComplete.Model.CLASS_ACTIVE );
            +                } else {
            +                    _p._model.listItems().removeClass( AutoComplete.Model.CLASS_ACTIVE );
            +                    _el.addClass( AutoComplete.Model.CLASS_ACTIVE );
            +                    if ( _h > _ph ) {
            +                        _p._model.popup().scrollTop( _h - _ph );
            +                    }
            +                    if ( _el.position().top < 0 ) {
            +                        _p._model.popup().scrollTop( 0 );
            +                    }
            +                }
            +
            +                AutoComplete.Model.SCROLL_TIMEOUT && clearTimeout( AutoComplete.Model.SCROLL_TIMEOUT );
            +
            +                AutoComplete.Model.SCROLL_TIMEOUT =
            +                    setTimeout( function(){
            +                        AutoComplete.Model.isScroll = false;
            +                    }, 500 );
            +
            +            }
            +
            +        , removeActiveClass:
            +            function(){
            +                this._model.listItems().removeClass( AutoComplete.Model.CLASS_ACTIVE );
            +            }
            +    });
            +
            +    $.event.special[ AutoComplete.Model.REMOVE ] = {
            +        remove: 
            +            function(o) {
            +                if (o.handler) {
            +                    o.handler()
            +                }
            +            }
            +    };
            +
            +    $( window ).on( 'resize', function( _evt ){
            +        $( 'input.js_compAutoComplete' ).each( function(){
            +            var _ins = AutoComplete.getInstance( $( this ) );
            +                _ins && _ins.fixPosition();
            +        });
            +    });
            +
            +    $(document).on( 'click', function(){
            +        AutoComplete.hideAllPopup();
            +    });
            +
            +    $(document).delegate( 'input.js_compAutoComplete', 'focus', function( _evt ){
            +        !AutoComplete.getInstance( this ) 
            +            && new AutoComplete( this )
            +            ;
            +    });
            +
            +    /*
            +    $(document).ready( function(){
            +        var _insAr = 0;
            +        AutoComplete.autoInit && ( _insAr = AutoComplete.init() );
            +    });
            +    */
            +
            +    return JC.AutoComplete;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_AutoFixed_AutoFixed.js.html b/docs_api/files/.._comps_AutoFixed_AutoFixed.js.html new file mode 100644 index 000000000..727cb5f83 --- /dev/null +++ b/docs_api/files/.._comps_AutoFixed_AutoFixed.js.html @@ -0,0 +1,792 @@ + + + + + ../comps/AutoFixed/AutoFixed.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/AutoFixed/AutoFixed.js

            + +
            +
            +//TODO: 兼容 不支持 css position = fixed 的浏览器
            +;(function(define, _win) { 'use strict'; define( 'JC.AutoFixed', [ 'JC.BaseMVC' ], function(){
            +/**
            + * 自动 Fixed ( JC.AutoFixed )
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc.openjavascript.org/docs_api/classes/JC.AutoFixed.html' target='_blank'>API docs</a>
            + *      | <a href='../../comps/AutoFixed/_demo' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会处理 div class="js_compAutoFixed"</h2>
            + *
            + *  <h2>可用的 HTML attribute</h2>
            + *
            + *  <dl>
            + *      <dt>data-normalClass = css class name</dt>
            + *      <dd>正常状态下附加的 css<dd>
            + *
            + *      <dt>data-fixedClass = css class name</dt>
            + *      <dd>fixed 状态下附加的 css<dd>
            + *
            + *      <dt>data-cloneItemClass = css class name</dt>
            + *      <dd>fixed源 克隆对象附加的 css( 仅对 position = static 的克隆源生效 )<dd>
            + *
            + *      <dt>data-fixedTopPx = number, default = 0</dt>
            + *      <dd>
            + *          滚动到多少像素式开始执行 fixed
            + *      </dd>
            + *
            + *      <dt>data-fixAnchor = bool</dt>
            + *      <dd>
            + *          是否修正 html 锚点定位问题( 该问题通常出现在 position fixed top = 0 )
            + *      </dd>
            + *
            + *      <dt>data-highlightTrigger = selector</dt>
            + *      <dd>滚动时响应滚动条所在锚点的内容高亮显示</dd>
            + *
            + *      <dt>data-highlightAnchorLayout = selector, default = data-highlightTrigger</dt>
            + *      <dd>指定计算位置为锚点的某个父容器 y + height</dd>
            + *
            + *      <dt>data-highlightClass = css class name, default = cur</dt>
            + *      <dd>当前高亮的css class</dd>
            + *  </dl> 
            + *
            + * @namespace   JC
            + * @class       AutoFixed
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <h2>JC.AutoFixed 示例</h2>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.AutoFixed = AutoFixed;
            +
            +    function AutoFixed( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, AutoFixed ) ) 
            +            return JC.BaseMVC.getInstance( _selector, AutoFixed );
            +
            +        JC.BaseMVC.getInstance( _selector, AutoFixed, this );
            +
            +        this._model = new AutoFixed.Model( _selector );
            +        this._view = new AutoFixed.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( AutoFixed.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 AutoFixed 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of AutoFixedInstance}
            +     */
            +    AutoFixed.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compAutoFixed' )  ){
            +                    _r.push( new AutoFixed( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compAutoFixed, ul.js_compAutoFixed, dl.js_compAutoFixed' ).each( function(){
            +                        _r.push( new AutoFixed( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 初始化时是否添加延时
            +     * @property INIT_DELAY
            +     * @default  0
            +     * @type int
            +     * @static
            +     */
            +    AutoFixed.INIT_DELAY = 0;
            +
            +    JC.BaseMVC.build( AutoFixed );
            +
            +    JC.f.extendObject( AutoFixed.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'AutoFixed _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +                    var _st = JDOC.scrollTop(), _cp = _p._model.defaultStyle().top;
            +
            +                    //JC.log( _p._model.fixedTopPx() );
            +                    if( JDOC.scrollTop() > 0 ){
            +                        //JC.dir( _p._model.defaultStyle() );
            +                        _p.trigger( 'UPDATE_POSITION', [ _st, _cp ]  );
            +                    }
            +                });
            +
            +                _p._model.saveDefault();
            +
            +                if( _p._model.fixAnchor() ){
            +                    JDOC.delegate( 'a[href]', 'click', function( _evt ){
            +                        var _sp = $( this ), _href = _sp.attr( 'href' ) || '';
            +                        if( !/^[#]/.test( _href ) ) return;
            +                        JC.f.safeTimeout( function(){
            +                            JDOC.scrollTop( JDOC.scrollTop() - _p.selector().height() );
            +                        }, null, _p._model.gid(), 1 );
            +                    });
            +                }
            +
            +                JWIN.on( 'scroll', function( _evt ){
            +                    var _st = JDOC.scrollTop(), _cp = _p._model.defaultStyle().gtop;
            +                    _p.trigger( 'UPDATE_POSITION', [ _st, _cp ]  );
            +                });
            +
            +                JWIN.on( 'resize', function( _evt ){
            +                    var _cloneItem = _p._model.cloneItem(), _realWidth, _height, _ds, _winSize, _x, _css;
            +                    if( !_cloneItem ) {
            +                        _p._model.normalClass() 
            +                            && _p.selector().removeClass( _p._model.normalClass() )
            +                            && _p.selector().addClass( _p._model.normalClass() )
            +                            ;
            +                        _realWidth = _p.selector().width();
            +                    }else{
            +                        _ds = _p._model.defaultStyle();
            +                        _winSize = JC.f.winSize();
            +                        _height = _ds.height;
            +                        if( _height + _p._model.fixedTopPx() > _winSize.height ){
            +                            _height = _winSize.height - _p._model.fixedTopPx();
            +                        }
            +
            +                        if( _p._model.defaultStyle().right != 'auto' ) {
            +                            _p.selector().css( {
            +                                right: JC.f.winSize().width - ( _cloneItem.offset().left + _cloneItem.width() )
            +                                , height: _height
            +                            });
            +                            return;
            +                        }
            +                        _realWidth = _cloneItem.width();
            +                        _css = { 'width': _realWidth, 'height': _height, left: _cloneItem.offset().left };
            +                        if( _ds.right != 'auto' ){
            +                            _css.right = _winSize.width - ( _cloneItem.offset().left + _cloneItem.width() );
            +                        }else{
            +                            _css.left = _cloneItem.offset().left;
            +                        }
            +
            +                        _p.selector().css( _css );
            +                    }
            +                    _p._model.defaultStyle().width = _realWidth;
            +                });
            +
            +                _p.on( 'UPDATE_POSITION', function( _evt, _st, _cp ){
            +                    //JC.log( 'UPDATE_POSITION', _st, _cp );
            +                    if( ( _st ) > ( _cp - _p._model.fixedTopPx() ) ){
            +                        _p.trigger( 'FIXED', [ _st, _cp ] );
            +                    }else{
            +                        _p.trigger( 'UN_FIXED', [ _st, _cp ] );
            +                    }
            +                });
            +
            +                _p.on( 'FIXED', function( _evt, _st, _cp ){
            +                    var _ds = _p._model.defaultStyle(), _left = 0, _css, _winSize = JC.f.winSize(), _height, _cloneItem;
            +                    if( _p._model.cloneItem() ) return;
            +                    if( _p._model.fixedLock() ) return;
            +                    _p._model.fixedLock( true );
            +                    _p._model.unfixedLock( false );
            +
            +                    //JC.log( 'FIXED', _st, _cp );
            +
            +                    if( _ds.left != _ds.gleft ){
            +                        _left = _ds.gleft;
            +                    }else{
            +                        _left = _ds.left;
            +                    }
            +                    _height = _ds.height;
            +                    if( _height + _p._model.fixedTopPx() > _winSize.height ){
            +                        _height = _winSize.height - _p._model.fixedTopPx();
            +                    }
            +                    _p.trigger( 'CLONE_ITEM' );
            +                    _cloneItem = _p._model.cloneItem();
            +                    _css = {
            +                        'position': 'fixed'
            +                        , 'top': _p._model.fixedTopPx()
            +                        , 'height': _height
            +                        , 'width': _ds.width
            +                    };
            +                    if( _ds.right != 'auto' ){
            +                        _css.right = _winSize.width - ( _cloneItem.offset().left + _cloneItem.width() );
            +                    }else{
            +                        _css.left = _left;
            +                        _css.left = _cloneItem.offset().left;
            +                    }
            +                    _p.selector().css( _css );
            +
            +                    _p._model.normalClass() && _p.selector().removeClass( _p._model.normalClass() );
            +                    _p._model.fixedClass() && _p.selector().addClass( _p._model.fixedClass() );
            +                });
            +
            +                _p.on( 'UN_FIXED', function( _evt, _st, _cp ){
            +                    if( _p._model.unfixedLock() ) return;
            +                    _p._model.unfixedLock( true );
            +                    _p._model.fixedLock( false );
            +
            +                    var _ds = _p._model.defaultStyle(), _css;
            +                    //JC.log( 'UN_FIXED', _st, _cp );
            +                    _p.trigger( 'UN_CLONE_ITEM' );
            +                    _css = {
            +                        'position': _ds.position
            +                        , 'top': _ds.top
            +                        , 'height': _ds.height
            +                    };
            +                    if( _ds.right != 'auto' ){
            +                        _css.right = _ds.right;
            +                    }else{
            +                        _css.left = _ds.left;
            +                    }
            +
            +                    _p.selector().css( _css );
            +                    _p._model.fixedClass() && _p.selector().removeClass( _p._model.fixedClass() );
            +                    _p._model.normalClass() && _p.selector().addClass( _p._model.normalClass() );
            +                });
            +
            +                _p.on( 'CLONE_ITEM', function(){
            +                    if( _p._model.cloneItem() ) return;
            +                    var _cloneItem = $( '<div />' )
            +                        , _ds = _p._model.defaultStyle()
            +                        ;
            +                    _cloneItem.css( { 
            +                        'visibility': 'hidden' 
            +                        , 'height': _ds.height
            +                        , 'overflow': 'hidden'
            +                        , 'position': _ds.position
            +                        , 'right': _ds.right
            +                        , 'width': _ds.width
            +                    });
            +                    _p._model.cloneItemClass() && _cloneItem.addClass( _p._model.cloneItemClass() );
            +                    _cloneItem.html('');
            +                    _p._model.cloneItem( _cloneItem );
            +                    _p.selector().after( _cloneItem );
            +
            +                });
            +
            +                _p.on( 'UN_CLONE_ITEM', function(){
            +                    _p._model.cloneItem( null );
            +                });
            +
            +                if( _p._model.highlightTrigger() && _p._model.highlightTrigger().length ){
            +                    var _clickTs = JC.f.ts();
            +                    _p._model.highlightTrigger().on( 'click', function(){
            +                        _clickTs = JC.f.ts();
            +                        var _eles = _p._model.findTargetAnchorAndLayout( $( this )) || {};
            +                        _p.trigger( 'setCurHighlight', [ this, _eles.layout ] );
            +                    });
            +
            +                    _p.on( 'setCurHighlight', function( _evt, _src, _layout ){
            +                        _src = $( _src );
            +                        if( !( _src && _src.length ) ) return;
            +                        _p._model.lastHighlightItem() && _p._model.lastHighlightItem().removeClass( _p._model.highlightClass() );
            +                        _src.addClass( _p._model.highlightClass() );
            +                        _p._model.lastHighlightItem( _src );
            +
            +                        if( _layout && _layout.length ){
            +                            _p._model.lastHighlightLayout() && _p._model.lastHighlightLayout().removeClass( _p._model.highlightLayoutClass() );
            +                            _layout.addClass( _p._model.highlightLayoutClass() );
            +                            _p._model.lastHighlightLayout( _layout );
            +                        }
            +
            +                    });
            +
            +                    JWIN.on( 'scroll', function( _evt ){
            +                        if( JC.f.ts() - _clickTs < 200 ) return;
            +                        var _st = JDOC.scrollTop()
            +                            , _curItem
            +                            , _anchorOffset
            +                            ;
            +                        _p._model.highlightTrigger().each( function(){
            +                            var _src = $( this )
            +                                , _anchorName = _src.attr( 'href' ).replace( /^\#/, '' )
            +                                , _anchor
            +                                ;
            +                            if( !_anchorName ) return;
            +                            _anchor = $( JC.f.printf( 'a[name={0}]', _anchorName ) ).first();
            +                            if( !_anchor.length ) return;
            +                            _anchorOffset = _p._model.anchorOffset( _anchor );
            +
            +                            if( _anchorOffset.top > _st ){
            +                                _curItem = _src;
            +                                return false;
            +                            }
            +                        });
            +                        _anchorOffset = _anchorOffset || {};
            +                        if( _curItem ){
            +                            //JC.log( '_curItem', _curItem.attr( 'name' ) );
            +                            _p.trigger( 'setCurHighlight', [ _curItem, _anchorOffset.layout ] );
            +                        }
            +                    });
            +
            +                }
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'AutoFixed _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +    });
            +
            +    AutoFixed.Model._instanceName = 'JCAutoFixed';
            +    JC.f.extendObject( AutoFixed.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'AutoFixed.Model.init:', new Date().getTime() );
            +            }
            +
            +        , findTargetAnchorAndLayout:
            +            function( _trigger ){
            +              var _src = $( _trigger )
            +                    , _anchorName = _src.attr( 'href' ).replace( /^\#/, '' )
            +                    , _anchor
            +                    , _anchorOffset
            +                    , _r = null
            +                    ;
            +                if( !_anchorName ) return _r;
            +                _anchor = $( JC.f.printf( 'a[name={0}]', _anchorName ) ).first();
            +                if( !_anchor.length ) return _r;
            +                _r = { trigger: _src, target: _anchor, layout: this.highlightAnchorLayout( _anchor ) };
            +
            +                return _r;
            +            }
            +
            +        , gid: 
            +            function(){
            +                !this._gid && ( this._gid = JC.f.gid() );
            +                return this._gid;
            +            }
            +
            +        , lastHighlightLayout:
            +            function( _setter ){
            +                _setter && ( this._lastHighlightLayout = _setter );
            +                return this._lastHighlightLayout;
            +            }
            +
            +        , highlightLayoutClass:
            +            function(){
            +                return this.attrProp( 'data-highlightLayoutClass' ) || this.highlightClass() || 'cur';
            +            }
            +
            +        , lastHighlightItem:
            +            function( _setter ){
            +                _setter && ( this._lastHighlightItem = _setter );
            +                return this._lastHighlightItem;
            +            }
            +
            +        , highlightClass:
            +            function(){
            +                return this.attrProp( 'data-highlightClass' ) || 'cur';
            +            }
            +
            +        , highlightTrigger: 
            +            function(){
            +                return this.selectorProp( 'data-highlightTrigger' );
            +            }
            +
            +        , anchorOffset: 
            +            function( _a ){
            +                var _r = _a.offset(), _layout = this.highlightAnchorLayout( _a ), _tmp;
            +
            +                if( _layout && _layout.length ){
            +                    _r = _layout.offset();
            +                    _r.top += _layout.height();
            +                }
            +                _r.layout = _layout;
            +
            +                return _r;
            +            }
            +        , highlightAnchorLayout:
            +            function( _a ){
            +                var _r;
            +                if( this.is( '[data-highlightAnchorLayout]' ) ){
            +                     _r = JC.f.parentSelector( _a, this.attrProp( 'data-highlightAnchorLayout' ) );
            +                }
            +                return _r;
            +            }
            +
            +        , defaultStyle:
            +            function(){
            +                var _r = { 
            +                    position: 'static'
            +                    , left: 0, top: 0
            +                    , right: 0, bottom: 0
            +                    , width: 0, height: 0
            +                    , gleft: 0, gtop: 0 
            +                    , winSize: JC.f.winSize()
            +                };
            +                return this._defaultStyle || _r;
            +            }
            +
            +        , fixedLock:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._fixedLock = _setter );
            +                return this._fixedLock;
            +            }
            +
            +        , unfixedLock:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._unfixedLock= _setter );
            +                return this._unfixedLock;
            +            }
            +
            +        , saveDefault:
            +            function(){
            +                var _p = this, _r = _p.defaultStyle()
            +                    , _offset = _p.selector().position()
            +                    , _goffset = _p.selector().offset()
            +                    ;
            +
            +                _r.owidth = _p.selector().css( 'width' );
            +                _r.gleft = _goffset.left;
            +                _r.gtop = _goffset.top;
            +                _r.position = _p.selector().css( 'position' );
            +                _r.left = _offset.left;
            +                _r.top = _offset.top;
            +                _r.width = _p.selector().width();
            +                _r.height = _p.selector().height();
            +                _r.right = _p.selector().css( 'right' );
            +                _r.bottom = _p.selector().css( 'bottom' );
            +
            +                _p._defaultStyle = _r;
            +            }
            +
            +        , fixedTopPx:
            +            function(){
            +                typeof this._fixedTopPx == 'undefined' && ( this._fixedTopPx = this.floatProp( 'data-fixedTopPx' ) );
            +                return this._fixedTopPx;
            +            }
            +
            +        , fixAnchor:
            +            function(){
            +                return this.boolProp( 'data-fixAnchor' );
            +            }
            +
            +        , fixedClass: function(){ return this.attrProp( 'data-fixedClass' ); }
            +        , normalClass: function(){ return this.attrProp( 'data-normalClass' ); }
            +        , cloneItemClass: function(){ return this.attrProp( 'data-cloneItemClass' ); }
            +       
            +        , cloneItem:
            +            function( _setter ){
            +                if( typeof _setter != 'undefined' ){
            +                    if( !_setter && this._cloneItem ){
            +                        this._cloneItem.remove();
            +                    }
            +                    this._cloneItem = _setter;
            +                }
            +                return this._cloneItem;
            +            }
            +    });
            +
            +    JC.f.extendObject( AutoFixed.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'AutoFixed.View.init:', new Date().getTime() );
            +            }
            +    });
            +
            +    _jdoc.ready( function(){
            +        JC.f.safeTimeout( function(){
            +            if( JC.AutoFixed.INIT_DELAY ){
            +                JC.f.safeTimeout( function(){
            +                    AutoFixed.autoInit && AutoFixed.init();
            +                }, null, 'AutoFixedasdfasefasedf', JC.AutoFixed.INIT_DELAY );
            +            }else{
            +                AutoFixed.autoInit && AutoFixed.init();
            +            }
            +        }, null, 'AutoFixed23asdfa', 1 );
            +    });
            +
            +    return JC.AutoFixed;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_AutoSelect_AutoSelect.js.html b/docs_api/files/.._comps_AutoSelect_AutoSelect.js.html index 24e778583..114152819 100644 --- a/docs_api/files/.._comps_AutoSelect_AutoSelect.js.html +++ b/docs_api/files/.._comps_AutoSelect_AutoSelect.js.html @@ -3,11 +3,17 @@ ../comps/AutoSelect/AutoSelect.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,17 +252,19 @@

            File: ../comps/AutoSelect/AutoSelect.js

            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
             //TODO: 添加数据缓存逻辑
            -;(function($){
                 /**
                  * <h2>select 级联下拉框无限联动</h2>
                  * <br />只要引用本脚本, 页面加载完毕时就会自动初始化级联下拉框功能
                  * <br /><br />动态添加的 DOM 需要显式调用 JC.AutoSelect( domSelector ) 进行初始化
                  * <br /><br />要使页面上的级联下拉框功能能够自动初始化, 需要在select标签上加入一些HTML 属性
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.AutoSelect.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/AutoSelect/_demo' target='_blank'>demo link</a></p>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p>
                  * <h2>select 标签可用的 HTML 属性</h2>
                  * <dl>
                  *      <dt>defaultselect, 这个属性不需要赋值</dt>
            @@ -229,15 +303,43 @@ 

            File: ../comps/AutoSelect/AutoSelect.js

            * <dt>selectbeforeinited = 初始化之前的回调</dt> * * <dt>selectinited = 初始化后的回调</dt> -<dd><xmp>function selectinited( _items ){ +<dd><pre>function selectinited( _items ){ var _ins = this; -}</xmp> +}</pre> </dd> * * <dt>selectallchanged = 所有select请求完数据之后的回调, <b>window 变量域</b></dt> - * <dd><xmp>function selectallchanged( _items ){ + * <dd><pre>function selectallchanged( _items ){ var _ins = this; -}</xmp> +}</pre> + * </dd> + * + * <dt>selectCacheData = bool, default = true</dt> + * <dd>是否缓存ajax数据</dd> + * + * <dt>selectItemDataFilter = function</dt> + * <dd>每个select 显示option前,可自定义数据过滤函数 +<pre>function selectItemDataFilter2( _selector, _data, _pid){ + //alert( '_pid:' + _pid + '\n' + JSON.stringify( _data ) ); + var _r, i, j; + if( _pid === '' ){//过滤北京id = 28 + _r = []; + for( i = 0, j = _data.length; i < j; i++ ){ + if( _data[i][0] == 28 ) continue; + _r.push( _data[i] ); + } + _data = _r; + } + else if( _pid == 14 ){//过滤江门id=2254 + _r = []; + for( i = 0, j = _data.length; i < j; i++ ){ + if( _data[i][0] == 2254 ) continue; + _r.push( _data[i] ); + } + _data = _r; + } + return _data; +}</pre> * </dd> * </dl> * <h2>option 标签可用的 HTML 属性</h2> @@ -293,6 +395,8 @@

            File: ../comps/AutoSelect/AutoSelect.js

            JC.AutoSelect = AutoSelect; JC.Form && ( JC.Form.initAutoSelect = AutoSelect ); + JC.f.addAutoInit && JC.f.addAutoInit( AutoSelect ); + function AutoSelect( _selector ){ var _ins = []; _selector && ( _selector = $(_selector) ); @@ -626,7 +730,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            if( _ignoreAction ) return; - JC.log( '_responeChange:', _sp.attr('name'), _v ); + //JC.log( '_responeChange:', _sp.attr('name'), _v ); if( !( _next && _next.length ) ){ _p.trigger( 'SelectChange' ); @@ -661,18 +765,18 @@

            File: ../comps/AutoSelect/AutoSelect.js

            _url = _p._model.selecturl( _selector, _pid ); _token = _p._model.token( true ); - if( Model.ajaxCache( _url ) ){ + if( _p._model.selectCacheData() && Model.ajaxCache( _url ) ){ setTimeout( function(){ _data = Model.ajaxCache( _url ); - _p._view.update( _selector, _data ); + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data, _token ); }, 10 ); }else{ setTimeout( function(){ $.get( _url, function( _data ){ - _data = $.parseJSON( _data ); - Model.ajaxCache( _url, _data ); - _p._view.update( _selector, _data ); + _data = Model.ajaxCache( _url, $.parseJSON( _data ) ); + + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data, _token ); }); }, 10 ); @@ -684,12 +788,13 @@

            File: ../comps/AutoSelect/AutoSelect.js

            } _url = _p._model.selecturl( _selector, _pid ); - if( Model.ajaxCache( _url ) ){ - _p._processData( _oldToken, _selector, _cb, Model.ajaxCache( _url ) ); + if( _p._model.selectCacheData() && Model.ajaxCache( _url ) ){ + _data = Model.ajaxCache( _url ); + _p._processData( _oldToken, _selector, _cb, _data, _pid ); }else{ $.get( _url, function( _data ){ _data = $.parseJSON( _data ); - _p._processData( _oldToken, _selector, _cb, Model.ajaxCache( _url, _data ) ); + _p._processData( _oldToken, _selector, _cb, Model.ajaxCache( _url, _data, _pid ) ); }); } } @@ -697,13 +802,13 @@

            File: ../comps/AutoSelect/AutoSelect.js

            } , _processData: - function( _oldToken, _selector, _cb, _data ){ + function( _oldToken, _selector, _cb, _data, _pid ){ var _p = this; setTimeout( function(){ if( typeof _oldToken != 'undefined' && _oldToken != _p._model.token() ){ return; } - _p._view.update( _selector, _data ); + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data, _oldToken ); }, 10 ); } @@ -746,7 +851,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            _p.trigger( 'SelectChange', [ _selector ] ); if( _next && _next.length ){ - JC.log( '_firstInitCb:', _selector.val(), _next.attr('name'), _selector.attr('name') ); + //JC.log( '_firstInitCb:', _selector.val(), _next.attr('name'), _selector.attr('name') ); _p._update( _next, _p._firstInitCb, _selector.val() ); } @@ -761,7 +866,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            , _updateStatic: function( _selector, _cb, _pid ){ var _p = this, _data, _ignoreUpdate = false; - JC.log( 'static select' ); + //JC.log( 'static select' ); if( _p._model.isFirst( _selector ) ){ typeof _pid == 'undefined' && ( _pid = _p._model.selectparentid( _selector ) @@ -777,7 +882,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            }else{ _data = _p._model.datacb( _selector )( _pid ); } - !_ignoreUpdate && _p._view.update( _selector, _data ); + !_ignoreUpdate && _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data ); return this; } @@ -785,7 +890,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            , _updateNormal: function( _selector, _cb, _pid ){ var _p = this, _data; - JC.log( 'normal select' ); + //JC.log( 'normal select' ); if( _p._model.isFirst( _selector ) ){ var _next = _p._model.next( _selector ); typeof _pid == 'undefined' && ( _pid = _p._model.selectvalue( _selector ) || _selector.val() || '' ); @@ -799,7 +904,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            }else{ _data = _p._model.datacb( _selector )( _pid ); } - _p._view.update( _selector, _data ); + _p._view.update( _selector, _data, _pid ); _cb && _cb.call( _p, _selector, _data ); return this; } @@ -824,7 +929,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            _init: function(){ this._findAllItems( this._selector ); - JC.log( 'select items.length:', this._items.length ); + //JC.log( 'select items.length:', this._items.length ); this._initRelationship(); return this; } @@ -836,11 +941,18 @@

            File: ../comps/AutoSelect/AutoSelect.js

            return this._token; } + , selectCacheData: + function(){ + var _r = true; + this.first().is( '[selectCacheData]' ) && ( _r = JC.f.parseBool( this.first().attr('selectCacheData') ) ); + return _r; + } + , _findAllItems: function( _selector ){ this._items.push( _selector ); _selector.is( '[selecttarget]' ) - && this._findAllItems( parentSelector( _selector, _selector.attr('selecttarget') ) ); + && this._findAllItems( JC.f.parentSelector( _selector, _selector.attr('selecttarget') ) ); } , _initRelationship: @@ -908,7 +1020,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            function( _selector ){ var _r = AutoSelect.randomurl; _selector.is('[selectrandomurl]') - && ( _r = parseBool( _selector.attr('selectrandomurl') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selectrandomurl') ) ) ; return _r; } @@ -918,12 +1030,12 @@

            File: ../comps/AutoSelect/AutoSelect.js

            var _r = AutoSelect.ignoreInitRequest; this.first().is('[selectignoreinitrequest]') - && ( _r = parseBool( this.first().attr('selectignoreinitrequest') ) ) + && ( _r = JC.f.parseBool( this.first().attr('selectignoreinitrequest') ) ) ; _selector && _selector.is('[selectignoreinitrequest]') - && ( _r = parseBool( _selector.attr('selectignoreinitrequest') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selectignoreinitrequest') ) ) ; return _r; } @@ -933,7 +1045,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            function(){ var _r = AutoSelect.triggerInitChange, _selector = this.first(); _selector.attr('selecttriggerinitchange') - && ( _r = parseBool( _selector.attr('selecttriggerinitchange') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selecttriggerinitchange') ) ) ; return _r; } @@ -945,13 +1057,13 @@

            File: ../comps/AutoSelect/AutoSelect.js

            _first && _first.length && _first.is('[selecthideempty]') - && ( _r = parseBool( _first.attr('selecthideempty') ) ) + && ( _r = JC.f.parseBool( _first.attr('selecthideempty') ) ) ; _selector && _selector.length && _selector.is('[selecthideempty]') - && ( _r = parseBool( _selector.attr('selecthideempty') ) ) + && ( _r = JC.f.parseBool( _selector.attr('selecthideempty') ) ) ; return _r; } @@ -963,8 +1075,8 @@

            File: ../comps/AutoSelect/AutoSelect.js

            && window[ _selector.attr('selectprocessurl' ) ] && ( _cb = window[ _selector.attr('selectprocessurl' ) ] ) ; - _r = printf( _r, _pid ); - this.randomurl( _selector ) && ( _r = addUrlParams( _r, {'rnd': new Date().getTime() } ) ); + _r = JC.f.printf( _r, _pid ); + this.randomurl( _selector ) && ( _r = JC.f.addUrlParams( _r, {'rnd': new Date().getTime() } ) ); _cb && ( _r = _cb.call( _selector, _r, _pid ) ); return _r; } @@ -1048,6 +1160,15 @@

            File: ../comps/AutoSelect/AutoSelect.js

            }); return _r; } + + , selectItemDataFilter: + function( _selector ){ + var _r; + _selector + && _selector.is( '[selectItemDataFilter]' ) + && ( _r = window[ _selector.attr( 'selectItemDataFilter' ) ] ); + return _r; + } }; function View( _model, _control ){ @@ -1064,9 +1185,13 @@

            File: ../comps/AutoSelect/AutoSelect.js

            } , update: - function( _selector, _data ){ - var _default = this._model.selectvalue( _selector ); + function( _selector, _data, _pid ){ + var _p = this, _default = this._model.selectvalue( _selector ); _data = this._model.dataFilter( _selector, _data ); + + _p._model.selectItemDataFilter( _selector ) + && ( _data = _p._model.selectItemDataFilter( _selector )( _selector, _data, _pid ) ); + this._model.data( _selector, _data ); this._control.trigger( 'SelectItemBeforeUpdate', [ _selector, _data ] ); @@ -1085,7 +1210,7 @@

            File: ../comps/AutoSelect/AutoSelect.js

            var _html = [], _tmp, _selected; for( var i = 0, j = _data.length; i < j; i++ ){ _tmp = _data[i]; - _html.push( printf( '<option value="{0}" {2}>{1}</option>', _tmp[0], _tmp[1], _selected ) ); + _html.push( JC.f.printf( '<option value="{0}" {2}>{1}</option>', _tmp[0], _tmp[1], _selected ) ); } $( _html.join('') ).appendTo( _selector ); @@ -1135,8 +1260,16 @@

            File: ../comps/AutoSelect/AutoSelect.js

            setTimeout( function(){ AutoSelect( document.body ); }, 200 ); }); -}(jQuery)); - + return JC.AutoSelect; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_BaseMVC_BaseMVC.js.html b/docs_api/files/.._comps_BaseMVC_BaseMVC.js.html new file mode 100644 index 000000000..f0dbec2be --- /dev/null +++ b/docs_api/files/.._comps_BaseMVC_BaseMVC.js.html @@ -0,0 +1,940 @@ + + + + + ../comps/BaseMVC/BaseMVC.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/BaseMVC/BaseMVC.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
            +    window.BaseMVC = JC.BaseMVC = BaseMVC;
            +    /**
            +     * MVC 抽象类 ( <b>仅供扩展用, 这个类不能实例化</b>)
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.BaseMVC.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/BaseMVC/_demo' target='_blank'>demo link</a></p>
            +     * @namespace JC
            +     * @class BaseMVC
            +     * @constructor
            +     * @param   {selector|string}   _selector   
            +     * @version dev 0.1 2013-09-07
            +     * @author  qiushaowei   <suches@btbtd.org> | 75 Team
            +     */
            +    function BaseMVC( _selector ){
            +        throw new Error( "JC.BaseMVC is an abstract class, can't initialize!" );
            +
            +        if( BaseMVC.getInstance( _selector ) ) return BaseMVC.getInstance( _selector );
            +        BaseMVC.getInstance( _selector, this );
            +
            +        this._model = new BaseMVC.Model( _selector );
            +        this._view = new BaseMVC.View( this._model );
            +
            +        this._init( );
            +    }
            +    
            +    BaseMVC.prototype = {
            +        /**
            +         * 内部初始化方法
            +         * @method  _init
            +         * @param   {selector}  _selector
            +         * @private
            +         */
            +        _init:
            +            function(){
            +                var _p = this;
            +
            +                $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){
            +                    _p.on( _evtName, _cb );
            +                });
            +
            +                $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){
            +                    var _data = JC.f.sliceArgs( arguments ).slice( 2 );
            +                    return _p.triggerHandler( _evtName, _data );
            +                });
            +
            +                _p._beforeInit();
            +                _p._initHanlderEvent();
            +
            +                _p._model.init();
            +                _p._view && _p._view.init();
            +
            +                _p._inited();
            +
            +                return _p;
            +            }    
            +        /**
            +         * 初始化之前调用的方法
            +         * @method  _beforeInit
            +         * @private
            +         */
            +        , _beforeInit:
            +            function(){
            +            }
            +        /**
            +         * 内部事件初始化方法
            +         * @method  _initHanlderEvent
            +         * @private
            +         */
            +        , _initHanlderEvent:
            +            function(){
            +            }
            +        /**
            +         * 内部初始化完毕时, 调用的方法
            +         * @method  _inited
            +         * @private
            +         */
            +        , _inited:
            +            function(){
            +            }
            +        /**
            +         * 获取 显示 BaseMVC 的触发源选择器, 比如 a 标签
            +         * @method  selector
            +         * @return  selector
            +         */ 
            +        , selector: function(){ return this._model.selector(); }
            +        /**
            +         * 使用 jquery on 绑定事件
            +         * @method  {string}    on
            +         * @param   {string}    _evtName
            +         * @param   {function}  _cb
            +         * @return  BaseMVCInstance
            +         */
            +        , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;}
            +        /**
            +         * 使用 jquery trigger 触发绑定事件
            +         * @method  {string}    trigger
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         * @return  BaseMVCInstance
            +         */
            +        , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;}
            +        /**
            +         * 使用 jquery triggerHandler 触发绑定事件
            +         * @method  {string}    triggerHandler
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         * @return  {*}
            +         */
            +        , triggerHandler: function( _evtName, _data ){ return $(this).triggerHandler( _evtName, _data ); }
            +        /**
            +         * 通知选择器有新事件
            +         * <br />JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件
            +         * @method  notification
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         */
            +        , notification:
            +            function( _evtName, _args ){
            +                this._model.notification( _evtName, _args );
            +            }
            +        /**
            +         * 通知选择器有新事件, 有返回结果
            +         * <br />JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件
            +         * @method  notificationHandler
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         * @return  {*}
            +         */
            +        , notificationHandler:
            +            function( _evtName, _args ){
            +                return this._model.notificationHandler( _evtName, _args );
            +            }
            +
            +    }
            +    /**
            +     * 获取或设置组件实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @param   {Class}         _staticClass
            +     * @param   {ClassInstance} _classInstance
            +     * @static
            +     * @return  {ClassInstance | null}
            +     */
            +    BaseMVC.getInstance =
            +        function( _selector, _staticClass, _classInstance ){
            +            typeof _selector == 'string' 
            +                && !/</.test( _selector ) 
            +                && ( _selector = $(_selector) )
            +                ;
            +
            +            typeof _selector == 'object' && ( _selector = $( _selector ) );
            +
            +            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return null;
            +
            +            _staticClass.Model._instanceName = _staticClass.Model._instanceName || 'CommonIns';
            +
            +            typeof _classInstance != 'undefined' 
            +                && _selector.data( _staticClass.Model._instanceName, _classInstance );
            +
            +            return _selector.data( _staticClass.Model._instanceName);
            +        };
            +    /**
            +     * 是否自动初始化
            +     * @property    autoInit
            +     * @type        bool
            +     * @default     true
            +     * @static
            +     */
            +    BaseMVC.autoInit = true;
            +    /**
            +     * 复制 BaseMVC 的所有方法到 _outClass
            +     * @method  build
            +     * @param   {Class} _outClass
            +     * @static
            +     */
            +    BaseMVC.build =
            +        function( _outClass, _srcClass ){
            +            _srcClass = _srcClass || BaseMVC;
            +            typeof _srcClass == 'string' && ( _srcClass = BaseMVC );
            +
            +            BaseMVC.buildModel( _outClass );
            +            BaseMVC.buildView( _outClass );
            +
            +            BaseMVC.buildClass( _srcClass, _outClass );
            +            _srcClass.Model && BaseMVC.buildClass( _srcClass.Model, _outClass.Model );
            +            _srcClass.View && BaseMVC.buildClass( _srcClass.View, _outClass.View );
            +        };
            +    /**
            +     * 复制 _inClass 的所有方法到 _outClass
            +     * @method  buildClass
            +     * @param   {Class}     _inClass
            +     * @param   {Class}     _outClass
            +     * @static
            +     */
            +    BaseMVC.buildClass = 
            +        function( _inClass, _outClass ){
            +            if( !( _inClass && _outClass ) ) return;
            +            var _k
            +                , _fStr, _tmp
            +                ;
            +
            +            if( _outClass ){
            +                for( _k in _inClass ){ 
            +                    if( !_outClass[_k] ){
            +                        //ignore static function
            +                        if( _inClass[_k].constructor == Function ){
            +                        }else{//clone static property
            +                            _outClass[_k] = _inClass[_k];
            +                        }
            +                    }
            +                }
            +
            +                for( _k in _inClass.prototype ) 
            +                    !_outClass.prototype[_k] && ( _outClass.prototype[_k] = _inClass.prototype[_k] );
            +            }
            +        };
            +    /**
            +     * 为 _outClass 生成一个通用 Model 类
            +     * @method  buildModel
            +     * @param   {Class} _outClass
            +     * @static
            +     */
            +    BaseMVC.buildModel =
            +        function( _outClass ){
            +            !_outClass.Model && ( 
            +                        _outClass.Model = function( _selector ){ this._selector = _selector; }
            +                        , _outClass.Model._instanceName = 'CommonIns'
            +                    );
            +        }
            +    /**
            +     * 为 _outClass 生成一个通用 View 类
            +     * @method  buildView
            +     * @param   {Class} _outClass
            +     * @static
            +     */
            +    BaseMVC.buildView =
            +        function( _outClass ){
            +            !_outClass.View && ( _outClass.View = function( _model ){ this._model = _model; } );
            +        }
            +    /**
            +     * 初始化 BaseMVC Model 类 和 View 类
            +     */
            +    BaseMVC.buildModel( BaseMVC );
            +    BaseMVC.buildView( BaseMVC );
            +    /**
            +     * MVC Model 类( <b>仅供扩展用</b> )
            +     * <br />这个类默认已经包含在lib.js里面, 不需要显式引用
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc2.openjavascript.org/docs_api/classes/JC.BaseMVC.Model.html' target='_blank'>API docs</a>
            +     * | <a href='../../modules/JC.BaseMVC/0.1/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.BaseMVC.html'>JC.BaseMVC</a></p>
            +     * @namespace JC
            +     * @class BaseMVC.Model
            +     * @constructor
            +     * @param   {selector|string}   _selector   
            +     * @version dev 0.1 2013-09-11
            +     * @author  qiushaowei   <suches@btbtd.org> | 75 Team
            +     */
            +    //BaseMVC.buildModel( BaseMVC );
            +    /**
            +     * 设置 selector 实例引用的 data 属性名
            +     * @property    _instanceName
            +     * @type        string
            +     * @default     BaseMVCIns
            +     * @private
            +     * @static
            +     */
            +    BaseMVC.Model._instanceName = 'BaseMVCIns';
            +    JC.f.extendObject( BaseMVC.Model.prototype, {
            +        init:
            +            function(){
            +                return this;
            +            }
            +        /**
            +         * 使用 jquery on 为 controler 绑定事件
            +         * @method  {string}    on
            +         * @param   {string}    _evtName
            +         * @param   {function}  _cb
            +         */
            +        , on:
            +            function(){
            +                $( this ).trigger( 'BindEvent', JC.f.sliceArgs( arguments ) );
            +                return this;
            +            }
            +        /**
            +         * 使用 jquery trigger 触发 controler 绑定事件
            +         * @method  {string}    trigger
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         */
            +        , trigger:
            +            function( _evtName, _args ){
            +                _args = _args || [];
            +                !jQuery.isArray( _args ) && ( _args = [ _args ] );
            +                _args.unshift( _evtName );
            +                $( this ).trigger( 'TriggerEvent', _args );
            +                return this;
            +            }
            +        /**
            +         * 使用 jquery trigger 触发 controler 绑定事件( 有换回数据 )
            +         * @method  {string}    trigger
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         * @return  {*}
            +         */
            +        , triggerHandler:
            +            function( _evtName, _args ){
            +                _args = _args || [];
            +                !jQuery.isArray( _args ) && ( _args = [ _args ] );
            +                _args.unshift( _evtName );
            +                return $( this ).trigger( 'TriggerEvent', _args );
            +            }
            +        /**
            +         * 通知选择器有新事件
            +         * @method  notification
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         */
            +        , notification:
            +            function( _evtName, _args ){
            +                this.selector() 
            +                    && this.selector().length 
            +                    && this.selector().trigger( _evtName, _args );
            +            }
            +        /**
            +         * 通知选择器有新事件
            +         * @method  notificationHandler
            +         * @param   {string}    _evtName
            +         * @param   {*|Array}   _args      
            +         * @return  {*}
            +         */
            +        , notificationHandler:
            +            function( _evtName, _args ){
            +                var _r;
            +                this.selector() 
            +                    && this.selector().length 
            +                    && ( _r = this.selector().triggerHandler( _evtName, _args ) );
            +                return _r;
            +            }
            +        /**
            +         * 初始化的 jq 选择器
            +         * @method  selector
            +         * @param   {selector}  _setter
            +         * @return  selector
            +         */
            +        , selector: 
            +            function( _setter ){ 
            +                typeof _setter != 'undefined' && ( this._selector = _setter );
            +                return this._selector; 
            +            }
            +        /**
            +         * 读取 int 属性的值
            +         * @method  intProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  int
            +         */
            +        , intProp:
            +            function( _selector, _key ){
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +                var _r = 0;
            +                _selector 
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( _r = parseInt( _selector.attr( _key ).trim(), 10 ) || _r );
            +                return _r;
            +            }
            +        /**
            +         * 读取 float 属性的值
            +         * @method  floatProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  float
            +         */
            +        , floatProp:
            +            function( _selector, _key ){
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +                var _r = 0;
            +                _selector 
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( _r = parseFloat( _selector.attr( _key ).trim() ) || _r );
            +                return _r;
            +            }
            +        /**
            +         * 读取 string 属性的值
            +         * @method  stringProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  string
            +         */
            +        , stringProp:
            +            function( _selector, _key ){
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +                var _r = ( this.attrProp( _selector, _key ) || '' ).toLowerCase();
            +                return _r;
            +            }
            +        /**
            +         * 读取 html 属性值
            +         * <br />这个跟 stringProp 的区别是不会强制转换为小写
            +         * @method  attrProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  string
            +         */
            +        , attrProp:
            +            function( _selector, _key ){
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +                var _r = '';
            +                _selector
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( ( _r = _selector.attr( _key ) || '' ).trim() );
            +                return _r;
            +            }
            +
            +        /**
            +         * 读取 boolean 属性的值
            +         * @method  boolProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string|bool}       _key
            +         * @param   {bool}              _defalut
            +         * @return  {bool|undefined}
            +         */
            +        , boolProp:
            +            function( _selector, _key, _defalut ){
            +                if( typeof _key == 'boolean' ){
            +                    _defalut = _key;
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +                var _r = undefined;
            +                _selector
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( _r = JC.f.parseBool( _selector.attr( _key ).trim() ) );
            +                return _r;
            +            }
            +        /**
            +         * 读取 callback 属性的值
            +         * @method  callbackProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  {function|undefined}
            +         */
            +        , callbackProp:
            +            function( _selector, _key ){
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +                var _r, _tmp;
            +                _selector 
            +                    && _selector.is( '[' + _key + ']' )
            +                    && ( _tmp = window[ _selector.attr( _key ) ] )
            +                    && ( _r = _tmp )
            +                    ;
            +                return _r;
            +            }
            +        /**
            +         * 获取与属性名匹配的 window 变量 
            +         * @method  windowProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  {window variable}
            +         */
            +        , windowProp:
            +            function(){
            +                return this.callbackProp.apply( this, JC.f.sliceArgs( arguments ) );
            +            }
            +        /**
            +         * 获取 selector 属性的 jquery 选择器
            +         * @method  selectorProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  bool
            +         */
            +        , selectorProp:
            +            function( _selector, _key ){
            +                var _r;
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +
            +                _selector
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( _r = JC.f.parentSelector( _selector, _selector.attr( _key ) ) );
            +
            +                return _r;
            +            }
            +        /**
            +         * 获取 脚本模板 jquery 选择器
            +         * @method  scriptTplProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  string
            +         */
            +        , scriptTplProp:
            +            function( _selector, _key ){
            +                var _r = '', _tmp;
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +
            +                _selector
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( _tmp = JC.f.parentSelector( _selector, _selector.attr( _key ) ) )
            +                    && _tmp.length 
            +                    && ( _r = JC.f.scriptContent( _tmp ) );
            +
            +                return _r;
            +            }
            +        /**
            +         * 获取 脚本数据 jquery 选择器
            +         * @method  scriptDataProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  object
            +         */
            +        , scriptDataProp:
            +            function( _selector, _key ){
            +                var _r = null, _tmp;
            +                _tmp = this.scriptTplProp( _selector, _key );
            +
            +                if( _tmp ){
            +                    _tmp = _tmp.replace( /^[\s]*?\/\/[\s\S]*?[\r\n]/gm, '' );
            +                    _tmp = _tmp.replace( /[\r\n]/g, '' );
            +                    _tmp = _tmp.replace( /\}[\s]*?,[\s]*?\}$/g, '}}');
            +                    _r = eval( '(' + _tmp + ')' );
            +                }
            +
            +                return _r;
            +            }
            +
            +        /**
            +         * 获取 selector 属性的 json 数据
            +         * @method  jsonProp
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  {json | null}
            +         */
            +        , jsonProp:
            +            function( _selector, _key ){
            +                var _r;
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +
            +                _selector
            +                    && _selector.is( '[' + _key + ']' ) 
            +                    && ( _r = eval( '(' + _selector.attr( _key ) + ')' ) );
            +
            +                return _r;
            +            }
            +
            +        /**
            +         * 判断 _selector 是否具体某种特征
            +         * @method  is
            +         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            +         * @param   {string}           _key
            +         * @return  bool
            +         */
            +        , is:
            +            function( _selector, _key ){
            +                if( typeof _key == 'undefined' ){
            +                    _key = _selector;
            +                    _selector = this.selector();
            +                }else{
            +                    _selector && ( _selector = $( _selector ) );
            +                }
            +
            +                return _selector && _selector.is( _key );
            +            }
            +    });
            +    
            +    JC.f.extendObject( BaseMVC.View.prototype, {
            +        init:
            +            function() {
            +                return this;
            +            }
            +        , selector:
            +            function(){
            +                return this._model.selector();
            +            }
            +        /**
            +         * 使用 jquery on 为 controler 绑定事件
            +         */
            +        , on:
            +            function(){
            +                $( this ).trigger( 'BindEvent', JC.f.sliceArgs( arguments ) );
            +                return this;
            +            }
            +        /**
            +         * 使用 jquery trigger 触发 controler 绑定事件
            +         */
            +        , trigger:
            +            function( _evtName, _args ){
            +                _args = _args || [];
            +                !jQuery.isArray( _args ) && ( _args = [ _args ] );
            +                _args.unshift( _evtName );
            +                $( this ).trigger( 'TriggerEvent', _args );
            +                return this;
            +            }
            +        , triggerHandler:
            +            function( _evtName, _args ){
            +                _args = _args || [];
            +                !jQuery.isArray( _args ) && ( _args = [ _args ] );
            +                _args.unshift( _evtName );
            +                return $( this ).trigger( 'TriggerEvent', _args );
            +            }
            +        , notification:
            +            function( _evtName, _args ){
            +                this._model.notification( _evtName, _args );
            +            }
            +        , notificationHandler:
            +            function( _evtName, _args ){
            +                return this._model.notificationHandler( _evtName, _args );
            +            }
            +    });
            +
            +    return JC.BaseMVC;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Calendar_Calendar.date.js.html b/docs_api/files/.._comps_Calendar_Calendar.date.js.html new file mode 100644 index 000000000..b00565b5d --- /dev/null +++ b/docs_api/files/.._comps_Calendar_Calendar.date.js.html @@ -0,0 +1,2374 @@ + + + + + ../comps/Calendar/Calendar.date.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Calendar/Calendar.date.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
            +//TODO: minvalue, maxvalue 添加默认日期属性识别属性
            +    /**
            +     * 日期选择组件
            +     * <br />全局访问请使用 JC.Calendar 或 Calendar
            +     * <br />DOM 加载完毕后
            +     * , Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签
            +     * <br />Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector )
            +     * <br />_selector 可以是 新加载的容器, 也可以是新加载的所有input
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Calendar.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Calendar/_demo/' target='_blank'>demo link</a></p>
            +     * <h2> 可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season) </h2> 
            +     * <dl>
            +     *      <dt>defaultdate = ISO Date</dt>
            +     *      <dd>默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性</dd>
            +     *
            +     *      <dt>datatype = string</dt>
            +     *      <dd>
            +     *          声明日历控件的类型:
            +     *          <br /><b>date:</b> 日期日历
            +     *          <br /><b>week:</b> 周日历
            +     *          <br /><b>month:</b> 月日历
            +     *          <br /><b>season:</b> 季日历
            +     *          <br /><b>year:</b> 年日历
            +     *          <br /><b>monthday:</b> 多选日期日历
            +     *      </dd>
            +     *
            +     *      <dt>multidate = string</dt>
            +     *      <dd>
            +     *          与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突
            +     *      </dd>
            +     *
            +     *      <dt>calendarshow = function</dt>
            +     *      <dd>显示日历时的回调
            +<pre>function calendarshow( _selector, _ins ){
            +    var _selector = $(this);
            +    UXC.log( 'calendarshow', _selector.val() );
            +}
            +</pre></dd>
            +     *
            +     *      <dt>calendarhide = function</dt>
            +     *      <dd>隐藏日历时的回调
            +<pre>function calendarhide( _selector, _ins ){
            +    var _selector = $(this);
            +    UXC.log( 'calendarhide', _selector.val() );
            +}</pre></dd>
            +     *
            +     *      <dt>calendarlayoutchange = function</dt>
            +     *      <dd>用户点击日历控件操作按钮后, 外观产生变化时触发的回调
            +<pre>function calendarlayoutchange( _selector, _ins ){
            +    var _selector = $(this);
            +    JC.log( 'calendarlayoutchange', _selector.val() );
            +}
            +</pre></dd>
            +     *
            +     *      <dt>calendarupdate = function</dt>
            +     *      <dd>
            +     *          赋值后触发的回调
            +<pre>function calendarupdate( _startDate, _endDate, _ins ){
            +    var _selector = $(this);
            +    JC.log( 'calendarupdate', _selector.val(), _startDate, _endDate );
            +}
            +</pre></dd>
            +     *
            +     *      <dt>calendarclear = function</dt>
            +     *      <dd>清空日期触发的回调
            +<pre>function calendarclear( _selector, _ins ){
            +    var _selector = $(this);
            +}</pre></dd>
            +     *
            +     *      <dt>minvalue = ISO Date</dt>
            +     *      <dd>日期的最小时间, YYYY-MM-DD</dd>
            +     *
            +     *      <dt>maxvalue = ISO Date</dt>
            +     *      <dd>日期的最大时间, YYYY-MM-DD</dd>
            +     *
            +     *      <dt>currentcanselect = bool, default = true</dt>
            +     *      <dd>当前日期是否能选择</dd>
            +     *
            +     *      <dt>multiselect = bool (目前支持 month: default=false, monthday: default = true)</dt>
            +     *      <dd>是否为多选日历</dd>
            +     *
            +     *      <dt>calendarupdatemultiselect = function</dt>
            +     *      <dd>
            +     *          多选日历赋值后触发的回调
            +     *          <dl>
            +     *              <dt>参数: _data:</dt>
            +     *              <dd>
            +     *                  [{"start": Date,"end": Date}[, {"start": Date,"end": Date}... ] ]
            +     *              </dd>
            +     *          </dl>
            +<pre>function calendarupdatemultiselect( _data, _ins ){
            +    var _selector = $(this);
            +    window.JSON && ( _data = JSON.stringify( _data ) );
            +    JC.log( 'calendarupdatemultiselect:'
            +        , JC.f.printf( 'val:{0}, data:{1}', _selector.val(), _data ) );
            +}</pre></dd>
            +     *
            +     *      <dt>dateFormat = string</dt>
            +     *      <dd>
            +     *          自定义日期格式化显示, 使用 JC.f.dateFormat 函数进行格式化
            +     *          <br />如果日期去除非数字后不是 8/16 位数字的话, 需要 显式声明 dateParse 属性, 自定义日期解析函数
            +     *      </dd>
            +     *
            +     *      <dt>fullDateFormat = string</dt>
            +     *      <dd>
            +     *          针对 日期类型: 月/季/年 定义显示格式, default: "{0} 至 {1}"
            +     *          <br />{0}代表开始日期, {1}代表结束日期
            +     *      </dd>
            +     *
            +     *      <dt>ignoreInitCalendarDate = bool, default = false</dt>
            +     *      <dd>是否忽略初始化 控件的值</dd>
            +     *
            +     *      <dt>dateParse = function </dt>
            +     *      <dd>
            +     *          自定义日期格式函数, 针对日期不能解析为 8 位数字的特殊日期
            +     *          <br />例子:
            +<pre>//
            +/// 针对月份日期格式化 YY-MM
            +//
            +function parseYearMonthDate( _dateStr ){
            +    _dateStr = $.trim( _dateStr || '' );
            +    var _r = { start: null, end: null };
            +    if( !_dateStr ) return _r;
            +
            +    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +    var _year = _dateStr.slice( 0, 4 ), _month = parseInt( _dateStr.slice( 4 ), 10 ) - 1;
            +
            +    _r.start = new Date( _year, _month, 1 );
            +    return _r;
            +}
            +//
            +/// 针对季度日期格式化 YY-MM ~ YY-MM
            +//
            +function parseSeasonDate( _dateStr ){
            +    _dateStr = $.trim( _dateStr || '' );
            +    var _r = { start: null, end: null };
            +    if( !_dateStr ) return _r;
            +
            +    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +
            +    _r.start = JC.f.parseISODate( _dateStr.slice( 0, 6 ) + '01' );
            +    _r.end = JC.f.parseISODate( _dateStr.slice( 6 ) + '01' );
            +
            +    return _r;
            +}
            +//
            +/// 针对年份日期格式化 YY
            +//
            +function parseYearDate( _dateStr ){
            +    _dateStr = $.trim( _dateStr || '' );
            +    var _r = { start: null, end: null };
            +    if( !_dateStr ) return _r;
            +
            +    _dateStr = _dateStr.replace( /[^\d]+/g, '' );
            +    var _year = _dateStr.slice( 0, 4 );
            +
            +    _r.start = new Date( _year, 0, 1 );
            +    return _r;
            +}</pre>
            +     *      </dd>
            +     * </dl>
            +     * @namespace JC
            +     * @class Calendar
            +     * @version dev 0.3, 2013-12-09 添加 年日历, 优化继承代码块
            +     * @version dev 0.2, 2013-09-01 过程式转单例模式
            +     * @version dev 0.1, 2013-06-04
            +     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            +     */
            +    window.Calendar = JC.Calendar = Calendar;
            +    JC.f.addAutoInit && JC.f.addAutoInit( Calendar );
            +    function Calendar( _selector ){
            +        if( Calendar.getInstance( _selector ) ) return Calendar.getInstance( _selector );
            +        Calendar.getInstance( _selector, this );
            +
            +        var _type = Calendar.type( _selector );
            +
            +        //JC.log( 'Calendar init:', _type, new Date().getTime() );
            +
            +        switch( _type ){
            +            case 'week': 
            +                {
            +                    this._model = new Calendar.WeekModel( _selector );
            +                    this._view = new Calendar.WeekView( this._model );
            +                    break;
            +                }
            +            case 'month': 
            +                {
            +                    this._model = new Calendar.MonthModel( _selector );
            +                    this._view = new Calendar.MonthView( this._model );
            +                    break;
            +                }
            +            case 'season': 
            +                {
            +                    this._model = new Calendar.SeasonModel( _selector );
            +                    this._view = new Calendar.SeasonView( this._model );
            +                    break;
            +                }
            +            case 'year': 
            +                {
            +                    this._model = new Calendar.YearModel( _selector );
            +                    this._view = new Calendar.YearView( this._model );
            +                    break;
            +                }
            +            case 'monthday':
            +                {   
            +                   
            +                    this._model = new Calendar.MonthDayModel( _selector );
            +                    this._view = new Calendar.MonthDayView( this._model );
            +                    break;
            +                }
            +            default:
            +                {
            +                    this._model = new Calendar.Model( _selector );
            +                    this._view = new Calendar.View( this._model );
            +                    break;
            +                }
            +        }
            +
            +        this._init();
            +    }
            +    
            +    Calendar.prototype = {
            +        /**
            +         * 内部初始化函数
            +         * @method _init
            +         * @private
            +         */
            +        _init:
            +            function(){
            +                var _p = this;
            +
            +                _p._initHanlderEvent();
            +
            +                $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){
            +                    _p.on( _evtName, _cb );
            +                });
            +
            +                $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){
            +                    var _data = JC.f.sliceArgs( arguments ).slice(2);
            +                    _p.trigger( _evtName, _data );
            +                });
            +
            +                _p._model.init();
            +                _p._view.init();
            +
            +                return _p;
            +            }    
            +        /**
            +         * 初始化相关操作事件
            +         * @method  _initHanlderEvent
            +         * @private
            +         */
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( Calendar.Model.INITED, function( _evt ){
            +                    _p._model.calendarinited()
            +                        && _p._model.calendarinited().call( _p._model.selector(), _p._model.layout(), _p );
            +                });
            +
            +                _p.on( Calendar.Model.SHOW, function( _evt ){
            +                    _p._model.calendarshow()
            +                        && _p._model.calendarshow().call( _p._model.selector(), _p._model.selector(), _p );
            +                });
            +
            +                _p.on( Calendar.Model.HIDE, function( _evt ){
            +                    _p._model.calendarhide()
            +                        && _p._model.calendarhide().call( _p._model.selector(), _p._model.selector(), _p );
            +                });
            +
            +                _p.on( Calendar.Model.UPDATE, function( _evt ){
            +                    if( !_p._model.selector() ) return;
            +
            +                    _p._model.selector().blur();
            +                    _p._model.selector().trigger('change');
            +
            +                    var _data = []
            +                        , _v = _p._model.selector().val().trim()
            +                        , _startDate, _endDate
            +                        , _tmp, _item
            +                        , _tmpStart, _tmpEnd
            +                        ;
            +
            +                    if( _v ){
            +                        _tmp = _v.split( ',' );
            +                        for( var i = 0, j = _tmp.length; i < j; i++ ){
            +
            +                            if( _p._model.dateParse( _p._model.selector() ) ){
            +                                var _tmpDataObj = _p._model.dateParse( _p._model.selector() )( _tmp[i] );
            +                                    _startDate = _tmpDataObj.start;
            +                                    _endDate = _tmpDataObj.end;
            +                                    !_endDate && ( _endDate = _startDate );
            +                            }else{
            +                                _item = _tmp[i].replace( /[^\d]/g, '' );
            +                                if( _item.length == 16 ){
            +                                    _tmpStart = JC.f.parseISODate( _item.slice( 0, 8 ) );
            +                                    _tmpEnd = JC.f.parseISODate( _item.slice( 8 ) );
            +                                }else if( _item.length == 8 ){
            +                                    _tmpStart = JC.f.parseISODate( _item.slice( 0, 8 ) );
            +                                    _tmpEnd = JC.f.cloneDate( _tmpStart );
            +                                }
            +                                if( i === 0 ){
            +                                    _startDate = JC.f.cloneDate( _tmpStart );
            +                                    _endDate = JC.f.cloneDate( _tmpEnd );
            +                                }
            +                            }
            +                            _data.push( {'start': _tmpStart, 'end': _tmpEnd } );
            +                        }
            +                    }
            +
            +                    _p._model.calendarupdate()
            +                        && _p._model.calendarupdate().apply( _p._model.selector(), [ _startDate, _endDate, _p ] );
            +
            +                    _p._model.multiselect()
            +                        && _p._model.calendarupdatemultiselect()
            +                        && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _data, _p );
            +                });
            +
            +                _p.on( Calendar.Model.CLEAR, function( _evt ){
            +                    _p._model.calendarclear()
            +                        && _p._model.calendarclear().call( _p._model.selector(), _p._model.selector(), _p );
            +                });
            +
            +                _p.on( Calendar.Model.CANCEL, function( _evt ){
            +                    _p._model.calendarcancel()
            +                        && _p._model.calendarcancel().call( _p._model.selector(), _p._model.selector(), _p );
            +                });
            +
            +                _p.on( Calendar.Model.LAYOUT_CHANGE, function( _evt ){
            +                    _p._model.calendarlayoutchange()
            +                        && _p._model.calendarlayoutchange().call( _p._model.selector(), _p._model.selector(), _p );
            +                });
            +
            +                _p.on( Calendar.Model.UPDATE_MULTISELECT, function( _evt ){
            +                    _p._model.multiselect()
            +                        && _p._model.calendarupdatemultiselect()
            +                        && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _p._model.selector(), _p );
            +                });
            +
            +                return _p;
            +            }
            +        /**
            +         * 显示 Calendar
            +         * @method  show
            +         * @return  CalendarInstance
            +         */
            +        , show: 
            +            function(){ 
            +                Calendar.hide(); 
            +                Calendar.lastIpt = this._model.selector();
            +                this._view.show(); 
            +                this.trigger( Calendar.Model.SHOW );
            +                return this; 
            +            }
            +        /**
            +         * 隐藏 Calendar
            +         * @method  hide
            +         * @return  CalendarInstance
            +         */
            +        , hide: function(){ 
            +            this._view.hide(); 
            +            this.trigger( Calendar.Model.HIDE );
            +            this.selector() && this.selector().blur();
            +            return this; 
            +        }
            +        /**
            +         * 获取 显示 Calendar 的触发源选择器, 比如 a 标签
            +         * @method  selector
            +         * @return  selector
            +         */ 
            +        , selector: function(){ return this._model.selector(); }
            +        /**
            +         * 获取 Calendar 外观的 选择器
            +         * @method  layout
            +         * @return  selector
            +         */
            +        , layout: function(){ return this._model.layout(); }
            +        /**
            +         * 使用 jquery on 绑定事件
            +         * @method  {string}    on
            +         * @param   {string}    _evtName
            +         * @param   {function}  _cb
            +         * @return  CalendarInstance
            +         */
            +        , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;}
            +        /**
            +         * 使用 jquery trigger 绑定事件
            +         * @method  {string}    trigger
            +         * @param   {string}    _evtName
            +         * @return  CalendarInstance
            +         */
            +        , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;}
            +        /**
            +         * 用户操作日期控件时响应改变
            +         * @method  updateLayout
            +         */
            +        , updateLayout:
            +            function(){
            +                this._view.updateLayout();
            +                return this;
            +            }
            +        /**
            +         * 切换到不同日期控件源时, 更新对应的控件源
            +         * @method  updateSelector
            +         * @param   {selector}      _selector
            +         */
            +        , updateSelector:
            +            function( _selector ){
            +                Calendar.lastIpt = _selector;
            +                this._model && this._model.selector( _selector );
            +                return this;
            +            }
            +        /**
            +         * 用户改变年份时, 更新到对应的年份
            +         * @method  updateYear
            +         * @param   {int}   _offset
            +         */
            +        , updateYear:
            +            function( _offset ){
            +                this._view && this._view.updateYear( _offset );
            +                this.trigger( Calendar.Model.LAYOUT_CHANGE );
            +                return this;
            +            }
            +        /**
            +         * 用户改变月份时, 更新到对应的月份
            +         * @method  updateMonth
            +         * @param   {int}   _offset
            +         */
            +        , updateMonth:
            +            function( _offset ){
            +                this._view && this._view.updateMonth( _offset );
            +                this.trigger( Calendar.Model.LAYOUT_CHANGE );
            +                return this;
            +            }
            +        /**
            +         * 把选中的值赋给控件源
            +         * <br />用户点击日期/确定按钮
            +         * @method  updateSelected
            +         * @param   {selector}  _userSelectedItem
            +         */
            +        , updateSelected:
            +            function( _userSelectedItem ){
            +                //JC.log( 'JC.Calendar: updateSelector', new Date().getTime() );
            +                this._view && this._view.updateSelected( _userSelectedItem );
            +                return this;
            +            }
            +        /**
            +         * 显示日历外观到对应的控件源 
            +         * @method  updatePosition
            +         */
            +        , updatePosition:
            +            function(){
            +                this._view && this._view.updatePosition();
            +                return this;
            +            }
            +        /**
            +         * 清除控件源内容
            +         * @method  clear
            +         */
            +        , clear:
            +            function(){
            +                var _isEmpty = !this._model.selector().val().trim();
            +                this._model && this._model.selector().val('');
            +                !_isEmpty && this.trigger( Calendar.Model.CLEAR );
            +                return this;
            +            }
            +        /**
            +         * 用户点击取消按钮时隐藏日历外观
            +         * @method  cancel
            +         */
            +        , cancel:
            +            function(){
            +                this.trigger( Calendar.Model.CANCEL );
            +                this._view && this._view.hide();
            +                return this;
            +            }
            +        /***
            +         * 返回日历外观是否可见
            +         * @method  visible
            +         * @return  bool
            +         */
            +        , visible:
            +            function(){
            +                var _r, _tmp;
            +                this._model 
            +                    && ( _tmp = this._model.layout() ) 
            +                    && ( _r = _tmp.is(':visible') )
            +                    ;
            +                return _r;
            +            }
            +        /**
            +         * 获取控件源的初始日期对象
            +         * @method  defaultDate
            +         * @param   {selector}  _selector
            +         */
            +        , defaultDate:
            +            function( _selector ){
            +                return this._model.defaultDate( _selector );
            +            }
            +
            +        , updateFormat: function( _selector ){ this._model.updateFormat( _selector ); }
            +    }
            +    /**
            +     * 获取或设置 Calendar 的实例
            +     * @method getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Calendar instance}
            +     */
            +    Calendar.getInstance =
            +        function( _selector, _setter ){
            +            typeof _selector == 'string' && !/</.test( _selector ) && ( _selector = $(_selector) );
            +            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +            var _type = Calendar.type( _selector );
            +            typeof _setter != 'undefined' && ( Calendar._ins[ _type ] = _setter );
            +            Calendar._ins[ _type ] && Calendar._ins[ _type ].updateSelector( _selector );
            +            return Calendar._ins[ _type ];
            +        };
            +    /**
            +     * 保存所有类型的 Calendar 日期实例 
            +     * <br />目前有 date, week, month, season 四种类型的实例
            +     * <br />每种类型都是单例模式
            +     * @prototype   _ins
            +     * @type        object
            +     * @default     empty
            +     * @private
            +     * @static
            +     */
            +    Calendar._ins = {};
            +    /**
            +     * 获取控件源的实例类型
            +     * <br />目前有 date, week, month, season 四种类型的实例
            +     * @method  type
            +     * @param   {selector}  _selector
            +     * @return  string
            +     * @static
            +     */
            +    Calendar.type =
            +        function( _selector ){
            +            _selector = $(_selector);
            +            var _r, _type = $.trim(_selector.attr('multidate') || '').toLowerCase() 
            +                || $.trim(_selector.attr('datatype') || '').toLowerCase();
            +            switch( _type ){
            +                case 'week': 
            +                case 'month': 
            +                case 'season': 
            +                case 'year': 
            +                case 'monthday': 
            +                    {
            +                        _r = _type;
            +                        break;
            +                    }
            +                default: _r = 'date'; break;
            +            }
            +            return _r;
            +        };
            +    /** 
            +     * 判断选择器是否为日历组件的对象
            +     * @method  isCalendar
            +     * @static
            +     * @param   {selector}  _selector
            +     * return   bool
            +     */
            +    Calendar.isCalendar = 
            +        function( _selector ){
            +            _selector = $(_selector);
            +            var _r = 0;
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass('UXCCalendar_btn') ) _r = 1;
            +                if( _selector.prop('nodeName') 
            +                        && _selector.attr('datatype')
            +                        && ( _selector.prop('nodeName').toLowerCase()=='input' || _selector.prop('nodeName').toLowerCase()=='button' )
            +                        && ( _selector.attr('datatype').toLowerCase()=='date' 
            +                                || _selector.attr('datatype').toLowerCase()=='week' 
            +                                || _selector.attr('datatype').toLowerCase()=='month' 
            +                                || _selector.attr('datatype').toLowerCase()=='season' 
            +                                || _selector.attr('datatype').toLowerCase()=='year' 
            +                                || _selector.attr('datatype').toLowerCase()=='daterange' 
            +                                || _selector.attr('datatype').toLowerCase() == 'monthday'
            +                            )) _r = 1;
            +                if( _selector.prop('nodeName') 
            +                        && _selector.attr('multidate')
            +                        && ( _selector.prop('nodeName').toLowerCase()=='input' 
            +                            || _selector.prop('nodeName').toLowerCase()=='button' )
            +                        ) _r = 1;
            +            }
            +
            +            return _r;
            +        };
            +    /**
            +     * 请使用 isCalendar, 这个方法是为了向后兼容
            +     */
            +    Calendar.isCalendarElement = function( _selector ){ return Calendar.isCalendar( _selector ); };
            +    /**
            +     * 弹出日期选择框
            +     * @method pickDate
            +     * @static
            +     * @param   {selector}  _selector 需要显示日期选择框的input[text]   
            +     * @example
            +            <dl>
            +                <dd>
            +                    <input type="text" name="date6" class="manualPickDate" value="20110201" />
            +                    manual JC.Calendar.pickDate
            +                </dd>
            +                <dd>
            +                    <input type="text" name="date7" class="manualPickDate" />
            +                    manual JC.Calendar.pickDate
            +                </dd>
            +            </dl>
            +            <script>
            +                $(document).delegate('input.manualPickDate', 'focus', function($evt){
            +                JC.Calendar.pickDate( this );
            +                });
            +            </script>
            +     */
            +    Calendar.pickDate =  
            +        function( _selector ){ 
            +            _selector = $( _selector );
            +            if( !(_selector && _selector.length) ) return;
            +
            +            var _ins, _isIgnore = _selector.is('[ignoreprocess]');
            +
            +            _selector.attr('ignoreprocess', true);
            +            _selector.blur();
            +            !_isIgnore && _selector.removeAttr('ignoreprocess');
            +
            +            _ins = Calendar.getInstance( _selector );
            +            !_ins && ( _ins = new Calendar( _selector ) );
            +            _ins.show();
            +            return;
            +        }; 
            +    /**
            +     * 设置是否在 DOM 加载完毕后, 自动初始化所有日期控件
            +     * @property    autoInit
            +     * @default true
            +     * @type    {bool}
            +     * @static
            +            <script>JC.Calendar.autoInit = true;</script>
            +     */
            +    Calendar.autoInit =  true;
            +    /**
            +     * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年
            +     * @property    defaultDateSpan
            +     * @type        {int}
            +     * @default     20
            +     * @static
            +            <script>JC.Calendar.defaultDateSpan = 20;</script>
            +     */
            +    Calendar.defaultDateSpan = 20;
            +    /**
            +     * 最后一个显示日历组件的文本框
            +     * @property  lastIpt
            +     * @type    selector
            +     * @static
            +     */
            +    Calendar.lastIpt = null;
            +    /**
            +     * 自定义日历组件模板
            +     * <p>默认模板为_logic.tpl</p>
            +     * <p>如果用户显示定义JC.Calendar.tpl的话, 将采用用户的模板</p>
            +     * @property    tpl
            +     * @type    {string}
            +     * @default empty
            +     * @static
            +     */
            +    Calendar.tpl = '';
            +    /**
            +     * 初始化外观后的回调函数
            +     * @property layoutInitedCallback
            +     * @type    function
            +     * @static
            +     * @default null
            +     */
            +    Calendar.layoutInitedCallback = null;
            +    /**
            +     * 显示为可见时的回调
            +     * @property layoutShowCallback
            +     * @type    function
            +     * @static
            +     * @default null
            +     */
            +    Calendar.layoutShowCallback = null;
            +    /**
            +     * 日历隐藏后的回调函数
            +     * @property layoutHideCallback
            +     * @type    function
            +     * @static
            +     * @default null
            +     */
            +    Calendar.layoutHideCallback = null;
            +    /**
            +     * DOM 点击的过滤函数
            +     * <br />默认 dom 点击时, 判断事件源不为 input[datatype=date|daterange] 会隐藏 Calendar
            +     * <br /> 通过该回调可自定义过滤, 返回 false 不执行隐藏操作
            +     * @property domClickFilter
            +     * @type    function
            +     * @static
            +     * @default null
            +     */
            +    Calendar.domClickFilter = null;
            +    /**
            +     * 隐藏日历组件
            +     * @method  hide
            +     * @static
            +     * @example
            +            <script>JC.Calendar.hide();</script>
            +     */
            +    Calendar.hide =
            +        function(){
            +
            +            for( var k in Calendar._ins ){
            +                Calendar._ins[ k] 
            +                    && Calendar._ins[ k].visible()
            +                    && Calendar._ins[ k].hide()
            +                    ;
            +            }
            +        };
            +    /**
            +     * 获取初始日期对象
            +     * <p style="bold">这个方法将要废除, 请使用 instance.defaultDate()</p>
            +     * @method  getDate
            +     * @static
            +     * @param   {selector}  _selector   显示日历组件的input
            +     * return   { date: date, minvalue: date|null, maxvalue: date|null, enddate: date|null }
            +     */
            +    Calendar.getDate =
            +        function( _selector ){
            +            return Calendar.getInstance( _selector ).defaultDate();
            +        };
            +    /**
            +     * 每周的中文对应数字
            +     * @property    cnWeek
            +     * @type    string
            +     * @static
            +     * @default 日一二三四五六 
            +     */
            +    Calendar.cnWeek = "日一二三四五六";
            +    /**
            +     * 100以内的中文对应数字
            +     * @property    cnUnit
            +     * @type    string
            +     * @static
            +     * @default 十一二三四五六七八九    
            +     */
            +    Calendar.cnUnit = "十一二三四五六七八九";
            +    /**
            +     * 转换 100 以内的数字为中文数字
            +     * @method  getCnNum
            +     * @static
            +     * @param   {int}   _num
            +     * @return  string
            +     */
            +    Calendar.getCnNum =
            +        function ( _num ){
            +            var _r = Calendar.cnUnit.charAt( _num % 10 );
            +            _num > 10 && ( _r = (_num % 10 !== 0 ? Calendar.cnUnit.charAt(0) : '') + _r );
            +            _num > 19 && ( _r = Calendar.cnUnit.charAt( Math.floor( _num / 10 ) ) + _r );
            +            return _r;
            +        };
            +    /**
            +     * 设置日历组件的显示位置
            +     * @method  position
            +     * @static
            +     * @param   {selector}  _ipt    需要显示日历组件的文本框
            +     */
            +    Calendar.position =
            +        function( _ipt ){
            +            Calendar.getInstance( _ipt )
            +                && Calendar.getInstance( _ipt ).updatePosition();
            +        };
            +    /**
            +     * 这个方法后续版本不再使用, 请使用 Calendar.position
            +     */
            +    Calendar.setPosition = Calendar.position;
            +    /**
            +     * 初始化日历组件的触发按钮
            +     * @method  init
            +     * @param   {selector}      _selector   
            +     * @private
            +     */
            +    Calendar.init = Calendar.initTrigger = 
            +        function( _selector ){
            +           _selector.each( function(){
            +                var _p = $(this)
            +                    , _nodeName = (_p.prop('nodeName')||'').toLowerCase()
            +                    , _tmp, _dt
            +                    ;
            +
            +                if( _nodeName != 'input' && _nodeName != 'textarea' ){ 
            +                    Calendar.initTrigger( _selector.find( 'input[type=text], textarea' ) ); 
            +                    return; 
            +                }
            +                _dt = $.trim( _p.attr('datatype') || '').toLowerCase()
            +
            +                if( !(  
            +                        _dt == 'date' 
            +                        || _dt == 'week' 
            +                        || _dt == 'month' 
            +                        || _dt == 'season' 
            +                        || _dt == 'year' 
            +                        || _dt == 'daterange'
            +                        || _dt == 'monthday' 
            +                        || $.trim( _p.attr('multidate') || '')
            +                        ) ) return;
            +
            +
            +                var _btn = _p.find( '+ input.UXCCalendar_btn' );
            +                if( !_btn.length ){
            +                    _p.after( _btn = $('<input type="button" class="UXCCalendar_btn"  />') );
            +                }
            +
            +                ( _tmp = ( _p.attr('minvalue') || '' ) )
            +                    && ( _tmp = JC.f.dateDetect( _tmp ) )
            +                    && _p.attr( 'minvalue', JC.f.formatISODate( _tmp ) )
            +                    ; 
            +
            +                ( _tmp = ( _p.attr('maxvalue') || '' ) )
            +                    && ( _tmp = JC.f.dateDetect( _tmp ) )
            +                    && _p.attr( 'maxvalue', JC.f.formatISODate( _tmp ) )
            +                    ; 
            +
            +                //Calendar.fixDefaultDate( _p );
            +                if( !( JC.f.parseBool( _p.attr( 'ignoreInitCalendarDate' ) ) || JC.f.parseBool( _p.data( 'ignoreInitCalendarDate' ) ) ) ){
            +
            +                    ( _tmp = _p.val().trim() )
            +                        && ( _tmp = JC.f.dateDetect( _tmp ) )
            +                        && _p.val( JC.f.formatISODate( _tmp ) )
            +                        ; 
            +
            +                    if( _p.is( '[dateFormat]' ) || _p.is( '[fullDateFormat]' ) ){
            +                        var _ins = Calendar.getInstance( _selector );
            +                        !_ins && ( _ins = new Calendar( _selector ) );
            +                        _ins.updateSelector( _selector );
            +                        _ins.updateFormat( _p );
            +                    }
            +
            +                    if( ( _p.attr('datatype') || '' ).toLowerCase() == 'monthday'
            +                        || ( _p.attr('multidate') || '' ).toLowerCase() == 'monthday' ){
            +                        if( !_p.is('[placeholder]') ){
            +                            var _tmpDate = new Date();
            +                            _p.attr('defaultdate') && ( _tmpDate = JC.f.parseISODate( _p.attr('defaultdate') ) || _tmpDate );
            +                            _p.val().trim() && ( _tmpDate = JC.f.parseISODate( _p.val().replace( /[^d]/g, '').slice( 0, 8 ) ) || _tmpDate );
            +                            _tmpDate && _p.attr( 'placeholder', JC.f.printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) );
            +                        }
            +                    }
            +                }
            +
            +                _btn.data( Calendar.Model.INPUT, _p );
            +            });
            +        };
            +
            +    Calendar.fixDefaultDate =
            +        function( _selector ){
            +            _selector && ( _selector = $( _selector ) );
            +            if( !( _selector && _selector.length ) ) return;
            +            var _tmp;
            +
            +            _tmp = _selector.val().trim();
            +            if( _tmp ){
            +                _tmp = _tmp
            +                        .replace( Calendar.Model.REG_REMOVE_NOT_DIGITAL, '' )
            +                        .replace( Calendar.Model.REG_REMOVE_ALL_ZERO, '' )
            +                        ;
            +                !_tmp && _selector.val( '' );
            +            }
            +
            +            _tmp = ( _selector.attr( 'minvalue') || '' ).trim();
            +            if( _tmp ){
            +                _tmp = _tmp
            +                        .replace( Calendar.Model.REG_REMOVE_NOT_DIGITAL, '' )
            +                        .replace( Calendar.Model.REG_REMOVE_ALL_ZERO, '' )
            +                        ;
            +                !_tmp && _selector.removeAttr( 'minvalue' );
            +            }
            +
            +            _tmp = ( _selector.attr( 'maxvalue') || '' ).trim();
            +            if( _tmp ){
            +                _tmp = _tmp
            +                        .replace( Calendar.Model.REG_REMOVE_NOT_DIGITAL, '' )
            +                        .replace( Calendar.Model.REG_REMOVE_ALL_ZERO, '' )
            +                        ;
            +                !_tmp && _selector.removeAttr( 'maxvalue' );
            +            }
            +        };
            +
            +    Calendar.updateMultiYear =
            +        function ( _date, _offset ){
            +            var _day, _max;
            +            _day = _date.getDate();
            +            _date.setDate( 1 );
            +            _date.setFullYear( _date.getFullYear() + _offset );
            +            _max = JC.f.maxDayOfMonth( _date );
            +            _day > _max && ( _day = _max );
            +            _date.setDate( _day );
            +            return _date;
            +        };
            +
            +    Calendar.updateMultiMonth =
            +        function ( _date, _offset ){
            +            var _day, _max;
            +            _day = _date.getDate();
            +            _date.setDate( 1 );
            +            _date.setMonth( _date.getMonth() + _offset );
            +            _max = JC.f.maxDayOfMonth( _date );
            +            _day > _max && ( _day = _max );
            +            _date.setDate( _day );
            +            return _date;
            +        };
            +
            +
            +    /**
            +     * 克隆 Calendar 默认 Model, View 的原型属性
            +     * @method  clone
            +     * @param   {NewModel}  _model
            +     * @param   {NewView}   _view
            +     */
            +    Calendar.clone =
            +        function( _model, _view ){
            +            var _k;
            +            if( _model )
            +                for( _k in Model.prototype ) _model.prototype[_k] = Model.prototype[_k];
            +            if( _view )
            +                for( _k in View.prototype ) _view.prototype[_k] = View.prototype[_k];
            +        };
            +    
            +    function Model( _selector ){
            +        this._selector = _selector;
            +    }
            +
            +    Calendar.Model = Model;
            +    Calendar.Model.INPUT = 'CalendarInput';
            +
            +    Calendar.Model.INITED = 'CalendarInited';
            +    Calendar.Model.SHOW = 'CalendarShow';
            +    Calendar.Model.HIDE = 'CalendarHide';
            +    Calendar.Model.UPDATE = 'CalendarUpdate';
            +    Calendar.Model.CLEAR = 'CalendarClear';
            +    Calendar.Model.CANCEL = 'CalendarCancel';
            +    Calendar.Model.LAYOUT_CHANGE = 'CalendarLayoutChange';
            +    Calendar.Model.UPDATE_MULTISELECT = 'CalendarUpdateMultiSelect';
            +
            +    Calendar.Model.REG_REMOVE_ALL_ZERO = /^[0]+$/;
            +    Calendar.Model.REG_REMOVE_NOT_DIGITAL = /[^\d]+/g;
            +    
            +    Model.prototype = {
            +        init:
            +            function(){
            +                return this;
            +            }
            +
            +        , selector: 
            +            function( _setter ){ 
            +                typeof _setter != 'undefined' && ( this._selector = _setter );
            +                return this._selector; 
            +            }
            +        , layout: 
            +            function(){
            +                var _r = $('#UXCCalendar');
            +
            +                if( !_r.length ){
            +                    _r = $( Calendar.tpl || this.tpl ).hide();
            +                    _r.attr('id', 'UXCCalendar').hide().appendTo( document.body );
            +                    var _month = $( [
            +                                '<option value="0">一月</option>'
            +                                , '<option value="1">二月</option>'
            +                                , '<option value="2">三月</option>'
            +                                , '<option value="3">四月</option>'
            +                                , '<option value="4">五月</option>'
            +                                , '<option value="5">六月</option>'
            +                                , '<option value="6">七月</option>'
            +                                , '<option value="7">八月</option>'
            +                                , '<option value="8">九月</option>'
            +                                , '<option value="9">十月</option>'
            +                                , '<option value="10">十一月</option>'
            +                                , '<option value="11">十二月</option>'
            +                            ].join('') ).appendTo( _r.find('select.UMonth' ) );
            +                 }
            +                return _r;
            +            }
            +        , startYear:
            +            function( _dateo ){
            +                var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear();
            +                this.selector().is('[calendardatespan]') 
            +                    && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) );
            +                return _r - _span;
            +            }
            +        , endYear:
            +            function( _dateo ){
            +                var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear();
            +                this.selector().is('[calendardatespan]') 
            +                    && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) );
            +                return _r + _span;
            +            }
            +        , currentcanselect:
            +            function(){
            +                var _r = true;
            +                this.selector().is('[currentcanselect]') 
            +                    && ( _r = JC.f.parseBool( this.selector().attr('currentcanselect') ) );
            +                return _r;
            +            }
            +        , year: 
            +            function(){
            +                return parseInt( this.layout().find('select.UYear').val(), 10 ) || 1;
            +            }
            +        , month:
            +            function(){
            +                return parseInt( this.layout().find('select.UMonth').val(), 10 ) || 0;
            +            }
            +        , day:
            +            function(){
            +                var _tmp, _date = new Date();
            +                _tmp = this.layout().find('td.cur > a[date], td.cur > a[dstart]');
            +                if( _tmp.length ){
            +                    _date.setTime( _tmp.attr('date') || _tmp.attr('dstart') );
            +                }
            +                return _date.getDate();
            +            }
            +        , defaultDate:
            +            function(){
            +                var _p = this, _r = { 
            +                        date: null
            +                        , minvalue: null
            +                        , maxvalue: null
            +                        , enddate: null 
            +                        , multidate: null
            +                    }
            +                    ;
            +                _p.selector() &&
            +                    (
            +                        _r = _p.multiselect() 
            +                            ? _p.defaultMultiselectDate( _r ) 
            +                            : _p.defaultSingleSelectDate( _r )
            +                    );
            +
            +
            +                if(  _p.dateParse( _p.selector() ) ){
            +                    //var _d = _p.dateParse();
            +                    _p.selector().is('[minvalue]')
            +                        && ( _r.minvalue = ( _p.dateParse( _p.selector() )( _p.selector().attr('minvalue') ) ).start );
            +
            +                    _p.selector().is('[maxvalue]')
            +                        && ( _r.maxvalue = ( _p.dateParse( _p.selector() )( _p.selector().attr('maxvalue') ) ).start );
            +                }else{
            +                    _p.selector().is('[minvalue]')
            +                        && ( _r.minvalue = JC.f.parseISODate( _p.selector().attr('minvalue') ) );
            +
            +                    _p.selector().is('[maxvalue]')
            +                        && ( _r.maxvalue = JC.f.parseISODate( _p.selector().attr('maxvalue') ) );
            +                }
            +
            +                _r.minvalue && ( _r.minvalue = JC.f.pureDate( _r.minvalue ) );
            +                _r.maxvalue && ( _r.maxvalue = JC.f.pureDate( _r.maxvalue ) );
            +
            +                _r.date && _r.minvalue 
            +                    && _r.minvalue.getTime() > _r.date.getTime()
            +                    && ( _r.date = JC.f.cloneDate( _r.minvalue ) );
            +
            +                _r.date && _r.maxvalue
            +                    && _r.maxvalue.getTime() < _r.date.getTime()
            +                    && ( _r.date = JC.f.cloneDate( _r.maxvalue) );
            +
            +                return _r;
            +            }
            +        , defaultSingleSelectDate:
            +            function( _r ){
            +                var _p = this
            +                    , _selector = _p.selector()
            +                    , _tmp
            +                    , _v = _selector.val().trim()
            +                    ;
            +
            +                if( !_v ){
            +                    _r.date = new Date();
            +
            +                    if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){
            +                        _tmp = JC.f.parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp;
            +                    }
            +                    _tmp && ( _r.date = JC.f.pureDate( _tmp ) );
            +
            +                    _r.enddate = JC.f.cloneDate( _r.date );
            +                    return _r;
            +                }
            +
            +                if( _p.dateParse( _p.selector() ) ){
            +                    var _tmpDataObj = _p.dateParse( _p.selector() )( _p.selector().val().trim() );
            +                        _r.date = _tmpDataObj.start;
            +                        _r.enddate = _tmpDataObj.end;
            +                        !_r.enddate && ( _r.enddate = _r.date );
            +                }else{
            +                    if( _tmp = JC.f.parseISODate( _selector.val() ) ) _r.date = _tmp;
            +                    else{
            +                        if( _selector.val() && (_tmp = _selector.val().replace( /[^\d]/g, '' ) ).length == 16 ){
            +                            _r.date = JC.f.parseISODate( _tmp.slice( 0, 8 ) );
            +                            _r.enddate = JC.f.parseISODate( _tmp.slice( 8 ) );
            +                        }else{
            +                            _tmp = new Date();
            +                            if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){
            +                                _tmp = JC.f.parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp;
            +                            }
            +                            _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() );
            +                        }
            +                    }
            +
            +                }
            +
            +
            +                return _r;
            +            }
            +        , defaultMultiselectDate:
            +            function( _r ){
            +                var _p = this
            +                    , _selector = Calendar.lastIpt
            +                    , _tmp
            +                    , _multidatear
            +                    , _dstart, _dend
            +                    ;
            +
            +                    if( _selector.val() ){
            +                        //JC.log( 'defaultMultiselectDate:', _p.selector().val(), ', ', _tmp );
            +                        _tmp = _selector.val().trim().replace(/[^\d,]/g, '').split(',');
            +                        _multidatear = [];
            +
            +
            +                        $.each( _tmp, function( _ix, _item ){
            +
            +                            if( _p.dateParse( _selector ) ){
            +                                var _tmpDataObj = _p.dateParse( _selector )( _item );
            +                                    _dstart = _tmpDataObj.start;
            +                                    _dend = _tmpDataObj.end;
            +                                    !_dend && ( _dend = _dstart );
            +                                    _multidatear.push( { 'start': _dstart, 'end': _dend } );
            +                            }else{
            +
            +                                if( _item.length == 16 ){
            +                                    _dstart = JC.f.parseISODate( _item.slice( 0, 8 ) );
            +                                    _dend = JC.f.parseISODate( _item.slice( 8 ) );
            +
            +                                    if( !_ix ){
            +                                        _r.date = JC.f.cloneDate( _dstart );
            +                                        _r.enddate = JC.f.cloneDate( _dend );
            +                                    }
            +                                    _multidatear.push( { 'start': _dstart, 'end': _dend } );
            +                                }else if( _item.length == 8 ){
            +                                    _dstart = JC.f.parseISODate( _item.slice( 0, 8 ) );
            +                                    _dend = JC.f.cloneDate( _dstart );
            +
            +                                    if( !_ix ){
            +                                        _r.date = JC.f.cloneDate( _dstart );
            +                                        _r.enddate = JC.f.cloneDate( _dend );
            +                                    }
            +                                    _multidatear.push( { 'start': _dstart, 'end': _dend } );
            +                                }
            +                            }
            +                        });
            +
            +                        _r.multidate = _multidatear;
            +
            +                    }else{
            +                        _tmp = new Date();
            +                        if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){
            +                            _tmp = JC.f.parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp;
            +                        }
            +                        _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() );
            +                        _r.enddate = JC.f.cloneDate( _r.date );
            +                        _r.enddate.setDate( JC.f.maxDayOfMonth( _r.enddate ) );
            +                        _r.multidate = [];
            +                        _r.multidate.push( {'start': JC.f.cloneDate( _r.date ), 'end': JC.f.cloneDate( _r.enddate ) } );
            +                    }
            +                return _r;
            +            }
            +        , layoutDate:
            +            function(){
            +                return this.multiselect() ? this.multiLayoutDate() : this.singleLayoutDate();
            +            }
            +        , singleLayoutDate:
            +            function(){
            +                var _p = this
            +                    , _dateo = _p.defaultDate()
            +                    , _day = this.day()
            +                    , _max;
            +                _dateo.date.setDate( 1 );
            +                _dateo.date.setFullYear( this.year() );
            +                _dateo.date.setMonth( this.month() );
            +                _max = JC.f.maxDayOfMonth( _dateo.date );
            +                _day > _max && ( _day = _max );
            +                _dateo.date.setDate( _day );
            +                return _dateo;
            +            }
            +        , multiLayoutDate:
            +            function(){
            +                //JC.log( 'Calendar.Model multiLayoutDate', new Date().getTime() );
            +                var _p = this
            +                    , _dateo = _p.defaultDate()
            +                    , _year = _p.year()
            +                    , _month = _p.month()
            +                    , _day = _p.day()
            +                    , _newDate = new Date( _year, _month, 1 )
            +                    , _max = JC.f.maxDayOfMonth( _newDate )
            +                    , _monthSel = _p.layout().find('select.UMonth')
            +                    ;
            +
            +                //JC.log( 'eeeeeeeeeee', _month );
            +
            +                _dateo.multidate = [];
            +
            +                _p.layout().find('td.cur').each(function(){
            +                    var _sp = $(this);
            +                    var _item = _sp.find('> a[dstart]'), _dstart = new Date(), _dend = new Date();
            +                    _dstart.setTime( _item.attr('dstart') );
            +                    _dend.setTime( _item.attr('dend') );
            +                    _dateo.multidate.push( { 'start': _dstart, 'end': _dend } );
            +                });
            +
            +                /*
            +                _dateo.date.setFullYear( _year );
            +                _dateo.enddate.setFullYear( _year );
            +                */
            +                _dateo.date = new Date( _year, _month, 1 );
            +                _dateo.date.enddate = new Date( _year, _month, _max );
            +
            +                if( _monthSel.length ){
            +                    _dateo.date.setMonth( _month );
            +                    _dateo.enddate.setMonth( _month );
            +                }
            +
            +
            +                $.each( _dateo.multidate, function( _ix, _item ){
            +                    _item.start.setFullYear( _year );
            +                    _item.end.setFullYear( _year );
            +                    if( _monthSel.length ){
            +                        _item.start.setMonth( _month );
            +                        _item.end.setMonth( _month );
            +                    }
            +                });
            +
            +                return _dateo;
            +
            +            }
            +        , selectedDate:
            +            function(){
            +                var _r, _tmp, _item;
            +                _tmp = this.layout().find('td.cur');
            +                _tmp.length 
            +                    && !_tmp.hasClass( 'unable' )
            +                    && ( _item = _tmp.find('a[date]') )
            +                    && ( _r = new Date(), _r.setTime( _item.attr('date') ) )
            +                    ;
            +                return _r;
            +            }
            +        , multiselectDate:
            +            function(){
            +                var _r = [];
            +                return _r;
            +            }
            +        , calendarinited:
            +            function(){
            +                var _ipt = this.selector(), _cb = Calendar.layoutInitedCallback, _tmp;
            +                _ipt && _ipt.attr('calendarinited') 
            +                    && ( _tmp = window[ _ipt.attr('calendarinited') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , calendarshow:
            +            function(){
            +                var _ipt = this.selector(), _cb = Calendar.layoutShowCallback, _tmp;
            +                _ipt && _ipt.attr('calendarshow') 
            +                    && ( _tmp = window[ _ipt.attr('calendarshow') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , calendarhide:
            +            function(){
            +                var _ipt = this.selector(), _cb = Calendar.layoutHideCallback, _tmp;
            +                _ipt && _ipt.attr('calendarhide') 
            +                    && ( _tmp = window[ _ipt.attr('calendarhide') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , calendarupdate:
            +            function( _data ){
            +                var _ipt = this.selector(), _cb, _tmp;
            +                _ipt && _ipt.attr('calendarupdate') 
            +                    && ( _tmp = window[ _ipt.attr('calendarupdate') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , calendarclear:
            +            function(){
            +                var _ipt = this.selector(), _cb, _tmp;
            +                _ipt && _ipt.attr('calendarclear') 
            +                    && ( _tmp = window[ _ipt.attr('calendarclear') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , calendarcancel:
            +            function(){
            +                var _ipt = this.selector(), _cb, _tmp;
            +                _ipt && _ipt.attr('calendarcancel') 
            +                    && ( _tmp = window[ _ipt.attr('calendarcancel') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , calendarlayoutchange:
            +            function(){
            +                var _ipt = this.selector(), _cb, _tmp;
            +                _ipt && _ipt.attr('calendarlayoutchange') 
            +                    && ( _tmp = window[ _ipt.attr('calendarlayoutchange') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        , multiselect:
            +            function(){
            +                var _r;
            +                this.selector().is('[multiselect]')
            +                    && ( _r = JC.f.parseBool( this.selector().attr('multiselect') ) );
            +                return _r;
            +            }
            +        , calendarupdatemultiselect:
            +            function( _data ){
            +                var _ipt = this.selector(), _cb, _tmp;
            +                _ipt && _ipt.attr('calendarupdatemultiselect') 
            +                    && ( _tmp = window[ _ipt.attr('calendarupdatemultiselect') ] )
            +                    && ( _cb = _tmp );
            +                return _cb;
            +            }
            +        
            +        , updateFormat:
            +            function( _selector ){
            +                _selector && ( _selector = $( _selector ) );
            +                if( !( _selector && _selector.length ) ) return;
            +                var _p = this
            +                    , _type = ( _selector.attr('datetype') || _selector.attr('multidate') || '' ).toLowerCase().trim() 
            +                    , _v = _selector.val().trim()
            +                    , _dp = _p.dateParse( _selector )
            +                    , _dstart, _dend
            +                    , _do
            +                    ;
            +                if( !_v ) return;
            +
            +                if( _type == 'date' && !_selector.attr( 'fullDateFormat' ) ){
            +                    _selector.attr( 'fullDateFormat', '{0}' );
            +                }
            +
            +                if( _dp ){
            +                    switch( _type ){
            +                        case 'date': 
            +                            {
            +                                break;
            +                            }
            +                        case 'week':
            +                        case 'month':
            +                        case 'season':
            +                        case 'year':
            +                            {
            +                                _do = _dp( _v );
            +                                _selector.val( _p.fullFormat( _p.dateFormat( _do.start, _selector )
            +                                                                , _p.dateFormat( _do.end, _selector )
            +                                                                , _selector 
            +                                            ) );
            +
            +                                break;
            +                            }
            +                    }
            +                }else{
            +                    switch( _type ){
            +                        case 'date': 
            +                            {
            +                                _dstart = JC.f.parseISODate( _v );
            +                                _selector.val( _p.dateFormat( _dstart, _selector ) || _v );
            +                                break;
            +                            }
            +                    }
            +                }
            +            }
            +
            +        , dateFormat:
            +            function( _date, _selector ){
            +                _selector = _selector || this.selector();
            +                var _r = '', _format = _selector.attr( 'dateFormat' ) || 'YY-MM-DD';
            +                _date && ( _r = JC.f.dateFormat( _date, _format ) );
            +                return _r;
            +            }
            +
            +        , fullFormat:
            +            function( _date, _endDate, _selector ){
            +                _selector = _selector || this.selector();
            +                var _r = '', _fullFormat = _selector.attr( 'fullDateFormat' ) || '{0} 至 {1}';
            +                if( _date && _endDate ){
            +                    _r = JC.f.printf( _fullFormat, this.dateFormat( _date, _selector ), this.dateFormat( _endDate, _selector ) );
            +                }else if( _date ){
            +                    _r = JC.f.printf( _fullFormat, this.dateFormat( _date, _selector ) );
            +                }else if( _endDate ){
            +                    _r = JC.f.printf( _fullFormat, this.dateFormat( _endDate, _selector ) );
            +                }
            +                return _r;
            +            }
            +
            +        , dateParse:
            +            function( _selector ){
            +                var _r;
            +
            +                _selector
            +                    && _selector.attr( 'dateParse' )
            +                    && ( _r = window[ _selector.attr( 'dateParse' ) ] )
            +                    ;
            +
            +                return _r;
            +            }
            +
            +        , tpl:
            +            [
            +            '<div id="UXCCalendar" class="UXCCalendar">'
            +            ,'    <div class="UHeader">'
            +            ,'        <select class="UYear"></select>'
            +            ,'        <img class="UImg yearctl" align="absMiddle" usemap="#UXCCalendar_Year" />'
            +            ,'        <map name="UXCCalendar_Year"><area shape="rect" coords="0,0,13,8" href="#" action="up"><area shape="rect" coords="0,10,13,17" href="#" action="down"></map>'
            +            ,'        <select class="UMonth"></select>'
            +            ,'        <img class="UImg monthctl" align="absMiddle" usemap="#UXCCalendar_Month"  />'
            +            ,'        <map name="UXCCalendar_Month"><area shape="rect" coords="0,0,13,8" href="#" action="up"><area shape="rect" coords="0,10,13,17" href="#" action="down"></map>'
            +            ,'    </div>'
            +            ,'    <table class="UTable">'
            +            ,'        <thead>'
            +            ,'            <tr>'
            +            ,'                <th>一</th>'
            +            ,'                <th>二</th>'
            +            ,'                <th>三</th>'
            +            ,'                <th>四</th>'
            +            ,'                <th>五</th>'
            +            ,'                <th>六</th>'
            +            ,'                <th>日</th>'
            +            ,'            </tr>'
            +            ,'        </thead>'
            +            ,'   </table>'
            +            ,'   <table class="UTable UTableBorder">'
            +            ,'        <tbody>'
            +            ,'           <!--<tr>'
            +            ,'                <td class="cur"><a href="#">2</a></td>'
            +            ,'                <td class="unable"><a href="#">2</a></td>'
            +            ,'                <td class="weekend cur"><a href="#">6</a></td>'
            +            ,'                <td class="weekend hover"><a href="#">13</a></td>'
            +            ,'                <td class="weekend other"><a href="#">41</a></td>'
            +            ,'                <td class="weekend other"><a href="#">42</a></td>'
            +            ,'            </tr>-->'
            +            ,'        </tbody>'
            +            ,'    </table>'
            +            ,'    <div class="UFooter">'
            +            ,'        <button type="button" class="UConfirm">确定</button>'
            +            ,'        <button type="button" class="UClear">清空</button>'
            +            ,'        <button type="button" class="UCancel">取消</button>'
            +            ,'    </div>'
            +            ,'</div>'
            +            ].join('')
            +    };
            +    
            +    function View( _model ){
            +        this._model = _model;
            +    }
            +    Calendar.View = View;
            +    
            +    View.prototype = {
            +        init:
            +            function() {
            +                return this;
            +            }
            +
            +        , hide:
            +            function(){
            +                this._model.layout().hide();
            +            }
            +
            +        , show:
            +            function(){
            +                var _dateo = this._model.defaultDate();
            +                //JC.log( 'Calendar.View: show', new Date().getTime(), JC.f.formatISODate( _dateo.date ) );
            +
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +        , updateLayout:
            +            function( _dateo ){
            +                typeof _dateo == 'undefined' && ( _dateo = this._model.layoutDate() );
            +                /*
            +                JC.log( 
            +                        JC.f.formatISODate( _dateo.date ) 
            +                        , JC.f.formatISODate( _dateo.minvalue) 
            +                        , JC.f.formatISODate( _dateo.maxvalue) 
            +                        );
            +                */
            +
            +                if( _dateo.minvalue || _dateo.maxvalue ){
            +                    if( _dateo.minvalue && _dateo.date.getTime() < _dateo.minvalue.getTime() ){
            +                        _dateo.date = JC.f.cloneDate( _dateo.minvalue );
            +                    }
            +                    if( _dateo.maxvalue && _dateo.date.getTime() > _dateo.maxvalue.getTime() ){
            +                        _dateo.date = JC.f.cloneDate( _dateo.maxvalue );
            +                    }
            +                }
            +
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +        , updateYear:
            +            function( _offset ){
            +                if( typeof _offset == 'undefined' || _offset == 0 ) return;
            +
            +                var _dateo = this._model.layoutDate(), _date;
            +                if( _dateo.minvalue || _dateo.maxvalue ){
            +
            +                    var _fixYear;
            +                    _date = JC.f.cloneDate( _dateo.date );
            +                    _date.setFullYear( _date.getFullYear() + _offset );
            +                    if( _dateo.minvalue ){
            +                        if( _date.getFullYear() < _dateo.minvalue.getFullYear() ){
            +                            _date = JC.f.cloneDate( _dateo.minvalue );
            +                            _offset = 0;
            +                            _fixYear = true;
            +                        }else if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() <
            +                            new Date( _dateo.minvalue.getFullYear(), _dateo.minvalue.getMonth(), 1 ).getTime() ){
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.minvalue );
            +                            _fixYear = true;
            +                        }
            +                    }
            +                    if( _dateo.maxvalue ){
            +                        if( _date.getFullYear() > _dateo.maxvalue.getFullYear() ){
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.maxvalue );
            +                            _fixYear = true;
            +                        }else if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() >
            +                            new Date( _dateo.maxvalue.getFullYear(), _dateo.maxvalue.getMonth(), 1 ).getTime() ){
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.maxvalue );
            +                            _fixYear = true;
            +                        }
            +                    }
            +
            +                    if( !_fixYear ) _date = null;
            +                    else {
            +                    }
            +                }
            +
            +                this._model.multiselect() 
            +                    ? this.updateMultiYear( _offset, _date )
            +                    : this.updateSingleYear( _offset, _date )
            +                    ;
            +            }
            +        , updateSingleYear:
            +            function( _offset, _date ){
            +                var _dateo = this._model.layoutDate();
            +
            +                if( _date ){
            +                    _dateo.date = _date;
            +                }else{
            +                    var _day = _dateo.date.getDate(), _max;
            +                    _dateo.date.setDate( 1 );
            +                    _dateo.date.setFullYear( _dateo.date.getFullYear() + _offset );
            +                    _max = JC.f.maxDayOfMonth( _dateo.date );
            +                    _day > _max && ( _day = _max );
            +                    _dateo.date.setDate( _day );
            +                }
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +        , updateMultiYear:
            +            function( _offset, _date ){
            +                var _dateo = this._model.layoutDate();
            +                _dateo.date = _date || _dateo.date;
            +                var _day, _max;
            +
            +                JC.Calendar.updateMultiYear( _dateo.date, _offset );
            +                JC.Calendar.updateMultiYear( _dateo.enddate, _offset );
            +
            +                if( _dateo.multidate ){
            +                    $.each( _dateo.multidate, function( _ix, _item ){
            +                        JC.Calendar.updateMultiYear( _item.start, _offset );
            +                        JC.Calendar.updateMultiYear( _item.end, _offset );
            +                    });
            +                }
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +        , updateMonth:
            +            function( _offset ){
            +                if( typeof _offset == 'undefined' || _offset == 0 ) return;
            +
            +                var _dateo = this._model.layoutDate(), _date;
            +                if( _dateo.minvalue || _dateo.maxvalue ){
            +                    _date = JC.f.cloneDate( _dateo.date );
            +                    _date.setDate( 1 );
            +                    _date.setMonth( _date.getMonth() + _offset );
            +                    var _minvalue = _dateo.minvalue ? JC.f.cloneDate( _dateo.minvalue ) : null
            +                        , _maxvalue = _dateo.maxvalue ? JC.f.cloneDate( _dateo.maxvalue ) : null
            +                        , _fixDate
            +                        ;
            +                    _minvalue && _minvalue.setDate( 1 );
            +                    _maxvalue && _maxvalue.setDate( 1 );
            +                    if( _minvalue ){
            +                        if( _date.getTime() < _minvalue.getTime() ) {
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.minvalue );
            +                            _fixDate = true;
            +                        }
            +                        if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() <
            +                            new Date( _dateo.minvalue.getFullYear(), _dateo.minvalue.getMonth(), 1 ).getTime() ){
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.minvalue );
            +                            _fixDate = true;
            +                        }
            +
            +                    }
            +                    if( _maxvalue ){
            +                        if( _date.getTime() > _maxvalue.getTime() ) {
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.maxvalue );
            +                            _fixDate = true;
            +                        }
            +                        if( new Date( _date.getFullYear(), _date.getMonth(), 1 ).getTime() >
            +                            new Date( _dateo.maxvalue.getFullYear(), _dateo.maxvalue.getMonth(), 1 ).getTime() ){
            +                            _offset = 0;
            +                            _date = JC.f.cloneDate( _dateo.maxvalue );
            +                            _fixDate = true;
            +                        }
            +                    }
            +                    if( !_fixDate ) {
            +                        _date = null;
            +                    }else{
            +                        var _md = JC.f.maxDayOfMonth( _date ), _newD = _dateo.date.getDate();
            +                        _newD > _md && ( _newD = _md );
            +                        _date.setDate( _newD );
            +                    }
            +                }
            +
            +                this._model.multiselect() 
            +                    ? this.updateMultiMonth( _offset, _date )
            +                    : this.updateSingleMonth( _offset, _date )
            +                    ;
            +            }
            +        , updateMultiMonth:
            +            function( _offset, _date ){
            +                var _dateo = this._model.layoutDate(), _day, _max;
            +                if( _date ){
            +                    _dateo.date = _date;
            +                    _offset = 0;
            +                }else{
            +                    JC.Calendar.updateMultiMonth( _dateo.date, _offset );
            +                    JC.Calendar.updateMultiMonth( _dateo.enddate, _offset );
            +
            +                    if( _dateo.multidate ){
            +                        $.each( _dateo.multidate, function( _ix, _item ){
            +                            JC.Calendar.updateMultiMonth( _item.start, _offset );
            +                            JC.Calendar.updateMultiMonth( _item.end, _offset );
            +                        });
            +                    }
            +                }
            +
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +        , updateSingleMonth:
            +            function( _offset, _date ){
            +                var _dateo = this._model.layoutDate()
            +
            +                if( _date ){
            +                    _dateo.date = _date;
            +                }else{
            +                    var _day = _dateo.date.getDate(), _max;
            +
            +                    _dateo.date.setDate( 1 );
            +                    _dateo.date.setMonth( _dateo.date.getMonth() + _offset );
            +                    _max = JC.f.maxDayOfMonth( _dateo.date );
            +                    _day > _max && ( _day = _max );
            +                    _dateo.date.setDate( _day );
            +                }
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +        , updateSelected:
            +            function( _userSelectedItem ){
            +                var _p = this, _date, _tmp;
            +                if( !_userSelectedItem ){
            +                    _date = this._model.selectedDate(); 
            +                }else{
            +                    _userSelectedItem = $( _userSelectedItem );
            +                    _tmp = JC.f.getJqParent( _userSelectedItem, 'td' );
            +                    if( _tmp && _tmp.hasClass('unable') ) return;
            +                    _date = new Date();
            +                    _date.setTime( _userSelectedItem.attr('date') );
            +                }
            +                if( !_date ) return;
            +
            +                _p._model.selector().val( _p._model.dateFormat( _date ) );
            +
            +                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'date', _date, _date ] );
            +                Calendar.hide();
            +            }
            +        , updatePosition:
            +            function(){
            +                var _p = this, _ipt = _p._model.selector(), _layout = _p._model.layout();
            +                if( !( _ipt && _layout && _ipt.length && _layout.length ) ) return;
            +                _layout.css( {'left': '-9999px', 'top': '-9999px', 'z-index': ZINDEX_COUNT++ } ).show();
            +                var _lw = _layout.width(), _lh = _layout.height()
            +                    , _iw = _ipt.width(), _ih = _ipt.height(), _ioset = _ipt.offset()
            +                    , _x, _y, _winw = $(window).width(), _winh = $(window).height()
            +                    , _scrleft = $(document).scrollLeft()
            +                    , _scrtop = $(document).scrollTop()
            +                    ;
            +
            +                _x = _ioset.left; _y = _ioset.top + _ih + 5;
            +
            +                if( ( _y + _lh - _scrtop ) > _winh ){
            +                    _y = _ioset.top - _lh - 3;
            +                    _y < _scrtop && ( _y = _scrtop );
            +                }
            +
            +                if( ( _x + _lw -_scrleft ) > _winw ){
            +                    _x = _winw - _lw + _scrleft - 5;
            +                }
            +                _x < _scrleft && ( _x = _scrleft + 0 );
            +
            +                _layout.css( {left: _x+'px', top: _y+'px'} );
            +
            +                /*
            +                JC.log( _lw, _lh, _iw, _ih, _ioset.left, _ioset.top, _winw, _winh );
            +                JC.log( _scrtop, _x, _y );
            +                */
            +            }
            +        , _buildDone:
            +            function(){
            +                this.updatePosition();
            +                //this._model.selector().blur();
            +                $(this).trigger( 'TriggerEvent', [ Calendar.Model.INITED ] );
            +            }
            +        , _buildLayout:
            +            function( _dateo ){
            +                this._model.layout();
            +                
            +                //JC.log( '_buildBody: \n', JSON.stringify( _dateo ) );
            +
            +                if( !( _dateo && _dateo.date ) ) return;
            +
            +                this._buildHeader( _dateo );
            +                this._buildBody( _dateo );
            +                this._buildFooter( _dateo );
            +            }
            +        , _buildHeader:
            +            function( _dateo ){
            +                var _p = this
            +                    , _layout = _p._model.layout()
            +                    , _ls = []
            +                    , _tmp
            +                    , _selected = _dateo.date.getFullYear()
            +                    , _selectedMonth = _dateo.date.getMonth()
            +                    , _startYear = _p._model.startYear( _dateo )
            +                    , _endYear = _p._model.endYear( _dateo )
            +                    , _curYear = _dateo.date.getFullYear()
            +                    , _curDateMonth = new Date( _dateo.date.getFullYear(), _dateo.date.getMonth(), 1 )
            +                    , _minYear = _dateo.minvalue ? _dateo.minvalue.getFullYear() : 0
            +                    , _maxYear = _dateo.maxvalue ? _dateo.maxvalue.getFullYear() : 0
            +                    , _minMonthDate = _dateo.minvalue ? new Date( _dateo.minvalue.getFullYear(), _dateo.minvalue.getMonth(), 1 ) : 0
            +                    , _maxMonthDate = _dateo.maxvalue ? new Date( _dateo.maxvalue.getFullYear(), _dateo.maxvalue.getMonth(), 1 ) : 0
            +                    , i, j, _mname, _tdate, _addDateYear 
            +                    , _addCurYear
            +                    ;
            +                for( i = _startYear; i <= _endYear; i++ ){
            +
            +                    if( _maxYear && _curYear > _maxYear ){
            +                        _addCurYear = true;
            +                    }
            +                    if( _maxYear && i > _maxYear ) break;
            +
            +                    if( _minYear && i < _minYear ) continue;
            +                    if( _minYear && _curYear < _minYear ) {
            +                        _addCurYear = true;
            +                    }
            +
            +                    _ls.push( JC.f.printf( '<option value="{0}"{1}>{0}</option>', i, i === _selected ? ' selected' : '' ) );
            +                }
            +
            +                if( _addCurYear ){
            +                    _ls.unshift( JC.f.printf( '<option value="{0}"{1}>{0}</option>', _curYear, ' selected' ) );
            +                }
            +                $( _ls.join('') ).appendTo( _layout.find('select.UYear').html('') );
            +
            +                _ls = [];
            +                for( i = 0; i < 12; i++ ){
            +                    _mname = Calendar.getCnNum( i + 1 );
            +                    _tdate = new Date( _curYear, i, 1 );
            +
            +                    /*
            +                    JC.log( _dateo.date.getFullYear(), i
            +                            , JC.f.formatISODate( _tdate )
            +                            , JC.f.formatISODate( _minMonthDate )
            +                            , JC.f.formatISODate( _maxMonthDate ) 
            +                            );
            +                    */
            +
            +                    if( _maxMonthDate && _tdate.getTime() > _maxMonthDate.getTime() ) break;
            +                    if( _minMonthDate && _tdate.getTime() < _minMonthDate.getTime() ){
            +                        /*
            +                        JC.log(
            +                            'xxxxxxxx'
            +                            , JC.f.formatISODate( _dateo.date )
            +                            , JC.f.formatISODate( _tdate )
            +                            , i
            +                            );
            +                        */
            +                        continue;
            +                    }
            +
            +                    _ls.push( JC.f.printf( '<option value="{0}"{1}>{2}月</option>'
            +                                , i
            +                                , i === _selectedMonth ? ' selected' : ''
            +                                , _mname 
            +                                ) 
            +                            );
            +                }
            +                if( !_ls.length ){
            +                    _mname = Calendar.getCnNum( _dateo.date.getMonth() + 1 );
            +
            +                    _ls.push( JC.f.printf( '<option value="{0}"{1}>{2}月</option>'
            +                                , _dateo.date.getMonth()
            +                                , ' selected'
            +                                , _mname 
            +                                ) 
            +                            );
            +                }
            +                $( _ls.join('') ).appendTo( _layout.find( 'select.UMonth' ).html( '' ) );
            +                //$( _layout.find('select.UMonth').val( _dateo.date.getMonth() ) );
            +            }
            +        , _buildBody:
            +            function( _dateo ){
            +                var _p = this, _layout = _p._model.layout();
            +                var _maxday = JC.f.maxDayOfMonth( _dateo.date ), _weekday = _dateo.date.getDay() || 7
            +                    , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin
            +                    , _tmp, i, _class;
            +
            +                var _beginDate = new Date( _dateo.date.getFullYear(), _dateo.date.getMonth(), 1 );
            +                var _beginWeekday = _beginDate.getDay() || 7;
            +                if( _beginWeekday < 2 ){
            +                    _beginDate.setDate( -( _beginWeekday - 1 + 6 ) );
            +                }else{
            +                    _beginDate.setDate( -( _beginWeekday - 2 ) );
            +                }
            +                var today = new Date();
            +
            +                if( _dateo.maxvalue && !_p._model.currentcanselect() ){
            +                    _dateo.maxvalue.setDate( _dateo.maxvalue.getDate() - 1 );
            +                }
            +
            +                _ls.push('<tr>');
            +                for( i = 1; i <= 42; i++ ){
            +                    _class = [];
            +                    if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend');
            +                    if( !JC.f.isSameMonth( _dateo.date, _beginDate ) ) _class.push( 'other' );
            +                    if( _dateo.minvalue && _beginDate.getTime() < _dateo.minvalue.getTime() ) 
            +                        _class.push( 'unable' );
            +                    if( _dateo.maxvalue && _beginDate.getTime() > _dateo.maxvalue.getTime() ) 
            +                        _class.push( 'unable' );
            +
            +                    if( JC.f.isSameDay( _beginDate, today ) ) _class.push( 'today' );
            +                    if( JC.f.isSameDay( _dateo.date, _beginDate ) ) _class.push( 'cur' );
            +
            +                    _ls.push( '<td class="', _class.join(' '),'">'
            +                            ,'<a href="javascript:" date="', _beginDate.getTime(),'" title="'+JC.f.formatISODate(_beginDate)+'" >'
            +                            , _beginDate.getDate(), '</a></td>' );
            +                    _beginDate.setDate( _beginDate.getDate() + 1 );
            +                    if( i % 7 === 0 && i != 42 ) _ls.push( '</tr><tr>' );
            +                }
            +                _ls.push('</tr>');
            +                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            +            }
            +        , _buildFooter:
            +            function( _dateo ){
            +            }
            +    };
            +    /**
            +     * 捕获用户更改年份 
            +     * <p>监听 年份下拉框</p>
            +     * @event year change
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar select.UYear, body > div.UXCCalendar select.UMonth', 'change', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateLayout();
            +    });
            +    /**
            +     * 捕获用户更改年份 
            +     * <p>监听 下一年按钮</p>
            +     * @event next year
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UNextYear', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateYear( 1 );
            +    });
            +    /**
            +     * 捕获用户更改年份 
            +     * <p>监听 上一年按钮</p>
            +     * @event previous year
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UPreYear', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateYear( -1 );
            +    });
            +    /**
            +     * 增加或者减少一年
            +     * <p>监听 年份map</p>
            +     * @event   year map click
            +     * @private
            +     */
            +    $(document).delegate( "map[name=UXCCalendar_Year] area" , 'click', function( $evt ){
            +        $evt.preventDefault();
            +        var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt );
            +        _p.attr("action") && _ins
            +            && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateYear( 1 )
            +                , _p.attr("action").toLowerCase() == 'down' && _ins.updateYear( -1 )
            +               );
            +    });
            +    /**
            +     * 增加或者减少一个月
            +     * <p>监听 月份map</p>
            +     * @event   month map click
            +     * @private
            +     */
            +    $(document).delegate( "map[name=UXCCalendar_Month] area" , 'click', function( $evt ){
            +        $evt.preventDefault();
            +        var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt );
            +        _p.attr("action") && _ins
            +            && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateMonth( 1 )
            +                , _p.attr("action").toLowerCase() == 'down' && _ins.updateMonth( -1 )
            +               );
            +    });
            +    /**
            +     * 捕获用户更改月份 
            +     * <p>监听 下一月按钮</p>
            +     * @event next year
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UNextMonth', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateMonth( 1 );
            +    });
            +    /**
            +     * 捕获用户更改月份
            +     * <p>监听 上一月按钮</p>
            +     * @event previous year
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UPreMonth', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateMonth( -1 );
            +    });
            +
            +    /**
            +     * 日期点击事件
            +     * @event date click
            +     * @private
            +     */
            +    $(document).delegate( 'div.UXCCalendar table a[date], div.UXCCalendar table a[dstart]', 'click', function( $evt ){
            +        $evt.preventDefault();
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateSelected( $( this ) );
            +        /*
            +        Calendar._triggerUpdate( [ 'date', _d, _d ] );
            +        */
            +    });
            +    /**
            +     * 选择当前日期
            +     * <p>监听确定按钮</p>
            +     * @event   confirm click
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UConfirm', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).updateSelected();
            +    });
            +    /**
            +     * 清除文本框内容
            +     * <p>监听 清空按钮</p>
            +     * @event   clear click
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UClear', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).clear();
            +    });
            +    /**
            +     * 取消日历组件, 相当于隐藏
            +     * <p>监听 取消按钮</p>
            +     * @event cancel click
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar button.UCancel', 'click', function( $evt ){
            +        Calendar.getInstance( Calendar.lastIpt )
            +            && Calendar.getInstance( Calendar.lastIpt ).cancel();
            +    });
            +    /**
            +     * 日历组件按钮点击事件
            +     * @event calendar button click
            +     * @private
            +     */
            +    $(document).delegate( 'input.UXCCalendar_btn', 'click', function($evt){
            +        var _p = $(this), _tmp;
            +        if( !_p.data( Calendar.Model.INPUT ) ){
            +            _tmp = _p.prev( 'input[type=text], textarea' );
            +            _tmp.length && _p.data( Calendar.Model.INPUT, _tmp );
            +        }
            +        _p.data( Calendar.Model.INPUT ) 
            +            && !_p.data( Calendar.Model.INPUT ).is('[disabled]')
            +            && Calendar.pickDate( _p.data( Calendar.Model.INPUT ) );
            +    });
            +    /**
            +     * 日历组件点击事件, 阻止冒泡, 防止被 document click事件隐藏
            +     * @event UXCCalendar click
            +     * @private
            +     */
            +    $(document).delegate( 'body > div.UXCCalendar', 'click', function( $evt ){
            +        $evt.stopPropagation();
            +    });
            +
            +    /**
            +     * DOM 加载完毕后, 初始化日历组件相关事件
            +     * @event   dom ready
            +     * @private
            +     */
            +    $(document).ready( function($evt){
            +        /**
            +         * 延迟200毫秒初始化页面的所有日历控件
            +         * 之所以要延迟是可以让用户自己设置是否需要自动初始化
            +         */
            +        JC.f.safeTimeout( function( $evt ){
            +            if( !Calendar.autoInit ) return;
            +            Calendar.initTrigger( $(document) );
            +        }, null, 'CalendarInitTrigger', 200 );
            +        /**
            +         * 监听窗口滚动和改变大小, 实时变更日历组件显示位置
            +         * @event  window scroll, window resize
            +         * @private
            +         */
            +        $(window).on('scroll resize', function($evt){
            +            var _ins = Calendar.getInstance( Calendar.lastIpt );
            +                _ins && _ins.visible() && _ins.updatePosition();
            +        });
            +        /**
            +         * dom 点击时, 检查事件源是否为日历组件对象, 如果不是则会隐藏日历组件
            +         * @event dom click
            +         * @private
            +         */
            +        $(document).on('click', function($evt){
            +            var _src = $evt.target || $evt.srcElement;
            +
            +            if( Calendar.domClickFilter ) if( Calendar.domClickFilter( $(_src) ) === false ) return;
            +
            +            if( Calendar.isCalendar($evt.target||$evt.targetElement) ) return;
            +
            +            if( _src && ( _src.nodeName.toLowerCase() != 'input'
            +                    && _src.nodeName.toLowerCase() != 'button' 
            +                    && _src.nodeName.toLowerCase() != 'textarea' 
            +                    ) ){
            +                Calendar.hide(); return;
            +            }
            +
            +            JC.f.safeTimeout( function(){
            +                if( Calendar.lastIpt && Calendar.lastIpt.length && _src == Calendar.lastIpt[0] ) return;
            +                Calendar.hide();
            +            }, null, 'CalendarClickHide', 100 );
            +        });
            +    });
            +    $(document).delegate( [ 'input[datatype=date]', 'input[datatype=daterange]'
            +                            , 'input[multidate=date]', 'input[multidate=daterange]' ].join(), 'focus' 
            +    , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'button[datatype=date]', 'button[datatype=daterange]'
            +                            , 'button[multidate=date]', 'button[multidate=daterange]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'textarea[datatype=date]', 'textarea[datatype=daterange]'
            +                            , 'textarea[multidate=date]', 'textarea[multidate=daterange]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Calendar_Calendar.js.html b/docs_api/files/.._comps_Calendar_Calendar.js.html index 253469db9..62d953ba2 100644 --- a/docs_api/files/.._comps_Calendar_Calendar.js.html +++ b/docs_api/files/.._comps_Calendar_Calendar.js.html @@ -3,11 +3,17 @@ ../comps/Calendar/Calendar.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,2642 +252,36 @@

            File: ../comps/Calendar/Calendar.js

            -//TODO: minvalue, maxvalue 添加默认日期属性识别属性
            -;(function($){
            -    /**
            -     * 日期选择组件
            -     * <br />全局访问请使用 JC.Calendar 或 Calendar
            -     * <br />DOM 加载完毕后
            -     * , Calendar会自动初始化页面所有日历组件, input[type=text][datatype=date]标签
            -     * <br />Ajax 加载内容后, 如果有日历组件需求的话, 需要手动使用Calendar.init( _selector )
            -     * <br />_selector 可以是 新加载的容器, 也可以是新加载的所有input
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_cloneDate'>window.cloneDate</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_parseISODate'>window.parseISODate</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_formatISODate'>window.formatISODate</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_maxDayOfMonth'>window.maxDayOfMonth</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_isSameDay'>window.isSameDay</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_isSameMonth'>window.isSameMonth</a>
            -     * </p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Calendar.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Calendar/_demo/' target='_blank'>demo link</a></p>
            -     * <h2> 可用的html attribute, (input|button):(datatype|multidate)=(date|week|month|season) </h2> 
            -     * <dl>
            -     *      <dt>defaultdate = ISO Date</dt>
            -     *      <dd>默认显示日期, 如果 value 为空, 则尝试读取 defaultdate 属性</dd>
            -     *
            -     *      <dt>datatype = string</dt>
            -     *      <dd>
            -     *          声明日历控件的类型:
            -     *          <p><b>date:</b> 日期日历</p>
            -     *          <p><b>week:</b> 周日历</p>
            -     *          <p><b>month:</b> 月日历</p>
            -     *          <p><b>season:</b> 季日历</p>
            -     *          <p><b>monthday:</b> 多选日期日历</p>
            -     *      </dd>
            -     *
            -     *      <dt>multidate = string</dt>
            -     *      <dd>
            -     *          与 datatype 一样, 这个是扩展属性, 避免表单验证带来的逻辑冲突
            -     *      </dd>
            -     *
            -     *      <dt>calendarshow = function</dt>
            -     *      <dd>显示日历时的回调</dd>
            -     *
            -     *      <dt>calendarhide = function</dt>
            -     *      <dd>隐藏日历时的回调</dd>
            -     *
            -     *      <dt>calendarlayoutchange = function</dt>
            -     *      <dd>用户点击日历控件操作按钮后, 外观产生变化时触发的回调</dd>
            -     *
            -     *      <dt>calendarupdate = function</dt>
            -     *      <dd>
            -     *          赋值后触发的回调
            -     *          <dl>
            -     *              <dt>参数:</dt>
            -     *              <dd><b>_startDate:</b> 开始日期</dd>
            -     *              <dd><b>_endDate:</b> 结束日期</dd>
            -     *          </dl>
            -     *      </dd>
            -     *
            -     *      <dt>calendarclear = function</dt>
            -     *      <dd>清空日期触发的回调</dd>
            -     *
            -     *      <dt>minvalue = ISO Date</dt>
            -     *      <dd>日期的最小时间, YYYY-MM-DD</dd>
            -     *
            -     *      <dt>maxvalue = ISO Date</dt>
            -     *      <dd>日期的最大时间, YYYY-MM-DD</dd>
            -     *
            -     *      <dt>currentcanselect = bool, default = true</dt>
            -     *      <dd>当前日期是否能选择</dd>
            -     *
            -     *      <dt>multiselect = bool (目前支持 month: default=false, monthday: default = treu)</dt>
            -     *      <dd>是否为多选日历</dd>
            -     *
            -     *      <dt>calendarupdatemultiselect = function</dt>
            -     *      <dd>
            -     *          多选日历赋值后触发的回调
            -     *          <dl>
            -     *              <dt>参数: _data:</dt>
            -     *              <dd>
            -     *                  [{"start": Date,"end": Date}[, {"start": Date,"end": Date}... ] ]
            -     *              </dd>
            -     *          </dl>
            -     *      </dd>
            -     * </dl>
            -     * @namespace JC
            -     * @class Calendar
            -     * @version dev 0.2, 2013-09-01 过程式转单例模式
            -     * @version dev 0.1, 2013-06-04
            -     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            -     */
            -    window.Calendar = JC.Calendar = Calendar;
            -    function Calendar( _selector ){
            -        if( Calendar.getInstance( _selector ) ) return Calendar.getInstance( _selector );
            -        Calendar.getInstance( _selector, this );
            -
            -        var _type = Calendar.type( _selector );
            -
            -        JC.log( 'Calendar init:', _type, new Date().getTime() );
            -
            -        switch( _type ){
            -            case 'week': 
            -                {
            -                    this._model = new Calendar.WeekModel( _selector );
            -                    this._view = new Calendar.WeekView( this._model );
            -                    break;
            -                }
            -            case 'month': 
            -                {
            -                    this._model = new Calendar.MonthModel( _selector );
            -                    this._view = new Calendar.MonthView( this._model );
            -                    break;
            -                }
            -            case 'season': 
            -                {
            -                    this._model = new Calendar.SeasonModel( _selector );
            -                    this._view = new Calendar.SeasonView( this._model );
            -                    break;
            -                }
            -            case 'monthday':
            -                {   
            -                   
            -                    this._model = new Calendar.MonthDayModel( _selector );
            -                    this._view = new Calendar.MonthDayView( this._model );
            -                    break;
            -                }
            -            default:
            -                {
            -                    this._model = new Calendar.Model( _selector );
            -                    this._view = new Calendar.View( this._model );
            -                    break;
            -                }
            -        }
            -
            -        this._init();
            -    }
            -    
            -    Calendar.prototype = {
            -        /**
            -         * 内部初始化函数
            -         * @method _init
            -         * @private
            -         */
            -        _init:
            -            function(){
            -                var _p = this;
            -
            -                _p._initHanlderEvent();
            -
            -                $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){
            -                    _p.on( _evtName, _cb );
            -                });
            -
            -                $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){
            -                    var _data = sliceArgs( arguments ).slice(2);
            -                    _p.trigger( _evtName, _data );
            -                });
            -
            -                _p._model.init();
            -                _p._view.init();
            -
            -                return _p;
            -            }    
            -        /**
            -         * 初始化相关操作事件
            -         * @method  _initHanlderEvent
            -         * @private
            -         */
            -        , _initHanlderEvent:
            -            function(){
            -                var _p = this;
            -
            -                _p.on( Calendar.Model.INITED, function( _evt ){
            -                    _p._model.calendarinited()
            -                        && _p._model.calendarinited().call( _p._model.selector(), _p._model.layout(), _p );
            -                });
            -
            -                _p.on( Calendar.Model.SHOW, function( _evt ){
            -                    _p._model.calendarshow()
            -                        && _p._model.calendarshow().call( _p._model.selector(), _p._model.selector(), _p );
            -                });
            -
            -                _p.on( Calendar.Model.HIDE, function( _evt ){
            -                    _p._model.calendarhide()
            -                        && _p._model.calendarhide().call( _p._model.selector(), _p._model.selector(), _p );
            -                });
            -
            -                _p.on( Calendar.Model.UPDATE, function( _evt ){
            -                    if( !_p._model.selector() ) return;
            -
            -                    _p._model.selector().blur();
            -                    _p._model.selector().trigger('change');
            -
            -                    var _data = [], _v = _p._model.selector().val().trim(), _startDate, _endDate, _tmp, _item, _tmpStart, _tmpEnd;
            -
            -                    if( _v ){
            -                        _tmp = _v.split( ',' );
            -                        for( var i = 0, j = _tmp.length; i < j; i++ ){
            -                            _item = _tmp[i].replace( /[^\d]/g, '' );
            -                            if( _item.length == 16 ){
            -                                _tmpStart = parseISODate( _item.slice( 0, 8 ) );
            -                                _tmpEnd = parseISODate( _item.slice( 8 ) );
            -                            }else if( _item.length == 8 ){
            -                                _tmpStart = parseISODate( _item.slice( 0, 8 ) );
            -                                _tmpEnd = cloneDate( _tmpStart );
            -                            }
            -                            if( i === 0 ){
            -                                _startDate = cloneDate( _tmpStart );
            -                                _endDate = cloneDate( _tmpEnd );
            -                            }
            -                            _data.push( {'start': _tmpStart, 'end': _tmpEnd } );
            -                        }
            -                    }
            -
            -                    _p._model.calendarupdate()
            -                        && _p._model.calendarupdate().apply( _p._model.selector(), [ _startDate, _endDate ] );
            -
            -                    _p._model.multiselect()
            -                        && _p._model.calendarupdatemultiselect()
            -                        && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _data, _p );
            -                });
            -
            -                _p.on( Calendar.Model.CLEAR, function( _evt ){
            -                    _p._model.calendarclear()
            -                        && _p._model.calendarclear().call( _p._model.selector(), _p._model.selector(), _p );
            -                });
            -
            -                _p.on( Calendar.Model.CANCEL, function( _evt ){
            -                    _p._model.calendarcancel()
            -                        && _p._model.calendarcancel().call( _p._model.selector(), _p._model.selector(), _p );
            -                });
            -
            -                _p.on( Calendar.Model.LAYOUT_CHANGE, function( _evt ){
            -                    _p._model.calendarlayoutchange()
            -                        && _p._model.calendarlayoutchange().call( _p._model.selector(), _p._model.selector(), _p );
            -                });
            -
            -                _p.on( Calendar.Model.UPDATE_MULTISELECT, function( _evt ){
            -                    _p._model.multiselect()
            -                        && _p._model.calendarupdatemultiselect()
            -                        && _p._model.calendarupdatemultiselect().call( _p._model.selector(), _p._model.selector(), _p );
            -                });
            -
            -                return _p;
            -            }
            -        /**
            -         * 显示 Calendar
            -         * @method  show
            -         * @return  CalendarInstance
            -         */
            -        , show: 
            -            function(){ 
            -                Calendar.hide(); 
            -                Calendar.lastIpt = this._model.selector();
            -                this._view.show(); 
            -                this.trigger( Calendar.Model.SHOW );
            -                return this; 
            -            }
            -        /**
            -         * 隐藏 Calendar
            -         * @method  hide
            -         * @return  CalendarInstance
            -         */
            -        , hide: function(){ 
            -            this._view.hide(); 
            -            this.trigger( Calendar.Model.HIDE );
            -            this.selector() && this.selector().blur();
            -            return this; 
            -        }
            -        /**
            -         * 获取 显示 Calendar 的触发源选择器, 比如 a 标签
            -         * @method  selector
            -         * @return  selector
            -         */ 
            -        , selector: function(){ return this._model.selector(); }
            -        /**
            -         * 获取 Calendar 外观的 选择器
            -         * @method  layout
            -         * @return  selector
            -         */
            -        , layout: function(){ return this._model.layout(); }
            -        /**
            -         * 使用 jquery on 绑定事件
            -         * @method  {string}    on
            -         * @param   {string}    _evtName
            -         * @param   {function}  _cb
            -         * @return  CalendarInstance
            -         */
            -        , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;}
            -        /**
            -         * 使用 jquery trigger 绑定事件
            -         * @method  {string}    trigger
            -         * @param   {string}    _evtName
            -         * @return  CalendarInstance
            -         */
            -        , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;}
            -        /**
            -         * 用户操作日期控件时响应改变
            -         * @method  updateLayout
            -         */
            -        , updateLayout:
            -            function(){
            -                this._view.updateLayout();
            -                return this;
            -            }
            -        /**
            -         * 切换到不同日期控件源时, 更新对应的控件源
            -         * @method  updateSelector
            -         * @param   {selector}      _selector
            -         */
            -        , updateSelector:
            -            function( _selector ){
            -                Calendar.lastIpt = _selector;
            -                this._model && this._model.selector( _selector );
            -                return this;
            -            }
            -        /**
            -         * 用户改变年份时, 更新到对应的年份
            -         * @method  updateYear
            -         * @param   {int}   _offset
            -         */
            -        , updateYear:
            -            function( _offset ){
            -                this._view && this._view.updateYear( _offset );
            -                this.trigger( Calendar.Model.LAYOUT_CHANGE );
            -                return this;
            -            }
            -        /**
            -         * 用户改变月份时, 更新到对应的月份
            -         * @method  updateMonth
            -         * @param   {int}   _offset
            -         */
            -        , updateMonth:
            -            function( _offset ){
            -                this._view && this._view.updateMonth( _offset );
            -                this.trigger( Calendar.Model.LAYOUT_CHANGE );
            -                return this;
            -            }
            -        /**
            -         * 把选中的值赋给控件源
            -         * <br />用户点击日期/确定按钮
            -         * @method  updateSelected
            -         * @param   {selector}  _userSelectedItem
            -         */
            -        , updateSelected:
            -            function( _userSelectedItem ){
            -                JC.log( 'JC.Calendar: updateSelector', new Date().getTime() );
            -                this._view && this._view.updateSelected( _userSelectedItem );
            -                return this;
            -            }
            -        /**
            -         * 显示日历外观到对应的控件源 
            -         * @method  updatePosition
            -         */
            -        , updatePosition:
            -            function(){
            -                this._view && this._view.updatePosition();
            -                return this;
            -            }
            -        /**
            -         * 清除控件源内容
            -         * @method  clear
            -         */
            -        , clear:
            -            function(){
            -                var _isEmpty = !this._model.selector().val().trim();
            -                this._model && this._model.selector().val('');
            -                !_isEmpty && this.trigger( Calendar.Model.CLEAR );
            -                return this;
            -            }
            -        /**
            -         * 用户点击取消按钮时隐藏日历外观
            -         * @method  cancel
            -         */
            -        , cancel:
            -            function(){
            -                this.trigger( Calendar.Model.CANCEL );
            -                this._view && this._view.hide();
            -                return this;
            -            }
            -        /***
            -         * 返回日历外观是否可见
            -         * @method  visible
            -         * @return  bool
            -         */
            -        , visible:
            -            function(){
            -                var _r, _tmp;
            -                this._model 
            -                    && ( _tmp = this._model.layout() ) 
            -                    && ( _r = _tmp.is(':visible') )
            -                    ;
            -                return _r;
            -            }
            -        /**
            -         * 获取控件源的初始日期对象
            -         * @method  defaultDate
            -         * @param   {selector}  _selector
            -         */
            -        , defaultDate:
            -            function( _selector ){
            -                return this._model.defaultDate( _selector );
            -            }
            -    }
            -    /**
            -     * 获取或设置 Calendar 的实例
            -     * @method getInstance
            -     * @param   {selector}      _selector
            -     * @static
            -     * @return  {Calendar instance}
            -     */
            -    Calendar.getInstance =
            -        function( _selector, _setter ){
            -            typeof _selector == 'string' && !/</.test( _selector ) && ( _selector = $(_selector) );
            -            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            -            var _type = Calendar.type( _selector );
            -            typeof _setter != 'undefined' && ( Calendar._ins[ _type ] = _setter );
            -            Calendar._ins[ _type ] && Calendar._ins[ _type ].updateSelector( _selector );
            -            return Calendar._ins[ _type ];
            -        };
            -    /**
            -     * 保存所有类型的 Calendar 日期实例 
            -     * <br />目前有 date, week, month, season 四种类型的实例
            -     * <br />每种类型都是单例模式
            -     * @prototype   _ins
            -     * @type        object
            -     * @default     empty
            -     * @private
            -     * @static
            -     */
            -    Calendar._ins = {};
            -    /**
            -     * 获取控件源的实例类型
            -     * <br />目前有 date, week, month, season 四种类型的实例
            -     * @method  type
            -     * @param   {selector}  _selector
            -     * @return  string
            -     * @static
            -     */
            -    Calendar.type =
            -        function( _selector ){
            -            _selector = $(_selector);
            -            var _r, _type = $.trim(_selector.attr('multidate') || '').toLowerCase() 
            -                || $.trim(_selector.attr('datatype') || '').toLowerCase();
            -            switch( _type ){
            -                case 'week': 
            -                case 'month': 
            -                case 'season': 
            -                case 'monthday': 
            -                    {
            -                        _r = _type;
            -                        break;
            -                    }
            -                default: _r = 'date'; break;
            -            }
            -            return _r;
            -        };
            -    /** 
            -     * 判断选择器是否为日历组件的对象
            -     * @method  isCalendar
            -     * @static
            -     * @param   {selector}  _selector
            -     * return   bool
            -     */
            -    Calendar.isCalendar = 
            -        function( _selector ){
            -            _selector = $(_selector);
            -            var _r = 0;
            -
            -            if( _selector.length ){
            -                if( _selector.hasClass('UXCCalendar_btn') ) _r = 1;
            -                if( _selector.prop('nodeName') 
            -                        && _selector.attr('datatype')
            -                        && ( _selector.prop('nodeName').toLowerCase()=='input' || _selector.prop('nodeName').toLowerCase()=='button' )
            -                        && ( _selector.attr('datatype').toLowerCase()=='date' 
            -                                || _selector.attr('datatype').toLowerCase()=='week' 
            -                                || _selector.attr('datatype').toLowerCase()=='month' 
            -                                || _selector.attr('datatype').toLowerCase()=='season' 
            -                                || _selector.attr('datatype').toLowerCase()=='year' 
            -                                || _selector.attr('datatype').toLowerCase()=='daterange' 
            -                                || _selector.attr('datatype').toLowerCase() == 'monthday'
            -                            )) _r = 1;
            -                if( _selector.prop('nodeName') 
            -                        && _selector.attr('multidate')
            -                        && ( _selector.prop('nodeName').toLowerCase()=='input' 
            -                            || _selector.prop('nodeName').toLowerCase()=='button' )
            -                        ) _r = 1;
            -            }
            -
            -            return _r;
            -        };
            -    /**
            -     * 请使用 isCalendar, 这个方法是为了向后兼容
            -     */
            -    Calendar.isCalendarElement = function( _selector ){ return Calendar.isCalendar( _selector ); };
            -    /**
            -     * 弹出日期选择框
            -     * @method pickDate
            -     * @static
            -     * @param   {selector}  _selector 需要显示日期选择框的input[text]   
            -     * @example
            -            <dl>
            -                <dd>
            -                    <input type="text" name="date6" class="manualPickDate" value="20110201" />
            -                    manual JC.Calendar.pickDate
            -                </dd>
            -                <dd>
            -                    <input type="text" name="date7" class="manualPickDate" />
            -                    manual JC.Calendar.pickDate
            -                </dd>
            -            </dl>
            -            <script>
            -                $(document).delegate('input.manualPickDate', 'focus', function($evt){
            -                JC.Calendar.pickDate( this );
            -                });
            -            </script>
            -     */
            -    Calendar.pickDate =  
            -        function( _selector ){ 
            -            _selector = $( _selector );
            -            if( !(_selector && _selector.length) ) return;
            -
            -            var _ins, _isIgnore = _selector.is('[ignoreprocess]');
            -
            -            _selector.attr('ignoreprocess', true);
            -            _selector.blur();
            -            !_isIgnore && _selector.removeAttr('ignoreprocess');
            -
            -            _ins = Calendar.getInstance( _selector );
            -            !_ins && ( _ins = new Calendar( _selector ) );
            -            _ins.show();
            -            return;
            -        }; 
            -    /**
            -     * 设置是否在 DOM 加载完毕后, 自动初始化所有日期控件
            -     * @property    autoInit
            -     * @default true
            -     * @type    {bool}
            -     * @static
            -            <script>JC.Calendar.autoInit = true;</script>
            -     */
            -    Calendar.autoInit =  true;
            -    /**
            -     * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年
            -     * @property    defaultDateSpan
            -     * @type        {int}
            -     * @default     20
            -     * @static
            -            <script>JC.Calendar.defaultDateSpan = 20;</script>
            -     */
            -    Calendar.defaultDateSpan = 20;
            -    /**
            -     * 最后一个显示日历组件的文本框
            -     * @property  lastIpt
            -     * @type    selector
            -     * @static
            -     */
            -    Calendar.lastIpt = null;
            -    /**
            -     * 自定义日历组件模板
            -     * <p>默认模板为_logic.tpl</p>
            -     * <p>如果用户显示定义JC.Calendar.tpl的话, 将采用用户的模板</p>
            -     * @property    tpl
            -     * @type    {string}
            -     * @default empty
            -     * @static
            -     */
            -    Calendar.tpl = '';
            -    /**
            -     * 初始化外观后的回调函数
            -     * @property layoutInitedCallback
            -     * @type    function
            -     * @static
            -     * @default null
            -     */
            -    Calendar.layoutInitedCallback = null;
            -    /**
            -     * 显示为可见时的回调
            -     * @property layoutShowCallback
            -     * @type    function
            -     * @static
            -     * @default null
            -     */
            -    Calendar.layoutShowCallback = null;
            -    /**
            -     * 日历隐藏后的回调函数
            -     * @property layoutHideCallback
            -     * @type    function
            -     * @static
            -     * @default null
            -     */
            -    Calendar.layoutHideCallback = null;
            -    /**
            -     * DOM 点击的过滤函数
            -     * <br />默认 dom 点击时, 判断事件源不为 input[datatype=date|daterange] 会隐藏 Calendar
            -     * <br /> 通过该回调可自定义过滤, 返回 false 不执行隐藏操作
            -     * @property domClickFilter
            -     * @type    function
            -     * @static
            -     * @default null
            -     */
            -    Calendar.domClickFilter = null;
            -    /**
            -     * 隐藏日历组件
            -     * @method  hide
            -     * @static
            -     * @example
            -            <script>JC.Calendar.hide();</script>
            -     */
            -    Calendar.hide =
            -        function(){
            -
            -            for( var k in Calendar._ins ){
            -                Calendar._ins[ k] 
            -                    && Calendar._ins[ k].visible()
            -                    && Calendar._ins[ k].hide()
            -                    ;
            -            }
            -        };
            -    /**
            -     * 获取初始日期对象
            -     * <p style="bold">这个方法将要废除, 请使用 instance.defaultDate()</p>
            -     * @method  getDate
            -     * @static
            -     * @param   {selector}  _selector   显示日历组件的input
            -     * return   { date: date, minvalue: date|null, maxvalue: date|null, enddate: date|null }
            -     */
            -    Calendar.getDate =
            -        function( _selector ){
            -            return Calendar.getInstance( _selector ).defaultDate();
            -        };
            -    /**
            -     * 每周的中文对应数字
            -     * @property    cnWeek
            -     * @type    string
            -     * @static
            -     * @default 日一二三四五六 
            -     */
            -    Calendar.cnWeek = "日一二三四五六";
            -    /**
            -     * 100以内的中文对应数字
            -     * @property    cnUnit
            -     * @type    string
            -     * @static
            -     * @default 十一二三四五六七八九    
            -     */
            -    Calendar.cnUnit = "十一二三四五六七八九";
            -    /**
            -     * 转换 100 以内的数字为中文数字
            -     * @method  getCnNum
            -     * @static
            -     * @param   {int}   _num
            -     * @return  string
            -     */
            -    Calendar.getCnNum =
            -        function ( _num ){
            -            var _r = Calendar.cnUnit.charAt( _num % 10 );
            -            _num > 10 && ( _r = (_num % 10 !== 0 ? Calendar.cnUnit.charAt(0) : '') + _r );
            -            _num > 19 && ( _r = Calendar.cnUnit.charAt( Math.floor( _num / 10 ) ) + _r );
            -            return _r;
            -        };
            -    /**
            -     * 设置日历组件的显示位置
            -     * @method  position
            -     * @static
            -     * @param   {selector}  _ipt    需要显示日历组件的文本框
            -     */
            -    Calendar.position =
            -        function( _ipt ){
            -            Calendar.getInstance( _ipt )
            -                && Calendar.getInstance( _ipt ).updatePosition();
            -        };
            -    /**
            -     * 这个方法后续版本不再使用, 请使用 Calendar.position
            -     */
            -    Calendar.setPosition = Calendar.position;
            -    /**
            -     * 初始化日历组件的触发按钮
            -     * @method  _logic.initTrigger
            -     * @param   {selector}      _selector   
            -     * @private
            -     */
            -    Calendar.initTrigger = 
            -        function( _selector ){
            -           _selector.each( function(){
            -                var _p = $(this), _nodeName = (_p.prop('nodeName')||'').toLowerCase(), _tmp;
            -
            -                if( _nodeName != 'input' && _nodeName != 'textarea' ){ 
            -                    Calendar.initTrigger( _selector.find( 'input[type=text], textarea' ) ); 
            -                    return; 
            -                }
            -
            -                if( !(  
            -                        $.trim( _p.attr('datatype') || '').toLowerCase() == 'date' 
            -                        || $.trim( _p.attr('multidate') || '')
            -                        || $.trim( _p.attr('datatype') || '').toLowerCase() == 'daterange'
            -                        || $.trim( _p.attr('datatype') || '').toLowerCase() == 'monthday' 
            -                        ) ) return;
            -
            -                var _btn = _p.find( '+ input.UXCCalendar_btn' );
            -                if( !_btn.length ){
            -                    _p.after( _btn = $('<input type="button" class="UXCCalendar_btn"  />') );
            -                }
            -
            -                ( _tmp = _p.val().trim() )
            -                    && ( _tmp = dateDetect( _tmp ) )
            -                    && _p.val( formatISODate( _tmp ) )
            -                    ; 
            -
            -                ( _tmp = ( _p.attr('minvalue') || '' ) )
            -                    && ( _tmp = dateDetect( _tmp ) )
            -                    && _p.attr( 'minvalue', formatISODate( _tmp ) )
            -                    ; 
            -
            -                ( _tmp = ( _p.attr('maxvalue') || '' ) )
            -                    && ( _tmp = dateDetect( _tmp ) )
            -                    && _p.attr( 'maxvalue', formatISODate( _tmp ) )
            -                    ; 
            -
            -                if( ( _p.attr('datatype') || '' ).toLowerCase() == 'monthday'
            -                    || ( _p.attr('multidate') || '' ).toLowerCase() == 'monthday' ){
            -                    if( !_p.is('[placeholder]') ){
            -                        var _tmpDate = new Date();
            -                        _p.attr('defaultdate') && ( _tmpDate = parseISODate( _p.attr('defaultdate') ) || _tmpDate );
            -                        _p.val().trim() && ( _tmpDate = parseISODate( _p.val().replace( /[^d]/g, '').slice( 0, 8 ) ) || _tmpDate );
            -                        _tmpDate && _p.attr( 'placeholder', printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) );
            -                    }
            -                }
            -
            -                _btn.data( Calendar.Model.INPUT, _p );
            -            });
            -        };
            -
            -    Calendar.updateMultiYear =
            -        function ( _date, _offset ){
            -            var _day, _max;
            -            _day = _date.getDate();
            -            _date.setDate( 1 );
            -            _date.setFullYear( _date.getFullYear() + _offset );
            -            _max = maxDayOfMonth( _date );
            -            _day > _max && ( _day = _max );
            -            _date.setDate( _day );
            -            return _date;
            -        };
            -
            -    Calendar.updateMultiMonth =
            -        function ( _date, _offset ){
            -            var _day, _max;
            -            _day = _date.getDate();
            -            _date.setDate( 1 );
            -            _date.setMonth( _date.getMonth() + _offset );
            -            _max = maxDayOfMonth( _date );
            -            _day > _max && ( _day = _max );
            -            _date.setDate( _day );
            -            return _date;
            -        };
            -
            -
            -    /**
            -     * 克隆 Calendar 默认 Model, View 的原型属性
            -     * @method  clone
            -     * @param   {NewModel}  _model
            -     * @param   {NewView}   _view
            -     */
            -    Calendar.clone =
            -        function( _model, _view ){
            -            var _k;
            -            if( _model )
            -                for( _k in Model.prototype ) _model.prototype[_k] = Model.prototype[_k];
            -            if( _view )
            -                for( _k in View.prototype ) _view.prototype[_k] = View.prototype[_k];
            -        };
            -    
            -    function Model( _selector ){
            -        this._selector = _selector;
            -    }
            -
            -    Calendar.Model = Model;
            -    Calendar.Model.INPUT = 'CalendarInput';
            -
            -    Calendar.Model.INITED = 'CalendarInited';
            -    Calendar.Model.SHOW = 'CalendarShow';
            -    Calendar.Model.HIDE = 'CalendarHide';
            -    Calendar.Model.UPDATE = 'CalendarUpdate';
            -    Calendar.Model.CLEAR = 'CalendarClear';
            -    Calendar.Model.CANCEL = 'CalendarCancel';
            -    Calendar.Model.LAYOUT_CHANGE = 'CalendarLayoutChange';
            -    Calendar.Model.UPDATE_MULTISELECT = 'CalendarUpdateMultiSelect';
            -    
            -    Model.prototype = {
            -        init:
            -            function(){
            -                return this;
            -            }
            -
            -        , selector: 
            -            function( _setter ){ 
            -                typeof _setter != 'undefined' && ( this._selector = _setter );
            -                return this._selector; 
            -            }
            -        , layout: 
            -            function(){
            -                var _r = $('#UXCCalendar');
            -
            -                if( !_r.length ){
            -                    _r = $( Calendar.tpl || this.tpl ).hide();
            -                    _r.attr('id', 'UXCCalendar').hide().appendTo( document.body );
            -                    var _month = $( [
            -                                '<option value="0">一月</option>'
            -                                , '<option value="1">二月</option>'
            -                                , '<option value="2">三月</option>'
            -                                , '<option value="3">四月</option>'
            -                                , '<option value="4">五月</option>'
            -                                , '<option value="5">六月</option>'
            -                                , '<option value="6">七月</option>'
            -                                , '<option value="7">八月</option>'
            -                                , '<option value="8">九月</option>'
            -                                , '<option value="9">十月</option>'
            -                                , '<option value="10">十一月</option>'
            -                                , '<option value="11">十二月</option>'
            -                            ].join('') ).appendTo( _r.find('select.UMonth' ) );
            -                 }
            -                return _r;
            -            }
            -        , startYear:
            -            function( _dateo ){
            -                var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear();
            -                this.selector().is('[calendardatespan]') 
            -                    && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) );
            -                return _r - _span;
            -            }
            -        , endYear:
            -            function( _dateo ){
            -                var _span = Calendar.defaultDateSpan, _r = _dateo.date.getFullYear();
            -                this.selector().is('[calendardatespan]') 
            -                    && ( _span = parseInt( this.selector().attr('calendardatespan'), 10 ) );
            -                return _r + _span;
            -            }
            -        , currentcanselect:
            -            function(){
            -                var _r = true;
            -                this.selector().is('[currentcanselect]') 
            -                    && ( currentcanselect = parseBool( this.selector().attr('currentcanselect') ) );
            -                return _r;
            -            }
            -        , year: 
            -            function(){
            -                return parseInt( this.layout().find('select.UYear').val(), 10 ) || 1;
            -            }
            -        , month:
            -            function(){
            -                return parseInt( this.layout().find('select.UMonth').val(), 10 ) || 0;
            -            }
            -        , day:
            -            function(){
            -                var _tmp, _date = new Date();
            -                _tmp = this.layout().find('td.cur > a[date], td.cur > a[dstart]');
            -                if( _tmp.length ){
            -                    _date.setTime( _tmp.attr('date') || _tmp.attr('dstart') );
            -                }
            -                JC.log( 'dddddd', _date.getDate() );
            -                return _date.getDate();
            -            }
            -        , defaultDate:
            -            function(){
            -                var _p = this, _r = { 
            -                        date: null
            -                        , minvalue: null
            -                        , maxvalue: null
            -                        , enddate: null 
            -                        , multidate: null
            -                    }
            -                    ;
            -                _p.selector() &&
            -                    (
            -                        _r = _p.multiselect() 
            -                            ? _p.defaultMultiselectDate( _r ) 
            -                            : _p.defaultSingleSelectDate( _r )
            -                    );
            -
            -                _r.minvalue = parseISODate( _p.selector().attr('minvalue') );
            -                _r.maxvalue = parseISODate( _p.selector().attr('maxvalue') );
            -
            -                return _r;
            -            }
            -        , defaultSingleSelectDate:
            -            function( _r ){
            -                var _p = this
            -                    , _selector = _p.selector()
            -                    , _tmp
            -                    ;
            -
            -                if( _tmp = parseISODate( _selector.val() ) ) _r.date = _tmp;
            -                else{
            -                    if( _selector.val() && (_tmp = _selector.val().replace( /[^\d]/g, '' ) ).length == 16 ){
            -                        _r.date = parseISODate( _tmp.slice( 0, 8 ) );
            -                        _r.enddate = parseISODate( _tmp.slice( 8 ) );
            -                    }else{
            -                        _tmp = new Date();
            -                        if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){
            -                            _tmp = parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp;
            -                        }
            -                        _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() );
            -                    }
            -                }
            -                return _r;
            -            }
            -        , defaultMultiselectDate:
            -            function( _r ){
            -                var _p = this
            -                    , _selector = Calendar.lastIpt
            -                    , _tmp
            -                    , _multidatear
            -                    , _dstart, _dend
            -                    ;
            -
            -                    if( _selector.val() ){
            -                        //JC.log( 'defaultMultiselectDate:', _p.selector().val(), ', ', _tmp );
            -                        _tmp = _selector.val().trim().replace(/[^\d,]/g, '').split(',');
            -                        _multidatear = [];
            -
            -                        $.each( _tmp, function( _ix, _item ){
            -                            if( _item.length == 16 ){
            -                                _dstart = parseISODate( _item.slice( 0, 8 ) );
            -                                _dend = parseISODate( _item.slice( 8 ) );
            -
            -                                if( !_ix ){
            -                                    _r.date = cloneDate( _dstart );
            -                                    _r.enddate = cloneDate( _dend );
            -                                }
            -                                _multidatear.push( { 'start': _dstart, 'end': _dend } );
            -                            }else if( _item.length == 8 ){
            -                                _dstart = parseISODate( _item.slice( 0, 8 ) );
            -                                _dend = cloneDate( _dstart );
            -
            -                                if( !_ix ){
            -                                    _r.date = cloneDate( _dstart );
            -                                    _r.enddate = cloneDate( _dend );
            -                                }
            -                                _multidatear.push( { 'start': _dstart, 'end': _dend } );
            -                            }
            -                        });
            -                        //alert( _multidatear + ', ' + _selector.val() );
            -
            -                        _r.multidate = _multidatear;
            -
            -                    }else{
            -                        _tmp = new Date();
            -                        if( Calendar.lastIpt && Calendar.lastIpt.is('[defaultdate]') ){
            -                            _tmp = parseISODate( Calendar.lastIpt.attr('defaultdate') ) || _tmp;
            -                        }
            -                        _r.date = new Date( _tmp.getFullYear(), _tmp.getMonth(), _tmp.getDate() );
            -                        _r.enddate = cloneDate( _r.date );
            -                        _r.enddate.setDate( maxDayOfMonth( _r.enddate ) );
            -                        _r.multidate = [];
            -                        _r.multidate.push( {'start': cloneDate( _r.date ), 'end': cloneDate( _r.enddate ) } );
            -                    }
            -                return _r;
            -            }
            -        , layoutDate:
            -            function(){
            -                return this.multiselect() ? this.multiLayoutDate() : this.singleLayoutDate();
            -            }
            -        , singleLayoutDate:
            -            function(){
            -                var _p = this
            -                    , _dateo = _p.defaultDate()
            -                    , _day = this.day()
            -                    , _max;
            -                _dateo.date.setDate( 1 );
            -                _dateo.date.setFullYear( this.year() );
            -                _dateo.date.setMonth( this.month() );
            -                _max = maxDayOfMonth( _dateo.date );
            -                _day > _max && ( _day = _max );
            -                _dateo.date.setDate( _day );
            -                return _dateo;
            -            }
            -        , multiLayoutDate:
            -            function(){
            -                JC.log( 'Calendar.Model multiLayoutDate', new Date().getTime() );
            -                var _p = this
            -                    , _dateo = _p.defaultDate()
            -                    , _year = _p.year()
            -                    , _month = _p.month()
            -                    , _monthSel = _p.layout().find('select.UMonth')
            -                    ;
            -
            -                _dateo.multidate = [];
            -
            -                _p.layout().find('td.cur').each(function(){
            -                    var _sp = $(this);
            -                    var _item = _sp.find('> a[dstart]'), _dstart = new Date(), _dend = new Date();
            -                    _dstart.setTime( _item.attr('dstart') );
            -                    _dend.setTime( _item.attr('dend') );
            -                    _dateo.multidate.push( { 'start': _dstart, 'end': _dend } );
            -                });
            -
            -                _dateo.date.setFullYear( _year );
            -                _dateo.enddate.setFullYear( _year );
            -
            -                if( _monthSel.length ){
            -                    _dateo.date.setMonth( _month );
            -                    _dateo.enddate.setMonth( _month );
            -                }
            -
            -
            -                $.each( _dateo.multidate, function( _ix, _item ){
            -                    _item.start.setFullYear( _year );
            -                    _item.end.setFullYear( _year );
            -                    if( _monthSel.length ){
            -                        _item.start.setMonth( _month );
            -                        _item.end.setMonth( _month );
            -                    }
            -                });
            -
            -                return _dateo;
            -
            -            }
            -        , selectedDate:
            -            function(){
            -                var _r, _tmp, _item;
            -                _tmp = this.layout().find('td.cur');
            -                _tmp.length 
            -                    && !_tmp.hasClass( 'unable' )
            -                    && ( _item = _tmp.find('a[date]') )
            -                    && ( _r = new Date(), _r.setTime( _item.attr('date') ) )
            -                    ;
            -                return _r;
            -            }
            -        , multiselectDate:
            -            function(){
            -                var _r = [];
            -                return _r;
            -            }
            -        , calendarinited:
            -            function(){
            -                var _ipt = this.selector(), _cb = Calendar.layoutInitedCallback, _tmp;
            -                _ipt && _ipt.attr('calendarinited') 
            -                    && ( _tmp = window[ _ipt.attr('calendarinited') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , calendarshow:
            -            function(){
            -                var _ipt = this.selector(), _cb = Calendar.layoutShowCallback, _tmp;
            -                _ipt && _ipt.attr('calendarshow') 
            -                    && ( _tmp = window[ _ipt.attr('calendarshow') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , calendarhide:
            -            function(){
            -                var _ipt = this.selector(), _cb = Calendar.layoutHideCallback, _tmp;
            -                _ipt && _ipt.attr('calendarhide') 
            -                    && ( _tmp = window[ _ipt.attr('calendarhide') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , calendarupdate:
            -            function( _data ){
            -                var _ipt = this.selector(), _cb, _tmp;
            -                _ipt && _ipt.attr('calendarupdate') 
            -                    && ( _tmp = window[ _ipt.attr('calendarupdate') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , calendarclear:
            -            function(){
            -                var _ipt = this.selector(), _cb, _tmp;
            -                _ipt && _ipt.attr('calendarclear') 
            -                    && ( _tmp = window[ _ipt.attr('calendarclear') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , calendarcancel:
            -            function(){
            -                var _ipt = this.selector(), _cb, _tmp;
            -                _ipt && _ipt.attr('calendarcancel') 
            -                    && ( _tmp = window[ _ipt.attr('calendarcancel') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , calendarlayoutchange:
            -            function(){
            -                var _ipt = this.selector(), _cb, _tmp;
            -                _ipt && _ipt.attr('calendarlayoutchange') 
            -                    && ( _tmp = window[ _ipt.attr('calendarlayoutchange') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -        , multiselect:
            -            function(){
            -                var _r;
            -                this.selector().is('[multiselect]')
            -                    && ( _r = parseBool( this.selector().attr('multiselect') ) );
            -                return _r;
            -            }
            -        , calendarupdatemultiselect:
            -            function( _data ){
            -                var _ipt = this.selector(), _cb, _tmp;
            -                _ipt && _ipt.attr('calendarupdatemultiselect') 
            -                    && ( _tmp = window[ _ipt.attr('calendarupdatemultiselect') ] )
            -                    && ( _cb = _tmp );
            -                return _cb;
            -            }
            -
            -        , tpl:
            -            [
            -            '<div id="UXCCalendar" class="UXCCalendar">'
            -            ,'    <div class="UHeader">'
            -            ,'        <select class="UYear"></select>'
            -            ,'        <img class="UImg yearctl" align="absMiddle" usemap="#UXCCalendar_Year" />'
            -            ,'        <map name="UXCCalendar_Year"><area shape="rect" coords="0,0,13,8" href="#" action="up"><area shape="rect" coords="0,10,13,17" href="#" action="down"></map>'
            -            ,'        <select class="UMonth"></select>'
            -            ,'        <img class="UImg monthctl" align="absMiddle" usemap="#UXCCalendar_Month"  />'
            -            ,'        <map name="UXCCalendar_Month"><area shape="rect" coords="0,0,13,8" href="#" action="up"><area shape="rect" coords="0,10,13,17" href="#" action="down"></map>'
            -            ,'    </div>'
            -            ,'    <table class="UTable">'
            -            ,'        <thead>'
            -            ,'            <tr>'
            -            ,'                <th>一</th>'
            -            ,'                <th>二</th>'
            -            ,'                <th>三</th>'
            -            ,'                <th>四</th>'
            -            ,'                <th>五</th>'
            -            ,'                <th>六</th>'
            -            ,'                <th>日</th>'
            -            ,'            </tr>'
            -            ,'        </thead>'
            -            ,'   </table>'
            -            ,'   <table class="UTable UTableBorder">'
            -            ,'        <tbody>'
            -            ,'           <!--<tr>'
            -            ,'                <td class="cur"><a href="#">2</a></td>'
            -            ,'                <td class="unable"><a href="#">2</a></td>'
            -            ,'                <td class="weekend cur"><a href="#">6</a></td>'
            -            ,'                <td class="weekend hover"><a href="#">13</a></td>'
            -            ,'                <td class="weekend other"><a href="#">41</a></td>'
            -            ,'                <td class="weekend other"><a href="#">42</a></td>'
            -            ,'            </tr>-->'
            -            ,'        </tbody>'
            -            ,'    </table>'
            -            ,'    <div class="UFooter">'
            -            ,'        <button type="button" class="UConfirm">确定</button>'
            -            ,'        <button type="button" class="UClear">清空</button>'
            -            ,'        <button type="button" class="UCancel">取消</button>'
            -            ,'    </div>'
            -            ,'</div>'
            -            ].join('')
            -    };
            -    
            -    function View( _model ){
            -        this._model = _model;
            -    }
            -    Calendar.View = View;
            -
            -    
            -    View.prototype = {
            -        init:
            -            function() {
            -                return this;
            -            }
            -
            -        , hide:
            -            function(){
            -                this._model.layout().hide();
            -            }
            -
            -        , show:
            -            function(){
            -                var _dateo = this._model.defaultDate();
            -                JC.log( 'Calendar.View: show', new Date().getTime(), formatISODate( _dateo.date ) );
            -
            -                this._buildLayout( _dateo );
            -                this._buildDone();
            -            }
            -        , updateLayout:
            -            function( _dateo ){
            -                typeof _dateo == 'undefined' && ( _dateo = this._model.layoutDate() );
            -                this._buildLayout( _dateo );
            -                this._buildDone();
            -            }
            -        , updateYear:
            -            function( _offset ){
            -                if( typeof _offset == 'undefined' || _offset == 0 ) return;
            -
            -                this._model.multiselect() 
            -                    ? this.updateMultiYear( _offset )
            -                    : this.updateSingleYear( _offset )
            -                    ;
            -            }
            -        , updateSingleYear:
            -            function( _offset ){
            -                var _dateo = this._model.layoutDate(), _day = _dateo.date.getDate(), _max;
            -                _dateo.date.setDate( 1 );
            -                _dateo.date.setFullYear( _dateo.date.getFullYear() + _offset );
            -                _max = maxDayOfMonth( _dateo.date );
            -                _day > _max && ( _day = _max );
            -                _dateo.date.setDate( _day );
            -                this._buildLayout( _dateo );
            -                this._buildDone();
            -            }
            -        , updateMultiYear:
            -            function( _offset ){
            -                var _dateo = this._model.layoutDate(), _day, _max;
            -
            -                JC.Calendar.updateMultiYear( _dateo.date, _offset );
            -                JC.Calendar.updateMultiYear( _dateo.enddate, _offset );
            -
            -                if( _dateo.multidate ){
            -                    $.each( _dateo.multidate, function( _ix, _item ){
            -                        JC.Calendar.updateMultiYear( _item.start, _offset );
            -                        JC.Calendar.updateMultiYear( _item.end, _offset );
            -                    });
            -                }
            -                this._buildLayout( _dateo );
            -                this._buildDone();
            -            }
            -        , updateMonth:
            -            function( _offset ){
            -                if( typeof _offset == 'undefined' || _offset == 0 ) return;
            -
            -                this._model.multiselect() 
            -                    ? this.updateMultiMonth( _offset )
            -                    : this.updateSingleMonth( _offset )
            -                    ;
            -            }
            -        , updateMultiMonth:
            -            function( _offset ){
            -                var _dateo = this._model.layoutDate(), _day, _max;
            -
            -                JC.Calendar.updateMultiMonth( _dateo.date, _offset );
            -                JC.Calendar.updateMultiMonth( _dateo.enddate, _offset );
            -
            -                if( _dateo.multidate ){
            -                    $.each( _dateo.multidate, function( _ix, _item ){
            -                        JC.Calendar.updateMultiMonth( _item.start, _offset );
            -                        JC.Calendar.updateMultiMonth( _item.end, _offset );
            -                    });
            -                }
            -                this._buildLayout( _dateo );
            -                this._buildDone();
            -            }
            -        , updateSingleMonth:
            -            function( _offset ){
            -                var _dateo = this._model.layoutDate(), _day = _dateo.date.getDate(), _max;
            -                _dateo.date.setDate( 1 );
            -                _dateo.date.setMonth( _dateo.date.getMonth() + _offset );
            -                _max = maxDayOfMonth( _dateo.date );
            -                _day > _max && ( _day = _max );
            -                _dateo.date.setDate( _day );
            -                this._buildLayout( _dateo );
            -                this._buildDone();
            -            }
            -        , updateSelected:
            -            function( _userSelectedItem ){
            -                var _p = this, _date, _tmp;
            -                if( !_userSelectedItem ){
            -                    _date = this._model.selectedDate(); 
            -                }else{
            -                    _userSelectedItem = $( _userSelectedItem );
            -                    _tmp = getJqParent( _userSelectedItem, 'td' );
            -                    if( _tmp && _tmp.hasClass('unable') ) return;
            -                    _date = new Date();
            -                    _date.setTime( _userSelectedItem.attr('date') );
            -                }
            -                if( !_date ) return;
            -
            -                _p._model.selector().val( formatISODate( _date ) );
            -
            -                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'date', _date, _date ] );
            -                Calendar.hide();
            -            }
            -        , updatePosition:
            -            function(){
            -                var _p = this, _ipt = _p._model.selector(), _layout = _p._model.layout();
            -                if( !( _ipt && _layout && _ipt.length && _layout.length ) ) return;
            -                _layout.css( {'left': '-9999px', 'top': '-9999px', 'z-index': ZINDEX_COUNT++ } ).show();
            -                var _lw = _layout.width(), _lh = _layout.height()
            -                    , _iw = _ipt.width(), _ih = _ipt.height(), _ioset = _ipt.offset()
            -                    , _x, _y, _winw = $(window).width(), _winh = $(window).height()
            -                    , _scrtop = $(document).scrollTop()
            -                    ;
            -
            -                _x = _ioset.left; _y = _ioset.top + _ih + 5;
            -
            -                if( ( _y + _lh - _scrtop ) > _winh ){
            -                    JC.log('y overflow');
            -                    _y = _ioset.top - _lh - 3;
            -
            -                    if( _y < _scrtop ) _y = _scrtop;
            -                }
            -
            -                _layout.css( {left: _x+'px', top: _y+'px'} );
            -
            -                JC.log( _lw, _lh, _iw, _ih, _ioset.left, _ioset.top, _winw, _winh );
            -                JC.log( _scrtop, _x, _y );
            -            }
            -        , _buildDone:
            -            function(){
            -                this.updatePosition();
            -                //this._model.selector().blur();
            -                $(this).trigger( 'TriggerEvent', [ Calendar.Model.INITED ] );
            -            }
            -        , _buildLayout:
            -            function( _dateo ){
            -                this._model.layout();
            -                
            -
            -                //JC.log( '_buildBody: \n', JSON.stringify( _dateo ) );
            -
            -                if( !( _dateo && _dateo.date ) ) return;
            -
            -                this._buildHeader( _dateo );
            -                this._buildBody( _dateo );
            -                this._buildFooter( _dateo );
            -            }
            -        , _buildHeader:
            -            function( _dateo ){
            -                var _p = this
            -                    , _layout = _p._model.layout()
            -                    , _ls = []
            -                    , _tmp
            -                    , _selected = _selected = _dateo.date.getFullYear()
            -                    , _startYear = _p._model.startYear( _dateo )
            -                    , _endYear = _p._model.endYear( _dateo )
            -                    ;
            -                JC.log( _startYear, _endYear );
            -                for( var i = _startYear; i <= _endYear; i++ ){
            -                    _ls.push( printf( '<option value="{0}"{1}>{0}</option>', i, i === _selected ? ' selected' : '' ) );
            -                }
            -                $( _ls.join('') ).appendTo( _layout.find('select.UYear').html('') );
            -
            -                $( _layout.find('select.UMonth').val( _dateo.date.getMonth() ) );
            -            }
            -        , _buildBody:
            -            function( _dateo ){
            -                var _p = this, _layout = _p._model.layout();
            -                var _maxday = maxDayOfMonth( _dateo.date ), _weekday = _dateo.date.getDay() || 7
            -                    , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin
            -                    , _tmp, i, _class;
            -
            -                var _beginDate = new Date( _dateo.date.getFullYear(), _dateo.date.getMonth(), 1 );
            -                var _beginWeekday = _beginDate.getDay() || 7;
            -                if( _beginWeekday < 2 ){
            -                    _beginDate.setDate( -( _beginWeekday - 1 + 6 ) );
            -                }else{
            -                    _beginDate.setDate( -( _beginWeekday - 2 ) );
            -                }
            -                var today = new Date();
            -
            -                if( _dateo.maxvalue && !_p._model.currentcanselect() ){
            -                    _dateo.maxvalue.setDate( _dateo.maxvalue.getDate() - 1 );
            -                }
            -
            -                _ls.push('<tr>');
            -                for( i = 1; i <= 42; i++ ){
            -                    _class = [];
            -                    if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend');
            -                    if( !isSameMonth( _dateo.date, _beginDate ) ) _class.push( 'other' );
            -                    if( _dateo.minvalue && _beginDate.getTime() < _dateo.minvalue.getTime() ) 
            -                        _class.push( 'unable' );
            -                    if( _dateo.maxvalue && _beginDate.getTime() > _dateo.maxvalue.getTime() ) 
            -                        _class.push( 'unable' );
            -
            -                    if( isSameDay( _beginDate, today ) ) _class.push( 'today' );
            -                    if( isSameDay( _dateo.date, _beginDate ) ) _class.push( 'cur' );
            -
            -                    _ls.push( '<td class="', _class.join(' '),'">'
            -                            ,'<a href="javascript:" date="', _beginDate.getTime(),'" title="'+formatISODate(_beginDate)+'" >'
            -                            , _beginDate.getDate(), '</a></td>' );
            -                    _beginDate.setDate( _beginDate.getDate() + 1 );
            -                    if( i % 7 === 0 && i != 42 ) _ls.push( '</tr><tr>' );
            -                }
            -                _ls.push('</tr>');
            -                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            -            }
            -        , _buildFooter:
            -            function( _dateo ){
            -            }
            -    };
            -    /**
            -     * 捕获用户更改年份 
            -     * <p>监听 年份下拉框</p>
            -     * @event year change
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar select.UYear, body > div.UXCCalendar select.UMonth', 'change', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateLayout();
            -    });
            -    /**
            -     * 捕获用户更改年份 
            -     * <p>监听 下一年按钮</p>
            -     * @event next year
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UNextYear', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateYear( 1 );
            -    });
            -    /**
            -     * 捕获用户更改年份 
            -     * <p>监听 上一年按钮</p>
            -     * @event previous year
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UPreYear', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateYear( -1 );
            -    });
            -    /**
            -     * 增加或者减少一年
            -     * <p>监听 年份map</p>
            -     * @event   year map click
            -     * @private
            -     */
            -    $(document).delegate( "map[name=UXCCalendar_Year] area" , 'click', function( $evt ){
            -        $evt.preventDefault();
            -        var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt );
            -        _p.attr("action") && _ins
            -            && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateYear( 1 )
            -                , _p.attr("action").toLowerCase() == 'down' && _ins.updateYear( -1 )
            -               );
            -    });
            -    /**
            -     * 增加或者减少一个月
            -     * <p>监听 月份map</p>
            -     * @event   month map click
            -     * @private
            -     */
            -    $(document).delegate( "map[name=UXCCalendar_Month] area" , 'click', function( $evt ){
            -        $evt.preventDefault();
            -        var _p = $(this), _ins = Calendar.getInstance( Calendar.lastIpt );
            -        _p.attr("action") && _ins
            -            && ( _p.attr("action").toLowerCase() == 'up' && _ins.updateMonth( 1 )
            -                , _p.attr("action").toLowerCase() == 'down' && _ins.updateMonth( -1 )
            -               );
            -    });
            -    /**
            -     * 捕获用户更改月份 
            -     * <p>监听 下一月按钮</p>
            -     * @event next year
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UNextMonth', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateMonth( 1 );
            -    });
            -    /**
            -     * 捕获用户更改月份
            -     * <p>监听 上一月按钮</p>
            -     * @event previous year
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UPreMonth', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateMonth( -1 );
            -    });
            -
            -    /**
            -     * 日期点击事件
            -     * @event date click
            -     * @private
            -     */
            -    $(document).delegate( 'div.UXCCalendar table a[date], div.UXCCalendar table a[dstart]', 'click', function( $evt ){
            -        $evt.preventDefault();
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateSelected( $( this ) );
            -        /*
            -        Calendar._triggerUpdate( [ 'date', _d, _d ] );
            -        */
            -    });
            -    /**
            -     * 选择当前日期
            -     * <p>监听确定按钮</p>
            -     * @event   confirm click
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UConfirm', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).updateSelected();
            -    });
            -    /**
            -     * 清除文本框内容
            -     * <p>监听 清空按钮</p>
            -     * @event   clear click
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UClear', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).clear();
            -    });
            -    /**
            -     * 取消日历组件, 相当于隐藏
            -     * <p>监听 取消按钮</p>
            -     * @event cancel click
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar button.UCancel', 'click', function( $evt ){
            -        Calendar.getInstance( Calendar.lastIpt )
            -            && Calendar.getInstance( Calendar.lastIpt ).cancel();
            -    });
            -    /**
            -     * 日历组件按钮点击事件
            -     * @event calendar button click
            -     * @private
            -     */
            -    $(document).delegate( 'input.UXCCalendar_btn', 'click', function($evt){
            -        var _p = $(this), _tmp;
            -        if( !_p.data( Calendar.Model.INPUT ) ){
            -            _tmp = _p.prev( 'input[type=text], textarea' );
            -            _tmp.length && _p.data( Calendar.Model.INPUT, _tmp );
            -        }
            -        _p.data( Calendar.Model.INPUT ) 
            -            && !_p.data( Calendar.Model.INPUT ).is('[disabled]')
            -            && Calendar.pickDate( _p.data( Calendar.Model.INPUT ) );
            -    });
            -    /**
            -     * 日历组件点击事件, 阻止冒泡, 防止被 document click事件隐藏
            -     * @event UXCCalendar click
            -     * @private
            -     */
            -    $(document).delegate( 'body > div.UXCCalendar', 'click', function( $evt ){
            -        $evt.stopPropagation();
            -    });
            -
            -    /**
            -     * DOM 加载完毕后, 初始化日历组件相关事件
            -     * @event   dom ready
            -     * @private
            -     */
            -    $(document).ready( function($evt){
            -        /**
            -         * 延迟200毫秒初始化页面的所有日历控件
            -         * 之所以要延迟是可以让用户自己设置是否需要自动初始化
            -         */
            -        setTimeout( function( $evt ){
            -            if( !Calendar.autoInit ) return;
            -            Calendar.initTrigger( $(document) );
            -        }, 200 );
            -        /**
            -         * 监听窗口滚动和改变大小, 实时变更日历组件显示位置
            -         * @event  window scroll, window resize
            -         * @private
            -         */
            -        $(window).on('scroll resize', function($evt){
            -            var _ins = Calendar.getInstance( Calendar.lastIpt );
            -                _ins && _ins.visible() && _ins.updatePosition();
            -        });
            -        /**
            -         * dom 点击时, 检查事件源是否为日历组件对象, 如果不是则会隐藏日历组件
            -         * @event dom click
            -         * @private
            -         */
            -        var CLICK_HIDE_TIMEOUT = null;
            -        $(document).on('click', function($evt){
            -            var _src = $evt.target || $evt.srcElement;
            -
            -            if( Calendar.domClickFilter ) if( Calendar.domClickFilter( $(_src) ) === false ) return;
            -
            -            if( Calendar.isCalendar($evt.target||$evt.targetElement) ) return;
            -
            -            if( _src && ( _src.nodeName.toLowerCase() != 'input'
            -                    && _src.nodeName.toLowerCase() != 'button' 
            -                    && _src.nodeName.toLowerCase() != 'textarea' 
            -                    ) ){
            -                Calendar.hide(); return;
            -            }
            -
            -            CLICK_HIDE_TIMEOUT && clearTimeout( CLICK_HIDE_TIMEOUT );
            -
            -            CLICK_HIDE_TIMEOUT =
            -                setTimeout( function(){
            -                    if( Calendar.lastIpt && Calendar.lastIpt.length && _src == Calendar.lastIpt[0] ) return;
            -                    Calendar.hide();
            -                }, 100);
            -        });
            -    });
            -    /**
            -     * 日历组件文本框获得焦点
            -     * @event input focus
            -     * @private
            -     */
            -    $(document).delegate( [ 'input[datatype=season]', 'input[datatype=month]', 'input[datatype=week]'
            -            , 'input[datatype=date]', 'input[datatype=daterange]', 'input[multidate], input[datatype=monthday]' ].join(), 'focus' , function($evt){
            -            Calendar.pickDate( this );
            -    });
            -    $(document).delegate( [ 'button[datatype=season]', 'button[datatype=month]', 'button[datatype=week]'
            -            , 'button[datatype=date]', 'button[datatype=daterange]', 'button[multidate], button[datatype=monthday]' ].join(), 'click' , function($evt){
            -            Calendar.pickDate( this );
            -    });
            -    $(document).delegate( [ 'textarea[datatype=season]', 'textarea[datatype=month]', 'textarea[datatype=week]'
            -            , 'textarea[datatype=date]', 'textarea[datatype=daterange]', 'textarea[multidate], textarea[datatype=monthday]' ].join(), 'click' , function($evt){
            -            Calendar.pickDate( this );
            -    });
            -}(jQuery));
            -;
            -
            -;(function($){
            -    /**
            -     * 自定义周弹框的模板HTML
            -     * @for         JC.Calendar
            -     * @property    weekTpl
            -     * @type        string
            -     * @default     empty
            -     * @static
            -     */
            -    JC.Calendar.weekTpl = '';
            -    /**
            -     * 自定义周日历每周的起始日期 
            -     * <br /> 0 - 6, 0=周日, 1=周一
            -     * @for         JC.Calendar
            -     * @property    weekDayOffset
            -     * @static
            -     * @type    int
            -     * @default 1
            -     */
            -    JC.Calendar.weekDayOffset = 0;
            -
            -    function WeekModel( _selector ){
            -        this._selector = _selector;
            -    }
            -    JC.Calendar.WeekModel = WeekModel;
            -    
            -    function WeekView( _model ){
            -        this._model = _model;
            -    }
            -    JC.Calendar.WeekView = WeekView;
            -
            -    JC.Calendar.clone( WeekModel, WeekView );
            -
            -    WeekModel.prototype.layout = 
            -        function(){
            -            var _r = $('#UXCCalendar_week');
            -
            -            if( !_r.length ){
            -                _r = $( JC.Calendar.weekTpl || this.tpl ).hide();
            -                _r.attr('id', 'UXCCalendar_week').hide().appendTo( document.body );
            -              }
            -            return _r;
            -        };
            -
            -    WeekModel.prototype.tpl =
            -        [
            -        '<div id="UXCCalendar_week" class="UXCCalendar UXCCalendar_week" >'
            -        ,'    <div class="UHeader">'
            -        ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            -        ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            -        ,'        <select class="UYear" style=""></select>'
            -        ,'    </div>'
            -        ,'    <table class="UTable UTableBorder">'
            -        ,'        <tbody></tbody>'
            -        ,'    </table>'
            -        ,'    <div class="UFooter">'
            -        ,'        <button type="button" class="UConfirm">确定</button>'
            -        ,'        <button type="button" class="UClear">清空</button>'
            -        ,'        <button type="button" class="UCancel">取消</button>'
            -        ,'    </div>'
            -        ,'</div>'
            -        ].join('');
            -
            -    WeekModel.prototype.month = 
            -        function(){
            -            var _r = 0, _tmp, _date = new Date();
            -            ( _tmp = this.layout().find('td.cur a[dstart]') ).length
            -                && ( _date = new Date() )
            -                && (
            -                        _date.setTime( _tmp.attr('dstart') )
            -                   )
            -                ;
            -            _r = _date.getMonth();
            -            return _r;
            -        };
            -
            -    WeekModel.prototype.selectedDate =
            -        function(){
            -            var _r, _tmp, _item;
            -            _tmp = this.layout().find('td.cur');
            -            _tmp.length 
            -                && !_tmp.hasClass( 'unable' )
            -                && ( _item = _tmp.find('a[dstart]') )
            -                && ( 
            -                        _r = { 'start': new Date(), 'end': new Date() }
            -                        , _r.start.setTime( _item.attr('dstart') ) 
            -                        , _r.end.setTime( _item.attr('dend') ) 
            -                    )
            -                ;
            -            return _r;
            -        };
            -
            -    WeekModel.prototype.singleLayoutDate = 
            -        function(){
            -            var _p = this
            -                , _dateo = _p.defaultDate()
            -                , _day = this.day()
            -                , _max
            -                , _curWeek = _p.layout().find('td.cur > a[week]')
            -                ;
            -            _dateo.date.setDate( 1 );
            -            _dateo.date.setFullYear( this.year() );
            -            _dateo.date.setMonth( this.month() );
            -            _max = maxDayOfMonth( _dateo.date );
            -            _day > _max && ( _day = _max );
            -            _dateo.date.setDate( _day );
            -
            -            _curWeek.length && ( _dateo.curweek = parseInt( _curWeek.attr('week'), 10 ) );
            -            JC.log( 'WeekModel.singleLayoutDate:', _curWeek.length, _dateo.curweek );
            -
            -            return _dateo;
            -        };
            -
            -    WeekView.prototype._buildBody =
            -        function( _dateo ){
            -            var _p = this
            -                , _date = _dateo.date
            -                , _layout = _p._model.layout()
            -                , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime()
            -                , weeks = weekOfYear( _date.getFullYear(), JC.Calendar.weekDayOffset )
            -                , nextYearWeeks = weekOfYear( _date.getFullYear() + 1, JC.Calendar.weekDayOffset )
            -                , nextCount = 0
            -                , _ls = [], _class, _data, _title, _sdate, _edate, _year = _date.getFullYear()
            -                , _rows = Math.ceil( weeks.length / 8 )
            -                , ipt = JC.Calendar.lastIpt
            -                , currentcanselect = parseBool( ipt.attr('currentcanselect') )
            -                ;
            -
            -            if( _dateo.maxvalue && currentcanselect ){
            -                var _wd = _dateo.maxvalue.getDay();
            -                if( _wd > 0 ) {
            -                    _dateo.maxvalue.setDate( _dateo.maxvalue.getDate() + ( 7 - _wd ) );
            -                }
            -            }
            -
            -            _ls.push('<tr>');
            -            for( i = 1, j = _rows * 8; i <= j; i++ ){
            -                _data = weeks[ i - 1];
            -                if( !_data ) {
            -                    _data = nextYearWeeks[ nextCount++ ];
            -                    _year = _date.getFullYear() + 1;
            -                }
            -                _sdate = new Date(); _edate = new Date();
            -                _sdate.setTime( _data.start ); _edate.setTime( _data.end );
            -
            -                _title = printf( "{0}年 第{1}周\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})"
            -                            , _year
            -                            , JC.Calendar.getCnNum( _data.week )
            -                            , formatISODate( _sdate )
            -                            , formatISODate( _edate )
            -                            , JC.Calendar.cnWeek.charAt( _sdate.getDay() % 7 )
            -                            , JC.Calendar.cnWeek.charAt( _edate.getDay() % 7 )
            -                            );
            -
            -                _class = [];
            -
            -                if( _dateo.minvalue && _sdate.getTime() < _dateo.minvalue.getTime() ) 
            -                    _class.push( 'unable' );
            -                if( _dateo.maxvalue && _edate.getTime() > _dateo.maxvalue.getTime() ){
            -                    _class.push( 'unable' );
            -                }
            -
            -                if( _dateo.curweek ){
            -                    if( _data.week == _dateo.curweek 
            -                        && _date.getFullYear() == _sdate.getFullYear() 
            -                        ) _class.push( 'cur' );
            -                }else{
            -                    if( _date.getTime() >= _sdate.getTime() && _date.getTime() <= _edate.getTime() ) _class.push( 'cur' );
            -                }
            -
            -                if( today >= _sdate.getTime() && today <= _edate.getTime() ) _class.push( 'today' );
            -
            -                _ls.push( printf( '<td class="{0}"><a href="javascript:" title="{2}"'+
            -                                ' dstart="{3}" dend="{4}" week="{1}" date="{5}" >{1}</a></td>'
            -                            , _class.join(' ')
            -                            , _data.week 
            -                            , _title
            -                            , _sdate.getTime()
            -                            , _edate.getTime()
            -                            , _dateo.date.getTime()
            -                        ));
            -                if( i % 8 === 0 && i != j ) _ls.push( '</tr><tr>' );
            -            }
            -            _ls.push('</tr>'); 
            -
            -            _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            -        };
            -
            -    WeekView.prototype.updateSelected = 
            -        function( _userSelectedItem ){
            -            var _p = this, _dstart, _dend, _tmp;
            -            if( !_userSelectedItem ){
            -                _tmp = this._model.selectedDate();
            -                _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            -            }else{
            -                _userSelectedItem = $( _userSelectedItem );
            -                _tmp = getJqParent( _userSelectedItem, 'td' );
            -                if( _tmp && _tmp.hasClass('unable') ) return;
            -                _dstart = new Date(); _dend = new Date();
            -                _dstart.setTime( _userSelectedItem.attr('dstart') );
            -                _dend.setTime( _userSelectedItem.attr('dend') );
            -            }
            -            if( !( _dstart && _dend ) ) return;
            -
            -            _p._model.selector().val( printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ) );
            -            $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'week', _dstart, _dend ] );
            -
            -            JC.Calendar.hide();
            -        };
            -    /**
            -     * 取一年中所有的星期, 及其开始结束日期
            -     * @method  weekOfYear
            -     * @static
            -     * @param   {int}   _year
            -     * @param   {int}   _dayOffset  每周的默认开始为周几, 默认0(周一)
            -     * @return  Array
            -     */
            -    function weekOfYear( _year, _dayOffset ){
            -        var _r = [], _tmp, _count = 1, _dayOffset = _dayOffset || 0
            -            , _year = parseInt( _year, 10 )
            -            , _d = new Date( _year, 0, 1 );
            -        /**
            -         * 元旦开始的第一个星期一开始的一周为政治经济上的第一周
            -         */
            -         _d.getDay() > 1 && _d.setDate( _d.getDate() - _d.getDay() + 7 );
            -
            -         _d.getDay() === 0 && _d.setDate( _d.getDate() + 1 );
            -
            -         _dayOffset > 0 && ( _dayOffset = (new Date( 2000, 1, 2 ) - new Date( 2000, 1, 1 )) * _dayOffset );
            -
            -        while( _d.getFullYear() <= _year ){
            -            _tmp = { 'week': _count++, 'start': null, 'end': null };
            -            _tmp.start = _d.getTime() + _dayOffset;
            -            _d.setDate( _d.getDate() + 6 );
            -            _tmp.end = _d.getTime() + _dayOffset;
            -            _d.setDate( _d.getDate() + 1 );
            -            if( _d.getFullYear() > _year ) {
            -                _d = new Date( _d.getFullYear(), 0, 1 );
            -                if( _d.getDay() < 2 ) break;
            -             }
            -            _r.push( _tmp );
            +;(function(define, _win) { 'use strict'; 
            +    define( [ 'JC.Calendar.date', 'JC.Calendar.week', 'JC.Calendar.month'
            +                , 'JC.Calendar.season', 'JC.Calendar.year', 'JC.Calendar.monthday'
            +            ], function(){
            +    /**
            +     * �����ж���Ϊ���������� JC 0.1
            +     * ʹ�� requirejs ����Ŀ�����Ƴ������жϴ���
            +     */
            +    JC.use 
            +        && JC.PATH
            +        && JC.use([ 
            +                JC.PATH + 'comps/Calendar/Calendar.date.js'
            +                , JC.PATH + 'comps/Calendar/Calendar.week.js' 
            +                , JC.PATH + 'comps/Calendar/Calendar.month.js' 
            +                , JC.PATH + 'comps/Calendar/Calendar.season.js' 
            +                , JC.PATH + 'comps/Calendar/Calendar.year.js' 
            +                , JC.PATH + 'comps/Calendar/Calendar.monthday.js' 
            +            ].join())
            +        ;
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
                     }
            -        return _r;
            -    }
            -}(jQuery));
            -;
            -
            -;(function($){
            -    /**
            -     * 自定义月份弹框的模板HTML
            -     * @for         JC.Calendar
            -     * @property    monthTpl
            -     * @type        string
            -     * @default     empty
            -     * @static
            -     */
            -    JC.Calendar.monthTpl = '';
            -
            -    function MonthModel( _selector ){
            -        this._selector = _selector;
            -    }
            -    JC.Calendar.MonthModel = MonthModel;
            -    
            -    function MonthView( _model ){
            -        this._model = _model;
            -    }
            -    JC.Calendar.MonthView = MonthView;
            -
            -    JC.Calendar.clone( MonthModel, MonthView );
            -
            -    MonthModel.prototype.layout = 
            -        function(){
            -            var _r = $('#UXCCalendar_month');
            -
            -            if( !_r.length ){
            -                _r = $( JC.Calendar.monthTpl || this.tpl ).hide();
            -                _r.attr('id', 'UXCCalendar_month').hide().appendTo( document.body );
            -             }
            -            return _r;
            -        };
            -
            -    MonthModel.prototype.tpl =
            -        [
            -        '<div id="UXCCalendar_month" class="UXCCalendar UXCCalendar_week UXCCalendar_month" >'
            -        ,'    <div class="UHeader">'
            -        ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            -        ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            -        ,'        <select class="UYear" style=""></select>'
            -        ,'    </div>'
            -        ,'    <table class="UTable UTableBorder">'
            -        ,'        <tbody></tbody>'
            -        ,'    </table>'
            -        ,'    <div class="UFooter">'
            -        ,'        <button type="button" class="UConfirm">确定</button>'
            -        ,'        <button type="button" class="UClear">清空</button>'
            -        ,'        <button type="button" class="UCancel">取消</button>'
            -        ,'    </div>'
            -        ,'</div>'
            -        ].join('');
            -
            -    MonthModel.prototype.month = 
            -        function(){
            -            var _r = 0, _tmp, _date;
            -            ( _tmp = this.layout().find('td.cur a[dstart]') ).length
            -                && ( _date = new Date() )
            -                && (
            -                        _date.setTime( _tmp.attr('dstart') )
            -                        , _r = _date.getMonth()
            -                   )
            -                ;
            -            return _r;
            -        };
            -
            -    MonthModel.prototype.selectedDate =
            -        function(){
            -            var _r, _tmp, _item;
            -            _tmp = this.layout().find('td.cur');
            -            _tmp.length 
            -                && !_tmp.hasClass( 'unable' )
            -                && ( _item = _tmp.find('a[dstart]') )
            -                && ( 
            -                        _r = { 'start': new Date(), 'end': new Date() }
            -                        , _r.start.setTime( _item.attr('dstart') ) 
            -                        , _r.end.setTime( _item.attr('dend') ) 
            -                    )
            -                ;
            -            return _r;
            -        };
            -
            -    MonthView.prototype._buildBody =
            -        function( _dateo ){
            -            var _p = this
            -                , _date = _dateo.date
            -                , _layout = _p._model.layout()
            -                , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime()
            -                , nextCount = 0
            -                , _ls = [], _class, _data, _title, _dstart, _dend, _year = _date.getFullYear()
            -                , _rows = 4
            -                , ipt = JC.Calendar.lastIpt
            -                , currentcanselect = parseBool( ipt.attr('currentcanselect') )
            -                , _tmpMultidate = _dateo.multidate ? _dateo.multidate.slice() : null
            -                ;
            -
            -                if( _dateo.maxvalue && currentcanselect ){
            -                    _dateo.maxvalue.setDate( maxDayOfMonth( _dateo.maxvalue ) );
            -                }
            -
            -                _ls.push('<tr>');
            -                for( i = 1, j = 12; i <= j; i++ ){
            -                    _dstart = new Date( _year, i - 1, 1 ); 
            -                    _dend = new Date( _year, i - 1, maxDayOfMonth( _dstart ) );
            -
            -                    _title = printf( "{0}年 {1}月<br/>开始日期: {2} (周{4})<br />结束日期: {3} (周{5})"
            -                                , _year
            -                                , JC.Calendar.getCnNum( i )
            -                                , formatISODate( _dstart )
            -                                , formatISODate( _dend )
            -                                , JC.Calendar.cnWeek.charAt( _dstart.getDay() % 7 )
            -                                , JC.Calendar.cnWeek.charAt( _dend.getDay() % 7 )
            -                                );
            -
            -                    _class = [];
            -
            -                    if( _dateo.minvalue && _dstart.getTime() < _dateo.minvalue.getTime() ) 
            -                        _class.push( 'unable' );
            -                    if( _dateo.maxvalue && _dend.getTime() > _dateo.maxvalue.getTime() ){
            -                        _class.push( 'unable' );
            -                    }
            -
            -                    if( _tmpMultidate ){
            -                        //JC.log( '_tmpMultidate.length:', _tmpMultidate.length );
            -                        $.each( _tmpMultidate, function( _ix, _item ){
            -                            //JC.log( _dstart.getTime(), _item.start.getTime(), _item.end.getTime() );
            -                            if( _dstart.getTime() >= _item.start.getTime() 
            -                              && _dstart.getTime() <= _item.end.getTime() ){
            -                                _class.push( 'cur' );
            -                                _tmpMultidate.splice( _ix, 1 );
            -                                //JC.log( _tmpMultidate.length );
            -                                return false;
            -                            }
            -                        });
            -                    }else{
            -                        if( _date.getTime() >= _dstart.getTime() 
            -                                && _date.getTime() <= _dend.getTime() ) _class.push( 'cur' );
            -                    }
            -                    if( today >= _dstart.getTime() && today <= _dend.getTime() ) _class.push( 'today' );
            -
            -                    _cnUnit = JC.Calendar.cnUnit.charAt( i % 10 );
            -                    i > 10 && ( _cnUnit = "十" + _cnUnit );
            -
            -                    _ls.push( printf( '<td class="{0}"><a href="javascript:" title="{1}"'+
            -                                    ' dstart="{3}" dend="{4}" month="{5}" >{2}月</a></td>'
            -                                , _class.join(' ')
            -                                , _title
            -                                , _cnUnit
            -                                , _dstart.getTime()
            -                                , _dend.getTime()
            -                                , i
            -                            ));
            -                    if( i % 3 === 0 && i != j ) _ls.push( '</tr><tr>' );
            -                }
            -                _ls.push('</tr>'); 
            - 
            -                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            -        };
            -
            -    MonthModel.prototype.multiselectDate =
            -        function(){
            -            var _p = this, _r = [], _sp, _item, _dstart, _dend;
            -            _p.layout().find('td.cur').each( function(){
            -                _sp = $(this); _item = _sp.find( '> a[dstart]' );
            -                if( _sp.hasClass( 'unable' ) ) return;
            -                _dstart = new Date(); _dend = new Date();
            -                _dstart.setTime( _item.attr('dstart') );
            -                _dend.setTime( _item.attr('dend') );
            -                _r.push( { 'start': _dstart, 'end': _dend } );
            -            });
            -            return _r;
            -        };
            -
            -    MonthView.prototype.updateSelected = 
            -        function( _userSelectedItem ){
            -            var _p = this, _dstart, _dend, _tmp, _text, _ar;
            -            if( !_userSelectedItem ){
            -                if( _p._model.multiselect() ){
            -                    _tmp = this._model.multiselectDate();
            -                    if( !_tmp.length ) return;
            -                    _ar = [];
            -                    $.each( _tmp, function( _ix, _item ){
            -                        _ar.push( printf( '{0} 至 {1}', formatISODate( _item.start ), formatISODate( _item.end ) ) );
            -                    });
            -                    _text = _ar.join(',');
            -                }else{
            -                    _tmp = this._model.selectedDate();
            -                    _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            -
            -                    _dstart && _dend 
            -                        && ( _text = printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ) );
            -                }
            -            }else{
            -                _userSelectedItem = $( _userSelectedItem );
            -                _tmp = getJqParent( _userSelectedItem, 'td' );
            -                if( _tmp && _tmp.hasClass('unable') ) return;
            -
            -                if( _p._model.multiselect() ){
            -                    _tmp.toggleClass('cur');
            -                    return;
            -                }
            -                _dstart = new Date(); _dend = new Date();
            -                _dstart.setTime( _userSelectedItem.attr('dstart') );
            -                _dend.setTime( _userSelectedItem.attr('dend') );
            -
            -                _text = printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) );
            -            }
            -
            -            if( !_text ) return;
            -
            -            _p._model.selector().val( _text );
            -            $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'month', _dstart, _dend ] );
            -
            -            JC.Calendar.hide();
            -        };
            -
            -}(jQuery));
            -;
            -
            -;(function($){
            -    /**
            -     * 自定义周弹框的模板HTML
            -     * @for         JC.Calendar
            -     * @property    seasonTpl
            -     * @type        string
            -     * @default     empty
            -     * @static
            -     */
            -    JC.Calendar.seasonTpl = '';
            -
            -    function SeasonModel( _selector ){
            -        this._selector = _selector;
            -    }
            -    JC.Calendar.SeasonModel = SeasonModel;
            -    
            -    function SeasonView( _model ){
            -        this._model = _model;
            -    }
            -    JC.Calendar.SeasonView = SeasonView;
            -
            -    JC.Calendar.clone( SeasonModel, SeasonView );
            -
            -    SeasonModel.prototype.layout = 
            -        function(){
            -            var _r = $('#UXCCalendar_season');
            -
            -            if( !_r.length ){
            -                _r = $( JC.Calendar.seasonTpl || this.tpl ).hide();
            -                _r.attr('id', 'UXCCalendar_season').hide().appendTo( document.body );
            -             }
            -            return _r;
            -        };
            -
            -    SeasonModel.prototype.tpl =
            -        [
            -        '<div id="UXCCalendar_season" class="UXCCalendar UXCCalendar_week UXCCalendar_season" >'
            -        ,'    <div class="UHeader">'
            -        ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            -        ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            -        ,'        <select class="UYear" style=""></select>'
            -        ,'    </div>'
            -        ,'    <table class="UTable UTableBorder">'
            -        ,'        <tbody></tbody>'
            -        ,'    </table>'
            -        ,'    <div class="UFooter">'
            -        ,'        <button type="button" class="UConfirm">确定</button>'
            -        ,'        <button type="button" class="UClear">清空</button>'
            -        ,'        <button type="button" class="UCancel">取消</button>'
            -        ,'    </div>'
            -        ,'</div>'
            -        ].join('');
            -
            -    SeasonModel.prototype.month = 
            -        function(){
            -            var _r = 0, _tmp, _date;
            -            ( _tmp = this.layout().find('td.cur a[dstart]') ).length
            -                && ( _date = new Date() )
            -                && (
            -                        _date.setTime( _tmp.attr('dstart') )
            -                        , _r = _date.getMonth()
            -                   )
            -                ;
            -            return _r;
            -        };
            -
            -    SeasonModel.prototype.selectedDate =
            -        function(){
            -            var _r, _tmp, _item;
            -            _tmp = this.layout().find('td.cur');
            -            _tmp.length 
            -                && !_tmp.hasClass( 'unable' )
            -                && ( _item = _tmp.find('a[dstart]') )
            -                && ( 
            -                        _r = { 'start': new Date(), 'end': new Date() }
            -                        , _r.start.setTime( _item.attr('dstart') ) 
            -                        , _r.end.setTime( _item.attr('dend') ) 
            -                    )
            -                ;
            -            return _r;
            -        };
            -
            -    SeasonView.prototype._buildBody =
            -        function( _dateo ){
            -            var _p = this
            -                , _date = _dateo.date
            -                , _layout = _p._model.layout()
            -                , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime()
            -                , nextCount = 0
            -                , _ls = [], _class, _data, _title, _sdate, _edate, _year = _date.getFullYear()
            -                , _rows = 4
            -                , ipt = JC.Calendar.lastIpt
            -                , currentcanselect = parseBool( ipt.attr('currentcanselect') )
            -                ;
            -
            -                if( _dateo.maxvalue && currentcanselect ){
            -                    var _m = _dateo.maxvalue.getMonth() + 1, _md;
            -
            -                    if( _m % 3 !== 0 ){
            -                        _dateo.maxvalue.setDate( 1 );
            -                        _dateo.maxvalue.setMonth( _m + ( 3 - ( _m % 3 ) - 1 ) );
            -                    }
            -                    _dateo.maxvalue.setDate( maxDayOfMonth( _dateo.maxvalue ) );
            -                }
            -
            -                _ls.push('<tr>');
            -                for( i = 1, j = 4; i <= j; i++ ){
            -                    _sdate = new Date( _year, i * 3 - 3, 1 ); 
            -                    _edate = new Date( _year, i * 3 - 1, 1 );
            -                    _edate.setDate( maxDayOfMonth( _edate ) );
            -
            -                    _cnUnit = JC.Calendar.cnUnit.charAt( i % 10 );
            -                    i > 10 && ( _cnUnit = "十" + _cnUnit );
            -
            -                    _title = printf( "{0}年 第{1}季度<br/>开始日期: {2} (周{4})<br />结束日期: {3} (周{5})"
            -                                , _year
            -                                , JC.Calendar.getCnNum( i )
            -                                , formatISODate( _sdate )
            -                                , formatISODate( _edate )
            -                                , JC.Calendar.cnWeek.charAt( _sdate.getDay() % 7 )
            -                                , JC.Calendar.cnWeek.charAt( _edate.getDay() % 7 )
            -                                );
            -
            -                    _class = [];
            -
            -                    if( _dateo.minvalue && _sdate.getTime() < _dateo.minvalue.getTime() ) 
            -                        _class.push( 'unable' );
            -                    if( _dateo.maxvalue && _edate.getTime() > _dateo.maxvalue.getTime() ){
            -                        _class.push( 'unable' );
            -                    }
            -
            -                    if( _date.getTime() >= _sdate.getTime() && _date.getTime() <= _edate.getTime() ) _class.push( 'cur' );
            -                    if( today >= _sdate.getTime() && today <= _edate.getTime() ) _class.push( 'today' );
            -
            -
            -                    _ls.push( printf( '<td class="{0}"><a href="javascript:" title="{1}"'+
            -                                    ' dstart="{3}" dend="{4}" month="{5}" >{2}季度</a></td>'
            -                                , _class.join(' ')
            -                                , _title
            -                                , _cnUnit
            -                                , _sdate.getTime()
            -                                , _edate.getTime()
            -                                , i
            -                            ));
            -                    if( i % 2 === 0 && i != j ) _ls.push( '</tr><tr>' );
            -                }
            -                _ls.push('</tr>'); 
            - 
            -                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            -        };
            -
            -    SeasonView.prototype.updateSelected = 
            -        function( _userSelectedItem ){
            -            var _p = this, _dstart, _dend, _tmp;
            -            if( !_userSelectedItem ){
            -                _tmp = this._model.selectedDate();
            -                _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            -            }else{
            -                _userSelectedItem = $( _userSelectedItem );
            -                _tmp = getJqParent( _userSelectedItem, 'td' );
            -                if( _tmp && _tmp.hasClass('unable') ) return;
            -                _dstart = new Date(); _dend = new Date();
            -                _dstart.setTime( _userSelectedItem.attr('dstart') );
            -                _dend.setTime( _userSelectedItem.attr('dend') );
            -            }
            -            if( !( _dstart && _dend ) ) return;
            -
            -            _p._model.selector().val( printf( '{0} 至 {1}', formatISODate( _dstart ), formatISODate( _dend ) ) );
            -            $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'season', _dstart, _dend ] );
            -
            -            JC.Calendar.hide();
            -        };
            -
            -}(jQuery));
            -;
            -
            -;(function($){
            -    /**
            -     * 多选日期弹框的模板HTML
            -     * @for         JC.Calendar
            -     * @property    monthdayTpl
            -     * @type        string
            -     * @default     empty
            -     * @static
            -     */
            -    JC.Calendar.monthdayTpl = '';
            -    /**
            -     * 多先日期弹框标题末尾的附加字样
            -     * @for         JC.Calendar
            -     * @property    monthdayHeadAppendText
            -     * @type        string
            -     * @default     empty
            -     * @static
            -     */
            -    JC.Calendar.monthdayHeadAppendText = '';
            -
            -    function MonthDayModel( _selector ){
            -        this._selector = _selector;
            -        
            -    }
            -    JC.Calendar.MonthDayModel = MonthDayModel;
            -    
            -    function MonthDayView( _model ){
            -        this._model = _model;
            -		
            -    }
            -    JC.Calendar.MonthDayView = MonthDayView;
            -
            -    JC.Calendar.clone( MonthDayModel, MonthDayView );
            -
            -    MonthDayView.prototype.init =
            -        function(){
            -            var _p = this;
            -
            -            $(_p).on('MonthDayToggle', function( _evt, _item ){
            -                var _data = _p._model.findItemByTimestamp( _item.attr('dstart')  );
            -                if( _data.atd.hasClass('unable') ) return;
            -                //JC.log( 'MonthDayView: MonthDayToggle', _item.attr('dstart'), _data.atd.hasClass( 'cur' ) );
            -                _data.input.prop( 'checked', _data.atd.hasClass( 'cur' )  );
            -                _p._model.fixCheckall();
            -            });
            -
            -            $(_p).on('MonthDayInputToggle', function( _evt, _item ){
            -                var _data = _p._model.findItemByTimestamp( _item.attr('dstart')  );
            -                /**
            -                 * 如果 atd 为空, 那么是 全选按钮触发的事件
            -                 */
            -                if( !_data.atd ){
            -                    //alert( _item.attr('action') );
            -                    $(_p).trigger( 'MonthDayToggleAll', [ _item ] );
            -                    return;
            -                }
            -
            -                if( _data.atd.hasClass('unable') ) return;
            -                //JC.log( 'MonthDayView: MonthDayInputToggle', _item.attr('dstart'), _data.input.prop('checked') );
            -                _data.atd[ _data.input.prop('checked') ? 'addClass' : 'removeClass' ]( 'cur' );
            -                _p._model.fixCheckall();
            -            });
            -
            -            $(_p).on('MonthDayToggleAll', function( _evt, _input ){
            -                var _all = _p._model.layout().find( 'a[dstart]' ), _checked = _input.prop('checked');
            -                //JC.log( 'MonthDayView: MonthDayToggleAll', _input.attr('action'), _input.prop('checked'), _all.length );
            -                if( !_all.length ) return;
            -                _all.each( function(){
            -                    var _sp = $(this), _td = getJqParent( _sp, 'td' );
            -                    if( _td.hasClass('unable') ) return;
            -                    _td[ _checked ? 'addClass' : 'removeClass' ]( 'cur' );
            -                    $( _p ).trigger( 'MonthDayToggle', [ _sp ] );
            -                });
            -            });
            -
            -            return this;
            -        };
            -
            -    MonthDayModel.prototype.fixCheckall = 
            -        function(){
            -            var _p = this, _cks, _ckAll, _isAll = true, _sp;
            -            _p._fixCheckAllTm && clearTimeout( _p._fixCheckAllTm );
            -            _p._fixCheckAllTm =
            -                setTimeout( function(){
            -                    _ckAll = _p.layout().find('input.js_JCCalendarCheckbox[action=all]');
            -                    _cks = _p.layout().find('input.js_JCCalendarCheckbox[dstart]');
            -
            -                    _cks.each( function(){
            -                        _sp = $(this);
            -                        var _data = _p.findItemByTimestamp( _sp.attr('dstart')  );
            -                        if( _data.atd.hasClass( 'unable' ) ) return;
            -                        if( !_sp.prop('checked') ) return _isAll = false;
            -                    });
            -                    _ckAll.prop('checked', _isAll );
            -                }, 100);
            -        };
            -
            -    MonthDayModel.prototype.findItemByTimestamp =
            -        function( _tm ){
            -            var _p = this, _r = { 
            -                                    'a': null
            -                                    , 'atd': null
            -                                    , 'atr': null
            -                                    , 'input': null
            -                                    , 'inputtr': null
            -                                    , 'tm': _tm 
            -                                };
            -
            -            if( _tm ){
            -                _r.a = _p.layout().find( printf( 'a[dstart={0}]', _tm ) );
            -                _r.atd = getJqParent( _r.a, 'td' );
            -                _r.atr = getJqParent( _r.a, 'tr' );
            -
            -                _r.input = _p.layout().find( printf( 'input[dstart={0}]', _tm ) );
            -                _r.inputtr = getJqParent( _r.input, 'tr' );
            -            }
            -
            -            return _r;
            -        };
            -	
            -    MonthDayModel.prototype.layout = 
            -        function(){
            -            var _r = $('#UXCCalendar_monthday');
            -
            -            if( !_r.length ){
            -                _r = $( printf( JC.Calendar.monthdayTpl || this.tpl, JC.Calendar.monthdayHeadAppendText ) ).hide();
            -                _r.attr('id', 'UXCCalendar_monthday').hide().appendTo( document.body );
            -
            -                var _month = $( [
            -                            '<option value="0">一月</option>'
            -                            , '<option value="1">二月</option>'
            -                            , '<option value="2">三月</option>'
            -                            , '<option value="3">四月</option>'
            -                            , '<option value="4">五月</option>'
            -                            , '<option value="5">六月</option>'
            -                            , '<option value="6">七月</option>'
            -                            , '<option value="7">八月</option>'
            -                            , '<option value="8">九月</option>'
            -                            , '<option value="9">十月</option>'
            -                            , '<option value="10">十一月</option>'
            -                            , '<option value="11">十二月</option>'
            -                        ].join('') ).appendTo( _r.find('select.UMonth' ) );
            -
            -             }
            -            return _r;
            -        };
            -		
            -	MonthDayModel.prototype.tpl =
            -        [
            -        '<div id="UXCCalendar_monthday" class="UXCCalendar UXCCalendar_week UXCCalendar_monthday" >'
            -        ,'    <div class="UHeader">'
            -        ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            -        ,'        <button type="button" class="UButton UPreMonth">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</button>'
            -        ,'        <select class="UYear" style=""></select>'
            -        ,'        <select class="UMonth"></select>'
            -        ,'        {0}'
            -        ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            -        ,'        <button type="button" class="UButton UNextMonth">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</button>'
            -        /*
            -        ,'       <span class="UYear">'
            -        ,'       </span>年'
            -        ,'       <span class="UMonth">'
            -        ,'       </span>月{0}'
            -        */
            -        ,'    </div>'
            -        ,'    <table class="UTable UTableBorder">'
            -        ,'        <tbody></tbody>'
            -        ,'    </table>'
            -        ,'    <div class="UFooter">'
            -        ,'        <button type="button" class="UConfirm">确定</button>'
            -        ,'        <button type="button" class="UClear">清空</button>'
            -        ,'        <button type="button" class="UCancel">取消</button>'
            -        ,'    </div>'
            -        ,'</div>'
            -        ].join('');
            -
            -    MonthDayModel.prototype.multiselect = function(){ return true; };
            -
            -    MonthDayModel.prototype.multiselectDate =
            -        function(){
            -            var _p = this
            -            	, _r = []
            -            	, _sp
            -            	, _item
            -            	, _date
            -            	;
            -
            -            _p.layout().find('input.js_JCCalendarCheckbox[dstart]').each( function () {
            -                _sp = $(this);
            -                if( !_sp.prop('checked') ) return;
            -                _date = new Date();
            -                _date.setTime( _sp.attr("dstart") );
            -                _r.push( _date );
            -            });
            -           
            -            return _r;
            -        };
            -
            -    MonthDayView.prototype.updateSelected = 
            -        function( _userSelectedItem ){
            -            var _p = this
            -            	, _dstart
            -            	, _dend
            -            	, _tmp
            -            	, _text
            -            	, _ar
            -            	;
            -
            -            if( !_userSelectedItem ) {
            -                _tmp = this._model.multiselectDate();
            -                if( !_tmp.length ) return;
            -                _ar = [];
            -                
            -                for (var i = 0; i < _tmp.length; i++) {
            -                    _ar.push(formatISODate(_tmp[i]));
            -                }
            -                _text = _ar.join(',');
            -            } else {
            -                _userSelectedItem = $( _userSelectedItem );
            -                _tmp = getJqParent( _userSelectedItem, 'td' );
            -                if( _tmp && _tmp.hasClass('unable') ) return;
            -
            -                if( _p._model.multiselect() ){
            -                    _tmp.toggleClass('cur');
            -                    //$(_p).trigger( 'MonthDayToggle', [ _tmp ] );
            -                    return;
            -                }
            -                _date = new Date(); 
            -                _date.setTime( _userSelectedItem.attr('date') );
            -                _text = _userSelectedItem.attr("date");
            -                _text = printf( '{0}', formatISODate( _date ) );
            -            }
            -
            -            if( !_text ) return;
            -            if( _tmp.length ){
            -                _p._model.selector().attr('placeholder', printf( '{0}年 {1}', _tmp[0].getFullYear(), _tmp[0].getMonth() + 1 ) );
            -                _p._model.selector().attr('defaultdate', formatISODate( _tmp[0] ) );
            -            }
            -
            -            _p._model.selector().val( _text );
            -            $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'monthday', _tmp ] );
            -
            -            JC.Calendar.hide();
            -        };
            -	
            -    /*
            -	MonthDayView.prototype._buildHeader = 
            -		function( _dateo ){
            -			var _p = this, 
            -				_layout = _p._model.layout();
            -			
            -			var year = _dateo.date.getFullYear(),
            -				month = _dateo.date.getMonth() + 1;
            -			
            -			//_layout.find('div.UHeader span.UYear').html(year);
            -			//_layout.find('div.UHeader span.UMonth').html(month);
            -				
            -		};
            -   */
            -
            -    MonthDayModel.prototype.fixedDate =
            -        function( _dateo ){
            -            var _p = this, _lastIpt = JC.Calendar.lastIpt, _tmpDate;
            -            _lastIpt
            -                && !_lastIpt.is('[defaultdate]')
            -                && (
            -                        _tmpDate = cloneDate( _dateo.multidate[0].start )
            -                        //, _tmpDate.setDate( 1 )
            -                        , _lastIpt.attr('defaultdate', formatISODate( _tmpDate ) )
            -                        /*
            -                        , !_lastIpt.is( '[placeholder]' ) 
            -                            && _lastIpt.attr('placeholder', printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) )
            -                       */
            -                    )
            -                ;
            -        };
            -	
            -	MonthDayView.prototype._buildBody =
            -        function( _dateo ){
            -				var _p = this, _layout = _p._model.layout();
            -                var _maxday = maxDayOfMonth( _dateo.date ), 
            -                    _ls = [],
            -                    i, 
            -					_class, 
            -					_tempDate, 
            -					_tempDay,
            -					_today = new Date();
            -
            -                _p._model.fixedDate( _dateo );
            -				
            -				_tempDate = new Date(_dateo.date.getFullYear(), _dateo.date.getMonth(), 1);
            -				_tempDay = _tempDate.getDay();
            -
            -                var _headLs = [], _dayLs = [], _ckLs = [];
            -                var _headClass = [], _dayClass = [];
            -
            -				_headLs.push('<tr><td><span class="bold">星期</span></td>');
            -                _dayLs.push('<tr><td><span class="bold">日期</span></td>'); 
            -				_ckLs.push('<tr class="Uchkdate"><td><label><span class="bold">全选</span>&nbsp;'
            -                            + '<input type="checkbox" class="js_JCCalendarCheckbox" action="all"  /></lable></td>');
            -
            -				for ( i = 0; i < _maxday; i++ ) {
            -					_headClass  = [];
            -					_dayClass = getClass(_dateo, _tempDate, _today).join(' ');
            -					
            -					if (_tempDay == 0 || _tempDay == 6) _headClass.push("red");
            -                    _headLs.push( printf( 
            -                                '<td class="{0}">{1}</td>'
            -                                , _headClass.join(" ") 
            -                                , Calendar.cnWeek[_tempDay]
            -                            ));
            -
            -                    _dayLs.push( printf(
            -                        '<td class="{0}"><a href="javascript:;" dstart="{1}" dend="{1}" title="{3}" >{2}</a></td>'
            -                        , _dayClass
            -                        , _tempDate.getTime()
            -                        , i + 1
            -                        , formatISODate(_tempDate)
            -                     ));
            -
            -                   _ckLs.push( printf(
            -                        '<td><input type="checkbox" date="{1}" dstart="{1}" dend="{1}" class="js_JCCalendarCheckbox" action="item" {3} {4} title="{2}" /></td>'
            -                        , ''
            -                        , _tempDate.getTime()
            -                        , formatISODate(_tempDate)
            -                        , /\bcur\b/.test( _dayClass ) ? 'checked' : ''
            -                        , /\bunable\b/.test( _dayClass ) ? 'disabled' : ''
            -                     ));
            -
            -					_tempDate.setDate(_tempDate.getDate() + 1);
            -					_tempDay = _tempDate.getDay();
            -					
            -				}
            -
            -				_headLs.push('</tr>');
            -                _dayLs.push('</tr>');
            -				_ckLs.push('</tr>');
            -
            -                _ls = _ls.concat( _headLs, _dayLs, _ckLs );
            -				
            -                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            -
            -                _p._model.fixCheckall();
            -        };
            -	
            -	function getClass(_dateo, _tempDate, _today) {
            -		var _class = [];
            -
            -		if( _dateo.minvalue) {
            -			if( _tempDate.getTime() < _dateo.minvalue.getTime() ) {
            -				_class.push( 'unable' );
            -			}
            -		} 
            -            
            -        if( _dateo.maxvalue ) {
            -			if ( _tempDate.getTime() > _dateo.maxvalue.getTime() ) {
            -				_class.push( 'unable' );
            -			}
            -		} 
            -           
            -		if( isSameDay( _tempDate, _today ) ) {
            -			_class.push( 'today' );
            -		}
            -
            -        for( var i = 0, j = _dateo.multidate.length; i < j; i++ ){
            -            if( isSameDay( _dateo.multidate[i].start, _tempDate ) ){ 
            -                _class.push( 'cur' );
            -                break;
            -            }
            -        }
            -
            -		return _class;
            -	}
            -
            -    $(document).delegate( '#UXCCalendar_monthday a[dstart]', 'click', function( _evt ){
            -        var _lastIpt = JC.Calendar.lastIpt, _type, _ins, _p = $(this);
            -        if( !_lastIpt ) return;
            -        _type = JC.Calendar.type( _lastIpt );
            -        _ins = JC.Calendar.getInstance( _lastIpt );
            -        if( !_ins )  return;
            -
            -        $( _ins._view ).trigger( 'MonthDayToggle', [ _p ] );
            -    });
            -
            -    $(document).delegate( '#UXCCalendar_monthday input.js_JCCalendarCheckbox', 'click', function( _evt ){
            -        var _lastIpt = JC.Calendar.lastIpt, _type, _ins, _p = $(this);
            -        if( !_lastIpt ) return;
            -        _type = JC.Calendar.type( _lastIpt );
            -        _ins = JC.Calendar.getInstance( _lastIpt );
            -        if( !_ins )  return;
            -        $( _ins._view ).trigger( 'MonthDayInputToggle', [ _p ] );
            -    });
            -
            -
            -}(jQuery));
            +        , window
            +    )
            +);
             
                 
            diff --git a/docs_api/files/.._comps_Calendar_Calendar.month.js.html b/docs_api/files/.._comps_Calendar_Calendar.month.js.html new file mode 100644 index 000000000..095a8898d --- /dev/null +++ b/docs_api/files/.._comps_Calendar_Calendar.month.js.html @@ -0,0 +1,531 @@ + + + + + ../comps/Calendar/Calendar.month.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Calendar/Calendar.month.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Calendar.date' ], function(){
            +    //
            +    /// MONTH CODE
            +    //
            +    /**
            +     * 自定义月份弹框的模板HTML
            +     * @for         JC.Calendar
            +     * @property    monthTpl
            +     * @type        string
            +     * @default     empty
            +     * @static
            +     */
            +    JC.Calendar.monthTpl = '';
            +
            +    function MonthModel( _selector ){
            +        this._selector = _selector;
            +    }
            +    JC.Calendar.MonthModel = MonthModel;
            +    
            +    function MonthView( _model ){
            +        this._model = _model;
            +    }
            +    JC.Calendar.MonthView = MonthView;
            +
            +    JC.Calendar.clone( MonthModel, MonthView );
            +
            +    JC.f.extendObject( MonthModel.prototype, {
            +        layout:
            +            function(){
            +                var _r = $('#UXCCalendar_month');
            +
            +                if( !_r.length ){
            +                    _r = $( JC.Calendar.monthTpl || this.tpl ).hide();
            +                    _r.attr('id', 'UXCCalendar_month').hide().appendTo( document.body );
            +                 }
            +                return _r;
            +            }
            +
            +        , tpl:
            +            [
            +            '<div id="UXCCalendar_month" class="UXCCalendar UXCCalendar_week UXCCalendar_month" >'
            +            ,'    <div class="UHeader">'
            +            ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            +            ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            +            ,'        <select class="UYear" style=""></select>'
            +            ,'    </div>'
            +            ,'    <table class="UTable UTableBorder">'
            +            ,'        <tbody></tbody>'
            +            ,'    </table>'
            +            ,'    <div class="UFooter">'
            +            ,'        <button type="button" class="UConfirm">确定</button>'
            +            ,'        <button type="button" class="UClear">清空</button>'
            +            ,'        <button type="button" class="UCancel">取消</button>'
            +            ,'    </div>'
            +            ,'</div>'
            +            ].join('')
            +
            +        , month:
            +            function(){
            +                var _r = 0, _tmp, _date;
            +                ( _tmp = this.layout().find('td.cur a[dstart]') ).length
            +                    && ( _date = new Date() )
            +                    && (
            +                            _date.setTime( _tmp.attr('dstart') )
            +                            , _r = _date.getMonth()
            +                       )
            +                    ;
            +                return _r;
            +            }
            +
            +        , selectedDate:
            +            function(){
            +                var _r, _tmp, _item;
            +                _tmp = this.layout().find('td.cur');
            +                _tmp.length 
            +                    && !_tmp.hasClass( 'unable' )
            +                    && ( _item = _tmp.find('a[dstart]') )
            +                    && ( 
            +                            _r = { 'start': new Date(), 'end': new Date() }
            +                            , _r.start.setTime( _item.attr('dstart') ) 
            +                            , _r.end.setTime( _item.attr('dend') ) 
            +                        )
            +                    ;
            +                return _r;
            +            }
            +
            +        , multiselectDate:
            +            function(){
            +                var _p = this, _r = [], _sp, _item, _dstart, _dend;
            +                _p.layout().find('td.cur').each( function(){
            +                    _sp = $(this); _item = _sp.find( '> a[dstart]' );
            +                    if( _sp.hasClass( 'unable' ) ) return;
            +                    _dstart = new Date(); _dend = new Date();
            +                    _dstart.setTime( _item.attr('dstart') );
            +                    _dend.setTime( _item.attr('dend') );
            +                    _r.push( { 'start': _dstart, 'end': _dend } );
            +                });
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( MonthView.prototype, {
            +        _buildBody: 
            +            function( _dateo ){
            +                var _p = this
            +                    , _date = _dateo.date
            +                    , _layout = _p._model.layout()
            +                    , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime()
            +                    , nextCount = 0
            +                    , _ls = [], _class, _data, _title, _dstart, _dend, _year = _date.getFullYear()
            +                    , _rows = 4
            +                    , ipt = JC.Calendar.lastIpt
            +                    , currentcanselect = JC.f.parseBool( ipt.attr('currentcanselect') )
            +                    , _tmpMultidate = _dateo.multidate ? _dateo.multidate.slice() : null
            +                    , _minvalue = _dateo.minvalue ? JC.f.cloneDate( _dateo.minvalue ) : null
            +                    , _maxvalue = _dateo.maxvalue ? JC.f.cloneDate( _dateo.maxvalue ) : null
            +                    ;
            +
            +                    if( _maxvalue && currentcanselect ){
            +                        _maxvalue.setDate( JC.f.maxDayOfMonth( _maxvalue ) );
            +                    }
            +
            +                    if( _minvalue && currentcanselect ){
            +                        _minvalue.setDate( 1 );
            +                    }
            +
            +                    _ls.push('<tr>');
            +                    for( var i = 1, j = 12; i <= j; i++ ){
            +                        _dstart = new Date( _year, i - 1, 1 ); 
            +                        _dend = new Date( _year, i - 1, JC.f.maxDayOfMonth( _dstart ) );
            +
            +                        _title = JC.f.printf( "{0}年 {1}月\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})"
            +                                    , _year
            +                                    , JC.Calendar.getCnNum( i )
            +                                    , JC.f.formatISODate( _dstart )
            +                                    , JC.f.formatISODate( _dend )
            +                                    , JC.Calendar.cnWeek.charAt( _dstart.getDay() % 7 )
            +                                    , JC.Calendar.cnWeek.charAt( _dend.getDay() % 7 )
            +                                    );
            +
            +                        _class = [];
            +
            +                        if( _minvalue && _dstart.getTime() < _minvalue.getTime() ) 
            +                            _class.push( 'unable' );
            +                        if( _maxvalue && _dend.getTime() > _maxvalue.getTime() ){
            +                            _class.push( 'unable' );
            +                        }
            +
            +                        if( _tmpMultidate ){
            +                            $.each( _tmpMultidate, function( _ix, _item ){
            +                                if( _dstart.getTime() >= _item.start.getTime() 
            +                                  && _dstart.getTime() <= _item.end.getTime() ){
            +                                    _class.push( 'cur' );
            +                                    _tmpMultidate.splice( _ix, 1 );
            +                                    return false;
            +                                }
            +                            });
            +                        }else{
            +                            if( _date.getTime() >= _dstart.getTime() 
            +                                    && _date.getTime() <= _dend.getTime() ) _class.push( 'cur' );
            +                        }
            +                        if( today >= _dstart.getTime() && today <= _dend.getTime() ) _class.push( 'today' );
            +
            +                        var _cnUnit = JC.Calendar.cnUnit.charAt( i % 10 );
            +                        i > 10 && ( _cnUnit = "十" + _cnUnit );
            +
            +                        _ls.push( JC.f.printf( '<td class="{0}"><a href="javascript:" title="{1}"'+
            +                                        ' dstart="{3}" dend="{4}" month="{5}" >{2}月</a></td>'
            +                                    , _class.join(' ')
            +                                    , _title
            +                                    , _cnUnit
            +                                    , _dstart.getTime()
            +                                    , _dend.getTime()
            +                                    , i
            +                                ));
            +                        if( i % 3 === 0 && i != j ) _ls.push( '</tr><tr>' );
            +                    }
            +                    _ls.push('</tr>'); 
            +     
            +                    _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            +            }
            +
            +        , updateSelected:
            +            function( _userSelectedItem ){
            +                var _p = this, _dstart, _dend, _tmp, _text, _ar;
            +                if( !_userSelectedItem ){
            +                    if( _p._model.multiselect() ){
            +                        _tmp = this._model.multiselectDate();
            +                        if( !_tmp.length ) return;
            +                        _ar = [];
            +                        $.each( _tmp, function( _ix, _item ){
            +                            //_ar.push( JC.f.printf( '{0} 至 {1}', JC.f.formatISODate( _item.start ), JC.f.formatISODate( _item.end ) ) );
            +                            _ar.push( _text = _p._model.fullFormat( _p._model.dateFormat( _item.start ), _p._model.dateFormat( _item.end ) ) );
            +                        });
            +                        _text = _ar.join(',');
            +                    }else{
            +                        _tmp = this._model.selectedDate();
            +                        _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            +
            +                        /*
            +                        _dstart && _dend 
            +                            && ( _text = JC.f.printf( '{0} 至 {1}', JC.f.formatISODate( _dstart ), JC.f.formatISODate( _dend ) ) );
            +                        */
            +                        _dstart 
            +                            && _dend 
            +                            && ( _text = _p._model.fullFormat( _p._model.dateFormat( _dstart ), _p._model.dateFormat( _dend ) ) )
            +                            ; 
            +                    }
            +                }else{
            +                    _userSelectedItem = $( _userSelectedItem );
            +                    _tmp = JC.f.getJqParent( _userSelectedItem, 'td' );
            +                    if( _tmp && _tmp.hasClass('unable') ) return;
            +
            +                    if( _p._model.multiselect() ){
            +                        _tmp.toggleClass('cur');
            +                        return;
            +                    }
            +                    _dstart = new Date(); _dend = new Date();
            +                    _dstart.setTime( _userSelectedItem.attr('dstart') );
            +                    _dend.setTime( _userSelectedItem.attr('dend') );
            +
            +                    /*
            +                    _text = JC.f.printf( '{0} 至 {1}', JC.f.formatISODate( _dstart ), JC.f.formatISODate( _dend ) );
            +                    */
            +                    _text = _p._model.fullFormat( _p._model.dateFormat( _dstart ), _p._model.dateFormat( _dend ) )
            +                }
            +
            +                if( !_text ) return;
            +
            +                _p._model.selector().val( _text );
            +                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'month', _dstart, _dend ] );
            +
            +                JC.Calendar.hide();
            +            }
            +    });
            +
            +    $(document).delegate( [ 'input[datatype=month]', 'input[multidate=month]' ].join(), 'focus' 
            +    , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'button[datatype=month]', 'button[multidate=month]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'textarea[datatype=month]', 'textarea[multidate=month]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Calendar_Calendar.monthday.js.html b/docs_api/files/.._comps_Calendar_Calendar.monthday.js.html new file mode 100644 index 000000000..ead28adf6 --- /dev/null +++ b/docs_api/files/.._comps_Calendar_Calendar.monthday.js.html @@ -0,0 +1,704 @@ + + + + + ../comps/Calendar/Calendar.monthday.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Calendar/Calendar.monthday.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Calendar.date' ], function(){
            +    //
            +    /// MONTHDAY CODE
            +    //
            +    /**
            +     * 多选日期弹框的模板HTML
            +     * @for         JC.Calendar
            +     * @property    monthdayTpl
            +     * @type        string
            +     * @default     empty
            +     * @static
            +     */
            +    JC.Calendar.monthdayTpl = '';
            +    /**
            +     * 多先日期弹框标题末尾的附加字样
            +     * @for         JC.Calendar
            +     * @property    monthdayHeadAppendText
            +     * @type        string
            +     * @default     empty
            +     * @static
            +     */
            +    JC.Calendar.monthdayHeadAppendText = '';
            +
            +    function MonthDayModel( _selector ){
            +        this._selector = _selector;
            +        
            +    }
            +    JC.Calendar.MonthDayModel = MonthDayModel;
            +    
            +    function MonthDayView( _model ){
            +        this._model = _model;
            +		
            +    }
            +    JC.Calendar.MonthDayView = MonthDayView;
            +
            +    JC.Calendar.clone( MonthDayModel, MonthDayView );
            +
            +    JC.f.extendObject( MonthDayModel.prototype, {
            +        fixCheckall: 
            +            function(){
            +                var _p = this, _cks, _ckAll, _isAll = true, _sp;
            +                _p._fixCheckAllTm && clearTimeout( _p._fixCheckAllTm );
            +                _p._fixCheckAllTm =
            +                    setTimeout( function(){
            +                        _ckAll = _p.layout().find('input.js_JCCalendarCheckbox[action=all]');
            +                        _cks = _p.layout().find('input.js_JCCalendarCheckbox[dstart]');
            +
            +                        _cks.each( function(){
            +                            _sp = $(this);
            +                            var _data = _p.findItemByTimestamp( _sp.attr('dstart')  );
            +                            if( _data.atd.hasClass( 'unable' ) ) return;
            +                            if( !_sp.prop('checked') ) return _isAll = false;
            +                        });
            +                        _ckAll.prop('checked', _isAll );
            +                    }, 100);
            +            }
            +
            +        , findItemByTimestamp:
            +            function( _tm ){
            +                var _p = this, _r = { 
            +                                        'a': null
            +                                        , 'atd': null
            +                                        , 'atr': null
            +                                        , 'input': null
            +                                        , 'inputtr': null
            +                                        , 'tm': _tm 
            +                                    };
            +
            +                if( _tm ){
            +                    _r.a = _p.layout().find( JC.f.printf( 'a[dstart={0}]', _tm ) );
            +                    _r.atd = JC.f.getJqParent( _r.a, 'td' );
            +                    _r.atr = JC.f.getJqParent( _r.a, 'tr' );
            +
            +                    _r.input = _p.layout().find( JC.f.printf( 'input[dstart={0}]', _tm ) );
            +                    _r.inputtr = JC.f.getJqParent( _r.input, 'tr' );
            +                }
            +
            +                return _r;
            +            }
            +        
            +        , layout: 
            +            function(){
            +                var _r = $('#UXCCalendar_monthday');
            +
            +                if( !_r.length ){
            +                    _r = $( JC.f.printf( JC.Calendar.monthdayTpl || this.tpl, JC.Calendar.monthdayHeadAppendText ) ).hide();
            +                    _r.attr('id', 'UXCCalendar_monthday').hide().appendTo( document.body );
            +
            +                    var _month = $( [
            +                                '<option value="0">一月</option>'
            +                                , '<option value="1">二月</option>'
            +                                , '<option value="2">三月</option>'
            +                                , '<option value="3">四月</option>'
            +                                , '<option value="4">五月</option>'
            +                                , '<option value="5">六月</option>'
            +                                , '<option value="6">七月</option>'
            +                                , '<option value="7">八月</option>'
            +                                , '<option value="8">九月</option>'
            +                                , '<option value="9">十月</option>'
            +                                , '<option value="10">十一月</option>'
            +                                , '<option value="11">十二月</option>'
            +                            ].join('') ).appendTo( _r.find('select.UMonth' ) );
            +
            +                 }
            +                return _r;
            +            }
            +            
            +        , tpl:
            +            [
            +            '<div id="UXCCalendar_monthday" class="UXCCalendar UXCCalendar_week UXCCalendar_monthday" >'
            +            ,'    <div class="UHeader">'
            +            ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            +            ,'        <button type="button" class="UButton UPreMonth">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</button>'
            +            ,'        <select class="UYear" style=""></select>'
            +            ,'        <select class="UMonth"></select>'
            +            ,'        {0}'
            +            ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            +            ,'        <button type="button" class="UButton UNextMonth">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</button>'
            +            ,'    </div>'
            +            ,'    <table class="UTable UTableBorder">'
            +            ,'        <tbody></tbody>'
            +            ,'    </table>'
            +            ,'    <div class="UFooter">'
            +            ,'        <button type="button" class="UConfirm">确定</button>'
            +            ,'        <button type="button" class="UClear">清空</button>'
            +            ,'        <button type="button" class="UCancel">取消</button>'
            +            ,'    </div>'
            +            ,'</div>'
            +            ].join('')
            +
            +        , multiselect: function(){ return true; }
            +
            +        , multiselectDate:
            +            function(){
            +                var _p = this
            +                    , _r = []
            +                    , _sp
            +                    , _item
            +                    , _date
            +                    ;
            +
            +                _p.layout().find('input.js_JCCalendarCheckbox[dstart]').each( function () {
            +                    _sp = $(this);
            +                    if( !_sp.prop('checked') ) return;
            +                    _date = new Date();
            +                    _date.setTime( _sp.attr("dstart") );
            +                    _r.push( _date );
            +                });
            +               
            +                return _r;
            +            }
            +
            +        , ccPreserveDisabled:
            +            function(){
            +                var _r = true;
            +                this.selector().is( '[ccPreserveDisabled]' )
            +                    && ( _r = JC.f.parseBool( this.selector().attr( 'ccPreserveDisabled' ) ) );
            +                return _r;
            +            }
            +
            +        , calendarclear: 
            +            function(){
            +                var _p = this, _ipt = this.selector(), _cb, _tmp;
            +                _ipt && _ipt.attr('calendarclear') 
            +                    && ( _tmp = window[ _ipt.attr('calendarclear') ] )
            +                    && ( _cb = _tmp );
            +
            +                if( _p.ccPreserveDisabled() ){
            +                    var _items = _p.layout().find( 'input[date]' ), _disabled = [];
            +                        _items.each( function(){
            +                            var _sp = $(this), _d;
            +                            if( !( _sp.is( ':disabled' ) && _sp.is( ':checked' ) ) ) return;
            +                            _d = new Date();
            +                            _d.setTime( _sp.attr( 'date' ) );
            +                            _disabled.push( JC.f.formatISODate( _d ) );
            +                        });
            +                    _ipt.val( _disabled.join(',') );
            +                }
            +
            +                return _cb;
            +            }
            +
            +        , fixedDate:
            +            function( _dateo ){
            +                var _p = this, _lastIpt = JC.Calendar.lastIpt, _tmpDate;
            +                _lastIpt
            +                    && !_lastIpt.is('[defaultdate]')
            +                    && (
            +                            _tmpDate = JC.f.cloneDate( _dateo.multidate[0].start )
            +                            //, _tmpDate.setDate( 1 )
            +                            , _lastIpt.attr('defaultdate', JC.f.formatISODate( _tmpDate ) )
            +                            /*
            +                            , !_lastIpt.is( '[placeholder]' ) 
            +                                && _lastIpt.attr('placeholder', JC.f.printf( '{0}年 {1}月', _tmpDate.getFullYear(), _tmpDate.getMonth() + 1 ) )
            +                           */
            +                        )
            +                    ;
            +            }
            +    });
            +
            +    JC.f.extendObject( MonthDayView.prototype, {
            +        init:
            +            function(){
            +                var _p = this;
            +
            +                $(_p).on('MonthDayToggle', function( _evt, _item ){
            +                    var _data = _p._model.findItemByTimestamp( _item.attr('dstart')  );
            +                    if( _data.atd.hasClass('unable') ) return;
            +                    _data.input.prop( 'checked', _data.atd.hasClass( 'cur' )  );
            +                    _p._model.fixCheckall();
            +                });
            +
            +                $(_p).on('MonthDayInputToggle', function( _evt, _item ){
            +                    var _data = _p._model.findItemByTimestamp( _item.attr('dstart')  );
            +                    /**
            +                     * 如果 atd 为空, 那么是 全选按钮触发的事件
            +                     */
            +                    if( !_data.atd ){
            +                        $(_p).trigger( 'MonthDayToggleAll', [ _item ] );
            +                        return;
            +                    }
            +
            +                    if( _data.atd.hasClass('unable') ) return;
            +                    _data.atd[ _data.input.prop('checked') ? 'addClass' : 'removeClass' ]( 'cur' );
            +                    _p._model.fixCheckall();
            +                });
            +
            +                $(_p).on('MonthDayToggleAll', function( _evt, _input ){
            +                    var _all = _p._model.layout().find( 'a[dstart]' ), _checked = _input.prop('checked');
            +                    if( !_all.length ) return;
            +                    _all.each( function(){
            +                        var _sp = $(this), _td = JC.f.getJqParent( _sp, 'td' );
            +                        if( _td.hasClass('unable') ) return;
            +                        _td[ _checked ? 'addClass' : 'removeClass' ]( 'cur' );
            +                        $( _p ).trigger( 'MonthDayToggle', [ _sp ] );
            +                    });
            +                });
            +
            +                return this;
            +            }
            +
            +        , updateSelected: 
            +            function( _userSelectedItem ){
            +                var _p = this
            +                    , _dstart
            +                    , _dend
            +                    , _tmp
            +                    , _text
            +                    , _ar
            +                    ;
            +
            +                if( !_userSelectedItem ) {
            +                    _tmp = this._model.multiselectDate();
            +                    if( !_tmp.length ) return;
            +                    _ar = [];
            +                    
            +                    for (var i = 0; i < _tmp.length; i++) {
            +                        _ar.push(JC.f.formatISODate(_tmp[i]));
            +                    }
            +                    _text = _ar.join(',');
            +                } else {
            +                    _userSelectedItem = $( _userSelectedItem );
            +                    _tmp = JC.f.getJqParent( _userSelectedItem, 'td' );
            +                    if( _tmp && _tmp.hasClass('unable') ) return;
            +
            +                    if( _p._model.multiselect() ){
            +                        _tmp.toggleClass('cur');
            +                        //$(_p).trigger( 'MonthDayToggle', [ _tmp ] );
            +                        return;
            +                    }
            +                    _date = new Date(); 
            +                    _date.setTime( _userSelectedItem.attr('date') );
            +                    _text = _userSelectedItem.attr("date");
            +                    _text = JC.f.printf( '{0}', JC.f.formatISODate( _date ) );
            +                }
            +
            +                if( !_text ) return;
            +                if( _tmp.length ){
            +                    _p._model.selector().attr('placeholder', JC.f.printf( '{0}年 {1}', _tmp[0].getFullYear(), _tmp[0].getMonth() + 1 ) );
            +                    _p._model.selector().attr('defaultdate', JC.f.formatISODate( _tmp[0] ) );
            +                }
            +
            +                _p._model.selector().val( _text );
            +                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'monthday', _tmp ] );
            +
            +                JC.Calendar.hide();
            +            }
            +        
            +        , _buildBody:
            +            function( _dateo ){
            +                    var _p = this, _layout = _p._model.layout();
            +                    var _maxday = JC.f.maxDayOfMonth( _dateo.date ), 
            +                        _ls = [],
            +                        i, 
            +                        _class, 
            +                        _tempDate, 
            +                        _tempDay,
            +                        _today = new Date();
            +
            +                    _p._model.fixedDate( _dateo );
            +
            +                    var _headLs = [], _dayLs = [], _ckLs = [];
            +                    var _headClass = [], _dayClass = [];
            +
            +                    _headLs.push('<tr><td><span class="bold">星期</span></td>');
            +                    _dayLs.push('<tr><td><span class="bold">日期</span></td>'); 
            +                    _ckLs.push('<tr class="Uchkdate"><td><label><span class="bold">全选</span>&nbsp;'
            +                                + '<input type="checkbox" class="js_JCCalendarCheckbox" action="all"  /></lable></td>');
            +
            +                    for ( i = 0; i < _maxday; i++ ) {
            +                        
            +                        _tempDate = new Date(_dateo.date.getFullYear(), _dateo.date.getMonth(), i+1);
            +                        _tempDay = _tempDate.getDay();
            +
            +                        _headClass  = [];
            +                        _dayClass = getClass(_dateo, _tempDate, _today).join(' ');
            +                        
            +                        if (_tempDay == 0 || _tempDay == 6) _headClass.push("red");
            +                        _headLs.push( JC.f.printf( 
            +                                    '<td class="{0}">{1}</td>'
            +                                    , _headClass.join(" ") 
            +                                    , Calendar.cnWeek.charAt( _tempDay )
            +                                ));
            +
            +                        _dayLs.push( JC.f.printf(
            +                            '<td class="{0}"><a href="javascript:;" dstart="{1}" dend="{1}" title="{3}" >{2}</a></td>'
            +                            , _dayClass
            +                            , _tempDate.getTime()
            +                            , i + 1
            +                            , JC.f.formatISODate(_tempDate)
            +                         ));
            +
            +                       _ckLs.push( JC.f.printf(
            +                            '<td><input type="checkbox" date="{1}" dstart="{1}" dend="{1}" class="js_JCCalendarCheckbox" action="item" {3} {4} title="{2}" /></td>'
            +                            , ''
            +                            , _tempDate.getTime()
            +                            , JC.f.formatISODate(_tempDate)
            +                            , ( !/\bunable\b/.test( _dayClass ) && ( /\bcur\b/.test( _dayClass ) ) ) ? 'checked' : ''
            +                            , /\bunable\b/.test( _dayClass ) ? 'disabled' : ''
            +                         ));
            +
            +                        _tempDate.setDate(_tempDate.getDate() + 1);
            +                        _tempDay = _tempDate.getDay();
            +                        
            +                    }
            +
            +                    _headLs.push('</tr>');
            +                    _dayLs.push('</tr>');
            +                    _ckLs.push('</tr>');
            +
            +                    _ls = _ls.concat( _headLs, _dayLs, _ckLs );
            +                    
            +                    _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            +
            +                    _p._model.fixCheckall();
            +            }
            +    });
            +	
            +	function getClass(_dateo, _tempDate, _today) {
            +		var _class = [];
            +
            +		if( _dateo.minvalue) {
            +			if( _tempDate.getTime() < _dateo.minvalue.getTime() ) {
            +				_class.push( 'unable' );
            +			}
            +		} 
            +            
            +        if( _dateo.maxvalue ) {
            +			if ( _tempDate.getTime() > _dateo.maxvalue.getTime() ) {
            +				_class.push( 'unable' );
            +			}
            +		} 
            +           
            +		if( JC.f.isSameDay( _tempDate, _today ) ) {
            +			_class.push( 'today' );
            +		}
            +
            +        for( var i = 0, j = _dateo.multidate.length; i < j; i++ ){
            +            if( JC.f.isSameDay( _dateo.multidate[i].start, _tempDate ) ){ 
            +                _class.push( 'cur' );
            +                break;
            +            }
            +        }
            +
            +		return _class;
            +	}
            +
            +    $(document).delegate( '#UXCCalendar_monthday a[dstart]', 'click', function( _evt ){
            +        var _lastIpt = JC.Calendar.lastIpt, _type, _ins, _p = $(this);
            +        if( !_lastIpt ) return;
            +        _type = JC.Calendar.type( _lastIpt );
            +        _ins = JC.Calendar.getInstance( _lastIpt );
            +        if( !_ins )  return;
            +
            +        $( _ins._view ).trigger( 'MonthDayToggle', [ _p ] );
            +    });
            +
            +    $(document).delegate( '#UXCCalendar_monthday input.js_JCCalendarCheckbox', 'click', function( _evt ){
            +        var _lastIpt = JC.Calendar.lastIpt, _type, _ins, _p = $(this);
            +        if( !_lastIpt ) return;
            +        _type = JC.Calendar.type( _lastIpt );
            +        _ins = JC.Calendar.getInstance( _lastIpt );
            +        if( !_ins )  return;
            +        $( _ins._view ).trigger( 'MonthDayInputToggle', [ _p ] );
            +    });
            +
            +
            +    $(document).delegate( [ 'input[datatype=monthday]', 'input[multidate=monthday]' ].join(), 'focus' 
            +    , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    $(document).delegate( [ 'button[datatype=monthday]', 'button[multidate=monthday]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    $(document).delegate( [ 'textarea[datatype=monthday]', 'textarea[multidate=monthday]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Calendar_Calendar.season.js.html b/docs_api/files/.._comps_Calendar_Calendar.season.js.html new file mode 100644 index 000000000..5122f5113 --- /dev/null +++ b/docs_api/files/.._comps_Calendar_Calendar.season.js.html @@ -0,0 +1,499 @@ + + + + + ../comps/Calendar/Calendar.season.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Calendar/Calendar.season.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Calendar.date' ], function(){
            +    //
            +    /// SEASON CODE
            +    //
            +    /**
            +     * 自定义周弹框的模板HTML
            +     * @for         JC.Calendar
            +     * @property    seasonTpl
            +     * @type        string
            +     * @default     empty
            +     * @static
            +     */
            +    JC.Calendar.seasonTpl = '';
            +
            +    function SeasonModel( _selector ){
            +        this._selector = _selector;
            +    }
            +    JC.Calendar.SeasonModel = SeasonModel;
            +    
            +    function SeasonView( _model ){
            +        this._model = _model;
            +    }
            +    JC.Calendar.SeasonView = SeasonView;
            +
            +    JC.Calendar.clone( SeasonModel, SeasonView );
            +
            +
            +    JC.f.extendObject( SeasonModel.prototype, {
            +        layout: 
            +            function(){
            +                var _r = $('#UXCCalendar_season');
            +
            +                if( !_r.length ){
            +                    _r = $( JC.Calendar.seasonTpl || this.tpl ).hide();
            +                    _r.attr('id', 'UXCCalendar_season').hide().appendTo( document.body );
            +                 }
            +                return _r;
            +            }
            +
            +        , tpl:
            +            [
            +            '<div id="UXCCalendar_season" class="UXCCalendar UXCCalendar_week UXCCalendar_season" >'
            +            ,'    <div class="UHeader">'
            +            ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            +            ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            +            ,'        <select class="UYear" style=""></select>'
            +            ,'    </div>'
            +            ,'    <table class="UTable UTableBorder">'
            +            ,'        <tbody></tbody>'
            +            ,'    </table>'
            +            ,'    <div class="UFooter">'
            +            ,'        <button type="button" class="UConfirm">确定</button>'
            +            ,'        <button type="button" class="UClear">清空</button>'
            +            ,'        <button type="button" class="UCancel">取消</button>'
            +            ,'    </div>'
            +            ,'</div>'
            +            ].join('')
            +
            +        , month: 
            +            function(){
            +                var _r = 0, _tmp, _date;
            +                ( _tmp = this.layout().find('td.cur a[dstart]') ).length
            +                    && ( _date = new Date() )
            +                    && (
            +                            _date.setTime( _tmp.attr('dstart') )
            +                            , _r = _date.getMonth()
            +                       )
            +                    ;
            +                return _r;
            +            }
            +
            +        , selectedDate:
            +            function(){
            +                var _r, _tmp, _item;
            +                _tmp = this.layout().find('td.cur');
            +                _tmp.length 
            +                    && !_tmp.hasClass( 'unable' )
            +                    && ( _item = _tmp.find('a[dstart]') )
            +                    && ( 
            +                            _r = { 'start': new Date(), 'end': new Date() }
            +                            , _r.start.setTime( _item.attr('dstart') ) 
            +                            , _r.end.setTime( _item.attr('dend') ) 
            +                        )
            +                    ;
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( SeasonView.prototype, {
            +
            +        _buildBody:
            +            function( _dateo ){
            +                var _p = this
            +                    , _date = _dateo.date
            +                    , _layout = _p._model.layout()
            +                    , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime()
            +                    , nextCount = 0
            +                    , _ls = [], _class, _data, _title, _sdate, _edate, _year = _date.getFullYear()
            +                    , _rows = 4
            +                    , ipt = JC.Calendar.lastIpt
            +                    , currentcanselect = JC.f.parseBool( ipt.attr('currentcanselect') )
            +                    , _minvalue = _dateo.minvalue ? JC.f.cloneDate( _dateo.minvalue ) : null
            +                    , _maxvalue = _dateo.maxvalue ? JC.f.cloneDate( _dateo.maxvalue ) : null
            +                    , _m
            +                    ;
            +
            +                    if( _maxvalue && currentcanselect ){
            +                       var _m = _maxvalue.getMonth() + 1, _md;
            +
            +                        if( _m % 3 !== 0 ){
            +                            _maxvalue.setDate( 1 );
            +                            _maxvalue.setMonth( _m + ( 3 - ( _m % 3 ) - 1 ) );
            +                        }
            +                        _maxvalue.setDate( JC.f.maxDayOfMonth( _maxvalue ) );
            +                    }
            +
            +                    if( _minvalue && currentcanselect ){
            +                        _m = _minvalue.getMonth() + 1, _md;
            +
            +                        _minvalue.setDate( 1 );
            +                        _minvalue.setMonth( _minvalue.getMonth() - ( 3 - _m % 3 ) );
            +                        //_minvalue.setDate( JC.f.maxDayOfMonth( _minvalue ) );
            +                    }
            +
            +                    //JC.log( JC.f.formatISODate( _minvalue ), JC.f.formatISODate( _maxvalue ) );
            +
            +                    _ls.push('<tr>');
            +                    for( var i = 1, j = 4; i <= j; i++ ){
            +                        _sdate = new Date( _year, i * 3 - 3, 1 ); 
            +                        _edate = new Date( _year, i * 3 - 1, 1 );
            +                        _edate.setDate( JC.f.maxDayOfMonth( _edate ) );
            +
            +                        var _cnUnit = JC.Calendar.cnUnit.charAt( i % 10 );
            +                        i > 10 && ( _cnUnit = "十" + _cnUnit );
            +
            +                        _title = JC.f.printf( "{0}年 第{1}季度\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})"
            +                                    , _year
            +                                    , JC.Calendar.getCnNum( i )
            +                                    , JC.f.formatISODate( _sdate )
            +                                    , JC.f.formatISODate( _edate )
            +                                    , JC.Calendar.cnWeek.charAt( _sdate.getDay() % 7 )
            +                                    , JC.Calendar.cnWeek.charAt( _edate.getDay() % 7 )
            +                                    );
            +
            +                        _class = [];
            +
            +                        if( _minvalue && _sdate.getTime() < _minvalue.getTime() ) 
            +                            _class.push( 'unable' );
            +                        if( _maxvalue && _edate.getTime() > _maxvalue.getTime() ){
            +                            _class.push( 'unable' );
            +                        }
            +
            +                        if( _date.getTime() >= _sdate.getTime() && _date.getTime() <= _edate.getTime() ) _class.push( 'cur' );
            +                        if( today >= _sdate.getTime() && today <= _edate.getTime() ) _class.push( 'today' );
            +
            +                        _ls.push( JC.f.printf( '<td class="{0}"><a href="javascript:" title="{1}"'+
            +                                        ' dstart="{3}" dend="{4}" month="{5}" season="{5}" >{2}季度</a></td>'
            +                                    , _class.join(' ')
            +                                    , _title
            +                                    , _cnUnit
            +                                    , _sdate.getTime()
            +                                    , _edate.getTime()
            +                                    , i
            +                                ));
            +                        if( i % 2 === 0 && i != j ) _ls.push( '</tr><tr>' );
            +                    }
            +                    _ls.push('</tr>'); 
            +     
            +                    _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            +            }
            +
            +        , updateSelected: 
            +            function( _userSelectedItem ){
            +                var _p = this, _dstart, _dend, _tmp;
            +                if( !_userSelectedItem ){
            +                    _tmp = this._model.selectedDate();
            +                    _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            +                }else{
            +                    _userSelectedItem = $( _userSelectedItem );
            +                    _tmp = JC.f.getJqParent( _userSelectedItem, 'td' );
            +                    if( _tmp && _tmp.hasClass('unable') ) return;
            +                    _dstart = new Date(); _dend = new Date();
            +                    _dstart.setTime( _userSelectedItem.attr('dstart') );
            +                    _dend.setTime( _userSelectedItem.attr('dend') );
            +                }
            +                if( !( _dstart && _dend ) ) return;
            +
            +                /*
            +                _p._model.selector().val( JC.f.printf( '{0} 至 {1}', JC.f.formatISODate( _dstart ), JC.f.formatISODate( _dend ) ) );
            +                */
            +                _p._model.selector().val( _p._model.fullFormat( _p._model.dateFormat( _dstart ), _p._model.dateFormat( _dend ) ) );
            +                /*
            +                if( _userSelectedItem ){
            +                    _p._model.selector().val( _p._model.selector().val().replace( /YQ/g, 
            +                        _userSelectedItem.attr( 'season' )
            +                    ));
            +                }
            +                */
            +                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'season', _dstart, _dend ] );
            +
            +                JC.Calendar.hide();
            +            }
            +    });
            +
            +    $(document).delegate( [ 'input[datatype=season]', 'input[multidate=season]' ].join(), 'focus' 
            +    , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'button[datatype=season]', 'button[multidate=season]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'textarea[datatype=season]', 'textarea[multidate=season]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Calendar_Calendar.week.js.html b/docs_api/files/.._comps_Calendar_Calendar.week.js.html new file mode 100644 index 000000000..ccd8be0f3 --- /dev/null +++ b/docs_api/files/.._comps_Calendar_Calendar.week.js.html @@ -0,0 +1,568 @@ + + + + + ../comps/Calendar/Calendar.week.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Calendar/Calendar.week.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Calendar.date' ], function(){
            +    //
            +    /// WEEK CODE 
            +    //
            +    /**
            +     * 自定义周弹框的模板HTML
            +     * @for         JC.Calendar
            +     * @property    weekTpl
            +     * @type        string
            +     * @default     empty
            +     * @static
            +     */
            +    JC.Calendar.weekTpl = '';
            +    /**
            +     * 自定义周日历每周的起始日期 
            +     * <br /> 0 - 6, 0=周日, 1=周一
            +     * @for         JC.Calendar
            +     * @property    weekDayOffset
            +     * @static
            +     * @type    int
            +     * @default 1
            +     */
            +    JC.Calendar.weekDayOffset = 0;
            +
            +    function WeekModel( _selector ){
            +        this._selector = _selector;
            +    }
            +    JC.Calendar.WeekModel = WeekModel;
            +    
            +    function WeekView( _model ){
            +        this._model = _model;
            +    }
            +    JC.Calendar.WeekView = WeekView;
            +
            +    JC.Calendar.clone( WeekModel, WeekView );
            +
            +    JC.f.extendObject( WeekModel.prototype, {
            +        layout: 
            +            function(){
            +                var _r = $('#UXCCalendar_week');
            +
            +                if( !_r.length ){
            +                    _r = $( JC.Calendar.weekTpl || this.tpl ).hide();
            +                    _r.attr('id', 'UXCCalendar_week').hide().appendTo( document.body );
            +                  }
            +                return _r;
            +            }
            +        , tpl:
            +            [
            +            '<div id="UXCCalendar_week" class="UXCCalendar UXCCalendar_week" >'
            +            ,'    <div class="UHeader">'
            +            ,'        <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>'
            +            ,'        <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>'
            +            ,'        <select class="UYear" style=""></select>'
            +            ,'    </div>'
            +            ,'    <table class="UTable UTableBorder">'
            +            ,'        <tbody></tbody>'
            +            ,'    </table>'
            +            ,'    <div class="UFooter">'
            +            ,'        <button type="button" class="UConfirm">确定</button>'
            +            ,'        <button type="button" class="UClear">清空</button>'
            +            ,'        <button type="button" class="UCancel">取消</button>'
            +            ,'    </div>'
            +            ,'</div>'
            +            ].join('')
            +
            +        , month:
            +            function(){
            +                var _r = 0, _tmp, _date = new Date();
            +                ( _tmp = this.layout().find('td.cur a[dstart]') ).length
            +                    && ( _date = new Date() )
            +                    && (
            +                            _date.setTime( _tmp.attr('dstart') )
            +                       )
            +                    ;
            +                _r = _date.getMonth();
            +                return _r;
            +            }
            +
            +        , selectedDate:
            +            function(){
            +                var _r, _tmp, _item;
            +                _tmp = this.layout().find('td.cur');
            +                _tmp.length 
            +                    && !_tmp.hasClass( 'unable' )
            +                    && ( _item = _tmp.find('a[dstart]') )
            +                    && ( 
            +                            _r = { 'start': new Date(), 'end': new Date() }
            +                            , _r.start.setTime( _item.attr('dstart') ) 
            +                            , _r.end.setTime( _item.attr('dend') ) 
            +                        )
            +                    ;
            +                return _r;
            +            }
            +
            +        , singleLayoutDate:
            +            function(){
            +                var _p = this
            +                    , _dateo = _p.defaultDate()
            +                    , _day = this.day()
            +                    , _max
            +                    , _curWeek = _p.layout().find('td.cur > a[week]')
            +                    ;
            +                _dateo.date.setDate( 1 );
            +                _dateo.date.setFullYear( this.year() );
            +                _dateo.date.setMonth( this.month() );
            +                _max = JC.f.maxDayOfMonth( _dateo.date );
            +                _day > _max && ( _day = _max );
            +                _dateo.date.setDate( _day );
            +
            +                _curWeek.length && ( _dateo.curweek = parseInt( _curWeek.attr('week'), 10 ) );
            +
            +                return _dateo;
            +            }
            +    });
            +
            +    JC.f.extendObject( WeekView.prototype, {
            +        _buildBody:
            +            function( _dateo ){
            +                var _p = this
            +                    , _date = _dateo.date
            +                    , _layout = _p._model.layout()
            +                    , today = new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() ).getTime()
            +                    , weeks = JC.f.weekOfYear( _date.getFullYear(), JC.Calendar.weekDayOffset )
            +                    , nextYearWeeks = JC.f.weekOfYear( _date.getFullYear() + 1, JC.Calendar.weekDayOffset )
            +                    , nextCount = 0
            +                    , _ls = [], _class, _data, _title, _sdate, _edate, _year = _date.getFullYear()
            +                    , _rows = Math.ceil( weeks.length / 8 )
            +                    , ipt = JC.Calendar.lastIpt
            +                    , currentcanselect = JC.f.parseBool( ipt.attr('currentcanselect') )
            +                    , _wd
            +                    , _minvalue = _dateo.minvalue ? JC.f.cloneDate( _dateo.minvalue ) : null
            +                    , _maxvalue = _dateo.maxvalue ? JC.f.cloneDate( _dateo.maxvalue ) : null
            +                    ;
            +
            +                if( _maxvalue && currentcanselect ){
            +                    _wd = _maxvalue.getDay();
            +                    if( _wd > 0 ) {
            +                        _maxvalue.setDate( _maxvalue.getDate() + ( 7 - _wd ) );
            +                    }else{
            +                    }
            +                }
            +
            +                if( _minvalue && currentcanselect ){
            +                    _wd = _minvalue.getDay();
            +                    if( _wd > 0 ) {
            +                        _minvalue.setDate( _minvalue.getDate() - _wd + 1 );
            +                    }else{
            +                        _minvalue.setDate( _minvalue.getDate() - 6 );
            +                    }
            +                }
            +
            +                _ls.push('<tr>');
            +                for( var i = 1, j = _rows * 8; i <= j; i++ ){
            +                    _data = weeks[ i - 1];
            +                    if( !_data ) {
            +                        _data = nextYearWeeks[ nextCount++ ];
            +                        _year = _date.getFullYear() + 1;
            +                    }
            +                    _sdate = JC.f.pureDate( new Date() ); _edate = JC.f.pureDate( new Date() );
            +                    _sdate.setTime( _data.start ); _edate.setTime( _data.end );
            +
            +                    _title = JC.f.printf( "{0}年 第{1}周\n开始日期: {2} (周{4})\n结束日期: {3} (周{5})"
            +                                , _year
            +                                , JC.Calendar.getCnNum( _data.week )
            +                                , JC.f.formatISODate( _sdate )
            +                                , JC.f.formatISODate( _edate )
            +                                , JC.Calendar.cnWeek.charAt( _sdate.getDay() % 7 )
            +                                , JC.Calendar.cnWeek.charAt( _edate.getDay() % 7 )
            +                                );
            +
            +                    _class = [];
            +
            +                    if( _minvalue && _sdate.getTime() < _minvalue.getTime() ) 
            +                        _class.push( 'unable' );
            +                    if( _maxvalue && _edate.getTime() > _maxvalue.getTime() ){
            +                        _class.push( 'unable' );
            +                    }
            +                    /*
            +                    if( _minvalue && _maxvalue ){
            +                        JC.log( 
            +                                JC.f.formatISODate( _sdate )
            +                                , JC.f.formatISODate( _edate )
            +                                , JC.f.formatISODate( _minvalue )
            +                                , JC.f.formatISODate( _maxvalue )
            +                                , _sdate.getTime() 
            +                                , _edate.getTime() 
            +                                , _minvalue.getTime()
            +                                , _maxvalue.getTime()
            +                            );
            +                    }else if( _minvalue ){
            +                        JC.log( 
            +                                JC.f.formatISODate( _sdate )
            +                                , JC.f.formatISODate( _edate )
            +                                , JC.f.formatISODate( _minvalue )
            +                                , _sdate.getTime() 
            +                                , _edate.getTime() 
            +                                , _minvalue.getTime()
            +                            );
            +                    }else if( _maxvalue ){
            +                        JC.log( 
            +                                JC.f.formatISODate( _sdate )
            +                                , JC.f.formatISODate( _edate )
            +                                , JC.f.formatISODate( _maxvalue )
            +                                , _sdate.getTime() 
            +                                , _edate.getTime() 
            +                                , _maxvalue.getTime()
            +                            );
            +                    }
            +                    */
            +
            +                    if( _dateo.curweek ){
            +                        if( _data.week == _dateo.curweek 
            +                            && _date.getFullYear() == _sdate.getFullYear() 
            +                            ) _class.push( 'cur' );
            +                    }else{
            +                        if( _date.getTime() >= _sdate.getTime() && _date.getTime() <= _edate.getTime() ) _class.push( 'cur' );
            +                    }
            +
            +                    if( today >= _sdate.getTime() && today <= _edate.getTime() ) _class.push( 'today' );
            +
            +                    _ls.push( JC.f.printf( '<td class="{0}"><a href="javascript:" title="{2}"'+
            +                                    ' dstart="{3}" dend="{4}" week="{1}" date="{5}" >{1}</a></td>'
            +                                , _class.join(' ')
            +                                , _data.week 
            +                                , _title
            +                                , _sdate.getTime()
            +                                , _edate.getTime()
            +                                , _dateo.date.getTime()
            +                            ));
            +                    if( i % 8 === 0 && i != j ) _ls.push( '</tr><tr>' );
            +                }
            +                _ls.push('</tr>'); 
            +
            +                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) );
            +            }
            +
            +        , updateSelected:
            +            function( _userSelectedItem ){
            +                var _p = this, _dstart, _dend, _tmp;
            +                if( !_userSelectedItem ){
            +                    _tmp = this._model.selectedDate();
            +                    _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            +                }else{
            +                    _userSelectedItem = $( _userSelectedItem );
            +                    _tmp = JC.f.getJqParent( _userSelectedItem, 'td' );
            +                    if( _tmp && _tmp.hasClass('unable') ) return;
            +                    _dstart = new Date(); _dend = new Date();
            +                    _dstart.setTime( _userSelectedItem.attr('dstart') );
            +                    _dend.setTime( _userSelectedItem.attr('dend') );
            +                }
            +                if( !( _dstart && _dend ) ) return;
            +
            +                /*
            +                _p._model.selector().val( 
            +                        JC.f.printf( '{0} 至 {1}', JC.f.formatISODate( _dstart ), JC.f.formatISODate( _dend ) ) 
            +                );
            +                */
            +                _p._model.selector().val( _p._model.fullFormat( _p._model.dateFormat( _dstart ), _p._model.dateFormat( _dend ) ) ); 
            +                /*
            +                if( _userSelectedItem ){
            +                    _p._model.selector().val( _p._model.selector().val().replace( /WK/g, 
            +                        JC.f.padChar( _userSelectedItem.attr( 'week' ) )
            +                    ));
            +                }
            +                */
            +                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'week', _dstart, _dend ] );
            +
            +                JC.Calendar.hide();
            +            }
            +
            +    });
            +
            +    $(document).delegate( [ 'input[datatype=week]', 'input[multidate=week]' ].join(), 'focus' 
            +    , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'button[datatype=week]', 'button[multidate=week]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'textarea[datatype=week]', 'textarea[multidate=week]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Calendar_Calendar.year.js.html b/docs_api/files/.._comps_Calendar_Calendar.year.js.html new file mode 100644 index 000000000..3b942c9df --- /dev/null +++ b/docs_api/files/.._comps_Calendar_Calendar.year.js.html @@ -0,0 +1,527 @@ + + + + + ../comps/Calendar/Calendar.year.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Calendar/Calendar.year.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Calendar.date' ], function(){
            +    //
            +    /// YEAR CODE
            +    //
            +    /**
            +     * 自定义周弹框的模板HTML
            +     * @for         JC.Calendar
            +     * @property    yearTpl
            +     * @type        string
            +     * @default     empty
            +     * @static
            +     */
            +    JC.Calendar.yearTpl = '';
            +
            +    function YearModel( _selector ){
            +        this._selector = _selector;
            +    }
            +    JC.Calendar.YearModel = YearModel;
            +    
            +    function YearView( _model ){
            +        this._model = _model;
            +    }
            +    JC.Calendar.YearView = YearView;
            +
            +    JC.Calendar.clone( YearModel, YearView );
            +
            +    JC.f.extendObject( YearModel.prototype, {
            +        layout: 
            +            function(){
            +                var _r = $('#UXCCalendar_year');
            +
            +                if( !_r.length ){
            +                    _r = $( JC.Calendar.yearTpl || this.tpl ).hide();
            +                    _r.attr('id', 'UXCCalendar_year').hide().appendTo( document.body );
            +                 }
            +                return _r;
            +            }
            +
            +        , tpl:
            +            [
            +            '<div id="UXCCalendar_year" class="UXCCalendar UXCCalendar_week UXCCalendar_year">\n'
            +            ,'    <table class="UTable UTableBorder">\n'
            +            ,'        <tbody>\n'
            +            ,'            <tr>\n'
            +            ,'                <td class="UYearBox">\n'
            +            ,'                    <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>\n'
            +            ,'                </td>\n'
            +            ,'                <td></td><td></td><td></td><td></td>\n'
            +            ,'            </tr>\n'
            +            ,'            <tr><td></td><td></td><td></td><td></td><td></td></tr>\n'
            +            ,'            <tr><td></td><td></td><td></td><td></td><td></td></tr>\n'
            +            ,'            <tr><td></td><td></td><td></td><td></td><td></td></tr>\n'
            +            ,'            <tr><td></td><td></td><td></td><td></td><td></td></tr>\n'
            +            ,'            <tr><td></td><td></td><td></td><td></td><td></td></tr>\n'
            +            ,'            <tr>\n'
            +            ,'                <td></td><td></td><td></td><td></td>\n'
            +            ,'                <td class="UYearBox">\n'
            +            ,'                    <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>\n'
            +            ,'                </td>\n'
            +            ,'            </tr>\n'
            +            ,'        </tbody>\n'
            +            ,'    </table>\n'
            +            ,'    <div class="UFooter">\n'
            +            ,'        <button type="button" class="UConfirm">确定</button>\n'
            +            ,'        <button type="button" class="UClear">清空</button>\n'
            +            ,'        <button type="button" class="UCancel">取消</button>\n'
            +            ,'    </div>\n'
            +            ,'</div>\n'
            +            ].join('')
            +
            +        , selectedDate:
            +            function(){
            +                var _r, _tmp, _item;
            +                _tmp = this.layout().find('td.cur');
            +                _tmp.length 
            +                    && !_tmp.hasClass( 'unable' )
            +                    && ( _item = _tmp.find('a[dstart]') )
            +                    && ( 
            +                            _r = { 'start': new Date(), 'end': new Date() }
            +                            , _r.start.setTime( _item.attr('dstart') ) 
            +                            , _r.end.setTime( _item.attr('dend') ) 
            +                        )
            +                    ;
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( YearView.prototype, {
            +
            +        _buildBody:
            +            function( _dateo ){
            +                var _p = this
            +                    , _selector = _p._model.selector()
            +                    , _v = _selector.val().trim()
            +                    , _selectedYear = _v.replace( /[^\d]+/g, '' )
            +                    , _d = _dateo.date
            +                    , today = new Date().getFullYear()
            +                    , _layout = _p._model.layout()
            +                    , _tds = _layout.find( 'tbody > tr > td' )
            +                    , _len = _tds.length - 1
            +                    , _yearCount 
            +                    , _yearEnd
            +                    , _year
            +                    , currentcanselect = JC.f.parseBool( _selector.attr('currentcanselect') )
            +                    , _title, _class, _dstart, _dend
            +                    ;
            +
            +                _selectedYear && ( _selectedYear = _selectedYear.slice( 0, 4 ) );
            +                !_selectedYear && ( _selectedYear = today );
            +
            +                _year = _d.getFullYear();
            +                _yearCount = _year - Math.floor( _len / 2 );
            +                
            +                if( _dateo.minvalue && currentcanselect ){
            +                    _dateo.minvalue.setFullYear( _dateo.minvalue.getFullYear() - 1 );
            +                }
            +
            +                if( _dateo.maxvalue && currentcanselect ){
            +                    _dateo.maxvalue.setFullYear( _dateo.maxvalue.getFullYear() + 1 );
            +                }
            +                
            +                _tds.each( function( _ix, _item ){
            +                    _item = $( _item );
            +                    if( _ix == 0 || _ix == _len ){
            +                    }else{
            +                        //_item.html( JC.f.printf( '<a href="javascript:">{0}</a>', _yearCount ) );
            +
            +                        _title = JC.f.printf( "{0}年", _yearCount );
            +                        _class = [];
            +
            +                        _dstart = new Date( _yearCount, 0, 1 );
            +                        _dend = new Date( _yearCount, 11, 31 );
            +
            +                        if( _dateo.minvalue && _dstart.getFullYear() <= _dateo.minvalue.getFullYear() ){ 
            +                            _class.push( 'unable' );
            +                        }
            +                        if( _dateo.maxvalue && _dend.getFullYear() >= _dateo.maxvalue.getFullYear() ){
            +                            _class.push( 'unable' );
            +                        }
            +
            +                        _selectedYear && _selectedYear == _yearCount && _class.push( 'cur' );
            +
            +                        today == _yearCount && _class.push( 'today' );
            +
            +                        _item.html( JC.f.printf( '<a href="javascript:" title="{0}"'+
            +                                        ' dstart="{1}" dend="{2}" " >{3}</a></td>'
            +                                    , _title
            +                                    , _dstart.getTime()
            +                                    , _dend.getTime()
            +                                    , _yearCount
            +                                ));
            +                        _item.prop( 'className', _class.join( ' ' ) );
            +                    }
            +                    _yearCount++;
            +                });
            +            }
            +
            +        , updateSelected: 
            +            function( _userSelectedItem ){
            +                var _p = this, _dstart, _dend, _tmp;
            +                if( !_userSelectedItem ){
            +                    _tmp = this._model.selectedDate();
            +                    _tmp && ( _dstart = _tmp.start, _dend = _tmp.end );
            +                }else{
            +                    _userSelectedItem = $( _userSelectedItem );
            +                    _tmp = JC.f.getJqParent( _userSelectedItem, 'td' );
            +                    if( _tmp && _tmp.hasClass('unable') ) return;
            +                    _dstart = new Date(); _dend = new Date();
            +                    _dstart.setTime( _userSelectedItem.attr('dstart') );
            +                    _dend.setTime( _userSelectedItem.attr('dend') );
            +                }
            +                if( !( _dstart && _dend ) ) return;
            +
            +                _p._model.selector().val( _p._model.fullFormat( _p._model.dateFormat( _dstart ), _p._model.dateFormat( _dend ) ) );
            +                $(_p).trigger( 'TriggerEvent', [ JC.Calendar.Model.UPDATE, 'year', _dstart, _dend ] );
            +
            +                JC.Calendar.hide();
            +            }
            +
            +        , updateYear:
            +            function( _offset ){
            +                if( typeof _offset == 'undefined' || _offset == 0 ) return;
            +
            +                var _dateo = this._model.layoutDate(), _date;
            +
            +                this._model.multiselect() 
            +                    ? this.updateMultiYear( _offset )
            +                    : this.updateSingleYear( _offset )
            +                    ;
            +            }
            +
            +        , updateSingleYear:
            +            function( _offset ){
            +                if( !_offset ) return;
            +                var _dateo = this._model.layoutDate()
            +                    , _a = this._model.layout().find( 'a[dstart]' )
            +                    , _firstA = _a.first()
            +                    , _lastA = _a.last()
            +                    , _dstart = new Date(), _dend = new Date()
            +                    , _offsetYear = 17
            +                    , _tmpYear
            +                    ;
            +
            +                if( _offset > 0 ){
            +                    _dstart.setTime( _lastA.attr( 'dstart' ) );
            +                    _dend.setTime( _lastA.attr( 'dend' ) );
            +                    _dateo.date = _dstart;
            +                    _dateo.enddate = _dend;
            +
            +                    _dateo.date.setFullYear( _dateo.date.getFullYear() + _offsetYear );
            +                    _dateo.enddate.setFullYear( _dateo.enddate.getFullYear() + _offsetYear );
            +                }else{
            +                    _dstart.setTime( _firstA.attr( 'dstart' ) );
            +                    _dend.setTime( _firstA.attr( 'dend' ) );
            +                    _dateo.date = _dstart;
            +                    _dateo.enddate = _dend;
            +
            +                    _dateo.date.setFullYear( _dateo.date.getFullYear() - _offsetYear );
            +                    _dateo.enddate.setFullYear( _dateo.enddate.getFullYear() - _offsetYear );
            +                }
            +                var _min = _dateo.date.getFullYear() - _offsetYear + 1
            +                    , _max = _dateo.date.getFullYear() + _offsetYear - 1
            +                    ; 
            +                //JC.log( JC.f.formatISODate( _dateo.date ), JC.f.formatISODate( _dateo.minvalue ), _min, _max );
            +                if( _dateo.minvalue && _dateo.minvalue.getFullYear() > _max ) return;
            +                if( _dateo.maxvalue && _dateo.maxvalue.getFullYear() < _min ) return;
            +
            +                this._buildLayout( _dateo );
            +                this._buildDone();
            +            }
            +    });
            +
            +    $(document).delegate( [ 'input[datatype=year]', 'input[multidate=year]' ].join(), 'focus' 
            +    , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'button[datatype=year]', 'button[multidate=year]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +    $(document).delegate( [ 'textarea[datatype=year]', 'textarea[multidate=year]' ].join(), 'click' , function($evt){
            +            Calendar.pickDate( this );
            +    });
            +
            +    return JC.Calendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_DCalendar_DCalendar.date.js.html b/docs_api/files/.._comps_DCalendar_DCalendar.date.js.html new file mode 100644 index 000000000..4fb5c63ec --- /dev/null +++ b/docs_api/files/.._comps_DCalendar_DCalendar.date.js.html @@ -0,0 +1,1797 @@ + + + + + ../comps/DCalendar/DCalendar.date.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/DCalendar/DCalendar.date.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( ['JC.BaseMVC'], function () {
            +/**
            + * 双日历日期选择组件
            + * <p>
            + *      <b>require</b>: 
            + *          <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.DCalendar.html' target='_blank'>API docs</a>
            + * | <a href='../../comps/DCalendar/_demo' target='_blank'>demo link</a></p>
            + *
            + * <p></p>
            + *
            + * <h2>可用的 HTML attribute</h2>
            + *
            + * <dl>
            + *      <dt>datatype = string 必填项</dt>
            + *      <dd>声明日历控件的类型:
            + *      <br/><b>ddate:</b> 日期日历
            + *      <br/><b>drange:</b> 日期范围日历( 成对出现 )
            + *      </dd>
            + *
            + *      <dt>minvalue = ISO Date</dt>
            + *      <dd>日期的最小时间, YYYY-MM-DD</dd>
            + *
            + *      <dt>maxvalue = ISO Date</dt>
            + *      <dd>日期的最大时间, YYYY-MM-DD</dd>
            + *
            + *      <dt>currentcanselect = bool, default = true</dt>
            + *      <dd>当前日期是否能选择</dd>
            + *
            + *      <dt>monthmum = int</dt>
            + *      <dd>
            + *          声明显示月份日历面板的个数(一次性可显示2到12个月份),默认为2(双日历)
            + *      </dd>
            + *
            + *      <dt>showtype = block || float </dt>
            + *      <dd>
            + *          声明月份日历面板的显示方式,默认为float<br/>
            + *          float(比如两个月份并排显示) <a href="../../modules/JC.DCalendar/0.1/res/default/style.html#float" target="_blank">查看</a><br/>
            + *          block (月份日历面板竖排显示)<a href="../../modules/JC.DCalendar/0.1/res/default/style.html#block" target="_blank">查看</a><br/>
            + *      </dd>
            + *
            + *      <dt>calendarshow = function</dt>
            + *      <dd>显示日历显示后的回调
            +<pre>function calendarShow( selector ) {
            +    var ins = this;
            +    JC.log( "calendarshow", new Date().getTime(), selector.val() );
            +}</pre></dd>
            + *
            + *      <dt>calendarhide = function</dt>
            + *      <dd>隐藏日历后的回调
            +<pre>function calendarhide( selector ) {
            +    JC.log( "calendarhide", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *      <dt>calendarclear = function</dt>
            + *      <dd>清空选中日期后的回调
            +<pre>function calendarclear( selector ) {
            +    JC.log( "calendarclear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updatedate = function</dt>
            + *     <dd>选中日期后回调
            +<pre>function updatedate( selector ) {
            +    JC.log( "updatedate", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updatemonth = function</dt>
            + *     <dd>选中月份后回调
            +<pre>function updatemonth( selector ) {
            +    JC.log( "updatedatemonth", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updateyear = function</dt>
            + *     <dd>选中年份后回调
            +<pre>function updateyear( selector ) {
            +    JC.log( "updatedateyear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>beforeupdateyear = function</dt>
            + *     <dd>更新年份前的回调,即年份日历面板出来时
            +<pre>function beforeupdateyear( selector ) {
            +    JC.log( "beforeupdateyear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>beforeupdatemonth = function</dt>
            + *     <dd>更新月份前的回调,即月份日历面板出来时
            +<pre>function beforeupdateymonth( selector ) {
            +    JC.log( "beforeupdateymonth", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>beforeupdatemont = function</dt>
            + *     <dd>更新月份前的回调,即月份日历面板出来时
            +<pre>function beforeupdateymonth( selector ) {
            +    JC.log( "beforeupdateymonth", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updateprevpageyear = function</dt>
            + *     <dd>点击上一页年份时的回调
            +<pre>function updatprevtpageyear( selector ) {
            +    JC.log( "updateprevpageyear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updatenextpageyear = function</dt>
            + *     <dd>点击下一页年份时的回调
            +<pre>function updatenextpageyear( selector ) {
            +    JC.log( "updatenextpageyear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updateprevyear = function</dt>
            + *     <dd>点击上一年时的回调,月份日历面板点击上一页
            +<pre>function updatprevyear( selector ) {
            +    JC.log( "updateprevyear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updatenextyear = function</dt>
            + *     <dd>点击下一年时的回调,月份日历面板点击下一页
            +<pre>function updatenextyear( selector ) {
            +    JC.log( "updatenextyear", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updateprevmonth = function</dt>
            + *     <dd>点击上一月时的回调,日期日历面板点击上一页
            +<pre>function updatprevmonth( selector ) {
            +    JC.log( "updateprevmonth", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + *     <dt>updatenextmonth = function</dt>
            + *     <dd>点击下一月时的回调,日期日历面板点击下一页
            +<pre>function updatenextmonth( selector ) {
            +    JC.log( "updatenextmonth", $(selector).val(), new Date().getTime() );
            +}</pre></dd>
            + *
            + * </dl> 
            + *
            + * @namespace JC
            + * @class DCalendar
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-20
            + * @author  zuojing   <zuojing1013@gmail.com> | 75 Team
            +*/
            +    JC.DCalendar = DCalendar;
            +    JC.f.addAutoInit && JC.f.addAutoInit( DCalendar );
            +
            +    function DCalendar(_selector) {
            +        _selector && (_selector = $(_selector));
            +        if ( DCalendar.getInstance(_selector) ) return DCalendar.getInstance(_selector);
            +        DCalendar.getInstance(_selector, this);
            +        this._model = new DCalendar.Model(_selector);
            +        this._view = new DCalendar.View(this._model);
            +        this._init();
            +
            +        //JC.log( 'DCalendar inited', new Date().getTime() );
            +    }
            +
            +    /**
            +     * 获取或设置 DCalendar 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {DCalendarInstance}
            +     */
            +    DCalendar.getInstance = function (_selector, _setter) {
            +        var _type = DCalendar._type( _selector );
            +
            +        if ( typeof _selector === 'string' && !/</.test( _selector ) ) 
            +            _selector = $(_selector);
            +        
            +        if ( !(_selector && _selector.length ) || ( typeof _selector === 'string' ) ) return;
            +        
            +        if ( typeof _setter !== 'undefined' ) {
            +            DCalendar.ins[_type] = _setter;
            +        }
            +        
            +        return DCalendar.ins[_type];
            +    };
            +
            +    DCalendar.ins = {};
            +    /**
            +     * 初始化可识别的 DCalendar 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @param   {bool}          _onlyStatus     default = false
            +     * @static
            +     * @return  {Array of DCalendarInstance}
            +     */
            +    DCalendar.init = function (_selector, _onlyStatus) {
            +        var _r = [] ;
            +
            +        typeof _selector === 'boolean' && ( _onlyStatus = _selector, _selector = document );
            +        
            +        _selector = $(_selector || document);
            +
            +        if ( _selector.length ) {
            +            var _nodeName = _selector.length === 1 ? _selector.prop('nodeName').toLowerCase() : '';
            +
            +            if ( _nodeName && (_nodeName === 'input' || _nodeName === 'button') ) {
            +                DCalendar._initStatus( _selector );
            +                
            +            } else {
            +                _selector.find([ 
            +                                    'input[datatype=ddate]'
            +                                    , 'input[datatype=drange]'
            +                                    , 'button[datatype=ddate]' 
            +                                    , 'input[multidate=ddate]' 
            +                                    , 'button[multidate=ddate]' 
            +                                ].join()).each( function() {
            +                    DCalendar._initStatus( $(this) );
            +                    
            +                })
            +            }
            +        }
            +
            +        return _r;
            +    };
            +
            +    /**
            +     * 初始化可识别的 DCalendar 的状态
            +     * @method  _initStatus
            +     * @param   {selector}      _selector
            +     * @static
            +     * @protected
            +     */
            +    DCalendar._initStatus = function (_selector) {
            +        var _tmp;
            +
            +        _selector && ( _selector = $(_selector) );
            +        if( !( _selector && _selector.length ) ) return;
            +        
            +        _selector.val() 
            +            && ( _tmp = JC.f.dateDetect( _selector.val() ) )
            +            && _selector.val( JC.f.formatISODate( _tmp )  )
            +
            +        _selector.attr('minValue')
            +            && ( _tmp = JC.f.dateDetect( _selector.attr('minValue') ) )
            +            && _selector.attr('minValue', JC.f.formatISODate( _tmp ))
            +
            +
            +        _selector.attr( 'maxValue' )
            +            && ( _tmp = JC.f.dateDetect( _selector.attr('maxValue') ) )
            +            && _selector.attr('maxValue', JC.f.formatISODate( _tmp )  )
            +
            +        _selector.addClass('CDCalendar_icon');
            +    };
            +
            +    DCalendar._type = function (_selector) {
            +        // var _r, 
            +        //     _type = ( ($.trim(_selector.attr('multidate')) || '').toLowerCase()  )
            +        //         || ( ($.trim(_selector.attr('datatype')) || '') .toLowerCase() );
            +
            +        // _selector && ( _selector = $(_selector) );
            +            
            +        // switch ( _type ) {
            +        //     case 'week': 
            +        //     case 'month': 
            +        //     case 'season': 
            +        //     case 'year': 
            +        //     case 'monthday': 
            +        //         {
            +        //             _r = _type;
            +        //             break;
            +        //         }
            +        //     default: 
            +        //         _r = 'ddate'; 
            +        //         break;
            +        // }
            +
            +        return '_ddate';
            +    },
            +
            +    DCalendar.update = function () {
            +        var _items = $(JC.f.printf( '#{0}>div', DCalendar.Model._boxId ));
            +
            +        if( !_items.length ) return;
            +
            +        _items.each( function() {
            +            var _p = $(this), 
            +                _ins = _p.data( 'CDCalendarIns' );
            +
            +            if( !_ins ) return;
            +
            +            if ( _ins._model.layout().is(':visible') ) {
            +                _ins.update();
            +            }
            +
            +        });
            +    },
            +
            +    /**
            +     * 弹出日期选择框
            +     * @method pickDate
            +     * @static
            +     * @param   {selector}  _selector 需要显示日期选择框的标签 
            +     * @example
            +            <dl>
            +                <dd>
            +                    <input type="text" name="date6" class="manualPickDate" value="20110201" />
            +                    manual JC.DCalendar.pickDate
            +                </dd>
            +                <dd>
            +                    <input type="text" name="date7" class="manualPickDate" />
            +                    manual JC.DCalendar.pickDate
            +                </dd>
            +            </dl>
            +            <script>
            +                $(document).delegate('input.manualPickDate', 'focus', function($evt){
            +                    JC.DCalendar.pickDate( this );
            +                });
            +            </script>
            +     */  
            +    DCalendar.pickDate = function (_selector) {
            +        var _selector = $(_selector),
            +            _ins, 
            +            _isIgnore = _selector.is('[ignoreprocess]');
            +
            +        if ( !(_selector && _selector.length) ) return;
            +        
            +        if ( ( $(DCalendar.lastSrc)[0] === _selector[0]) && DCalendar.visible ) {
            +            _selector.attr('cdc_ignore', true);
            +        } else {
            +            _selector.attr('cdc_ignore', false);
            +        }
            +
            +        if ( JC.f.parseBool( _selector.attr('cdc_ignore') ) ) {
            +            return;
            +        }
            +
            +        DCalendar.lastSrc = _selector;
            +        DCalendar.visible = false;
            +
            +        _selector.attr('ignoreprocess', true)
            +            .addClass('js_compDCalendar')
            +            .blur();
            +
            +        !_isIgnore && _selector.removeAttr('ignoreprocess');
            +
            +        _ins = DCalendar.getInstance( _selector );
            +        !_ins && ( _ins = new DCalendar( _selector ) );
            +
            +        _ins.trigger(DCalendar.Model.SHOW);
            +
            +        return this;
            +    },
            +
            +    DCalendar.lastSrc = null,
            +
            +    BaseMVC.build(DCalendar);
            +
            +    JC.f.extendObject(DCalendar.prototype, {
            +        _beforeInit: function () {
            +            //this.trigger(DCalendar.Model.CDC_INITED );
            +        },
            +
            +        _initHanlderEvent: function () {
            +            var _p = this;
            +
            +            _p.on('CDC_INITED', function () {
            +                _p._model.selector().addClass('CDCalendar_icon');
            +            });
            +
            +            _p._model.selector().on('keydown', function ( _evt ) {
            +                _evt.preventDefault();
            +            });
            +
            +            _p.on(DCalendar.Model.SHOW, function () {
            +                _p._model.selector(DCalendar.lastSrc);
            +                _p._view.show();
            +                DCalendar.visible = true;
            +                _p._model.calendarshow()
            +                    && _p._model.calendarshow().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.HIDDEN, function () {
            +                _p._model.selector().addClass('cdc_ignore', false);
            +                _p._view.hide();
            +                DCalendar.visible = false;
            +                _p.selector().blur();
            +                _p._model.calendarhide()
            +                    && _p._model.calendarhide().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.CHANGE, function (_evt, _srcSelector) {
            +                _p._view.change(_srcSelector);
            +            });
            +
            +            _p.on(DCalendar.Model.SETDATE, function (_evt, _srcSelector) {
            +                _p._model.setSelected(_srcSelector);
            +                _p._model.updatedate()
            +                    && _p._model.updatedate().call(_p, _p.selector());
            +
            +            });
            +
            +            // _p.on(DCalendar.Model.UPDATESELECTOR, function (_evt, _srcSelector) {
            +
            +            // });
            +
            +            _p.on(DCalendar.Model.CLEAR, function () {
            +                _p._model.clear();
            +                _p._model.calendarclear()
            +                    && _p._model.calendarclear().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.DATEVIEW, function (_evt, _srcSelector) {
            +                _p._view.dateView(_srcSelector);
            +                _p._model.updatemonth()
            +                    && _p._model.updatemonth().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.MONTHVIEW, function (_evt, _srcSelector) {
            +                _p._view.monthView(_srcSelector);
            +
            +                if ( $(_srcSelector).attr('data-year') ) {
            +                    _p._model.updateyear()
            +                    && _p._model.updateyear().call(_p, _p.selector());
            +                } else {
            +                    _p._model.beforeupdatemonth()
            +                        && _p._model.beforeupdatemonth().call(_p, _p.selector());
            +                }
            +                
            +            });
            +
            +            _p.on(DCalendar.Model.YEARVIEW, function (_evt, _srcSelector) {
            +                _p._view.yearView(_srcSelector);
            +                _p._model.beforeupdateyear()
            +                    && _p._model.beforeupdateyear().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.UPDATENEXTPAGEYEAR, function () {
            +                _p._model.updatenextpageyear()
            +                    && _p._model.updatenextpageyear().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.UPDATEPREVPAGEYEAR, function () {
            +                _p._model.updateprevpageyear()
            +                    && _p._model.updateprevpageyear().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.UPDATEPREVMONTH, function () {
            +                _p._model.updateprevmonth()
            +                    && _p._model.updateprevmonth().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.UPDATENEXTMONTH, function () {
            +                _p._model.updatenextmonth()
            +                    && _p._model.updatenextmonth().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.UPDATEPREVYEAR, function () {
            +                _p._model.updateprevyear()
            +                    && _p._model.updateprevyear().call(_p, _p.selector());
            +            });
            +
            +            _p.on(DCalendar.Model.UPDATENEXTYEAR, function () {
            +                _p._model.updatenextyear()
            +                    && _p._model.updatenextyear().call(_p, _p.selector());
            +            });
            +
            +        }, 
            +
            +        _inited: function () {
            +            
            +        }
            +
            +    });
            +    
            +    DCalendar.Model._instanceName = "DCalendar";
            +    DCalendar.Model.CDC_INITED = "CDC_INITED";
            +    DCalendar.Model._boxId = "CompDCalendar";
            +    DCalendar.Model.SHOW = "CDC_SHOW";
            +    DCalendar.Model.HIDDEN = "CDC_HIDDEN";
            +    DCalendar.Model.CHANGE = "CDC_CHANGE";
            +    DCalendar.Model.SETDATE = "CDC_SETDATE";
            +    DCalendar.Model.DATEVIEW = "CDC_DATEVIEW";
            +    DCalendar.Model.MONTHVIEW = "CDC_MONTHVIEW";
            +    DCalendar.Model.YEARVIEW = "CDC_YEARVIEW";
            +    DCalendar.Model.CLEAR = "CDC_CLEAR";
            +    //DCalendar.Model.UPDATESELECTOR = "CDC_UPDATESELECTOR";
            +    DCalendar.Model.UPDATENEXTPAGEYEAR = "CDC_UPDATENEXTPAGEYEAR";
            +    DCalendar.Model.UPDATEPREVPAGEYEAR = "CDC_UPDATEPREVPAGEYEAR";
            +    DCalendar.Model.UPDATEPREVMONTH = "CDC_UPDATEPREVMONTH";
            +    DCalendar.Model.UPDATENEXTMONTH = "CDC_UPDATENEXTMONTH";
            +    DCalendar.Model.UPDATEPREVYEAR = "CDC_UPDATEPREVYEAR";
            +    DCalendar.Model.UPDATENEXTYEAR = "CDC_UPDATENEXTYEAR";
            +
            +    JC.f.extendObject(DCalendar.Model.prototype, {
            +        init: function () {
            +            var _p = this;
            +        },
            +
            +        isDCalendar: function ( _selector ) {
            +            var _selector = $(_selector),
            +                _r = 0;
            +            
            +            if ( _selector.length ) {
            +                
            +                if ( _selector.prop('nodeName') 
            +                    && _selector.attr('datatype')
            +                    && ( _selector.prop('nodeName').toLowerCase() === 'input' 
            +                        || _selector.prop('nodeName').toLowerCase() === 'button' )
            +                    && ( (_selector.attr('datatype') || '').toLowerCase() === 'ddate' 
            +                        || ( _selector.attr('multidate') || '' ).toLowerCase() === 'ddate' )
            +                ) {
            +                    _r = 1;
            +                }
            +
            +                _selector.hasClass('js_compDCalendar') && ( _r = 1 );
            +            }
            +
            +            return _r;
            +
            +        },
            +
            +        curSelectedDate: function () {
            +            var _p = this,
            +                _r = _p.selector().val().trim();
            +
            +            _r = ( JC.f.dateDetect(_r) || new Date() );
            +
            +            return _r;
            +
            +        },
            +
            +        curYear: function () {
            +            return this.curSelectedDate().getFullYear();
            +        },
            +        
            +        curMonth: function () {
            +            return this.curSelectedDate().getMonth();
            +        },
            +
            +        minValue: function () {
            +            var _r =  this.attrProp('minValue') || '';            
            +            
            +            _r && ( _r = JC.f.dateDetect(_r) );
            +
            +            return _r;
            +        },
            +
            +        maxValue: function () {
            +            var _r = this.attrProp('maxValue') || ''; 
            +            
            +            _r && ( _r = JC.f.dateDetect(_r) );
            +
            +            return _r;
            +        },
            +
            +        minYear: function () {
            +            var _p = this,
            +                _r;
            +
            +            _p.minValue() && ( _r = _p.minValue().getFullYear() );
            +
            +            return _r;
            +        },
            +
            +        maxYear: function () {
            +            var _p = this,
            +                _r;
            +
            +            _p.maxValue() && ( _r = _p.maxValue().getFullYear() );
            +
            +            return _r;
            +        },
            +
            +        currentCanSelect: function () {
            +            var  _r = this.boolProp('currentCanSelect');
            +
            +            ( typeof _r === 'undefined' ) && ( _r = true );
            +
            +            return _r;
            +        },
            +
            +        weekendCanSelect: function () {
            +            var  _r = this.boolProp('weekendCanSelect');
            +
            +            ( typeof _r === 'undefined' ) && ( _r = true );
            +
            +            return _r;
            +        },
            +
            +        /**
            +         * 显示的月份面板为2到12个
            +        */
            +        monthNum: function () {
            +            var _r = this.intProp('monthNum');
            +
            +            (!_r || _r < 2 || _r > 12) && ( _r = 2 );
            +
            +            return _r;
            +        },
            +
            +        showtype: function () {
            +            var _r = this.attrProp('showtype');
            +
            +            if ( _r === 'block' ) {
            +                _r = 'block';
            +            } else {
            +                _r = "float";
            +            }
            +
            +            return _r;
            +        },
            +
            +        // multiselect: function () {
            +        //     var _r = this.boolProp('multiselect');
            +
            +        //     ( typeof _r === 'undefined' ) && ( _r = false );
            +
            +        //     return _r;
            +        // },
            +
            +        allYearsTpl: function (_startYear, _endYear) {
            +            //前14年后13年
            +            var _p = this,
            +                _r = '<tr>',
            +                i,
            +                j;
            +
            +            for ( i = _startYear, j = 1; i <= _endYear; i++ ) {
            +                _r += '<td><a href="javascript:;" class="js_compDCYear" data-year="' + i + '">' + i + '</a></td>'
            +
            +                if ( j % 7 === 0 ) {
            +                    if ( j === 28 ) {
            +                        _r += '</tr><tr>'
            +                        return _r;
            +                    } else {
            +                        _r += '</tr>'
            +                    }
            +                }
            +
            +                j++
            +            }
            +
            +            return _r;
            +
            +        },
            +
            +        datesOfMonthTpl: function (_date) {
            +           
            +            var _p = this,
            +                _r = '<tr>',
            +                _t,
            +                _d,
            +                _today = new Date(),
            +                _formatDate,
            +                _day,
            +                _maxDayOfMonth = JC.f.maxDayOfMonth(_date),
            +                _placeholder = '',
            +                i,
            +                j,
            +                _todayClass,
            +                _weekendClass;
            +
            +            for ( i = 1; i <= _maxDayOfMonth; i++ ) {
            +                _d = new Date(_date.getFullYear(), _date.getMonth(), i);
            +                _formatDate = JC.f.formatISODate(_d);
            +                _day = (_d.getDay() + 6) % 7;
            +                _todayClass = '';
            +                _weekendClass = '';
            +
            +                ( JC.f.isSameDay(_today, _d) ) && ( _todayClass = "today" );
            +                ( _day === 5 || _day === 6 ) && ( _weekendClass = "weekend" ); 
            +                
            +                _t = '<td>' 
            +                    + '<a href="javascript:;" title="' + _formatDate 
            +                    + '" data-date="' + _formatDate 
            +                    + '" class="' + _todayClass + _weekendClass
            +                    + '" >' + i 
            +                    + '</a></td>'; 
            +               
            +                if ( i === 1 && _day > 0) {
            +                    
            +                    j = _day;
            +
            +                    while ( j-- ) {
            +                        _placeholder += '<td ><a href="javascript:;" class="disabled"></a></td>';
            +                    }
            +
            +                    _r = _r + _placeholder;
            +                    _placeholder = '';
            +                   
            +                }
            +
            +                _r += _t;
            +
            +                if ( i === _maxDayOfMonth && _day < 6) {
            +
            +                    j = 6 - _day;
            +
            +                    while ( j-- ) {
            +                        _placeholder += '<td><a href="javascript:;" class="disabled"></a></td>';
            +                    }
            +
            +                    _r = _r + _placeholder;
            +                    _placeholder = '';
            +
            +                }
            +
            +                if ( _day === 6 ) {
            +                    if ( i === _maxDayOfMonth ) {
            +                        _r = _r + '</tr>';
            +                    } else {
            +                        _r = _r + '</tr><tr>';
            +                    }
            +                }
            +
            +            }
            +  
            +            return _r;
            +
            +        },
            +
            +        monthTpl: '<div class="CDC_inner">'
            +                    + '<div class="CDC_header">'
            +                        + '<div class="CDC_header_tools">'
            +                            + '<a href="javascript:;" data-date="{2}" class="CDC_Date">返回今天</a>'
            +                            + '<a href="javascript:;" data-date="{3}" class="CDC_Date">返回选中日期</a>'
            +                        + '</div>'
            +                        + '<h4>'
            +                            + '<a href="javascript:;" data-date="{1}" class="CDC_Year">{0}</a>'
            +                        + '</h4>'
            +                    + '</div>'
            +                    + '<div class="CDC_body">'  
            +                        + '<table class="CDC_month_body">'
            +                            + '<tbody>'
            +                                + '<tr>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="0">一月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="1">二月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="2">三月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="3">四月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="4">五月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="5">六月</a></td>'
            +                                + '</tr>'
            +                                + '<tr>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="6">七月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="7">八月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="8">九月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="9">十月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="10">十一月</a></td>'
            +                                    + '<td><a href="javascript:;" class="js_compDCMonth" data-month="11">十二月</a></td>'
            +                                + '</tr>'
            +                            + '</tbody>'
            +                        + '</table>'
            +                    + '</div>'
            +                +'</div>',
            +
            +        yearTpl: '<div class="CDC_inner">'
            +                    + '<div class="CDC_header">'
            +                        + '<div class="CDC_header_tools">'
            +                            + '<a href="javascript:;" data-date="{0}" class="CDC_Date">返回今天</a>'
            +                            + '<a href="javascript:;" data-date="{3}" class="CDC_Date">返回选中日期</a>'
            +                        + '</div>'
            +                        + '<h4><span>{2}</span></h4>'
            +                    + '</div>'
            +                    + '<div class="CDC_body">'
            +                       + '<table class="CDC_year_body">'
            +                           + '<tbody>'
            +                           + '{1}'
            +                           + '</tbody>'
            +                        + '</table>'
            +                    + '</div>'
            +                + '</div>',
            +
            +        dateTpl: '<div class="CDC_inner" style="width: 182px;" >'
            +                    + '<div class="CDC_header">'
            +                        + '<h4>'
            +                        + '<a href="javascript:;" title="更改年份" data-date="{0}" class="CDC_Year">{1}</a>'
            +                        + '<a href="javascript:;" title="更改月份" data-date="{0}" class="CDC_Month">{2}</a>'
            +                        + '</h4>' 
            +                    + '</div>'
            +                    + '<div class="CDC_body">'
            +                        + '<table class="CDC_date_body CDC_date_body_left">'
            +                            + '<thead >'
            +                                + '<tr>'
            +                                    + '<th>一</th>'
            +                                    + '<th>二</th>'
            +                                    + '<th>三</th>'
            +                                    + '<th>四</th>'
            +                                    + '<th>五</th>'
            +                                    + '<th>六</th>'
            +                                    + '<th>日</th>'
            +                                + '</tr>'
            +                            + '</thead>'
            +                            + '<tbody>'
            +                            +   '{3}'   
            +                            + '</tbody>'
            +                        + '</table>'
            +                    + '</div>'
            +                + '</div>',
            +
            +        baseTpl: '<div class="CDCalendar_bounding_box" style="display:none;">'
            +                    + '<div class="CDC_container" >'
            +                        + '<div class="CDC_content_box" >'
            +                            + '<div class="CDC_arrow" >'
            +                                + '<a  href="javascript:;" class="CDC_close_btn" title="关闭">close</a>'
            +                                + '<a  href="javascript:;" class="CDC_prev_btn" data-action="prev">prev</a>'
            +                                + '<a  href="javascript:;" class="CDC_next_btn" data-action="next">next</a>'
            +                                + '<a  href="javascript:;" class="CDC_clear" title="清除">clear</a>'
            +                            + '</div>'
            +                            + '<div class="CDC_date_box" >'
            +                               + '{0}'
            +                            + '</div>'
            +                        + '</div>'
            +                    + '</div>'
            +                + '</div>',
            +
            +        buildYearTpl: function (_date, _startYear, _endYear) {
            +            var _p = this,
            +                _r = _p.yearTpl;
            +
            +            _p.layoutBox().find('.CDC_date_box').html(
            +                JC.f.printf( 
            +                    _r, 
            +                    JC.f.formatISODate(_date), 
            +                    _p.allYearsTpl(_startYear, _endYear), 
            +                    _startYear + ' ~ ' + _endYear,
            +                    JC.f.formatISODate(_p.curSelectedDate())  
            +                )
            +            )
            +            .find('.CDC_year_body>tbody>tr>td>a').each( function () {
            +                var _sp = $(this),
            +                    _year = _sp.data('year'),
            +                    _d = new Date(_year, 0, 1);
            +
            +                ( _year === new Date().getFullYear() ) && ( _sp.addClass('today') );
            +
            +                ( _year === _p.curYear() ) && ( _sp.parent('td').addClass('selected_date') );
            +
            +                ( ( _p.maxYear() && ( _year > _p.maxYear() ) ) 
            +                    || ( _p.minYear() && ( _year < _p.minYear() ) ) 
            +                ) && ( _sp.addClass('disabled') );
            +
            +                _sp.attr('data-date', JC.f.formatISODate( _d ));
            +
            +            } );
            +            _p.layoutBox()
            +            .find('.CDC_prev_btn')
            +                .attr('data-type', 'year')
            +                .attr('data-date', JC.f.formatISODate (new Date(_startYear - 1, 0, 1) ))
            +            .end()
            +            .find('.CDC_next_btn')
            +                .attr('data-type', 'year')
            +                .attr('data-date', JC.f.formatISODate (new Date(_endYear + 1, 0, 1) ));
            +
            +            _p.layoutBox().css('width', 466);
            +            _p.disablePageBtn();
            +            _p.position();
            +        },
            +
            +        buildMonthTpl: function ( _date ) {
            +            var _p = this,
            +                _r = _p.monthTpl,
            +                _prevT = new Date(_date.getFullYear() - 1, 11, 1);
            +
            +            _p.layoutBox().find('.CDC_date_box').html(
            +                JC.f.printf( 
            +                    _r, 
            +                    _date.getFullYear() + '年', 
            +                    JC.f.formatISODate(_date),
            +                    JC.f.formatISODate(new Date()),
            +                    JC.f.formatISODate(_p.curSelectedDate()) 
            +                )
            +            )
            +            .find('.CDC_month_body>tbody>tr>td>a').each( function ( _ix ) {
            +                var _sp = $(this),
            +                    _month = _sp.data('month'),
            +                    _d = new Date(_date.getFullYear(), _month , 1),
            +                    _tempD = new Date(_d.getFullYear(), _month, JC.f.maxDayOfMonth(_d));
            +
            +                ( JC.f.isSameMonth(_d, new Date()) ) && ( _sp.addClass('today') );
            +
            +                ( JC.f.isSameMonth(_p.curSelectedDate(), _d )) && ( _sp.parent('td').addClass('selected_date') );
            +
            +                ( ( _p.minValue() && ( _p.minValue().getTime() > _tempD.getTime() ) )
            +                    || ( _p.maxValue() && ( _p.maxValue().getTime() < _d.getTime() ) )
            +                 ) && ( _sp.addClass('disabled') );
            +
            +                _sp.attr('data-date', JC.f.formatISODate( _d ));
            +
            +            } )
            +            .end()
            +            .end()
            +            .find('.CDC_prev_btn')
            +                .attr('data-date', JC.f.formatISODate(new Date(_date.getFullYear() - 1, 11, JC.f.maxDayOfMonth(_prevT))))
            +                .attr('data-type', 'month')
            +            .end()
            +            .find('.CDC_next_btn')
            +                .attr('data-date', JC.f.formatISODate(new Date(_date.getFullYear() + 1, 0, 1)))
            +                .attr('data-type', 'month')
            +
            +            _p.disablePageBtn();
            +            _p.position();
            +            _p.layoutBox().css('width', 466);
            +
            +        },
            +
            +        buildDateTpl: function (_date) {
            +            
            +            var _p = this,
            +                _tpl = '',
            +                _curDate = _date || _p.curSelectedDate(),
            +                _curYear = _curDate.getFullYear(),
            +                _curMonth = _curDate.getMonth(),
            +                _monthNum = _p.monthNum(),
            +                _prevDate = new Date(_curYear, _curMonth, 1),
            +                _nextDate,
            +                _tempDate;
            +
            +            while ( _monthNum-- ) {
            +                
            +                _tpl += JC.f.printf( 
            +                    _p.dateTpl, 
            +                    JC.f.formatISODate(_curDate),
            +                    _curYear + '年', 
            +                    (_curMonth + 1) + '月',
            +                    _p.datesOfMonthTpl(_curDate)
            +                );
            +
            +                _curDate = new Date(_curYear, _curMonth + 1, 1);                
            +                _curYear = _curDate.getFullYear();
            +                _curMonth = _curDate.getMonth();
            +
            +            }
            +
            +            _tempDate = new Date(_curYear, _curMonth - 1, 1);
            +            _nextDate = new Date(_curYear, _curMonth - 1, JC.f.maxDayOfMonth(_tempDate));
            +
            +            _p.layoutBox().find('.CDC_date_box')
            +                .html( _tpl )
            +                .find('.CDC_date_body>tbody>tr>td>a[data-date]').each( function ( _ix ) {
            +                    var _sp = $(this),
            +                        _d = JC.f.dateDetect(_sp.data('date'));
            +
            +                    ( JC.f.isSameDay(_d, _p.curSelectedDate()) ) 
            +                        && ( _sp.parent('td').addClass('selected_date') );
            +                    
            +
            +                    (_p.minValue() && _d.getTime() < _p.minValue().getTime() ) 
            +                        && ( _sp.addClass('disabled') );
            +                      
            +
            +                    ( _p.maxValue() && _d.getTime() > _p.maxValue().getTime() ) 
            +                        && ( _sp.addClass('disabled') );
            +
            +                    ( !_p.currentCanSelect() && JC.f.isSameDay( _d, new Date() ) )
            +                        && ( _sp.addClass('disabled') );
            +                
            +                } )
            +                .end()
            +                .end()
            +                    .find('.CDC_next_btn')
            +                        .attr('data-date', JC.f.formatISODate(_nextDate))
            +                        .attr('data-type', 'date')
            +                .end()
            +                    .find('.CDC_prev_btn')
            +                        .attr('data-date', JC.f.formatISODate(_prevDate))
            +                        .attr('data-type', 'date');
            +
            +            _p.disablePageBtn();
            +            _p.fixTable();
            +
            +        },
            +
            +        disablePageBtn: function () {
            +            var _p = this,
            +                _prevBtn = _p.layoutBox().find('.CDC_prev_btn'),
            +                _nextBtn = _p.layoutBox().find('.CDC_next_btn'),
            +                _prevDate = JC.f.dateDetect(_prevBtn.attr('data-date')),
            +                _nextDate = JC.f.dateDetect(_nextBtn.attr('data-date'));
            +
            +            if ( _p.minValue() && ( _p.minValue().getTime() > _prevDate.getTime() ) ) {
            +                _prevBtn.addClass('CDC_prev_btn_disabled')
            +                    .prop('disabled', true);
            +            } else {
            +                _prevBtn.removeClass('CDC_prev_btn_disabled')
            +                    .prop('disabled', false);
            +            }
            +
            +            if ( _p.maxValue() && ( _p.maxValue().getTime() < _nextDate.getTime() ) ) {
            +                _nextBtn.addClass('CDC_next_btn_disabled')
            +                    .prop('disabled', true);
            +            } else {
            +                _nextBtn.removeClass('CDC_next_btn_disabled')
            +                    .prop('disabled', false);
            +            }
            +
            +        },
            +
            +        layout: function () {
            +            var _p = this;
            +
            +            !this._layout && ( this._layout = _p.layoutBox().find('div.CDCalendar_bounding_box') ) ;
            + 
            +            return this._layout;
            +        },
            +
            +        layoutBox: function () {
            +            var _p = this,
            +                _r = $('#' + DCalendar.Model._boxId );
            +
            +            if ( !(_r && _r.length) ) {
            +                _r = $(JC.f.printf( '<div id="{0}" style="width:466px;position:absolute;">' + _p.baseTpl + '</div>', DCalendar.Model._boxId ))
            +                    .appendTo( document.body );
            +            }
            +
            +            return _r;
            +        },
            +
            +        position: function () {
            +            var _p = this,
            +                _x = _p.selector().offset().left,
            +                _y = _p.selector().offset().top + _p.selector().prop('offsetHeight'),
            +                _tempX,
            +                _tempY,
            +                _win = $(window);
            +
            +            //上下溢出
            +            if ( ( _win.outerHeight() + _win.scrollTop() ) < ( _y + _p.layout().height() ) ) {
            +                _tempY = _p.selector().offset().top  - _p.layout().height();
            +                ( _tempY >= 0 ) && ( _y = _tempY );
            +            } else {
            +                _y = _p.selector().offset().top + _p.selector().prop('offsetHeight');
            +            }
            +
            +            //左右溢出
            +
            +            if ( ( _win.outerWidth() + _win.scrollLeft() ) < ( _x + _p.layoutBox().outerWidth(true) ) ) {
            +                _tempX = _p.selector().offset().left + _p.selector().outerWidth() - _p.layoutBox().outerWidth(true);
            +                ( _tempX >= 0 ) && ( _x = _tempX );
            +            } else {
            +                _x = _p.selector().offset().left;
            +            }
            +
            +            _p.layoutBox().css({
            +                left: _x,
            +                top: _y
            +            });
            +
            +        },
            +
            +        setSelected: function (_srcSelector) {
            +            var _p = this,
            +                _el = $(_srcSelector),
            +                _td = JC.f.getJqParent(_el, 'td'),
            +                _d = _el.data('date');
            +
            +            _p.layoutBox().find('.CDC_date_body>tbody>tr>td').removeClass('selected_date');
            +
            +            _td.addClass('selected_date').data('date');
            +
            +            _p.selector().val(_d);
            +
            +        },
            +
            +        clear: function () {
            +            var _p = this;
            +
            +            _p.layoutBox().find('.CDC_date_body>tbody>tr>td').removeClass('selected_date');
            +            _p.selector().val('');
            +        },
            +
            +        fixTable: function () {
            +            var _p = this,
            +                _tables = _p.layoutBox().find('.CDC_date_body'),
            +                _t = '<tr>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                        + '<td><a href="javascript:;" class="disabled">&nbsp;</a></td>'
            +                    + '</tr>',
            +                _max = 0;
            +
            +            _tables.each( function ( _ix ) {
            +                var _sp = $(this),
            +                    _len = _sp.find('tbody>tr').length;
            +
            +                ( _len > _max ) && ( _max = _len );
            +       
            +            } );
            +
            +            _tables.each( function () {
            +                var _sp = $(this),
            +                    _len = _sp.find('tbody>tr').length;
            +
            +                ( _len < _max ) && ( _sp.find('tbody').append(_t) );
            +
            +            });
            +
            +            if ( _p.showtype() === 'float' ) {
            +                if ( _p.monthNum() === 2 || _p.monthNum() === 4 ) {
            +                    _p.layoutBox().css('width', 466);
            +                } else {
            +                    _p.layoutBox().css('width', 678);
            +                }
            +            } else {
            +                _p.layoutBox().css('width', 267);
            +            }
            +
            +        },
            +
            +        /**
            +         * DCalendar显示时的回调
            +        */
            +        calendarshow: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "calendarshow";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * DCalendar隐藏时的回调
            +        */
            +        calendarhide: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "calendarhide";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 清除选中的日期后的回调
            +        */
            +        calendarclear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "calendarclear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 选择日期赋值后的回调
            +        */
            +        updatedate: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updatedate";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 更改月份之前的回调,月历面板显示后
            +        */
            +        beforeupdatemonth: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "beforeupdatemonth";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 更改月份后的回调
            +        */
            +        updatemonth: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updatemonth";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 更改年份之前的回调,年份面板显示后
            +        */
            +        beforeupdateyear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "beforeupdateyear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 更改年份后的回调
            +        */
            +        updateyear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updateyear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 点击下一月的回调
            +        */
            +        updatenextmonth: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updatenextmonth";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 点击上一月的回调
            +        */
            +        updateprevmonth: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updateprevmonth";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 点击下一年的回调
            +        */
            +        updatenextyear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updatenextyear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 点击上一年的回调
            +        */
            +        updateprevyear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updateprevyear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 点击下一页年份的回调
            +        */
            +        updatenextpageyear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updatenextpageyear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * 点击上一页年份的回调
            +        */
            +        updateprevpageyear: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "updateprevpageyear";
            +
            +            return _p.callbackProp(_selector, _key);
            +        }
            +        
            +    });
            + 
            +    JC.f.extendObject(DCalendar.View.prototype, {
            +        init: function () {
            +            var _p = this;
            +        },
            +
            +        update: function () {
            +            var _p = this;
            +
            +            _p._model.position();
            +
            +            _p._model.layout().data('CDCalendarIns', _p);
            +
            +        },
            +
            +        yearView: function (_srcSelector) {
            +            var _p = this,
            +                _el = $( _srcSelector ),
            +                _date = new Date(),
            +                _startYear = _date.getFullYear() - 14,
            +                _endYear = _date.getFullYear() + 13;
            +
            +            _p._model.buildYearTpl(_date, _startYear, _endYear);
            +
            +        },
            +
            +        monthView: function (_srcSelector) {
            +            var _p = this,
            +                _el = $(_srcSelector),
            +                _date = JC.f.dateDetect(_el.data('date'));
            +
            +            _p._model.buildMonthTpl(_date);
            +
            +        },
            +
            +        dateView: function (_srcSelector) {
            +            var _p = this,
            +                _el = $( _srcSelector ),
            +                _curDate = JC.f.dateDetect(_el.data('date'));
            +
            +            _p._model.buildDateTpl(_curDate);
            +            
            +        },
            +
            +        change: function  (_srcSelector) {
            +            var _p = this,
            +                _el = $(_srcSelector),
            +                _action = _el.data('action'),
            +                _type = _el.attr('data-type'),
            +                _curDate ,
            +                _nextMonthDate,
            +                _nextYear,
            +                _startYear,
            +                _endYear;
            +
            +            switch ( _type ) {
            +                case 'year':
            +                    {   
            +                        _curDate = JC.f.dateDetect(_el.attr('data-date'));
            +                
            +                        if ( _action == 'prev' ) {
            +                            _endYear = _curDate.getFullYear();
            +                            _startYear = _endYear - 27;
            +
            +                            _p.trigger(DCalendar.Model.UPDATEPREVPAGEYEAR);
            +
            +                        } else {
            +                            _startYear = _curDate.getFullYear();
            +                            _endYear = _startYear + 27;
            +
            +                            _p.trigger(DCalendar.Model.UPDATENEXTPAGEYEAR);
            +
            +                        }
            +
            +                        _p._model.buildYearTpl(new Date(), _startYear, _endYear);
            +
            +                        break;
            +                    }
            +
            +                case 'month': 
            +                    {   
            +                        _curDate = JC.f.dateDetect(_el.attr('data-date'));
            +
            +                        if ( _action === 'prev' ) { 
            +                            _p.trigger(DCalendar.Model.UPDATEPREVYEAR);
            +                        } else {
            +                            _p.trigger(DCalendar.Model.UPDATENEXTYEAR);
            +                        }
            +
            +                        _p._model.buildMonthTpl(_curDate);
            +
            +                        break;
            +                    }
            +
            +                case 'date':
            +                default:
            +                    if ( _action === 'prev' ) {
            +                        _nextMonthDate = JC.f.dateDetect(_el.attr('data-date'));
            +                        _curDate = new Date(_nextMonthDate.getFullYear(), _nextMonthDate.getMonth() - _p._model.monthNum() + 1, 1);
            +                       _p.trigger(DCalendar.Model.UPDATEPREVMONTH);
            +
            +                    } else {
            +                        _curDate = JC.f.dateDetect(_el.attr('data-date'));
            +                        _p.trigger(DCalendar.Model.UPDATENEXTMONTH);
            +                        
            +                    }
            +                    _p._model.buildDateTpl(_curDate);
            +                    _p._model.position();
            +
            +            }
            +
            +        },
            +
            +        show: function () {
            +            var _p = this;
            +
            +            //var _s = new Date().getTime(),
            +            //    _e ;
            +
            +            _p._model.buildDateTpl();
            +            //_e = new Date().getTime();
            +            //console.log( "_s", "_e", _e - _s );
            +            _p.update();
            +            _p._model.layout().show();
            +
            +            _p._model.layout().data('CDCalendarShow', _p);
            +            
            +        },
            +
            +        hide: function () {
            +            var _p = this;
            +
            +            _p._model.layout().hide();
            +
            +        }
            +
            +    });
            +
            +    var _doc = $(document)
            +        , _selector = 'input[datatype=ddate], button[datatype=ddate], input[datatype=drange]'
            +        ;
            +
            +    _doc.delegate(_selector, 'focus', function (_evt) {
            +
            +        $(this).addClass('cdc_ignore', true);
            +        JC.f.safeTimeout( function(){
            +            DCalendar.pickDate( _evt.target || _evt.srcElement);
            +        }, null, 'DCalendarClick', 50 );
            +  
            +    });
            +
            +    _doc.delegate(_selector, 'click', function (_evt) {
            +
            +        $(this).addClass('cdc_ignore', true);
            +        JC.f.safeTimeout( function(){
            +            DCalendar.pickDate(_evt.target || _evt.srcElement);
            +        }, null, 'DCalendarClick', 50 );
            +
            +    });
            +
            +    _doc.on('click', function (_evt) {
            +        
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc),
            +            _srcSelector = _evt.target || _evt.srcElement;
            +
            +        if ( _ins &&  _ins._model.isDCalendar(_srcSelector) ) return;
            +
            +        _ins && _ins.trigger(DCalendar.Model.HIDDEN);
            +
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_close_btn', 'click', function (_evt) {
            +        
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.HIDDEN);
            +
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_next_btn, #CompDCalendar .CDC_prev_btn', 'click', function (_evt) {
            +       
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.CHANGE, [$(this)]);
            +       
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_Month', 'click', function (_evt) {
            +
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.MONTHVIEW, [$(this)]);
            +       
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_Year', 'click', function (_evt) {
            +      
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.YEARVIEW, [$(this)]);
            +       
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_Date', 'click', function (_evt) {
            +
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.DATEVIEW, [$(this)]);
            +
            +    });
            +
            +    _doc.delegate('#CompDCalendar', 'click', function (_evt) {
            +        _evt.stopPropagation();
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_date_body>tbody>tr>td>a:not(".disabled")', 'click', function (_evt) {
            +        
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.SETDATE, [$(this)]);
            +        _ins && _ins.trigger(DCalendar.Model.HIDDEN );
            +
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_month_body>tbody>tr>td>a:not(".disabled")', 'click', function (_evt) {
            +        
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.DATEVIEW, [$(this)]);
            +        
            +    } );
            +
            +    _doc.delegate('#CompDCalendar .CDC_year_body>tbody>tr>td>a:not(".disabled")', 'click', function (_evt) {
            +      
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.MONTHVIEW, [$(this)]);
            +        
            +    });
            +
            +    _doc.delegate('#CompDCalendar .CDC_clear', 'click', function (_evt) {
            +       
            +        var _ins = DCalendar.getInstance(DCalendar.lastSrc);
            +        _ins && _ins.trigger(DCalendar.Model.CLEAR, [$(this)]);
            +
            +    });
            +
            +    $(window).on('resize scroll', function () {
            +
            +        JC.f.safeTimeout( function(){
            +           DCalendar.update(); 
            +        }, null, 'DCalendarResize', 20 );
            +
            +    });
            +
            +    _doc.ready(function () {
            +        DCalendar.init(true);
            +    });    
            +    
            +    return JC.DCalendar;
            +
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_DCalendar_DCalendar.js.html b/docs_api/files/.._comps_DCalendar_DCalendar.js.html new file mode 100644 index 000000000..c7e3d379b --- /dev/null +++ b/docs_api/files/.._comps_DCalendar_DCalendar.js.html @@ -0,0 +1,298 @@ + + + + + ../comps/DCalendar/DCalendar.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/DCalendar/DCalendar.js

            + +
            +
            +;(function(define, _win) { 'use strict'; 
            +    define( [ 'JC.DCalendar.date'
            +            ], function(){
            +    /**
            +     * �����ж���Ϊ���������� JC 0.1
            +     * ʹ�� requirejs ����Ŀ�����Ƴ������жϴ���
            +     */
            +    JC.use 
            +        && JC.PATH
            +        && JC.use([ 
            +                JC.PATH + 'comps/DCalendar/DCalendar.date.js'
            +            ].join())
            +        ;
            +
            +    return JC.DCalendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_DragSelect_DragSelect.js.html b/docs_api/files/.._comps_DragSelect_DragSelect.js.html new file mode 100644 index 000000000..69871b49b --- /dev/null +++ b/docs_api/files/.._comps_DragSelect_DragSelect.js.html @@ -0,0 +1,898 @@ + + + + + ../comps/DragSelect/DragSelect.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/DragSelect/DragSelect.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * DOM标签拖动选择
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc.openjavascript.org/docs_api/classes/JC.DragSelect.html' target='_blank'>API docs</a>
            + *      | <a href='../../comps/DragSelect/_demo' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会处理 div class="js_compDragSelect"</h2>
            + *
            + *  <h2>可用的 HTML attribute</h2>
            + *
            + *  <dl>
            + *      <dt>cdsConfig = script selector</dt>
            + *      <dd>拖动内容的配置
            +<xmp><script type="text/template" class="js_cdsConfig"></xmp><pre>
            +    {
            +        "items": {                                      //响应选择动作的选择器列表
            +            "td.js_pos_canSelect": {                        //响应选择动作的选择器
            +                "addClass": "js_pos_selected"               //选取到的内容 添加的 class
            +                , "removeClass": "js_pos_canSelect"         //选取到的内容 清除的 class
            +                , "callback":                               //选中内容后的回调
            +                    function( _items, _type, _ins ){
            +                        var _selector = this;
            +                        JC.log( 'callback, td.js_pos_canSelect:', _type, _items.length );
            +                    }
            +            }
            +            , "td.js_pos_selected": {
            +                "addClass": "js_pos_canSelect"
            +                , "removeClass": "js_pos_selected"
            +                , "callback": 
            +                    function( _items, _type, _ins ){
            +                        var _selector = this;
            +                        JC.log( 'callback, td.js_pos_selected:', _type, _items.length );
            +                    }
            +            }
            +        }
            +        , "realtimeClass": "js_cdsRealtimeEffect"   //实时显示选取内容的 CSS 样式名
            +        , "callback":                         //选中内容的全局回调
            +            function( _items, _type, _ins ){
            +                var _selector = this;
            +                JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );
            +            }
            +    }
            +</pre><xmp></script></xmp>
            + *      <dd>
            + *
            + *      <dt>cdsRealtimeEffect = bool, default = false</dt>
            + *      <dd>是否实时显示选中内容的状态</dd>
            + *
            + *      <dt>cdsRealtimeClass = CSS class name</dt>
            + *      <dd>显示选中内容的 CSS 样式名</dd>
            + *
            + *      <dt>cdsCallback = function</dt>
            + *      <dd>选中内容的全局回调
            +<pre>function cdsCallback( _items, _type, _ins ){
            +    var _selector = this;
            +    JC.log( 'js_compDragSelect callback', _items.length, JC.f.ts() );
            +}</pre>
            + *      </dd>
            + *
            + *      <dt>cdsItemFilter = function</dt>
            + *      <dd>选取内容时的过滤函数, 返回 false 将忽略 _item
            +<pre>function cdsItemFilter( _item, _type, _itemData, _configData ){
            +    var _selector = this
            +        , _r = true
            +        //, _minDate = JC.f.pureDate( JC.f.dateDetect( 'now,1d' ) )
            +        //, _itemDate = JC.f.parseISODate( _item.data( 'date' ) )
            +        ;
            +    //_itemDate.getTime() < _minDate.getTime() && ( _r = false );
            +    return _r;
            +}</pre>
            + *      </dd>
            + *
            + *      <dt>cdsRectMinWidth = int, default = 20</dt>
            + *      <dd>响应选取时,最小拖动宽度</dd>
            + *
            + *      <dt>cdsRectMinHeight= int, default = 20</dt>
            + *      <dd>响应选取时,最小拖动高度</dd>
            + *
            + *      <dt>cdsEnableTextSelectable = bool, default = false</dt>
            + *      <dd>选取内容式,是否启用文本选取</dd>
            + *  </dl> 
            + *
            + * @namespace   JC
            + * @class       DragSelect
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-05-29
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.DragSelect = DragSelect;
            +
            +    function DragSelect( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, DragSelect ) ) 
            +            return JC.BaseMVC.getInstance( _selector, DragSelect );
            +
            +        JC.BaseMVC.getInstance( _selector, DragSelect, this );
            +
            +        this._model = new DragSelect.Model( _selector );
            +        this._view = new DragSelect.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( DragSelect.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 DragSelect 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of DragSelectInstance}
            +     */
            +    DragSelect.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compDragSelect' )  ){
            +                    _r.push( new DragSelect( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compDragSelect' ).each( function(){
            +                        _r.push( new DragSelect( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 用于显示选取范围的矩形
            +     * @method RECT
            +     * @static
            +     * @return selector
            +     */
            +    DragSelect.RECT =
            +        function(){
            +            if( !( DragSelect._RECT && DragSelect._RECT.length ) ){
            +                DragSelect._RECT = $( DragSelect.RECT_TPL );
            +                DragSelect._RECT.appendTo( document.body );
            +            }
            +            return DragSelect._RECT;
            +        }
            +    /**
            +     * 用于显示选取范围的矩形模板
            +     * @property RECT_TPL
            +     * @type    string
            +     * @default     <div class="js_compDragSelect_rect" style="display:none;position:absolute;left: -9999px;"></div>
            +     * @static
            +     */
            +    DragSelect.RECT_TPL = '<div class="js_compDragSelect_rect" style="display:none;position:absolute;left: -9999px;"></div>' ;
            +    /**
            +     * 默认 mouseup 事件
            +     * @method DEFAULT_MOUSEUP
            +     * @static
            +     */
            +    DragSelect.DEFAULT_MOUSEUP =
            +        function( _evt ){
            +            var _d = DragSelect.DRAG_DATA();
            +            if( !_d ) return;
            +            var _p = _d.ins;
            +            //JC.log( 'up', JC.f.ts() );
            +            _p.trigger( 'SELECT_DONE', [ _p._model.offset( _evt ) ] );
            +        };
            +    /**
            +     * 默认 mousemove 事件
            +     * @method DEFAULT_MOUSEMOVE
            +     * @static
            +     */
            +    DragSelect.DEFAULT_MOUSEMOVE = 
            +        function( _evt ){
            +            var _d = DragSelect.DRAG_DATA();
            +            if( !_d ) return;
            +            var _p = _d.ins
            +                , _newPoint = _p._model.offset( _evt )
            +                ;
            +            //JC.log( 'move', JC.f.ts() );
            +            _p._view.updateRect( _newPoint );
            +            _p.trigger( 'SELECT_MOVE', [ _newPoint ] );
            +        };
            +    /**
            +     * 默认 selectstart 事件
            +     * @method DEFAULT_SELECT_EVENT
            +     * @static
            +     */
            +    DragSelect.DEFAULT_SELECT_EVENT = 
            +        function(){
            +            return false;
            +        };
            +    /**
            +     * 获取当前拖动的相关数据
            +     * @method DRAG_DATA
            +     * @static
            +     * @return object
            +     */
            +    DragSelect.DRAG_DATA =
            +        function( _setter ){
            +            typeof _setter != 'undefined' && ( DragSelect._DRAG_DATA = _setter );
            +            return DragSelect._DRAG_DATA;
            +        };
            +    /**
            +     * 最小拖动范围, 小于这个范围将不予处理
            +     * @property MIN_RECT
            +     * @type        object
            +     * @default     width: 20, height: 20
            +     * @static
            +     */
            +    DragSelect.MIN_RECT = { width: 20, height: 20 };
            +
            +    JC.BaseMVC.build( DragSelect );
            +
            +    JC.f.extendObject( DragSelect.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'DragSelect _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this, _ditems;
            +
            +                if( !_p._model.config() ) {
            +                    JC.log( 'JC.DragSelect config data not found!' );
            +                    return;
            +                }
            +
            +                _p.on( 'inited', function(){
            +                    _ditems = _p._model.delegateItems();
            +                    if( !_ditems.length ) return;
            +
            +                    _p.selector().delegate( _ditems.join(','), 'click', function( _evt ){
            +                        //JC.log( 'click', JC.f.ts() );
            +                    });
            +
            +                    $.each( _ditems, function( _k, _item ){
            +                        _p.selector().delegate( _item, 'mousedown', function( _evt ){
            +                            var _sp = $( this );
            +                            _p.trigger( 'SELECT_START', [ _sp, _evt, _item ] );
            +                        });
            +                    });
            +                });
            +
            +                _p.on( 'SELECT_START', function( _evt, _sp, _srcEvt, _type ){
            +                    var _d;
            +                    _p.trigger( 'CLEAR_EVENT' );
            +                    _p.trigger( 'REMOVE_ALL_REALTIME_EFFECT' );
            +                    _d = _p._model.initDragData( _sp, _type );
            +                    if( !_d ) return;
            +                    _d.ins = _p;
            +                    _d.downPoint = _p._model.offset( _srcEvt );
            +                    _p._view.showRect();
            +                    _p.trigger( 'BIND_EVENT' );
            +                });
            +
            +                _p.on( 'BIND_EVENT', function( _evt ){
            +                    _jdoc.on( 'mousemove', DragSelect.DEFAULT_MOUSEMOVE );
            +                    _jdoc.on( 'mouseup', DragSelect.DEFAULT_MOUSEUP );
            +
            +                    !_p._model.enableTextSelectable() 
            +                        && _jdoc.on( 'selectstart', DragSelect.DEFAULT_SELECT_EVENT );
            +                });
            +
            +                _p.on( 'CLEAR_EVENT', function( _evt ){
            +                    _jdoc.off( 'mousemove', DragSelect.DEFAULT_MOUSEMOVE );
            +                    _jdoc.off( 'mouseup', DragSelect.DEFAULT_MOUSEUP );
            +                    _jdoc.off( 'selectstart', DragSelect.DEFAULT_SELECT_EVENT );
            +
            +                    _p._model.realtimeEffect() && _p.trigger( 'REMOVE_ALL_REALTIME_EFFECT' );
            +                    _p.trigger( 'CLEAR_DATA' );
            +                });
            +
            +                _p.on( 'SELECT_DONE', function( _evt, _newPoint ){
            +                    _p._view.updateRect( _newPoint );
            +                    var _rectSize = selectorToRectangle( DragSelect.RECT() );
            +
            +                    if( _p._model.rectIsOutsize( _rectSize ) ){
            +                    }else{
            +                        _p.trigger( 'PROCESSS_SELECT', [ _rectSize, DragSelect.DRAG_DATA() ] );
            +                    }
            +                    _p._view.hideRect();
            +                    _p.trigger( 'CLEAR_EVENT' );
            +                });
            +
            +                _p.on( 'PROCESSS_SELECT', function( _evt,_rectSize, _params ){
            +                    if( !DragSelect.RECT().is( ':visible' ) ) return;
            +                    var _selectedItems = _p._model.getSelectItems( _rectSize, _params.type );
            +                    if( !_selectedItems.length ) return;
            +                    if( _params.data ){
            +                        $.each( _selectedItems, function( _k, _item ){
            +                            _params.data.addClass && _item.addClass( _params.data.addClass );
            +                            _params.data.removeClass && _item.removeClass( _params.data.removeClass );
            +                        });
            +                        _params.data.callback && _params.data.callback.call( _p.selector(), _selectedItems, _params.type, _p );
            +                    }
            +                    _p._model.callback() && _p._model.callback().call( _p.selector(), _selectedItems, _params.type, _p );
            +                    //JC.log( 'PROCESSS_SELECT', _selectedItems.length );
            +                });
            +
            +                _p.on( 'SELECT_MOVE', function( _evt, _newPoint ){
            +                    if( _p._model.realtimeEffect() ){
            +                        _p.trigger( 'REALTIME_EFFECT', [ _newPoint ] );
            +                    }
            +                });
            +
            +                _p.on( 'REALTIME_EFFECT', function( _evt, _newPoint ){
            +                    if( !DragSelect.RECT().is( ':visible' ) ) return;
            +                    if( !_p._model.realtimeClass( DragSelect.DRAG_DATA().data ) ) return;
            +
            +                    var _rectSize = selectorToRectangle( DragSelect.RECT() )
            +                        , _params = DragSelect.DRAG_DATA()
            +                        , _realtimeClass= _p._model.realtimeClass( DragSelect.DRAG_DATA().data )
            +                        ;
            +
            +                    _p.trigger( 'REMOVE_REALTIME_EFFECT', _realtimeClass );
            +
            +                    if( _p._model.rectIsOutsize( _rectSize ) ){
            +                        _p._model.preRealtimeItems( [] );
            +                        return;
            +                    }
            +
            +                    var _selectedItems = _p._model.getSelectItems( _rectSize, _params.type );
            +                    $.each( _selectedItems, function( _k, _item ){
            +                        _item.addClass( _realtimeClass );
            +                    });
            +                    _p._model.preRealtimeItems( _selectedItems );
            +                });
            +
            +                _p.on( 'REMOVE_REALTIME_EFFECT', function( _evt, _class, _items ){
            +                    _items = _items || _p._model.preRealtimeItems();
            +                    _items && _class
            +                        && $.each( _items, function( _ix, _item ){ _item.removeClass( _class ); } );
            +                });
            +
            +                _p.on( 'REMOVE_ALL_REALTIME_EFFECT', function(){
            +                    _p._model.realtimeClass() && _p._model.allItems().removeClass( _p._model.realtimeClass() );
            +                    $.each( _p._model.config(), function( _k, _item ){
            +                        _item.data 
            +                            && _item.data.realtimeClass 
            +                            && _p._model.items( _k ).removeClass( _items.data.realtimeClass );
            +                    });
            +                });
            +
            +                _p.on( 'CLEAR_DATA', function( _evt ){
            +                    DragSelect.DRAG_DATA( null );
            +                });
            +            }
            +        
            +        , clearCache:
            +            function(){
            +                this.trigger( 'CLEAR_DATA' );
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'DragSelect _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +    });
            +
            +    DragSelect.Model._instanceName = 'JCDragSelect';
            +    DragSelect.Model.UNI_COUNT = 1;
            +    DragSelect.Model.BEFORE_FIND_PREFIX = 'beforeSelected';
            +
            +    JC.f.extendObject( DragSelect.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'DragSelect.Model.init:', new Date().getTime() );
            +                this._itemsCache = {};
            +            }
            +
            +        , enableTextSelectable: 
            +            function(){ 
            +                return this.boolProp( 'cdsEnableTextSelectable' );
            +            }
            +
            +        , realtimeClass:
            +            function( _data ){
            +                var _r = this.config().realtimeClass || this.attrProp( 'cdsRealtimeClass' );
            +                _data && _data.realtimeClass && ( _r = _data.realtimeClass );
            +                return _r || '';
            +            }
            +
            +        , items:
            +            function( _type ){
            +                var _r;
            +                /*
            +                if( this.enableCache() ){
            +                    !this._itemsCache[ _type ] && ( this._itemsCache[ _type ] = this.selector().find( _type ) );
            +                    _r = this._itemsCache[ _type ];
            +                }
            +                */
            +                !_r && ( _r =  this.selector().find( _type ) );
            +
            +                return _r;
            +            }
            +
            +        , allItems:
            +            function(){
            +                var _r;
            +                /*
            +                if( this.enableCache() ){
            +                    !this._allItems && ( this._allItems = this.selector().find( this.delegateItems().join(',') ) );
            +                    _r = this._allItems;
            +                }
            +                */
            +                !_r && ( _r =  this.selector().find( this.delegateItems().join(',') ) );
            +                return _r;
            +            }
            +
            +        , enableCache: function(){ return this.boolProp( 'cdsEnableCache' ); }
            +
            +        , preRealtimeItems:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._preRealtimeItems = _setter );
            +                return this._preRealtimeItems;
            +            }
            +
            +        , realtimeEffect: function(){ return this.boolProp( 'cdsRealtimeEffect' ); }
            +
            +        , getSelectItems:
            +            function( _rect, _type ){
            +                var _p = this, _r = [], _items = _p.items( _type ), _filter;
            +                $.each( _items, function( _k, _item ){
            +                    _item = $( _item );
            +                    var _itemRect = selectorToRectangle( _item );
            +                    if( intersectRect( _rect, _itemRect ) ){
            +                        if( _filter = _p.itemFilter( _type ) ){
            +                            if( _filter.call( _p.selector(), _item, _type, _p.config().items[ _type ], _p.config() ) === false ) return;
            +                        }
            +                        _r.push( _item );
            +                    }
            +                });
            +
            +                return _r;
            +            }
            +
            +        , itemFilter:
            +            function( _type ){
            +                var _r = this.callbackProp( 'cdsItemFilter' );
            +
            +                this.config().itemFilter && ( _r = this.config().itemFilter );
            +
            +                this.config().items 
            +                    && this.config().items[ _type ]
            +                    && this.config().items[ _type ].itemFilter
            +                    && ( _r = ( this.config().items[ _type ].itemFilter ) )
            +                    ;
            +                return _r;
            +            }
            +
            +        , callback:
            +            function(){
            +                var _r = this.config().callback || this.callbackProp( 'cdsCallback' );
            +                return _r;
            +            }
            +
            +        , initDragData:
            +            function( _selector, _k ){
            +                var _p = this
            +                    , _itemData = _p.config().items[ _k ]
            +                    ;
            +                if( !_itemData ) return;
            +                return DragSelect.DRAG_DATA( { type: _k, data: _itemData } );
            +            }
            +
            +        , config:
            +            function(){
            +                if( !this._config ){
            +                    this._config = eval( '(' + ( JC.f.scriptContent( this.selectorProp( 'cdsConfig' ) ) ) + ')' );
            +                }
            +                return this._config;
            +            }
            +
            +        , delegateItems:
            +            function(){
            +                var _r = [];
            +                $.each( this.config().items, function( _k, _item ){
            +                    _r.push ( _k );
            +                });
            +                return _r;
            +            }
            +
            +        , offset:
            +            function( _evt ){
            +                var _r = {
            +                        'x': _evt.pageX
            +                        , 'y': _evt.pageY
            +                };
            +                return _r;
            +            }
            +
            +        , rectMinWidth: function(){ return this.intProp( 'cdsRectMinWidth' ); }
            +        , rectMinHeight: function(){ return this.intProp( 'cdsRectMinHeight' ); }
            +
            +        , rectMinSize:
            +            function(){
            +                var _p = this;
            +                return {
            +                    width: _p.rectMinWidth() || DragSelect.MIN_RECT.width
            +                    , height: _p.rectMinHeight() || DragSelect.MIN_RECT.height
            +                };
            +            }
            +
            +        , rectIsOutsize:
            +            function( _rectSize ){
            +                var _p = this, _r, _minSize = _p.rectMinSize();
            +                _minSize.width > _rectSize.width 
            +                    && _minSize.height > _rectSize.height
            +                    && ( _r = true ) 
            +                    ;
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( DragSelect.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'DragSelect.View.init:', new Date().getTime() );
            +            }
            +
            +        , showRect:
            +            function(){
            +                DragSelect.RECT().css( { 'left': '-9999px' } ).show();
            +            }
            +
            +        , updateRect:
            +            function( _newPoint ){
            +                if( !( DragSelect.DRAG_DATA() && DragSelect.RECT().is( ':visible' ) ) ) return;
            +                var _p = this
            +                    , _downPoint = DragSelect.DRAG_DATA().downPoint
            +                    , _rect = DragSelect.RECT()
            +                    , _size
            +                    ;
            +                if( !_downPoint ) return;
            +                _size = pointToRect( _downPoint, _newPoint );
            +                _rect.css( _size );
            +            }
            +
            +        , hideRect:
            +            function(){
            +                var _p = this
            +                    ;
            +                DragSelect.RECT().hide();
            +            }
            +    });
            +    /**
            +     * 判断两个矩形是否有交集
            +     */
            +    function intersectRect( r1, r2 ) {
            +        return !(
            +                    r2.x > ( r1.x + r1.width ) || 
            +                    ( r2.x + r2.width ) < r1.x || 
            +                    r2.y > ( r1.y + r1.height ) ||
            +                    ( r2.y + r2.height ) < r1.y
            +                );
            +    }
            +
            +    function pointToRect( _p1, _p2 ){
            +        var _r = { 'x': 0, 'y': 0, 'width': 0, 'height': 0 };
            +
            +        if( _p1 && _p2 ){
            +            if( _p1.x < _p2.x ){
            +                _r.x = _p1.x;
            +                _r.width = _p2.x - _p1.x;
            +            }else{
            +                _r.x = _p2.x;
            +                _r.width = _p1.x - _p2.x;
            +            }
            +
            +            if( _p1.y < _p2.y ){
            +                _r.y = _p1.y;
            +                _r.height = _p2.y - _p1.y;
            +            }else{
            +                _r.y = _p2.y;
            +                _r.height = _p1.y - _p2.y;
            +            }
            +            _r.left = _r.x;
            +            _r.top = _r.y;
            +        }
            +
            +        return _r;
            +    }
            +    /**
            +     * 返回选择器的 矩形 位置
            +     */
            +    function selectorToRectangle( _selector ){
            +        _selector = $( _selector );
            +        var _offset = _selector.offset()
            +            , _w = _selector.prop('offsetWidth')
            +            , _h = _selector.prop('offsetHeight');
            +
            +        return {
            +            x: _offset.left
            +            , y: _offset.top
            +            , width: _w
            +            , height: _h
            +        }
            +    }
            +    _jdoc.ready( function(){
            +        JC.f.safeTimeout( function(){
            +            DragSelect.autoInit && DragSelect.init();
            +        }, null, 'INIT_DRAG_SELECT', 200 );
            +    });
            +
            +    return JC.DragSelect;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Drag_Drag.js.html b/docs_api/files/.._comps_Drag_Drag.js.html new file mode 100644 index 000000000..9c9a6e0dc --- /dev/null +++ b/docs_api/files/.._comps_Drag_Drag.js.html @@ -0,0 +1,1377 @@ + + + + + ../comps/Drag/Drag.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Drag/Drag.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * 响应式 Drag and Drop 功能
            + * <br />对 [ div | button ].js_compDrag 生效
            + *
            + *<p><b>require</b>:
            + *   <a href="JC.common.html">JC.common</a>
            + *   , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Drag.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/Drag/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>通用 HTML attribute</h2>
            + *<dl>
            + *    <dt>dragTarget = selector, default = self</dt>
            + *    <dd>要拖动的 selector, 可以通过该属性指定拖动的父节点<dd>
            + *
            + *    <dt>dragIn = selector, default = window</dt>
            + *    <dd>可拖动的范围</dd>
            + *
            + *    <dt>disableDrag = bool, default = false</dt>
            + *    <dd>是否禁止拖动, 会执行实例初始化</dd>
            + *
            + *    <dt>ignoreDrog = bool, default = false</dt>
            + *    <dd>是否忽略拖动, 不会执行实例初始化</dd>
            + *
            + *    <dt>dragInitedCb = function, <b>window 变量域</b></dt>
            + *    <dd>实例初始化后调用的回调
            +<pre>function dragInitedCb( _selector, _dragTarget ){
            +    var _ins = this;
            +    JC.log( 'dragInitedCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>dragBeforeCb = function, <b>window 变量域</b></dt>
            + *    <dd>拖动之前调用的回调, 如果返回 false, 将停止拖动操作
            +<pre>function dragBeforeCb( _dragTarget, _selector ){
            +    var _ins = this;
            +    JC.log( 'dragBeforeCb', new Date().getTime() );
            +    //return false;
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>dragAfterCb = function, <b>window 变量域</b></dt>
            + *    <dd>拖动完成之后的回调
            +<pre>function dragAfterCb( _dragTarget, _selector ){
            +    var _ins = this;
            +    JC.log( 'dragAfterCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>dragBeginCb = function, <b>window 变量域</b></dt> 
            + *    <dd>拖动开始时的回调
            +<pre>function dragBeginCb( _selector, _dragTarget, _movingSelector ){
            +    var _ins = this;
            +    JC.log( 'dragBeginCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>dragMovingCb = function, <b>window 变量域</b></dt>
            + *    <dd>拖动移动时的回
            +<pre>function dragMovingCb( _selector, _dragTarget, _movingSelector, _x, _y, _evt ){
            +    var _ins = this;
            +    JC.log( 'dragMovingCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>dragDoneCb = function, <b>window 变量域</b></dt>
            + *    <dd>拖动完成时的回调
            +<pre>function dragDoneCb( _selector, _dragTarget ){
            +    var _ins = this;
            +    JC.log( 'dragDoneCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *</dl> 
            + *
            + *<h2>drop HTML attribute</h2>
            + *<dl>
            + *    <dt>dropFor = selector</dt>
            + *    <dd>指定可拖放的 selector</dd>
            + *
            + *    <dt>dropSwap = bool, default = false</dt>
            + *    <dd>
            + *          是否交换拖曳的位置
            + *          <br />为真, 交换 selector 的位置
            + *          <br />不为真, 将 append 到目标 selector
            + *    </dd>
            + *
            + *    <dt>disableDrop = bool, default = false</dt>
            + *    <dd>是否禁止 拖放功能, 这个属性应当写在  dropFor 的 selector 里</dd>
            + *
            + *    <dt>dropDoneCb = function, <b>window 变量域</b></dt>
            + *    <dd>拖放完成时的回调, 如果返回 false, 将停止拖放操
            +<pre>function dropDoneCb( _dragTarget, _dropTarget ){
            +    var _initSelector = this;
            +    JC.log( 'dropDoneCb', new Date().getTime() );
            +    //return false;
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>dropDoneAfterCb = function, <b>window 变量域</b></dt>
            + *    <dd>拖放完成后的回调
            +<pre>function dropDoneAfterCb( _dragTarget, _dropTarget ){
            +    var _initSelector = this;
            +    JC.log( 'dropDoneAfterCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *</dl>
            + *
            + * @namespace   JC
            + * @class       Drag
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-26
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <h2>拖动示例</h2>
            +        <div class="JCDrag dragStyle1 js_compDrag" dragBeginCb="dragBeginCb">
            +            normal drag 
            +            , dragBeginCb="dragBeginCb"
            +        </div>
            +
            +        <h2>拖放示例</h2>
            +        <table>
            +            <tr>
            +                <td>
            +                    <div class="js_compDrag" 
            +                        dropFor="(table div.js_compDrag" 
            +                        dropSwap="true" 
            +                        dropDoneCb="dropDoneCbAllow"
            +                        >
            +                        dropDoneCb="dropDoneCbAllow"
            +                    </div>
            +                </td>
            +                <td>
            +                    <div class="js_compDrag" 
            +                        dropFor="(table div.js_compDrag" 
            +                        dropSwap="true" 
            +                        dropDoneCb="dropDoneCbBan"
            +                        > 
            +                        dropDoneCb="dropDoneCbBan"
            +                    </div>
            +                </td>
            +            </tr>
            +        </table>
            + */
            +    JC.Drag = Drag;
            +    JC.f.addAutoInit && JC.f.addAutoInit( Drag );
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    function Drag( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, Drag ) ) 
            +            return JC.BaseMVC.getInstance( _selector, Drag );
            +
            +        JC.BaseMVC.getInstance( _selector, Drag, this );
            +
            +        this._model = new Drag.Model( _selector );
            +        this._view = new Drag.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( Drag.Model._instanceName, 'inited', new Date().getTime() );
            +    }
            +
            +    JC.BaseMVC.build( Drag );
            +
            +    JC.f.extendObject( Drag.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'Drag _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( Drag.Model.DRAG_INITED, function( _evt ){
            +
            +                    _p._model.defaultCSSPosition( _p._model.dragTarget().css( 'position' ) );
            +                    _p._model.defaultCSSZIndex( _p._model.dragTarget().css( 'z-index' ) );
            +                    _p._model.defaultCSSCursor( _p._model.dragTarget().css( 'cursor' ) );
            +
            +                    _p._model.selector().css( { 'cursor': 'move' } );
            +                    
            +                    _p._model.dragInitedCb() 
            +                        && _p._model.dragInitedCb().call( _p, _p.selector(), _p.dragTarget() );
            +
            +                    _p.notification( 'DRAG_INITED', [
            +                        _p, _p.selector(), _p.dragTarget()
            +                    ]);
            +                    /*
            +                    JC.log( 'Drag _inited', new Date().getTime()
            +                            , _p._model.defaultCSSPosition() 
            +                            , _p._model.defaultCSSZIndex() 
            +                            );
            +                    */
            +                });
            +
            +                _p.on( 'INIT_INDEX', function(){
            +                    if( !_p._model.dropPush() ) return;
            +                    var _items = _p._model.dropFor( true );
            +                    if( !( _items && _items.length ) ) return;
            +                    JC.log( _items.length );
            +                    _items.each( function( _ix, _item ){
            +                        $( _item ).data( 'dragIndex', _ix );
            +                    });
            +                });
            +
            +                _p.selector().on( 'mousedown', function( _evt, _srcEvt ){
            +                    _evt = _srcEvt || _evt;
            +                    _p._model._selectedDropBox = null;
            +
            +                    if( _p._model.boolProp( Drag.Model.DISABLE_DRAG ) ) return;
            +                    if( _p._model.boolProp( Drag.Model.IGNORE_DRAG ) ) return;
            +
            +                    if( _p._model.dropPush() ){
            +                    }
            +
            +                    Drag.cleanDragData();
            +
            +                    if( _p._model.dragBeforeCb() 
            +                        && _p._model.dragBeforeCb().call( _p, _p._model.dragTarget(), _p.selector() ) === false 
            +                    ){
            +                        return;
            +                    }
            +
            +                    if( _p.notificationHandler( 'DRAG_BEFORE', [
            +                        _p
            +                        , _p.selector()
            +                        , _p._model.dragTarget()
            +                        , _p._model.dragMovingTarget() 
            +                    ]) === false ){
            +                        return;
            +                    }
            +
            +                    _p.notification( 'DRAG_DOWN' );
            +
            +                    _p.trigger( Drag.Model.DRAG_BEFORE );
            +
            +                    _p._model.relativeParent( true );
            +
            +                    _p._model.isDropFor() 
            +                        && ( 
            +                                _p._model.dragMovingTarget( true )
            +                                , _p._model.dropFor( true )
            +                           );
            +
            +                    Drag.dragInfo( _p, _evt );
            +                    _p.trigger( Drag.Model.DRAG_BEGIN, [ _evt, Drag.dragInfo() ] );
            +
            +                    _jdoc.off( 'mouseup', Drag.defaultMouseUp );
            +                    _jdoc.off( 'mousemove', Drag.defaultMouseMove );
            +                    _jwin.off( 'scroll', Drag.defaultScroll );
            +
            +                    _jdoc.on( 'mouseup', Drag.defaultMouseUp );
            +                    _jdoc.on( 'mousemove', Drag.defaultMouseMove );
            +                    _jwin.on( 'scroll', Drag.defaultScroll );
            +
            +                    return false;
            +                });
            +
            +                //低版本 IE 拖曳时不选中文字
            +                _p.selector()[0].onselectstart = function(){ return false; };
            +
            +                _p.on( Drag.Model.DRAG_BEFORE, function( _evt ){
            +                    //JC.log( 'drag before', new Date().getTime() );
            +                });
            +
            +                _p.on( Drag.Model.DRAG_BEGIN, function( _evt, _dragInfo ){
            +                    //JC.log( 'drag begin', new Date().getTime() );
            +
            +                    _p._model.dragTarget().css( 'z-index', window.ZINDEX_COUNT++ );
            +
            +                    Drag.draggingItem( _p._model.dragTarget() );
            +
            +                    _p._model.dragBeginCb() 
            +                        && _p._model.dragBeginCb().call( 
            +                            _p
            +                            , _p.selector()
            +                            , _p._model.dragTarget()
            +                            , _p._model.dragMovingTarget() 
            +                        );
            +
            +                    _p.notification( 'DRAG_BEGIN', [
            +                        _p
            +                        , _p.selector()
            +                        , _p._model.dragTarget()
            +                        , _p._model.dragMovingTarget() 
            +                    ]);
            +
            +                });
            +
            +                _p.on( Drag.Model.DRAG_DONE, function( _evt, _dragInfo ){
            +                    //JC.log( 'drag done', new Date().getTime() );
            +
            +                    _p._view.dropDone( _dragInfo );
            +                    _p._view.clean( _dragInfo );
            +                    _p._model.clean( _dragInfo );
            +
            +                    Drag.draggingItem( null );
            +
            +                    _p._model.dragDoneCb() 
            +                        && _p._model.dragDoneCb().call( 
            +                            _p
            +                            , _p.selector()
            +                            , _p._model.dragTarget() 
            +                        );
            +
            +                    _p.notification( 'DRAG_DONE', [
            +                       _p
            +                        , _p.selector()
            +                        , _p._model.dragTarget() 
            +                    ]);
            +
            +                    _p._model.dragTarget().removeClass( Drag.Model.CLASS_CURRENT_DRAG_ITEM );
            +
            +                    _p.trigger( Drag.Model.DRAG_AFTER );
            +
            +                    Drag.cleanDragData();
            +                });
            +
            +                _p.on( Drag.Model.DRAGGING_MOVING, function( _evt, _x, _y, _srcEvt, _offset ){
            +                    //JC.log( 'Drag.Model.DRAGGING_MOVING', new Date().getTime() );DRAG_MOVING
            +                    _p._model.dragMovingCb()
            +                        && _p._model.dragMovingCb().call(
            +                            _p
            +                            , _p.selector()
            +                            , _p.dragTarget()
            +                            , _p.dragMovingTarget()
            +                            , _x
            +                            , _y
            +                            , _srcEvt
            +                        );
            +
            +                    _p.notification( 'DRAG_MOVING', [
            +                        _p
            +                        , _p.selector()
            +                        , _p.dragTarget()
            +                        , _p.dragMovingTarget()
            +                        , _x
            +                        , _y
            +                        , _srcEvt
            +                    ]);
            +                });
            +
            +                _p.on( Drag.Model.DRAG_AFTER, function( _evt ){
            +                    //JC.log( 'drag after', new Date().getTime() );
            +
            +                    _p._model.dragAfterCb() 
            +                        && _p._model.dragAfterCb().call( 
            +                            _p
            +                            , _p._model.dragTarget()
            +                            , _p.selector() 
            +                        );
            +                    
            +                    _p.notification( 'DRAG_AFTER', [
            +                        _p
            +                        , _p._model.dragTarget()
            +                        , _p.selector() 
            +                    ]);
            +                });
            +
            +                _p.on( Drag.Model.TRIGGER_DRAG, function( _evt, _srcEvt ){
            +                    _p.selector().trigger( 'mousedown', [ _srcEvt || _evt ] );
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                this.trigger( Drag.Model.DRAG_INITED );
            +            }
            +        /**
            +         * 获取拖动的源节点
            +         * @method  dragTarget
            +         * @return  selector
            +         */
            +        , dragTarget: function(){ return this._model.dragTarget(); }
            +        /**
            +         * 获取拖动时移动的节点, drag 使用 dragTarget, drop clone dragTarget
            +         * @method  dragMovingTarget
            +         * @return  selector
            +         */
            +        , dragMovingTarget: function(){ return this._model.dragMovingTarget(); }
            +        /**
            +         * 获取可拖动范围的 [ 节点 | window ]
            +         * @method dragIn
            +         * @return {selector|window}
            +         */
            +        , dragIn: function(){ return this._model.dragIn(); }
            +        /**
            +         * 更新 dragMovingTarget 的位置 
            +         * @method  _updatePosition
            +         * @protected
            +         */
            +        , _updatePosition: 
            +            function(){ 
            +                this._view.updatePosition.apply( this._view, JC.f.sliceArgs( arguments ) ); 
            +                return this;
            +            }
            +    });
            +    /**
            +     * 初始化可识别的 Drag 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of DragInstance}
            +     */
            +    Drag.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( 'js_compDrag' )  ){
            +                    !_selector.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) && _r.push( new Drag( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compDrag, button.js_compDrag' ).each( function(){
            +                        !_selector.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) && _r.push( new Drag( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 设置/获取 拖动时所需的数据
            +     * @method  dragInfo
            +     * @param   {DragInstance}  _ins
            +     * @param   {event}         _evt
            +     * @return  {json|null}
            +     * @static
            +     */
            +    Drag.dragInfo =
            +        function( _ins, _evt ){
            +            if( _ins && _evt ){
            +                Drag._dragInfo = {
            +                    'ins': _ins
            +                    , 'evt': _evt
            +                    , 'offset': _ins._model.position( _evt )
            +                };
            +            }
            +            return Drag._dragInfo;
            +        };
            +    /**
            +     * 设置当前的拖动 selector
            +     * @method  draggingItem
            +     * @param   {selector|null}  _setter
            +     * @return  {selector|null}
            +     * @static
            +     */
            +    Drag.draggingItem =
            +        function( _setter ){
            +            if( typeof _setter != 'undefined' ){
            +                Drag._draggingItem && Drag._draggingItem.data( Drag.Model.DRAGGING_ITEM, false );
            +                _setter && _setter.data( Drag.Model.DRAGGING_ITEM, true );
            +
            +                Drag._draggingItem = _setter;
            +            }
            +            return Drag._draggingItem;
            +        };
            +    /**
            +     * 清除拖动的相关数据
            +     * @method  cleanDragData
            +     * @static
            +     */
            +    Drag.cleanDragData = 
            +        function(){ 
            +            _jdoc.off( 'mousemove', Drag.defaultMouseMove );
            +            _jdoc.off( 'mouseup', Drag.defaultMouseUp );
            +            _jwin.off( 'scroll', Drag.defaultScroll );
            +
            +            Drag._dragInfo = null; 
            +            Drag.draggingItem( null );
            +        };
            +    /**
            +     * 拖动时, 默认的 mousemove 函数
            +     * @method  defaultMouseMove
            +     * @param   {evt}   _evt
            +     * @static
            +     */
            +    Drag.defaultMouseMove =
            +        function( _evt ){
            +            if( !Drag.dragInfo() ) return;
            +            //JC.log( 'JC.Drag mousemove', new Date().getTime() );
            +            var _di = Drag.dragInfo()
            +                , _p = _di.ins
            +                , _offset = _di.offset
            +                , _newX, _newY
            +                ;
            +            if( !_p ) return;
            +            _newX = _evt.pageX - _offset.x;
            +            _newY = _evt.pageY - _offset.y;
            +
            +            _newX <= _offset.minX && ( _newX = _offset.minX );
            +            _newY <= _offset.minY && ( _newY = _offset.minY );
            +
            +            _newX >= _offset.maxX && ( _newX = _offset.maxX );
            +            _newY >= _offset.maxY && ( _newY = _offset.maxY );
            +
            +            _newX -= _di.offset.relativeFixX;
            +            _newY -= _di.offset.relativeFixY;
            +
            +            //JC.log( _newX, _newY, _offset.maxX, _offset.maxY );
            +            _p._updatePosition( _newX, _newY, _offset );
            +            _p.trigger( Drag.Model.DRAGGING_MOVING, [ _newX, _newY, _evt, _offset ] );
            +        };
            +    /**
            +     * 拖动时, 默认的 mouseup 函数
            +     * @method  defaultMouseUp
            +     * @param   {evt}   _evt
            +     * @static
            +     */
            +    Drag.defaultMouseUp =
            +        function( _evt ){
            +            var _di = Drag.dragInfo();
            +
            +            if( _di && _di.ins ){
            +                _di.ins.notification( 'DRAG_UP' );
            +                _di.ins.trigger( Drag.Model.DRAG_DONE, _di );
            +            }
            +
            +            Drag.cleanDragData();
            +        };
            +    /**
            +     * 拖动时, 默认的 scroll 函数
            +     * @method  defaultScroll
            +     * @param   {evt}   _evt
            +     * @static
            +     */
            +    Drag.defaultScroll =
            +        function( _evt ){
            +            //
            +            /// 如果 dragIn 不是 window的时候, scrollTop 计算有问题
            +            //
            +            var _di = Drag.dragInfo();
            +            if( !( _di && _di.ins ) ) return;
            +            var _scrollX = _di.ins.dragIn().scrollLeft()
            +                , _scrollY = _di.ins.dragIn().scrollTop()
            +                , _offset = _di.ins.dragMovingTarget().position()
            +                , _newX, _newY
            +                , _fixScrollX = _scrollX - _di.offset.scrollX
            +                , _fixScrollY = _scrollY - _di.offset.scrollY
            +                ;
            +
            +            _newX = _offset.left + _fixScrollX;
            +            _newY = _offset.top + _fixScrollY;
            +
            +            //JC.log( _di.offset.scrollY, _scrollY, _offset.left, _newX, _offset.top, _newY );
            +            /*
            +            _di.ins.dragMovingTarget().css({
            +                'left': _newX + 'px'
            +                , 'top': _newY + 'px'
            +            });
            +            */
            +            _newX -= _di.offset.relativeFixX;
            +            _newY -= _di.offset.relativeFixY;
            +
            +            _di.ins._updatePosition( _newX, _newY, _offset );
            +
            +            _di.offset.scrollX = _scrollX;
            +            _di.offset.scrollY = _scrollY;
            +            _di.offset.maxX += _fixScrollX;
            +            _di.offset.maxY += _fixScrollY;
            +        };
            +
            +    Drag.Model._instanceName = 'JCDragIns';
            +
            +    Drag.Model.DRAG_INITED = 'JCDragInited';
            +    Drag.Model.DRAG_BEFORE = 'JCDragBefore';
            +    Drag.Model.DRAG_BEGIN = 'JCDragBegin';
            +    Drag.Model.DRAG_DONE = 'JCDragDone';
            +    Drag.Model.DRAG_AFTER = 'JCDragAfter';
            +    Drag.Model.DRAGGING_ITEM = 'JCDraggingItem';
            +    Drag.Model.DRAGGING_MOVING= 'JCDraggingMoving';
            +    Drag.Model.DROP_DONE = 'JCDropDone';
            +    Drag.Model.DROP_DONE_AFTER = 'JCDropDoneAfter';
            +
            +    Drag.Model.DISABLE_DRAG = 'disableDrag';
            +    Drag.Model.DISABLE_DROP = 'disableDrop';
            +    Drag.Model.IGNORE_DRAG = 'ignoreDrog';
            +
            +    Drag.Model.TRIGGER_DRAG = 'JCTriggerDrag';
            +
            +    Drag.Model.CLASS_CURRENT = 'JCCurrentDropBox';
            +    Drag.Model.CLASS_MOVING = 'JCMovingDropBox';
            +    Drag.Model.CLASS_CURRENT_DRAG_ITEM = 'JCCurrentDragItem';
            +
            +    JC.f.extendObject( Drag.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'Drag.Model.init:', new Date().getTime() );
            +            }
            +
            +        , defaultCSSPosition:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._defaultCSSPosition = _setter );
            +                return this._defaultCSSPosition;
            +            }
            +
            +        , defaultCSSZIndex:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._defaultCSSZIndex = _setter );
            +                return this._defaultCSSZIndex;
            +            }
            +
            +        , defaultCSSCursor:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._defaultCSSCursor = _setter );
            +                return this._defaultCSSCursor;
            +            }
            +
            +        , dragTarget:
            +            function(){
            +                var _p = this;
            +                if( !_p._dragTarget ){
            +                    _p._dragTarget = _p.selectorProp( 'dragTarget' );
            +
            +                    !( _p._dragTarget && _p._dragTarget.length ) 
            +                        && ( _p._dragTarget = _p.selector() )
            +                        ;
            +                }
            +                return _p._dragTarget;
            +            }
            +
            +        , dragMovingTarget:
            +            function( _cleanCache ){
            +                var _p = this, _isDropFor = _p.isDropFor();
            +
            +                if( _isDropFor && _cleanCache ){
            +                    _p._dragMovingTarget && _p._dragMovingTarget.remove();
            +                    _p._dragMovingTarget = null;
            +                }
            +
            +                if( !_p._dragMovingTarget ){
            +                    _p._dragMovingTarget = _p.dragTarget();
            +
            +                    if( _isDropFor ){
            +                        var _offset = _p.dragTarget().position(), _gid = JC.f.gid();
            +
            +                        _p._dragMovingTarget = _p.dragTarget().clone();
            +                        _p._dragMovingTarget.css( { 
            +                            'position': 'absolute'
            +                            , 'left': _offset.left + 'px'
            +                            , 'top': _offset.top + 'px'
            +                            , 'z-index': window.ZINDEX_COUNT++ 
            +                        } );
            +
            +                        _p.dragTarget().data( 'gid', _gid );
            +                        _p._dragMovingTarget.data( 'gid', _gid );
            +
            +                        _p.dragTarget().addClass( Drag.Model.CLASS_CURRENT_DRAG_ITEM );
            +
            +                        /*
            +                        JC.f.safeTimeout( function(){
            +                            _p._dragMovingTarget.css( { 'z-index': window.ZINDEX_COUNT++ } );
            +                        }, _p._dragMovingTarget, 'sdfaswesfasd', 1 );
            +                        */
            +
            +                        _p._dragMovingTarget.attr( Drag.Model.DISABLE_DROP, true )
            +                            .attr( Drag.Model.IGNORE_DRAG, true )
            +                            .addClass( Drag.Model.CLASS_MOVING )
            +                            ;
            +                    }
            +                }
            +
            +                _isDropFor 
            +                    && _cleanCache 
            +                    && _p.dragTarget().after( _p._dragMovingTarget )
            +                    ;
            +
            +                return _p._dragMovingTarget;
            +            }
            +
            +        , isDropFor: 
            +            function(){ 
            +                typeof this._isDropFor == 'undefined'
            +                    && ( this._isDropFor = this.is( '[dropFor]' ) && JC.f.parseBool( this.attrProp( 'dropFor' ) ) );
            +                return this._isDropFor;
            +            }
            +
            +        , dropFor: 
            +            function( _cleanCache ){
            +                ( !this._dropFor == 'undefined' || _cleanCache )
            +                    && ( this._dropFor = this.selectorProp( 'dropFor' ) );
            +                return this._dropFor;
            +            }
            +
            +        , relativeParent:
            +            function( _cleanCache ){
            +                if( !this._relativeParent == 'undefined' || _cleanCache ){
            +                    this._relativeParent = null;
            +                    var _tmp = this.dragTarget();
            +                    while( (_tmp = $( _tmp.parent() ) ).length ){
            +                        if( /body|html/i.test( _tmp.prop( 'nodeName' ) ) ) break;
            +                        if( ( _tmp.css( 'position' ) || '' ).toLowerCase() == 'relative' ){
            +                            this._relativeParent = _tmp;
            +                            break;
            +                        }
            +                    }
            +                }
            +                return this._relativeParent;
            +            }
            +
            +        , dropSwap:
            +            function(){
            +                return this.boolProp( 'dropSwap' );
            +            }
            +
            +        , dropPush:
            +            function(){
            +                return this.boolProp( 'dropPush' );
            +            }
            +
            +        , selectedDropBox:
            +            function( _x, _y ){
            +                var _p = this, _dropFor = _p.dropFor(), _di = Drag.dragInfo();
            +
            +                if( !_di ){ return null; }
            +
            +                if( typeof _x != 'undefined' && typeof _y != 'undefined' && _dropFor && _dropFor.length ){
            +                    _p._selectedDropBox = null;
            +
            +                    if( _dropFor && _dropFor.length ){
            +                        var _ls = []
            +                            , _srcRect = locationToRect( _x, _y, _di.offset.width, _di.offset.height )
            +                            ;
            +
            +                        _dropFor.each( function(){
            +                            var _sp = $(this);
            +
            +                            if( _sp.is( '[' + Drag.Model.DISABLE_DROP + ']' ) ) { return; }
            +
            +                            var _offset = _sp.position()
            +                                , _rect = locationToRect( _offset.left
            +                                                            , _offset.top
            +                                                            , _sp.prop( 'offsetWidth' )
            +                                                            , _sp.prop( 'offsetHeight' )
            +                                                        );
            +
            +                            if( intersectRect( _srcRect, _rect ) ){
            +                                _rect.selector = _sp;
            +                                _ls.push( _rect );
            +                            }
            +                        });
            +
            +                        if( _ls.length ){
            +                            var _findItem;
            +                            $.each( _ls, function( _ix, _rect ){
            +                                _rect.dist = pointDistance( rectToPoint( _srcRect ), rectToPoint( _rect ) );
            +
            +                                //_rect.selector.html( JC.f.moneyFormat( _dist ) );
            +
            +                                if( !_ix ){
            +                                    _findItem = _rect;
            +                                    return;
            +                                }
            +                                _rect.dist < _findItem.dist && ( _findItem = _rect );
            +                            });
            +                            this._selectedDropBox = _findItem.selector;
            +                        }else{
            +                            this._selectedDropBox = null;
            +                        }
            +                    }
            +                }
            +                return this._selectedDropBox;
            +            }
            +
            +        , dragIn:
            +            function(){
            +                if( ! ( this._dragIn && this._dragIn.length ) ){
            +                    this._dragIn = this.selectorProp( 'dragIn' );
            +                    !( this._dragIn && this._dragIn.length )
            +                        && ( this._dragIn = $( document.documentElement ) )
            +                        ;
            +                }
            +                return this._dragIn;
            +            }
            +
            +        , position:
            +            function( _evt ){
            +                var _p = this
            +                    , _toffset = _p.dragTarget().position()
            +                    , _inoffset = _p.dragIn().position()
            +                    , _roffset = _p.relativeParent() ? _p.relativeParent().position() : { 'left': 0, 'top': 0 }
            +                    , _r = {
            +                        'mouseX': _evt.pageX
            +                        , 'mouseY': _evt.pageY
            +                        , 'targetX': _toffset.left
            +                        , 'targetY': _toffset.top
            +                        , 'scrollX': _p.dragIn().scrollLeft()
            +                        , 'scrollY': _p.dragIn().scrollTop() 
            +                        , 'maxXFix': -1
            +                        , 'maxYFix': -1
            +                        , 'width': _p.dragTarget().prop( 'offsetWidth' )
            +                        , 'height': _p.dragTarget().prop( 'offsetHeight' )
            +                        , 'relativeFixX': _roffset.left
            +                        , 'relativeFixY': _roffset.top
            +                    };
            +
            +                    _r.x = _r.mouseX - _r.targetX;
            +                    _r.y = _r.mouseY - _r.targetY;
            +
            +                    !_inoffset && ( _inoffset = { 'left': 0, 'top': 0 } , _r.maxXFix = 0, _r.maxYFix = 0 );
            +                    _r.minX = _inoffset.left;
            +                    _r.minY = _inoffset.top;
            +
            +                    _r.maxX = _r.minX 
            +                                    + _p.dragIn().scrollLeft() 
            +                                    + _p.dragIn().width() 
            +                                    - _r.width
            +                                    - _r.maxXFix
            +                                    ;
            +
            +                    _r.maxY = _r.minY 
            +                                    + _p.dragIn().scrollTop() 
            +                                    + _p.dragIn().height() 
            +                                    - _r.height
            +                                    - _r.maxYFix
            +                                    ;
            +
            +                    //JC.log( [ _r.maxX, _r.maxY, _p.dragTarget().width(), _p.dragTarget().prop( 'offsetWidth' ) ] );
            +
            +                return _r;
            +            }
            +
            +        , dragInitedCb: function(){ return this.callbackProp( 'dragInitedCb' ) || Drag.dragInitedCb; }
            +        , dragBeforeCb: function(){ return this.callbackProp( 'dragBeforeCb' ) || Drag.dragBeforeCb; }
            +        , dragAfterCb: function(){ return this.callbackProp( 'dragAfterCb' ) || Drag.dragAfterCb; }
            +        , dragBeginCb: function(){ return this.callbackProp( 'dragBeginCb' ) || Drag.dragBeginCb; }
            +        , dragMovingCb: function(){ return this.callbackProp( 'dragMovingCb' ) || Drag.dragMovingCb; }
            +        , dragDoneCb: function(){ return this.callbackProp( 'dragDoneCb' ) || Drag.dragDoneCb; }
            +        , dropDoneCb: function(){ return this.callbackProp( 'dropDoneCb' ) || Drag.dropDoneCb; }
            +        , dropDoneAfterCb: function(){ return this.callbackProp( 'dropDoneAfterCb' ) || Drag.dropDoneAfterCb; }
            +
            +        , clean:
            +            function( _dragInfo ){
            +                var _p = this;
            +            }
            +    });
            +
            +    JC.f.extendObject( Drag.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'Drag.View.init:', new Date().getTime() );
            +            }
            +
            +        , updatePosition: 
            +            function( _x, _y ){
            +                var _p = this
            +                    , _dt = _p._model.dragMovingTarget()
            +                    , _selectedDropBox
            +                    ;
            +
            +                _dt.css({
            +                    'left': _x + 'px'
            +                    , 'top': _y + 'px'
            +                });
            +
            +                if( _p._model.isDropFor() ){
            +                    _selectedDropBox = _p._model.selectedDropBox();
            +                    _selectedDropBox && _selectedDropBox.removeClass( Drag.Model.CLASS_CURRENT );
            +
            +                    /*
            +                    _selectedDropBox = _p._model.selectedDropBox( _x, _y );
            +                    if( _selectedDropBox ){
            +                        _selectedDropBox.addClass( Drag.Model.CLASS_CURRENT );
            +                    }
            +                    */
            +                    _selectedDropBox = _p._model.selectedDropBox( _x, _y );
            +                    if( _selectedDropBox ){
            +                        if( _dt.data( 'gid' ) == _selectedDropBox.data( 'gid' ) && _p._model.dropSwap() ){
            +                        } else if( _dt.data( 'gid' ) == _selectedDropBox.data( 'gid' ) && _p._model.dropSwap() ){
            +                        }else{
            +                            _selectedDropBox.addClass( Drag.Model.CLASS_CURRENT );
            +                        }
            +                    }
            +
            +                }
            +            }
            +
            +        , dropDone:
            +            function( _dragInfo ){
            +                var _p = this;
            +
            +                if( _p._model.isDropFor() ){
            +                    var _selectedDropBox = _p._model.selectedDropBox();
            +                    if( !( _selectedDropBox && _selectedDropBox.length ) ) return;
            +
            +                    if( _selectedDropBox.data( Drag.Model.DRAGGING_ITEM ) ) return;
            +
            +                    if( _p._model.dropDoneCb() 
            +                            && _p._model.dropDoneCb().call( 
            +                                _p._model.selector()
            +                                , _p._model.dragTarget() 
            +                                , _selectedDropBox
            +                           ) === false
            +                    ){
            +                        return;
            +                    }
            +
            +                    if( _p.notificationHandler( 'DROP_DONE', [ 
            +                                _p._model.selector()
            +                                , _p._model.dragTarget() 
            +                                , _selectedDropBox
            +                           ] ) === false
            +                    ){
            +                        return;
            +                    }
            +
            +                    _p.trigger( Drag.Model.DROP_DONE );
            +
            +                    if( _p._model.dropSwap() ){
            +                        var _srcIpt = $( '<input type="hidden" />' )
            +                            , _targetIpt = _srcIpt.clone()
            +                            ;
            +                        _p._model.dragTarget().after( _srcIpt );
            +                        _selectedDropBox.after( _targetIpt );
            +
            +                        _targetIpt.after( _p._model.dragTarget() );
            +                        _srcIpt.after( _selectedDropBox );
            +
            +                        _srcIpt.remove();
            +                        _targetIpt.remove();
            +                    } else if( _p._model.dropPush ){
            +                        _p.trigger( 'INIT_INDEX' );
            +                        var _srcIpt = $( '<input type="hidden" />' )
            +                            , _targetIpt = _srcIpt.clone()
            +                            ;
            +                        /*
            +                        _p._model.dragTarget().after( _srcIpt );
            +                        _selectedDropBox.after( _targetIpt );
            +
            +                        _targetIpt.after( _p._model.dragTarget() );
            +                        _srcIpt.after( _selectedDropBox );
            +
            +                        _srcIpt.remove();
            +                        _targetIpt.remove();
            +
            +                        JC.log( _selectedDropBox.data( 'dragIndex' ), _p._model.dragTarget().data( 'dragIndex' ) );
            +                        */
            +
            +                        if( _p._model.dragTarget().data( 'dragIndex' ) > _selectedDropBox.data( 'dragIndex' ) ){
            +                            _selectedDropBox.before( _p._model.dragTarget() );
            +                        }else{
            +                            _selectedDropBox.after( _p._model.dragTarget() );
            +                        }
            +
            +                    }else{
            +                        _p._model.dragTarget().appendTo( _selectedDropBox );
            +                    }
            +
            +                    _p._model.dropDoneAfterCb() 
            +                        && _p._model.dropDoneAfterCb().call( 
            +                            _p._model.selector()
            +                            , _p._model.dragTarget() 
            +                            , _selectedDropBox
            +                        );
            +
            +                    _p.notification( 'DROP_DONE_AFTER', [ 
            +                        _p._model.selector()
            +                        , _p._model.dragTarget() 
            +                        , _selectedDropBox
            +                    ]);
            +
            +                    _p.trigger( Drag.Model.DROP_DONE_AFTER );
            +                }
            +            }
            +
            +        , clean:
            +            function( _dragInfo ){
            +                var _p = this;
            +
            +                if( _p._model.isDropFor() ){
            +                    _p._model.dragMovingTarget() 
            +                        && _p._model.dragMovingTarget().remove()
            +                        ;
            +
            +                    _p._model.selectedDropBox() 
            +                        && _p._model.selectedDropBox().removeClass( Drag.Model.CLASS_CURRENT )
            +                        ;
            +                }
            +            }
            +    });
            +    /**
            +     * 判断两个矩形是否有交集
            +     */
            +    function intersectRect( r1, r2 ) {
            +        return !(
            +                    r2.left > r1.right || 
            +                    r2.right < r1.left || 
            +                    r2.top > r1.bottom ||
            +                    r2.bottom < r1.top
            +                );
            +    }
            +    /**
            +     * 把坐标和宽高生成一个 rectangle 数据
            +     */
            +    function locationToRect( _x, _y, _width, _height ){
            +        var _offset, _r = {
            +            'left': _x
            +            , 'top': _y
            +            , 'right': _x + _width
            +            , 'bottom': _y + _height 
            +        };
            +        return _r;
            +    }
            +    /**
            +     * 把 rectangle 数据 转换为 坐标数据
            +     */
            +    function rectToPoint( _rect ){
            +        var _r = {
            +            'x': _rect.left + ( _rect.right - _rect.left ) / 2
            +            , 'y': _rect.top + ( _rect.bottom - _rect.top ) / 2
            +        };
            +        return _r;
            +    }
            +    /**
            +     * 计算两个坐标点之间的距离
            +     */
            +    function pointDistance( _p1, _p2 ){
            +        var _dx = _p2.x - _p1.x
            +            , _dy = _p2.y - _p1.y
            +            , _dist = Math.sqrt( _dx * _dx + _dy * _dy );
            +            ;
            +        return _dist;
            +    }
            +    /**
            +     * 实例初始化后触发的事件
            +     * @event JCDragInited
            +     */
            +    /**
            +     * 拖动开始前触发的事件
            +     * @event JCDragBefore
            +     */
            +    /**
            +     * 拖动开始时触发的事件
            +     * @event JCDragBegin
            +     */
            +    /**
            +     * 拖动完成时触发的事件
            +     * @event JCDragDone
            +     */
            +    /**
            +     * 拖动完成之后触发的事件
            +     * @event JCDragAfter
            +     */
            +    /**
            +     * 拖动移动时触发的事件
            +     * @event JCDraggingMoving
            +     */
            +    /**
            +     * 拖放完成时触发的事件
            +     * @event JCDropDone
            +     */
            +    /**
            +     * 拖放完成后触发的事件
            +     * @event JCDropDoneAfter
            +     */
            +    /**
            +     * 手动触发拖动事件
            +     * @event JCTriggerDrag
            +     */
            +    /*
            +    $(document).ready( function(){
            +        var _insAr = 0;
            +        Drag.autoInit
            +            && ( _insAr = Drag.init() )
            +            ;
            +    });
            +    */
            +
            +    _jdoc.delegate( 'div.js_compDrag, button.js_compDrag', 'mouseenter', function( _evt ){
            +        var _p = $( this ), _ins = JC.BaseMVC.getInstance( $(this), JC.Drag );
            +        if( _p.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) ) return
            +        !_ins && ( _ins = new JC.Drag( _p ) ) && JC.BaseMVC.getInstance( _p, JC.Drag, _ins );
            +    });
            +
            +    _jdoc.delegate( 'div.js_compDrag, button.js_compDrag', 'mousedown', function( _evt ){
            +        var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, Drag );
            +        if( _p.is( '[' + Drag.Model.IGNORE_DRAG + ']' ) ) return
            +        !_ins && ( _ins = new Drag( _p ) ) && _ins.trigger( Drag.Model.TRIGGER_DRAG, [ _evt ] );
            +        return false;
            +    });
            +
            +    _jwin.on( 'resize', function( _evt ){
            +        Drag.cleanDragData();
            +    });
            +
            +    return JC.Drag;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_FChart_FChart.js.html b/docs_api/files/.._comps_FChart_FChart.js.html new file mode 100644 index 000000000..5705844ba --- /dev/null +++ b/docs_api/files/.._comps_FChart_FChart.js.html @@ -0,0 +1,897 @@ + + + + + ../comps/FChart/FChart.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/FChart/FChart.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( 'JC.FChart', [ 'JC.BaseMVC', 'swfobject', 'plugins.json2', 'jquery.mousewheel'  ], function(){
            +
            +JC.use && !window.swfobject && JC.use( 'plugins.swfobject' );
            +JC.use && !window.JSON && JC.use( 'plugins.jsons' );
            +JC.use && !jQuery.event.special.mousewheel && JC.use( 'plugins.jquery.mousewheel' );
            +
            +/**
            + * JC.FChart - flash 图表组件
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *      , <a href='window.swfobject.html'>SWFObject</a>
            + *      , <a href='window.JSON.html'>JSON2</a>
            + *      , <a href='window.jQuery.mousewheel.html'>jQuery.mousewheel</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/fchart' target='_blank'>JC Project Site</a>
            + *      | <a href='http://fchart.openjavascript.org/docs_api/classes/JC.FChart.html' target='_blank'>API docs</a>
            + *      | <a href='../../comps/FChart/_demo?target=_blank' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会处理 div class="js_compFChart"</h2>
            + *
            + *  <h2>可用的 HTML attribute</h2>
            + *
            + *  <dl>
            + *      <dt>chartScriptData = script tpl selector</dt>
            + *      <dd>图表的脚本模板数据<dd>
            + *
            + *      <dt>chartDataVar = json object name</dt>
            + *      <dd>图表的json数据名, <b>window变量域</b><dd>
            + *
            + *      <dt>chartWidth = number, default = 100%</dt>
            + *      <dd>图表的宽度</dd>
            + *
            + *      <dt>chartHeight = number, default = 400</dt>
            + *      <dd>图表的高度</dd>
            + *
            + *      <dt>chartScroll = bool, default = true</dt>
            + *      <dd>图表是否响应鼠标滚动</dd>
            + *  </dl> 
            + *
            + * @namespace   JC
            + * @class       FChart
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-09-09
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +<pre>
            +    &lt;div class="js_compFChart"
            +        chartScriptData="|script"
            +        chartWidth="600"
            +        chartHeight="400"
            +        >
            +        &lt;script type="text/template">
            +            {
            +                chart: {
            +                    type: 'bar' 
            +                }, 
            +                title: {
            +                    text:'Chart Title'
            +                },
            +                subtitle: {
            +                    text: 'sub title'
            +                }, 
            +                xAxis: {
            +                    categories: [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12' ]
            +                }, 
            +                yAxis: {
            +                    title: {
            +                        text: '(Vertical Title - 中文)'
            +                    }
            +                },
            +                series:[{
            +                    name: 'Temperature'
            +                    , data: [-50, 0, 3, -20, -20, 27, 28, 32, 30, 25, 15, -58]
            +                    , style: { 'stroke': '#ff7100' } 
            +                    , pointStyle: {}
            +                }, {
            +                    name: 'Rainfall',
            +                    data: [20, 21, 20, 100, 200, 210, 220, 100, 20, 10, 20, 10]
            +                }],
            +                credits: {
            +                    enabled: true
            +                    , text: 'fchart.openjavascript.org'
            +                    , href: 'http://fchart.openjavascript.org/'
            +                },
            +                displayAllLabel: true,
            +                legend: {
            +                    enabled: false
            +                }
            +            }
            +        &lt;/script>
            +    &lt;/div>
            +</pre>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.FChart = FChart;
            +
            +    function FChart( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, FChart ) ) 
            +            return JC.BaseMVC.getInstance( _selector, FChart );
            +
            +        JC.BaseMVC.getInstance( _selector, FChart, this );
            +
            +        this._model = new FChart.Model( _selector );
            +        this._view = new FChart.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( FChart.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 FChart 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of FChartInstance}
            +     */
            +    FChart.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compFChart' )  ){
            +                    _r.push( new FChart( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compFChart' ).each( function(){
            +                        _r.push( new FChart( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( FChart );
            +
            +    JC.f.extendObject( FChart.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'FChart _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +                   var _data = _p._model.parseInitData();
            +
            +                    if( _data ){
            +                        _p.trigger( FChart.Model.UPDATE_CHART_DATA, [ _data ] );
            +                    }
            +                    _p._model.height() && _p.selector().css( { 'height': _p._model.height() } );
            +
            +                    if( !_p._model.chartScroll() || _p._model.type().toLowerCase() == 'map' ){
            +                        _p.selector().on( 'mousewheel', function( _evt ){
            +                            var _swf = $( '#' + _p.gid() );
            +                            if( _evt.deltaY && _swf &&  _swf.prop( 'apiReady' ) && _swf.prop( 'updateMouseWheel' ) ){
            +                                _swf[0].updateMouseWheel( _evt.deltaY );
            +                            }
            +                            return false;
            +                        });
            +                    }
            +
            +                });
            +
            +                _p.on( FChart.Model.UPDATE_CHART_DATA, function( _evt, _data ){
            +                    _p.trigger( FChart.Model.CLEAR );
            +                    _p._view.update( _data );
            +                    _p._model.chartSize( { width: _p._model.width(), height: _p._model.height() } );
            +                });
            +
            +                _p.on( FChart.Model.CLEAR, function( _evt ){
            +                    _p.trigger( FChart.Model.CLEAR_STATUS );
            +                    _p._view && _p._view.clear();
            +                    //_p._model.clear && _p._model.clear();
            +                });
            +
            +
            +                _p._model.chartSize( { width: _p._model.width(), height: _p._model.height() } );
            +
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'FChart _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +        /**
            +         * 更新数据
            +         * @method update
            +         * @param   object  _data
            +         */
            +        , update:
            +            function( _data ){
            +                this.trigger( FChart.Model.UPDATE_CHART_DATA, _data );
            +                return this;
            +            }
            +        /**
            +         *
            +         */
            +        , gid: function(){ return this._model.gid(); }
            +
            +    });
            +
            +    FChart.Model._instanceName = 'JCFChart';
            +
            +    FChart.Model.INS_COUNT = 1;
            +    FChart.Model.CLEAR = 'clear';
            +    FChart.Model.CLEAR_STATUS = 'clear_status';
            +    FChart.Model.UPDATE_CHART_DATA = 'update_data';
            +
            +    /**
            +     * flash swf 路径映射
            +     * <br />你还可以使用其他属性进行定义路径映射
            +     *      1. window.FCHART_SWF_FILE_MAP
            +     *      2. JC.FCHART_SWF_FILE_MAP
            +     * @property    Model.SWF_FILE_MAP
            +     * @type        {object}
            +     * @default     null
            +     * @static
            +     * @example
            +        requirejs( [ 'JC.FChart' ], function( FChart ){
            +            FChart['Model'].SWF_FILE_MAP = {
            +                'bar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Histogram.swf'
            +                , 'vbar': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VHistogram.swf'
            +                , 'line': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/CurveGram.swf'
            +                , 'stack': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/Stack.swf'
            +                , 'mix': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/MixChart.swf'
            +
            +                , 'column': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/ZHistogram.swf'
            +                , 'hcolumn': 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/swf/VZHistogram.swf'
            +            };
            +        });
            +     */
            +    FChart.Model.SWF_FILE_MAP = null;
            +
            +    /**
            +     * flash swf 路径
            +     * <br />{0} = JC.PATH
            +     * <br />{1} = chart file name
            +     * @property    Model.FLASH_PATH
            +     * @type        {string}
            +     * @default     {0}/flash/pub/charts/{1}.swf
            +     * @static
            +     */
            +    FChart.Model.FLASH_PATH = '{0}/swf/{1}.swf?{2}';
            +
            +    /**
            +     * flash swf 缓存版本控制
            +     * @property    Model.VERSION
            +     * @type        {string}
            +     * @default     requirejs.s.contexts._.config.urlArgs || 'v=' + JC.pathPostfix || 'v=fchart'
            +     * @static
            +     */
            +    FChart.Model.VERSION = 'fchart';
            +    JC.pathPostfix && ( FChart.Model.VERSION = 'v=' + JC.pathPostfix );
            +    window.requirejs 
            +        && window.requirejs.s
            +        && window.requirejs.s.contexts
            +        && window.requirejs.s.contexts._
            +        && window.requirejs.s.contexts._.config
            +        && window.requirejs.s.contexts._.config.urlArgs
            +        && ( FChart.Model.VERSION = window.requirejs.s.contexts._.config.urlArgs );
            +
            +    /**
            +     * 图表类型映射
            +     * <br />曲线图: line, curvegram
            +     * <br />柱状图: bar, histogram
            +     * <br />垂直柱状图: var, vhistogram
            +     * <br />饼状图: pie, piegraph
            +     * <br />圆环图: dount
            +     * <br />评分球: rate
            +     * @property    Model.TYPE_MAP
            +     * @type        {object}
            +     * @static
            +     */
            +    FChart.Model.TYPE_MAP = {
            +        'line': 'CurveGram'
            +        , 'curvegram': 'CurveGram'
            +
            +        , 'bar': 'Histogram'
            +        , 'histogram': 'Histogram'
            +
            +        , 'vbar': 'VHistogram'
            +        , 'hbar': 'VHistogram'
            +        , 'vhistogram': 'VHistogram'
            +
            +        , 'column': 'ZHistogram'
            +        , 'zbar': 'ZHistogram'
            +        , 'zhistogram': 'ZHistogram'
            +
            +
            +        , 'hcolumn': 'VZHistogram'
            +
            +        , 'mix': 'MixChart'
            +
            +        , 'map': 'Map'
            +
            +        , 'trend': 'Trend'
            +        , 'Trend': 'Trend'
            +
            +        , 'pie': 'PieGraph'
            +        , 'piegraph': 'PieGraph'
            +
            +        , 'dount': 'Dount'
            +
            +        , 'ddount': 'DDount'
            +        , 'ndount': 'NDount'
            +
            +        , 'stack': 'Stack'
            +        , 'hstack': 'HStack'
            +
            +        , 'rate': 'Rate'
            +    };
            +
            +
            +    JC.f.extendObject( FChart.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'FChart.Model.init:', new Date().getTime() );
            +                this._gid = 'jchart_gid_' + ( FChart.Model.INS_COUNT++ );
            +                this.afterInit && this.afterInit();
            +            }
            +        , chartScroll:
            +            function(){
            +                var _r = true;
            +                this.is( '[chartScroll]' ) && ( _r = this.boolProp( 'chartScroll' ) );
            +                return _r;
            +            }
            +        /**
            +         * 解析图表默认数据
            +         */
            +        , parseInitData:
            +            function(){
            +                var _p = this, _data;
            +                if( _p.selector().attr( 'chartScriptData' ) ){
            +                    _data = _p.selectorProp( 'chartScriptData' ).html();
            +                }else if( _p.selector().is( '[chartDataVar]' ) ){
            +                    _data = _p.windowProp( 'chartDataVar' );
            +                    _data && ( _data = JSON.stringify( _data ) );
            +                }
            +
            +                if( _data ){
            +                    _data = _data.replace( /^[\s]*?\/\/[\s\S]*?[\r\n]/gm, '' );
            +                    _data = _data.replace( /[\r\n]/g, '' );
            +                    _data = _data.replace( /\}[\s]*?,[\s]*?\}$/g, '}}');
            +                    _data = eval( '(' + _data + ')' );
            +                }
            +
            +                return _data;
            +            }
            +        /**
            +         * 保存图表数据
            +         */
            +        , data:
            +            function( _data ){
            +                typeof _data != 'undefined' && ( this._data = _data );
            +                return this._data;
            +            }
            +
            +        , gid: function(){ return this._gid; }
            +
            +        /**
            +         * 图表宽度
            +         */
            +        , width:
            +            function(){
            +                if( typeof this._width == 'undefined' ){
            +                    this._width = this.selector().prop( 'offsetWidth' );
            +                    this.is( '[chartWidth]' ) && ( this._width = this.intProp( 'chartWidth' ) || this._width );
            +                }
            +                return this._width
            +            }
            +        /**
            +         * 图表高度
            +         */
            +        , height:
            +            function(){
            +                if( typeof this._height == 'undefined' ){
            +                    this._height = this.selector().prop( 'offsetHeight' ) || 400;
            +                    this.is( '[chartHeight]' ) && ( this._height = this.intProp( 'chartHeight' ) || this._height );
            +                }
            +                return this._height;
            +            }
            +        /**
            +         * 图表宽度
            +         */
            +        , sourceWidth:
            +            function(){
            +                if( typeof this._sourceWidth== 'undefined' ){
            +                    this.is( '[chartWidth]' ) && ( this._sourceWidth = this.intProp( 'chartWidth' ) || this._sourceWidth );
            +                }
            +                return this._sourceWidth || '100%';
            +            }
            +
            +        /**
            +         * 设置或保存图表的宽高
            +         */
            +        , chartSize:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._chartSize = _setter );
            +                return this._chartSize;
            +            }
            +        /**
            +         * 图表画布
            +         */
            +        , stage:
            +            function(){
            +            }
            +        /**
            +         * 画布圆角弧度 
            +         */
            +        , stageCorner: function(){ return 18; }
            +        /**
            +         * 清除图表数据
            +         */
            +        , clear: 
            +            function(){
            +                var _p = this, _k;
            +                for( _k in _p ){
            +                    //JC.log( _k, JC.f.ts() );
            +                    if( /^\_/.test( _k ) ){
            +                        if( _k == '_selector' ) continue;
            +                        if( _k == '_gid' ) continue;
            +                        _p[ _k ] = undefined;
            +                    }
            +                }
            +                //JC.log( 'JChart.Base clear', JC.f.ts() );
            +                _p.afterClear && _p.afterClear();
            +            }
            +        /**
            +         * 清除图表状态
            +         */
            +        , clearStatus:
            +            function(){
            +            }
            +
            +        , chartType:
            +            function(){
            +                var _r = '';
            +                this.data() 
            +                    && this.data().chart
            +                    && this.data().chart.type
            +                    && ( _r = this.data().chart.type )
            +                return (_r||'').toString().toLowerCase();
            +            }
            +        , typeMap: function( _type ){ return FChart.Model.TYPE_MAP[ _type ]; }
            +        , type: function(){ return this.typeMap( this.chartType() ) || ''; }
            +        , path:
            +            function(){
            +                var _path = JC.FCHART_PATH;
            +                if( !_path ){
            +                    if( JC.use ){
            +                         _path = JC.PATH + '/comps/FChart/';
            +                    }else{
            +                         _path = JC.PATH + '/modules/JC.FChart/0.1/';
            +                    }
            +                }
            +                var _p = this
            +                    , _r = JC.f.printf( _p.attrProp( 'chartPath' ) || FChart.Model.FLASH_PATH
            +                        , _path
            +                        , _p.type() 
            +                        , FChart.Model.VERSION 
            +                    );
            +
            +                _r = this.checkFileMap() || _r;
            +
            +
            +                return _r;
            +            }
            +       
            +        , checkFileMap:
            +            function(){
            +                var _r = '';
            +                if( window.FCHART_SWF_FILE_MAP ){
            +                   this.chartType() in window.FCHART_SWF_FILE_MAP 
            +                       && ( _r = window.FCHART_SWF_FILE_MAP[ this.chartType() ] );
            +
            +                   this.type() in window.FCHART_SWF_FILE_MAP 
            +                       && ( _r = window.FCHART_SWF_FILE_MAP[ this.type() ] );
            +                }
            +
            +
            +                if( JC.FCHART_SWF_FILE_MAP ){
            +                   this.chartType() in JC.FCHART_SWF_FILE_MAP 
            +                       && ( _r = JC.FCHART_SWF_FILE_MAP[ this.chartType() ] );
            +
            +                   this.type() in JC.FCHART_SWF_FILE_MAP 
            +                       && ( _r = JC.FCHART_SWF_FILE_MAP[ this.type() ] );
            +                }
            +
            +                if( FChart.Model.SWF_FILE_MAP ){
            +                   this.chartType() in FChart.Model.SWF_FILE_MAP 
            +                       && ( _r = FChart.Model.SWF_FILE_MAP[ this.chartType() ] );
            +
            +                   this.type() in FChart.Model.SWF_FILE_MAP 
            +                       && ( _r = FChart.Model.SWF_FILE_MAP[ this.type() ] );
            +                }
            +
            +                _r && ( _r = JC.f.printf( '{0}?v={1}', _r, FChart.Model.VERSION ) );
            +
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( FChart.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'FChart.View.init:', new Date().getTime() );
            +                var _p = this;
            +            }
            +        /**
            +         * 渲染图表外观
            +         */
            +        , draw: 
            +            function( _data ){
            +                if( !this._model.type() ) return;
            +                var _p = this
            +                    , _path =  _p._model.path()
            +                    , _fpath =  _path.replace( /([^\:]|)[\/]+/g, '$1/' )
            +                    , _element = $( '#' + _p._model.gid() )
            +                    , _dataStr = JSON.stringify( _data ) 
            +                    ; 
            +
            +                if( !$( '#' +  _p._model.gid() ).length ){
            +                    _element = $( JC.f.printf( '<span id="{0}"></span>', _p._model.gid() ) );
            +                    _element.appendTo( _p.selector() );
            +                }
            +
            +                var _flashVar = { 'chart': encodeURIComponent( _dataStr ) }
            +                    , _flashParams = { 
            +                        'wmode': 'transparent'
            +                        , 'allowScriptAccess' : 'always' 
            +                    }
            +                    , _flashAttrs = { 'id': _p._model.gid(), 'name': _p._model.gid() }
            +                    ;
            +
            +                swfobject.embedSWF( 
            +                    _fpath
            +                    , _p._model.gid()
            +                    , _p._model.sourceWidth()
            +                    , _p._model.height()
            +                    , '10' 
            +                    , ''
            +                    , _flashVar
            +                    , _flashParams
            +                    , _flashAttrs
            +                );
            +
            +            }
            +
            +        /**
            +         * 图表高度
            +         */
            +        , width: function(){ return this._model.width(); }
            +        /**
            +         * 图表高度
            +         */
            +        , height: function(){ return this._model.height(); }
            +        /**
            +         * 图表画布
            +         */
            +        , stage: function(){ return this._model.stage(); }
            +        /**
            +         * 初始化的选择器
            +         */
            +        , selector:
            +            function(){
            +                return this._model.selector();
            +            }
            +        /**
            +         * 清除图表数据
            +         */
            +        , clear: 
            +            function(){
            +                var _p = this;
            +                if( !_p._model._stage ) return;
            +                $( _p._model._stage.canvas ).remove();
            +                _p._model._stage = undefined;
            +            }
            +        /**
            +         * 清除图表状态
            +         */
            +        , clearStatus:
            +            function(){
            +            }
            +        /**
            +         * 更新图表数据
            +         */
            +        , update: 
            +            function( _data ){
            +                var _p = this;
            +                _p.clear();
            +                _p._model.clear();
            +                _p._model.data( _data );
            +                _p.draw( _data );
            +            }
            +    });
            +
            +    _jdoc.ready( function(){
            +        JC.f.safeTimeout( function(){
            +            FChart.autoInit && FChart.init();
            +        }, null, 'winFCHARTInit', 1 );
            +    });
            +
            +    return JC.FChart;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Fixed_Fixed.js.html b/docs_api/files/.._comps_Fixed_Fixed.js.html index 0a6d03aeb..037211bfa 100644 --- a/docs_api/files/.._comps_Fixed_Fixed.js.html +++ b/docs_api/files/.._comps_Fixed_Fixed.js.html @@ -3,11 +3,17 @@ ../comps/Fixed/Fixed.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,17 +252,17 @@

            File: ../comps/Fixed/Fixed.js

            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
             //TODO: 添加回调处理
             //TODO: 添加值运动 
             //TODO: 完善注释
            -;(function($){
                 window.Fixed = JC.Fixed = Fixed;
                 /**
                  * 内容固定于屏幕某个位置显示
            -     * <dl>
            -     *      <dd><b>require</b>: <a href='window.jQuery.html'>jQuery</a></dd>
            -     *      <dd><b>require</b>: <a href='.window.html#property_$.support.isFixed'>$.support.isFixed</a></dd>
            -     * </dl>
            +     * <p><b>require</b>: 
            +     *      <a href='.jQuery.html'>jQuery</a>
            +     *      , <a href='JC.common.html'>JC.common</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Fixed.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Fixed/_demo' target='_blank'>demo link</a></p>
            @@ -221,7 +293,7 @@ 

            File: ../comps/Fixed/Fixed.js

            }); $([ this._view, this._model ] ).on('TriggerEvent', function( _evt, _evtName ){ - var _data = sliceArgs( arguments ); _data.shift(); _data.shift(); + var _data = JC.f.sliceArgs( arguments ); _data.shift(); _data.shift(); _p.trigger( _evtName, _data ); }); @@ -298,7 +370,7 @@

            File: ../comps/Fixed/Fixed.js

            * @default 300 * @static */ - Fixed.durationms = 300; + Fixed.durationms = 200; /** * 每次滚动的时间间隔( 时间运动 ) * @property stepms @@ -342,6 +414,11 @@

            File: ../comps/Fixed/Fixed.js

            , fixedbottom: function(){ return parseInt( this._layout.attr('fixedbottom'), 10 ); } , fixedleft: function(){ return parseInt( this._layout.attr('fixedleft'), 10 ); } + , fixedAutoHide: + function(){ + return JC.f.parseBool( this._layout.attr( 'fixedAutoHide' ) ); + } + , fixedcenter: function(){ var _r = (this._layout.attr('fixedcenter') || '').replace(/[^\d.,\-]/g, '').split(','); @@ -406,8 +483,8 @@

            File: ../comps/Fixed/Fixed.js

            , fixedeffect: function( _item ){ var _r = true, _p = this; - _p.layout().is('[fixedeffect]') && ( _r = parseBool( _p.layout().attr( 'fixedeffect' ) ) ); - _item && _item.is('[fixedeffect]') && ( _r = parseBool( _item.attr( 'fixedeffect' ) ) ); + _p.layout().is('[fixedeffect]') && ( _r = JC.f.parseBool( _p.layout().attr( 'fixedeffect' ) ) ); + _item && _item.is('[fixedeffect]') && ( _r = JC.f.parseBool( _item.attr( 'fixedeffect' ) ) ); return _r; } }; @@ -425,7 +502,31 @@

            File: ../comps/Fixed/Fixed.js

            : this._initFixedUnsupport(); this._initMoveTo(); - this._model.layout().show(); + + $( _p ).on( 'hide_layout', function(){ + _p._model.layout().hide(); + }); + + $( _p ).on( 'show_layout', function(){ + _p._model.layout().show(); + }); + + + if( _p._model.fixedAutoHide() ){ + if( JDOC.scrollTop() <= 20 ){ + $( _p ).trigger( 'hide_layout' ); + } + + JDOC.on( 'scroll', function(){ + if( JDOC.scrollTop() <= 20 ){ + $( _p ).trigger( 'hide_layout' ); + }else{ + $( _p ).trigger( 'show_layout' ); + } + }); + }else{ + $( _p ).trigger( 'show_layout' ); + } return this; } @@ -445,7 +546,7 @@

            File: ../comps/Fixed/Fixed.js

            Fixed.interval(); }); - mousewheelEvent( function mousewheel( _evt ){ Fixed.interval(); }); + JC.f.mousewheelEvent( function mousewheel( _evt ){ Fixed.interval(); }); } , _processMoveto: @@ -509,7 +610,7 @@

            File: ../comps/Fixed/Fixed.js

            */ Fixed.interval( - easyEffect( + JC.f.easyEffect( function( _cur, _done ){ _isUp && ( _cur = _endVal - _cur + _beginVal ); //console.log( 'Fixed scrollTo:', _cur, _tmpCount++ ); @@ -617,6 +718,39 @@

            File: ../comps/Fixed/Fixed.js

            } }; + /** + * 判断是否支持 CSS position: fixed + * @property $.support.isFixed + * @type bool + * @require jquery + * @static + */ + window.jQuery && jQuery.support && (jQuery.support.isFixed = (function ($){ + try{ + var r, contain = $( document.documentElement ), + el = $( "<div style='position:fixed;top:100px;visibility:hidden;'>x</div>" ).appendTo( contain ), + originalHeight = contain[ 0 ].style.height, + w = window, jw = $( w ), + sleft = jw.scrollLeft(), stop = jw.scrollTop() + ; + + contain.height( screen.height * 2 + "px" ); + + w.scrollTo( 0, 100 ); + + r = el[ 0 ].getBoundingClientRect().top === 100; + + contain.height( originalHeight ); + + el.remove(); + + //w.scrollTo( 0, 0); + w.scrollTo( sleft, stop ); + + return r; + }catch(ex){ alert( ex.message ); } + })(jQuery)); + $(document).ready( function(){ if( !Fixed.autoInit ) return; $([ @@ -625,10 +759,20 @@

            File: ../comps/Fixed/Fixed.js

            , 'ul.js_autoFixed' , 'ol.js_autoFixed' , 'button.js_autoFixed' + , 'a.js_autoFixed' ].join() ).each( function(){ new Fixed( $(this) ); }); }); -}(jQuery)); + return JC.Fixed; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_FlowChart_FlowChart.js.html b/docs_api/files/.._comps_FlowChart_FlowChart.js.html new file mode 100644 index 000000000..5a360ec2e --- /dev/null +++ b/docs_api/files/.._comps_FlowChart_FlowChart.js.html @@ -0,0 +1,1557 @@ + + + + + ../comps/FlowChart/FlowChart.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/FlowChart/FlowChart.js

            + +
            +
            +/**
            + * 支持 多对多 关系( 目前只支持 一对多 和 多对一 )
            + */
            + ;(function(define, _win) { 'use strict'; define( [ 'Raphael', 'JC.BaseMVC', 'JC.PopTips' ], function(){
            +/**
            + * <dl>
            + *      <dt>JC 流程图</dt>
            + *      <dd style="">一对多关系</dd>
            + *      <dd>多对一关系</dd>
            + *      <dd style="color:#ccc;text-decoration: line-through;">多对多关系</dd>
            + * </dl>
            + *  <p><b>require</b>:
            + *      <a href='window.Raphael.html'>RaphaelJS</a>
            + *      , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *      , <a href='JC.PopTips.html'>JC.PopTips</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc2.openjavascript.org/docs_api/classes/JC.FlowChart.html' target='_blank'>API docs</a>
            + *      | <a href='../../modules/JC.FlowChart/0.1/_demo' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会处理 div class="js_compFlowChart"</h2>
            + *
            + *  <h2>可用的 HTML attribute</h2>
            + *
            + *  <dl>
            + *      <dt>data-FlowChart = script json data</dt>
            + *      <dd>流程图数据
            + *          <dl>
            + *              <dt>数据说明</dt>
            + *              <dd>数据按节点关系分为两大类: 一对多, 多对一</dd>
            + *              <dd>
            + *                  <dl>
            + *                      <dt>一对多数据</dt>
            + *                      <dd>一对多数据存放于字段: nodes, nodes 数据类型为数组</dd>
            + *                      <dd>nodes 字段位于数据节点里</dd>
            + *                  </dl>
            + *                  <dl>
            + *                      <dt>多对一数据</dt>
            + *                      <dd>多对一数据存放于字段: targetNodes, targetNodes 数据类型为对象</dd>
            + *                      <dd>targetNodes 字段为全局节点</dd>
            + *                  </dl>
            + *              </dd>
            + *          </dl>
            + *          <dl>
            + *              <dt>数据字段说明</dt>
            + *              <dd>
            + *                  <h2>图表数据 - chart 字段</h2>
            + *                  <dl>
            + *                      <dt>name = string</dt>
            + *                      <dd>节点名</dd>
            + *
            + *                      <dt>id = string</dt>
            + *                      <dd>节点唯一标识符</dd>
            + *
            + *                      <dt>nodes = array</dt>
            + *                      <dd>一对多数据的子节点, 该字段位于父节点里面</dd>
            + *
            + *                      <dt>targetNodes = object</dt>
            + *                      <dd>多对一数据的子节点, 该字段为全局字段, 节点位置 chart.targetNodes</dd>
            + *
            + *                      <dt>status = string, default = 0</dt>
            + *                      <dd>
            + *                          节点状态
            + *                          <br/>根据 status 显示为不同的样式
            + *                          <br/>默认有0 ~ 10, 共11 种状态
            + *                          <br/>由status 产生的 css class: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status )
            + *                      </dd>
            + *
            + *                      <dt>tipsHtml = string</dt>
            + *                      <dd>鼠标划过节点时, 显示的tips内容, 支持html内容</dd>
            + *                  </dl>
            + *                  <h2>线条与图标颜色 - colors 字段</h2>
            + *                  <dl>
            + *                      <dt>line = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2 } </dt>
            + *                      <dd>背景线颜色</dd>
            + *
            + *                      <dt>icon = raphael object, default: { 'stroke': '#E1E1E1', 'stroke-width': 2, 'fill': '#F2F2F2' } </dt>
            + *                      <dd>图标颜色</dd>
            + *
            + *                      <dt>如果要自定义节点颜色 或者 tips 颜色, 请使用 css 定义: js_cfcItemStatus_N, js_cfcItemTips_N ( N 代表 status ) </dt>
            + *                  </dl>
            + *              </dd>
            + *          </dl>
            + *      <dd>
            + *  </dl> 
            + *
            + * @namespace   JC
            + * @class       FlowChart
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-09-03
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +<pre>
            +    &lt;div class="js_compFlowChart" data-FlowChart="|script">
            +        &lt;script type="text/template">
            +            {
            +                chart: {
            +                    name: '提交'
            +                    , id: 1
            +                    , nodes: [
            +                            {
            +                                name: '资质审核'
            +                                , id: 2
            +                                , status: 1
            +                                , tipsHtml: 'username 1'
            +                                , nodes: [
            +                                    {
            +                                        name: '服务审核'
            +                                        , id: 3
            +                                        , targetNode: 5
            +                                        , status: 2
            +                                        , tipsHtml: 'username 2'
            +                                    }
            +                                    , {
            +                                        name: '渠道管理层'
            +                                        , id: 4
            +                                        , status: 3
            +                                        , tipsHtml: 'username 3'
            +                                    }
            +                                ]
            +                            }
            +                            , {
            +                                name: '资质审核1'
            +                                , id: 6
            +                                , status: 4
            +                                , tipsHtml: 'username 4'
            +                                , nodes: [
            +                                    {
            +                                        name: '服务审核1'
            +                                        , id: 7
            +                                        , targetNode: 9
            +                                        , status: 5
            +                                        , tipsHtml: 'username 5'
            +                                    }
            +                                    , {
            +                                        name: '渠道管理层1'
            +                                        , id: 8
            +                                        , targetNode: 9
            +                                        , status: 6
            +                                        , tipsHtml: 'username 6'
            +                                    }
            +                                ]
            +                            }
            +                            , {
            +                                name: '资质审核2'
            +                                , id: 10
            +                                , status: 7
            +                                , tipsHtml: 'username 7'
            +                                , nodes: [
            +                                    {
            +                                        name: '服务审核2'
            +                                        , id: 11
            +                                        , status: 8
            +                                        , tipsHtml: 'username 8'
            +                                        , nodes: [
            +                                            {
            +                                                name: '管理层2'
            +                                                , id: 12
            +                                                , targetNode: 5
            +                                                , status: 9
            +                                                , tipsHtml: 'username 9'
            +                                            }
            +                                        ]
            +                                    }
            +                                ]
            +                            }
            +                            , {
            +                                name: '资质审核3'
            +                                , id: 15
            +                                , status: 10
            +                                , tipsHtml: 'username 10'
            +                            }
            +                    ]
            +                    , targetNodes: {
            +                        '5': {
            +                            name: '管理层'
            +                        }
            +                        , '9': {
            +                            name: '管理层1'
            +                            , targetNode: 5
            +                        }
            +                    }
            +                }
            +            }
            +        &lt;/script>
            +    &lt;/div>
            +</pre>
            +
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +    var isIE = !!window.ActiveXObject;
            +
            +    JC.FlowChart = FlowChart;
            +
            +    if( JC.use ){
            +        !window.Raphael && ( JC.use( 'plugins.raphael' ) );
            +        !JC.PopTips && ( JC.use( 'JC.PopTips' ) );
            +    }
            +
            +    function FlowChart( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, FlowChart ) ) 
            +            return JC.BaseMVC.getInstance( _selector, FlowChart );
            +
            +        JC.BaseMVC.getInstance( _selector, FlowChart, this );
            +
            +        this._model = new FlowChart.Model( _selector );
            +        this._view = new FlowChart.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( FlowChart.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 FlowChart 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of FlowChartInstance}
            +     */
            +    FlowChart.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compFlowChart' )  ){
            +                    _r.push( new FlowChart( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compFlowChart' ).each( function(){
            +                        _r.push( new FlowChart( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( FlowChart );
            +
            +    JC.f.extendObject( FlowChart.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'FlowChart _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +
            +                    if( !_p._model.chartData() ) return;
            +                    _p._view.draw();
            +
            +                    _p.notification( JC.FlowChart.Model.INITED, [ _p, _p._model.data() ] );
            +                });
            +
            +                //JC.dir( _p._model.chartData() );
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'FlowChart _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +    });
            +
            +    FlowChart.Model._instanceName = 'JCFlowChart';
            +
            +    /**
            +     * 初始化后 selector 触发的事件
            +     * @event   cfc_inited
            +     * @example
            +<pre>
            +$( document ).delegate( 
            +    'div.js_compFlowChart'
            +    , JC.FlowChart&#46;Model.INITED
            +    , function( _evt, _ins, _chartData ){
            +        JC.log( 'js_compFlowChart inited' );
            +    }
            +);
            +</pre>
            +     */
            +    FlowChart.Model.INITED =           'cfc_inited'
            +    /**
            +     * dom 节点初始化后 触发的事件
            +     * @event   cfc_nodeInited
            +     * @example
            +<pre>
            +$( document ).delegate( 
            +    'div.js_compFlowChart'
            +    , JC.FlowChart&#46;Model.ITEM_INITED
            +    , function( _evt, _domNode, _itemData, _listData, _chartData ){
            +        JC.log( _domNode.prop( 'nodeName' ) );
            +    }
            +);
            +</pre>
            +     */
            +    FlowChart.Model.ITEM_INITED =           'cfc_nodeInited'
            +    /**
            +     * dom节点初始化前的事件
            +     * <br />节点如果有特殊显示需求的话, 可以从这个事件进行相关操作
            +     * @event   cfc_beforeInitItem
            +     * @example
            +<pre>
            +$( document ).delegate( 
            +    'div.js_compFlowChart'
            +    , JC.FlowChart&#46;Model.BEFORE_INIT_ITEM
            +    , function( _evt, _itemData, _listData, _chartData ){
            +        if( _itemData.tipsHtml ){
            +            _itemData.tipsHtml += '   <b>test</b>';
            +        }
            +        _itemData.name = JC.f.printf( '~{0}~', _itemData.name );
            +    }
            +);
            +</pre>
            +     */
            +    FlowChart.Model.BEFORE_INIT_ITEM =      'cfc_beforeInitItem'
            +
            +    JC.f.extendObject( FlowChart.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'FlowChart.Model.init:', new Date().getTime() );
            +            }
            +
            +        , data:
            +            function(){
            +                if( typeof this._data == 'undefined' && this.is( '[data-FlowChart]' ) ){
            +                    //JC.log( this.scriptTplProp( 'data-FlowChart' ) );
            +                    this._data = eval( '(' + this.scriptTplProp( 'data-FlowChart' ) + ')' );
            +                }
            +                return this._data;
            +            }
            +
            +        , chartData:
            +            function(){
            +                return this.data().chart;
            +            }
            +
            +        , colorsData:
            +            function(){
            +                return this.data().colors;
            +            }
            +
            +        , initGrid:
            +            function(){
            +                var _p = this;
            +                _p._grid = { 
            +                    data: []
            +                    , idColumnIndex: {}
            +                    , idColumnIndexList: []
            +                    , row: {}
            +                    , idMap: {}
            +                    , columnIndexMap: {}
            +                    , maxColumn: 0
            +                    , rowIndexPad: 0
            +                    , offsetRowIndex: 10000 
            +                };
            +
            +                _p.initIdColumnIndex( _p.chartData(), _p.chartData().id, 0, 0, 0 );
            +                _p.initColumnIndexMap();
            +
            +                _p.initColumnRelationship();
            +                _p.fixLastColumn();
            +                _p.initColumnRelationship();
            +
            +                _p.initRowIndex();
            +
            +                _p.fixNodesRowIndex();
            +                _p.fixTargetNodesRowIndex();
            +                /*
            +                */
            +                _p.fixRealRowIndex();
            +                _p.fixFirstLastRowIndex();
            +
            +                _p.createItems();
            +                _p.calcRealPosition();
            +
            +                //JC.dir( _p.gridIdColumnIndex() );
            +                JC.dir( _p.gridIdColumnIndexMap() );
            +                //JC.log( _p.gridMaxColumn() );
            +            }
            +
            +        , fixLastColumn:
            +            function(){
            +                var _p = this
            +                    , _max = _p.gridMaxColumn()
            +                    , _list
            +                    ;
            +                if( _max < 1 ) return;
            +                _list = _p.gridIdColumnIndexMap()[ _max ];
            +                if( _list.length < 2 ) return;
            +                for( var i = _list.length - 1; i >= 0; i-- ){
            +                    var _item = _list[i];
            +                    if( !( _item.nodes && _item.nodes.length ) && ( _item.pid && _item.pid.length > 1 ) ){
            +                        _list.splice( i, 1 );
            +                        _item.columnIndex = _max + 1;
            +                        _p.gridMaxColumn( _item.columnIndex );
            +                        _p.gridIdColumnIndexMap()[ _p.gridMaxColumn() ] = [ _item ];
            +                        break;
            +                    }
            +                }
            +            }
            +
            +        , grid: function(){ return this._grid; }
            +
            +        , gridIdColumnIndex: function(){ return this.grid().idColumnIndex; }
            +        , gridIdColumnIndexList: function(){ return this.grid().idColumnIndexList; }
            +        , gridIdColumnIndexMap: function(){ return this.grid().columnIndexMap; }
            +        , gridRow: function(){ return this.grid().row; }
            +        , gridIdMap: 
            +            function( _id ){ 
            +                if( typeof _id != 'undefined' ){
            +                    return this.grid().idMap[ _id ];
            +                }
            +                return this.grid().idMap; 
            +            }
            +        , gridOffsetRowIndex: function(){ return this.grid().offsetRowIndex; }
            +        , gridHeight: function(){ return 40; }
            +        , gridWidth: function(){ return 120; }
            +        , lineWidth: function(){ return 75; }
            +        , childLineWidth: function(){ return 40; }
            +        , parentLineWidth: function(){ return 25; }
            +
            +        , itemHtmlPattern:
            +            function( _item ){
            +                var _r = '{0}';
            +                ( 'tipsHtml' in _item )
            +                    && _item.tipsHtml
            +                    && ( _r = this.tipsTpl() );
            +                return _r;
            +            }
            +
            +        , tipsTpl:
            +            function(){
            +
            +                if( !this._tipsTpl ){
            +                    this._tipsTpl = FlowChart.TIPS_TPL;
            +                    this._tipsTpl = this.scriptTplProp( 'cfcTipsTpl' ) || this._tipsTpl;
            +                }
            +
            +                return this._tipsTpl;
            +            }
            +
            +        , createItems:
            +            function(){
            +                var _p = this, _sx = 0, _sy = 0;
            +                _p._items = {};
            +                _p._columnWidth = [];
            +                for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                        , _maxWidth = _p.gridWidth()
            +                        ;
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _html, _itemHtmlPatter
            +                            ;
            +                        
            +                        _p.notification( JC.FlowChart.Model.BEFORE_INIT_ITEM, [ _item, _rowList, _p.data() ] );
            +
            +                       _html = JC.f.printf( 
            +                            '<div class=" ">{0}</div>'
            +                            , _item.name
            +                            , _p.getStatus( _item )
            +                        );
            +
            +                        _itemHtmlPatter = JC.f.printf( _p.itemHtmlPattern( _item ), _html, _item.tipsHtml, _p.getStatus( _item ) );
            +
            +                        var _node = $( _itemHtmlPatter )
            +                            , _tmpWidth
            +                            ;
            +                        _node.addClass( JC.f.printf( 'js_cfcItem js_cfcItemStatus_{0}', _p.getStatus( _item ) ) );
            +                        _node.css( { 'position': 'absolute' } );
            +                        _node.appendTo( _p.box() );
            +                        _node.data( 'nodeData', _item );
            +                        _p._items[ _item.id ] = _node;
            +                        _tmpWidth = _node.width();
            +                        _tmpWidth > _maxWidth && ( _maxWidth = _tmpWidth );
            +                    });
            +                    if( i === 0 ){
            +                        _maxWidth = Math.ceil( _p._items[ _p.chartData().id ].width() + 30 );
            +                    }
            +                    _p._columnWidth.push( _maxWidth );
            +                }
            +            }
            +
            +        , getStatus:
            +            function( _itemData ){
            +                var _r = 0;
            +                ( 'status' in _itemData ) && ( _r = _itemData.status );
            +                return _r;
            +            }
            +
            +        , calcRealPosition:
            +            function(){
            +                var _p = this, _sx = 0, _sy = 0, _countX = 0;
            +                _p._columnX = [];
            +                _p._minX = _sx;
            +                _p._maxX = 0;
            +                _p._minY = 0;
            +                _p._maxY = 0;
            +
            +                for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                        ;
            +
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _x = _sx, _y = _sy
            +                            ;
            +                        _x += _countX;
            +                        _y += _item.rowIndex * _p.gridHeight();
            +
            +                        _y < _p._minY && ( _p._minY = _y );
            +                        ( _y + _p.gridHeight() / 2 ) > _p._maxY && ( _p._maxY = ( _y + _p.gridHeight() / 2 ) );
            +
            +                        _item.x = _x;
            +                        _item.y = _y;
            +                        //JC.log( i, _item.name, _x, _y, _item.rowIndex );
            +                    });
            +
            +                    _p._maxX = _sx + _countX + _p.columnWidth( i );
            +
            +                    _p._columnX.push( _sx + _countX );
            +                    _countX += Math.max( _p.gridWidth(), _p.columnWidth( i ) ) + _p.lineWidth();
            +                    if( _p.listHasChildline( _rowList ) ){
            +                        _countX += _p.childLineWidth();
            +                    }
            +
            +                    if( _p.listHasParentline( _rowList ) ){
            +                        _countX += _p.parentLineWidth();
            +                    }
            +                }
            +
            +                //JC.log( _p._minX, _p._maxX, _p._minY, _p._maxY );
            +                //JC.log( _p._minY, _p._maxY )
            +
            +            }
            +
            +        , minX: function(){ return this._minX; }
            +        , minY: function(){ return this._minY; }
            +        , maxX: function(){ return this._maxX; }
            +        , maxY: function(){ return this._maxY; }
            +
            +        , items: function(){ return this._items; }
            +        , item: 
            +            function( _id ){ 
            +                return this._items[ _id ]; 
            +            }
            +        , columnWidth: 
            +            function( _ix ){
            +                if( typeof _ix != undefined ){
            +                    return this._columnWidth[ _ix ] || 0;
            +                }
            +                return this._columnWidth;
            +            }
            +        , columnX: 
            +            function( _ix ){
            +                if( typeof _ix != undefined ){
            +                    return this._columnX[ _ix ] || 0;
            +                }
            +                return this._columnX;
            +            }
            +
            +        , fixFirstLastRowIndex:
            +            function(){
            +                var _p = this;
            +
            +                _p._maxRowY = 0;
            +                if( _p.gridMaxColumn() < 2 ) return;
            +
            +                for( var i = 0; i < _p.gridMaxColumn(); i++ ){
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ];
            +                    $.each( _rowList, function( _k, _item ){
            +                        _item.rowIndex > _p._maxRowY && ( _p._maxRowY = _item.rowIndex );
            +                    });
            +                }
            +
            +                var _fcol = _p.gridIdColumnIndexMap()[0]
            +                    , _first, _last
            +                    , _lcol = _p.gridIdColumnIndexMap()[ _p.gridMaxColumn() - 1]
            +                    ;
            +                if( _fcol && _fcol.length ){
            +                    var _fdata = _fcol[0];
            +                    if(  _fdata.nodes && _fdata.nodes.length ){
            +                        _first = _fdata.nodes.first();
            +                        _last = _fdata.nodes.last();
            +                        _fdata.rowIndex = _first.rowIndex + ( _last.rowIndex - _first.rowIndex ) / 2;
            +                    }
            +                }
            +
            +
            +            }
            +
            +        , fixNodesRowIndex:
            +            function(){
            +                var _p = this;
            +
            +                for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                        , _nextList = _p.gridIdColumnIndexMap()[ i + 1 ]
            +                        ;
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _preItem = _rowList[ _k - 1 ]
            +                            , _nextItem = _rowList[ _k + 1 ]
            +                            , _oldIx = _item.rowIndex
            +                            , _nodes = _item.nodes
            +                            , _pid = _item.pid
            +                            , _pitem = _p.gridIdMap( _pid ) || {}
            +                            , _fdata, _ldata
            +                            , _fitem, _litem
            +                            , _midY 
            +                            , _spaceY
            +                            , _minY, _maxY
            +                            ;
            +
            +                        if( _nodes && _nodes.length ){
            +                            if( _nodes.length > 1 ){
            +                                _fdata = _nodes.first();
            +                                _ldata = _nodes.last();
            +                                _midY = _fdata.rowIndex + ( _ldata.rowIndex - _fdata.rowIndex ) / 2;
            +                                _spaceY = _oldIx - _midY;
            +                                _minY = _fdata.rowIndex + _spaceY;
            +                                _maxY = _ldata.rowIndex + _spaceY;
            +                                if( _spaceY === 0 ) {
            +                                    return;
            +                                }
            +                                if( _fdata.prev && _minY <= _fdata.prev.rowIndex ){
            +                                    _spaceY = _fdata.prev.rowIndex + 1 - _minY;
            +                                    _minY += _spaceY;
            +                                    _maxY += _spaceY;
            +                                    _p.fixItemDataAndNext( _fdata, _minY - _fdata.rowIndex );
            +                                    _p.fixItemDataAndNext( _item, _spaceY );
            +                                    _p.fixItemParentDataAndNext( _item, _spaceY );
            +                                }else if( _ldata.next && _maxY >= _ldata.next.rowIndex ){
            +                                    _p.fixItemDataAndNext( _fdata, _maxY - _ldata.rowIndex );
            +                                }else{
            +                                    //_p.fixItemDataAndNext( _fdata, _maxY - _ldata.rowIndex );
            +                                    //JC.log( _item.name, _fdata.name, _ldata.name, _spaceY );
            +                                    _p.fixItemDataAndNext( _fdata, _spaceY );
            +                                }
            +                            }else{
            +                                _fdata = _nodes.first();
            +                                //JC.log( _item.name, _item.id, JC.f.ts(), _item.rowIndex, _fdata.rowIndex, _fdata.name );
            +                                if( _item.rowIndex === _fdata.rowIndex ) return;
            +                                    //JC.log( 1 );
            +                                _maxY = Math.max( _item.rowIndex, _fdata.rowIndex );
            +                                if( _item.rowIndex > _fdata.rowIndex ){
            +                                    //JC.log( 2 );
            +                                    _p.fixItemDataAndNext( _fdata, _item.rowIndex - _fdata.rowIndex );
            +                                }else if( _item.rowIndex < _fdata.rowIndex ){
            +                                    //JC.log( 3 );
            +                                    _p.fixItemDataAndNext( _item, _fdata.rowIndex - _item.rowIndex );
            +                                    var _newIx = _item.rowIndex;
            +                                    _p.fixItemParentDataAndNext( _item, _newIx - _oldIx );
            +                                    //JC.log( _item.name, _item.id, JC.f.ts(), _pitem.name, _pitem.id  );
            +                                }else{
            +                                    //JC.log( 4 );
            +                                }
            +                            }
            +                        }
            +                    });
            +
            +                }
            +            }
            +
            +        , fixTargetNodesRowIndex:
            +            function(){
            +                var _p = this;
            +
            +                for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                        , _nextList = _p.gridIdColumnIndexMap()[ i + 1 ]
            +                        ;
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _preItem = _rowList[ _k - 1 ]
            +                            , _nextItem = _rowList[ _k + 1 ]
            +                            , _oldIx = _item.rowIndex
            +                            , _nodes = _item.nodes
            +                            , _pid = _item.pid
            +                            , _fdata, _ldata
            +                            , _fitem, _litem
            +                            , _midY 
            +                            , _spaceY
            +                            , _minY, _maxY
            +                            ;
            +
            +                        if( _pid && _pid.length ){
            +                            if( _pid.length > 1 ){
            +                                _fdata = _p.gridIdMap( _pid.first() );
            +                                _ldata = _p.gridIdMap( _pid.last() );
            +
            +                                _midY = _fdata.rowIndex + ( _ldata.rowIndex - _fdata.rowIndex ) / 2
            +
            +                                if( _item.prev && _item.prev.rowIndex >= _midY ){
            +                                }else if( _item.next && _item.next.rowIndex <= _midY ){
            +                                    //JC.log( _item.name, _item.id, _item.next.name, _item.next.id );
            +                                    _p.fixItemDataAndNext( _item, _midY - _item.rowIndex );
            +                                }else{
            +                                    _spaceY = _midY - _item.rowIndex;
            +                                    _item.rowIndex = _midY;
            +                                    _p.fixItemChildDataAndNext( _item, _spaceY );
            +                                }
            +                            }else{
            +                                _fdata = _p.gridIdMap( _pid.first() );
            +                                if( _fdata.targetNode ){
            +                                    if( _item.next && _fdata.rowIndex >= _item.next.rowIndex ){
            +                                        _spaceY = _fdata.rowIndex - _item.rowIndex;
            +                                        _p.fixItemDataAndNext( _item, _spaceY );
            +                                    }else{
            +                                        _spaceY = _fdata.rowIndex - _item.rowIndex;
            +                                        _item.rowIndex = _fdata.rowIndex;
            +                                        _p.fixItemChildDataAndNext( _item, _spaceY );
            +                                    }
            +                                }
            +                            }
            +                         }
            +                    });
            +
            +                }
            +            }
            +
            +        , fixItemChildDataAndNext:
            +            function( _item, _spaceY ){
            +                var _p = this, _nextSpaceY, _newIx;
            +                if( !( _item && _item.nodes && _item.nodes.length ) ) return;
            +                $.each( _item.nodes, function( _k, _sitem ){
            +                    _sitem.rowIndex += _spaceY;
            +                    _p.fixItemChildDataAndNext( _sitem, _spaceY );
            +                });
            +            }
            +
            +        , fixItemParentDataAndNext:
            +            function( _item, _spaceY, _isRealY ){
            +                var _p = this, _nextSpaceY, _newIx;
            +                if( !( _item && _item.pid && _item.pid.length ) ) return;
            +                var _pitem = _p.gridIdMap( _item.pid.first() )
            +                    , _fdata, _ldata, _midY
            +                    ;
            +                if( !( _pitem ) ) return;
            +                _p.fixItemDataAndNext( _pitem, _spaceY );
            +                _p.fixItemParentDataAndNext( _pitem, _spaceY, _isRealY );
            +            }
            +
            +        , fixItemDataAndNext:
            +            function( _node, _spaceY ){
            +                while( _node ){
            +                    _node.rowIndex += _spaceY;
            +                    _node = _node.next;
            +                }
            +            }
            +
            +        , fixRealRowIndex:
            +            function(){
            +                var _p = this, _sx = 0, _sy = 0, _minY = 0;
            +                for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                        ;
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _rowIx = _item.rowIndex - _p.gridOffsetRowIndex()
            +                            ;
            +                        _item.rowIndex = _rowIx;
            +                        _rowIx < _minY && ( _minY = _rowIx );
            +                    });
            +                }
            +                if( _minY < 0 ){
            +                    _minY = Math.abs( _minY );
            +                    for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                        var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                            ;
            +                        $.each( _rowList, function( _k, _item ){
            +                            _item.rowIndex += _minY;
            +                        });
            +                    }
            +                }
            +
            +            }
            +
            +        , initRowIndex:
            +            function(){
            +                var _p = this;
            +
            +                for( var i = 0; i <= _p.gridMaxColumn(); i++ ){
            +                    //JC.log( i, JC.f.ts() );
            +                    var _rowList = _p.gridIdColumnIndexMap()[ i ]
            +                        , _preList = _p.gridIdColumnIndexMap()[ i - 1 ]
            +                        , _len = _rowList.length
            +                        , _preLen = _preList ? _preList.length : 0
            +                        ;
            +                    //JC.dir( _rowList );
            +                    //
            +                    _preList && ( _preList = _preList.slice().reverse() );
            +
            +                   /**
            +                    * 这里的逻辑认为 起始节点 和 结束节点都只有一个
            +                    */
            +                   if( i === 0 ){
            +                        $.each( _rowList, function( _k, _item ){
            +                            _item.rowIndex = _p.gridOffsetRowIndex();
            +                        });
            +                        continue;
            +                    }
            +
            +                   var _minRowIndex = _p.gridOffsetRowIndex()
            +                       , _maxRowIndex = _p.gridOffsetRowIndex()
            +                       , _itemIndexLen = 1
            +                       , _startIndex = _p.gridOffsetRowIndex()
            +                       ;
            +                   if( _rowList.length > 1 ){
            +                       _itemIndexLen = _rowList.length * 2;
            +                   }
            +                   _startIndex = _startIndex - ( _itemIndexLen / 2 );
            +                   _startIndex += 1;
            +
            +                    $.each( _rowList, function( _k, _item ){
            +                        _item.rowIndex = _startIndex + _k * 2;
            +                        //JC.log( i, _k, _item.rowIndex );
            +                    });
            +                    //JC.log( i, _startIndex );
            +                }
            +            }
            +
            +        , gridMaxColumn:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this.grid().maxColumn = _setter );
            +                return this.grid().maxColumn;
            +            }
            +
            +        , gridRowIndexPad:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this.grid().rowIndexPad = _setter );
            +                return this.grid().rowIndexPad;
            +            }
            +
            +        , initColumnIndexMap:
            +            function(){
            +                var _p = this;
            +                $.each( _p.gridIdColumnIndexList(), function( _k, _item ){
            +                    if( _item.columnIndex in _p.gridIdColumnIndexMap() ){
            +                        _p.gridIdColumnIndexMap()[ _item.columnIndex ].push( _item );
            +                    }else{
            +                        _p.gridIdColumnIndexMap()[ _item.columnIndex ] = [ _item ];
            +                    }
            +                });
            +            }
            +
            +        , initColumnRelationship:
            +            function(){
            +                var _p = this;
            +                $.each( _p.gridIdColumnIndexMap(), function( _ix, _list ){
            +                    $.each( _list, function( _k, _item ){
            +                        var _prev = _list[ _k - 1 ]
            +                            ;
            +                        _item.prev = _prev;
            +                        _prev && ( _prev.next = _item );
            +                        _item.next = null;
            +                    });
            +                 });
            +            }
            +
            +
            +        , initIdColumnIndex:
            +            function( _data, _id, _ix, _processSelf, _count ){
            +                var _p = this, _childIx = _ix + 1, _targetNodeIx = _childIx + 1;
            +                //JC.log( _ix, _data.name, _id, JC.f.ts() );
            +                if( ( 'columnIndex' in _data ) && _ix < _data.columnIndex ){
            +                    _ix = _data.columnIndex;
            +                }
            +
            +                if( !( _id in _p.gridIdMap() ) ){
            +                    _p.gridIdColumnIndexList().push( _data );
            +                }
            +
            +                _data.id = _id;
            +                _data.pid = _data.pid || [];
            +                _data.columnIndex = _ix;
            +                _p.gridIdColumnIndex()[ _id ] = _data;
            +                _p.gridIdMap()[ _id ] = _data;
            +                _data.zindex = _count++;
            +
            +
            +                _ix > _p.gridMaxColumn() && _p.gridMaxColumn( _ix );
            +
            +                if( _data.nodes && _data.nodes.length ){
            +                    var _targetNodes = {};
            +                    $.each( _data.nodes, function( _k, _item ){
            +                        _item.pid = _item.pid || [];
            +                        _item.pid.push( _id );
            +
            +                        if( ( 'targetNode' in _item ) && _p.chartData().targetNodes && ( _item.targetNode in _p.chartData().targetNodes )  ){
            +                            _targetNodes[ _item.targetNode ] = _item.targetNode;
            +
            +                            _p.chartData().targetNodes[ _item.targetNode ].pid = _p.chartData().targetNodes[ _item.targetNode ].pid || [];
            +                            _p.chartData().targetNodes[ _item.targetNode ].pid.push( _item.id );
            +                        }
            +                        _p.initIdColumnIndex( _item, _item.id, _childIx, false, _count );
            +                    });
            +
            +                    $.each( _targetNodes, function( _k, _item ){
            +                        _p.initIdColumnIndex( _p.chartData().targetNodes[ _k ], _k, _targetNodeIx, true, _count );
            +                    });
            +                }              
            +
            +                if( _processSelf && ( 'targetNode' in _data ) && _p.chartData().targetNodes && ( _data.targetNode in _p.chartData().targetNodes ) ){
            +                    _p.chartData().targetNodes[ _data.targetNode ].pid = _p.chartData().targetNodes[ _data.targetNode ].pid || [];
            +                    _p.chartData().targetNodes[ _data.targetNode ].pid.push( _id );
            +                    _p.initIdColumnIndex( _p.chartData().targetNodes[ _data.targetNode ], _data.targetNode, _childIx, true, _count  );
            +                }
            +            }
            +
            +        , buildLayout:
            +            function(){
            +                var _p = this;
            +                _p._container = $( '<div class="js_cfcContainer"></div>' );
            +                _p._layout = $( '<div class="js_cfcLayout"></div>' );
            +                _p._raphaelPlaceholder = $( '<div class="js_cfcRaphael" style="position: absolute;"></div>' );
            +                _p._box = $( '<div class="js_cfcBox" style=""></div>' );
            +                _p._raphaelPlaceholder.appendTo( _p._layout );
            +                _p._box.appendTo( _p._layout );
            +                _p._layout.appendTo( _p._container );
            +                _p._container.appendTo( _p.selector() );
            +            }
            +        , layout: function(){ return this._layout; }
            +        , box: function(){ return this._box; }
            +        , raphaelPlaceholder: function(){ return this._raphaelPlaceholder; }
            +        , width: function(){ return Math.abs( this._maxX - this._minX ); }
            +        , height: function(){ return Math.abs( this._maxY - this._minY + 5 ); }
            +
            +        , listHasChildline:
            +            function( _list ){
            +                var _r = false;
            +                $.each( _list, function( _k, _item ){
            +                    if( ( _item.nodes && _item.nodes.length > 1 ) ){
            +                        _r = true;
            +                        return false;
            +                    }
            +                });
            +                return _r;
            +            }
            +
            +        , listHasParentline:
            +            function( _list ){
            +                var _r = false, _tmp = {};
            +                $.each( _list, function( _k, _item ){
            +                    if( _item.targetNode in _tmp ){
            +                        _r = true;
            +                        return false;
            +                    }
            +                    if( _item.targetNode && !( _item.targetNode in _tmp ) ){
            +                        _tmp[ _item.targetNode ] = 1;
            +                    }
            +                });
            +                return _r;
            +            }
            +
            +        , colors:
            +            function(){
            +                var _p = this;
            +
            +                if( !_p._colors ){
            +                    _p._colors = _p._buildInColors;
            +
            +                    if( _p.colorsData() ){
            +                        $.each( _p.colorsData(), function( _k, _item ){
            +                            if( _k in _p._colors ){
            +                                if( $.isPlainObject( _item ) ){
            +                                    JC.f.extendObject( _p._colors[ _k ], _item );
            +                                }
            +                            }else{
            +                                _p._colors[ _k ] = _item;
            +                            }
            +                        });
            +                    }
            +                    //JC.dir( _p._colors );
            +                }
            +
            +                return _p._colors;
            +            }
            +
            +        , _buildInColors: {
            +            line: {
            +                 'stroke': '#E1E1E1', 'stroke-width': 2
            +            }
            +            , icon: {
            +                'stroke': '#E1E1E1', 'stroke-width': 2, 'fill': '#F2F2F2'
            +            }
            +        }
            +
            +    });
            +
            +    JC.f.extendObject( FlowChart.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'FlowChart.View.init:', new Date().getTime() );
            +            }
            +
            +        , draw:
            +            function(){
            +                var _p = this, _st, _et;
            +                if( !( _p._model.chartData() && _p._model.chartData().name ) ) return;
            +
            +                _st = JC.f.ts();
            +
            +                _p._model.buildLayout();
            +                _p._model.initGrid();
            +                _p._model.layout().css( { 
            +                    'height': Math.abs( _p._model.maxY() ) + 'px'
            +                } );
            +
            +                _p.showGrid();
            +                _p.showLine();
            +
            +                JC.PopTips.init( _p.selector() );
            +
            +                _et = JC.f.ts();
            +
            +                //JC.log( 'time span:', _et - _st );
            +            }
            +
            +        , showLine:
            +            function(){
            +                var _p = this, _rh, _raphael, _y = Math.abs( _p._model.minY() ), _ypad = 0;
            +                _rh = _raphael = Raphael( _p._model.raphaelPlaceholder()[0], _p._model.width(), _p._model.height() );
            +                !isIE && ( _ypad = 1 );
            +
            +                for( var i = 0; i <= _p._model.gridMaxColumn(); i++ ){
            +                    var _rowList = _p._model.gridIdColumnIndexMap()[ i ]
            +                        , _hasChildline = _p._model.listHasChildline( _rowList )
            +                        , _hasParentline = _p._model.listHasParentline( _rowList )
            +                        , _columnX = _p._model.columnX( i )
            +                        , _preColumnX = _p._model.columnX( i - 1 )
            +                        , _columnWidth = _p._model.columnWidth( i )
            +                        , _preColumnWidth = _p._model.columnWidth( i - 1 )
            +                        , _startX = _columnX + _columnWidth
            +                        , _realStartX
            +                        , _lineWidth = _p._model.lineWidth()
            +                        , _xpad = 0
            +                        ;
            +
            +                    if( _hasParentline ){
            +                        _lineWidth += _p._model.childLineWidth();
            +                    }
            +
            +                    if( _hasChildline ){
            +                        _lineWidth += _p._model.parentLineWidth();
            +                    }
            +
            +                    //JC.log( i, _columnX, _columnWidth, _startX );
            +
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _node = _p._model.item( _item.id )
            +                            , _pid = _item.pid
            +                            , _nodes = _item.nodes
            +                            , _subitem
            +                            , _realStartX
            +                            , _realY
            +                            , _fitem, _litem
            +                            , _fnode, _lnode
            +                            , _ex, _sx, _sy, _ey
            +                            , _tmpX
            +                            , _midY
            +                            , _tmpY, _tmpY1, _tmpY2
            +                            , _endX 
            +                            , _sdata, _snode
            +                            , _path
            +                            ;
            +
            +                        if( !( _pid || _nodes ) ) return; 
            +
            +                        if(  _pid && _pid.length  ){
            +                            _fitem = _p._model.gridIdMap( _pid.first() );
            +                            _fnode = _p._model.item( _fitem.id );
            +
            +                            if( _pid.length > 1 ){
            +                                _realStartX = _preColumnX + _preColumnWidth + _p._model.parentLineWidth();
            +                                _litem = _p._model.gridIdMap( _pid.last() );
            +                                _lnode = _p._model.item( _litem.id );
            +
            +                                _midY = _item.y + Math.abs( _p._model.minY() ) + _node.outerHeight() / 2 + _ypad;
            +                                _tmpY1 = _fitem.y + Math.abs( _p._model.minY() ) +  _fnode.outerHeight() / 2 + _ypad;
            +                                _tmpY2 = _litem.y + Math.abs( _p._model.minY() ) +  _lnode.outerHeight() / 2 + _ypad;
            +
            +                                _endX =  _item.x - 18;
            +
            +                                _rh.path( JC.f.printf( 
            +                                    '{0}M{1} {2}L{3} {4}M{5} {6}L{7} {8}'
            +                                    , ''
            +                                    , _realStartX, _tmpY1
            +                                    , _realStartX, _tmpY2
            +                                    , _realStartX, _midY
            +                                    , _endX, _midY
            +                                )).attr( _p._model.colors().line );
            +
            +                                $.each( _pid, function( _sk, _sitem ){
            +                                    _sdata = _p._model.gridIdMap( _sitem );
            +                                    _snode = _p._model.item( _sdata.id );
            +                                    _tmpY = _sdata.y + Math.abs( _p._model.minY() ) +  _snode.outerHeight() / 2 + _ypad;
            +
            +                                    _rh.path( JC.f.printf( 
            +                                        '{0}M{1} {2}L{3} {4}'
            +                                        , ''
            +                                        , _sdata.x, _tmpY
            +                                        , _realStartX, _tmpY
            +                                    )).attr( _p._model.colors().line );
            +                                });
            +
            +                                _rh.JCTriangle( 16, _endX, _midY, _p._model.colors().icon );
            +                            }else if( _fitem && _pid.length === 1 && ( 'targetNode' in _fitem ) ){
            +                                _realStartX = _preColumnX + _fnode.outerWidth();
            +                                _realY = _fitem.y + _fnode.outerHeight() / 2;
            +                                _item.y = _fitem.y;
            +
            +                                _rh.path( JC.f.printf( 
            +                                    '{0}M{1} {2}L{3} {4}'
            +                                    , '', _realStartX, _realY + _ypad, _item.x - 18, _realY + _ypad
            +                                )).attr( _p._model.colors().line );
            +                                _rh.JCTriangle( 16, _item.x - 18, _realY + _ypad, _p._model.colors().icon );
            +                            }
            +                        }
            +
            +                        if( _nodes && _nodes.length ){
            +                            if( _nodes.length > 1 ){
            +
            +                                _sx = _item.x + _node.outerWidth();
            +
            +                                _fitem = _nodes.first();
            +                                _litem = _nodes.last();
            +                                _fnode = _p._model.item( _fitem.id );
            +                                _lnode = _p._model.item( _litem.id );
            +
            +                                //JC.log( _item.id, _fitem.name, _litem.name );
            +
            +                                _ex = _fitem.x;
            +                                _realStartX = _ex - _p._model.childLineWidth();
            +
            +                                _midY = _item.y + Math.abs( _p._model.minY() ) + _node.outerHeight() / 2 + _ypad;
            +
            +                                _rh.path( JC.f.printf( 
            +                                    '{0}M{1} {2}L{3} {4}'
            +                                    , ''
            +                                    , _sx, _midY
            +                                    , _realStartX - 18, _midY
            +                                )).attr( _p._model.colors().line );
            +
            +                                _rh.JCTriangle( 16, _realStartX - 18, _midY, _p._model.colors().icon );
            +
            +                                _tmpY1 = _fitem.y + Math.abs( _p._model.minY() ) +  _fnode.outerHeight() / 2 + _ypad;
            +                                _tmpY2 = _litem.y + Math.abs( _p._model.minY() ) +  _lnode.outerHeight() / 2 + _ypad;
            +
            +                                _endX =  _item.x - 18;
            +
            +                                _rh.path( JC.f.printf( 
            +                                    '{0}M{1} {2}L{3} {4}'
            +                                    , ''
            +                                    , _realStartX, _tmpY1
            +                                    , _realStartX, _tmpY2
            +                                )).attr( _p._model.colors().line );
            +
            +                                $.each( _nodes, function( _sk, _sitem ){
            +                                    _sdata = _sitem;
            +                                    _snode = _p._model.item( _sdata.id );
            +                                    _tmpY = _sdata.y + Math.abs( _p._model.minY() ) +  _snode.outerHeight() / 2 + _ypad;
            +
            +                                    _rh.path( JC.f.printf( 
            +                                        '{0}M{1} {2}L{3} {4}'
            +                                        , ''
            +                                        , _realStartX, _tmpY
            +                                        , _sdata.x, _tmpY
            +                                    )).attr( _p._model.colors().line );
            +                                });
            +
            +                            }
            +
            +                            if( _nodes.length === 1 ){
            +                                _realStartX = _columnX + _node.outerWidth();
            +                                _realY = _item.y + _node.outerHeight() / 2;
            +
            +                                _subitem = _nodes[0];
            +                                _rh.path( JC.f.printf( 
            +                                    '{0}M{1} {2}L{3} {4}'
            +                                    , '', _realStartX, _realY + _y + _ypad, _subitem.x - 18, _realY + _y + _ypad
            +                                )).attr( _p._model.colors().line );
            +                                _rh.JCTriangle( 16, _subitem.x - 18, _realY + _y + _ypad, _p._model.colors().icon );
            +                            }
            +                        }
            +                    });
            +                }
            +
            +            }
            +
            +        , showGrid:
            +            function(){
            +                var _p = this;
            +                for( var i = 0; i <= _p._model.gridMaxColumn(); i++ ){
            +                    var _rowList = _p._model.gridIdColumnIndexMap()[ i ]
            +                        ;
            +                    $.each( _rowList, function( _k, _item ){
            +                        var _node = _p._model.item( _item.id )
            +                            ;
            +                        _node.css({
            +                            'left': _item.x + 'px', 'top': _item.y + 'px'
            +                        });
            +                        _p.notification( JC.FlowChart.Model.ITEM_INITED, [ _node, _item, _rowList, _p._model.data() ] );
            +                    });
            +                }
            +            }
            +    });
            +
            +    FlowChart.TIPS_TPL =
            +        [
            +            '<span class="js_compPopTips" style="display:inline-block;"'
            +            ,'htmlContent="|script"'
            +            ,'theme="white"'
            +            ,'arrowposition="bottom"'
            +            ,'triggerType="hover"'
            +            ,'popTipsMinWidth="100"'
            +            ,'popTipsMinHeight="50"'
            +            ,'>'
            +            ,'<span>{0}</span>'
            +            ,'<script type="text/template"><div class="js_cfcItemTips js_cfcItemTips_{2}">{1}</div><\/script>'
            +            ,'</span>'
            +        ].join('');
            +
            +    function distanceAngleToPoint( _distance, _angle){
            +        var _radian = _angle * Math.PI / 180;					
            +        return {
            +            x: ( Math.cos( _radian  ) * _distance )
            +            , y: ( Math.sin( _radian ) * _distance )
            +        }
            +    }
            +
            +    _jdoc.ready( function(){
            +
            +        Raphael.fn.JCTriangle =
            +            function( _sideLength, _x, _y, _params, _offsetAngle ){
            +                !_sideLength && ( _sideLength = 16 );
            +                !_x && ( _x = 0 );
            +                !_y && ( _y = _sideLength / 2 );
            +                _y += 1;
            +                typeof _offsetAngle == 'undefined' && ( _offsetAngle = 180 );
            +
            +                var _p1 = distanceAngleToPoint( _sideLength, 330 )
            +                    , _p2 = distanceAngleToPoint( _sideLength, 30 )
            +                    , _p3 = distanceAngleToPoint( _sideLength, 120 )
            +                    ;
            +
            +                    _p1.x = parseInt( _p1.x +  _x );
            +                    _p1.y = parseInt( _p1.y + _y );
            +
            +                    _p2.x = parseInt( _p2.x + _x );
            +                    _p2.y = parseInt( _p2.y + _y );
            +
            +                var _r = this.path(
            +                    JC.f.printf( 
            +                        '{0}M{1} {2}L{3} {4}L{5} {6}L{1} {2}Z'
            +                        , ''
            +                        , _x, _y 
            +                        , _p1.x, _p1.y
            +                        , _p2.x, _p2.y
            +                    )
            +                );
            +                _r.rotate( _offsetAngle );
            +                _params && _r.attr( _params );
            +                return _r;
            +            };
            +
            +        JC.f.safeTimeout( function(){
            +            FlowChart.autoInit && FlowChart.init();
            +        }, null, 'JCFlowChart_INIT', 1);
            +    });
            +
            +    return JC.FlowChart;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_FormFillUrl_FormFillUrl.js.html b/docs_api/files/.._comps_FormFillUrl_FormFillUrl.js.html new file mode 100644 index 000000000..34f3cbfa6 --- /dev/null +++ b/docs_api/files/.._comps_FormFillUrl_FormFillUrl.js.html @@ -0,0 +1,634 @@ + + + + + ../comps/FormFillUrl/FormFillUrl.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/FormFillUrl/FormFillUrl.js

            + +
            +
            +//TODO: 支持 或 忽略 多选下拉框
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * FormFillUrl 表单自动填充 URL 参数
            + *
            + *<p><b>require</b>:
            + *   <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/JC.FormFillUrl.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/FormFillUrl/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会处理 form class="js_compFormFillUrl"</h2>
            + *
            + *<h2>Form 可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>decoder = function, default = decodeURIComponent</dt>
            + *    <dd>URL 的解码函数<dd>
            + *
            + *    <dt>encoder = function, default = encodeURIComponent</dt>
            + *    <dd>URL 的编码码函数<dd>
            + *
            + *    <dt>ignoreUrlFill = bool, default = false</dt>
            + *    <dd>是否忽略 URL填充<dd>
            + *</dl> 
            + *
            + * @namespace   JC
            + * @class       FormFillUrl
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-01-19
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <h2>JC.FormFillUrl 示例</h2>
            +        <form method="get" action="" class="js_compFormFillUrl" charset="utf-8" >
            +        </form>
            + */
            +    var _jdoc = $( document );
            +
            +    JC.FormFillUrl = FormFillUrl;
            +
            +    function FormFillUrl( _selector, _url ){
            +        _selector && ( _selector = $( _selector ) );
            +        _url = _url || location.href;
            +
            +        if( JC.BaseMVC.getInstance( _selector, FormFillUrl ) ) 
            +            return JC.BaseMVC.getInstance( _selector, FormFillUrl );
            +
            +        JC.BaseMVC.getInstance( _selector, FormFillUrl, this );
            +
            +        this._model = new FormFillUrl.Model( _selector );
            +        this._model.url( _url );
            +
            +        this._init();
            +
            +        JC.log( FormFillUrl.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 FormFillUrl 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of FormFillUrlInstance}
            +     */
            +    FormFillUrl.init =
            +        function( _selector, _url ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +            _url = _url || location.href;
            +
            +            if( _selector.length ){
            +                if( _selector.prop( 'nodeName' ).toLowerCase() == 'form' ){
            +                    _r.push( new FormFillUrl( _selector, _url ) );
            +                }else{
            +                    var _frms = _selector.find( 'form.js_compFormFillUrl, form.js_autoFillUrlForm' );
            +
            +                    _frms.each( function(){
            +                        _r.push( new FormFillUrl( this, _url ) );
            +                    });
            +
            +                    if( !_frms.length ){
            +                        _r.push( new FormFillUrl( _selector, _url ) );
            +                    }
            +                }
            +            }
            +            return _r;
            +        };
            +    JC.Form && ( JC.Form.initAutoFill = FormFillUrl.init );
            +    /**
            +     * 自定义 URI decode 函数
            +     * @property    decoder
            +     * @type        function
            +     * @default     decodeURIComponent
            +     * @static
            +     */
            +    FormFillUrl.decoder = decodeURIComponent;
            +
            +    /**
            +     * 自定义 URI encode 函数
            +     * @property    encoder
            +     * @type        function
            +     * @default     encodeURIComponent
            +     * @static
            +     */
            +    FormFillUrl.encoder = encodeURIComponent;
            +
            +    /**
            +     * 判断下拉框的option里是否有给定的值
            +     * @method  selectHasVal
            +     * @param   {selector}  _select
            +     * @param   {string}    _val    要查找的值
            +     * @static
            +     */
            +    FormFillUrl.selectHasVal =
            +        function( _select, _val ){
            +            _select = $( _select );
            +            var _r = false, _val = _val.toString();
            +            _select.find('option').each( function(){
            +                var _tmp = $(this);
            +                if( _tmp.val() == _val ){
            +                    _r = true;
            +                    return false;
            +                }
            +            });
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( FormFillUrl );
            +
            +    JC.f.extendObject( FormFillUrl.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'FormFillUrl _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( FormFillUrl.Model.INITED, function( _evt ){
            +                    _p.trigger( FormFillUrl.Model.PROCESS );
            +                });
            +
            +                _p.on( FormFillUrl.Model.PROCESS, function( _evt, _selector, _url ){
            +                    _selector && _p._model.selector( _selector );
            +                    _url && _p._model.url( _url );
            +
            +                    if( !_p._model.formtoken() ) return;
            +
            +                    _p._model.selector().prop( 'nodeName' ).toLowerCase() == 'form'
            +                        ? _p._model.fillForm()
            +                        : _p._model.fillItems()
            +                        ;
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'FormFillUrl _inited', new Date().getTime() );
            +                this.trigger( FormFillUrl.Model.INITED );
            +            }
            +        /**
            +         * 手动填充 URL 值
            +         * @method fill
            +         * @param   {selector}  _selector
            +         * @param   {string}    _url
            +         * @return  FormFillUrlInstance
            +         */
            +        , fill:
            +            function( _selector, _url ){
            +                _selector && ( _selector = $( _selector ) );
            +                if( !( _selector && _selector.length && _url ) ) return this;
            +                _p.trigger( FormFillUrl.Model.PROCESS, [ _selector, _url ] );
            +                return this;
            +            }
            +
            +    });
            +
            +    FormFillUrl.Model._instanceName = 'JCFormFillUrl';
            +    FormFillUrl.Model.INITED = 'inited';
            +    FormFillUrl.Model.PROCESS = 'process';
            +
            +    JC.f.extendObject( FormFillUrl.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'FormFillUrl.Model.init:', new Date().getTime() );
            +            }
            +
            +        , url:
            +            function( _url ){
            +                typeof _url != 'undefined' && ( this._url = _url );
            +                return this._url;
            +            }
            +
            +        , formtoken:
            +            function(){
            +                var _p = this, _r = true;
            +                if( JC.f.hasUrlParam( _p.url(), 'formtoken' ) ){
            +                    var _item = _p.selector().find( '[name=formtoken]' );
            +                    if( !_item.length ) return false;
            +
            +                    if( _item.val() != JC.f.getUrlParam( _p.url(), 'formtoken' ) ){
            +                        return false;
            +                    }
            +                }
            +                return _r;
            +            }
            +
            +        , fillForm:
            +            function( _selector, _url ){
            +                this.fillItems( _selector, _url );
            +            }
            +
            +        , fillItems:
            +            function( _selector, _url ){
            +                _selector = $( _selector || this.selector() );
            +
            +                var _p = this
            +                    , _controls = []
            +                    , _params
            +                    ;
            +
            +                _url = _url || _p.url();
            +                _params = _p.urlParams( _url, _p.decoder() );
            +
            +                _selector.find( '[name]' ).each( function( _ix, _item ){
            +                    _item = $( _item );
            +                    switch( ( _item.prop( 'nodeName' ) || '' ).toLowerCase() ){
            +                        case 'input':
            +                        case 'select':
            +                        case 'textarea':
            +                            if( JC.f.parseBool( _item.attr( 'ignoreUrlFill' ) || '' ) ) return;
            +                            _controls.push( _item );
            +                            break;
            +                    }
            +                });
            +
            +                $.each( _params, function( _k, _vals ){
            +                    //alert( [ _k,  _items ] );
            +                    var _findControls = [], _isCheck;
            +                    $.each( _controls, function( _ix, _item ){
            +                        _item.attr( 'name' ) == _k && ( _findControls.push( _item ) );
            +                    });
            +
            +                    if( !_findControls.length ) return;
            +
            +                    //JC.log( _k, _findControls.length, _vals );
            +
            +                    $.each( _findControls, function( _ix, _item ){
            +                        var _nt = ( _item.prop( 'nodeName' ) ).toLowerCase()
            +                            , _type = ( _item.attr( 'type' ) || 'text' ).toLowerCase()
            +                            ;
            +                        if( _type == 'file' ) return;
            +
            +                        if( JC.f.parseBool( _item.attr( 'ignoreUrlFill' ) || '' ) ) return;
            +
            +                        //JC.log( _nt, _type );
            +
            +                        if( /input/i.test( _nt ) ){
            +                            switch( _type ){
            +                                case 'radio':
            +                                case 'checkbox':
            +                                    _isCheck = true;
            +                                    break;
            +
            +                                default: 
            +                                    if( _findControls.length != _vals.length ) return;
            +                                    _p._updateInputVal( _item, _vals, _ix );
            +                                    break;
            +                            }
            +                        }else if( /textarea/i.test( _nt ) ){
            +                            _p._updateInputVal( _item, _vals, _ix );
            +                        }else if( /select/i.test( _nt ) ){
            +                            _p._updateSelect( _item, _vals, _ix );
            +                        }
            +                    });
            +
            +                    if( _isCheck ){
            +                        _p._updateInputChecked( _findControls, _vals );
            +                    }
            +                });
            +
            +                JC.f.autoInit && JC.f.autoInit( _selector );
            +            }
            +
            +        , _updateSelect:
            +            function( _item, _vals, _ix ){
            +                var _val = _vals[ _ix ] || '';
            +                if( FormFillUrl.selectHasVal( _item, _val ) ){
            +                    _item.removeAttr('selectIgnoreInitRequest');
            +                    _item.val( _val );
            +                }else{
            +                    _item.attr( 'selectvalue', _val );
            +                }
            +            }
            +
            +        , _updateInputVal:
            +            function( _item, _vals, _ix ){
            +                _item.val( _vals[ _ix ] || '' );
            +            }
            +
            +        , _updateInputChecked:
            +            function( _controls, _vals ){
            +                $.each( _controls, function( _ix, _item ){
            +                    var _type = ( _item.attr( 'type' ) || 'text' ).toLowerCase(), _find;
            +                    if( !( _type == 'checkbox' || _type == 'radio' ) ) return;
            +                    $.each( _vals, function( _six, _sitem ){
            +                        _item.val() == _sitem  && ( _find = true );
            +                    });
            +                    _find ? _item.prop( 'checked', true ) : _item.prop( 'checked', false );
            +                });
            +            }
            +
            +        , urlParams: 
            +            function( _url, _decoder ){
            +                var _r = {}, _re = /[\+]/g;
            +                _decoder = _decoder || decodeURIComponent;
            +                if( _url ){
            +                    _url = _url.split( /[?]+/ );
            +                    _url.shift();
            +
            +                    if( !_url.length ) return _r;
            +                    _url = _url[ 0 ];
            +
            +                    _url = _url.split( '&' );
            +                    $.each( _url, function( _ix, _item ){
            +                        if( !_item ) return;
            +                        var _sitem = _item.split( '=' );
            +                        if( !_sitem[0] ) return;
            +                        _sitem[ 0 ] = ( _sitem[ 0 ] || '' ).replace( _re, ' ' );
            +                        try{ _sitem[ 0 ] = _decoder( _sitem[ 0 ] ); }catch( ex ){}
            +                        !( _sitem[0] in _r ) && ( _r[ _sitem[0] ] = [] );
            +                        _r[ _sitem[0] ].push( _decoder( ( _sitem[ 1 ] || '' ).replace( _re, ' ' ) ) );
            +                    });
            +                }
            +                return _r;
            +            }
            +
            +        , decoder: function(){ return this.callbackProp( 'decoder' ) || FormFillUrl.decoder; }
            +        , encoder: function(){ return this.callbackProp( 'encoder' ) || FormFillUrl.encoder; }
            +    });
            +
            +    _jdoc.ready( function(){
            +        FormFillUrl.autoInit 
            +            && JC.f.safeTimeout( function(){ FormFillUrl.init(); }, null, 'JCFormFillUrl', 50 );
            +    });
            +
            +    return JC.FormFillUrl;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Form_Form.js.html b/docs_api/files/.._comps_Form_Form.js.html index 2ccd47169..fd7b22857 100644 --- a/docs_api/files/.._comps_Form_Form.js.html +++ b/docs_api/files/.._comps_Form_Form.js.html @@ -3,11 +3,17 @@ ../comps/Form/Form.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,23 +252,32 @@

            File: ../comps/Form/Form.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.AutoSelect', 'JC.AutoChecked', 'JC.FormFillUrl' ], function(){
                 /**
                  * 表单常用功能类 JC.Form
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p>
            +     * <h1 style="color: red;">这个组件将不再维护, 相关功能请使用抽取出来的对应组件</h1>
            +
            +     * <p>
            +     *      <b>optional</b>: 
            +     *      <a href='JC.AutoSelect.html'>JC.AutoSelect</a>
            +     *      , <a href='JC.AutoChecked.html'>JC.AutoChecked</a>
            +     *      , <a href='JC.FormFillUrl.html'>JC.FormFillUrl</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Form.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Form/_demo' target='_blank'>demo link</a></p>
                  * @namespace JC
                  * @class Form
                  * @static
            -     * @version dev 0.1
            +     * @version dev 0.2 2014-01-19
            +     * @version dev 0.1 2013-06-11
                  * @author  qiushaowei   <suches@btbtd.org> | 75 team
            -     * @date    2013-06-11
                  */
                 window.JCForm = JC.Form = {
                     /**
                      * 禁用按钮一定时间, 默认为1秒
            +         * <br />这个方法已停止维护
            +         * , 请使用 <a href="../../docs_api/classes/window.Bizs.ActionLogic.html#method_disableButton">Bizs.ActionLogic.disableButton</a>
                      * @method  disableButton
                      * @static
                      * @param   {selector}  _selector   要禁用button的选择器
            @@ -216,7 +297,7 @@ 

            File: ../comps/Form/Form.js

            /** * select 级联下拉框无限联动 * <br />这个方法已经摘取出来, 单独成为一个类. - * <br />详情请见: <a href="../../docs_api/classes/JC.AutoSelect.html">JC.AutoSelect.html</a> + * <br />详情请见: <a href="../../docs_api/classes/JC.AutoSelect.html">JC.AutoSelect</a> * <br />目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法 * @method initAutoSelect * @static @@ -225,264 +306,33 @@

            File: ../comps/Form/Form.js

            /** * 全选/反选 * <br />这个方法已经摘取出来, 单独成为一个类. - * <br />详情请见: <a href="../../docs_api/classes/JC.AutoChecked.html">JC.AutoChecked.html</a> + * <br />详情请见: <a href="../../docs_api/classes/JC.AutoChecked.html">JC.AutoChecked</a> * <br />目前摘出去的类与之前的逻辑保持向后兼容, 但在不久的将来将会清除这个方法 * @method initCheckAll * @static */ JC.AutoChecked && ( JC.Form.initCheckAll = JC.AutoChecked ); -}(jQuery)); -; - - ;(function($){ /** * 表单自动填充 URL GET 参数 - * <br />只要引用本脚本, DOM 加载完毕后, 页面上所有带 class js_autoFillUrlForm 的 form 都会自动初始化默认值 - * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p> - * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a> - * | <a href='http://jc.openjavascript.org/docs/docs_api/classes/JC.Form.html' target='_blank'>API docs</a> + * <br />这个方法已经摘取出来, 单独成为一个类. + * <br />详情请见: <a href="../../docs_api/classes/JC.FormFillUrl.html">JC.FormFillUrl</a> * @method initAutoFill - * @static - * @for JC.Form - * @version dev 0.1 - * @author qiushaowei <suches@btbtd.org> | 75 team - * @date 2013-06-13 * @param {selector|url string} _selector 显示指定要初始化的区域, 默认为 document * @param {string} _url 显示指定, 取初始化值的 URL, 默认为 location.href - * @example - * JC.Form.initAutoFill( myCustomSelector, myUrl ); - */ - JC.Form.initAutoFill = - function( _selector, _url ){ - _selector = $( _selector || document ); - if( !(_selector && _selector.length ) ) _selector = $(document); - _url = _url || location.href; - - JC.log( 'JC.Form.initAutoFill' ); - - if( _selector.prop( 'nodeName' ).toLowerCase() == 'form' ){ - fillForm( _selector, _url ); - }else{ - var _fms = _selector.find('form.js_autoFillUrlForm'); - _fms.each( function(){ - fillForm( this, _url ); - }); - - if( !_fms.length ){ - fillItems( _selector, _url ); - } - } - - }; - - function fillItems( _selector, _url ){ - _selector = $(_selector); - _url = decode( _url ); - - _selector.find( 'input[type=text][name],input[type=password][name],textarea[name]' ).each( function(){ - var _sp = $(this); - if( hasUrlParam( _url, _sp.attr('name') ) ){ - _sp.val( decode( getUrlParam( _url, _sp.attr('name') ).replace(/[\+]/g, ' ' ) ) ); - } - }); - - _selector.find( 'select[name]' ).each( function(){ - var _sp = $(this), _uval = decode( getUrlParam( _url, _sp.attr('name') ).replace(/[\+]/g, ' ' ) ) ; - if( hasUrlParam( _url, _sp.attr('name') ) ){ - if( selectHasVal( _sp, _uval ) ){ - _sp.removeAttr('selectignoreinitrequest'); - _sp.val( getUrlParam( _url, _sp.attr('name') ) ); - }else{ - _sp.attr( 'selectvalue', _uval ); - } - } - }); - - var _keyObj = {}; - _selector.find( 'input[type=checkbox][name], input[type=radio][name]' ).each( function(){ - var _sp = $(this), _key = _sp.attr('name').trim(), _keys, _v = _sp.val(); - //alert( _sp.attr('name') ); - if( !( _key in _keyObj ) ){ - _keys = getUrlParams( _url, _key ); - _keyObj[ _key ] = _keys; - }else{ - _keys = _keyObj[ _key ]; - } - - if( _keys && _keys.length ){ - $.each( _keys, function( _ix, _item ){ - if( _item == _v ){ - _sp.prop('checked', true); - _sp.trigger('change'); - } - }); - } - }); - - window.jcAutoInitComps && jcAutoInitComps( _selector ); - } - - function fillForm( _selector, _url ){ - fillItems( _selector, _url ); - /* - ?s_startTime=2013-08-28 - &s_endTime=2013-09-28 - &kword_type= - &kword= - &department[]=2 - &department[]=3 - &operator[]=328 - &operator[]=330 - &operator[]=331 - &isp=1379841840601_232_161 - */ - } - /** - * 自定义 URI decode 函数 - * @property initAutoFill.decodeFunc - * @static - * @for JC.Form - * @type function - * @default null - */ - JC.Form.initAutoFill.decodeFunc; - - function decode( _val ){ - try{ - _val = (JC.Form.initAutoFill.decodeFunc || decodeURIComponent)( _val ); - }catch(ex){} - return _val; - } - /** - * 判断下拉框的option里是否有给定的值 - * @method initAutoFill.selectHasVal - * @private - * @static - * @param {selector} _select - * @param {string} _val 要查找的值 - */ - function selectHasVal( _select, _val ){ - var _r = false, _val = _val.toString(); - _select.find('option').each( function(){ - var _tmp = $(this); - if( _tmp.val() == _val ){ - _r = true; - return false; - } - }); - return _r; - } - - $(document).ready( function( _evt ){ - setTimeout( function(){ JC.Form.initAutoFill(); }, 50 ); - }); - -}(jQuery)); - -; - - ;(function($){ - /** - * 文本框 值增减 应用 - * <br />只要引用本脚本, 页面加载完毕时就会自动初始化 NumericStepper - * <br />所有带 class js_NStepperPlus, js_NStepperMinus 视为值加减按钮 - * <br /><br />目标文本框可以添加一些HTML属性自己的规则, - * <br />nsminvalue=最小值(默认=0), nsmaxvalue=最大值(默认=100), nsstep=步长(默认=1), nsfixed=小数点位数(默认=0) - * <br />nschangecallback=值变改后的回调 - * @method initNumericStepper - * @static - * @for JC.Form - * @version dev 0.1 - * @author qiushaowei <suches@btbtd.org> | 360 75 Team - * @date 2013-07-05 - * @param {selector} _selector 要初始化的全选反选的父级节点 - * @example - <dl class="def example1"> - <dt>JC.Form.initNumericStepper 默认值 0 - 100, step 1, fixed 0</dt> - <dd> - <button class="NS_icon NS_minus js_NStepperMinus" nstarget="input.js_ipt1" ></button> - <input type="text" value="0" class="js_ipt1" /> - <button class="NS_icon NS_plus js_NStepperPlus" nstarget="input.js_ipt1" ></button> - </dd> - </dl> - - <dl class="def example1"> - <dt>JC.Form.initNumericStepper -10 ~ 10, step 2, fixed 2</dt> - <dd> - <button class="NS_icon NS_minus js_NStepperMinus" nstarget="input.js_ipt2" ></button> - <input type="text" value="4" class="js_ipt2" nsminvalue="-10" nsmaxvalue="10" nsstep="2" nsfixed="2" /> - <button class="NS_icon NS_plus js_NStepperPlus" nstarget="input.js_ipt2" ></button> - </dd> - </dl> - */ - JC.Form.initNumericStepper = - function( _selector ){ - _selector && ( _selector = $( _selector ) ); - - _selector.delegate( '.js_NStepperPlus, .js_NStepperMinus', 'click', function( _evt ){ - var _p = $(this), _target = _logic.target( _p ); - if( !( _target && _target.length ) ) return; - - var _fixed = parseInt( _logic.fixed( _target ), 10 ) || 0; - var _val = $.trim( _target.val() ), _step = _logic.step( _target ); - _val = ( _fixed ? parseFloat( _val ) : parseInt( _val, 10 ) ) || 0; - var _min = _logic.minvalue( _target ), _max = _logic.maxvalue( _target ); - - _p.hasClass( 'js_NStepperPlus') && ( _val += _step ); - _p.hasClass( 'js_NStepperMinus') && ( _val -= _step ); - - _val < _min && ( _val = _min ); - _val > _max && ( _val = _max ); - - JC.log( _min, _max, _val, _fixed, _step ); - - _target.val( _val.toFixed( _fixed ) ); - - _logic.callback( _target ) && _logic.callback( _target ).call( _target, _p ); - }); - }; - /** - * 文本框 值增减 值变改后的回调 - * <br />这个是定义全局的回调函数, 要定义局部回调请在目标文本框上添加 nschangecallback=回调 HTML属性 - * @property initNumericStepper.onchange - * @type function * @static - * @for JC.Form */ - JC.Form.initNumericStepper.onchange; - - var _logic = { - target: - function( _src ){ - var _r; - if( _src.attr( 'nstarget') ){ - if( /^\~/.test( _src.attr('nstarget') ) ){ - _r = _src.parent().find( _src.attr('nstarget').replace( /^\~[\s]*/g, '') ); - !( _r && _r.length ) && ( _r = $( _src.attr('nstarget') ) ); - }else{ - _r = $( _src.attr('nstarget') ); - } - } - - return _r; - } - - , fixed: function( _target ){ return _target.attr('nsfixed'); } - , step: function( _target ){ return parseFloat( _target.attr( 'nsstep' ) ) || 1; } - , minvalue: function( _target ){ return parseFloat( _target.attr( 'nsminvalue' ) || _target.attr( 'minvalue' ) ) || 0; } - , maxvalue: function( _target ){ return parseFloat( _target.attr( 'nsmaxvalue' ) || _target.attr( 'maxvalue' ) ) || 100; } - , callback: - function( _target ){ - var _r = JC.Form.initNumericStepper.onchange, _tmp; - _target.attr('nschangecallback') && ( _tmp = window[ _target.attr('nschangecallback') ] ) && ( _r = _tmp ); - return _r; - } - }; - - $(document).ready( function( _evt ){ - JC.Form.initNumericStepper( $(document) ); - }); -}(jQuery)); + JC.FormFillUrl && ( JC.Form.initAutoFill = JC.FormFillUrl.init ); + + return JC.Form; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb ) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_FrameUtil_FrameUtil.js.html b/docs_api/files/.._comps_FrameUtil_FrameUtil.js.html new file mode 100644 index 000000000..4be6c1414 --- /dev/null +++ b/docs_api/files/.._comps_FrameUtil_FrameUtil.js.html @@ -0,0 +1,778 @@ + + + + + ../comps/FrameUtil/FrameUtil.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/FrameUtil/FrameUtil.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
            +/**
            + *  <h2>iframe 自适应 与 数据交互 工具类</h2>
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.common.html'>JC.common</a>
            + *  </p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/JC.FrameUtil.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/FrameUtil/_demo' target='_blank'>demo link</a></p>
            + *  
            + * @namespace   JC
            + * @class       FrameUtil
            + * @static
            + * @version dev 0.1 2014-04-26
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + */
            +    var _jdoc = $( document ), _jwin = $( window ), FU;
            +
            +    JC.FrameUtil = FU = {
            +        /**
            +         * 事件保存与触发对象
            +         * @property eventHost
            +         * @type    object
            +         */
            +        eventHost: {}
            +        /**
            +         * frame 高度偏移值 
            +         * @property heightOffset
            +         * @type int
            +         * @default 0
            +         */
            +        , heightOffset: 0
            +        /**
            +         * 自动大小的间隔
            +         * <br />单位毫秒
            +         * @property autoUpdateSizeMs
            +         * @type int
            +         * @default 1000
            +         */
            +        , autoUpdateSizeMs: 1000 
            +        /**
            +         * 设置自适应大小应用的属性
            +         * <br />1: height
            +         * <br />2: width
            +         * <br />3: height + width
            +         * @property childSizePattern
            +         * @type int
            +         * @default 1
            +         */
            +        , childSizePattern: 1 
            +        /**
            +         * 是否自动响应关闭事件
            +         * @property isChildAutoClose
            +         * @type boolean
            +         * @default true
            +         */
            +        , isChildAutoClose: true
            +        /**
            +         * 是否自动响应大小改变事件
            +         * @property isChildAutoSize
            +         * @type boolean
            +         * @default true
            +         */
            +        , isChildAutoSize: true
            +        /**
            +         * 获取 JC.FrameUtil 唯一id
            +         * <br />id = location.url_timestamp
            +         * @method id
            +         * @return string
            +         */
            +        , id: function(){ return FU._id; }
            +        /**
            +         * 通知父窗口更新frame大小
            +         * @method noticeSize
            +         * @param   {string}    _type
            +         */
            +        , noticeSize:
            +            function( _type ){
            +                try{
            +                _type = FU.type( _type );
            +                if( ! FU.parent() ) return FU;
            +                    var _ext = { 'type': _type };
            +                    FU.parent().jEventHost.trigger( 'size', [ FU.info( _ext ) ] );
            +                }catch(ex){
            +                    JC.error( 'JC.FrameUtil noticeSize', ex.message );
            +                }
            +                return FU;
            +            }
            +        /**
            +         * 自动通知父窗口更新frame大小
            +         * @method  autoNoticeSize
            +         * @param   {int}       _ms
            +         * @param   {string}    _type
            +         */
            +        , autoNoticeSize:
            +            function( _ms, _type ){
            +                typeof _ms == 'undefined' && ( _ms = FU.autoUpdateSizeMs );
            +
            +                $( FU ).data( 'FUI_noticeSize' ) && clearInterval( $( FU ).data( 'FUI_noticeSize' ) );
            +                FU.noticeSize( _type );
            +                _ms
            +                    && $(FU).data( 'FUI_noticeSize', setInterval( function(){
            +                        FU.noticeSize( _type );
            +                    }, _ms ) );
            +
            +                return FU;
            +            }
            +        /**
            +         * 订阅 frame 的事件
            +         * <br />目前有以下事件:
            +         * <br />close: 关闭
            +         * <br />size: 更新大小
            +         * <br />data: json 数据
            +         * @method  subscribeEvent
            +         * @param   {string}    _name
            +         * @param   {function}  _cb
            +         */
            +        , subscribeEvent:
            +            function( _name, _cb ){
            +                if( !_name ) return FU;
            +                $( FU.eventHost ).on( _name, _cb );
            +                return FU;
            +            }
            +        /**
            +         * 通知父级有数据交互
            +         * @method  noticeData
            +         * @param   {json}      _data
            +         * @param   {string}    _type
            +         */
            +        , noticeData:
            +            function( _data, _type ){
            +                try{
            +                    if( !(_data) ) return FU;
            +                    if( !FU.parent() ) return FU;
            +                    _type = FU.type( _type );
            +
            +                    FU.parent().jEventHost.trigger( 'data', FU.info( { 'data': _data, 'type': _type } ) );
            +                }catch( ex ){
            +                    JC.error( 'JC.FrameUtil noticeData', ex.message );
            +                }
            +                return FU;
            +            }
            +        /**
            +         * 通知父级刷新页面
            +         * @method  noticeReload
            +         * @param   {string}    _url
            +         * @param   {string}    _type
            +         */
            +        , noticeReload:
            +            function( _url, _type ){
            +                if( !FU.parent() ) return FU;
            +                _type = FU.type( _type );
            +
            +                FU.parent().jEventHost.trigger( 'reload', FU.info( { 'url': _url, 'type': _type } ) );
            +                return FU;
            +            }
            +
            +        /**
            +         * 通知父级已经初始化完毕
            +         * @method  noticeReady
            +         * @param   {string}    _type
            +         */
            +        , noticeReady:
            +            function( _type ){
            +                if( !FU.parent() ) return FU;
            +                try{
            +                    _type = FU.type( _type );
            +
            +                    FU.parent() 
            +                        && FU.parent().jEventHost.trigger( 'ready', FU.info( { 'type': _type } ) );
            +                }catch( ex ){
            +                    JC.error ( 'JC.FrameUtil noticeReady', ex.message );
            +                }
            +                return FU;
            +            }
            +        /**
            +         * 通知子级有数据交互
            +         * @method  noticeChildData
            +         * @param   {json}      _params
            +         * @param   {string}    _type
            +         */
            +        , noticeChildData:
            +            function( _params, _type ){
            +                if( !(_params) ) return FU;
            +                _params.type = FU.type( _type ) || _params.type;
            +
            +                FU.info().jEventHost.trigger( 'childData', FU.info( _params ) );
            +                return FU;
            +            }
            +        /**
            +         * 通知父级关闭窗口
            +         * @method  noticeClose
            +         * @param   {string}    _type
            +         */
            +        , noticeClose:
            +            function( _type ){
            +                try{
            +                    _type = FU.type( _type );
            +                    FU.parent().jEventHost.trigger( 'close', FU.info( { 'type': _type } ) );
            +                }catch(ex){
            +                    JC.error( 'JC.FrameUtil noticeClose', ex.message );
            +                }
            +                return FU;
            +            }
            +        /**
            +         * 获取窗口信息
            +         * @method  info
            +         * @return  {object}  $, width, height, bodyWidth, bodyHeight, id
            +         */
            +        , info:
            +            function( _ext ){
            +                var _body = $( document.body )
            +                    , _vs = JC.f.docSize()
            +                    , _r = { 
            +                        '$': $
            +                        , 'width': _vs.width
            +                        , 'height': _vs.height
            +                        , 'bodyWidth': _vs.bodyWidth
            +                        , 'bodyHeight': _vs.bodyHeight
            +                        , 'id': FU.id()
            +                        , 'eventHost': FU.eventHost
            +                        , 'jEventHost': $( FU.eventHost )
            +                        , 'FrameUtil': FU
            +                    };
            +
            +                _ext && ( _r = JC.f.extendObject( _r, _ext ) );
            +
            +                return _r;
            +            }
            +        /**
            +         * 获取父级窗口信息
            +         * @method  parent
            +         * @return  {object}  $, win, jwin, JC, FrameUtil, eventHost, jEventHost, id
            +         */
            +        , parent:
            +            function(){
            +                var _r;
            +
            +                if( window.parent 
            +                        && window.parent != window 
            +                        && window.parent.$ 
            +                        && window.parent.JC 
            +                        && window.parent.JC.FrameUtil
            +                ){
            +                    _r = {
            +                        '$': window.parent.$
            +                        , 'win': window.parent
            +                        , 'jwin': window.parent.$( window.parent )
            +                        , 'JC': window.parent.JC
            +                        , 'eventHost': window.parent.JC.FrameUtil.eventHost
            +                        , 'jEventHost': window.parent.$( window.parent.JC.FrameUtil.eventHost )
            +                        , 'id': window.parent.JC.FrameUtil.id()
            +                        , 'FrameUtil': window.parent.JC.FrameUtil
            +                    };
            +                }
            +
            +                return _r;
            +            }
            +       /**
            +         * 获取子级窗口信息
            +         * @method  parent
            +         * @return  {object}  $, width, height, bodyWidth, bodyHeight, win, doc, type, id
            +         */
            +        , frameInfo:
            +            function( _frame, _ext ){
            +                _frame && ( _frame = $( _frame ) );
            +                var _r = null;
            +
            +                if( _frame && _frame.length ){
            +                    try{
            +                        var _cwin = _frame.prop( 'contentWindow' )
            +                            , _cdoc = _frame.prop( 'contentDocument' )
            +                            , _type = JC.f.getUrlParam( _frame.attr('src') || '', 'jsAction' ) || _cwin.name || ''
            +                            , _vs = JC.f.docSize( _cdoc )
            +                            ;
            +                    }catch(ex){
            +                        JC.error( 'JC.FrameUtil frameInfo', ex.message );
            +                        return _r;
            +                    }
            +
            +                    _r = { 
            +                        '$': _cwin.$
            +                        , 'width': _vs.width
            +                        , 'height': _vs.height
            +                        , 'bodyWidth': _vs.bodyWidth
            +                        , 'bodyHeight': _vs.bodyHeight
            +                        , 'docWidth': _vs.docWidth
            +                        , 'docHeight': _vs.docHeight
            +                        , 'win': _cwin
            +                        , 'doc': _cdoc
            +                        , 'type': _type
            +                        , 'id': ''
            +                    };
            +
            +                    _cdoc && _cdoc.body 
            +                        && (
            +                            _r.bodyWidth = _cdoc.body.offsetWidth
            +                            , _r.bodyHeight = _cdoc.body.offsetHeight
            +                        );
            +
            +                    if( _cwin.JC && _cwin.JC.FrameUtil ){
            +                        _r.id = _cwin.JC.FrameUtil.id();
            +                    }
            +
            +                    _ext && ( _r = JC.f.extendObject( _r, _ext ) );
            +                }
            +
            +                return _r;
            +            }
            +        /**
            +         * 获取窗口类型
            +         * <br />这个方法的作用可用 id() + childIdMap() 替代
            +         * @method type
            +         * @default window.name
            +         * @return string
            +         */
            +        , type:
            +            function( _type, _plus, _frame ){
            +                if( !_type ){
            +                    _frame && ( _frame = $( _frame ) );
            +                    if( _frame && _frame.length ){
            +                        _type = JC.f.getUrlParam( _frame.attr( 'jsAction' ) || '',  'jsAction' );
            +                        _type = _type || _frame.prop( 'contentWindow' ).name || '';
            +                    }else{
            +                        _type = JC.f.getUrlParam( 'jsAction' );
            +                        _type = _type || window.name || '';
            +                    }
            +                }
            +                _type && _plus && ( _type += _plus );
            +
            +                return _type;
            +            }
            +        /**
            +         * 批量更新 frame 大小
            +         * @method updateChildrenSize
            +         * @param   {selector}  _frames
            +         */
            +        , updateChildrenSize:
            +            function( _frames ){
            +                _frames && ( _frames = $( _frames ) );
            +                if( !( _frames && _frames.length ) ) return FU;
            +                _frames.each( function(){
            +                    FU.updateChildSize( $( this ) );
            +                });
            +                return FU;
            +            }
            +        /**
            +         * 更新 frame 大小
            +         * @method  updateChildSize
            +         * @param   {selector}  _frame
            +         */
            +        , updateChildSize:
            +            function( _frame ){
            +                _frame && ( _frame = $( _frame ) );
            +                if( !( _frame && _frame.length ) ) return FU;
            +                if( !_frame.is( ':visible' ) ) return FU;
            +                var _finfo, _h;
            +                _finfo = FU.frameInfo( _frame );
            +                if( !_finfo ) return;
            +                if( !_finfo.height ) return FU;
            +                _frame.css( FU.cssFromSizePattern( FU.childSizePattern, _finfo ) );
            +                _frame.css( 'height', _finfo.height + 'px' );
            +                //JC.log( _frame.attr( 'name' ), _finfo.height, _finfo.bodyHeight );
            +                return FU;
            +            }
            +        /**
            +         * 自动批量更新 frame 大小
            +         * @method  childrenAutoSize
            +         * @param   {selector}  _frames
            +         * @param   {int}       _ms
            +         */
            +        , childrenAutoSize:
            +            function( _frames, _ms ){
            +                _frames && ( _frames = $( _frames ) );
            +                if( !( _frames && _frames.length ) ) return FU;
            +                typeof _ms == 'undefined' && ( _ms = FU.autoUpdateSizeMs );
            +                var _d = { 'frames': _frames };
            +
            +                FU.updateChildrenSize( _frames );
            +
            +                _frames.data( 'FUI_autoSize' ) 
            +                    && clearInterval( _frames.data( 'FUI_autoSize' ) )
            +                    ;
            +
            +                _ms
            +                    && _frames.data( 'FUI_autoSize', setInterval( function(){
            +                        FU.updateChildrenSize( _frames );
            +                    }, _ms ) );
            +
            +                return FU;
            +            }
            +        /**
            +         * 通过 id 比对 frame 的 FrameUtil.id() 获取 frame
            +         * @method  childIdMap
            +         * @param   {string}  _id
            +         * @return  selector | null
            +         */
            +        , childIdMap: 
            +            function( _id ){
            +                var _r;
            +
            +                if( _id ){
            +                    if( _id in FU._childIdMap ){
            +                        _r = FU._childIdMap[ _id ];
            +                    }else{
            +                        $( 'iframe' ).each( function( _ix ){
            +                            var _iframe = $( this ), _win = _iframe.prop( 'contentWindow' ); 
            +
            +                            if( 
            +                                _win && _win.JC && _win.JC.FrameUtil
            +                                && _win.JC.FrameUtil.id() 
            +                            ){
            +                                if( _win.JC.FrameUtil.id() === _id ){
            +                                    FU._childIdMap[ _id ] = _r = _iframe;
            +                                    return false;
            +                                }
            +                            }
            +                        });
            +                    }
            +                }
            +                return _r;
            +            }
            +        , _childIdMap: {}
            +
            +        /**
            +         * 通过 FrameUtil.childSizePattern 获取对应的 css 样式
            +         * @method  cssFromSizePattern
            +         * @param   {int}   _pattern
            +         * @param   {json}  _params
            +         * @return  json
            +         */
            +        , cssFromSizePattern:
            +            function( _pattern, _params ){
            +                var _css = {};
            +                switch( _pattern ){
            +                    case 1: _css.height = _params.height + FU.heightOffset; break;
            +                    case 2: _css.width = _params.width; break;
            +                    default: 
            +                       _css.height = _params.height + FU.heightOffset;
            +                       _css.width = _params.width;
            +                       break;
            +                }
            +                return _css;
            +            }
            +
            +    };
            +
            +    FU._id = location.href + '_' + new Date().getTime();
            +
            +
            +    if( FU.parent() ){
            +        FU.parent().FrameUtil.subscribeEvent( 'childData', function( _evt, _params ){
            +            if( !( _params.id === FU._id ) ) return;
            +            FU.noticeChildData( _params );
            +        });
            +
            +        setTimeout( function(){ FU.noticeReady(); }, 1 );
            +    }
            +
            +    JC.f.safeTimeout( function(){
            +
            +        if( FU.isChildAutoSize ){
            +            JC.FrameUtil.subscribeEvent( 'size', function( _evt, _params ){
            +                if( !_params.height ) return;
            +                var _childFrame = FU.childIdMap( _params.id ), _css;
            +                if( _childFrame && _childFrame.length ){
            +                    _childFrame.css( FU.cssFromSizePattern( FU.childSizePattern, _params ) );
            +                }
            +            });
            +        }
            +
            +        if( FU.isChildAutoClose ){
            +            JC.FrameUtil.subscribeEvent( 'close', function( _evt, _params ){
            +                var _childFrame = FU.childIdMap( _params.id ), _css, _panel;
            +                if( _childFrame && _childFrame.length ){
            +                    _panel = JC.f.parentSelector( _childFrame, 'div.UPanel' );
            +                    _panel 
            +                        && _panel.length 
            +                        && JC.Panel.getInstance( _panel )
            +                        && JC.Panel.getInstance( _panel ).close()
            +                        ;
            +                }
            +            });
            +        }
            +
            +        JC.FrameUtil.subscribeEvent( 'reload', function( _evt, _params ){
            +            var _url = _params.url || location.href;
            +            JC.f.reloadPage( _url );
            +        });
            +
            +    }, null, 'JCFrameUtilInit', 200 );
            +
            +    return JC.FrameUtil;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_ImageCutter_ImageCutter.js.html b/docs_api/files/.._comps_ImageCutter_ImageCutter.js.html new file mode 100644 index 000000000..b7f3eaac8 --- /dev/null +++ b/docs_api/files/.._comps_ImageCutter_ImageCutter.js.html @@ -0,0 +1,2079 @@ + + + + + ../comps/ImageCutter/ImageCutter.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/ImageCutter/ImageCutter.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * 图片裁切组件
            + * <br />借助 PHP GD 库进行图片裁切( 不仅限于 PHP GD )
            + *
            + *<p><b>require</b>:
            + *   <a href="JC.common.html">JC.common</a>
            + *   , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/JC.ImageCutter.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/ImageCutter/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会处理 div class="js_compImageCutter"</h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>imageUrl = url string</dt>
            + *    <dd>图片URL<dd>
            + *
            + *    <dt>defaultCoordinate = string</dt>
            + *    <dd>
            + *        设置默认选择范围, 有以下三种模式
            + *        <br />sidelength
            + *        <br />x, y
            + *        <br />x, y, sidelength
            + *    </dd>
            + *
            + *    <dt>coordinateSelector =  selector</dt>
            + *    <dd>保存当前坐标值的 node
            + *          <br />坐标值分别为: [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ]
            + *    </dd>
            + *
            + *    <dt>imageUrlSelector = selector</dt>
            + *    <dd>保存当前图片URL的 node</dd>
            + *
            + *    <dt>previewSelector = selector</dt>
            + *    <dd>用于显示预览的 node, 支持多个预览, node 宽高并须为正方形</dd>
            + *
            + *    <dt>minRectSidelength = int, default = 50</dt>
            + *    <dd>裁切块的最小边长</dd>
            + *
            + *    <dt>minImageSidelength = int, default = 50</dt>
            + *    <dd>图片的最小边长</dd>
            + *
            + *    <dt>maxImageSidelength = int</dt>
            + *    <dd>图片的最大边长</dd>
            + *
            + *    <dt>cicInitedCb = function</dt>
            + *    <dd>组件初始化后的回调, <b>window变量域</b>
            +<pre>function cicInitedCb(){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicInitedCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicImageInitedCb = function</dt>
            + *    <dd>图片初始化完成时的回调, <b>window变量域</b>
            +<pre>function cicImageInitedCb( _sizeObj, _img ){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicImageInitedCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicCoordinateUpdateCb = function</dt>
            + *    <dd>更新裁切坐标后的回调, <b>window变量域</b>
            + *    <br />_corAr = Array = [ x, y, rectWidth, rectHeight, imgWidth, imgHeight ]
            + <pre>function cicCoordinateUpdateCb( _corAr, _imgUrl ){
            +    var _p = this, _selector = _p.selector();
            +    JC.log( 'cicCoordinateUpdateCb', _corAr, _imgUrl, new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicDragDoneCb = function</dt>
            + *    <dd>拖动完成后的回调, <b>window变量域</b>
            + *      <br/>与 cicCoordinateUpdateCb 的差别是: cicDragDoneCb 初始化不会触发
            + <pre>function cicDragDoneCb( _sizeObj ){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicDragDoneCb', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicErrorCb = function</dt>
            + *    <dd>发生错误时的回调, <b>window变量域</b>
            + *      <br />所有错误类型都会触发这个回调
            + <pre>function cicErrorCb( _errType, _args ){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicErrorCb', _errType, new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicLoadErrorCb = function</dt>
            + *    <dd>图片加载错误时的回调, <b>window变量域</b>
            + <pre>function cicLoadErrorCb( _imgUrl ){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicLoadErrorCb',_imgUrl, new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicSizeErrorCb = function</dt>
            + *    <dd>图片尺寸不符合设置要求时的回调, <b>window变量域</b>
            +<pre>function cicSizeErrorCb( _width, _height, _imgUrl, _isMax ){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicSizeErrorCb', _width, _height, _imgUrl, _isMax, new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cicPreviewSizeErrorCb = function</dt>
            + *    <dd>图片缩放后尺寸不符合设置要求时的回调, <b>window变量域</b>
            + <pre>function cicPreviewSizeErrorCb( _width, _height, _imgUrl, _newSize ){
            +    var _ins = this, _selector = _ins.selector();
            +    JC.log( 'cicPreviewSizeErrorCb', _width, _height, _imgUrl, _newSize, new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *</dl> 
            + *
            + * @namespace   JC
            + * @class       ImageCutter
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +<xmp><table>
            +    <tr>
            +        <td>
            +            <div class="js_compImageCutter"
            +                imageUrl="data/uploads/h_1680x1050.jpg"
            +                previewSelector="(tr div.js_previewItem"
            +                coordinateSelector="(td input.js_coordinate"
            +                imageUrlSelector="(td input.js_imageUrl"
            +                cicCoordinateUpdateCb="cicCoordinateUpdateCb"
            +                >
            +            </div>
            +            <input type="text" class="ipt js_coordinate" value="" />
            +            <input type="text" class="ipt js_imageUrl" value="" />
            +        </td>
            +        <td>
            +            <div class="cic_previewItem js_previewItem" style="width: 50px; height: 50px;"></div>
            +            <div class="cic_previewItem js_previewItem" style="width: 75px; height: 75px;"></div>
            +            <div class="cic_previewItem js_previewItem" style="width: 150px; height: 150px;"></div>
            +        </td>
            +    </tr>
            +</table></xmp>
            + */
            +    var _jdoc = $( document ), _jwin = $( window ), _jbody;
            +
            +    JC.ImageCutter = ImageCutter;
            +
            +    function ImageCutter( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, ImageCutter ) ) 
            +            return JC.BaseMVC.getInstance( _selector, ImageCutter );
            +
            +        JC.BaseMVC.getInstance( _selector, ImageCutter, this );
            +
            +        this._model = new ImageCutter.Model( _selector );
            +        this._view = new ImageCutter.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( ImageCutter.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 ImageCutter 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of ImageCutterInstance}
            +     */
            +    ImageCutter.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compImageCutter' )  ){
            +                    _r.push( new ImageCutter( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compImageCutter' ).each( function(){
            +                        _r.push( new ImageCutter( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 裁切范围的最小边长
            +     * @property    minRectSidelength
            +     * @type        int
            +     * @default     50
            +     * @static
            +     */
            +    ImageCutter.minRectSidelength = 50;
            +    /**
            +     * 图片的最小边长
            +     * @property    minImageSidelength
            +     * @type        int
            +     * @default     50
            +     * @static
            +     */
            +    ImageCutter.minImageSidelength = 50;
            +    /**
            +     * 图片的最大边长
            +     * @property    maxImageSidelength
            +     * @type        int
            +     * @static
            +     */
            +    ImageCutter.maxImageSidelength;
            +    /**
            +     * 上下左右方向键移动的步长
            +     * @property    moveStep
            +     * @type        int
            +     * @default     1
            +     * @static
            +     */
            +    ImageCutter.moveStep = 1;
            +    /**
            +     * 进行坐标计算的偏移值
            +     * @property    _positionPoint
            +     * @type        int
            +     * @default     10000
            +     * @static
            +     * @protected
            +     */
            +    ImageCutter._positionPoint = 10000;
            +    /**
            +     * 默认的 CSS cursor
            +     * @property    _defaultCursor
            +     * @type        string
            +     * @default     auto
            +     * @static
            +     * @protected
            +     */
            +    ImageCutter._defaultCursor = 'auto';
            +    /**
            +     * 获取 拖动 的相关信息
            +     * @method  dragInfo
            +     * @param   {ImageCutterInstance}   _p 
            +     * @param   {event}                 _evt
            +     * @param   {object}                _size
            +     * @param   {selector}              _srcSelector
            +     * @static
            +     */
            +    ImageCutter.dragInfo =
            +        function( _p, _evt, _size, _srcSelector ){
            +            if( _p && _evt && _size ){
            +                ImageCutter._dragInfo = {
            +                    'ins': _p
            +                    , 'evt': _evt
            +                    , 'size': _p._model.size()
            +                    , 'tmpSize': _size
            +                    , 'pageX': _evt.pageX
            +                    , 'pageY': _evt.pageY
            +                    , 'srcSelector': _srcSelector
            +                    , 'offset': _p.selector().offset()
            +                    , 'minDistance': _p._model.minDistance()
            +                    , 'winWidth': _jwin.width()
            +                    , 'winHeight': _jwin.height()
            +                    , 'btnSidelength': _p._model.btnTl().width()
            +                }
            +                //JC.log( 'minDistance', ImageCutter._dragInfo.minDistance );
            +                //window.JSON && JC.log( JSON.stringify( _size ) );
            +            }
            +            return ImageCutter._dragInfo;
            +        };
            +    /**
            +     * 清除拖动信息
            +     * @method  cleanInfo
            +     * @static
            +     */
            +    ImageCutter.cleanInfo = 
            +        function(){
            +
            +            _jdoc.off( 'mouseup', ImageCutter.dragMainMouseUp );
            +            _jdoc.off( 'mousemove', ImageCutter.dragMainMouseMove );
            +
            +            _jdoc.off( 'mouseup', ImageCutter.dragBtnMouseUp );
            +            _jdoc.off( 'mousemove', ImageCutter.dragBtnMouseMove );
            +
            +            ImageCutter.dragInfo( null );
            +            _jbody.css( 'cursor', ImageCutter._defaultCursor );
            +        };
            +    /*
            +        {
            +            "minX": 0, 
            +            "dragger": {
            +                "srcSidelength": 94, 
            +                "sidelength": 84, 
            +                "left": 103, 
            +                "top": 103, 
            +                "halfSidelength": 42
            +            }, 
            +            "maxX": 300, 
            +            "top": 56, 
            +            "left": 0, 
            +            "width": 1680, 
            +            "height": 1050, 
            +            "selector": {
            +                "width": 300, 
            +                "height": 300
            +            }, 
            +            "preview": {
            +                "width": 300, 
            +                "height": 188
            +            }, 
            +            "minY": 56, 
            +            "img": {
            +                "width": 1680, 
            +                "height": 1050
            +            }, 
            +            "maxY": 244
            +        }
            +    */
            +    ImageCutter.dragMainMouseMove =
            +        function( _evt ){
            +            if( !( ImageCutter.dragInfo() && _evt ) ) return;
            +            var _di = ImageCutter.dragInfo(), _p;
            +            var _p = _di.ins
            +                , _posX = _di.pageX - _evt.pageX
            +                , _posY = _di.pageY - _evt.pageY
            +
            +                , _newX = _di.size.dragger.left - _posX
            +                , _newY = _di.size.dragger.top - _posY
            +
            +                , _maxX = _di.size.maxX - _di.size.dragger.srcSidelength
            +                , _maxY = _di.size.maxY - _di.size.dragger.srcSidelength
            +                ;
            +
            +            _newX < _di.size.minX && ( _newX = _di.size.minX );
            +            _newX > _maxX && ( _newX = _maxX );
            +
            +            _newY < _di.size.minY && ( _newY = _di.size.minY );
            +            _newY > _maxY && ( _newY = _maxY );
            +
            +            _di.tmpSize.dragger.left = _newX;
            +            _di.tmpSize.dragger.top = _newY;
            +
            +            _p.updatePosition( _di.tmpSize );
            +            _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] );
            +
            +            //JC.log( 'ImageCutter.dragMainMouseMove', _newX, _newY );
            +        };
            +
            +    ImageCutter.dragMainMouseUp =
            +        function( _evt ){
            +            if( !ImageCutter.dragInfo() ) return;
            +            var _di = ImageCutter.dragInfo(), _p = _di.ins;
            +
            +            _jbody.css( 'cursor', ImageCutter._defaultCursor );
            +
            +            _p._size( _di.tmpSize );
            +            _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] );
            +            _p.trigger( ImageCutter.Model.DRAG_DONE, [ _di.tmpSize ] );
            +
            +            ImageCutter.cleanInfo();
            +        };
            +
            +    ImageCutter.dragBtnMouseMove =
            +        function( _evt ){
            +            if( !( ImageCutter.dragInfo() && _evt ) ) return;
            +            var _di = ImageCutter.dragInfo()
            +                , _p = _di.ins
            +                , _posX = _di.pageX - _evt.pageX
            +                , _posY = _di.pageY - _evt.pageY
            +                , _direct = _di.srcSelector.attr( 'diretype' )
            +                ;
            +            //JC.log( 'old', _di.size.dragger.left, _di.size.dragger.top );
            +            //JC.log( 'ImageCutter.dragBtnMouseMove', _posX, _posY, _direct );
            +
            +            switch( _direct ){
            +                case 'cic_btnTl': ImageCutter.resizeTopLeft( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnTc': ImageCutter.resizeTopCenter( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnTr': ImageCutter.resizeTopRight( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnMl': ImageCutter.resizeMidLeft( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnMr': ImageCutter.resizeMidRight( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnBl': ImageCutter.resizeBottomLeft( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnBc': ImageCutter.resizeBottomCenter( _di, _posX, _posY, _evt ); break;
            +                case 'cic_btnBr': ImageCutter.resizeBottomRight( _di, _posX, _posY, _evt ); break;
            +            }
            +            _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] );
            +        };
            +
            +    ImageCutter.dragBtnMouseUp =
            +        function( _evt ){
            +            if( !ImageCutter.dragInfo() ) return;
            +            var _di = ImageCutter.dragInfo(), _p = _di.ins;
            +            //JC.log( 'ImageCutter.dragBtnMouseUp', new Date().getTime() );
            +
            +            _jbody.css( 'cursor',  ImageCutter._defaultCursor );
            +
            +            _p._size( _di.tmpSize );
            +            _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _di.tmpSize ] );
            +            _p.trigger( ImageCutter.Model.DRAG_DONE, [ _di.tmpSize ] );
            +
            +            ImageCutter.cleanInfo();
            +        };
            +
            +    ImageCutter.defaultKeydown =
            +        function( _evt ){
            +            if( !( _evt && ImageCutter._currentIns ) ) return;
            +            _evt.preventDefault();
            +            var _keyCode = _evt.keyCode;
            +            //JC.log( 'ImageCutter.defaultKeydown', new Date().getTime(), _keyCode );
            +            switch( _keyCode ){
            +                case 37: ImageCutter._currentIns.moveLeft(); break;
            +                case 38: ImageCutter._currentIns.moveUp(); break;
            +                case 39: ImageCutter._currentIns.moveRight(); break;
            +                case 40: ImageCutter._currentIns.moveDown(); break;
            +            }
            +        };
            +
            +    ImageCutter.defaultMouseenter =
            +        function( _evt ){
            +            var _sp = $( this ), _ins = BaseMVC.getInstance( _sp, ImageCutter );
            +            if( !_ins ) return;
            +            ImageCutter._currentIns = _ins;
            +            //JC.log( 'ImageCutter.defaultMouseenter', new Date().getTime() );
            +        };
            +
            +    ImageCutter.defaultMouseleave =
            +        function( _evt ){
            +            ImageCutter._currentIns = null;
            +            //JC.log( 'ImageCutter.defaultMouseleave', new Date().getTime() );
            +        };
            +
            +    JC.BaseMVC.build( ImageCutter );
            +
            +    JC.f.extendObject( ImageCutter.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'ImageCutter _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( ImageCutter.Model.INITED, function( _evt ){
            +                    _p._model.coordinateSelector() && _p._model.coordinateSelector().val( '' );
            +                    _p._model.imageUrlSelector() && _p._model.imageUrlSelector().val( '' );
            +
            +                    _p._model.imageUrl()
            +                        && _p.update( _p._model.imageUrl() );
            +
            +                    _p._model.cicInitedCb()
            +                        && _p._model.cicInitedCb().call( _p );
            +                });
            +
            +                _p.on( ImageCutter.Model.IMAGE_LOAD, function( _evt, _img, _width, _height ){
            +
            +                    _p.clean();
            +
            +                    _p._model.imageUrl( _img.attr( 'src' ) );
            +
            +                    if( _p._model.maxImageSidelength()
            +                        && ( _width > _p._model.maxImageSidelength() || _height > _p._model.maxImageSidelength() ) 
            +                    ){
            +                        _p.trigger( ImageCutter.Model.ERROR_SIZE, [ _width, _height, _img, true ] );
            +                        return;
            +                    }
            +
            +                    if( _p._model.minImageSidelength()
            +                        && ( _width < _p._model.minImageSidelength() || _height < _p._model.minImageSidelength() ) 
            +                    ){
            +                        _p.trigger( ImageCutter.Model.ERROR_SIZE, [ _width, _height, _img ] );
            +                        return;
            +                    }
            +
            +                    var _newSize = _p._model.size( _width, _height );
            +
            +                    //if( true ){
            +                    if( _newSize.preview.width < _p._model.minRectSidelength() 
            +                            || _newSize.preview.height < _p._model.minRectSidelength() ){
            +                        _p.trigger( ImageCutter.Model.ERROR_PREVIEW, [ _width, _height, _img, _newSize ] );
            +                        return;
            +                    }
            +
            +                    _img.css( { 
            +                        'width': _newSize.preview.width
            +                        , 'height': _newSize.preview.height
            +                        , 'left': _newSize.left
            +                        , 'top': _newSize.top
            +                    });
            +                    _img.prependTo( _p.selector() );
            +                    
            +                    _p._model.imageUrlSelector()
            +                        && _p._model.imageUrlSelector().length
            +                        && _p._model.imageUrlSelector().val( _img.attr( 'src' ) );
            +
            +                    _p._view.initDragger( _newSize );
            +                    
            +                    _p.trigger( ImageCutter.Model.INIT_PREVIEW );
            +                    _p.trigger( ImageCutter.Model.UPDATE_COORDINATE, [ _newSize ] );
            +
            +                    _p._model.ready( true );
            +
            +                    _p._model.cicImageInitedCb()
            +                        && _p._model.cicImageInitedCb().call( _p, _p._model.size(), _img );
            +                });
            +
            +                _p.selector().on( 'mouseenter', ImageCutter.defaultMouseenter );
            +                _p.selector().on( 'mouseleave', ImageCutter.defaultMouseleave );
            +
            +                _p.selector().delegate( 'div.cic_dragMain', 'mousedown', function( _evt ){
            +                    if( !_p._model.ready() ) return;
            +                    _evt.preventDefault();
            +                    _evt.stopPropagation();
            +                    //JC.log( 'div.cic_dragMain mousedown', new Date().getTime() );
            +
            +                    ImageCutter.cleanInfo();
            +                    ImageCutter.dragInfo( _p, _evt, JC.f.cloneObject( _p._model.size() ), $( this ) );
            +
            +                    _jbody.css( 'cursor', 'move' );
            +                    _p.trigger( ImageCutter.Model.INIT_PREVIEW );
            +
            +                    _jdoc.on( 'mousemove', ImageCutter.dragMainMouseMove );
            +                    _jdoc.on( 'mouseup', ImageCutter.dragMainMouseUp );
            +
            +                    return false;
            +                });
            +
            +                _p.selector().delegate( 'button.cic_btn', 'mousedown', function( _evt ){
            +                    if( !_p._model.ready() ) return;
            +                    _evt.preventDefault();
            +                    //JC.log( 'div.cic_btn mousedown', new Date().getTime() );
            +
            +                    ImageCutter.cleanInfo();
            +                    ImageCutter.dragInfo( _p, _evt, JC.f.cloneObject( _p._model.size() ), $( this ) );
            +
            +                    var _btn = $( this )
            +                        , _direct = _btn.attr( 'diretype' )
            +                        ;
            +
            +                    switch( _direct ){
            +                        case 'cic_btnTl': _jbody.css( 'cursor', 'nw-resize' ); break;
            +                        case 'cic_btnTc': _jbody.css( 'cursor', 'n-resize' ); break;
            +                        case 'cic_btnTr': _jbody.css( 'cursor', 'ne-resize' ); break;
            +                        case 'cic_btnMl': _jbody.css( 'cursor', 'w-resize' ); break;
            +                        case 'cic_btnMr': _jbody.css( 'cursor', 'e-resize' ); break;
            +                        case 'cic_btnBl': _jbody.css( 'cursor', 'sw-resize' ); break;
            +                        case 'cic_btnBc': _jbody.css( 'cursor', 's-resize' ); break;
            +                        case 'cic_btnBr': _jbody.css( 'cursor', 'se-resize' ); break;
            +                    }
            +
            +                    _p.trigger( ImageCutter.Model.INIT_PREVIEW );
            +
            +                    _jdoc.on( 'mousemove', ImageCutter.dragBtnMouseMove );
            +                    _jdoc.on( 'mouseup', ImageCutter.dragBtnMouseUp );
            +
            +                    return false;
            +                });
            +
            +                _p.on( ImageCutter.Model.INIT_PREVIEW, function( _evt ){
            +                    //JC.log( 'ImageCutter.Model.INIT_PREVIEW', new Date().getTime() );
            +                    _p._view.initPreviewItems();
            +                });
            +
            +                _p.on( ImageCutter.Model.UPDATE_RECT, function( _evt, _size ){
            +                    _p.trigger( ImageCutter.Model.UPDATE_PREVIEW, [ _size ] );
            +                });
            +
            +                _p.on( ImageCutter.Model.UPDATE_PREVIEW, function( _evt, _size ){
            +                    //JC.log( 'ImageCutter.Model.UPDATE_PREVIEW', new Date().getTime() );
            +                    if( !_size ) return;
            +                    _p._view.updatePreviewItems( _size );
            +                });
            +
            +                _p.on( ImageCutter.Model.DRAG_DONE, function( _evt, _size ){
            +                    //JC.log( 'ImageCutter.DRAG_DONE', new Date().getTime() );
            +                    _p.trigger( ImageCutter.Model.UPDATE_COORDINATE, [ _size ] );
            +
            +                    _p._model.cicDragDoneCb()
            +                        && _p._model.cicDragDoneCb().call( _p, _p._model.size() );
            +                });
            +
            +                _p.on( ImageCutter.Model.UPDATE_COORDINATE, function( _evt, _size ){
            +                    var _size = _size || _p._model.size()
            +                        , _selector = _p._model.coordinateSelector()
            +                        ;
            +                    if( !_size ) return;
            +                    var _corAr = _p._model.realCoordinate( _size );
            +
            +                    _p._model.cicCoordinateUpdateCb() 
            +                        && _p._model.cicCoordinateUpdateCb().call( _p, _corAr, _p._model.imageUrl() );
            +
            +                    if( !( _selector && _selector.length ) ) return;
            +                    _selector.val( _corAr );
            +                });
            +
            +                _p.on( ImageCutter.Model.ERROR, function( _evt, _type, _args ){
            +                    _p._model.clean();
            +                    _p._model.ready( false );
            +
            +                    _p._model.cicErrorCb()
            +                        && _p._model.cicErrorCb().call( _p, _type, _args );
            +                });
            +
            +                _p.on( ImageCutter.Model.LOAD_ERROR, function( _evt, _imgUrl ){
            +                    _p.clean();
            +                    _p._model.ready( false );
            +                    _p._view.imageLoadError( _imgUrl );
            +                    _p._model.cicLoadErrorCb() && _p._model.cicLoadErrorCb().call( _p, _imgUrl );
            +                    _p.trigger( ImageCutter.Model.ERROR, [ ImageCutter.Model.LOAD_ERROR, [ _imgUrl ] ] );
            +                });
            +
            +                _p.on( ImageCutter.Model.ERROR_SIZE, function( _evt, _width, _height, _img, _isMax ){
            +                    _p._view.sizeError( _width, _height, _img, _isMax );
            +                    _p._model.cicSizeErrorCb() && _p._model.cicSizeErrorCb().call( _p, _width, _height, _img.attr('src'), _isMax );
            +                    _p.trigger( ImageCutter.Model.ERROR, [ ImageCutter.Model.ERROR_SIZE, [ _width, _height, _img, _isMax ] ] );
            +                });
            +
            +                _p.on( ImageCutter.Model.ERROR_PREVIEW, function( _evt, _width, _height, _img, _newSize ){
            +                    _p._view.previewError( _width, _height, _img, _newSize );
            +                    _p._model.cicPreviewSizeErrorCb() 
            +                        && _p._model.cicPreviewSizeErrorCb().call( _p, _width, _height, _img.attr('src'), _newSize );
            +                    _p.trigger( ImageCutter.Model.ERROR, [ ImageCutter.Model.ERROR_PREVIEW, [ _width, _height, _img, _newSize ] ]  );
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'ImageCutter _inited', new Date().getTime() );
            +                this.trigger( ImageCutter.Model.INITED );
            +            }
            +        /**
            +         * 更新图片
            +         * @method  update
            +         * @param   {string}    _imgUrl
            +         */
            +        , update:
            +            function( _imgUrl ){
            +                if( !_imgUrl ) return;
            +                this._view.update( _imgUrl );
            +                return this;
            +            }
            +        /**
            +         * 清除拖动的所有内容
            +         * @method  clean
            +         */
            +        , clean:
            +            function(){
            +                ImageCutter.cleanInfo();
            +                this._view.clean();
            +                this._model.clean();
            +                return this;
            +            }
            +        /**
            +         * 更新拖动位置
            +         * @method  updatePosition
            +         * @param   {object}    _size
            +         */
            +        , updatePosition: function(){ this._view.updatePosition.apply( this._view, JC.f.sliceArgs( arguments ) ); return this;}
            +        /**
            +         * 设置拖动信息
            +         * @method  _size
            +         * @param   {object}    _size
            +         * @protected
            +         */
            +        , _size: function(){ this._model.size.apply( this._model, JC.f.sliceArgs( arguments ) ); }
            +        /**
            +         * 向左移动, 移动步长为 ImageCutter.moveStep 定义的步长
            +         * @method  moveLeft
            +         */
            +        , moveLeft: function(){ this._view.moveLeft.apply( this._view, JC.f.sliceArgs( arguments ) ); }
            +        /**
            +         * 向上移动, 移动步长为 ImageCutter.moveStep 定义的步长
            +         * @method  moveUp
            +         */
            +        , moveUp: function(){ this._view.moveUp.apply( this._view, JC.f.sliceArgs( arguments ) ); }
            +        /**
            +         * 向右移动, 移动步长为 ImageCutter.moveStep 定义的步长
            +         * @method  moveRight
            +         */
            +        , moveRight: function(){ this._view.moveRight.apply( this._view, JC.f.sliceArgs( arguments ) ); }
            +        /**
            +         * 向下移动, 移动步长为 ImageCutter.moveStep 定义的步长
            +         * @method  moveDown
            +         */
            +        , moveDown: function(){ this._view.moveDown.apply( this._view, JC.f.sliceArgs( arguments ) ); }
            +    });
            +
            +    ImageCutter.Model._instanceName = 'JCImageCutter';
            +
            +    ImageCutter.Model.INITED = "ImageCutterInited";
            +    ImageCutter.Model.INIT_PREVIEW = "CICInitPreview";
            +    ImageCutter.Model.DRAG_DONE = "CICDragDone";
            +
            +    ImageCutter.Model.UPDATE_RECT = "CICUpdateDragger";
            +    ImageCutter.Model.UPDATE_PREVIEW = "CICUpdatePreview";
            +    ImageCutter.Model.UPDATE_COORDINATE = "CICUpdateCoordinate";
            +
            +    ImageCutter.Model.IMAGE_LOAD = 'CICImageLoad';
            +    ImageCutter.Model.LOAD_ERROR = 'CICImageLoadError';
            +
            +    ImageCutter.Model.ERROR = "CICError";
            +    ImageCutter.Model.ERROR_SIZE = "CICSizeError";
            +    ImageCutter.Model.ERROR_PREVIEW = "CICPreviewError";
            +
            +
            +    JC.f.extendObject( ImageCutter.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'ImageCutter.Model.init:', new Date().getTime() );
            +                var _p = this;
            +            }
            +
            +        , ready: 
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._ready = _setter );
            +                return this._ready;
            +            }
            +
            +        , imageUrl:
            +            function( _setter ){
            +                _setter && this.selector().attr( 'imageUrl', _setter );
            +                return this.attrProp( 'imageUrl' );
            +            }
            +
            +        , cicImageInitedCb: function(){ return this.callbackProp( 'cicImageInitedCb' ); }
            +
            +        , cicInitedCb: function(){ return this.callbackProp( 'cicInitedCb' ); }
            +        , cicDragDoneCb: function(){ return this.callbackProp( 'cicDragDoneCb' ); }
            +        , cicErrorCb: function(){ return this.callbackProp( 'cicErrorCb' ); }
            +        , cicLoadErrorCb: function(){ return this.callbackProp( 'cicLoadErrorCb' ); }
            +        , cicSizeErrorCb: function(){ return this.callbackProp( 'cicSizeErrorCb' ); }
            +        , cicPreviewSizeErrorCb: function(){ return this.callbackProp( 'cicPreviewSizeErrorCb' ); }
            +
            +        , previewSelector:
            +            function( _cleanCache ){
            +                if( this.is( '[previewSelector]' ) && ( !this._previewSelector || _cleanCache ) ){
            +                    this._previewSelector = this.selectorProp( 'previewSelector' );
            +                }
            +                return this._previewSelector;
            +            }
            +
            +        , minRectSidelength: function(){ return this.intProp( 'minRectSidelength' ) || ImageCutter.minRectSidelength; }
            +
            +        , minImageSidelength: function(){ return this.intProp( 'minImageSidelength' ) || ImageCutter.minImageSidelength; }
            +        , maxImageSidelength: function(){ return this.intProp( 'maxImageSidelength' ) || ImageCutter.maxImageSidelength; }
            +
            +        , minDistance:
            +            function(){
            +                return pointDistance( { x: 0, y: 0 }, { x: this.minRectSidelength(), y: this.minRectSidelength() } );
            +            }
            +
            +        , size: 
            +            function( _width, _height ){ 
            +
            +                if( _width && _height ){
            +                    this._size.img = { width: _width, height: _height };
            +
            +                    this._size.preview = { 'width': _width, 'height': _height };
            +                    if( _width > this._size.selector.width || _height > this._size.selector.height ){
            +                        this._size.preview = sizeZoom( _width, _height, this._size.selector.width, this._size.selector.height );
            +                    }
            +
            +                    this._size.preview.width = Math.round( this._size.preview.width );
            +                    this._size.preview.height = Math.round( this._size.preview.height );
            +
            +                    this._size.left = Math.round( ( this._size.selector.width - this._size.preview.width ) / 2 );
            +                    this._size.top = Math.round( ( this._size.selector.height - this._size.preview.height ) / 2 );
            +
            +                    this._size.width = _width;
            +                    this._size.height = _height;
            +
            +                    this._size.minX = this._size.left;
            +                    this._size.maxX = ( this._size.minX + this._size.preview.width );
            +
            +                    this._size.minY = this._size.top;
            +                    this._size.maxY = ( this._size.minY + this._size.preview.height );
            +
            +                    this._size.dragger = {
            +                        srcSidelength: 0
            +                        , sidelength: 0
            +                        , halfSidelength: 0
            +                        , left: 0
            +                        , top: 0
            +                    };
            +
            +                    //JC.log( this._size.left, this._size.top );
            +                }
            +
            +                if( _width && !_height ){
            +                    this._size = _width;
            +                }
            +
            +                return this._size; 
            +            }
            +
            +        , realCoordinate:
            +            function( _size ){
            +                var _r = [];
            +                //JC.log( 'ImageCutter._model.realCoordinate', new Date().getTime() );
            +                if( _size ){
            +                    var _p = this
            +                        , _percent = _size.img.width / _size.preview.width
            +                        , _left = ( _size.dragger.left - _size.left ) * _percent
            +                        , _top = ( _size.dragger.top - _size.top ) * _percent
            +                        , _sidelength = _size.dragger.srcSidelength * _percent
            +                        , _offset
            +                        ;
            +
            +                    _left = Math.ceil( _left );
            +                    _top = Math.ceil( _top );
            +                    _sidelength = Math.ceil( _sidelength );
            +
            +                    _left < 0 && ( _left = 0 );
            +                    _top < 0 && ( _top = 0 );
            +
            +                    ( _left + _sidelength ) > _size.img.width && ( _left = _size.img.width - _sidelength );
            +                    ( _top + _sidelength ) > _size.img.height && ( _top = _size.img.height - _sidelength );
            +
            +                    if( _sidelength > _size.img.width ){
            +                        _offset = _sidelength - _size.img.width;
            +                        _sidelength = _size.img.width;
            +                        _top !== 0 && ( _top += _offset );
            +                        _left += _offset;
            +                    }
            +
            +                    if( _sidelength > _size.img.height ){
            +                        _offset = _sidelength - _size.img.height;
            +                        _sidelength = _size.img.height;
            +                        _left !== 0 && ( _left += _offset );
            +                        _top += _offset;
            +                    }
            +
            +                    _r.push( _left, _top, _sidelength, _sidelength, _size.img.width, _size.img.height );
            +                }
            +                return _r;
            +            }
            +
            +        , cicCoordinateUpdateCb: function(){ return this.callbackProp( 'cicCoordinateUpdateCb' ); }
            +
            +        , clean: 
            +            function(){
            +                var _p = this;
            +                this._size ={
            +                    selector: { width: _p.selector().prop( 'offsetWidth' ), height: _p.selector().prop( 'offsetHeight' ) }
            +                    , img: { width: 0, height: 0 }
            +                    , preview: { width: 0, height: 0 }
            +                    , left: 0
            +                    , top: 0
            +                };
            +
            +                this.previewSelector()
            +                    && this.previewSelector().each( function(){
            +                            $( this ).html( '' );
            +                       });
            +
            +                this.coordinateSelector() && this.coordinateSelector().val( '' );
            +                this.imageUrlSelector() && this.imageUrlSelector().val( '' );
            +
            +                _p.ready( false );
            +            }
            +
            +        , draggerList:
            +            function(){
            +                if( !this._draggerList ){
            +                    this._draggerList = 
            +                        $( 
            +                            JC.f.printf( 
            +                                '{0}{1}{2}{3}{4}{5}{6}{7}{8}'
            +                                , '<button type="button" class="cic_btn cic_btnTl" diretype="cic_btnTl" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnTc" diretype="cic_btnTc" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnTr" diretype="cic_btnTr" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnMl" diretype="cic_btnMl" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnMr" diretype="cic_btnMr" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnBl" diretype="cic_btnBl" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnBc" diretype="cic_btnBc" ></button>'
            +                                , '<button type="button" class="cic_btn cic_btnBr" diretype="cic_btnBr" ></button>'
            +                            )
            +                         );
            +                    this._draggerList.hide().appendTo( this.selector() );
            +                }
            +                return this._draggerList;
            +            }
            +
            +        , btnTl:
            +            function(){
            +                !this._btnTl && ( this.draggerList(), this._btnTl =  this.selector().find( 'button.cic_btnTl' ) );
            +                return this._btnTl;
            +            }
            +
            +        , btnTc:
            +            function(){
            +                !this._btnTc && ( this.draggerList(), this._btnTc =  this.selector().find( 'button.cic_btnTc' ) );
            +                return this._btnTc;
            +            }
            +
            +        , btnTr:
            +            function(){
            +                !this._btnTr && ( this.draggerList(), this._btnTr =  this.selector().find( 'button.cic_btnTr' ) );
            +                return this._btnTr;
            +            }
            +
            +        , btnMl:
            +            function(){
            +                !this._btnMl && ( this.draggerList(), this._btnMl =  this.selector().find( 'button.cic_btnMl' ) );
            +                return this._btnMl;
            +            }
            +
            +        , btnMr:
            +            function(){
            +                !this._btnMr && ( this.draggerList(), this._btnMr =  this.selector().find( 'button.cic_btnMr' ) );
            +                return this._btnMr;
            +            }
            +
            +        , btnBl:
            +            function(){
            +                !this._btnBl && ( this.draggerList(), this._btnBl =  this.selector().find( 'button.cic_btnBl' ) );
            +                return this._btnBl;
            +            }
            +
            +        , btnBc:
            +            function(){
            +                !this._btnBc && ( this.draggerList(), this._btnBc =  this.selector().find( 'button.cic_btnBc' ) );
            +                return this._btnBc;
            +            }
            +
            +        , btnBr:
            +            function(){
            +                !this._btnBr && ( this.draggerList(), this._btnBr =  this.selector().find( 'button.cic_btnBr' ) );
            +                return this._btnBr;
            +            }
            +
            +        , maskList:
            +            function(){
            +                if( !this._maskList ){
            +                    this._maskList = 
            +                        $( 
            +                            JC.f.printf( 
            +                                '{0}{1}{2}{3}'
            +                                , '<div class="cic_mask cic_maskLeft"></div>'
            +                                , '<div class="cic_mask cic_maskTop"></div>'
            +                                , '<div class="cic_mask cic_maskRight"></div>'
            +                                , '<div class="cic_mask cic_maskBottom"></div>'
            +                            )
            +                         );
            +                    this._maskList.hide().appendTo( this.selector() );
            +                }
            +                return this._maskList;
            +            }
            +
            +        , maskLeft:
            +            function(){
            +                !this._maskLeft && ( this.maskList(), this._maskLeft =  this.selector().find( 'div.cic_maskLeft' ) );
            +                return this._maskLeft;
            +            }
            +
            +        , maskTop:
            +            function(){
            +                !this._maskTop && ( this.maskList(), this._maskTop =  this.selector().find( 'div.cic_maskTop' ) );
            +                return this._maskTop;
            +            }
            +
            +        , maskRight:
            +            function(){
            +                !this._maskRight && ( this.maskList(), this._maskRight =  this.selector().find( 'div.cic_maskRight' ) );
            +                return this._maskRight;
            +            }
            +
            +        , maskBottom:
            +            function(){
            +                !this._maskBottom && ( this.maskList(), this._maskBottom =  this.selector().find( 'div.cic_maskBottom' ) );
            +                return this._maskBottom;
            +            }
            +
            +        , dragMain:
            +            function(){
            +                if( !this._dragMain ){
            +                    this._dragMain = $( '<div class="cic_dragMain"></div>' );
            +                    this._dragMain.hide().appendTo( this.selector() );
            +                }
            +                return this._dragMain;
            +            }
            +
            +        , cicErrorBox:
            +            function(){
            +                if( !this._cicErrorBox ){
            +                    this._cicErrorBox = $( '<div class="CIC_ERROR"></div>' );
            +                    this._cicErrorBox.appendTo( this.selector() );
            +                }
            +                return this._cicErrorBox;
            +            }
            +
            +        , coordinateSelector: function(){ return this.selectorProp( 'coordinateSelector' ); }
            +
            +        , defaultCoordinate:
            +            function(){
            +                var _p = this, _r = '', _v = this.attrProp( 'defaultCoordinate' );
            +                if( _v ){
            +                    _r = _v.replace( /[^\d,\-]+/g, '' );
            +                    if( _r ){
            +                        _r = _r.split( ',' );
            +                        $.each( _r, function( _ix, _item ){
            +                            _r[ _ix ] = parseInt( _item, 10 );
            +                            //JC.log( 'aaa', _item, _r[ _ix ] );
            +                        });
            +                        //JC.log( _r );
            +                    }
            +                }
            +                return _r;
            +            }
            +
            +        , imageUrlSelector: function(){ return this.selectorProp( 'imageUrlSelector' ); }
            +    });
            +
            +    JC.f.extendObject( ImageCutter.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'ImageCutter.View.init:', new Date().getTime() );
            +                var _p = this;
            +            }
            +
            +        , clean:
            +            function(){
            +                this.selector().find( 'img' ).remove();
            +                this.selector().find( 'button' ).hide();
            +
            +                this._model.maskList().hide();
            +                this._model.cicErrorBox().hide();
            +            }
            +
            +        , update:
            +            function( _imgUrl ){
            +                if( !_imgUrl ) return;
            +                var _p = this, _img = document.createElement( 'img' ), _jimg = $( _img );
            +
            +                    _p.clean();
            +
            +                    _jimg.on( 'load', function(){
            +                        //JC.log( this.width, this.height );
            +                        _p.trigger( ImageCutter.Model.IMAGE_LOAD, [ _jimg, this.width, this.height] );
            +                    });
            +
            +                    _jimg.on( 'error', function(){
            +                        _p.trigger( ImageCutter.Model.LOAD_ERROR, [ _imgUrl ] );
            +                    });
            +
            +                    _jimg.on( 'mousedown', function( _evt ){ _evt.preventDefault(); return false; } );
            +                    _img.src =  _imgUrl;
            +            }
            +
            +        , initDragger:
            +            function( _size ){
            +                this._model.dragMain();
            +                this._model.maskList()
            +
            +                var _p = this
            +                    , _dragger = _p._model.draggerList()
            +                    , _sidelength = _size.preview.width > _size.preview.height ? _size.preview.height : _size.preview.width
            +                    , _sidelength = _sidelength / 2 > _p._model.minRectSidelength() ? _sidelength / 2 : _p._model.minRectSidelength()
            +                    , _sidelength = Math.ceil( _sidelength )
            +                    , _sidelength = _sidelength > _p._model.minRectSidelength() ? _sidelength : _p._model.minRectSidelength()
            +                    , _btnSize = _p._model.btnTl().width()
            +                    , _srcSidelength = _sidelength
            +                    , _sidelength = _sidelength - _btnSize
            +                    , _halfSidelength = _sidelength / 2
            +                    , _left = _size.left + ( _size.preview.width - _sidelength ) / 2 - _btnSize / 2
            +                    , _top = _size.top + ( _size.preview.height - _sidelength ) / 2 - _btnSize / 2
            +
            +                    ;
            +                //JC.log( 'initDragger', _sidelength, new Date().getTime() );
            +
            +                _size.dragger = {
            +                    srcSidelength: _srcSidelength
            +                    , sidelength: _sidelength
            +                    , halfSidelength: _halfSidelength
            +                    , left: _left
            +                    , top: _top
            +                };
            +
            +                _size = _p.processDefaultCoordinate( _size );
            +
            +                _p.updatePosition( _size );
            +            }
            +
            +        , processDefaultCoordinate:
            +            function( _size ){
            +                var _p = this
            +                    , _defaultCoordinate = _p._model.defaultCoordinate()
            +                    , _btnSize = _p._model.btnTl().width()
            +                    ;
            +
            +                if( _defaultCoordinate.length ){
            +                    var _srcSidelength = _size.dragger.srcSidelength
            +                        , _sidelength = _size.dragger.sidelength
            +                        , _halfSidelength = _size.dragger.halfSidelength
            +                        , _left = _size.left
            +                        , _top = _size.top
            +                        ;
            +
            +                    switch( _defaultCoordinate.length ){
            +                        case 1: {
            +                            _srcSidelength = _defaultCoordinate[0];
            +                            _left = _size.left + ( _size.preview.width - _srcSidelength ) / 2;
            +                            _top = _size.top + ( _size.preview.height - _srcSidelength ) / 2;
            +
            +                            break;
            +                        }
            +                        case 2: {
            +                            _left = _defaultCoordinate[0];
            +                            _top = _defaultCoordinate[1];
            +                            break;
            +                        }
            +                        case 3: {
            +                            _left = _defaultCoordinate[0] + _size.left;
            +                            _top = _defaultCoordinate[1] + _size.top;
            +                            _srcSidelength = _defaultCoordinate[2];
            +                            break;
            +                        }
            +                    }
            +                    //JC.log( [ _left, _top, 'xxx', _p.selector().attr(  'defaultCoordinate' ) ] );
            +
            +                    if( _srcSidelength > _size.preview.width || _srcSidelength > _size.preview.height ){
            +                        _srcSidelength = _size.preview.width > _size.preview.height 
            +                                            ? _size.preview.height
            +                                            : _size.preview.width;
            +                        _left = _size.left + ( _size.preview.width - _srcSidelength ) / 2;
            +                        _top = _size.top + ( _size.preview.height - _srcSidelength ) / 2;
            +                    }
            +
            +                    if( _left < _size.left 
            +                        || ( _left + _srcSidelength ) > ( _size.left + _size.preview.width ) 
            +                        || _top < _size.top
            +                        || ( _top + _srcSidelength ) > ( _size.top + _size.preview.height )
            +                    ){
            +                        _left = _size.left + ( _size.preview.width - _srcSidelength ) / 2;
            +                        _top = _size.top + ( _size.preview.height - _srcSidelength ) / 2;
            +                    }
            +
            +                    _sidelength = _srcSidelength - _btnSize;
            +                    _halfSidelength = _sidelength / 2;
            +
            +                    if( _srcSidelength < _p._model.minRectSidelength() ){
            +                        _srcSidelength = _p._model.minRectSidelength();
            +                        _sidelength = _srcSidelength - _btnSize;
            +                        _halfSidelength = _sidelength/ 2;
            +                        _left = _size.left + ( _p.preview.width - _srcSidelength ) / 2;
            +                        _top = _size.top + ( _p.preview.height - _srcSidelength ) / 2;
            +                    }
            +
            +                    _size.dragger = {
            +                        srcSidelength: _srcSidelength
            +                        , sidelength: _sidelength
            +                        , halfSidelength: _halfSidelength
            +                        , left: _left
            +                        , top: _top
            +                    };
            +
            +                }
            +
            +                return _size;
            +            }
            +
            +        , updatePosition:
            +            function( _size ){
            +                var _p = this;
            +                //JC.log( 'updatePosition', new Date().getTime() );
            +
            +                _p.updateDragger( _size );
            +                _p.updateMask( _size );
            +                _p.updateDragMain( _size );
            +
            +            }
            +
            +        , updateDragger:
            +            function( _size ){
            +                var _p = this;
            +
            +                _p._model.btnTl().css( { 'left': _size.dragger.left , 'top': _size.dragger.top } );
            +                _p._model.btnTc().css( { 'left': ( _size.dragger.left + _size.dragger.halfSidelength ), 'top': _size.dragger.top } );
            +                _p._model.btnTr().css( { 'left': ( _size.dragger.left + _size.dragger.sidelength ), 'top': _size.dragger.top } );
            +
            +                _p._model.btnMl().css( { 'left': _size.dragger.left
            +                                        , 'top': ( _size.dragger.top + _size.dragger.halfSidelength) } );
            +
            +                _p._model.btnMr().css( { 'left': _size.dragger.left + _size.dragger.sidelength
            +                                        , 'top': ( _size.dragger.top + _size.dragger.halfSidelength ) } );
            +
            +                _p._model.btnBl().css( { 'left': _size.dragger.left, 'top': _size.dragger.top + _size.dragger.sidelength } );
            +
            +                _p._model.btnBc().css( { 'left': _size.dragger.left + _size.dragger.halfSidelength
            +                                        , 'top': _size.dragger.top + _size.dragger.sidelength} );
            +
            +                _p._model.btnBr().css( { 'left': _size.dragger.left + _size.dragger.sidelength 
            +                                        , 'top': _size.dragger.top + _size.dragger.sidelength } );
            +
            +                _p._model.draggerList().show();
            +            }
            +
            +        , updateMask:
            +            function( _size ){
            +                var _p = this
            +                    , _maskList = _p._model.maskList()
            +                    ;
            +
            +                //JC.log( _size.dragger.left, _size.dragger.top, _size.dragger.srcSidelength );
            +
            +                _p._model.maskLeft().css( { 
            +                    'height': _size.dragger.srcSidelength
            +                    , 'width': _size.dragger.left
            +                    , 'top': _size.dragger.top
            +                    , 'left': 0
            +                });
            +
            +                _p._model.maskTop().css( { 
            +                    'height': _size.dragger.top
            +                    , 'width': _size.selector.width
            +                    , 'top': 0
            +                    , 'left': 0
            +                });
            +
            +                _p._model.maskRight().css( {
            +                    'left': _size.dragger.left + _size.dragger.srcSidelength
            +                    , 'top': _size.dragger.top
            +                    , 'width': _size.selector.width - _size.dragger.left - _size.dragger.srcSidelength
            +                    , 'height': _size.dragger.srcSidelength
            +                });
            +
            +                _p._model.maskBottom().css( { 
            +                    'height': _size.selector.height - (_size.dragger.top + _size.dragger.srcSidelength )
            +                    , 'width': _size.selector.width
            +                    , 'top': _size.dragger.top + _size.dragger.srcSidelength
            +                    , 'left': 0
            +                });
            +
            +                _maskList.show();
            +            }
            +
            +        , updateDragMain:
            +            function( _size ){
            +                var _p = this, _dragMain = _p._model.dragMain();
            +
            +                _dragMain.css({
            +                    'width': _size.dragger.srcSidelength 
            +                    , 'height': _size.dragger.srcSidelength
            +                    , 'left': _size.dragger.left
            +                    , 'top': _size.dragger.top
            +                });
            +
            +                _dragMain.show();
            +            }
            +
            +        , initPreviewItems:
            +            function(){
            +                var _p = this, _previewSelector = _p._model.previewSelector( true );
            +                if( !( _previewSelector && _previewSelector.length ) ) return;
            +                if( !_p._model.ready() ){
            +                    _previewSelector.each( function(){
            +                        var _sp = $( this ), _img = _sp.find( 'img' );
            +
            +                        if ( !_img.length ){
            +                            _img = $( JC.f.printf( '<img src="{0}" />', _p._model.imageUrl() ) );
            +                            _img.appendTo( _sp );
            +                        }else{
            +                            _img.attr( 'src', _p._model.imageUrl() );
            +                        }
            +                    });
            +                }
            +
            +                _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _p._model.size() ] );
            +            }
            +
            +        , updatePreviewItems:
            +            function( _size ){
            +                var _p = this
            +                    , _previewSelector = _p._model.previewSelector()
            +                    ;
            +
            +                if( !_size ) return;
            +                if( !( _previewSelector && _previewSelector.length ) ) return;
            +
            +                _previewSelector.each( function(){
            +                    var _sp = $( this )
            +                        , _width = _sp.width()
            +                        , _img = _sp.find( 'img' )
            +                        ;
            +
            +                    if( !( _width && _img.length ) ) return;
            +
            +                    var _width = _sp.width()
            +                        , _percent = _width / _size.dragger.srcSidelength
            +                        , _newWidth = Math.ceil( _size.preview.width * _percent )
            +                        , _newHeight = Math.ceil( _size.preview.height * _percent )
            +                        , _newLeft = Math.ceil( ( _size.dragger.left - _size.left ) * _percent )
            +                        , _newTop = Math.ceil( ( _size.dragger.top - _size.top ) * _percent )
            +                        ;
            +
            +                    _img.css( {
            +                        'width': _newWidth
            +                        , 'height': _newHeight
            +                        , 'left': -_newLeft
            +                        , 'top': -_newTop
            +                        , 'max-width': _newWidth
            +                        , 'min-width': _newWidth
            +                        , 'max-height': _newHeight
            +                        , 'min-height': _newHeight
            +                    });
            +
            +                });
            +            }
            +
            +        , moveLeft:
            +            function(){
            +                if( !this._model.ready() ) return;
            +                var _p = this, _size = _p._model.size(); 
            +                _size.dragger.left -= ImageCutter.moveStep;
            +                _size.dragger.left < _size.left && ( _size.dragger.left = _size.left );
            +                _p.updatePosition( _size );
            +                _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] );
            +                _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] );
            +            }
            +
            +        , moveUp:
            +            function(){
            +                if( !this._model.ready() ) return;
            +                var _p = this, _size = _p._model.size(); 
            +                _size.dragger.top -= ImageCutter.moveStep;
            +                _size.dragger.top < _size.top && ( _size.dragger.top = _size.top );
            +                _p.updatePosition( _size );
            +                _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] );
            +                _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] );
            +            }
            +
            +        , moveRight:
            +            function(){
            +                if( !this._model.ready() ) return;
            +                var _p = this, _size = _p._model.size(); 
            +                _size.dragger.left += ImageCutter.moveStep;
            +                ( _size.dragger.left + _size.dragger.srcSidelength ) > ( _size.left + _size.preview.width ) 
            +                    && ( _size.dragger.left = _size.left + _size.preview.width - _size.dragger.srcSidelength );
            +                _p.updatePosition( _size );
            +                _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] );
            +                _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] );
            +            }
            +
            +        , moveDown:
            +            function(){
            +                if( !this._model.ready() ) return;
            +                var _p = this, _size = _p._model.size(); 
            +                _size.dragger.top += ImageCutter.moveStep;
            +                ( _size.dragger.top + _size.dragger.srcSidelength ) > ( _size.top + _size.preview.height ) 
            +                    && ( _size.dragger.top = _size.top + _size.preview.height - _size.dragger.srcSidelength );
            +                _p.updatePosition( _size );
            +                _p.trigger( ImageCutter.Model.UPDATE_RECT, [ _size ] );
            +                _p.trigger( ImageCutter.Model.DRAG_DONE, [ _size ] );
            +            }
            +
            +        , sizeError:
            +            function( _width, _height, _img, _isMax ){
            +                var _sidelength, _word;
            +                if( _isMax ){
            +                    _sidelength = this._model.maxImageSidelength();
            +                    _word = '大';
            +                }else{
            +                    _sidelength = this._model.minImageSidelength();
            +                    _word = '小';
            +                }
            +                this._model.cicErrorBox().show().html(
            +                    JC.f.printf( 
            +                        '{5}<p>图片实际宽高为: {2}, {3}</p><p>可接受的最'+ _word +'宽高为: {0}, {1}</p>{4}'
            +                        , _sidelength, _sidelength
            +                        , _width, _height
            +                        , '<a href="' + _img.attr( 'src' ) + '" target="_blank">查看图片</a>'
            +                        , '<h3>图片尺寸错误 </h3>'
            +                    )
            +                );
            +            }
            +
            +        , previewError:
            +            function( _width, _height, _img, _newSize ){
            +                this._model.cicErrorBox().show().html(
            +                    JC.f.printf( 
            +                        '{5}<p>图片实际宽高为: {2}, {3}</p>'
            +                        + '<p>图片缩放后宽高为: {6}, {7}</p>'
            +                        + '<p>缩放后可接受的最小宽高为: {0}, {1}</p>{4}'
            +                        , this._model.minRectSidelength(), this._model.minRectSidelength()
            +                        , _width, _height
            +                        , '<a href="' + _img.attr( 'src' ) + '" target="_blank">查看图片</a>'
            +                        , '<h3>图片缩放比例错误 </h3>'
            +                        , _newSize.preview.width, _newSize.preview.height
            +                    )
            +                );
            +            }
            +
            +        , imageLoadError:
            +            function( _imgUrl){
            +                this._model.cicErrorBox().show().html(
            +                    JC.f.printf( '<p>无法加载图片<br/>请检查图片路径和网络链接</p><p>{0}</p>'
            +                        , _imgUrl
            +                    )
            +                );
            +            }
            +
            +    });
            +
            +    ImageCutter.resizeTopLeft =
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _maxX = _di.size.dragger.left + _di.size.dragger.srcSidelength 
            +                , _maxY = _di.size.dragger.top + _di.size.dragger.srcSidelength
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: 0, y: -ImageCutter._positionPoint } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: 0, y: -ImageCutter._positionPoint } ) )
            +                , _distance = _srcDist - _curDist
            +                , _sidelength = _di.size.dragger.srcSidelength + _distance
            +                ;
            +
            +            if( ( _maxY - _sidelength ) < _di.size.top ){
            +                _sidelength = _maxY - _di.size.top;
            +            }
            +
            +            if( ( _maxX - _sidelength ) < _di.size.left ){
            +                _sidelength = _maxX - _di.size.left;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _maxX - _sidelength
            +                , top: _maxY - _sidelength
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeTopCenter =
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _maxX = _di.size.left + _di.size.preview.width
            +                , _maxY = _di.size.dragger.top + _di.size.dragger.srcSidelength
            +                , _midX = _di.size.dragger.left + ( _di.size.dragger.srcSidelength ) / 2
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: _di.pageX, y: -ImageCutter._positionPoint } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: _di.pageX, y: -ImageCutter._positionPoint } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength + _distance
            +                ;
            +
            +            if( ( _maxY - _sidelength ) < _di.size.top ){
            +                _sidelength = _maxY - _di.size.top;
            +            }
            +
            +            if( ( _midX - _sidelength / 2 ) < _di.size.left ){
            +                _sidelength = ( _midX - _di.size.left ) * 2;
            +            }
            +
            +            if( ( _midX + _sidelength / 2 ) > _maxX ){
            +                _sidelength = ( _maxX - _midX ) * 2;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _midX - _sidelength / 2
            +                , top: _maxY - _sidelength
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeTopRight =
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _minX = _di.size.dragger.left
            +                , _maxY = _di.size.dragger.top + _di.size.dragger.srcSidelength
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: ImageCutter._positionPoint, y: 0 } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: ImageCutter._positionPoint, y: 0 } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength + _distance
            +                ;
            +
            +            if( ( _maxY - _sidelength ) < _di.size.top ){
            +                _sidelength = _maxY - _di.size.top;
            +            }
            +
            +            if( ( _minX + _sidelength ) > ( _di.size.left + _di.size.preview.width ) ){
            +                _sidelength = ( _di.size.left + _di.size.preview.width ) - _minX;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _minX
            +                , top: _maxY - _sidelength
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeMidLeft =
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _maxX = _di.size.dragger.left + _di.size.dragger.srcSidelength
            +                , _midY = _di.size.dragger.top + _di.size.dragger.srcSidelength / 2
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: -ImageCutter._positionPoint, y: _di.pageY } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: -ImageCutter._positionPoint, y: _di.pageY } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength + _distance
            +                ;
            +
            +            if( ( _midY - _sidelength / 2 ) < _di.size.top ){
            +                _sidelength = ( _midY - _di.size.top ) * 2;
            +            }
            +
            +            if( ( _midY + _sidelength / 2 ) > ( _di.size.top + _di.size.preview.height ) ){
            +                _sidelength = ( _di.size.top + _di.size.preview.height - _midY ) * 2;
            +            }
            +
            +            if( ( _maxX - _sidelength ) < _di.size.left ){
            +                _sidelength = _maxX - _di.size.left;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _maxX - _sidelength
            +                , top: _midY - _sidelength / 2
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeMidRight =
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _minX = _di.size.dragger.left
            +                , _midY = _di.size.dragger.top + _di.size.dragger.srcSidelength / 2
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: ImageCutter._positionPoint, y: _di.pageY } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: ImageCutter._positionPoint, y: _di.pageY } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength + _distance
            +                ;
            +
            +            if( ( _midY - _sidelength / 2 ) < _di.size.top ){
            +                _sidelength = ( _midY - _di.size.top ) * 2;
            +            }
            +
            +            if( ( _midY + _sidelength / 2 ) > ( _di.size.top + _di.size.preview.height ) ){
            +                _sidelength = ( _di.size.top + _di.size.preview.height - _midY ) * 2;
            +            }
            +
            +            if( ( _minX + _sidelength ) > ( _di.size.left + _di.size.preview.width ) ){
            +                _sidelength = _di.size.left + _di.size.preview.width - _minX;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _minX
            +                , top: _midY - _sidelength / 2
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeBottomLeft=
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _maxX = _di.size.dragger.left + _di.size.dragger.srcSidelength
            +                , _maxY = _di.size.dragger.top
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: ImageCutter._positionPoint, y: 0 } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: ImageCutter._positionPoint, y: 0 } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength - _distance
            +                ;
            +
            +            if( ( _maxY + _sidelength ) > ( _di.size.top + _di.size.preview.height ) ){
            +                _sidelength = ( _di.size.top + _di.size.preview.height ) - _maxY;
            +            }
            +
            +            if( ( _maxX - _sidelength ) < _di.size.left ){
            +                _sidelength = _maxX - _di.size.left;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _maxX - _sidelength
            +                , top: _maxY
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeBottomCenter=
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _minY = _di.size.dragger.top
            +                , _midX = _di.size.dragger.left + _di.size.dragger.srcSidelength / 2
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: _di.pageX, y: -ImageCutter._positionPoint } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: _di.pageX, y: -ImageCutter._positionPoint } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength - _distance
            +                ;
            +
            +            if( ( _minY + _sidelength ) > ( _di.size.top + _di.size.preview.height ) ){
            +                _sidelength = ( _di.size.top + _di.size.preview.height ) - _minY;
            +            }
            +
            +            if( ( _midX - _sidelength / 2 ) < _di.size.left ){
            +                _sidelength = ( _midX - _di.size.left ) * 2;
            +            }
            +
            +            if( ( _midX + _sidelength / 2 ) > ( _di.size.left + _di.size.preview.width ) ){
            +                _sidelength = ( _di.size.left + _di.size.preview.width - _midX ) * 2;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _midX - _sidelength / 2
            +                , top: _minY
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    ImageCutter.resizeBottomRight=
            +        function( _di, _posX, _posY, _evt ){
            +            if( !_di ) return;
            +            var _p = _di.ins
            +                , _minX = _di.size.dragger.left
            +                , _minY = _di.size.dragger.top
            +                , _srcDist = Math.ceil( pointDistance( { x: _di.pageX, y: _di.pageY }
            +                            , { x: 0, y: -ImageCutter._positionPoint } ) )
            +                , _curDist = Math.ceil( pointDistance( { x: _evt.pageX, y: _evt.pageY }
            +                            , { x: 0, y: -ImageCutter._positionPoint } ) )
            +                , _distance = ( _srcDist - _curDist )
            +                , _sidelength = _di.size.dragger.srcSidelength - _distance
            +                ;
            +
            +            if( ( _minX + _sidelength ) > ( _di.size.left + _di.size.preview.width ) ){
            +                _sidelength = ( _di.size.left + _di.size.preview.width ) - _minX;
            +            }
            +
            +            if( ( _minY + _sidelength ) > ( _di.size.top + _di.size.preview.height ) ){
            +                _sidelength = ( _di.size.top + _di.size.preview.height ) - _minY;
            +            }
            +
            +            _sidelength = _sidelength < _p._model.minRectSidelength() ? _p._model.minRectSidelength() : _sidelength;
            +
            +            _di.tmpSize.dragger = {
            +                srcSidelength: _sidelength
            +                , sidelength: _sidelength - _di.btnSidelength
            +                , halfSidelength: ( _sidelength - _di.btnSidelength ) / 2
            +                , left: _minX
            +                , top: _minY
            +            };
            +
            +           _p.updatePosition( _di.tmpSize );
            +        };
            +
            +    /**
            +     * 初始化实例时触发的事件
            +     * @event   ImageCutterInited
            +     */
            +    /**
            +     * 初始化预览时触发的事件
            +     * @event   CICInitPreview
            +     */
            +    /**
            +     * 拖动完成时触发的事件
            +     * @event   CICDragDone
            +     */
            +    /**
            +     * 更新拖动块时触发的事件
            +     * @event   CICUpdateDragger
            +     */
            +    /**
            +     * 更新预览时触发的事件
            +     * @event   CICUpdatePreview
            +     */
            +    /**
            +     * 更新坐标值时触发的事件
            +     * @event   CICUpdateCoordinate
            +     */
            +    /**
            +     * 图片加载完毕时触发的事件
            +     * @event   CICImageLoad
            +     */
            +    /**
            +     * 图片加载失败时触发的事件
            +     * @event   CICImageLoadError
            +     */
            +    /**
            +     * 发生错误时触发的事件
            +     * @event   CICError
            +     */
            +    /**
            +     * 图片大小不符合要求时触发的事件
            +     * @event   CICSizeError
            +     */
            +    /**
            +     * 图片缩放后大小不符合要求时触发的事件
            +     * @event   CICPreviewError
            +     */
            +    /**
            +     * 按比例缩放图片
            +     * <br />返回: { width: int, height: int }
            +     * @param   {int}   _w
            +     * @param   {int}   _h
            +     * @param   {int}   _newWidth
            +     * @param   {int}   _newHeight
            +     * @return  {object}    width, height
            +     */
            +    function sizeZoom( _w, _h, _newWidth, _newHeight ){
            +        var w, h;
            +        
            +        if( _w > _newWidth && ( _h < _w )){
            +            w = _newWidth;
            +            h = _h - ( _h / ( _w / ( _w - _newWidth ) ) );
            +        }else if( _h > _newHeight && ( _h > _w ) ){
            +            w = _w - ( _w / ( _h / ( _h - _newHeight ) ) );
            +            h = _newHeight;
            +        }else{
            +            w = _newWidth; 
            +            h = _newHeight;
            +        }
            +        return { 'width': w, 'height': h };
            +    }
            +    /**
            +     * 计算两个坐标点之间的距离
            +     */
            +    function pointDistance( _p1, _p2 ){
            +        var _dx = _p2.x - _p1.x
            +            , _dy = _p2.y - _p1.y
            +            , _dist = Math.sqrt( _dx * _dx + _dy * _dy );
            +            ;
            +        return _dist;
            +    }
            +    /**
            +     * 从长度和角度求坐标点
            +     */
            +    function distanceAngleToPoint( _distance, _angle){
            +        var _radian = _angle * Math.PI / 180;					
            +        return {
            +            x: parseInt( Math.cos( _radian  ) * _distance )
            +            , y: parseInt( Math.sin( _radian ) * _distance )
            +        }
            +    }
            +
            +    _jdoc.ready( function(){
            +        _jbody = $( 'body' );
            +        ImageCutter._defaultCursor = _jbody.css( 'cursor' );
            +        ImageCutter.autoInit && ImageCutter.init();
            +        _jwin.on( 'keydown', ImageCutter.defaultKeydown );
            +    });
            +
            +    return JC.ImageCutter;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_LunarCalendar_LunarCalendar.default.js.html b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.default.js.html new file mode 100644 index 000000000..d0f2aa5cd --- /dev/null +++ b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.default.js.html @@ -0,0 +1,1427 @@ + + + + + ../comps/LunarCalendar/LunarCalendar.default.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/LunarCalendar/LunarCalendar.default.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +    ///
            +    /// TODO: 添加事件响应机制
            +    ///
            +    JC.LunarCalendar = window.LunarCalendar = LunarCalendar;
            +    /**
            +     * 农历日历组件
            +     * <br />全局访问请使用 JC.LunarCalendar 或 LunarCalendar
            +     * <p><b>require</b>: 
            +     *      <a href='.jQuery.html'>jQuery</a>
            +     *      , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.LunarCalendar.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/LunarCalendar/_demo/' target='_blank'>demo link</a></p>
            +     * <p>
            +     * DOM 加载完毕后
            +     * <br />会自动初始化页面可识别的node, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar
            +     * <br />Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 JC.LunarCalendar.init( _selector );
            +     * </p>
            +     *
            +     * <h2>可用的 HTML attribute</h2>
            +     * <dl>
            +     *      <dt>clcDate = date string</dt>
            +     *      <dd>设置日历的默认日期</dd>
            +     *
            +     *      <dt>minvalue = date string</dt>
            +     *      <dd>设置日历的有效最小选择范围, 格式YYYY-mm-dd</dd>
            +     *
            +     *      <dt>maxvalue = date string</dt>
            +     *      <dd>设置日历的有效最大选择范围, 格式YYYY-mm-dd</dd>
            +     *
            +     *      <dt>hidecontrol = bool, default = false</dt>
            +     *      <dd>是否隐藏日历将操作控件</dd>
            +     *
            +     *      <dt>nopreviousfestivals = bool, default = false</dt>
            +     *      <dd>不显示上个月的节日</dd>
            +     *
            +     *      <dt>nonextfestivals = bool, default = false</dt>
            +     *      <dd>不显示下个月的节日</dd>
            +     *
            +     *      <dt>clcSelectedItemCb = function, <b>window变量域</b></dt>
            +     *      <dd>选择日期时触发的回调
            +<pre>function clcSelectedItemCb1( _date, _td, _a ){
            +    var _ins = this;
            +    JC.log( _date );
            +}</pre>
            +     *      </dd>
            +     * </dl> 
            +     *
            +     * @namespace JC
            +     * @class LunarCalendar
            +     * @constructor
            +     * @param   {selector}  _selector   指定要显示日历的选择器, 如果不显示指定该值, 默认为 document.body
            +     * @param   {date}      _date       日历的当前日期, 如果不显示指定该值, 默认为当天
            +     * @version dev 0.1
            +     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            +     * @date    2013-06-13
            +     */
            +    function LunarCalendar( _selector, _date ){
            +        _selector && ( _selector = $(_selector) );
            +        !(_selector && _selector.length) && ( _selector = $(document.body) );
            +        !_date && ( _date = new Date() );
            +
            +        if( JC.BaseMVC.getInstance( _selector, LunarCalendar ) ) 
            +            return JC.BaseMVC.getInstance( _selector, LunarCalendar );
            + 
            +        JC.BaseMVC.getInstance( _selector, LunarCalendar, this );
            +
            +        JC.log( 'LunarCalendar.constructor' );
            +        /**
            +         * LunarCalendar 的数据模型对象
            +         * @property    _model
            +         * @type    JC.LunarCalendar.Model
            +         * @private
            +         */
            +        this._model = new Model( _selector, _date );
            +        /**
            +         * LunarCalendar 的视图对像
            +         * @property    _view
            +         * @type    JC.LunarCalendar.View
            +         * @private
            +         */
            +        this._view = new View( this._model );
            +        
            +        this._init();
            +    }
            +    LunarCalendar.Model = Model;
            +    LunarCalendar.View = View;
            +    /**
            +     * 自定义日历组件模板
            +     * <p>默认模板为JC.LunarCalendar.Model#tpl</p>
            +     * <p>如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板</p>
            +     * @property    tpl
            +     * @type    {string}
            +     * @default empty
            +     * @static
            +     */
            +    LunarCalendar.tpl;
            +    /**
            +     * 设置是否在 dom 加载完毕后, 自动初始化所有日期控件
            +     * @property    autoinit
            +     * @default true
            +     * @type    {bool}
            +     * @static
            +            <script>JC.LunarCalendar.autoInit = true;</script>
            +     */
            +     LunarCalendar.autoInit = true
            +    /**
            +     * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年
            +     * @property    defaultYearSpan
            +     * @type        {int}
            +     * @default     20
            +     * @static
            +            <script>JC.LunarCalendar.defaultYearSpan = 20;</script>
            +     */
            +    LunarCalendar.defaultYearSpan = 20
            +    /**
            +     * 从所有的LunarCalendar取得当前选中的日期
            +     * <br /> 如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined
            +     * @method  getSelectedItemGlobal
            +     * @static
            +     * @return  {Object|undefined}  如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td }
            +     */
            +    LunarCalendar.getSelectedItemGlobal = 
            +        function(){
            +            var _r;
            +            $('div.UXCLunarCalendar table.UTableBorder td.cur a').each( function(){
            +                var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm );
            +                _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') };
            +                return false;
            +            });
            +            if( !_r ){
            +                $('div.UXCLunarCalendar table.UTableBorder td.today a').each( function(){
            +                var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm );
            +                    _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') };
            +                    return false;
            +                });
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 初始化可识别的 LunarCalendar 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of LunarCalendarInstance}
            +     */
            +    LunarCalendar.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            + 
            +            if( _selector && _selector.length ){
            +                if( _selector.hasClass( 'js_LunarCalendar' )  ){
            +                    _r.push( new LunarCalendar( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar' ).each( function(){
            +                        _r.push( new LunarCalendar( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 从所有的LunarCalendar取得当前选中日期的日期对象
            +     * <br /> 如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined
            +     * @method  getSelectedDateGlobal
            +     * @static
            +     * @return  {date|undefined}    
            +     */
            +    LunarCalendar.getSelectedDateGlobal = 
            +        function(){
            +            var _r, _tmp = LunarCalendar.getSelectedItemGlobal();
            +            if( _tmp && _tmp.date ) _r = _tmp.date;
            +            return _r;
            +        };
            +    /**
            +     * 从时间截获取选择器对象
            +     * @method  getItemByTimestamp
            +     * @static
            +     * @param   {int}                   _tm     时间截, 如果时间截少于13位, 将自动补0到13位, ps: php时间截为10位
            +     * @return  {selector|undefined}    td selector, 如果 td class unable 不可选, 将忽略
            +     */
            +    LunarCalendar.getItemByTimestamp =
            +        function( _tm ){
            +            var _r, _tmp;
            +            if( _tm ){
            +                _tm += '';
            +                (_tm.length < 13) && (_tm += new Array( 13 - _tm.length + 1 ).join('0'));
            +                $('div.UXCLunarCalendar table.UTableBorder td a[date='+_tm+']').each( function(){
            +                    _tmp = $(this).parent('td');
            +                    if( !_tmp.hasClass('unable') ){
            +                        _r = _tmp;
            +                        return false;
            +                    }
            +                });
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 添加或者清除工作日样式
            +     * @method  workday
            +     * @static
            +     * @param   {selector}      _td         要设置为工作日状态的 td 
            +     * @param   {any}           _customSet  如果 _customSet 为 undefined, 将设为工作日. 
            +     *                                      如果 _customSet 非 undefined, 那么根据真假值判断清除工作日/添加工作日
            +     */
            +    LunarCalendar.workday =
            +        function( _td, _customSet ){
            +            _td = $( _td );
            +            if( typeof _customSet != 'undefined' ){
            +                _customSet && _td.removeClass( 'xiuxi' ).addClass( 'shangban' );
            +                !_customSet && _td.removeClass( 'shangban' );
            +            }else _td.removeClass( 'xiuxi' ).addClass( 'shangban' );
            +        };
            +    /**
            +     * 判断 td 是否为工作日状态
            +     * @method  isWorkday
            +     * @static
            +     * @param   {selector}  _td 
            +     * @return  {bool}
            +     */
            +    LunarCalendar.isWorkday =
            +        function( _td ){
            +            _td = $( _td );
            +            return _td.hasClass( 'shangban' );
            +        };
            +    /**
            +     * 添加或者清除假日样式
            +     * @method  holiday
            +     * @static
            +     * @param   {selector}      _td         要设置为假日状态的 td 
            +     * @param   {any}           _customSet  如果 _customSet 为 undefined, 将设为假日. 
            +     *                                      如果 _customSet 非 undefined, 那么根据真假值判断清除假日/添加假日
            +     */
            +    LunarCalendar.holiday =
            +        function( _td, _customSet ){
            +            _td = $( _td );
            +            if( typeof _customSet != 'undefined' ){
            +                _customSet && _td.addClass( 'xiuxi' ).removeClass( 'shangban' );
            +                !_customSet && _td.removeClass( 'xiuxi' );
            +            }else _td.addClass( 'xiuxi' ).removeClass( 'shangban' );
            +        };
            +    /**
            +     * 判断 td 是否为假日状态
            +     * @method  isHoliday
            +     * @static
            +     * @param   {selector}  _td 
            +     * @return  {bool}
            +     */
            +    LunarCalendar.isHoliday =
            +        function( _td ){
            +            _td = $( _td );
            +            return _td.hasClass( 'xiuxi' );
            +        };
            +    /**
            +     * 添加或者清除注释
            +     * @method  comment
            +     * @static
            +     * @param   {selector}      _td         要设置注释的 td 
            +     * @param   {string|bool}   _customSet  如果 _customSet 为 undefined, 将清除注释. 
            +     *                                      如果 _customSet 为 string, 将添加注释
            +     */
            +    LunarCalendar.comment =
            +        function( _td, _customSet ){
            +            var _comment;
            +            _td = $( _td );
            +
            +            if( typeof _customSet == 'string' ){
            +                _comment = _customSet;
            +            }
            +
            +            if( typeof _comment != 'undefined' ){
            +                _td.addClass( 'zhushi' );
            +                LunarCalendar.commentTitle( _td, _comment );
            +                _td.find('a').attr('comment', _comment);
            +            }else{
            +                _td.removeClass( 'zhushi' );
            +                _td.find('a').removeAttr('comment');
            +                LunarCalendar.commentTitle( _td );
            +            }
            +        };
            +    /**
            +     * 判断 td 是否为注释状态
            +     * @method  isComment
            +     * @static
            +     * @param   {selector}  _td 
            +     * @return  {bool}
            +     */
            +    LunarCalendar.isComment =
            +        function( _td ){
            +            _td = $( _td );
            +            return _td.hasClass( 'zhushi' );
            +        };
            +    /**
            +     * 返回 td 的注释
            +     * @method  getComment
            +     * @static
            +     * @param   {selector}  _td 
            +     * @return  {string}
            +     */
            +    LunarCalendar.getComment =
            +        function( _td ){
            +            var _r = '';
            +            if( _td && _td.length ){
            +                _r = _td.find('a').attr('comment') || '';
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 用于分隔默认title和注释的分隔符
            +     * @property    commentSeparator
            +     * @type    string
            +     * @default ==========comment==========
            +     * @static
            +     */
            +    LunarCalendar.commentSeparator = '==========comment==========';
            +    /**
            +     * 把注释添加到 a title 里
            +     * @method  commentTitle
            +     * @static
            +     * @param   {selector}          _td     要设置注释的 a 父容器 td 
            +     * @param   {string|undefined}  _title  如果 _title 为真, 将把注释添加到a title里. 
            +     *                                      如果 _title 为假, 将从 a title 里删除注释
            +     */
            +    LunarCalendar.commentTitle =
            +        function( _td, _title ){
            +            var _a = _td.find( 'a' ), _hasDataTitle = _a.is( '[datatitle]' );
            +
            +            if( _title ){
            +                _title = LunarCalendar.commentSeparator + '\n'+_title;
            +                if( _hasDataTitle ){
            +                    _title = _a.attr('datatitle') + '\n' + _title;
            +                }
            +                _a.attr('title', _title);
            +            }else{
            +                if( _hasDataTitle ){
            +                    _a.attr('title', _a.attr('datatitle') );
            +                }else{
            +                    _a.removeAttr('title');
            +                }
            +            }
            +        };
            +    /**
            +     * 从JSON数据更新日历状态( 工作日, 休息日, 注释 )
            +     * <br /> 注意, 该方法更新页面上所有的 LunarCalendar 
            +     * @method  updateStatus
            +     * @static
            +     * @param   {Object}    _data   { phpTimestamp:{ dayaction: 0|1|2, comment: string}, ... }
            +     *<pre>      
            +     *          dayaction: 
            +     *          0: delete workday/holiday
            +     *          1: workday
            +     *          2: holiday
            +     *</pre>
            +     * @example
            +     *      LunarCalendar.updateStatus(  {
            +                                            "1369843200": {
            +                                                "dayaction": 2,
            +                                                "comment": "dfdfgdsfgsdfgsdg<b></b>'\"'asdf\"\"'sdf"
            +                                            },
            +                                            "1370966400": {
            +                                                "dayaction": 0,
            +                                                "comment": "asdfasdfsa"
            +                                            },
            +                                            "1371139200": {
            +                                                "dayaction": 1
            +                                            },
            +                                            "1371225600": {
            +                                                "dayaction": 0,
            +                                                "comment": "dddd"
            +                                            }
            +                                        });
            +     */
            +    LunarCalendar.updateStatus =
            +        function( _data ){
            +            if( !_data ) return;
            +            $('div.UXCLunarCalendar').each( function(){
            +                var _p = $(this), _ins = JC.BaseMVC.getInstance( _p, LunarCalendar ), _tmp;
            +                var _min = 0, _max = 3000000000000;
            +                if( _ins.getContainer().is('[nopreviousfestivals]') ){
            +                    _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime();
            +                }
            +                if( _ins.getContainer().is('[nonextfestivals]') ){
            +                    _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime();
            +                }
            +                //JC.log( _ins, _min, _max );
            +
            +                var _k, _item, _finalk, _itema, _itemtd;
            +                for( var _k in _data ){
            +                    _item = _data[_k];
            +                    _finalk = _k + '';
            +                    _finalk.length < 13 && (_finalk += new Array( 13 - _finalk.length + 1 ).join('0'));
            +                    if( !(_finalk >= _min &&  _finalk < _max) ) continue;
            +
            +                    _itema = _p.find('table.UTableBorder td > a[date='+_finalk+']');
            +                    if( !_itema.length ) continue;
            +                    _itemtd = _itema.parent( 'td' );
            +
            +                    if( 'dayaction' in _item ){
            +                        switch( _item.dayaction ){
            +                            case 1:
            +                                {
            +                                    LunarCalendar.workday( _itemtd );
            +                                    break;
            +                                }
            +
            +                            case 2:
            +                                {
            +                                    LunarCalendar.holiday( _itemtd );
            +                                    break;
            +                                }
            +
            +                            default:
            +                                {
            +                                    LunarCalendar.workday(_itemtd, 0);
            +                                    LunarCalendar.holiday(_itemtd, 0);
            +                                    break;
            +                                }
            +                        }
            +                    }
            +
            +                    if( 'comment' in _item ){
            +                        LunarCalendar.comment( _itemtd, _item['comment'] );
            +                    }
            +                }
            +            });
            +        };
            +
            +    LunarCalendar.prototype = {
            +        /**
            +         * LunarCalendar 内部初始化
            +         * @method  _init
            +         * @private
            +         */
            +        _init:
            +            function(){
            +                var _p = this;
            +
            +                $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){
            +                    _p.on( _evtName, _cb );
            +                });
            + 
            +                $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){
            +                    var _data = JC.f.sliceArgs( arguments ).slice( 2 );
            +                    _p.trigger( _evtName, _data );
            +                });
            +
            +                _p.on( 'CLCSelectedItem', function( _evt, _date, _td, _a ){
            +                    //JC.log( _date, _td, _a );
            +                    _p._model.clcSelectedItemCb()
            +                        && _p._model.clcSelectedItemCb().call( _p, _date, _td, _a );
            +                });
            +
            +                _p._model.init();
            +                _p._view.init();
            +
            +                _p._view.layout.data( Model._instanceName, _p );
            +                
            +                return this;
            +            }    
            +        /**
            +         * 更新日历视图为自定义的日期
            +         * @method  update
            +         * @param   {date}  _date   更新日历视图为 _date 所在日期的月份
            +         */
            +        , update:
            +            function( _date ){
            +                if( !_date ) return;
            +                this._view.initLayout( _date );
            +            }
            +        /**
            +         * 显示下一个月的日期
            +         * @method  nextMonth
            +         */
            +        , nextMonth: 
            +            function(){
            +                var _date = this._model.getDate().date;
            +                _date.setMonth( _date.getMonth() + 1 );
            +                this._view.initLayout( _date );
            +            }
            +        /**
            +         * 显示上一个月的日期
            +         * @method  preMonth
            +         */
            +        , preMonth:
            +            function(){
            +                var _date = this._model.getDate().date;
            +                _date.setMonth( _date.getMonth() - 1 );
            +                this._view.initLayout( _date );
            +            }
            +        /**
            +         * 显示下一年的日期
            +         * @method  nextYear
            +         */
            +        , nextYear: 
            +            function(){
            +                var _date = this._model.getDate().date;
            +                _date.setFullYear( _date.getFullYear() + 1 );
            +                this._view.initLayout( _date );
            +            }
            +        /**
            +         * 显示上一年的日期
            +         * @method  preYear
            +         */
            +        , preYear: 
            +            function(){
            +                var _date = this._model.getDate().date;
            +                _date.setFullYear( _date.getFullYear() - 1 );
            +                this._view.initLayout( _date );
            +            }
            +        /**
            +         * 获取默认时间对象
            +         * @method  getDate
            +         * @return  {date}  
            +         */
            +        , getDate: function(){ return this._model.getDate().date;  }
            +        /**
            +         * 获取所有的默认时间对象
            +         * @method getAllDate
            +         * @return  {object}    { date: 默认时间, minvalue: 有效最小时间
            +         *                        , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 }
            +         */
            +        , getAllDate: function(){ return this._model.getDate();  }
            +        /**
            +         * 获取当前选中的日期, 如果用户没有显式选择, 将查找当前日期, 如果两者都没有的话返回undefined
            +         * @method  getSelectedDate
            +         * @return  {date}
            +         */
            +        , getSelectedDate: function(){
            +            var _r;
            +            this._view.layout.find( 'td.cur a').each( function(){
            +                var _tm = $(this).attr('date');
            +                _r = new Date();
            +                _r.setTime( _tm );
            +                return false;
            +            });
            +            if( !_r ){
            +               this._view.layout.find( 'td.today a').each( function(){
            +                    var _tm = $(this).attr('date');
            +                    _r = new Date();
            +                    _r.setTime( _tm );
            +                    return false;
            +                });
            +            }
            +            return _r;
            +        }
            +        /**
            +         * 获取初始化日历的选择器对象
            +         * @method  getContainer
            +         * @return  selector
            +         */
            +        , getContainer: function(){ return this._model.container; }
            +        /**
            +         * 获取日历的主选择器对象
            +         * @method  getLayout
            +         * @return  selector
            +         */
            +        , getLayout: function(){ return this._view.layout; }
            +        /**
            +         * 判断日历是否隐藏操作控件
            +         * @method  isHideControl
            +         * @return  bool
            +         */
            +        , isHideControl: function(){ return this._model.hideControl; }
            +        /**
            +         * 使用 jquery on 绑定事件
            +         * @method  {string}    on
            +         * @param   {string}    _evtName
            +         * @param   {function}  _cb
            +         * @return  BaseMVCInstance
            +         */
            +        , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;}
            +        /**
            +         * 使用 jquery trigger 触发绑定事件
            +         * @method  {string}    trigger
            +         * @param   {string}    _evtName
            +         * @return  BaseMVCInstance
            +         */
            +        , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;}
            +    }
            +    /**
            +     * 选择日期时触发的事件
            +     * @event CLCSelectedItem
            +     */
            +    /**
            +     * LunarCalendar 视图类
            +     * @namespace   JC.LunarCalendar
            +     * @class   View
            +     * @constructor
            +     * @param   {JC.LunarCalendar.Model}   _model
            +     */
            +    function View( _model ){
            +        /**
            +         * LunarCalendar model 对象
            +         * @property    _model
            +         * @type    JC.LunarCalendar.Model
            +         * @private
            +         */
            +        this._model = _model;
            +        /**
            +         * LunarCalendar 的主容器
            +         * @property    layout
            +         * @type    selector
            +         */
            +        this.layout;
            +    }
            +    
            +    View.prototype = {
            +        /**
            +         * 初始化 View
            +         * @method  _init
            +         * @private
            +         */
            +        init:
            +            function()
            +            {
            +                this.layout = this._model.layout;
            +                this.initLayout();
            +                return this;
            +            }
            +        /**
            +         * 初始化日历外观
            +         * @method  initLayout
            +         * @param   {date}  _date
            +         */
            +        , initLayout:
            +            function( _date ){
            +                var _dateObj = this._model.getDate();
            +                if( _date ) _dateObj.date = _date;
            +                this.layout.find('table.UTableBorder tbody').html('');
            +
            +                this.initYear( _dateObj );
            +                this.initMonth( _dateObj );
            +                this.initMonthDate( _dateObj );
            +            }
            +        /**
            +         * 初始化年份
            +         * @method  initYear
            +         * @param   {DateObject}    _dateObj
            +         */
            +        , initYear:
            +            function( _dateObj ){
            +                this.layout.find('button.UYear').html(  _dateObj.date.getFullYear() );
            +            }
            +        /**
            +         * 初始化月份
            +         * @method  initMonth
            +         * @param   {DateObject}    _dateObj
            +         */
            +        , initMonth:
            +            function( _dateObj ){
            +                this.layout.find('button.UMonth').html(  _dateObj.date.getMonth() + 1 + '月' );
            +            }
            +        /**
            +         * 初始化月份的所有日期
            +         * @method  _logic.initMonthDate
            +         * @param   {DateObjects}   _dateObj   保存所有相关日期的对象
            +         */
            +        , initMonthDate:
            +            function( _dateObj ){
            +                var _p = this, _layout = this.layout;
            +                var _maxday = JC.f.maxDayOfMonth( _dateObj.date ), _weekday = _dateObj.date.getDay() || 7
            +                    , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin
            +                    , _tmp, i, _class;
            +
            +                var _beginDate = JC.f.cloneDate( _dateObj.date );
            +                    _beginDate.setDate( 1 );
            +                var _beginWeekday = _beginDate.getDay() || 7;
            +                if( _beginWeekday < 2 ){
            +                    _beginDate.setDate( -(_beginWeekday-1+6) );
            +                }else{
            +                    _beginDate.setDate( -(_beginWeekday-2) );
            +                }
            +
            +                _dateObj.beginDate = JC.f.cloneDate( _beginDate );
            +
            +                var today = new Date();
            +
            +                //this._model.title();
            +
            +                _ls.push('<tr>');
            +                for( i = 1; i <= 42; i++ ){
            +                    _class = [];
            +                    if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend');
            +                    if( !JC.f.isSameMonth( _dateObj.date, _beginDate ) ) _class.push( 'other' );
            +                    if( _dateObj.minvalue && _beginDate.getTime() < _dateObj.minvalue.getTime() ) 
            +                        _class.push( 'unable' );
            +                    if( _dateObj.maxvalue && _beginDate.getTime() > _dateObj.maxvalue.getTime() ) 
            +                        _class.push( 'unable' );
            +
            +                    var lunarDate = LunarCalendar.gregorianToLunar( _beginDate );
            +                    var festivals = LunarCalendar.getFestivals( lunarDate, _beginDate );
            +
            +                    var _min = 0, _max = 3000000000000, _curtime = _beginDate.getTime();
            +                    var _title = [ _beginDate.getFullYear(), '年 '
            +                                    , _beginDate.getMonth() + 1, '月 '
            +                                    , _beginDate.getDate(), '日', '\n' ];
            +                    _title.push( '农历 ', lunarDate.yue, lunarDate.ri );
            +                    _title.push( ' ', lunarDate.ganzhi, '【', lunarDate.shengxiao, '】年' );
            +
            +                    if( festivals && festivals.festivals.length ){
            +                        var _festivalsAr = [];
            +                        $.each( festivals.festivals, function( _ix, _item ){
            +                            //JC.log( _item );
            +                            if( _item.fullname ){
            +                                _festivalsAr = _festivalsAr.concat( _item.fullname.split(/[\s]+/) );
            +                            }
            +                        });
            +
            +                        if( _festivalsAr.length ){
            +                            _title.push( '\n节日: ' );
            +                            _title.push( _festivalsAr.join( ', ' ) );
            +                        }
            +                    }
            +
            +                    if( this._model.container.is('[nopreviousfestivals]') ){
            +                        _min = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth(), 1 ).getTime();
            +                    }
            +                    if( this._model.container.is('[nonextfestivals]') ){
            +                        _max = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth() + 1, 1 ).getTime();
            +                    }
            +
            +                    if( _curtime >= _min && _curtime < _max ){
            +                        if( festivals.isHoliday ){ _class.push( 'festival' ); _class.push('xiuxi'); }
            +                        if( festivals.isWorkday ) _class.push( 'shangban' );
            +                    }else{
            +                        _class.push('nopointer');
            +                        _class.push('unable');
            +                    }
            +
            +
            +                    this._model.title( _beginDate.getTime(), _title.join('') );
            +
            +                    if( JC.f.isSameDay( today, _beginDate ) ) _class.push( 'today' );
            +                    _ls.push( '<td class="', _class.join(' '),'">'
            +                            ,'<a href="javascript:" date="', _beginDate.getTime(),'">'
            +                            ,'<b>', _beginDate.getDate(), '</b>'
            +                            ,'<label>', festivals.dayName,  '</label><div></div></a></td>' );
            +                    _beginDate.setDate( _beginDate.getDate() + 1 );
            +                    if( i % 7 === 0 && i != 42 ) _ls.push( '</tr><tr>' );
            +                }
            +                _ls.push('</tr>');
            +                _beginDate.setDate( _beginDate.getDate() - 1 );
            +                _dateObj.endDate = JC.f.cloneDate( _beginDate );
            +
            +                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) )
            +                    .find('td').each( function(){
            +                        _p.addTitle( $(this) );
            +                    });
            +
            +                this.hideControl();
            +
            +                JC.log( _prebegin, _premaxday, _maxday, _weekday, _sumday, _row );
            +            }
            +        /**
            +         * 把具体的公历和农历日期写进a标签的title里
            +         * @method  addTitle
            +         * @param   {selector}  _td
            +         */
            +        , addTitle:
            +            function( _td ){
            +                var _a = _td.find('a'), _tm = _a.attr( 'date' ), _title = this._model.title( _tm );
            +                _a.attr('title', _title ).attr('datatitle', _title);
            +            }
            +        /**
            +         * 检查是否要隐藏操作控件
            +         * @method  hideControl
            +         */
            +        , hideControl: 
            +            function(){
            +                if( this._model.hideControl ){
            +                    this.layout.find('select, button.UPreYear, button.UPreMonth, button.UNextMonth, button.UNextYear').hide();
            +                    this.layout.find('table.UHeader').addClass('nopointer');
            +                }
            +            }
            +    };
            +    /**
            +     * LunarCalendar 数据模型类
            +     * @namespace JC.LunarCalendar
            +     * @class   Model
            +     * @constructor
            +     * @param   {selector}      _container
            +     * @param   {date}          _date
            +     */
            +    function Model( _container, _date ){
            +        /**
            +         * LunarCalendar 所要显示的selector
            +         * @property    {selector}  container
            +         * @type    selector
            +         * @default document.body
            +         */
            +        this.container = _container;
            +        /**
            +         * 初始化时的时期
            +         * @property    date
            +         * @type    date    
            +         * @default new Date()
            +         */
            +        this.date = _date;
            +        /**
            +         * 日历默认模板
            +         * @property    tpl
            +         * @type    string
            +         * @default JC.LunarCalendar._deftpl
            +         */
            +        this.tpl;
            +        /**
            +         * 显示日历时所需要的所有日期对象
            +         * @property    dateObj
            +         * @type    Object
            +         */
            +        this.dateObj;
            +        /**
            +         * a 标签 title 的临时存储对象
            +         * @property    _titleObj
            +         * @type    Object
            +         * @default {}
            +         * @private
            +         */
            +        this._titleObj = {};
            +        this.hideControl;
            +    }
            +
            +    Model._insCount = 1;
            +    LunarCalendar.Model._instanceName = 'LunarCalendar';
            +    
            +    Model.prototype = {
            +
            +        init:
            +            function(){
            +                this.date = this.clcDate();
            +                JC.log( this.date );
            +
            +                this.tpl = JC.f.printf( JC.LunarCalendar.tpl || _deftpl, Model._insCount++ );
            +                if( this.container.is( '[hidecontrol]' ) ){
            +                    if( !this.container.attr( 'hidecontrol' ) ){
            +                        this.hideControl = true;
            +                    }else{
            +                        this.hideControl = JC.f.parseBool( this.container.attr( 'hidecontrol' ) );
            +                    }
            +                }
            +
            +                this.layout = $( this.tpl );
            +                this.layout.appendTo( this.container );
            +                return this;
            +            }
            +        , title: 
            +            function( _key, _title )
            +            {
            +                if( !(_key || _title ) ){
            +                    this._titleObj = {};
            +                    return;
            +                }
            +                _title && ( this._titleObj[_key ] = _title );
            +                return this._titleObj[_key];
            +            }
            +        /**
            +         * 获取初始日期对象
            +         * @method  getDate
            +         * @param   {selector}  _selector   显示日历组件的input
            +         * @private
            +         */
            +        , getDate:
            +            function(){
            +                if( this.dateObj ) return this.dateObj;
            +                var _selector = this.container;
            +                var _r = { date: 0, minvalue: 0, maxvalue: 0 }, _tmp;
            +
            +                if( _tmp = JC.f.dateDetect( _selector.attr('defaultdate') )) _r.date = _tmp;
            +                else _r.date = this.date || new Date();
            +
            +                _r.minvalue = JC.f.dateDetect( _selector.attr('minvalue') );
            +                _r.maxvalue = JC.f.dateDetect( _selector.attr('maxvalue') );
            +                
            +                _r.date && ( _r.data = JC.f.pureDate( _r.date ) );
            +                _r.minvalue && ( _r.minvalue = JC.f.pureDate( _r.minvalue ) );
            +                _r.maxvalue && ( _r.maxvalue = JC.f.pureDate( _r.maxvalue ) );
            +
            +                return this.dateObj = _r;
            +            }
            +        /**
            +         * 把日期赋值给文本框
            +         * @method  setDate
            +         * @param   {int}   _timestamp  日期对象的时间戳
            +         * @private
            +         */
            +        , setDate:
            +            function( _timestamp ){
            +                var _d = new Date(), _symbol = '-'; _d.setTime( _timestamp );
            +            }
            +        /**
            +         * 给文本框赋值, 日期为控件的当前日期
            +         * @method  setSelectedDate
            +         * @return  {int}   0/1
            +         * @private
            +         */
            +        , setSelectedDate:
            +            function(){
            +                var _cur;
            +                _cur = this.getLayout().find('table td.cur a');
            +                if( _cur.parent('td').hasClass('unable') ) return 0;
            +                _cur && _cur.length && _cur.attr('date') && this.setDate( _cur.attr('date') );
            +                return 1;
            +            }
            +        , clcSelectedItemCb:
            +            function(){
            +                var _r = JC.LunarCalendar.clcSelectedItemCb;
            +                    this.selector().attr( 'clcSelectedItemCb' )
            +                        && ( _r = window[ this.selector().attr( 'clcSelectedItemCb') ] || _r );
            +                return _r;
            +            }
            +        , clcDate:
            +            function(){
            +                var _r = this.date;
            +                    this.selector().attr( 'clcDate' )
            +                        && ( _r = JC.f.dateDetect( this.selector().attr('clcDate') ) || _r )
            +                        && ( _r = JC.f.pureDate( _r ) );
            +                return _r;
            +            }
            +        , selector: function(){ return this.container; }
            +    };
            +
            +    /**
            +     * LunarCalendar 日历默认模板
            +     * @property    _deftpl
            +     * @type string
            +     * @static
            +     * @private
            +     */
            +    var _deftpl = 
            +        [
            +        '<div id="UXCLunarCalendar_{0}" class="UXCLunarCalendar">\n'
            +        ,'    <div class="UXCLunarCalendar_wrapper">\n'
            +        ,'<table class="UHeader">\n'
            +        ,'    <tbody>\n'
            +        ,'        <tr>\n'
            +        ,'            <td class="ULeftControl">\n'
            +        ,'                <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>\n'
            +        ,'                <button type="button" class="UButton UPreMonth">&nbsp;&lt;&nbsp;</button>\n'
            +        ,'            </td>\n'
            +        ,'            <td class="UMidControl">\n'
            +        ,'                <button type="button" class="UButton UYear">2013</button>\n'
            +        ,'                <select class="UYearList">\n'
            +        ,'                </select>\n'
            +        ,'                <button type="button" class="UButton UMonth">1月</button>\n'
            +        ,'                <select class="UMonthList">\n'
            +        ,'                    <option value=\'0\'>一月</option>\n'
            +        ,'                    <option value=\'1\'>二月</option>\n'
            +        ,'                    <option value=\'2\'>三月</option>\n'
            +        ,'                    <option value=\'3\'>四月</option>\n'
            +        ,'                    <option value=\'4\'>五月</option>\n'
            +        ,'                    <option value=\'5\'>六月</option>\n'
            +        ,'                    <option value=\'6\'>七月</option>\n'
            +        ,'                    <option value=\'7\'>八月</option>\n'
            +        ,'                    <option value=\'8\'>九月</option>\n'
            +        ,'                    <option value=\'9\'>十月</option>\n'
            +        ,'                    <option value=\'10\'>十一月</option>\n'
            +        ,'                    <option value=\'11\'>十二月</option>\n'
            +        ,'                </select>\n'
            +        ,'            </td>\n'
            +        ,'            <td class="URightControl">\n'
            +        ,'                <button type="button" class="UButton UNextMonth">&nbsp;&gt;&nbsp;</button>\n'
            +        ,'                <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>\n'
            +        ,'            </td>\n'
            +        ,'        </tr>\n'
            +        ,'    </tbody>\n'
            +        ,'</table>\n'
            +        ,'        <table class="UTable UTableThead">\n'
            +        ,'            <thead>\n'
            +        ,'                <tr>\n'
            +        ,'                    <th>一</th>\n'
            +        ,'                    <th>二</th>\n'
            +        ,'                    <th>三</th>\n'
            +        ,'                    <th>四</th>\n'
            +        ,'                    <th>五</th>\n'
            +        ,'                    <th class="weekend">六</th>\n'
            +        ,'                    <th class="weekend">日</th>\n'
            +        ,'                </tr>\n'
            +        ,'            </thead>\n'
            +        ,'       </table>\n'
            +        ,'       <table class="UTable UTableBorder">\n'
            +        ,'            <tbody>\n'
            +        ,'                <!--<tr>\n'
            +        ,'                    <td class="unable"><a href="#"><b>1</b><label>两字</label></a></td>\n'
            +        ,'                    <td class="unable cur"><a href="#"><b>2</b><label>两字</label></a></td>\n'
            +        ,'                    <td class="unable"><a href="#"><b>33</b><label>两字</label></a></td>\n'
            +        ,'                    <td class="unable"><a href="#"><b>44</b><label>两字</label></a></td>\n'
            +        ,'                    <td class="unable"><a href="#"><b>5</b><label>两字</label></a></td>\n'
            +        ,'                    <td class="weekend shangban cur"><a href="#"><b>6</b><label>两字</label></a></td>\n'
            +        ,'                    <td class="weekend"><a href="#"><b>7</b><label>两字</label></a></td>\n'
            +        ,'                </tr>-->\n'
            +        ,'            </tbody>\n'
            +        ,'        </table>\n'
            +        ,'    </div>\n'
            +        ,'</div>\n'
            +        ].join('');   
            +    /**
            +     * 监听上一年按钮
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar button.UPreYear', 'click', function(){
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar );
            +        _ins && _ins.preYear();
            +    });
            +    /**
            +     * 监听上一月按钮
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar button.UPreMonth', 'click', function(){
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar );
            +        _ins && _ins.preMonth();
            +    });
            +    /**
            +     * 监听下一月按钮
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar button.UNextMonth', 'click', function(){
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar );
            +        _ins && _ins.nextMonth();
            +    });
            +    /**
            +     * 监听下一年按钮
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar button.UNextYear', 'click', function(){
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar );
            +        _ins && _ins.nextYear();
            +    });
            +    /**
            +     * 监听年份按钮, 是否要显示年份列表 
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar button.UYear', 'click', function( _evt ){
            +        _evt.stopPropagation();
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar );
            +        if( _ins.isHideControl() ) return;
            +        var _date = _ins.getDate(), _year = _date.getFullYear();
            +        var _start = _date.getFullYear() - LunarCalendar.defaultYearSpan
            +            , _over = _date.getFullYear() + LunarCalendar.defaultYearSpan;
            +        var _r = [], _selected = '';
            +        $('div.UXCLunarCalendar select').hide();
            +
            +        for( ; _start < _over; _start++ ){
            +            if( _start === _year ) _selected = ' selected '; else _selected = ''
            +            _r.push( '<option value="', _start, '"', _selected ,'>', _start, '</option>' );
            +        }
            +        var _scrollTop = LunarCalendar.defaultYearSpan / 2 * 18;
            +        _ins.getLayout().find('select.UYearList').html(_r.join('')).show().prop('size', 20).scrollTop( _scrollTop );
            +    });
            +    /**
            +     * 监听月份按钮, 是否要显示月份列表 
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar button.UMonth', 'click', function( _evt ){
            +        _evt.stopPropagation();
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        var _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar );
            +        if( !_ins ) return;
            +        if( _ins.isHideControl() ) return;
            +        var _date = _ins.getDate(), _year = _date.getFullYear();
            +        $('div.UXCLunarCalendar select').hide();
            +
            +        _ins.getLayout().find('select.UMonthList').val( _date.getMonth() ).prop('size', 12).show();
            +    });
            +    /**
            +     * 监听年份列表选择状态
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar select.UYearList', 'change', function(){
            +        var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' ), _ins, _date;
            +        _ins = JC.BaseMVC.getInstance( _layout, LunarCalendar );
            +        if( !_ins ) return;
            +        _date = _ins.getDate();
            +
            +        _date.setFullYear( _p.val() );
            +        _ins.update( _date );
            +    });
            +    /**
            +     * 监听月份列表选择状态
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar select.UMonthList', 'change', function(){
            +        var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' ), _ins, _date;
            +        _ins = JC.BaseMVC.getInstance( _layout, LunarCalendar );
            +        if( !_ins ) return;
            +        _date = _ins.getDate();
            +
            +        _date.setMonth( _p.val() );
            +        _ins.update( _date );
            +    });
            +    /**
            +     * 监听日期单元格点击事件
            +     */
            +    $(document).delegate( 'div.UXCLunarCalendar table.UTableBorder td', 'click', function(){
            +        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            +        if( !_selector.length ) return;
            +        if( _p.hasClass('unable') ) return;
            +        var _itema = _p.find('> a')
            +            , _curtime = _itema.attr('date')
            +            , _ins = JC.BaseMVC.getInstance( _selector, LunarCalendar )
            +            , _curDate
            +            ;
            +        if( !( _curtime && _ins ) ) return;
            +
            +        _curDate = new Date();
            +        _curDate.setTime( _curtime );
            +
            +        var _min = 0, _max = 3000000000000;
            +        if( _ins.getContainer().is('[nopreviousfestivals]') ){
            +            _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime();
            +        }
            +        if( _ins.getContainer().is('[nonextfestivals]') ){
            +            _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime();
            +        }
            +
            +        if( _curtime >= _min && _curtime < _max ){
            +            $('div.UXCLunarCalendar table.UTableBorder td.cur').removeClass('cur');
            +            _p.addClass('cur');
            +            _ins.trigger( 'CLCSelectedItem', [ _curDate, _p, _itema ] );
            +        }
            +    });
            +    /**
            +     * 监听body点击事件, 点击时隐藏日历控件的年份和月份列表
            +     */
            +    $(document).on('click', function(){
            +        $('div.UXCLunarCalendar select').hide();
            +    });
            +    /**
            +     * DOM 加载完毕后, 初始化日历组件
            +     * @event   dom ready
            +     * @private
            +     */
            +    $(document).ready( function($evt){
            +        LunarCalendar.autoInit 
            +            && JC.f.safeTimeout( function(){ LunarCalendar.init(); }, null, 'INITLunarCalendar', 100 );
            +    });
            + 
            +
            +    return JC.LunarCalendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_LunarCalendar_LunarCalendar.getFestival.js.html b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.getFestival.js.html new file mode 100644 index 000000000..a4de55491 --- /dev/null +++ b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.getFestival.js.html @@ -0,0 +1,493 @@ + + + + + ../comps/LunarCalendar/LunarCalendar.getFestival.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/LunarCalendar/LunarCalendar.getFestival.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.LunarCalendar.default' ], function(){
            +    JC.LunarCalendar.getFestivals = getFestivals;
            +    /**
            +     * 返回农历和国历的所在日期的所有节日
            +     * <br /> 假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 }
            +     * <br /> 返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 }
            +     * @method getFestivals
            +     * @static
            +     * @for JC.LunarCalendar
            +     * @param   {Object}    _lunarDate      农历日期对象, 由JC.LunarCalendar.gregorianToLunar 获取
            +     * @param   {Date}      _greDate        日期对象
            +     * @return  Object    
            +     */
            +    function getFestivals( _lunarDate, _greDate ){
            +        var _r = { 'dayName': '', 'festivals': [], 'isHoliday': false }
            +            , _lunarDay = [ intPad(_lunarDate.month), intPad(_lunarDate.day) ].join('')
            +            , _greDay = [ intPad(_greDate.getMonth()+1), intPad(_greDate.getDate()) ].join('')
            +            , _greToday = _greDate.getFullYear() + _greDay
            +            ;
            +
            +        _r.dayName = _lunarDate.ri;
            +        if( _r.dayName == '初一' ) _r.dayName = _lunarDate.yue;
            +
            +        if( _greDay in gregorianFes ) _r.festivals.push( gregorianFes[ _greDay ] );
            +        if( _lunarDay in lunarFes ) {
            +            _r.festivals.push( lunarFes[ _lunarDay ] );
            +        }
            + 
            +        if( _lunarDate.month == 12 && _lunarDate.day >= 29 ){
            +            var _tmp = new Date(); _tmp.setTime( _greDate.getTime() ); _tmp.setDate( _tmp.getDate() + 1 );
            +            var _tmpLunar = JC.LunarCalendar.gregorianToLunar( _tmp );
            +            if( _tmpLunar.month === 1 && _tmpLunar.day === 1 ){
            +                var fes = lunarFes['0100'];
            +                _r.festivals.unshift( fes );
            +                _r.dayName = fes.name;
            +            }
            +        }
            +
            +        if( JC.LunarCalendar.nationalHolidays ){
            +            if( _greToday in JC.LunarCalendar.nationalHolidays ){
            +                _r.festivals.push( JC.LunarCalendar.nationalHolidays[ _greToday ] );
            +            }
            +        }
            +       
            +        if( _r.festivals.length ){
            +            for( var i = 0, j = _r.festivals.length - 1; i < j; i++ ){
            +                for( var k = i + 1; k <= j; k++ ){
            +                    if(  _r.festivals[k].priority > _r.festivals[i].priority ){
            +                        var _tmp = _r.festivals[i];
            +                        _r.festivals[i] = _r.festivals[k];
            +                        _r.festivals[k] = _tmp;
            +                    }
            +                }
            +            }
            +            _r.festivals[0].name && (_r.dayName = _r.festivals[0].name);
            +            for( var i = 0, j = _r.festivals.length; i < j; i++ ){
            +                if( _r.festivals[i].isHoliday ){ _r.isHoliday = true; break; }
            +            }
            +            for( var i = 0, j = _r.festivals.length; i < j; i++ ){
            +                if( _r.festivals[i].isWorkday ){ _r.isWorkday = true; break; }
            +            }
            +       }
            +
            +        /*JC.log( _lunarDay, _greDay, _r.festivals.length );*/
            +
            +        return _r;
            +    }
            +
            +    var lunarFes = {
            +        '0101': { 'name': '春节', 'fullname': '春节', 'priority': 8 },  
            +        '0115': { 'name': '元宵节', 'fullname': '元宵节', 'priority': 8 },  
            +        '0505': { 'name': '端午节', 'fullname': '端午节', 'priority': 8 },  
            +        '0707': { 'name': '七夕', 'fullname': '七夕情人节', 'priority': 5 },  
            +        '0715': { 'name': '中元节', 'fullname': '中元节', 'priority': 5 },  
            +        '0815': { 'name': '中秋节', 'fullname': '中秋节', 'priority': 8 },  
            +        '0909': { 'name': '重阳节', 'fullname': '重阳节', 'priority': 5 },  
            +        '1208': { 'name': '腊八节', 'fullname': '腊八节', 'priority': 5 },  
            +        '1223': { 'name': '小年', 'fullname': '小年', 'priority': 5 },  
            +        '0100': { 'name': '除夕', 'fullname': '除夕', 'priority': 8 }
            +    };
            +
            +    var gregorianFes = {
            +        '0101': { 'name': '元旦节', 'fullname': '元旦节', 'priority': 6 },  
            +        '0202': { 'name': '湿地日', 'fullname': '世界湿地日', 'priority': 1 },  
            +        '0210': { 'name': '气象节', 'fullname': '国际气象节', 'priority': 1 },  
            +        '0214': { 'name': '情人节', 'fullname': '情人节', 'priority': 3 },  
            +        '0301': { 'name': '', 'fullname': '国际海豹日', 'priority': 1 },  
            +        '0303': { 'name': '', 'fullname': '全国爱耳日', 'priority': 1 },  
            +        '0305': { 'name': '学雷锋', 'fullname': '学雷锋纪念日', 'priority': 1 },  
            +        '0308': { 'name': '妇女节', 'fullname': '妇女节', 'priority': 3 },  
            +        '0312': { 'name': '植树节', 'fullname': '植树节 孙中山逝世纪念日', 'priority': 2 },  
            +        '0314': { 'name': '', 'fullname': '国际警察日', 'priority': 1 },  
            +        '0315': { 'name': '消权日', 'fullname': '消费者权益日', 'priority': 1 },  
            +        '0317': { 'name': '', 'fullname': '中国国医节 国际航海日', 'priority': 1 },  
            +        '0321': { 'name': '', 'fullname': '世界森林日 消除种族歧视国际日 世界儿歌日', 'priority': 1 },  
            +        '0322': { 'name': '', 'fullname': '世界水日', 'priority': 1 },  
            +        '0323': { 'name': '气象日', 'fullname': '世界气象日', 'priority': 1 },  
            +        '0324': { 'name': '', 'fullname': '世界防治结核病日', 'priority': 1 },  
            +        '0325': { 'name': '', 'fullname': '全国中小学生安全教育日', 'priority': 1 },  
            +        '0401': { 'name': '愚人节', 'fullname': '愚人节 全国爱国卫生运动月(四月) 税收宣传月(四月)', 'priority': 2 },  
            +        '0407': { 'name': '卫生日', 'fullname': '世界卫生日', 'priority': 1 },  
            +        '0422': { 'name': '地球日', 'fullname': '世界地球日', 'priority': 1 },  
            +        '0423': { 'name': '', 'fullname': '世界图书和版权日', 'priority': 1 },  
            +        '0424': { 'name': '', 'fullname': '亚非新闻工作者日', 'priority': 1 },  
            +        '0501': { 'name': '劳动节', 'fullname': '劳动节', 'priority': 6 },  
            +        '0504': { 'name': '青年节', 'fullname': '青年节', 'priority': 1 },  
            +        '0505': { 'name': '', 'fullname': '碘缺乏病防治日', 'priority': 1 },  
            +        '0508': { 'name': '', 'fullname': '世界红十字日', 'priority': 1 },  
            +        '0512': { 'name': '护士节', 'fullname': '国际护士节', 'priority': 1 },  
            +        '0515': { 'name': '家庭日', 'fullname': '国际家庭日', 'priority': 1 },  
            +        '0517': { 'name': '电信日', 'fullname': '国际电信日', 'priority': 1 },  
            +        '0518': { 'name': '', 'fullname': '国际博物馆日', 'priority': 1 },  
            +        '0520': { 'name': '', 'fullname': '全国学生营养日', 'priority': 1 },  
            +        '0523': { 'name': '', 'fullname': '国际牛奶日', 'priority': 1 },  
            +        '0531': { 'name': '无烟日', 'fullname': '世界无烟日', 'priority': 1 },   
            +        '0601': { 'name': '儿童节', 'fullname': '国际儿童节', 'priority': 6 },  
            +        '0605': { 'name': '', 'fullname': '世界环境保护日', 'priority': 1 },  
            +        '0606': { 'name': '', 'fullname': '全国爱眼日', 'priority': 1 },  
            +        '0617': { 'name': '', 'fullname': '防治荒漠化和干旱日', 'priority': 1 },  
            +        '0623': { 'name': '', 'fullname': '国际奥林匹克日', 'priority': 1 },  
            +        '0625': { 'name': '土地日', 'fullname': '全国土地日', 'priority': 1 },  
            +        '0626': { 'name': '禁毒日', 'fullname': '国际禁毒日', 'priority': 1 },  
            +        '0701': { 'name': '', 'fullname': '香港回归纪念日 中共诞辰 世界建筑日', 'priority': 1 },  
            +        '0702': { 'name': '', 'fullname': '国际体育记者日', 'priority': 1 },  
            +        '0707': { 'name': '', 'fullname': '抗日战争纪念日', 'priority': 1 },  
            +        '0711': { 'name': '人口日', 'fullname': '世界人口日', 'priority': 1 },  
            +        '0801': { 'name': '建军节', 'fullname': '建军节', 'priority': 1 },  
            +        '0808': { 'name': '', 'fullname': '中国男子节(爸爸节)', 'priority': 1 },  
            +        '0815': { 'name': '', 'fullname': '抗日战争胜利纪念', 'priority': 1 },  
            +        '0908': { 'name': '', 'fullname': '国际扫盲日 国际新闻工作者日', 'priority': 1 },  
            +        '0909': { 'name': '', 'fullname': '毛逝世纪念', 'priority': 1 },  
            +        '0910': { 'name': '教师节', 'fullname': '中国教师节', 'priority': 6 },   
            +        '0914': { 'name': '地球日', 'fullname': '世界清洁地球日', 'priority': 1 },  
            +        '0916': { 'name': '', 'fullname': '国际臭氧层保护日', 'priority': 1 },  
            +        '0918': { 'name': '九一八', 'fullname': '九·一八事变纪念日', 'priority': 1 },  
            +        '0920': { 'name': '爱牙日', 'fullname': '国际爱牙日', 'priority': 1 },  
            +        '0927': { 'name': '旅游日', 'fullname': '世界旅游日', 'priority': 1 },  
            +        '0928': { 'name': '', 'fullname': '孔子诞辰', 'priority': 1 },  
            +        '1001': { 'name': '国庆节', 'fullname': '国庆节 世界音乐日 国际老人节', 'priority': 6 },  
            +        '1002': { 'name': '', 'fullname': '国际和平与民主自由斗争日', 'priority': 1 },  
            +        '1004': { 'name': '', 'fullname': '世界动物日', 'priority': 1 },  
            +        '1006': { 'name': '', 'fullname': '老人节', 'priority': 1 },  
            +        '1008': { 'name': '', 'fullname': '全国高血压日 世界视觉日', 'priority': 1 },  
            +        '1009': { 'name': '邮政日', 'fullname': '世界邮政日 万国邮联日', 'priority': 1 },  
            +        '1010': { 'name': '', 'fullname': '辛亥革命纪念日 世界精神卫生日', 'priority': 1 },  
            +        '1013': { 'name': '', 'fullname': '世界保健日 国际教师节', 'priority': 1 },  
            +        '1014': { 'name': '', 'fullname': '世界标准日', 'priority': 1 },  
            +        '1015': { 'name': '', 'fullname': '国际盲人节(白手杖节)', 'priority': 1 },  
            +        '1016': { 'name': '粮食日', 'fullname': '世界粮食日', 'priority': 1 },  
            +        '1017': { 'name': '', 'fullname': '世界消除贫困日', 'priority': 1 },  
            +        '1022': { 'name': '', 'fullname': '世界传统医药日', 'priority': 1 },  
            +        '1024': { 'name': '', 'fullname': '联合国日', 'priority': 1 },  
            +        '1031': { 'name': '勤俭日', 'fullname': '世界勤俭日', 'priority': 1 },  
            +        '1107': { 'name': '', 'fullname': '十月社会主义革命纪念日', 'priority': 1 },  
            +        '1108': { 'name': '记者日', 'fullname': '中国记者日', 'priority': 1 },  
            +        '1109': { 'name': '', 'fullname': '全国消防安全宣传教育日', 'priority': 1 },  
            +        '1110': { 'name': '青年节', 'fullname': '世界青年节', 'priority': 3 },  
            +        '1111': { 'name': '', 'fullname': '国际科学与和平周(本日所属的一周)', 'priority': 1 },  
            +        '1112': { 'name': '', 'fullname': '孙中山诞辰纪念日', 'priority': 1 },  
            +        '1114': { 'name': '', 'fullname': '世界糖尿病日', 'priority': 1 },  
            +        '1117': { 'name': '', 'fullname': '国际大学生节 世界学生节', 'priority': 1 },  
            +        '1120': { 'name': '', 'fullname': '彝族年', 'priority': 1 },  
            +        '1121': { 'name': '', 'fullname': '彝族年 世界问候日 世界电视日', 'priority': 1 },  
            +        '1122': { 'name': '', 'fullname': '彝族年', 'priority': 1 },  
            +        '1129': { 'name': '', 'fullname': '国际声援巴勒斯坦人民国际日', 'priority': 1 },  
            +        '1201': { 'name': '', 'fullname': '世界艾滋病日', 'priority': 1 },  
            +        '1203': { 'name': '', 'fullname': '世界残疾人日', 'priority': 1 },  
            +        '1205': { 'name': '', 'fullname': '国际经济和社会发展志愿人员日', 'priority': 1 },  
            +        '1208': { 'name': '', 'fullname': '国际儿童电视日', 'priority': 1 },  
            +        '1209': { 'name': '足球日', 'fullname': '世界足球日', 'priority': 1 },  
            +        '1210': { 'name': '人权日', 'fullname': '世界人权日', 'priority': 1 },  
            +        '1212': { 'name': '', 'fullname': '西安事变纪念日', 'priority': 1 },  
            +        '1213': { 'name': '大屠杀', 'fullname': '南京大屠杀(1937年)纪念日!紧记血泪史!', 'priority': 1 },  
            +        '1220': { 'name': '', 'fullname': '澳门回归纪念', 'priority': 1 },  
            +        '1221': { 'name': '篮球日', 'fullname': '国际篮球日', 'priority': 1 },  
            +        '1224': { 'name': '平安夜', 'fullname': '平安夜', 'priority': 1 },  
            +        '1225': { 'name': '圣诞节', 'fullname': '圣诞节', 'priority': 1 },  
            +        '1226': { 'name': '', 'fullname': '毛诞辰纪念', 'priority': 1 }
            +    };
            +
            +    var byDayOrWeekFes = {
            +        '0150': { 'name': '麻风日', 'fullname': '世界麻风日', 'priority': 1 }, //一月的最后一个星期日(月倒数第一个星期日)  
            +        '0520': { 'name': '母亲节', 'fullname': '国际母亲节', 'priority': 1 },  
            +        '0530': { 'name': '助残日', 'fullname': '全国助残日', 'priority': 1 },  
            +        '0630': { 'name': '父亲节', 'fullname': '父亲节', 'priority': 1 },  
            +        '0730': { 'name': '', 'fullname': '被奴役国家周', 'priority': 1 },  
            +        '0932': { 'name': '和平日', 'fullname': '国际和平日', 'priority': 1 },  
            +        '0940': { 'name': '聋人节 世界儿童日', 'fullname': '国际聋人节 世界儿童日', 'priority': 1 },  
            +        '0950': { 'name': '海事日', 'fullname': '世界海事日', 'priority': 1 },  
            +        '1011': { 'name': '住房日', 'fullname': '国际住房日', 'priority': 1 },  
            +        '1013': { 'name': '减灾日', 'fullname': '国际减轻自然灾害日(减灾日)', 'priority': 1 },  
            +        '1144': { 'name': '感恩节', 'fullname': '感恩节', 'priority': 1 }
            +    };
            +
            +    /**
            +     * 为数字添加前置0
            +     * @method  JC.LunarCalendar.getFestival.intPad
            +     * @param   {int}   _n      需要添加前置0的数字
            +     * @param   {int}   _len    需要添加_len个0, 默认为2
            +     * @return  {string}
            +     * @static
            +     * @private
            +     */
            +    function intPad( _n, _len ){
            +        if( typeof _len == 'undefined' ) _len = 2;
            +        _n = new Array( _len + 1 ).join('0') + _n;
            +        return _n.slice( _n.length - _len );
            +    }
            +
            +    return JC.LunarCalendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_LunarCalendar_LunarCalendar.gregorianToLunar.js.html b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.gregorianToLunar.js.html new file mode 100644 index 000000000..bcae23bac --- /dev/null +++ b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.gregorianToLunar.js.html @@ -0,0 +1,593 @@ + + + + + ../comps/LunarCalendar/LunarCalendar.gregorianToLunar.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/LunarCalendar/LunarCalendar.gregorianToLunar.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.LunarCalendar.default' ], function(){
            +    /**
            +     * 从公历日期获得农历日期
            +     * <br /> 返回的数据格式
            +     * <pre>
            +        {
            +            shengxiao: ''   //生肖
            +            , ganzhi: ''    //干支
            +            , yue: ''       //月份
            +            , ri: ''        //日
            +            , shi: ''       //时
            +            , year: ''      //农历数字年
            +            , month: ''     //农历数字月
            +            , day: ''       //农历数字天
            +            , hour: ''      //农历数字时
            +        };
            +     * </pre>
            +     * @method  gregorianToLunar
            +     * @static
            +     * @for     JC.LunarCalendar
            +     * @param   {date}  _date      要获取农历日期的时间对象
            +     * @return  Object
            +     */
            +    JC.LunarCalendar.gregorianToLunar = gregorianToLunar;
            +
            +    function gregorianToLunar( _date ){
            +        var _r = {
            +            shengxiao: ''   //生肖
            +            , ganzhi: ''    //干支
            +            , yue: ''       //月份
            +            , ri: ''        //日
            +            , shi: ''       //时
            +            , year: ''      //农历数字年
            +            , month: ''     //农历数字月
            +            , day: ''       //农历数字天
            +            , hour: ''      //农历数字时
            +        };
            +
            +        var _lunar = JC.LunarCalendar.toLunarDate( _date );
            +        _r.year = _lunar.y;
            +        _r.month = _lunar.m + 1;
            +        _r.day = _lunar.d;
            +
            +        //JC.log( _r.year, _r.month, _r.day, ' ', _date.getFullYear(), _date.getMonth()+1, _date.getDate() );
            +
            +        _r.shengxiao = shengxiao.charAt((_r.year - 4) % 12);
            +        _r.ganzhi = tiangan.charAt((_r.year - 4) % 10) + dizhi.charAt((_r.year - 4) % 12);
            +
            +        if(_lunar.isleep) {
            +            _r.yue = "闰" + yuefan.charAt(_r.month - 1);
            +        }
            +        else{
            +            _r.yue = yuefan.charAt(_r.month - 1);
            +        }
            +        _r.yue += '月';
            +
            +        _r.ri = (_r.day < 11) ? "初" : ((_r.day < 20) ? "十" : ((_r.day < 30) ? "廿" : "卅"));
            +        if (_r.day % 10 != 0 || _r.day == 10) {
            +            _r.ri += shuzi.charAt((_r.day - 1) % 10);
            +        }
            +        _r.ri == "廿" && ( _r.ri = "二十" );
            +        _r.ri == "卅" && ( _r.ri = "三十" );
            +        /*JC.log( 'month:', _r.month, 2 );*/
            +
            +        _r.shi = dizhi.charAt((_r.hour - 1) % 12);
            +        return _r;
            +    };
            +
            +    var tiangan =  "甲乙丙丁戊己庚辛壬癸"
            +        , dizhi =  "子丑寅卯辰巳午未申酉戌亥"
            +        , shengxiao =  "鼠牛虎兔龙蛇马羊猴鸡狗猪"
            +        , yuefan =  "正二三四五六七八九十冬腊"
            +        , xingqi =  "日一二三四五六"
            +        , shuzi =  "一二三四五六七八九十"
            +        , lunarDays = [
            +                        0x41A95,0xD4A,0xDA5,0x20B55,0x56A,0x7155B,0x25D,0x92D,0x5192B
            +                        ,0xA95,0xB4A,0x416AA,0xAD5,0x90AB5,0x4BA,0xA5B,0x60A57,0x52B,0xA93,0x40E95
            +                    ]
            +        , lunarMonth = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]
            +        ;
            +
            +    lunarDate( JC.LunarCalendar );
            +
            +    function lunarDate(r){
            +        r = r || window;
            +
            +        function l(a){
            +            for( var c = 348, b = 32768; b > 8; b >>= 1 ){
            +                c += h[ a-1900 ] & b
            +                    ? 1
            +                    : 0
            +                    ;
            +            }
            +            return c + ( i( a ) ? ( h[ a - 1899 ] & 15 ) == 15 ? 30 : 29 : 0 );
            +        }
            +        
            +        function i(a){
            +            a = h[ a-1900 ] & 15;
            +            return a == 15 ? 0 : a;
            +        }
            +        
            +        function o(a){
            +            if( !a || !a.getFullYear ) return !1;
            +            var c = a.getFullYear()
            +                , b = a.getMonth()
            +                , a = a.getDate()
            +                ;
            +
            +            return Date.UTC( c,b,a ) > Date.UTC( 2101, 0, 28 ) 
            +                    || Date.UTC( c, b, a ) < Date.UTC( 1900, 0, 31 ) 
            +                    ? !0 
            +                    : !1
            +                    ;
            +        }
            +        
            +        var h = [
            +            19416,19168,42352,21717,53856,55632,21844,22191,39632,21970,19168,42422
            +            ,42192,53840,53845,46415,54944,44450,38320,18807,18815,42160,46261,27216
            +            ,27968,43860,11119,38256,21234,18800,25958,54432,59984,27285,23263,11104
            +            ,34531,37615,51415,51551,54432,55462,46431,22176,42420,9695,37584,53938
            +            ,43344,46423,27808,46416,21333,19887,42416,17779,21183,43432,59728,27296
            +            ,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925
            +            ,19152,42192,54484,53840,54616,46400,46752,38310,38335,18864,43380,42160
            +            ,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480
            +            ,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680
            +            ,37584,51893,43344,46240,47780,44368,21977,19360,42416,20854,21183,43312
            +            ,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371
            +            ,38608,19195,19152,42192,53430,53855,54560,56645,46496,22224,21938,18864
            +            ,42359,42160,43600,45653,27951,44448,19299,37759,18936,18800,25776,26790
            +            ,59999,27424,42692,43759,37600,53987,51552,54615,54432,55888,23893,22176
            +            ,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168
            +            ,45683,26928,29495,27296,44368,19285,19311,42352,21732,53856,59752,54560
            +            ,55968,27302,22239,19168,43476,42192,53584,62034,54560
            +            ]
            +        , g = "\u96f6,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d,\u4e03,\u516b,\u4e5d,\u5341".split(",")
            +        , p = ["\u521d","\u5341","\u5eff","\u5345","\u25a1"]
            +        , s = "\u7532,\u4e59,\u4e19,\u4e01,\u620a,\u5df1,\u5e9a,\u8f9b,\u58ec,\u7678".split(",")
            +        , t = "\u5b50,\u4e11,\u5bc5,\u536f,\u8fb0,\u5df3,\u5348,\u672a,\u7533,\u9149,\u620c,\u4ea5".split(",")
            +        , u = "\u9f20,\u725b,\u864e,\u5154,\u9f99,\u86c7,\u9a6c,\u7f8a,\u7334,\u9e21,\u72d7,\u732a".split(",")
            +        , q = ( "\u5c0f\u5bd2,\u5927\u5bd2,\u7acb\u6625,\u96e8\u6c34,\u60ca\u86f0,\u6625\u5206,"
            +                  + "\u6e05\u660e,\u8c37\u96e8,\u7acb\u590f,\u5c0f\u6ee1,\u8292\u79cd,\u590f\u81f3,"
            +                  + "\u5c0f\u6691,\u5927\u6691,\u7acb\u79cb,\u5904\u6691,\u767d\u9732,\u79cb\u5206,"
            +                  + "\u5bd2\u9732,\u971c\u964d,\u7acb\u51ac,\u5c0f\u96ea,\u5927\u96ea,\u51ac\u81f3" ).split(",")
            +        , v = [
            +            0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072
            +            ,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795
            +            ,462224,483532,504758
            +            ]
            +        , m = r || new Date;
            +
            +        var date = m;
            +
            +        r.toLunarDate=
            +            function(a){
            +                a = a || m;
            +                
            +                if( o(a) ){
            +                    return "the function[toLunarDate()]range[1900/0/31-2101/0/28]";
            +                    throw "dateRangeError";
            +                }
            +                
            +                for( var c = a.getFullYear(), b = a.getMonth(), a = a.getDate()
            +                        , c = ( Date.UTC( c, b, a ) - Date.UTC( 1900, 0, 31 ) ) / 864E5
            +                        , d , b = 1900;
            +                        b < 2100 && c > 0;
            +                        b++ 
            +                    )
            +                    d = l( b ), c -= d; 
            +
            +                c < 0 && ( c += d, b-- );
            +
            +                var lunarYear = b, lunarMonth, lunarDay, _isLeap = !1, leap = i( lunarYear );
            +
            +                for( b = 1; b < 13 && c > 0; b++ )
            +                    leap > 0 && b == leap + 1 && _isLeap == !1
            +                        ? ( b--, _isLeap = !0, d = i( lunarYear ) ? ( h[ lunarYear - 1899 ] & 15 ) == 15 ? 30 : 29 : 0 )
            +                        : d = h[ lunarYear - 1900 ] & 65536 >> b
            +                            ? 30
            +                            : 29
            +                            , _isLeap == !0 && b == leap + 1 && ( _isLeap = !1 )
            +                            , c -= d
            +                        ;
            +
            +                c == 0
            +                    && leap > 0
            +                    && b == leap + 1
            +                    && (_isLeap ? _isLeap = !1 : ( _isLeap = !0 , b-- ) )
            +                    ; 
            +                
            +                c < 0 && ( c += d, b--);
            +
            +                lunarMonth = b - 1;
            +                lunarDay = c + 1;
            +
            +                return {
            +                    y: lunarYear
            +                    ,m: lunarMonth
            +                    ,d: lunarDay
            +                    ,leap: leap
            +                    ,isleep: _isLeap
            +                    ,toString:
            +                        function(){
            +                            var a =_isLeap ? "(\u95f0)" : ""
            +                                , b = g[ parseInt( lunarYear / 1E3 ) ] + g[ parseInt( lunarYear % 1E3 / 100 ) ]
            +                                        + g[ parseInt( lunarYear % 100 / 10 ) ]
            +                                        + g[ parseInt( lunarYear % 10 ) ]
            +                                , c = parseInt( ( lunarMonth + 1 ) / 10 ) == 0 ? "" : p[1]
            +                                ;
            +
            +                            c += g[ parseInt( ( lunarMonth + 1 ) % 10 ) ];
            +                            var d = p[ parseInt( lunarDay / 10 ) ];
            +                            d += parseInt( lunarDay % 10 ) == 0 ? "" : g[ parseInt( lunarDay % 10 ) ];
            +                            return "" + b + "\u5e74" + c + "\u6708" + a + d + "\u65e5";
            +                        }
            +                }
            +            };
            +
            +        r.toSolar=
            +            function(){
            +                if( arguments.length == 0 ) return m;
            +                else{
            +                    var a, c, b;
            +                    arguments[0] && ( a = arguments[0] );
            +                    c = arguments[1] ? arguments[1] : 0;
            +                    b = arguments[2] ? arguments[2] : 1;
            +
            +                    for( var d = 0, e = 1900; e < a; e++ ){
            +                        var f = l(e);
            +                        d+=f
            +                    }
            +
            +                    for( e = 0; e < c; e++ )
            +                        f = h[ a-1900 ] & 65536 >> e ? 30 : 29, d += f;
            +                    
            +                    d += b-1;
            +                    
            +                    return new Date( Date.UTC( 1900, 0, 31 ) + d * 864E5 ) 
            +                }
            +            };
            +        
            +        r.ganzhi=
            +            function(a){
            +                function c( a, b ){
            +                    return ( new Date( 3.15569259747E10 * ( a - 1900 ) + v[b] * 6E4 + Date.UTC( 1900, 0, 6, 2, 5 ) ) ).getUTCDate();
            +                }
            +                
            +                function b( a ){
            +                    return s[ a % 10 ] + t[ a % 12 ] 
            +                }
            +
            +                var d = a || m;
            +                
            +                if( o( d ) ){
            +                    return "the function[ganzhi()] date'range[1900/0/31-2101/0/28]";
            +                    throw "dateRangeError";
            +                }
            +                
            +                var e = d.getFullYear()
            +                    , f = d.getMonth()
            +                    , a = d.getDate()
            +                    , d = d.getHours()
            +                    , h, g, k, j, n
            +                    ;
            +
            +                g = f < 2 ? e - 1900 + 36 - 1 : e - 1900 + 36;
            +                k = ( e - 1900 ) * 12 + f + 12;
            +                h = c( e, f * 2 );
            +                var i = c( e, f * 2 + 1 );
            +                h = a == h ? q[ f * 2 ] : a == i ? q[ f * 2 + 1 ]: "";
            +
            +                var i = c( e, 2 )
            +                    , l = c( e, f * 2 )
            +                    ;
            +
            +                f == 1 
            +                    && a >= i 
            +                    && ( g = e - 1900 + 36 )
            +                    ;
            +
            +                a + 1 >= l 
            +                    && ( k = ( e - 1900 ) * 12 + f + 13 )
            +                    ;
            +
            +                j = Date.UTC( e, f, 1, 0, 0, 0, 0 ) / 864E5 + 25577 + a - 1;
            +                n= j % 10 % 5 * 12 + parseInt( d / 2 ) % 12;
            +                d == 23 && j++;
            +                g %= 60;
            +                k %= 60;
            +                j %= 60;
            +                n %= 60;
            +
            +                return {
            +                    y: g
            +                    , m: k 
            +                    , d: j
            +                    , h: n
            +                    , jie: h
            +                    , animal: u[ g % 12 ]
            +                    , toString:
            +                        function( a ){
            +                            var c = b( g ) + b( k ) + b( j ) + b( n );
            +                            return a ? c.substring( 0, a ) : c;
            +                        }
            +                };
            +            }
            +    };
            +
            +    return JC.LunarCalendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_LunarCalendar_LunarCalendar.js.html b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.js.html index 02a6af0df..929ee82fa 100644 --- a/docs_api/files/.._comps_LunarCalendar_LunarCalendar.js.html +++ b/docs_api/files/.._comps_LunarCalendar_LunarCalendar.js.html @@ -3,11 +3,17 @@ ../comps/LunarCalendar/LunarCalendar.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,1423 +252,38 @@

            File: ../comps/LunarCalendar/LunarCalendar.js

            -;(function($){
            -    ///
            -    /// TODO: 添加事件响应机制
            -    ///
            -    JC.LunarCalendar = window.LunarCalendar = LunarCalendar;
            -    /**
            -     * 农历日历组件
            -     * <br />全局访问请使用 JC.LunarCalendar 或 LunarCalendar
            -     * <br />DOM 加载完毕后
            -     * , LunarCalendar会自动初始化页面所有具备识别符的日历, 目前可识别: div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar
            -     * <br />Ajax 加载内容后, 如果有日历组件需求的话, 需要手动初始化 var ins = new JC.LunarCalendar( _selector );
            -     * <p>
            -     *      初始化时, 如果日历是添加到某个selector里, 那么selector可以指定一些设置属性
            -     *      <br /><b>hidecontrol</b>: 如果设置该属性, 那么日历将隐藏操作控件
            -     *      <br /><b>minvalue</b>: 设置日历的有效最小选择范围, 格式YYYY-mm-dd
            -     *      <br /><b>maxvalue</b>: 设置日历的有效最大选择范围, 格式YYYY-mm-dd
            -     *      <br /><b>nopreviousfestivals</b>: 不显示上个月的节日
            -     *      <br /><b>nonextfestivals</b>: 不显示下个月的节日
            -     * </p>
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_cloneDate'>window.cloneDate</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_parseISODate'>window.parseISODate</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_maxDayOfMonth'>window.maxDayOfMonth</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_isSameDay'>window.isSameDay</a>
            -     * <br /><b>require</b>: <a href='.window.html#method_isSameMonth'>window.isSameMonth</a>
            -     * </p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.LunarCalendar.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/LunarCalendar/_demo/' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class LunarCalendar
            -     * @constructor
            -     * @param   {selector}  _container  指定要显示日历的选择器, 如果不显示指定该值, 默认为 document.body
            -     * @param   {date}      _date       日历的当前日期, 如果不显示指定该值, 默认为当天
            -     * @version dev 0.1
            -     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            -     * @date    2013-06-13
            -     */
            -    function LunarCalendar( _container, _date ){
            -        _container && ( _container = $(_container) );
            -        !(_container && _container.length) && ( _container = $(document.body) );
            -        !_date && ( _date = new Date() );
            -        _container.data('LunarCalendar', this);
            -
            -        JC.log( 'LunarCalendar.constructor' );
            -        /**
            -         * LunarCalendar 的数据模型对象
            -         * @property    _model
            -         * @type    JC.LunarCalendar.Model
            -         * @private
            -         */
            -        this._model = new Model( _container, _date );
            -        /**
            -         * LunarCalendar 的视图对像
            -         * @property    _view
            -         * @type    JC.LunarCalendar.View
            -         * @private
            -         */
            -        this._view = new View( this._model );
            -        
            -        this._init();
            -    }
            -    /**
            -     * 自定义日历组件模板
            -     * <p>默认模板为JC.LunarCalendar.Model#tpl</p>
            -     * <p>如果用户显示定义JC.LunarCalendar.tpl的话, 将采用用户的模板</p>
            -     * @property    tpl
            -     * @type    {string}
            -     * @default empty
            -     * @static
            -     */
            -    LunarCalendar.tpl;
            -    /**
            -     * 设置是否在 dom 加载完毕后, 自动初始化所有日期控件
            -     * @property    autoinit
            -     * @default true
            -     * @type    {bool}
            -     * @static
            -            <script>JC.LunarCalendar.autoInit = true;</script>
            -     */
            -     LunarCalendar.autoInit = true
            -    /**
            -     * 设置默认显示的年份数, 该数为前后各多少年 默认为前后各10年
            -     * @property    defaultYearSpan
            -     * @type        {int}
            -     * @default     20
            -     * @static
            -            <script>JC.LunarCalendar.defaultYearSpan = 20;</script>
            -     */
            -    LunarCalendar.defaultYearSpan = 20
            -    /**
            -     * 从所有的LunarCalendar取得当前选中的日期
            -     * <br /> 如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined
            -     * @method  getSelectedItemGlobal
            -     * @static
            -     * @return  {Object|undefined}  如果能获取到选中的日期将返回 { date: 当天日期, item: 选中的a, td: 选中的td }
            -     */
            -    LunarCalendar.getSelectedItemGlobal = 
            -        function(){
            -            var _r;
            -            $('div.UXCLunarCalendar table.UTableBorder td.cur a').each( function(){
            -                var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm );
            -                _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') };
            -                return false;
            -            });
            -            if( !_r ){
            -                $('div.UXCLunarCalendar table.UTableBorder td.today a').each( function(){
            -                var _tm = $(this).attr('date'), _tmp = new Date(); _tmp.setTime( _tm );
            -                    _r = { 'date': _tmp, 'item': $(this), 'td': $(this).parent('td') };
            -                    return false;
            -                });
            -            }
            -            return _r;
            -        };
            -    /**
            -     * 从所有的LunarCalendar取得当前选中日期的日期对象
            -     * <br /> 如果用户没有显式选中某个日期, 将尝试获取当前日期, 如果两者都没有返回undefined
            -     * @method  getSelectedDateGlobal
            -     * @static
            -     * @return  {date|undefined}    
            -     */
            -    LunarCalendar.getSelectedDateGlobal = 
            -        function(){
            -            var _r, _tmp = LunarCalendar.getSelectedItemGlobal();
            -            if( _tmp && _tmp.date ) _r = _tmp.date;
            -            return _r;
            -        };
            -    /**
            -     * 从时间截获取选择器对象
            -     * @method  getItemByTimestamp
            -     * @static
            -     * @param   {int}                   _tm     时间截, 如果时间截少于13位, 将自动补0到13位, ps: php时间截为10位
            -     * @return  {selector|undefined}    td selector, 如果 td class unable 不可选, 将忽略
            -     */
            -    LunarCalendar.getItemByTimestamp =
            -        function( _tm ){
            -            var _r, _tmp;
            -            if( _tm ){
            -                _tm += '';
            -                (_tm.length < 13) && (_tm += new Array( 13 - _tm.length + 1 ).join('0'));
            -                $('div.UXCLunarCalendar table.UTableBorder td a[date='+_tm+']').each( function(){
            -                    _tmp = $(this).parent('td');
            -                    if( !_tmp.hasClass('unable') ){
            -                        _r = _tmp;
            -                        return false;
            -                    }
            -                });
            -            }
            -            return _r;
            -        };
            -    /**
            -     * 添加或者清除工作日样式
            -     * @method  workday
            -     * @static
            -     * @param   {selector}      _td         要设置为工作日状态的 td 
            -     * @param   {any}           _customSet  如果 _customSet 为 undefined, 将设为工作日. 
            -     *                                      如果 _customSet 非 undefined, 那么根据真假值判断清除工作日/添加工作日
            -     */
            -    LunarCalendar.workday =
            -        function( _td, _customSet ){
            -            _td = $( _td );
            -            if( typeof _customSet != 'undefined' ){
            -                _customSet && _td.removeClass( 'xiuxi' ).addClass( 'shangban' );
            -                !_customSet && _td.removeClass( 'shangban' );
            -            }else _td.removeClass( 'xiuxi' ).addClass( 'shangban' );
            -        };
            -    /**
            -     * 判断 td 是否为工作日状态
            -     * @method  isWorkday
            -     * @static
            -     * @param   {selector}  _td 
            -     * @return  {bool}
            -     */
            -    LunarCalendar.isWorkday =
            -        function( _td ){
            -            _td = $( _td );
            -            return _td.hasClass( 'shangban' );
            -        };
            -    /**
            -     * 添加或者清除假日样式
            -     * @method  holiday
            -     * @static
            -     * @param   {selector}      _td         要设置为假日状态的 td 
            -     * @param   {any}           _customSet  如果 _customSet 为 undefined, 将设为假日. 
            -     *                                      如果 _customSet 非 undefined, 那么根据真假值判断清除假日/添加假日
            -     */
            -    LunarCalendar.holiday =
            -        function( _td, _customSet ){
            -            _td = $( _td );
            -            if( typeof _customSet != 'undefined' ){
            -                _customSet && _td.addClass( 'xiuxi' ).removeClass( 'shangban' );
            -                !_customSet && _td.removeClass( 'xiuxi' );
            -            }else _td.addClass( 'xiuxi' ).removeClass( 'shangban' );
            -        };
            -    /**
            -     * 判断 td 是否为假日状态
            -     * @method  isHoliday
            -     * @static
            -     * @param   {selector}  _td 
            -     * @return  {bool}
            -     */
            -    LunarCalendar.isHoliday =
            -        function( _td ){
            -            _td = $( _td );
            -            return _td.hasClass( 'xiuxi' );
            -        };
            -    /**
            -     * 添加或者清除注释
            -     * @method  comment
            -     * @static
            -     * @param   {selector}      _td         要设置注释的 td 
            -     * @param   {string|bool}   _customSet  如果 _customSet 为 undefined, 将清除注释. 
            -     *                                      如果 _customSet 为 string, 将添加注释
            -     */
            -    LunarCalendar.comment =
            -        function( _td, _customSet ){
            -            var _comment;
            -            _td = $( _td );
            -
            -            if( typeof _customSet == 'string' ){
            -                _comment = _customSet;
            -            }
            -
            -            if( typeof _comment != 'undefined' ){
            -                _td.addClass( 'zhushi' );
            -                LunarCalendar.commentTitle( _td, _comment );
            -                _td.find('a').attr('comment', _comment);
            -            }else{
            -                _td.removeClass( 'zhushi' );
            -                _td.find('a').removeAttr('comment');
            -                LunarCalendar.commentTitle( _td );
            -            }
            -        };
            -    /**
            -     * 判断 td 是否为注释状态
            -     * @method  isComment
            -     * @static
            -     * @param   {selector}  _td 
            -     * @return  {bool}
            -     */
            -    LunarCalendar.isComment =
            -        function( _td ){
            -            _td = $( _td );
            -            return _td.hasClass( 'zhushi' );
            -        };
            -    /**
            -     * 返回 td 的注释
            -     * @method  getComment
            -     * @static
            -     * @param   {selector}  _td 
            -     * @return  {string}
            -     */
            -    LunarCalendar.getComment =
            -        function( _td ){
            -            var _r = '';
            -            if( _td && _td.length ){
            -                _r = _td.find('a').attr('comment') || '';
            -            }
            -            return _r;
            -        };
            -    /**
            -     * 用于分隔默认title和注释的分隔符
            -     * @property    commentSeparator
            -     * @type    string
            -     * @default ==========comment==========
            -     * @static
            -     */
            -    LunarCalendar.commentSeparator = '==========comment==========';
            -    /**
            -     * 把注释添加到 a title 里
            -     * @method  commentTitle
            -     * @static
            -     * @param   {selector}          _td     要设置注释的 a 父容器 td 
            -     * @param   {string|undefined}  _title  如果 _title 为真, 将把注释添加到a title里. 
            -     *                                      如果 _title 为假, 将从 a title 里删除注释
            -     */
            -    LunarCalendar.commentTitle =
            -        function( _td, _title ){
            -            var _a = _td.find( 'a' ), _hasDataTitle = _a.is( '[datatitle]' );
            -
            -            if( _title ){
            -                _title = LunarCalendar.commentSeparator + '\n'+_title;
            -                if( _hasDataTitle ){
            -                    _title = _a.attr('datatitle') + '\n' + _title;
            -                }
            -                _a.attr('title', _title);
            -            }else{
            -                if( _hasDataTitle ){
            -                    _a.attr('title', _a.attr('datatitle') );
            -                }else{
            -                    _a.removeAttr('title');
            -                }
            -            }
            -        };
            -    /**
            -     * 从JSON数据更新日历状态( 工作日, 休息日, 注释 )
            -     * <br /> 注意, 该方法更新页面上所有的 LunarCalendar 
            -     * @method  updateStatus
            -     * @static
            -     * @param   {Object}    _data   { phpTimestamp:{ dayaction: 0|1|2, comment: string}, ... }
            -     *<pre>      
            -     *          dayaction: 
            -     *          0: delete workday/holiday
            -     *          1: workday
            -     *          2: holiday
            -     *</pre>
            -     * @example
            -     *      LunarCalendar.updateStatus(  {
            -                                            "1369843200": {
            -                                                "dayaction": 2,
            -                                                "comment": "dfdfgdsfgsdfgsdg<b></b>'\"'asdf\"\"'sdf"
            -                                            },
            -                                            "1370966400": {
            -                                                "dayaction": 0,
            -                                                "comment": "asdfasdfsa"
            -                                            },
            -                                            "1371139200": {
            -                                                "dayaction": 1
            -                                            },
            -                                            "1371225600": {
            -                                                "dayaction": 0,
            -                                                "comment": "dddd"
            -                                            }
            -                                        });
            -     */
            -    LunarCalendar.updateStatus =
            -        function( _data ){
            -            if( !_data ) return;
            -            $('div.UXCLunarCalendar').each( function(){
            -                var _p = $(this), _ins = _p.data('LunarCalendar'), _tmp;
            -                var _min = 0, _max = 3000000000000;
            -                if( _ins.getContainer().is('[nopreviousfestivals]') ){
            -                    _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime();
            -                }
            -                if( _ins.getContainer().is('[nonextfestivals]') ){
            -                    _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime();
            -                }
            -                //JC.log( _ins, _min, _max );
            -
            -                var _k, _item, _finalk, _itema, _itemtd;
            -                for( var _k in _data ){
            -                    _item = _data[_k];
            -                    _finalk = _k + '';
            -                    _finalk.length < 13 && (_finalk += new Array( 13 - _finalk.length + 1 ).join('0'));
            -                    if( !(_finalk >= _min &&  _finalk < _max) ) continue;
            -
            -                    _itema = _p.find('table.UTableBorder td > a[date='+_finalk+']');
            -                    if( !_itema.length ) continue;
            -                    _itemtd = _itema.parent( 'td' );
            -
            -                    if( 'dayaction' in _item ){
            -                        switch( _item.dayaction ){
            -                            case 1:
            -                                {
            -                                    LunarCalendar.workday( _itemtd );
            -                                    break;
            -                                }
            -
            -                            case 2:
            -                                {
            -                                    LunarCalendar.holiday( _itemtd );
            -                                    break;
            -                                }
            -
            -                            default:
            -                                {
            -                                    LunarCalendar.workday(_itemtd, 0);
            -                                    LunarCalendar.holiday(_itemtd, 0);
            -                                    break;
            -                                }
            -                        }
            -                    }
            -
            -                    if( 'comment' in _item ){
            -                        LunarCalendar.comment( _itemtd, _item['comment'] );
            -                    }
            -                }
            -            });
            -        };
            -
            -    LunarCalendar.prototype = {
            -        /**
            -         * LunarCalendar 内部初始化
            -         * @method  _init
            -         * @private
            -         */
            -        _init:
            -            function(){
            -                this._view.layout.data('LunarCalendar', this);
            -                
            -                return this;
            -            }    
            -        /**
            -         * 更新日历视图为自定义的日期
            -         * @method  update
            -         * @param   {date}  _date   更新日历视图为 _date 所在日期的月份
            -         */
            -        , update:
            -            function( _date ){
            -                if( !_date ) return;
            -                this._view.initLayout( _date );
            -            }
            -        /**
            -         * 显示下一个月的日期
            -         * @method  nextMonth
            -         */
            -        , nextMonth: 
            -            function(){
            -                var _date = this._model.getDate().date;
            -                _date.setMonth( _date.getMonth() + 1 );
            -                this._view.initLayout( _date );
            -            }
            -        /**
            -         * 显示上一个月的日期
            -         * @method  preMonth
            -         */
            -        , preMonth:
            -            function(){
            -                var _date = this._model.getDate().date;
            -                _date.setMonth( _date.getMonth() - 1 );
            -                this._view.initLayout( _date );
            -            }
            -        /**
            -         * 显示下一年的日期
            -         * @method  nextYear
            -         */
            -        , nextYear: 
            -            function(){
            -                var _date = this._model.getDate().date;
            -                _date.setFullYear( _date.getFullYear() + 1 );
            -                this._view.initLayout( _date );
            -            }
            -        /**
            -         * 显示上一年的日期
            -         * @method  preYear
            -         */
            -        , preYear: 
            -            function(){
            -                var _date = this._model.getDate().date;
            -                _date.setFullYear( _date.getFullYear() - 1 );
            -                this._view.initLayout( _date );
            -            }
            -        /**
            -         * 获取默认时间对象
            -         * @method  getDate
            -         * @return  {date}  
            -         */
            -        , getDate: function(){ return this._model.getDate().date;  }
            -        /**
            -         * 获取所有的默认时间对象
            -         * @method getAllDate
            -         * @return  {object}    { date: 默认时间, minvalue: 有效最小时间
            -         *                        , maxvalue: 有效最大时间, beginDate: 日历的起始时间, endDate: 日历的结束时间 }
            -         */
            -        , getAllDate: function(){ return this._model.getDate();  }
            -        /**
            -         * 获取当前选中的日期, 如果用户没有显式选择, 将查找当前日期, 如果两者都没有的话返回undefined
            -         * @method  getSelectedDate
            -         * @return  {date}
            -         */
            -        , getSelectedDate: function(){
            -            var _r;
            -            this._view.layout.find( 'td.cur a').each( function(){
            -                var _tm = $(this).attr('date');
            -                _r = new Date();
            -                _r.setTime( _tm );
            -                return false;
            -            });
            -            if( !_r ){
            -               this._view.layout.find( 'td.today a').each( function(){
            -                    var _tm = $(this).attr('date');
            -                    _r = new Date();
            -                    _r.setTime( _tm );
            -                    return false;
            -                });
            -            }
            -            return _r;
            -        }
            -        /**
            -         * 获取初始化日历的选择器对象
            -         * @method  getContainer
            -         * @return  selector
            -         */
            -        , getContainer: function(){ return this._model.container; }
            -        /**
            -         * 获取日历的主选择器对象
            -         * @method  getLayout
            -         * @return  selector
            -         */
            -        , getLayout: function(){ return this._view.layout; }
            -        /**
            -         * 判断日历是否隐藏操作控件
            -         * @method  isHideControl
            -         * @return  bool
            -         */
            -        , isHideControl: function(){ return this._model.hideControl; }
            -    }
            -    /**
            -     * LunarCalendar 视图类
            -     * @namespace   JC.LunarCalendar
            -     * @class   View
            -     * @constructor
            -     * @param   {JC.LunarCalendar.Model}   _model
            -     */
            -    function View( _model ){
            -        /**
            -         * LunarCalendar model 对象
            -         * @property    _model
            -         * @type    JC.LunarCalendar.Model
            -         * @private
            -         */
            -        this._model = _model;
            -        /**
            -         * LunarCalendar 的主容器
            -         * @property    layout
            -         * @type    selector
            -         */
            -        this.layout;
            -
            -        this._init();
            -    }
            -    
            -    View.prototype = {
            -        /**
            -         * 初始化 View
            -         * @method  _init
            -         * @private
            -         */
            -        _init:
            -            function()
            -            {
            -                this.layout = $( this._model.tpl ).appendTo( this._model.container );
            -                this.initLayout();
            -                return this;
            -            }
            -        /**
            -         * 初始化日历外观
            -         * @method  initLayout
            -         * @param   {date}  _date
            -         */
            -        , initLayout:
            -            function( _date ){
            -                var _dateObj = this._model.getDate();
            -                if( _date ) _dateObj.date = _date;
            -                this.layout.find('table.UTableBorder tbody').html('');
            -
            -                this.initYear( _dateObj );
            -                this.initMonth( _dateObj );
            -                this.initMonthDate( _dateObj );
            -            }
            -        /**
            -         * 初始化年份
            -         * @method  initYear
            -         * @param   {DateObject}    _dateObj
            -         */
            -        , initYear:
            -            function( _dateObj ){
            -                this.layout.find('button.UYear').html(  _dateObj.date.getFullYear() );
            -            }
            -        /**
            -         * 初始化月份
            -         * @method  initMonth
            -         * @param   {DateObject}    _dateObj
            -         */
            -        , initMonth:
            -            function( _dateObj ){
            -                this.layout.find('button.UMonth').html(  _dateObj.date.getMonth() + 1 + '月' );
            -            }
            -        /**
            -         * 初始化月份的所有日期
            -         * @method  _logic.initMonthDate
            -         * @param   {DateObjects}   _dateObj   保存所有相关日期的对象
            -         */
            -        , initMonthDate:
            -            function( _dateObj ){
            -                var _p = this, _layout = this.layout;
            -                var _maxday = maxDayOfMonth( _dateObj.date ), _weekday = _dateObj.date.getDay() || 7
            -                    , _sumday = _weekday + _maxday, _row = 6, _ls = [], _premaxday, _prebegin
            -                    , _tmp, i, _class;
            -
            -                var _beginDate = cloneDate( _dateObj.date );
            -                    _beginDate.setDate( 1 );
            -                var _beginWeekday = _beginDate.getDay() || 7;
            -                if( _beginWeekday < 2 ){
            -                    _beginDate.setDate( -(_beginWeekday-1+6) );
            -                }else{
            -                    _beginDate.setDate( -(_beginWeekday-2) );
            -                }
            -
            -                _dateObj.beginDate = cloneDate( _beginDate );
            -
            -                var today = new Date();
            -
            -                //this._model.title();
            -
            -                _ls.push('<tr>');
            -                for( i = 1; i <= 42; i++ ){
            -                    _class = [];
            -                    if( _beginDate.getDay() === 0 || _beginDate.getDay() == 6 ) _class.push('weekend');
            -                    if( !isSameMonth( _dateObj.date, _beginDate ) ) _class.push( 'other' );
            -                    if( _dateObj.minvalue && _beginDate.getTime() < _dateObj.minvalue.getTime() ) 
            -                        _class.push( 'unable' );
            -                    if( _dateObj.maxvalue && _beginDate.getTime() > _dateObj.maxvalue.getTime() ) 
            -                        _class.push( 'unable' );
            -
            -                    var lunarDate = LunarCalendar.gregorianToLunar( _beginDate );
            -                    var festivals = LunarCalendar.getFestivals( lunarDate, _beginDate );
            -
            -                    var _min = 0, _max = 3000000000000, _curtime = _beginDate.getTime();
            -                    var _title = [ _beginDate.getFullYear(), '年 '
            -                                    , _beginDate.getMonth() + 1, '月 '
            -                                    , _beginDate.getDate(), '日', '\n' ];
            -                    _title.push( '农历 ', lunarDate.yue, lunarDate.ri );
            -                    _title.push( ' ', lunarDate.ganzhi, '【', lunarDate.shengxiao, '】年' );
            -
            -                    if( festivals && festivals.festivals.length ){
            -                        var _festivalsAr = [];
            -                        $.each( festivals.festivals, function( _ix, _item ){
            -                            //JC.log( _item );
            -                            if( _item.fullname ){
            -                                _festivalsAr = _festivalsAr.concat( _item.fullname.split(/[\s]+/) );
            -                            }
            -                        });
            -
            -                        if( _festivalsAr.length ){
            -                            _title.push( '\n节日: ' );
            -                            _title.push( _festivalsAr.join( ', ' ) );
            -                        }
            -                    }
            -
            -                    if( this._model.container.is('[nopreviousfestivals]') ){
            -                        _min = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth(), 1 ).getTime();
            -                    }
            -                    if( this._model.container.is('[nonextfestivals]') ){
            -                        _max = new Date( _dateObj.date.getFullYear(), _dateObj.date.getMonth() + 1, 1 ).getTime();
            -                    }
            -
            -                    if( _curtime >= _min && _curtime < _max ){
            -                        if( festivals.isHoliday ){ _class.push( 'festival' ); _class.push('xiuxi'); }
            -                        if( festivals.isWorkday ) _class.push( 'shangban' );
            -                    }else{
            -                        _class.push('nopointer');
            -                        _class.push('unable');
            -                    }
            -
            -
            -                    this._model.title( _beginDate.getTime(), _title.join('') );
            -
            -                    if( isSameDay( today, _beginDate ) ) _class.push( 'today' );
            -                    _ls.push( '<td class="', _class.join(' '),'">'
            -                            ,'<a href="javascript:" date="', _beginDate.getTime(),'">'
            -                            ,'<b>', _beginDate.getDate(), '</b>'
            -                            ,'<label>', festivals.dayName,  '</label><div></div></a></td>' );
            -                    _beginDate.setDate( _beginDate.getDate() + 1 );
            -                    if( i % 7 === 0 && i != 42 ) _ls.push( '</tr><tr>' );
            -                }
            -                _ls.push('</tr>');
            -                _beginDate.setDate( _beginDate.getDate() - 1 );
            -                _dateObj.endDate = cloneDate( _beginDate );
            -
            -                _layout.find('table.UTableBorder tbody' ).html( $( _ls.join('') ) )
            -                    .find('td').each( function(){
            -                        _p.addTitle( $(this) );
            -                    });
            -
            -                this.hideControl();
            -
            -                JC.log( _prebegin, _premaxday, _maxday, _weekday, _sumday, _row );
            -            }
            -        /**
            -         * 把具体的公历和农历日期写进a标签的title里
            -         * @method  addTitle
            -         * @param   {selector}  _td
            -         */
            -        , addTitle:
            -            function( _td ){
            -                var _a = _td.find('a'), _tm = _a.attr( 'date' ), _title = this._model.title( _tm );
            -                _a.attr('title', _title ).attr('datatitle', _title);
            -            }
            -        /**
            -         * 检查是否要隐藏操作控件
            -         * @method  hideControl
            -         */
            -        , hideControl: 
            -            function(){
            -                if( this._model.hideControl ){
            -                    this.layout.find('select, button.UPreYear, button.UPreMonth, button.UNextMonth, button.UNextYear').hide();
            -                    this.layout.find('table.UHeader').addClass('nopointer');
            -                }
            -            }
            -    };
            -    /**
            -     * LunarCalendar 数据模型类
            -     * @namespace JC.LunarCalendar
            -     * @class   Model
            -     * @constructor
            -     * @param   {selector}      _container
            -     * @param   {date}          _date
            -     */
            -    function Model( _container, _date ){
            -        /**
            -         * LunarCalendar 所要显示的selector
            -         * @property    {selector}  container
            -         * @type    selector
            -         * @default document.body
            -         */
            -        this.container = _container;
            -        /**
            -         * 初始化时的时期
            -         * @property    date
            -         * @type    date    
            -         * @default new Date()
            -         */
            -        this.date = _date;
            -        /**
            -         * 日历默认模板
            -         * @property    tpl
            -         * @type    string
            -         * @default JC.LunarCalendar._deftpl
            -         */
            -        this.tpl;
            -        /**
            -         * 显示日历时所需要的所有日期对象
            -         * @property    dateObj
            -         * @type    Object
            -         */
            -        this.dateObj;
            -        /**
            -         * a 标签 title 的临时存储对象
            -         * @property    _titleObj
            -         * @type    Object
            -         * @default {}
            -         * @private
            -         */
            -        this._titleObj = {};
            -        this.hideControl;
            -
            -        this._init();
            -    }
            -    
            -    Model.prototype = {
            -        _init:
            -            function(){
            -                this.tpl = JC.LunarCalendar.tpl || _deftpl;
            -                this.container.is( '[hidecontrol]' ) && ( this.hideControl = true );
            -                return this;
            -            }
            -        , title: 
            -            function( _key, _title )
            -            {
            -                if( !(_key || _title ) ){
            -                    this._titleObj = {};
            -                    return;
            -                }
            -                _title && ( this._titleObj[_key ] = _title );
            -                return this._titleObj[_key];
            -            }
            -        /**
            -         * 获取初始日期对象
            -         * @method  getDate
            -         * @param   {selector}  _selector   显示日历组件的input
            -         * @private
            -         */
            -        , getDate:
            -            function(){
            -                if( this.dateObj ) return this.dateObj;
            -                var _selector = this.container;
            -                var _r = { date: 0, minvalue: 0, maxvalue: 0 }, _tmp;
            -
            -                if( _tmp = parseISODate( _selector.attr('defaultdate') )) _r.date = _tmp;
            -                else _r.date = new Date();
            -
            -
            -                _r.minvalue = parseISODate( _selector.attr('minvalue') );
            -                _r.maxvalue = parseISODate( _selector.attr('maxvalue') );
            -                
            -                return this.dateObj = _r;
            -            }
            -        /**
            -         * 把日期赋值给文本框
            -         * @method  setDate
            -         * @param   {int}   _timestamp  日期对象的时间戳
            -         * @private
            -         */
            -        , setDate:
            -            function( _timestamp ){
            -                var _d = new Date(), _symbol = '-'; _d.setTime( _timestamp );
            -            }
            -        /**
            -         * 给文本框赋值, 日期为控件的当前日期
            -         * @method  setSelectedDate
            -         * @return  {int}   0/1
            -         * @private
            -         */
            -        , setSelectedDate:
            -            function(){
            -                var _cur;
            -                _cur = this.getLayout().find('table td.cur a');
            -                if( _cur.parent('td').hasClass('unable') ) return 0;
            -                _cur && _cur.length && _cur.attr('date') && this.setDate( _cur.attr('date') );
            -                return 1;
            -            }
            -
            -    };
            -    /**
            -     * 监听上一年按钮
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar button.UPreYear', 'click', function(){
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        var _ins = _selector.data('LunarCalendar');
            -        _ins.preYear();
            -    });
            -    /**
            -     * 监听上一月按钮
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar button.UPreMonth', 'click', function(){
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        var _ins = _selector.data('LunarCalendar');
            -        _ins.preMonth();
            -    });
            -    /**
            -     * 监听下一月按钮
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar button.UNextMonth', 'click', function(){
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        var _ins = _selector.data('LunarCalendar');
            -        _ins.nextMonth();
            -    });
            -    /**
            -     * 监听下一年按钮
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar button.UNextYear', 'click', function(){
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        var _ins = _selector.data('LunarCalendar');
            -        _ins.nextYear();
            -    });
            -    /**
            -     * 监听年份按钮, 是否要显示年份列表 
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar button.UYear', 'click', function( _evt ){
            -        _evt.stopPropagation();
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        var _ins = _selector.data('LunarCalendar');
            -        if( _ins.isHideControl() ) return;
            -        var _date = _ins.getDate(), _year = _date.getFullYear();
            -        var _start = _date.getFullYear() - LunarCalendar.defaultYearSpan
            -            , _over = _date.getFullYear() + LunarCalendar.defaultYearSpan;
            -        var _r = [], _selected = '';
            -        $('div.UXCLunarCalendar select').hide();
            -
            -        for( ; _start < _over; _start++ ){
            -            if( _start === _year ) _selected = ' selected '; else _selected = ''
            -            _r.push( '<option value="', _start, '"', _selected ,'>', _start, '</option>' );
            +;(function(define, _win) { 'use strict'; define( 
            +            [ 
            +                'JC.LunarCalendar.default' 
            +                , 'JC.LunarCalendar.getFestival' 
            +                , 'JC.LunarCalendar.gregorianToLunar' 
            +                , 'JC.LunarCalendar.nationalHolidays' 
            +            ], function(){
            +    /**
            +     * 这个判断是为了向后兼容 JC 0.1
            +     * 使用 requirejs 的项目可以移除这段判断代码
            +     */
            +    JC.use 
            +        && JC.PATH
            +        && JC.use([ 
            +                JC.PATH + 'comps/LunarCalendar/LunarCalendar.default.js'
            +                , JC.PATH + 'comps/LunarCalendar/LunarCalendar.getFestival.js' 
            +                , JC.PATH + 'comps/LunarCalendar/LunarCalendar.gregorianToLunar.js' 
            +                , JC.PATH + 'comps/LunarCalendar/LunarCalendar.nationalHolidays.js' 
            +            ].join())
            +        ;
            +
            +    return JC.LunarCalendar;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
                     }
            -        var _scrollTop = LunarCalendar.defaultYearSpan / 2 * 18;
            -        _ins.getLayout().find('select.UYearList').html(_r.join('')).show().prop('size', 20).scrollTop( _scrollTop );
            -    });
            -    /**
            -     * 监听月份按钮, 是否要显示月份列表 
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar button.UMonth', 'click', function( _evt ){
            -        _evt.stopPropagation();
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        var _ins = _selector.data('LunarCalendar');
            -        if( _ins.isHideControl() ) return;
            -        var _date = _ins.getDate(), _year = _date.getFullYear();
            -        $('div.UXCLunarCalendar select').hide();
            -
            -        _ins.getLayout().find('select.UMonthList').val( _date.getMonth() ).prop('size', 12).show();
            -    });
            -    /**
            -     * 监听年份列表选择状态
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar select.UYearList', 'change', function(){
            -        var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' )
            -            , _ins = _layout.data('LunarCalendar'), _date = _ins.getDate();
            -
            -        _date.setFullYear( _p.val() );
            -        _ins.update( _date );
            -    });
            -    /**
            -     * 监听月份列表选择状态
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar select.UMonthList', 'change', function(){
            -        var _p = $(this), _layout = _p.parents( 'div.UXCLunarCalendar' )
            -            , _ins = _layout.data('LunarCalendar'), _date = _ins.getDate();
            -
            -        _date.setMonth( _p.val() );
            -        _ins.update( _date );
            -    });
            -    /**
            -     * 监听日期单元格点击事件
            -     */
            -    $(document).delegate( 'div.UXCLunarCalendar table.UTableBorder td', 'click', function(){
            -        var _p = $(this), _selector = _p.parents( 'div.UXCLunarCalendar' );
            -        if( !_selector.length ) return;
            -        if( _p.hasClass('unable') ) return;
            -        var _itema = _p.find('> a'), _curtime = _itema.attr('date'), _ins = _selector.data('LunarCalendar');
            -
            -        var _min = 0, _max = 3000000000000;
            -        if( _ins.getContainer().is('[nopreviousfestivals]') ){
            -            _min = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth(), 1 ).getTime();
            -        }
            -        if( _ins.getContainer().is('[nonextfestivals]') ){
            -            _max = new Date( _ins.getDate().getFullYear(), _ins.getDate().getMonth() + 1, 1 ).getTime();
            -        }
            -
            -        if( _curtime >= _min && _curtime < _max ){
            -            $('div.UXCLunarCalendar table.UTableBorder td.cur').removeClass('cur');
            -            _p.addClass('cur');
            -        }
            -    });
            -    /**
            -     * 监听body点击事件, 点击时隐藏日历控件的年份和月份列表
            -     */
            -    $(document).on('click', function(){
            -        $('div.UXCLunarCalendar select').hide();
            -    });
            -    /**
            -     * DOM 加载完毕后, 初始化日历组件
            -     * @event   dom ready
            -     * @private
            -     */
            -    $(document).ready( function($evt){
            -        if( LunarCalendar.autoInit ){
            -            setTimeout( function(){
            -                $('div.js_LunarCalendar, td.js_LunarCalendar, li.js_LunarCalendar').each( function(){
            -                    new LunarCalendar( $(this) );
            -                });
            -            }, 100);
            -        }
            -    });
            -    /**
            -     * LunarCalendar 日历默认模板
            -     * @property    _deftpl
            -     * @type string
            -     * @static
            -     * @private
            -     */
            -    var _deftpl = 
            -        [
            -        '<div id="UXCLunarCalendar" class="UXCLunarCalendar">\n'
            -        ,'    <div class="UXCLunarCalendar_wrapper">\n'
            -        ,'<table class="UHeader">\n'
            -        ,'    <tbody>\n'
            -        ,'        <tr>\n'
            -        ,'            <td class="ULeftControl">\n'
            -        ,'                <button type="button" class="UButton UPreYear">&nbsp;&lt;&lt;&nbsp;</button>\n'
            -        ,'                <button type="button" class="UButton UPreMonth">&nbsp;&lt;&nbsp;</button>\n'
            -        ,'            </td>\n'
            -        ,'            <td class="UMidControl">\n'
            -        ,'                <button type="button" class="UButton UYear">2013</button>\n'
            -        ,'                <select class="UYearList">\n'
            -        ,'                </select>\n'
            -        ,'                <button type="button" class="UButton UMonth">1月</button>\n'
            -        ,'                <select class="UMonthList">\n'
            -        ,'                    <option value=\'0\'>一月</option>\n'
            -        ,'                    <option value=\'1\'>二月</option>\n'
            -        ,'                    <option value=\'2\'>三月</option>\n'
            -        ,'                    <option value=\'3\'>四月</option>\n'
            -        ,'                    <option value=\'4\'>五月</option>\n'
            -        ,'                    <option value=\'5\'>六月</option>\n'
            -        ,'                    <option value=\'6\'>七月</option>\n'
            -        ,'                    <option value=\'7\'>八月</option>\n'
            -        ,'                    <option value=\'8\'>九月</option>\n'
            -        ,'                    <option value=\'9\'>十月</option>\n'
            -        ,'                    <option value=\'10\'>十一月</option>\n'
            -        ,'                    <option value=\'11\'>十二月</option>\n'
            -        ,'                </select>\n'
            -        ,'            </td>\n'
            -        ,'            <td class="URightControl">\n'
            -        ,'                <button type="button" class="UButton UNextMonth">&nbsp;&gt;&nbsp;</button>\n'
            -        ,'                <button type="button" class="UButton UNextYear">&nbsp;&gt;&gt;&nbsp;</button>\n'
            -        ,'            </td>\n'
            -        ,'        </tr>\n'
            -        ,'    </tbody>\n'
            -        ,'</table>\n'
            -        ,'        <table class="UTable UTableThead">\n'
            -        ,'            <thead>\n'
            -        ,'                <tr>\n'
            -        ,'                    <th>一</th>\n'
            -        ,'                    <th>二</th>\n'
            -        ,'                    <th>三</th>\n'
            -        ,'                    <th>四</th>\n'
            -        ,'                    <th>五</th>\n'
            -        ,'                    <th class="weekend">六</th>\n'
            -        ,'                    <th class="weekend">日</th>\n'
            -        ,'                </tr>\n'
            -        ,'            </thead>\n'
            -        ,'       </table>\n'
            -        ,'       <table class="UTable UTableBorder">\n'
            -        ,'            <tbody>\n'
            -        ,'                <!--<tr>\n'
            -        ,'                    <td class="unable"><a href="#"><b>1</b><label>两字</label></a></td>\n'
            -        ,'                    <td class="unable cur"><a href="#"><b>2</b><label>两字</label></a></td>\n'
            -        ,'                    <td class="unable"><a href="#"><b>33</b><label>两字</label></a></td>\n'
            -        ,'                    <td class="unable"><a href="#"><b>44</b><label>两字</label></a></td>\n'
            -        ,'                    <td class="unable"><a href="#"><b>5</b><label>两字</label></a></td>\n'
            -        ,'                    <td class="weekend shangban cur"><a href="#"><b>6</b><label>两字</label></a></td>\n'
            -        ,'                    <td class="weekend"><a href="#"><b>7</b><label>两字</label></a></td>\n'
            -        ,'                </tr>-->\n'
            -        ,'            </tbody>\n'
            -        ,'        </table>\n'
            -        ,'    </div>\n'
            -        ,'</div>\n'
            -        ].join('');    
            -
            -}(jQuery));
            -
            -;
            -
            -;(function($){
            -    JC.LunarCalendar.getFestivals = getFestivals;
            -    /**
            -     * 返回农历和国历的所在日期的所有节日
            -     * <br /> 假日条目数据样例: { 'name': '春节', 'fullname': '春节', 'priority': 8 }
            -     * <br /> 返回数据格式: { 'dayName': 农历日期/节日名, 'festivals': 节日数组, 'isHoliday': 是否为假日 }
            -     * @method getFestivals
            -     * @static
            -     * @for JC.LunarCalendar
            -     * @param   {Object}    _lunarDate      农历日期对象, 由JC.LunarCalendar.gregorianToLunar 获取
            -     * @param   {Date}      _greDate        日期对象
            -     * @return  Object    
            -     */
            -    function getFestivals( _lunarDate, _greDate ){
            -        var _r = { 'dayName': '', 'festivals': [], 'isHoliday': false }
            -            , _lunarDay = [ intPad(_lunarDate.month), intPad(_lunarDate.day) ].join('')
            -            , _greDay = [ intPad(_greDate.getMonth()+1), intPad(_greDate.getDate()) ].join('')
            -            , _greToday = _greDate.getFullYear() + _greDay
            -            ;
            -
            -        _r.dayName = _lunarDate.ri;
            -        if( _r.dayName == '初一' ) _r.dayName = _lunarDate.yue;
            -
            -        if( _greDay in gregorianFes ) _r.festivals.push( gregorianFes[ _greDay ] );
            -        if( _lunarDay in lunarFes ) {
            -            _r.festivals.push( lunarFes[ _lunarDay ] );
            -        }
            - 
            -        if( _lunarDate.month == 12 && _lunarDate.day >= 29 ){
            -            var _tmp = new Date(); _tmp.setTime( _greDate.getTime() ); _tmp.setDate( _tmp.getDate() + 1 );
            -            var _tmpLunar = JC.LunarCalendar.gregorianToLunar( _tmp );
            -            if( _tmpLunar.month === 1 && _tmpLunar.day === 1 ){
            -                var fes = lunarFes['0100'];
            -                _r.festivals.unshift( fes );
            -                _r.dayName = fes.name;
            -            }
            -        }
            -
            -        if( JC.LunarCalendar.nationalHolidays ){
            -            if( _greToday in JC.LunarCalendar.nationalHolidays ){
            -                _r.festivals.push( JC.LunarCalendar.nationalHolidays[ _greToday ] );
            -            }
            -        }
            -       
            -        if( _r.festivals.length ){
            -            for( var i = 0, j = _r.festivals.length - 1; i < j; i++ ){
            -                for( var k = i + 1; k <= j; k++ ){
            -                    if(  _r.festivals[k].priority > _r.festivals[i].priority ){
            -                        var _tmp = _r.festivals[i];
            -                        _r.festivals[i] = _r.festivals[k];
            -                        _r.festivals[k] = _tmp;
            -                    }
            -                }
            -            }
            -            _r.festivals[0].name && (_r.dayName = _r.festivals[0].name);
            -            for( var i = 0, j = _r.festivals.length; i < j; i++ ){
            -                if( _r.festivals[i].isHoliday ){ _r.isHoliday = true; break; }
            -            }
            -            for( var i = 0, j = _r.festivals.length; i < j; i++ ){
            -                if( _r.festivals[i].isWorkday ){ _r.isWorkday = true; break; }
            -            }
            -       }
            -
            -        /*JC.log( _lunarDay, _greDay, _r.festivals.length );*/
            -
            -        return _r;
            -    }
            -
            -    var lunarFes = {
            -        '0101': { 'name': '春节', 'fullname': '春节', 'priority': 8 },  
            -        '0115': { 'name': '元宵节', 'fullname': '元宵节', 'priority': 8 },  
            -        '0505': { 'name': '端午节', 'fullname': '端午节', 'priority': 8 },  
            -        '0707': { 'name': '七夕', 'fullname': '七夕情人节', 'priority': 5 },  
            -        '0715': { 'name': '中元节', 'fullname': '中元节', 'priority': 5 },  
            -        '0815': { 'name': '中秋节', 'fullname': '中秋节', 'priority': 8 },  
            -        '0909': { 'name': '重阳节', 'fullname': '重阳节', 'priority': 5 },  
            -        '1208': { 'name': '腊八节', 'fullname': '腊八节', 'priority': 5 },  
            -        '1223': { 'name': '小年', 'fullname': '小年', 'priority': 5 },  
            -        '0100': { 'name': '除夕', 'fullname': '除夕', 'priority': 8 }
            -    };
            -
            -    var gregorianFes = {
            -        '0101': { 'name': '元旦节', 'fullname': '元旦节', 'priority': 6 },  
            -        '0202': { 'name': '湿地日', 'fullname': '世界湿地日', 'priority': 1 },  
            -        '0210': { 'name': '气象节', 'fullname': '国际气象节', 'priority': 1 },  
            -        '0214': { 'name': '情人节', 'fullname': '情人节', 'priority': 3 },  
            -        '0301': { 'name': '', 'fullname': '国际海豹日', 'priority': 1 },  
            -        '0303': { 'name': '', 'fullname': '全国爱耳日', 'priority': 1 },  
            -        '0305': { 'name': '学雷锋', 'fullname': '学雷锋纪念日', 'priority': 1 },  
            -        '0308': { 'name': '妇女节', 'fullname': '妇女节', 'priority': 3 },  
            -        '0312': { 'name': '植树节', 'fullname': '植树节 孙中山逝世纪念日', 'priority': 2 },  
            -        '0314': { 'name': '', 'fullname': '国际警察日', 'priority': 1 },  
            -        '0315': { 'name': '消权日', 'fullname': '消费者权益日', 'priority': 1 },  
            -        '0317': { 'name': '', 'fullname': '中国国医节 国际航海日', 'priority': 1 },  
            -        '0321': { 'name': '', 'fullname': '世界森林日 消除种族歧视国际日 世界儿歌日', 'priority': 1 },  
            -        '0322': { 'name': '', 'fullname': '世界水日', 'priority': 1 },  
            -        '0323': { 'name': '气象日', 'fullname': '世界气象日', 'priority': 1 },  
            -        '0324': { 'name': '', 'fullname': '世界防治结核病日', 'priority': 1 },  
            -        '0325': { 'name': '', 'fullname': '全国中小学生安全教育日', 'priority': 1 },  
            -        '0401': { 'name': '愚人节', 'fullname': '愚人节 全国爱国卫生运动月(四月) 税收宣传月(四月)', 'priority': 2 },  
            -        '0407': { 'name': '卫生日', 'fullname': '世界卫生日', 'priority': 1 },  
            -        '0422': { 'name': '地球日', 'fullname': '世界地球日', 'priority': 1 },  
            -        '0423': { 'name': '', 'fullname': '世界图书和版权日', 'priority': 1 },  
            -        '0424': { 'name': '', 'fullname': '亚非新闻工作者日', 'priority': 1 },  
            -        '0501': { 'name': '劳动节', 'fullname': '劳动节', 'priority': 6 },  
            -        '0504': { 'name': '青年节', 'fullname': '青年节', 'priority': 1 },  
            -        '0505': { 'name': '', 'fullname': '碘缺乏病防治日', 'priority': 1 },  
            -        '0508': { 'name': '', 'fullname': '世界红十字日', 'priority': 1 },  
            -        '0512': { 'name': '护士节', 'fullname': '国际护士节', 'priority': 1 },  
            -        '0515': { 'name': '家庭日', 'fullname': '国际家庭日', 'priority': 1 },  
            -        '0517': { 'name': '电信日', 'fullname': '国际电信日', 'priority': 1 },  
            -        '0518': { 'name': '', 'fullname': '国际博物馆日', 'priority': 1 },  
            -        '0520': { 'name': '', 'fullname': '全国学生营养日', 'priority': 1 },  
            -        '0523': { 'name': '', 'fullname': '国际牛奶日', 'priority': 1 },  
            -        '0531': { 'name': '无烟日', 'fullname': '世界无烟日', 'priority': 1 },   
            -        '0601': { 'name': '儿童节', 'fullname': '国际儿童节', 'priority': 6 },  
            -        '0605': { 'name': '', 'fullname': '世界环境保护日', 'priority': 1 },  
            -        '0606': { 'name': '', 'fullname': '全国爱眼日', 'priority': 1 },  
            -        '0617': { 'name': '', 'fullname': '防治荒漠化和干旱日', 'priority': 1 },  
            -        '0623': { 'name': '', 'fullname': '国际奥林匹克日', 'priority': 1 },  
            -        '0625': { 'name': '土地日', 'fullname': '全国土地日', 'priority': 1 },  
            -        '0626': { 'name': '禁毒日', 'fullname': '国际禁毒日', 'priority': 1 },  
            -        '0701': { 'name': '', 'fullname': '香港回归纪念日 中共诞辰 世界建筑日', 'priority': 1 },  
            -        '0702': { 'name': '', 'fullname': '国际体育记者日', 'priority': 1 },  
            -        '0707': { 'name': '', 'fullname': '抗日战争纪念日', 'priority': 1 },  
            -        '0711': { 'name': '人口日', 'fullname': '世界人口日', 'priority': 1 },  
            -        '0801': { 'name': '建军节', 'fullname': '建军节', 'priority': 1 },  
            -        '0808': { 'name': '', 'fullname': '中国男子节(爸爸节)', 'priority': 1 },  
            -        '0815': { 'name': '', 'fullname': '抗日战争胜利纪念', 'priority': 1 },  
            -        '0908': { 'name': '', 'fullname': '国际扫盲日 国际新闻工作者日', 'priority': 1 },  
            -        '0909': { 'name': '', 'fullname': '毛逝世纪念', 'priority': 1 },  
            -        '0910': { 'name': '教师节', 'fullname': '中国教师节', 'priority': 6 },   
            -        '0914': { 'name': '地球日', 'fullname': '世界清洁地球日', 'priority': 1 },  
            -        '0916': { 'name': '', 'fullname': '国际臭氧层保护日', 'priority': 1 },  
            -        '0918': { 'name': '九一八', 'fullname': '九·一八事变纪念日', 'priority': 1 },  
            -        '0920': { 'name': '爱牙日', 'fullname': '国际爱牙日', 'priority': 1 },  
            -        '0927': { 'name': '旅游日', 'fullname': '世界旅游日', 'priority': 1 },  
            -        '0928': { 'name': '', 'fullname': '孔子诞辰', 'priority': 1 },  
            -        '1001': { 'name': '国庆节', 'fullname': '国庆节 世界音乐日 国际老人节', 'priority': 6 },  
            -        '1002': { 'name': '', 'fullname': '国际和平与民主自由斗争日', 'priority': 1 },  
            -        '1004': { 'name': '', 'fullname': '世界动物日', 'priority': 1 },  
            -        '1006': { 'name': '', 'fullname': '老人节', 'priority': 1 },  
            -        '1008': { 'name': '', 'fullname': '全国高血压日 世界视觉日', 'priority': 1 },  
            -        '1009': { 'name': '邮政日', 'fullname': '世界邮政日 万国邮联日', 'priority': 1 },  
            -        '1010': { 'name': '', 'fullname': '辛亥革命纪念日 世界精神卫生日', 'priority': 1 },  
            -        '1013': { 'name': '', 'fullname': '世界保健日 国际教师节', 'priority': 1 },  
            -        '1014': { 'name': '', 'fullname': '世界标准日', 'priority': 1 },  
            -        '1015': { 'name': '', 'fullname': '国际盲人节(白手杖节)', 'priority': 1 },  
            -        '1016': { 'name': '粮食日', 'fullname': '世界粮食日', 'priority': 1 },  
            -        '1017': { 'name': '', 'fullname': '世界消除贫困日', 'priority': 1 },  
            -        '1022': { 'name': '', 'fullname': '世界传统医药日', 'priority': 1 },  
            -        '1024': { 'name': '', 'fullname': '联合国日', 'priority': 1 },  
            -        '1031': { 'name': '勤俭日', 'fullname': '世界勤俭日', 'priority': 1 },  
            -        '1107': { 'name': '', 'fullname': '十月社会主义革命纪念日', 'priority': 1 },  
            -        '1108': { 'name': '记者日', 'fullname': '中国记者日', 'priority': 1 },  
            -        '1109': { 'name': '', 'fullname': '全国消防安全宣传教育日', 'priority': 1 },  
            -        '1110': { 'name': '青年节', 'fullname': '世界青年节', 'priority': 3 },  
            -        '1111': { 'name': '', 'fullname': '国际科学与和平周(本日所属的一周)', 'priority': 1 },  
            -        '1112': { 'name': '', 'fullname': '孙中山诞辰纪念日', 'priority': 1 },  
            -        '1114': { 'name': '', 'fullname': '世界糖尿病日', 'priority': 1 },  
            -        '1117': { 'name': '', 'fullname': '国际大学生节 世界学生节', 'priority': 1 },  
            -        '1120': { 'name': '', 'fullname': '彝族年', 'priority': 1 },  
            -        '1121': { 'name': '', 'fullname': '彝族年 世界问候日 世界电视日', 'priority': 1 },  
            -        '1122': { 'name': '', 'fullname': '彝族年', 'priority': 1 },  
            -        '1129': { 'name': '', 'fullname': '国际声援巴勒斯坦人民国际日', 'priority': 1 },  
            -        '1201': { 'name': '', 'fullname': '世界艾滋病日', 'priority': 1 },  
            -        '1203': { 'name': '', 'fullname': '世界残疾人日', 'priority': 1 },  
            -        '1205': { 'name': '', 'fullname': '国际经济和社会发展志愿人员日', 'priority': 1 },  
            -        '1208': { 'name': '', 'fullname': '国际儿童电视日', 'priority': 1 },  
            -        '1209': { 'name': '足球日', 'fullname': '世界足球日', 'priority': 1 },  
            -        '1210': { 'name': '人权日', 'fullname': '世界人权日', 'priority': 1 },  
            -        '1212': { 'name': '', 'fullname': '西安事变纪念日', 'priority': 1 },  
            -        '1213': { 'name': '大屠杀', 'fullname': '南京大屠杀(1937年)纪念日!紧记血泪史!', 'priority': 1 },  
            -        '1220': { 'name': '', 'fullname': '澳门回归纪念', 'priority': 1 },  
            -        '1221': { 'name': '篮球日', 'fullname': '国际篮球日', 'priority': 1 },  
            -        '1224': { 'name': '平安夜', 'fullname': '平安夜', 'priority': 1 },  
            -        '1225': { 'name': '圣诞节', 'fullname': '圣诞节', 'priority': 1 },  
            -        '1226': { 'name': '', 'fullname': '毛诞辰纪念', 'priority': 1 }
            -    };
            -
            -    var byDayOrWeekFes = {
            -        '0150': { 'name': '麻风日', 'fullname': '世界麻风日', 'priority': 1 }, //一月的最后一个星期日(月倒数第一个星期日)  
            -        '0520': { 'name': '母亲节', 'fullname': '国际母亲节', 'priority': 1 },  
            -        '0530': { 'name': '助残日', 'fullname': '全国助残日', 'priority': 1 },  
            -        '0630': { 'name': '父亲节', 'fullname': '父亲节', 'priority': 1 },  
            -        '0730': { 'name': '', 'fullname': '被奴役国家周', 'priority': 1 },  
            -        '0932': { 'name': '和平日', 'fullname': '国际和平日', 'priority': 1 },  
            -        '0940': { 'name': '聋人节 世界儿童日', 'fullname': '国际聋人节 世界儿童日', 'priority': 1 },  
            -        '0950': { 'name': '海事日', 'fullname': '世界海事日', 'priority': 1 },  
            -        '1011': { 'name': '住房日', 'fullname': '国际住房日', 'priority': 1 },  
            -        '1013': { 'name': '减灾日', 'fullname': '国际减轻自然灾害日(减灾日)', 'priority': 1 },  
            -        '1144': { 'name': '感恩节', 'fullname': '感恩节', 'priority': 1 }
            -    };
            -
            -    /**
            -     * 为数字添加前置0
            -     * @method  JC.LunarCalendar.getFestival.intPad
            -     * @param   {int}   _n      需要添加前置0的数字
            -     * @param   {int}   _len    需要添加_len个0, 默认为2
            -     * @return  {string}
            -     * @static
            -     * @private
            -     */
            -    function intPad( _n, _len ){
            -        if( typeof _len == 'undefined' ) _len = 2;
            -        _n = new Array( _len + 1 ).join('0') + _n;
            -        return _n.slice( _n.length - _len );
            -    }
            -
            -}(jQuery));
            -;
            -
            -;(function($){
            -    /**
            -     * 从公历日期获得农历日期
            -     * <br /> 返回的数据格式
            -     * <pre>
            -        {
            -            shengxiao: ''   //生肖
            -            , ganzhi: ''    //干支
            -            , yue: ''       //月份
            -            , ri: ''        //日
            -            , shi: ''       //时
            -            , year: ''      //农历数字年
            -            , month: ''     //农历数字月
            -            , day: ''       //农历数字天
            -            , hour: ''      //农历数字时
            -        };
            -     * </pre>
            -     * @method  gregorianToLunar
            -     * @static
            -     * @for     JC.LunarCalendar
            -     * @param   {date}  _date      要获取农历日期的时间对象
            -     * @return  Object
            -     */
            -    JC.LunarCalendar.gregorianToLunar = gregorianToLunar;
            -
            -    function gregorianToLunar( _date ){
            -        var _r = {
            -            shengxiao: ''   //生肖
            -            , ganzhi: ''    //干支
            -            , yue: ''       //月份
            -            , ri: ''        //日
            -            , shi: ''       //时
            -            , year: ''      //农历数字年
            -            , month: ''     //农历数字月
            -            , day: ''       //农历数字天
            -            , hour: ''      //农历数字时
            -        };
            -
            -        var _lunar = toLunarDate( _date );
            -        _r.year = _lunar.y;
            -        _r.month = _lunar.m + 1;
            -        _r.day = _lunar.d;
            -
            -        //JC.log( _r.year, _r.month, _r.day, ' ', _date.getFullYear(), _date.getMonth()+1, _date.getDate() );
            -
            -        _r.shengxiao = shengxiao.charAt((_r.year - 4) % 12);
            -        _r.ganzhi = tiangan.charAt((_r.year - 4) % 10) + dizhi.charAt((_r.year - 4) % 12);
            -
            -        if(_lunar.isleep) {
            -            _r.yue = "闰" + yuefan.charAt(_r.month - 1);
            -        }
            -        else{
            -            _r.yue = yuefan.charAt(_r.month - 1);
            -        }
            -        _r.yue += '月';
            -
            -        _r.ri = (_r.day < 11) ? "初" : ((_r.day < 20) ? "十" : ((_r.day < 30) ? "廿" : "卅"));
            -        if (_r.day % 10 != 0 || _r.day == 10) {
            -            _r.ri += shuzi.charAt((_r.day - 1) % 10);
            -        }
            -        _r.ri == "廿" && ( _r.ri = "二十" );
            -        _r.ri == "卅" && ( _r.ri = "三十" );
            -        /*JC.log( 'month:', _r.month, 2 );*/
            -
            -        _r.shi = dizhi.charAt((_r.hour - 1) % 12);
            -        return _r;
            -    };
            -
            -    function getBit(m, n) { return (m >> n) & 1; }
            -
            -    var tiangan =  "甲乙丙丁戊己庚辛壬癸";
            -    var dizhi =  "子丑寅卯辰巳午未申酉戌亥";
            -    var shengxiao =  "鼠牛虎兔龙蛇马羊猴鸡狗猪";
            -    var yuefan =  "正二三四五六七八九十冬腊";
            -    var xingqi =  "日一二三四五六";
            -    var shuzi =  "一二三四五六七八九十";
            -    var lunarDays = [0x41A95,0xD4A,0xDA5,0x20B55,0x56A,0x7155B,0x25D,0x92D,0x5192B,0xA95,0xB4A,0x416AA,0xAD5,0x90AB5,0x4BA,0xA5B,0x60A57,0x52B,0xA93,0x40E95];
            -    var lunarMonth = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
            -
            -    ;void function(){
            -    var lunarDate=function(r){function l(a){for(var c=348,b=32768;b>8;b>>=1)c+=h[a-1900]&b?1:0;return c+(i(a)?(h[a-1899]&15)==15?30:29:0)}function i(a){a=h[a-1900]&15;return a==15?0:a}function o(a){if(!a||!a.getFullYear)return!1;var c=a.getFullYear(),b=a.getMonth(),a=a.getDate();return Date.UTC(c,b,a)>Date.UTC(2101,0,28)||Date.UTC(c,b,a)<Date.UTC(1900,0,31)?!0:!1}var h=[19416,19168,42352,21717,53856,55632,21844,22191,39632,21970,19168,42422,42192,53840,53845,46415,54944,44450,38320,18807,18815,42160,
            -    46261,27216,27968,43860,11119,38256,21234,18800,25958,54432,59984,27285,23263,11104,34531,37615,51415,51551,54432,55462,46431,22176,42420,9695,37584,53938,43344,46423,27808,46416,21333,19887,42416,17779,21183,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,38310,38335,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,
            -    43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,20854,21183,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,53430,53855,54560,56645,46496,22224,21938,18864,42359,42160,43600,45653,27951,44448,19299,37759,18936,18800,25776,26790,59999,27424,42692,43759,37600,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,19285,19311,42352,21732,53856,
            -    59752,54560,55968,27302,22239,19168,43476,42192,53584,62034,54560],g="\u96f6,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d,\u4e03,\u516b,\u4e5d,\u5341".split(","),p=["\u521d","\u5341","\u5eff","\u5345","\u25a1"],s="\u7532,\u4e59,\u4e19,\u4e01,\u620a,\u5df1,\u5e9a,\u8f9b,\u58ec,\u7678".split(","),t="\u5b50,\u4e11,\u5bc5,\u536f,\u8fb0,\u5df3,\u5348,\u672a,\u7533,\u9149,\u620c,\u4ea5".split(","),u="\u9f20,\u725b,\u864e,\u5154,\u9f99,\u86c7,\u9a6c,\u7f8a,\u7334,\u9e21,\u72d7,\u732a".split(","),q="\u5c0f\u5bd2,\u5927\u5bd2,\u7acb\u6625,\u96e8\u6c34,\u60ca\u86f0,\u6625\u5206,\u6e05\u660e,\u8c37\u96e8,\u7acb\u590f,\u5c0f\u6ee1,\u8292\u79cd,\u590f\u81f3,\u5c0f\u6691,\u5927\u6691,\u7acb\u79cb,\u5904\u6691,\u767d\u9732,\u79cb\u5206,\u5bd2\u9732,\u971c\u964d,\u7acb\u51ac,\u5c0f\u96ea,\u5927\u96ea,\u51ac\u81f3".split(","),
            -    v=[0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795,462224,483532,504758],m=r||new Date;this.date=m;this.toLunarDate=function(a){a=a||m;if(o(a)){return"the function[toLunarDate()]range[1900/0/31-2101/0/28]";throw"dateRangeError";}for(var c=a.getFullYear(),b=a.getMonth(),a=a.getDate(),c=(Date.UTC(c,b,a)-Date.UTC(1900,0,31))/864E5,d,b=1900;b<2100&&c>0;b++)d=l(b),c-=d;c<0&&(c+=d,b--);lunarYear=b;_isLeap=!1;leap=
            -    i(lunarYear);for(b=1;b<13&&c>0;b++)leap>0&&b==leap+1&&_isLeap==!1?(b--,_isLeap=!0,d=i(lunarYear)?(h[lunarYear-1899]&15)==15?30:29:0):d=h[lunarYear-1900]&65536>>b?30:29,_isLeap==!0&&b==leap+1&&(_isLeap=!1),c-=d;c==0&&leap>0&&b==leap+1&&(_isLeap?_isLeap=!1:(_isLeap=!0,b--));c<0&&(c+=d,b--);lunarMonth=b-1;lunarDay=c+1;return{y:lunarYear,m:lunarMonth,d:lunarDay,leap:leap,isleep:_isLeap,toString:function(){var a=_isLeap?"(\u95f0)":"",b=g[parseInt(lunarYear/1E3)]+g[parseInt(lunarYear%1E3/100)]+g[parseInt(lunarYear%
            -    100/10)]+g[parseInt(lunarYear%10)],c=parseInt((lunarMonth+1)/10)==0?"":p[1];c+=g[parseInt((lunarMonth+1)%10)];var d=p[parseInt(lunarDay/10)];d+=parseInt(lunarDay%10)==0?"":g[parseInt(lunarDay%10)];return""+b+"\u5e74"+c+"\u6708"+a+d+"\u65e5"}}};this.toSolar=function(){if(arguments.length==0)return m;else{var a,c,b;arguments[0]&&(a=arguments[0]);c=arguments[1]?arguments[1]:0;b=arguments[2]?arguments[2]:1;for(var d=0,e=1900;e<a;e++){var f=l(e);d+=f}for(e=0;e<c;e++)f=h[a-1900]&65536>>e?30:29,d+=f;d+=
            -    b-1;return new Date(Date.UTC(1900,0,31)+d*864E5)}};this.ganzhi=function(a){function c(a,b){return(new Date(3.15569259747E10*(a-1900)+v[b]*6E4+Date.UTC(1900,0,6,2,5))).getUTCDate()}function b(a){return s[a%10]+t[a%12]}var d=a||m;if(o(d)){return"the function[ganzhi()] date'range[1900/0/31-2101/0/28]";throw"dateRangeError";}var e=d.getFullYear(),f=d.getMonth(),a=d.getDate(),d=d.getHours(),h,g,k,j,n;g=f<2?e-1900+36-1:e-1900+36;k=(e-1900)*12+f+12;h=c(e,f*2);var i=c(e,f*2+1);h=a==h?q[f*2]:a==i?q[f*2+1]:
            -    "";var i=c(e,2),l=c(e,f*2);f==1&&a>=i&&(g=e-1900+36);a+1>=l&&(k=(e-1900)*12+f+13);j=Date.UTC(e,f,1,0,0,0,0)/864E5+25577+a-1;n=j%10%5*12+parseInt(d/2)%12;d==23&&j++;g%=60;k%=60;j%=60;n%=60;return{y:g,m:k,d:j,h:n,jie:h,animal:u[g%12],toString:function(a){var c=b(g)+b(k)+b(j)+b(n);return a?c.substring(0,a):c}}}};
            -        lunarDate();
            -    }.call( window );
            -}(jQuery));
            -;
            +        , window
            +    )
            +);
             
            -;(function($){
            -    var o = JC.LunarCalendar.nationalHolidays = JC.LunarCalendar.nationalHolidays || {};
            -    //2013 元旦
            -    o['20130101'] = { 'isHoliday': true };
            -    o['20130102'] = { 'isHoliday': true };
            -    o['20130103'] = { 'isHoliday': true };
            -    o['20130104'] = { 'isWorkday': true };
            -    o['20130105'] = { 'isWorkday': true };
            -    //除夕 春节
            -    o['20130209'] = { 'isHoliday': true };
            -    o['20130210'] = { 'isHoliday': true };
            -    o['20130211'] = { 'isHoliday': true };
            -    o['20130212'] = { 'isHoliday': true };
            -    o['20130213'] = { 'isHoliday': true };
            -    o['20130214'] = { 'isHoliday': true };
            -    o['20130215'] = { 'isHoliday': true };
            -    o['20130216'] = { 'isWorkday': true };
            -    o['20130217'] = { 'isWorkday': true };
            -    //清明
            -    o['20130404'] = { 'name': '清明节', 'fullname': '清明节', 'priority': 8, 'isHoliday': true };
            -    o['20130405'] = { 'isHoliday': true };
            -    o['20130406'] = { 'isHoliday': true };
            -    o['20130407'] = { 'isWorkday': true };
            -    //劳动节
            -    o['20130427'] = { 'isWorkday': true };
            -    o['20130428'] = { 'isWorkday': true };
            -    o['20130429'] = { 'isHoliday': true };
            -    o['20130430'] = { 'isHoliday': true };
            -    o['20130501'] = { 'isHoliday': true };
            -    //端午节
            -    o['20130608'] = { 'isWorkday': true };
            -    o['20130609'] = { 'isWorkday': true };
            -    o['20130610'] = { 'isHoliday': true };
            -    o['20130611'] = { 'isHoliday': true };
            -    o['20130612'] = { 'isHoliday': true };
            -    //中秋节
            -    o['20130919'] = { 'isHoliday': true };
            -    o['20130920'] = { 'isHoliday': true };
            -    o['20130921'] = { 'isHoliday': true };
            -    o['20130922'] = { 'isWorkday': true };
            -    //国庆节
            -    o['20130929'] = { 'isWorkday': true };
            -    o['20131001'] = { 'isHoliday': true };
            -    o['20131002'] = { 'isHoliday': true };
            -    o['20131003'] = { 'isHoliday': true };
            -    o['20131004'] = { 'isHoliday': true };
            -    o['20131005'] = { 'isHoliday': true };
            -    o['20131006'] = { 'isHoliday': true };
            -    o['20131007'] = { 'isHoliday': true };
            -    o['20131012'] = { 'isWorkday': true };
            -    //2014 元旦
            -    o['20131228'] = { 'isWorkday': true };
            -    o['20131229'] = { 'isWorkday': true };
            -    o['20131230'] = { 'isHoliday': true };
            -    o['20131231'] = { 'isHoliday': true };
            -    o['20140101'] = { 'isHoliday': true };
            -    //除夕 春节
            -    o['20140126'] = { 'isWorkday': true };
            -    o['20140130'] = { 'isHoliday': true };
            -    o['20140131'] = { 'isHoliday': true };
            -    o['20140201'] = { 'isHoliday': true };
            -    o['20140202'] = { 'isHoliday': true };
            -    o['20140203'] = { 'isHoliday': true };
            -    o['20140204'] = { 'isHoliday': true };
            -    o['20140205'] = { 'isHoliday': true };
            -    o['20140208'] = { 'isWorkday': true };
            -    //清明节
            -    o['20140405'] = { 'name': '清明节', 'fullname': '清明节', 'priority': 8, 'isHoliday': true };
            -    o['20140406'] = { 'isHoliday': true };
            -    o['20140407'] = { 'isHoliday': true };
            -    //劳动节
            -    o['20140501'] = { 'isHoliday': true };
            -    o['20140502'] = { 'isHoliday': true };
            -    o['20140503'] = { 'isHoliday': true };
            -    o['20140504'] = { 'isWorkday': true };
            -    //端午节
            -    o['20140531'] = { 'isHoliday': true };
            -    o['20140601'] = { 'isHoliday': true };
            -    o['20140602'] = { 'isHoliday': true };
            -    //中秋节
            -    o['20140906'] = { 'isHoliday': true };
            -    o['20140907'] = { 'isHoliday': true };
            -    o['20140908'] = { 'isHoliday': true };
            -    //国庆节
            -    o['20140928'] = { 'isWorkday': true };
            -    o['20141001'] = { 'isHoliday': true };
            -    o['20141002'] = { 'isHoliday': true };
            -    o['20141003'] = { 'isHoliday': true };
            -    o['20141004'] = { 'isHoliday': true };
            -    o['20141005'] = { 'isHoliday': true };
            -    o['20141006'] = { 'isHoliday': true };
            -    o['20141007'] = { 'isHoliday': true };
            -    o['20141011'] = { 'isWorkday': true };
            -}(jQuery));
             
                 
            diff --git a/docs_api/files/.._comps_NumericStepper_NumericStepper.js.html b/docs_api/files/.._comps_NumericStepper_NumericStepper.js.html new file mode 100644 index 000000000..acdc968ae --- /dev/null +++ b/docs_api/files/.._comps_NumericStepper_NumericStepper.js.html @@ -0,0 +1,653 @@ + + + + + ../comps/NumericStepper/NumericStepper.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/NumericStepper/NumericStepper.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * 数值加减
            + * <br />响应式初始化
            + *
            + *<p><b>require</b>:
            + *   <a href=".jQuery.html">jQuery</a>
            + *   , <a href="JC.common.html">JC.common</a>
            + *   , <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/JC.NumericStepper.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/NumericStepper/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会处理 (div|span) class="js_compNumericStepper"</h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *<dl>
            + *    <dt>cnsMinusButton = selector</dt>
            + *    <dd>减少数值的 selector<dd>
            + *
            + *    <dt>cnsPlusButton = selector</dt>
            + *    <dd>增加数值的 selector<dd>
            + *
            + *    <dt>cnsTarget = selector</dt>
            + *    <dd>目标文本框的 selector</dd>
            + *
            + *    <dt>cnsChangeCb = function</dt>
            + *    <dd>内容改变后的回调
            +<pre>function cnsChangeCb( _newVal, _oldVal, _ins ){
            +    var _ipt = $(this);
            +    JC.log( 'cnsChangeCb: ', _newVal, _oldVal );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>cnsBeforeChangeCb = function</dt>
            + *    <dd>内容改变前的回调, 如果显式返回 false 将终止内容变更
            +<pre>function cnsBeforeChangeCb( _newVal, _oldVal, _ins ){
            +    var _ipt = $(this);
            +    JC.log( 'cnsBeforeChangeCb: ', _newVal, _oldVal );
            +    if( _newVal > 5 ) return false;
            +}</pre>
            + *    </dd>
            + *</dl> 
            + *<h2>textbox 可用的 HTML attribute</h2>
            + *<dl>
            + *    <dt>minvalue = number</dt>
            + *    <dd>最小值</dd>
            + *
            + *    <dt>maxvalue = number</dt>
            + *    <dd>最大值</dd>
            + *
            + *    <dt>step = number, default = 1</dt>
            + *    <dd>每次变更的步长</dd>
            + *
            + *    <dt>fixed = int, default = 0</dt>
            + *    <dd>显示多少位小数点</dd>
            + *</dl>
            + *
            + * @namespace   JC
            + * @class       NumericStepper
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-01-18
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <h2>JC.NumericStepper 示例</h2>
            +        <span class="js_compNumericStepper"
            +            cnsMinusButton="|button:first"
            +            cnsPlusButton="|button:last"
            +            cnsTarget="|input[type=text]"
            +            cnsChangeCb="cnsChangeCb"
            +            >
            +            <button type="button" class="cnsIcon cnsMinus"></button>
            +            <input type="text" value="0" class="ipt" minvalue="0" maxvalue="10" />
            +            <button type="button" class="cnsIcon cnsPlus"></button>
            +        </span>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.NumericStepper = NumericStepper;
            +
            +    function NumericStepper( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, NumericStepper ) ) 
            +            return JC.BaseMVC.getInstance( _selector, NumericStepper );
            +
            +        JC.BaseMVC.getInstance( _selector, NumericStepper, this );
            +
            +        this._model = new NumericStepper.Model( _selector );
            +        this._view = new NumericStepper.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( NumericStepper.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 NumericStepper 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of NumericStepperInstance}
            +     */
            +    NumericStepper.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compNumericStepper' )  ){
            +                    _r.push( new NumericStepper( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compNumericStepper, span.js_compNumericStepper' ).each( function(){
            +                        _r.push( new NumericStepper( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +    /**
            +     * 按下鼠标时 重复执行的频率
            +     * @property    redoMs
            +     * @type        ms
            +     * @default     100
            +     * @static
            +     */
            +    NumericStepper.redoMs = 100;
            +    /**
            +     * 按下鼠标时 延迟 多少毫秒执行重复执行
            +     * @property    timeoutMs
            +     * @type        ms
            +     * @default     100
            +     * @static
            +     */
            +    NumericStepper.timeoutMs = 500;
            +
            +    NumericStepper.defaultMouseUp =
            +        function( _evt ){
            +            if( !NumericStepper._currentIns ) return;
            +            JC.f.safeTimeout( null, NumericStepper._currentIns._model.cnsTarget(), NumericStepper.Model.REDO_TM_NAME );
            +            NumericStepper.Model.interval && clearInterval( NumericStepper.Model.interval );
            +        };
            +    NumericStepper._currentIns;
            +
            +    JC.BaseMVC.build( NumericStepper );
            +
            +    JC.f.extendObject( NumericStepper.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'NumericStepper _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p._model.cnsMinusButton() 
            +                    && ( _p._model.cnsMinusButton().on( 'mousedown', function( _evt ){
            +
            +                        NumericStepper._currentIns = _p;
            +                        _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_MINUS ] );
            +
            +                        JC.f.safeTimeout( function(){
            +                            NumericStepper.Model.interval && clearInterval( NumericStepper.Model.interval );
            +                            NumericStepper.Model.interval =
            +                                setInterval( function(){
            +                                    _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_MINUS ] );
            +                                }, _p._model.cnsRedoMs() );
            +                        }, _p._model.cnsTarget(), NumericStepper.Model.REDO_TM_NAME, _p._model.cnsTimeoutMs() );
            +
            +                        _jwin.on( 'mouseup', NumericStepper.defaultMouseUp );
            +                    }), _p._model.cnsMinusButton().each( function(){ 
            +                        BaseMVC.getInstance( $( this ), NumericStepper, _p );
            +                    } ) );
            +
            +                _p._model.cnsPlusButton() 
            +                    && ( _p._model.cnsPlusButton().on( 'mousedown', function( _evt ){
            +
            +                        NumericStepper._currentIns = _p;
            +                        _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_PLUS ] );
            +
            +                        JC.f.safeTimeout( function(){
            +                            NumericStepper.Model.interval && clearInterval( NumericStepper.Model.interval );
            +                            NumericStepper.Model.interval =
            +                                setInterval( function(){
            +                                    _p.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_PLUS ] );
            +                                }, _p._model.cnsRedoMs() );
            +                        }, _p._model.cnsTarget(), NumericStepper.Model.REDO_TM_NAME, _p._model.cnsTimeoutMs() );
            +
            +                        _jwin.on( 'mouseup', NumericStepper.defaultMouseUp );
            +                    }), _p._model.cnsPlusButton().each( function(){ 
            +                        BaseMVC.getInstance( $( this ), NumericStepper, _p );
            +                    } ) );
            +
            +                _p.on( NumericStepper.Model.CALC, function( _evt, _type ){
            +                    if( !( _p._model.cnsTarget() && _p._model.cnsTarget().length ) ) return;
            +                    //JC.log( 'NumericStepper.Model.CALC', _type );
            +                    var _val = _p._model.val()
            +                        , _newVal = _val
            +                        , _step = _p._model.step()
            +                        , _fixed = _p._model.fixed()
            +                        , _minvalue = _p._model.minvalue()
            +                        , _maxvalue = _p._model.maxvalue()
            +                        ;
            +
            +                    switch( _type ){
            +                        case NumericStepper.Model.CALC_MINUS:
            +                            _newVal -= _step;
            +
            +                            _p._model.isMinvalue() 
            +                                && _newVal < _minvalue
            +                                && ( _newVal = _minvalue )
            +                                ;
            +                            break;
            +
            +                        case NumericStepper.Model.CALC_PLUS:
            +                            _newVal += _step;
            +
            +                            _p._model.isMaxvalue() 
            +                                && _newVal > _maxvalue 
            +                                && ( _newVal = _maxvalue )
            +                                ;
            +                            break;
            +                    }
            +
            +                    //JC.log( _p._model.isMaxvalue(), _newVal, _val, _step, _fixed, _minvalue, _minvalue, new Date().getTime() );
            +                    if( _newVal === _val ) return;
            +
            +                    if( _p._model.cnsBeforeChangeCb() 
            +                            && _p._model.cnsBeforeChangeCb().call( _p._model.cnsTarget(), _newVal, _val, _p ) === false ) return;
            +
            +                    _p._model.cnsTarget().val( JC.f.parseFinance( _newVal, _fixed ).toFixed( _fixed ) );
            +
            +                    _p._model.cnsChangeCb() 
            +                        && _p._model.cnsChangeCb().call( _p._model.cnsTarget(), _newVal, _val, _p )
            +                        ;
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'NumericStepper _inited', new Date().getTime() );
            +                this._view.initStyle();
            +            }
            +        /**
            +         * 增加一个 step
            +         * @method  plus
            +         */
            +        , plus: 
            +            function(){
            +                this.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_PLUS ] );
            +                return this;
            +            }
            +        /**
            +         * 减少一个 step
            +         * @method  minus
            +         */
            +        , minus:
            +            function(){
            +                this.trigger( NumericStepper.Model.CALC, [ NumericStepper.Model.CALC_MINUS ] );
            +                return this;
            +            }
            +    });
            +
            +    NumericStepper.Model._instanceName = 'JCNumericStepper';
            +
            +    NumericStepper.Model.CALC = 'calc';
            +    NumericStepper.Model.CALC_MINUS = 'minus';
            +    NumericStepper.Model.CALC_PLUS = 'plus';
            +
            +    NumericStepper.Model.CLASS_ICON = 'cnsIcon';
            +    NumericStepper.Model.CLASS_MINUS = 'cnsMinus';
            +    NumericStepper.Model.CLASS_PLUS = 'cnsPlus';
            +
            +    NumericStepper.Model.REDO_TM_NAME = "cnsTm";
            +
            +    JC.f.extendObject( NumericStepper.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'NumericStepper.Model.init:', new Date().getTime() );
            +            }
            +
            +        , cnsTarget: function(){ return this.selectorProp( 'cnsTarget' ); }
            +
            +        , cnsMinusButton: function(){ return this.selectorProp( 'cnsMinusButton' ); }
            +        , cnsPlusButton: function(){ return this.selectorProp( 'cnsPlusButton' ); }
            +
            +        , cnsBeforeChangeCb: function(){ return this.callbackProp( 'cnsBeforeChangeCb' ) || NumericStepper.beforeChangeCb; }
            +        , cnsChangeCb: function(){ return this.callbackProp( 'cnsChangeCb' ) || NumericStepper.changeCb; }
            +
            +        , cnsRedoMs: function(){ return this.intProp( 'cnsRedoMs' ) || NumericStepper.redoMs; }
            +        , cnsTimeoutMs: function(){ return this.intProp( 'cnsTimeoutMs' ) || NumericStepper.timeoutMs; }
            +
            +        , isMinvalue: function(){ return this.cnsTarget().is( '[minvalue]' ); }
            +        , isMaxvalue: function(){ return this.cnsTarget().is( '[maxvalue]' ); }
            +
            +        , val: function(){ return this.getVal( this.cnsTarget().val() ); }
            +
            +        , minvalue: function(){ return this.getVal( this.cnsTarget().attr( 'minvalue' ) ); }
            +        , maxvalue: function(){ return this.getVal( this.cnsTarget().attr( 'maxvalue' ) ); }
            +
            +        , step: function(){ return this.getVal( this.cnsTarget().attr( 'step' ) ) || 1; }
            +        , fixed: function(){ return this.getVal( this.cnsTarget().attr( 'fixed' ) ) || 0; }
            +
            +        , getVal: 
            +            function( _v ){
            +                var _r = 0;
            +                _v && ( _v = _v.toString().trim() );
            +
            +                if( _v ){
            +
            +                    if( /\./.test( _v ) ){
            +                        _r = JC.f.parseFinance( _v, _v.split('.')[1].length || this.fixed() );
            +                    }else{
            +                        _r = parseInt( _v, 10 ) || 0;
            +                    }
            +                }
            +
            +                return _r;
            +            }
            +    });
            +
            +    JC.f.extendObject( NumericStepper.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'NumericStepper.View.init:', new Date().getTime() );
            +            }
            +
            +        , initStyle:
            +            function(){
            +                var _p = this;
            +
            +                _p._model.cnsMinusButton() 
            +                    && _p._model.cnsMinusButton()
            +                        .addClass( NumericStepper.Model.CLASS_ICON )
            +                        .addClass( NumericStepper.Model.CLASS_MINUS )
            +                    ;
            +
            +                _p._model.cnsPlusButton() 
            +                    && _p._model.cnsPlusButton()
            +                        .addClass( NumericStepper.Model.CLASS_ICON )
            +                        .addClass( NumericStepper.Model.CLASS_PLUS )
            +                    ;
            +            }
            +    });
            +
            +    _jdoc.ready( function(){
            +        //NumericStepper.autoInit && NumericStepper.init();
            +    });
            +
            +    $( document ).delegate( 'div.js_compNumericStepper, span.js_compNumericStepper', 'mouseenter', function( _evt ){
            +        var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, NumericStepper );
            +        !_ins && ( new NumericStepper( _p ) );
            +    });
            +
            +    $( document ).delegate( 'div.js_compNumericStepper .cnsIcon, span.js_compNumericStepper .cnsIcon', 'click', function( _evt ){
            +        var _p = $( this ), _ins = JC.BaseMVC.getInstance( _p, NumericStepper );
            +
            +        if( !_ins ){
            +            var _pnt = JC.f.getJqParent( _p, '.js_compNumericStepper' );
            +            if( !( _pnt && _pnt.length ) ) return;
            +            _ins = new NumericStepper( _pnt );
            +            _p.hasClass( 'cnsPlus' ) ? _ins.plus() : _ins.minus();
            +        }
            +    });
            +
            +    return JC.NumericStepper;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Paginator_Paginator.js.html b/docs_api/files/.._comps_Paginator_Paginator.js.html new file mode 100644 index 000000000..dabd43c5c --- /dev/null +++ b/docs_api/files/.._comps_Paginator_Paginator.js.html @@ -0,0 +1,670 @@ + + + + + ../comps/Paginator/Paginator.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Paginator/Paginator.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * Paginator 分页
            + * <p>实现的功能上一页,下一页,数字页,...显示页码,跳转到n页,每页显示n条记录,</p>
            + * <p>
            + *      <b>require</b>: 
            + *          <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Paginator.html' target='_blank'>API docs</a>
            + * | <a href='../../comps/Paginator/_demo' target='_blank'>demo link</a></p>
            + *
            + * <h2></h2>
            + * <p>自动初始化<b>.js_compPaginator</b>下的table</p>
            + *
            + * <h2>可用的 HTML attribute</h2>
            + * <dl>
            + * <dt>paginatorui</dt>
            + * <dd>css selector, 指定分页的模板内容将放到哪个容器里面</dd>
            + * <dt>paginatorcontent</dt>
            + * <dd>css selector, 指定取回来的数据将放到哪个容器里面</dd>
            + * <dt>totalrecords</dt>
            + * <dd>num, 共多少条记录,必填项</dd>
            + * <dt>perpage</dt>
            + * <dd>num, 每页显示多少条记录,默认10条</dd>
            + * <dt>perpageitems</dt>
            + * <dd>定义下拉框的option值,默认为[10,20,50]</dd>
            + * <dt>midrange</dt>
            + * <dd>num, default = 5。显示多少个数字页,超出的页将以...显示,比如一共有10页,那么显示前5页和最后一页,中间的以...显示</dd>
            + * </dl>
            + *
            + * @namespace JC
            + * @class Paginator
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2014-05-05
            + * @author  zuojing   <zuojing1013@gmail.com> | 75 Team
            + * @example
            +        <div class="cafe-table js_compPaginator" paginatorcontent=".contents" paginatorui=".pages"  totalrecords="14" perpage="3" midrange="5">
            +            <table>
            +               在这里添加你要的数据
            +            </table>
            +            <div class="page pages">
            +                
            +            </div>
            +        </div>
            +*/
            +    JC.Paginator = Paginator;
            +    JC.f.addAutoInit && JC.f.addAutoInit( Paginator );
            + 
            +    function Paginator( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        
            +        if( Paginator.getInstance( _selector ) ) 
            +            return Paginator.getInstance( _selector );
            +        Paginator.getInstance( _selector, this );
            +        this._model = new Paginator.Model( _selector );
            +        this._view = new Paginator.View( this._model );
            +        this._init();
            +    }
            +    /**
            +     * 获取或设置 Paginator 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {PaginatorInstance}
            +     */
            +    Paginator.getInstance = function ( _selector, _setter ) {
            +        if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +            _selector = $(_selector);
            +        if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +        typeof _setter != 'undefined' && _selector.data( Paginator.Model._instanceName, _setter );
            +
            +        return _selector.data( Paginator.Model._instanceName );
            +    };
            +    /**
            +     * 初始化可识别的 Paginator 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of PaginatorInstance}
            +     */
            +    Paginator.init = function ( _selector ) {
            +        var _r = [];
            +        
            +        _selector = $( _selector || document );
            +
            +        if ( _selector.length ) {
            +            if ( _selector.hasClass('js_compPaginator') ) {
            +                _r.push( new Paginator(_selector) );
            +            } else {
            +                _selector.find('.js_compPaginator').each( function() {
            +                    _r.push( new Paginator( this ) );
            +                });
            +            }
            +        }
            +        
            +        return _r;
            +    };
            +
            +    BaseMVC.build( Paginator );
            +
            +    JC.f.extendObject( Paginator.prototype, {
            +        _beforeInit: function () {
            +            //JC.log( 'Paginator _beforeInit', new Date().getTime() );
            +        },
            +
            +        _initHanlderEvent: function () {
            +            var p = this,
            +                $selector = p._model.selector();
            +
            +            if (!p._model.totalRecords()) return;
            +            
            +            //渲染分页
            +            p._view.paginatedView();
            +            p._view.updateContentView();
            +            
            +            $selector
            +                .delegate('.js_page', 'click', function (e) {
            +                    e.preventDefault();
            +                    var $el = $(this),
            +                        val = parseInt($el.text(), 10);
            +
            +                    p.trigger('GOTOPAGE', [val, $el]);
            +                    
            +                })
            +                .delegate('.js_prevpage', 'click', function (e) {
            +                    e.preventDefault();
            +                    p.trigger('PREVPAGE');
            +                })
            +                .delegate('.js_nextpage', 'click', function (e) {
            +                    e.preventDefault();
            +                    p.trigger('NEXTPAGE');
            +                })
            +                .delegate('.js_perpage', 'change', function (e) {
            +                    p._model.currentPage = 1;
            +                    p.trigger('UPDATEVIEW', [$(this).val()]);
            +                })
            +                .delegate('.js_goto', 'change', function (e) {
            +                    var $el = $(this),
            +                        val = $el.val();
            +
            +                    if (isNaN(val)) {
            +                        return false;
            +                    }
            +
            +                    if (val > Math.ceil(p._model.totalRecords / p._model.perPage())) {
            +                        val = 1;
            +                    }
            +                    
            +                    p.trigger('GOTOPAGE', [val, $el]);
            +                    
            +                });
            +
            +            p.on('RENDER', function (e) {
            +                p._view.updatePaginatorView();
            +                p._view.updateContentView();
            +            });
            +
            +            p.on('PREVPAGE', function () {
            +                p._model.prevPage();
            +            });
            +
            +            p.on('NEXTPAGE', function () {
            +                p._model.nextPage();
            +            });
            +
            +            p.on('GOTOPAGE', function (e, page) {
            +                //更新分页按钮的状态
            +                p._model.currentPage = page;
            +                p._view.updateContentView();
            +                p._view.updatePaginatorView();
            +            });
            +
            +            p.on('UPDATEVIEW', function (e, perPage) {
            +                setTimeout(function () {
            +                    p._view.paginatedView(perPage);
            +                    p._model.selector().attr('perPage', perPage);
            +                    p._view.updateContentView();
            +                }, 20);
            +            });
            +
            +            p.on('FLIPPED', function (e, data) {
            +                p._model.flipped()
            +                    && p._model.flipped().call(p, p.selector(), data);
            +            });
            +            
            +        }, 
            +
            +        _inited: function () {
            +           
            +        }
            +
            +    });
            + 
            +    Paginator.Model._instanceName = "Paginator";
            +
            +    JC.f.extendObject( Paginator.Model.prototype, {
            +
            +        paginatortype: function () {
            +            return this.attrProp('paginatortype') || 'ajax';
            +        },
            +
            +        paginatorUi: function () {
            +            var p = this,
            +                selector = p.attrProp('paginatorui') || '.page';
            +
            +            return p.selector().find(selector);
            +        },
            +
            +        paginatorContent: function () {
            +            var p = this,
            +                selector = p.attrProp('paginatorcontent') || 'tbody';
            +
            +            return p.selector().find(selector);
            +        },
            +
            +        paginatorUiTpl: function () {
            +            return '共{0}页,{1}条记录' 
            +                + '<a href="#" class="js_prevpage disabled">上一页</a>'
            +                + '{2}'
            +                + '<a href="#" class="js_nextpage">'
            +                    + '下一页'
            +                + '</a>'
            +                + '每页显示'
            +                + '<select name="pz" class="sel sel-s js_perpage">'
            +                + this.perPageOption()    
            +                + '</select>'
            +                + '到第<input type="text" class="js_goto" style="width:60px;" />页';
            +        },
            +
            +        currentPage: 1,
            +
            +        perPage: function () {
            +            return (this.intProp('perPage') || 10);
            +        },
            +
            +        perPageOption: function () {
            +            var items = this.attrProp('perpageitems') || '10|20|50',
            +                i,
            +                l,
            +                str = '',
            +                selected = '';
            +
            +            items = items.split('|');
            +            l = items.length;
            +            for (i = 0; i < l; i++) {
            +                selected = i === this.perPage() ? 'selected': '';
            +                str += '<option value="' + items[i] + '"' + selected + '>' + items[i] + '</option>';
            +            }
            +            
            +            return str;
            +        },
            +
            +        midRange: function () {
            +            return (this.intProp('midRange') || 5);
            +        },
            +
            +        totalRecords: function () {
            +            return this.intProp('totalrecords');
            +        },
            +
            +        prevPage: function () {
            +            var p = this;
            +
            +            if (p.currentPage === 1)
            +                return;
            +
            +            p.currentPage--;
            +            p.trigger('RENDER');
            +
            +        },
            +
            +        nextPage: function () {
            +            var p = this,
            +                total = Math.ceil(p.totalRecords() / p.perPage());
            +
            +            if (p.currentPage === total)
            +                return;
            +
            +            p.currentPage++;
            +            p.trigger('RENDER');
            +            
            +        },
            +
            +        flipped: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = "flipped";
            + 
            +            return _p.callbackProp(_selector, _key);
            +        }
            +    });
            + 
            +    JC.f.extendObject( Paginator.View.prototype, {
            +        init: function () {
            +
            +        },
            +
            +        paginatedView: function (perPage) {
            +           
            +            var p = this,
            +                $box = p._model.paginatorUi(),
            +                tpl = p._model.paginatorUiTpl(),
            +                perPage = perPage || p._model.perPage(),
            +                total = Math.ceil(p._model.totalRecords() / perPage) ,
            +                str = '',
            +                i,
            +                currentPage = p._model.currentPage;
            +
            +            for (i = 1; i < total; i++) {
            +                str += (i > p._model.midRange()) ? ('<a href="javascript:;" class="js_page dn" >' + i + '</a>'): ('<a href="javascript:;" class="js_page" >' + i + '</a>');
            +                if (total > p._model.midRange()) {
            +                    (i === 1) && (str += '<span class="dn js_firstBreak">...</span>' );
            +                    (i === total - 1) && (str += '<span class="js_lastBreak">...</span>');
            +                }
            +            }
            +
            +            str += '<a href="javascript:;" class="js_page">' + total + '</a>';
            +            tpl = JC.f.printf(tpl, total, p._model.totalRecords(), str);
            +            $box.html(tpl).find('.js_perpage').val(perPage);
            +            $box.find('.js_page').eq(currentPage - 1).addClass('cur');
            +
            +        },
            +
            +        /**
            +        显示表格内容
            +        */
            +        updateContentView: function () {
            +            var p = this,
            +                //每页显示的记录条数
            +                currentPage = p._model.currentPage,
            +                perPage = p._model.perPage(),
            +                start = (currentPage - 1) * perPage,
            +                end = start + perPage;
            +
            +            p._model.paginatorContent().find('tr').hide().slice(start, end).show();
            +            p.trigger('FLIPPED');
            +        },
            +
            +        updatePaginatorView: function () {
            +            var p = this,
            +                curPage = p._model.currentPage,
            +                $box = p._model.paginatorUi(),
            +                $fstBrk = $box.find('.js_firstBreak'),
            +                $lstBrk = $box.find('.js_lastBreak'),
            +                totalPage = Math.ceil(p._model.totalRecords() / p._model.perPage()),
            +                midRange = p._model.midRange(),
            +                halfMidRange = Math.ceil(midRange / 2),
            +                limit = totalPage - midRange,
            +                start,
            +                end;
            +
            +            start = (curPage - halfMidRange) > 0 ? Math.min((curPage - halfMidRange), limit): 0;
            +            start = Math.max(start - 1, 0); 
            +            end = start + midRange;
            +            $box.find('.js_page').not(':first').not(':last').addClass('dn').slice(start, end).removeClass("dn");
            +            $box.find('.js_page').eq(curPage - 1).addClass('cur').siblings().removeClass('cur');
            +            $fstBrk[curPage - halfMidRange > 1? 'show': 'hide']();
            +            $lstBrk[curPage + halfMidRange >= totalPage ? 'hide': 'show']();
            +
            +            //设置上一页的状态
            +            if (curPage === 1) {
            +                $box.find('.js_prevpage').prop('disabled', true).addClass('disabled');
            +            } else {
            +                $box.find('.js_prevpage').prop('disabled', false).removeClass('disabled');
            +            }
            +
            +            //设置下一页的状态
            +            if (curPage === totalPage) {
            +                $box.find('.js_nextpage').prop('disabled', true).addClass('disabled');
            +            } else {
            +                $box.find('.js_nextpage').prop('disabled', false).removeClass('disabled');
            +            }
            +          
            +        }
            +
            +    });
            +
            +    $(document).ready( function () {
            +        var _insAr = 0;
            +        Paginator.autoInit
            +            && ( _insAr = Paginator.init() );
            +    });
            + 
            +    return JC.Paginator;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Panel_Dialog.js.html b/docs_api/files/.._comps_Panel_Dialog.js.html new file mode 100644 index 000000000..bb93a630d --- /dev/null +++ b/docs_api/files/.._comps_Panel_Dialog.js.html @@ -0,0 +1,561 @@ + + + + + ../comps/Panel/Dialog.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Panel/Dialog.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Panel.default' ], function(){
            +    var isIE6 = !!window.ActiveXObject && !window.XMLHttpRequest;
            +    /**
            +     * 带蒙板的会话弹框
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/JC.Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Panel.html'>JC.Panel</a></p>
            +     * @namespace JC
            +     * @class   Dialog
            +     * @extends JC.Panel
            +     * @static
            +     * @constructor
            +     * @param   {selector|string}   _selector   自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers 
            +     * @param   {string}            _headers    定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys
            +     * @param   {string}            _bodys      定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers
            +     * @param   {string}            _footers    定义模板的 footer 文字
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    var Dialog = window.Dialog = JC.Dialog = 
            +        function( _selector, _headers, _bodys, _footers ){
            +            if( _logic.timeout ) clearTimeout( _logic.timeout );
            +            var _ins;
            +
            +            if( _ins = JC.Panel.getInstance( _selector ) ){
            +                _logic.timeout = setTimeout( function(){
            +                    _ins.show(0);
            +                }, _logic.showMs );
            +
            +                return _ins;
            +            }
            +
            +            if( !JC.Dialog.MULTI_MASK ){
            +                _logic.dialogIdentifier();
            +            }
            +            //
            +
            +            _ins = new JC.Panel( _selector, _headers, _bodys, _footers );
            +            _logic.dialogIdentifier( _ins );
            +
            +            _logic.showMask();
            +            _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ );
            +            !_ins.selector().is( '[panelclickclose]' ) && _ins.selector().attr( 'panelclickclose', false );
            +
            +            _ins.on('close_default', function( _evt, _panel){
            +                _logic.hideMask();
            +            });
            +
            +            _ins.on('hide_default', function( _evt, _panel){
            +                _logic.hideMask();
            +            });
            +
            +            _ins.on('show_default', function( _evt, _panel){
            +                _logic.showMask(); 
            +
            +                setTimeout( function(){  
            +                    _logic.showMask(); 
            +                    _ins.selector().css( { 'z-index': window.ZINDEX_COUNT, 'display': 'block' } );
            +                    window.ZINDEX_COUNT += 2;
            +                }, 1 );
            +            });
            +            window.ZINDEX_COUNT++;
            +            
            +            _logic.timeout = setTimeout( function(){
            +                _ins.show( 0 );
            +            }, _logic.showMs );
            +
            +            return _ins;
            +        };
            +
            +    Dialog.DISPLAY_LIST = [];
            +
            +    /**
            +     * 是否支持多层蒙板
            +     * @property    MULTI_MASK
            +     * @type        boolean
            +     * @default     true
            +     * @for JC.Dialog
            +     * @static
            +     */
            +    JC.Dialog.MULTI_MASK = true;
            +
            +    /**
            +     * 显示或隐藏 蒙板
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * @namespace   JC.Dialog
            +     * @class   mask
            +     * @static
            +     * @constructor
            +     * @param   {bool}  _isHide     空/假 显示蒙板, 为真 隐藏蒙板
            +     */
            +    JC.Dialog.mask =
            +        function( _isHide ){
            +            !_isHide && _logic.showMask();
            +            _isHide && _logic.hideMask();
            +        };
            +    /**
            +     * 会话弹框逻辑处理方法集
            +     * @property    _logic
            +     * @for JC.Dialog
            +     * @private
            +     */
            +    var _logic = {
            +        /**
            +         * 设置会话弹框的唯一性
            +         * @method  _logic.dialogIdentifier
            +         * @for JC.Dialog
            +         * @private
            +         * @param   {JC.Panel} _panel  
            +         */
            +        dialogIdentifier:
            +            function( _panel ){
            +                if( !_panel ){
            +                    _logic.hideMask();
            +                    $('body > div.UPanelDialog_identifer').each( function(){
            +                        var _p = $(this), _ins = Panel.getInstance( _p );
            +                        if( !_ins ) return;
            +                        _ins.hide();
            +                        _ins.close();
            +                    });
            +                    $('body > div.UPanel_TMP').remove();
            +                }else{
            +                    _panel.selector().addClass('UPanelDialog_identifer');
            +                    _panel.selector().data('DialogInstance', _panel);
            +                    Dialog.DISPLAY_LIST.push( _panel );
            +                }
            +            }
            +        /**
            +         * 隐藏蒙板
            +         * @method  _logic.hideMask
            +         * @private
            +         * @for JC.Dialog
            +         */
            +        , hideMask:
            +            function(){
            +                var _mask, _iframemask;
            +                if( !JC.Dialog.MULTI_MASK ){
            +                    _mask = $('#UPanelMask');
            +                    _iframemask = $('#UPanelMaskIfrmae');
            +                    _mask.length && _mask.hide();
            +                    _iframemask.length && _iframemask.hide();
            +                    return;
            +                }
            +
            +                JC.f.safeTimeout( function(){
            +                    _mask = $('#UPanelMask');
            +                    _iframemask = $('#UPanelMaskIfrmae');
            +                    var _panel, _time = 1, _zindex, _newIndex;
            +
            +                    if( !( _mask.length || _iframemask.length ) ) return;
            +
            +                    for( var i = Dialog.DISPLAY_LIST.length - 1; i >= 0; i-- ){
            +                        var _tmp = Dialog.DISPLAY_LIST[ i ];
            +                        if( _tmp && _tmp.selector() && _tmp.selector().parent().length && _tmp.selector().is( ':visible' ) && _tmp.selector().offset().left >= -10 ){
            +
            +                            _panel = _tmp;
            +                            //Dialog.DISPLAY_LIST = Dialog.DISPLAY_LIST.slice( 0, i );
            +                            break;
            +                        }
            +                    }
            +
            +                    if( _panel ){
            +                        //JC.log( _panel.selector().html () );
            +                        _zindex = _panel.selector().css( 'z-index' ) || 0;
            +                        _newIndex = _zindex - 1;
            +                        if( _newIndex > 0 ){
            +                            _mask.length && _mask.css( { 'z-index': _newIndex } );
            +                            _iframemask.length && _iframemask.css( { 'z-index': _newIndex } );
            +                        }else{
            +                            _mask.length && _mask.hide();
            +                            _iframemask.length && _iframemask.hide();
            +                        }
            +                    }else{
            +                        _mask.length && _mask.hide();
            +                        _iframemask.length && _iframemask.hide();
            +                    }
            +
            +                }, null, 'JC.Dialogasdfaweasdfase', 1 );
            +            }
            +
            +        /**
            +         * 显示蒙板
            +         * @method  _logic.showMask
            +         * @private
            +         * @for JC.Dialog
            +         */
            +        , showMask:
            +            function(){
            +                var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            +                if( !_mask.length ){
            +                    $( _logic.tpls.mask ).appendTo('body');
            +                    _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            +                }
            +                _iframemask.show(); _mask.show();
            +
            +                _logic.setMaskSizeForIe6();
            +
            +                _iframemask.css('z-index', window.ZINDEX_COUNT++ );
            +                _mask.css('z-index', window.ZINDEX_COUNT++ );
            +            }
            +        /**
            +         * 延时处理的指针属性
            +         * @property    _logic.timeout
            +         * @type    setTimeout
            +         * @private
            +         * @for JC.Dialog
            +         */
            +        , timeout: null
            +        /**
            +         * 延时显示弹框
            +         * <br />延时是为了使用户绑定的 show 事件能够被执行
            +         * @property    _logic.showMs
            +         * @type    int     millisecond
            +         * @private
            +         * @for JC.Dialog
            +         */
            +        , showMs: 10
            +        /**
            +         * 窗口改变大小时, 改变蒙板的大小,
            +         * <br />这个方法主要为了兼容 IE6
            +         * @method  _logic.setMaskSizeForIe6
            +         * @private
            +         * @for JC.Dialog
            +         */
            +        , setMaskSizeForIe6:
            +            function(){
            +                var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            +                if( !( _mask.length && _iframemask.length ) ) return;
            +
            +                var _css = {
            +                    'position': 'absolute'
            +                    , 'top': '0px'
            +                    , 'left': $(document).scrollLeft() + 'px'
            +                    , 'height': $(document).height() + 'px'
            +                    , 'width': $(window).width()  + 'px'
            +                };
            +
            +                _mask.css( _css );
            +                _iframemask.css( _css );
            +            }
            +        /**
            +         * 保存会话弹框的所有默认模板
            +         * @property    _logic.tpls
            +         * @type        Object
            +         * @for         JC.Dialog
            +         * @private
            +         */
            +        , tpls: {
            +            /**
            +             *  会话弹框的蒙板模板
            +             *  @property   _logic.tpls.mask
            +             *  @type       string
            +             *  @private
            +             */
            +            mask:
            +                [
            +                    '<div id="UPanelMask" class="UPanelMask"></div>'
            +                    , '<iframe src="about:blank" id="UPanelMaskIfrmae"'
            +                    , ' frameborder="0" class="UPanelMaskIframe"></iframe>'
            +                ].join('')
            +        }
            +    };
            +    /**
            +     * 响应窗口改变大小和滚动 
            +     */
            +    $(window).on('resize scroll', function( _evt ){
            +        $('body > div.UPanelDialog_identifer').each( function(){
            +            var _p = $(this);
            +            if( _p.data('DialogInstance') ){
            +                if(  !_p.data('DialogInstance').selector().is(':visible') ) return;
            +                if( _evt.type.toLowerCase() == 'resize' ) _p.data('DialogInstance').center(); 
            +                _logic.setMaskSizeForIe6();
            +            }
            +        });
            +    });
            +
            +    return JC.Dialog;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Panel_Dialog.popup.js.html b/docs_api/files/.._comps_Panel_Dialog.popup.js.html new file mode 100644 index 000000000..1821a097a --- /dev/null +++ b/docs_api/files/.._comps_Panel_Dialog.popup.js.html @@ -0,0 +1,545 @@ + + + + + ../comps/Panel/Dialog.popup.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Panel/Dialog.popup.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Dialog' ], function(){
            +    /**
            +     * 会话框 msgbox 提示 (不带按钮)
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.msgbox.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Dialog.html'>JC.Dialog</a></p>
            +     * @namespace JC.Dialog
            +     * @class   msgbox
            +     * @extends JC.Dialog
            +     * @static
            +     * @constructor
            +     * @param   {string}    _msg        提示内容
            +     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            +     * @param   {function}  _cb         弹框自动关闭后的的回调, <b>如果 _cb 为 int 值, 将视为 _closeMs</b>
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @param   {int}       _closeMs    自动关闭的间隔, 单位毫秒, 默认 2000
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    JC.Dialog.msgbox = 
            +        function(_msg, _status, _cb, _closeMs ){
            +            if( !_msg ) return;
            +            var _tpl = ( JC.Dialog.msgbox.tpl || _logic.tpls.msgbox )
            +                        .replace(/\{msg\}/g, _msg)
            +                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            +            var _ins = JC.Dialog(_tpl);
            +
            +            _logic.fixWidth( _msg, _ins );
            +            _cb && _ins.on('close', _cb);
            +            setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 );
            +
            +            return _ins;
            +        };
            +    /**
            +     * 自定义 JC.Dialog.alert 的显示模板
            +     * @property    tpl
            +     * @type    string
            +     * @default undefined
            +     * @static
            +     */
            +    JC.Dialog.msgbox.tpl;
            +    /**
            +     * 会话框 alert 提示
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.alert.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Dialog.html'>JC.Dialog</a></p>
            +     * @namespace JC.Dialog
            +     * @class   alert
            +     * @extends JC.Dialog
            +     * @static
            +     * @constructor
            +     * @param   {string}    _msg        提示内容
            +     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            +     * @param   {function}  _cb         点击弹框确定按钮的回调
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    JC.Dialog.alert = 
            +        function(_msg, _status, _cb){
            +            if( !_msg ) return;
            +            var _tpl = ( JC.Dialog.alert.tpl || _logic.tpls.alert )
            +                        .replace(/\{msg\}/g, _msg)
            +                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            +            var _ins = JC.Dialog(_tpl);
            +            _logic.fixWidth( _msg, _ins );
            +            _cb && _ins.on('confirm', _cb);
            +
            +            return _ins;
            +        };
            +    /**
            +     * 自定义 JC.Dialog.alert 的显示模板
            +     * @property    tpl
            +     * @type    string
            +     * @default undefined
            +     * @static
            +     */
            +    JC.Dialog.alert.tpl;
            +    /**
            +     * 会话框 confirm 提示
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.confirm.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Dialog.html'>JC.Dialog</a></p>
            +     * @namespace JC.Dialog
            +     * @class   confirm
            +     * @extends JC.Dialog
            +     * @static
            +     * @constructor
            +     * @param   {string}    _msg        提示内容
            +     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            +     * @param   {function}  _cb         点击弹框确定按钮的回调
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @param   {function}  _cancelCb   点击弹框取消按钮的回调
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    JC.Dialog.confirm = 
            +        function(_msg, _status, _cb, _cancelCb ){
            +            if( !_msg ) return;
            +            var _tpl = ( JC.Dialog.confirm.tpl || _logic.tpls.confirm )
            +                        .replace(/\{msg\}/g, _msg)
            +                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            +            var _ins = JC.Dialog(_tpl);
            +            _logic.fixWidth( _msg, _ins );
            +            _cb && _ins.on('confirm', _cb);
            +            _cancelCb && _ins.on( 'cancel', _cancelCb );
            +
            +            return _ins;
            +        };
            +    /**
            +     * 自定义 JC.Dialog.confirm 的显示模板
            +     * @property    tpl
            +     * @type    string
            +     * @default undefined
            +     * @static
            +     */
            +    JC.Dialog.confirm.tpl;
            +
            +    var _logic = {
            +        /**
            +         * 弹框最小宽度
            +         * @property    _logic.minWidth
            +         * @for JC.Dialog
            +         * @type        int
            +         * @default     180
            +         * @private
            +         */
            +        minWidth: 180
            +        /**
            +         * 弹框最大宽度
            +         * @property    _logic.maxWidth
            +         * @for JC.Dialog
            +         * @type        int
            +         * @default     500
            +         * @private
            +         */
            +        , maxWidth: 500
            +        /**
            +         * 获取弹框的显示状态, 默认为0(成功)
            +         * @method  _logic.fixWidth
            +         * @for     JC.Dialog
            +         * @private
            +         * @param   {int}   _status     弹框状态: 0:成功, 1:失败, 2:警告
            +         * @return  {int}
            +         */
            +        , getStatusClass:
            +            function ( _status ){
            +                var _r = 'UPanelSuccess';
            +                switch( _status ){
            +                    case 0: _r = 'UPanelSuccess'; break;
            +                    case 1: _r = 'UPanelError'; break;
            +                    case 2: _r = 'UPanelAlert'; break;
            +                }
            +                return _r;
            +            }
            +        /**
            +         * 修正弹框的默认显示宽度
            +         * @method  _logic.fixWidth
            +         * @for     JC.Dialog
            +         * @private
            +         * @param   {string}    _msg    查显示的文本
            +         * @param   {JC.Panel} _panel
            +         */
            +        , fixWidth:
            +            function( _msg, _panel ){
            +                var _tmp = $('<div class="UPanel_TMP" style="position:absolute; left:-9999px;top:-9999px;">' + _msg + '</div>').appendTo('body'), _w = _tmp.width() + 80;
            +                _w > _logic.maxWidth && ( _w = _logic.maxWidth );
            +                _w < _logic.minWidth && ( _w = _logic.minWidth );
            +
            +                _panel.selector().css('width', _w);
            +            }
            +        /**
            +         * 保存会话弹框的所有默认模板
            +         * @property    _logic.tpls
            +         * @type        Object
            +         * @for         JC.Dialog
            +         * @private
            +         */
            +        , tpls: {
            +            /**
            +             *  msgbox 会话弹框的默认模板
            +             *  @property   _logic.tpls.msgbox
            +             *  @type       string
            +             *  @private
            +             */
            +            msgbox:
            +                [
            +                '<div class="UPanel UPanelPopup {status}" panelclickclose="true" >'
            +                ,'    <div class="UPContent">'
            +                ,'        <div class="bd">'
            +                ,'            <dl>'
            +                ,'                <dd class="UPopupContent">'
            +                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            +                ,'                </dd>'
            +                ,'            </dl>'
            +                ,'        </div>'
            +                ,'    </div><!--end UPContent-->'
            +                ,'</div>'
            +                ].join('')
            +            /**
            +             *  alert 会话弹框的默认模板
            +             *  @property   _logic.tpls.alert
            +             *  @type       string
            +             *  @private
            +             */
            +            , alert:
            +                [
            +                '<div class="UPanel UPanelPopup {status}" panelclickclose="true" >'
            +                ,'    <div class="UPContent">'
            +                ,'        <div class="bd">'
            +                ,'            <dl>'
            +                ,'                <dd class="UPopupContent">'
            +                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            +                ,'                </dd>'
            +                ,'                <dd class="UButton">'
            +                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            +                ,'                </dd>'
            +                ,'            </dl>'
            +                ,'        </div>'
            +                ,'    </div><!--end UPContent-->'
            +                ,'</div>'
            +                ].join('')
            +            /**
            +             *  confirm 会话弹框的默认模板
            +             *  @property   _logic.tpls.confirm
            +             *  @type       string
            +             *  @private
            +             */
            +            , confirm:
            +                [
            +                '<div class="UPanel UPanelPopup {status}" panelclickclose="true" >'
            +                ,'    <div class="UPContent">'
            +                ,'        <div class="bd">'
            +                ,'            <dl>'
            +                ,'                <dd class="UPopupContent">'
            +                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            +                ,'                </dd>'
            +                ,'                <dd class="UButton">'
            +                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            +                ,'                    <button type="button" class="UPanel_cancel" eventtype="cancel">取消</button>'
            +                ,'                </dd>'
            +                ,'            </dl>'
            +                ,'        </div>'
            +                ,'    </div><!--end UPContent-->'
            +                ,'</div>'
            +                ].join('')
            +        }
            +    };
            +
            +    return JC.Dialog;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Panel_Panel.default.js.html b/docs_api/files/.._comps_Panel_Panel.default.js.html new file mode 100644 index 000000000..ba31a5859 --- /dev/null +++ b/docs_api/files/.._comps_Panel_Panel.default.js.html @@ -0,0 +1,1752 @@ + + + + + ../comps/Panel/Panel.default.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Panel/Panel.default.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
            +//TODO: html popup add trigger ref
            +    window.Panel = JC.Panel = Panel;
            +    /**
            +     * 弹出层基础类 JC.Panel
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Panel.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     *
            +     * <h2>Panel Layout 可用的 html attribute</h2>
            +     * <dl>
            +     *      <dt>panelclickclose = bool</dt>
            +     *      <dd>点击 Panel 外时, 是否关闭 panel</dd>
            +     *
            +     *      <dt>panelautoclose = bool</dt>
            +     *      <dd>Panel 是否自动关闭, 默认关闭时间间隔 = 2000 ms</dd>
            +     *
            +     *      <dt>panelautoclosems = int, default = 2000 ms</dt>
            +     *      <dd>自动关闭 Panel 的时间间隔</dd>
            +     * </dl>
            +     * <h2>a, button 可用的 html attribute( 自动生成弹框)</h2>
            +     * <dl>
            +     *      <dt>paneltype = string, require</dt>
            +     *      <dd>
            +     *          弹框类型: alert, confirm, msgbox, panel 
            +     *          <br />dialog.alert, dialog.confirm, dialog.msgbox, dialog
            +     *      </dd>
            +     *
            +     *      <dt>panelmsg = string</dt>
            +     *      <dd>要显示的内容</dd>
            +     *
            +     *      <dt>panelmsgBox = script selector</dt>
            +     *      <dd>要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性</dd>
            +     *
            +     *      <dt>panelstatus = int, default = 0</dt>
            +     *      <dd>
            +     *          弹框状态: 0: 成功, 1: 失败, 2: 警告 
            +     *          <br /><b>类型不为 panel, dialog 时生效</b>
            +     *      </dd>
            +     *
            +     *      <dt>panelcallback = function</dt>
            +     *      <dd>
            +     *          点击确定按钮的回调, <b>window 变量域</b>
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     *      </dd>
            +     *
            +     *      <dt>panelcancelcallback = function</dt>
            +     *      <dd>
            +     *          点击取消按钮的回调, <b>window 变量域</b>
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     *      </dd>
            +     *
            +     *      <dt>panelclosecallback = function</dt>
            +     *      <dd>
            +     *          弹框关闭时的回调, <b>window 变量域</b>
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     *      </dd>
            +     *
            +     *      <dt>panelbutton = int, default = 0</dt>
            +     *      <dd>
            +     *          要显示的按钮, 0: 无, 1: 确定, 2: 确定, 取消
            +     *          <br /><b>类型为 panel, dialog 时生效</b>
            +     *      </dd>
            +     *
            +     *      <dt>panelheader = string</dt>
            +     *      <dd>
            +     *          panel header 的显示内容
            +     *          <br /><b>类型为 panel, dialog 时生效</b>
            +     *      </dd>
            +     *
            +     *      <dt>panelheaderBox = script selector</dt>
            +     *      <dd>
            +     *          panel header 的显示内容
            +     *          <br />要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
            +     *          <br /><b>类型为 panel, dialog 时生效</b>
            +     *      </dd>
            +     *
            +     *      <dt>panelfooterbox = script selector</dt>
            +     *      <dd>
            +     *          panel footer 的显示内容
            +     *          <br />要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
            +     *          <br /><b>类型为 panel, dialog 时生效</b>
            +     *      </dd>
            +    *
            +     *      <dt>panelhideclose = bool, default = false</dt>
            +     *      <dd>
            +     *          是否隐藏关闭按钮
            +     *          <br /><b>类型为 panel, dialog 时生效</b>
            +     *      </dd>
            +     *
            +     *      <dt>panelfixed = bool, default = false</dt>
            +     *      <dd>
            +     *          显示 panel 时, 是否居中显示
            +     *      </dd>
            +     * </dl>
            +     * @namespace JC
            +     * @class Panel
            +     * @constructor
            +     * @param   {selector|string}   _selector   自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers 
            +     * @param   {string}            _headers    定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys
            +     * @param   {string}            _bodys      定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers
            +     * @param   {string}            _footers    定义模板的 footer 文字
            +     * @version dev 0.3, 2014-12-30, qiushaowei   <suches@btbtd.org> | 75 team
            +     * @version dev 0.1, 2013-06-04, qiushaowei   <suches@btbtd.org> | 75 team
            +     * @date    
            +     * @example
            +            <script src="../../../lib.js"></script>
            +            <script src="../../../config.js"></script>
            +            <script>
            +                var btnstr = [
            +                    '<div style="text-align:center" class="UButton">'
            +                    , '<button type="button" eventtype="confirm">确定</button>'
            +                    , '<button type="button" eventtype="cancel">取消</button>\n'
            +                    , '</div>'
            +                ].join('');
            +		
            +                requirejs( [ 'JC.Panel' ], function(){
            +                    tmpPanel = new JC.Panel( '默认panel', '<h2>test content</h2>' + btnstr, 'test footer');
            +                    tmpPanel.on('close', function(_evt, _panel){
            +                        JC.log('user close evnet');
            +                    });
            +                    tmpPanel.show( 0 );
            +                });
            +            </script>
            +     */
            +    function Panel( _selector, _headers, _bodys, _footers ){
            +        typeof _selector == 'string' && ( _selector = _selector.trim().replace( /[\r\n]+/g, '') ); 
            +        typeof _headers == 'string' && ( _headers = _headers.trim().replace( /[\r\n]+/g, '') ); 
            +        typeof _bodys == 'string' && ( _bodys = _bodys.trim().replace( /[\r\n]+/g, '') ); 
            +
            +        if( typeof _selector == 'string' && /<html>/i.test( _selector )  ){
            +            _headers = '<div style="color:red;">' + JC.f.filterXSS( _selector ) + '</div>';
            +            _selector = '错误:内容不能包含 HTML 和 BODY 标签';
            +        }
            +
            +        if( Panel.getInstance( _selector ) ) return Panel.getInstance( _selector );
            +        /**
            +         * 存放数据的model层, see <a href='JC.Panel.Model.html'>Panel.Model</a>
            +         * @property _model 
            +         * @private
            +         */
            +        this._model = new Model( _selector, _headers, _bodys, _footers );
            +        /**
            +         * 控制视图的view层, see <a href='JC.Panel.View.html'>Panel.View</a>
            +         * @property    _view 
            +         * @private
            +         */
            +        this._view = new View( this._model );
            +
            +        this._init();
            +    }
            +    /**
            +     * 从 selector 获取 Panel 的实例
            +     * <br /><b>如果从DOM初始化, 不进行判断的话, 会重复初始化多次</b>
            +     * @method getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Panel instance}
            +     */
            +    Panel.getInstance =
            +        function( _selector ){
            +            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +                    _selector = $(_selector);
            +            if( _selector && typeof _selector == 'string' ) return;
            +            return $(_selector).data('PanelInstace');
            +        };
            +    /**
            +     * 显示Panel时, 是否 fixed 居中
            +     * @property    FIXED
            +     * @type        bool
            +     * @default     false
            +     * @static
            +     */
            +    Panel.FIXED = false;
            +    /**
            +     * 显示Panel时, 是否 focus 到 按钮上
            +     * focusButton
            +     * @property    focusButton
            +     * @type        bool
            +     * @default     true
            +     * @static
            +     */
            +    Panel.focusButton = true;
            +    /**
            +     * 页面点击时, 是否自动关闭 Panel
            +     * @property    clickClose
            +     * @type        bool
            +     * @default     true
            +     * @static
            +     */
            +    Panel.clickClose = true;
            +    /**
            +     * 自动关闭的时间间隔, 单位毫秒
            +     * <br />调用 ins.autoClose() 时生效
            +     * @property    autoCloseMs
            +     * @type        int
            +     * @default     2000
            +     * @static
            +     */
            +    Panel.autoCloseMs = 2000;
            +    /**
            +     * 修正弹框的默认显示宽度
            +     * @method  _fixWidth
            +     * @param   {string}    _msg    查显示的文本
            +     * @param   {JC.Panel}  _panel
            +     * @param   {int}       _minWidth
            +     * @param   {int}       _maxWidth
            +     * @static
            +     * @private
            +     */
            +    Panel._fixWidth = 
            +        function( _msg, _panel, _minWidth, _maxWidth ){
            +            var _tmp = $('<div class="UPanel_TMP" style="position:absolute; left:-9999px;top:-9999px;">' + _msg + '</div>').appendTo('body'), _w = _tmp.width() + 80;
            +                _tmp.remove();
            +
            +            _minWidth = _minWidth || 200;
            +            _maxWidth = _maxWidth || 500;
            +
            +            _w > _maxWidth && ( _w = _maxWidth );
            +            _w < _minWidth && ( _w = _minWidth );
            +
            +            _panel.selector().css('width', _w);
            +        };
            +    /**
            +     * 获取 显示的 BUTTON
            +     * @method  _getButton
            +     * @param   {int}       _type   0: 没有 BUTTON, 1: confirm, 2: confirm + cancel
            +     * @static
            +     * @private
            +     */
            +    Panel._getButton =
            +        function( _type ){
            +            var _r = [];
            +            if( _type ){
            +                _r.push( '<div style="text-align:center" class="UButton"> ');
            +                if( _type >= 1 ){
            +                    _r.push( '<button type="button" eventtype="confirm">确定</button>' );
            +                }
            +                if( _type >= 2 ){
            +                    _r.push( '<button type="button" eventtype="cancel">取消</button>' );
            +                }
            +                _r.push( '</div>');
            +            }
            +            return _r.join('');
            +        };
            +    
            +    Panel.prototype = {
            +        /**
            +         * 初始化Panel
            +         * @method  _init
            +         * @private
            +         */
            +        _init:
            +            function(){
            +                var _p = this;
            +                _p._view.getPanel().data('PanelInstace', _p);
            +
            +                /**
            +                 * 初始化Panel 默认事件
            +                 * @private
            +                 */
            +                _p._model.addEvent( 'close_default'
            +                                    , function( _evt, _panel ){ _panel._view.close(); } );
            +
            +                _p._model.addEvent( 'show_default'
            +                                    , function( _evt, _panel ){ _panel._view.show(); } );
            +
            +                _p._model.addEvent( 'hide_default'
            +                                    , function( _evt, _panel ){ _panel._view.hide(); } );
            +
            +                _p._model.addEvent( 'confirm_default'
            +                                    , function( _evt, _panel ){ _panel.trigger('close'); } );
            +
            +                _p._model.addEvent( 'cancel_default'
            +                                    , function( _evt, _panel ){ _panel.trigger('close'); } );
            +
            +                _p._model.panelautoclose() && _p.autoClose();
            +
            +               return _p;
            +            }    
            +        /**
            +         * 为Panel绑定事件
            +         * <br /> 内置事件类型有 show, hide, close, center, confirm, cancel
            +         * , beforeshow, beforehide, beforeclose, beforecenter
            +         * <br /> 用户可通过 HTML eventtype 属性自定义事件类型
            +         * @method on
            +         * @param   {string}    _evtName    要绑定的事件名
            +         * @param   {function}  _cb         要绑定的事件回调函数
            +         * @example
            +                //绑定内置事件
            +                <button type="button" eventtype="close">text</button>
            +                <script>
            +                panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            +                </script>
            +
            +                //绑定自定义事件
            +                <button type="button" eventtype="userevent">text</button>
            +                <script>
            +                panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            +                </script>
            +         */
            +        , on:
            +            function( _evtName, _cb ){
            +                _evtName && _cb && this._model.addEvent( _evtName, _cb );
            +                return this;
            +            }
            +        /**
            +         * 显示 Panel
            +         * <br /> Panel初始后, 默认是隐藏状态, 显示 Panel 需要显式调用 show 方法
            +         * @method  show
            +         * @param   {int|selector}   _position   指定 panel 要显示的位置, 
            +         *  <br />如果 _position 为 int:  0, 表示屏幕居中显示
            +         *  <br />如果 _position 为 selector:  Paenl 的显示位置将基于 _position 的上下左右
            +         * @example
            +         *      panelInstace.show();            //默认显示
            +         *      panelInstace.show( 0 );         //居中显示
            +         *      panelInstace.show( _selector ); //位于 _selector 的上下左右
            +         */
            +        , show:
            +            function( _position, _selectorDiretion ){
            +                var _p = this;
            +                setTimeout(
            +                    function(){
            +                        switch( typeof _position ){
            +                            case 'number': 
            +                                {
            +                                    switch( _position ){
            +                                        case 0: _p.center(); break;
            +                                    }
            +                                    break;
            +                                }
            +                            case 'object':
            +                                {
            +                                    _position = $(_position);
            +                                    _position.length && _p._view.positionWith( _position, _selectorDiretion );
            +
            +                                    if( !_p._model.bindedPositionWithEvent ){
            +                                        _p._model.bindedPositionWithEvent = true;
            +                                        var changePosition = function(){
            +                                            if( !_p._view.getPanel().is( ':visible' ) ) return;
            +                                            _p.positionWith( _position, _selectorDiretion );
            +                                        };
            +					
            +                                        $(window).off('resize', changePosition);
            +                                        $(window).on('resize', changePosition );
            +                                        _p.on('close', function(){
            +                                            _p._model.bindedPositionWithEvent = false;
            +                                            $(window).off('resize', changePosition);
            +                                        });
            +                                    }
            +
            +                                    break;
            +                                }
            +                        }
            +                    }, 10);
            +                this.trigger('beforeshow', this._view.getPanel() );
            +                this.trigger('show', this._view.getPanel() );
            +
            +                return this;
            +            }
            +        /**
            +         * 设置Panel的显示位置基于 _src 的左右上下
            +         * @method  positionWith
            +         * @param   {selector}      _src 
            +         * @param   {string}        _selectorDiretion   如果 _src 为 selector, _selectorDiretion 可以指定 top, 显示在上方
            +         */
            +        , positionWith: 
            +            function( _src, _selectorDiretion ){ 
            +                _src = $(_src ); 
            +                _src && _src.length && this._view.positionWith( _src, _selectorDiretion ); 
            +                return this;
            +            }
            +        /**
            +         * 隐藏 Panel
            +         * <br /> 隐藏 Panel 设置 css display:none, 不会从DOM 删除 Panel
            +         * @method  hide
            +         */
            +        , hide:
            +            function(){
            +                this.trigger('beforehide', this._view.getPanel() );
            +                this.trigger('hide', this._view.getPanel() );
            +                return this;
            +            }
            +        /**
            +         * 关闭 Panel
            +         * <br /> <b>关闭 Panel 是直接从 DOM 中删除 Panel</b>
            +         * @method  close
            +         */
            +        , close:
            +            function(){
            +                //JC.log('Panel.close');
            +                this.trigger('beforeclose', this._view.getPanel() );
            +                this.trigger('close', this._view.getPanel() );
            +                return this;
            +            }
            +        /**
            +         * 判断点击页面时, 是否自动关闭 Panel
            +         * @method  isClickClose
            +         * @return bool
            +         */
            +        , isClickClose:
            +            function(){
            +                return this._model.panelclickclose();
            +            }
            +        /**
            +         * 点击页面时, 添加自动隐藏功能
            +         * @method  clickClose
            +         * @param   {bool}          _removeAutoClose
            +         */
            +        , clickClose:
            +            function( _removeAutoClose ){
            +                _removeAutoClose && this.layout() && this.layout().removeAttr('panelclickclose');
            +                !_removeAutoClose && this.layout() && this.layout().attr('panelclickclose', true);
            +                return this;
            +            }
            +        /**
            +         * clickClose 的别名
            +         * <br />这个方法的存在是为了向后兼容, 请使用 clickClose
            +         */
            +        , addAutoClose:
            +            function(){
            +                this.clickClose.apply( this, JC.f.sliceArgs( arguments ) );
            +                return this;
            +            }
            +        /**
            +         * 添加自动关闭功能
            +         * @method  autoClose
            +         * @param   {bool}          _removeAutoClose
            +         */
            +        , autoClose:
            +            function( _callback, _ms ){
            +                if( typeof _callback == 'number' ){
            +                    _ms = _callback;
            +                    _callback = null;
            +                }
            +                var _p = this, _tm;
            +                _ms = _p._model.panelautoclosems( _ms );
            +
            +                Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout );
            +                _p.on('close', function(){
            +                    Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout );
            +                });
            +                Panel._autoCloseTimeout = 
            +                    setTimeout( function(){
            +                        _callback && _p.on( 'close', _callback );
            +                        _p.close();
            +                    }, _ms );
            +
            +                return this;
            +            }
            +         /**
            +         * focus 到 button
            +         * <br />优先查找 input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]
            +         * <br />input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]
            +         * @method  focusButton
            +         */
            +        , focusButton: function(){ this._view.focusButton(); return this; }
            +        /**
            +         * 从DOM清除Panel
            +         * <br /> <b>close 方法清除 Panel可以被用户阻止, 该方法不会被用户阻止</b>
            +         * @method  dispose
            +         */
            +        , dispose:
            +            function(){
            +                //JC.log('Panel.dispose');
            +                this._view.close();
            +                return this;
            +            }
            +        /**
            +         * 把 Panel 位置设为屏幕居中
            +         * @method  center
            +         */
            +        , center:
            +            function(){
            +                this.trigger('beforecenter', this._view.getPanel() );
            +                this._view.center();
            +                this.trigger('center', this._view.getPanel() );
            +                return this;
            +            }
            +        /**
            +         * 返回 Panel 的 jquery dom选择器对象
            +         * <br />这个方法以后将会清除, 请使用 layout 方法
            +         * @method  selector
            +         * @return  {selector}
            +         */
            +        , selector: function(){ return this._view.getPanel(); }
            +        /**
            +         * 返回 Panel 的 jquery dom选择器对象
            +         * @method  layout
            +         * @return  {selector}
            +         */
            +        , layout: function(){ return this._view.getPanel(); }
            +        /**
            +         * 从 Panel 选择器中查找内容
            +         * <br />添加这个方法是为了方便jquery 使用者的习惯
            +         * @method  find
            +         * @param   {selector}  _selector
            +         * @return  selector
            +         */
            +        , find: function( _selector ){ return this.layout().find( _selector ); }
            +        /**
            +         * 触发 Panel 已绑定的事件
            +         * <br />用户可以使用该方法主动触发绑定的事件
            +         * @method trigger
            +         * @param   {string}    _evtName    要触发的事件名, 必填参数
            +         * @param   {selector}  _srcElement 触发事件的源对象, 可选参数
            +         * @example
            +         *      panelInstace.trigger('close');
            +         *      panelInstace.trigger('userevent', sourceElement);
            +         */
            +        , trigger:
            +            function( _evtName, _srcElement ){
            +                //JC.log( 'Panel.trigger', _evtName );
            +
            +                var _p = this, _evts = this._model.getEvent( _evtName ), _processDefEvt = true;
            +                if( _evts && _evts.length ){
            +                    _srcElement && (_srcElement = $(_srcElement) ) 
            +                        && _srcElement.length && (_srcElement = _srcElement[0]);
            +
            +                    $.each( _evts, function( _ix, _cb ){
            +                        if( _cb.call( _srcElement, _evtName, _p ) === false ) 
            +                            return _processDefEvt = false; 
            +                    });
            +                }
            +
            +                if( _processDefEvt ){
            +                    var _defEvts = this._model.getEvent( _evtName + '_default' );
            +                    if( _defEvts && _defEvts.length ){
            +                        $.each( _defEvts, function( _ix, _cb ){
            +                            if( _cb.call( _srcElement, _evtName, _p ) === false ) 
            +                                return false; 
            +                        });
            +                    }
            +                }
            +                return this;
            +            }
            +        /**
            +         * 获取或者设置 Panel Header 的HTML内容
            +         * <br />如果 Panel默认没有 Header的话, 使用该方法 _html 非空可动态创建一个Header
            +         * @method  header
            +         * @param   {string}    _html   
            +         * @return  {string}    header 的HTML内容
            +         */
            +        , header:
            +            function( _html ){
            +                if( typeof _html != 'undefined' ) this._view.getHeader( _html );
            +                var _selector = this._view.getHeader();
            +                if( _selector && _selector.length ) _html = _selector.html();
            +                return _html || '';
            +            }
            +        /**
            +         * 获取或者设置 Panel body 的HTML内容
            +         * @method  body
            +         * @param   {string}    _html   
            +         * @return  {string}    body 的HTML内容
            +         */
            +        , body:
            +            function( _html ){
            +                if( typeof _html != 'undefined' ) this._view.getBody( _html );
            +                var _selector = this._view.getBody();
            +                if( _selector && _selector.length ) _html = _selector.html();
            +                return _html || '';
            +            }
            +        /**
            +         * 获取或者设置 Panel footer 的HTML内容
            +         * <br />如果 Panel默认没有 footer的话, 使用该方法 _html 非空可动态创建一个footer
            +         * @method  footer
            +         * @param   {string}    _html   
            +         * @return  {string}    footer 的HTML内容
            +         */
            +        , footer:
            +            function( _html ){
            +                if( typeof _html != 'undefined' ) this._view.getFooter( _html );
            +                var _selector = this._view.getFooter();
            +                if( _selector && _selector.length ) _html = _selector.html();
            +                return _html || '';
            +            }
            +        /**
            +         * 获取或者设置 Panel 的HTML内容
            +         * @method  panel
            +         * @param   {string}    _html   
            +         * @return  {string}    panel 的HTML内容
            +         */
            +        , panel:
            +            function( _html ){
            +                if( typeof _html != 'undefined' ) this._view.getPanel( _html );
            +                var _selector = this._view.getPanel();
            +                if( _selector && _selector.length ) _html = _selector.html();
            +                return _html || '';
            +            }
            +        /**
            +         * 获取 html popup/dialog 的触发 node
            +         * @method  triggerSelector
            +         * @param   {Selector}      _setterSelector
            +         * @return  {Selector|null}
            +         */
            +        , triggerSelector:
            +            function( _setterSelector ){
            +                return this._model.triggerSelector( _setterSelector );
            +            }
            +
            +        , offsetTop: function( _setter ){ return this._model.offsetTop( _setter ); }
            +        , offsetLeft: function( _setter ){ return this._model.offsetLeft( _setter ); }
            +    }
            +    /**
            +     * Panel 显示前会触发的事件<br/>
            +     * 这个事件在用户调用 _panelInstance.show() 时触发
            +     * @event   beforeshow
            +     * @type    function
            +     * @example     
            +     *      panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            +     */
            +    /**
            +     * 显示Panel时会触发的事件
            +     * @event   show
            +     * @type    function
            +     * @example     
            +     *      panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            +     */
            +    /**
            +     * Panel 隐藏前会触发的事件<br/>
            +     * <br />这个事件在用户调用 _panelInstance.hide() 时触发
            +     * @event   beforehide
            +     * @type    function
            +     * @example     
            +     *      panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            +     */
            +    /**
            +     * Panel 隐藏时会触发的事件<br/>
            +     * <br />这个事件在用户调用 _panelInstance.hide() 时触发
            +     * @event   hide
            +     * @type    function
            +     * @example     
            +     *      panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            +     */
            +    /**
            +     * Panel 关闭前会触发的事件<br/>
            +     * 这个事件在用户调用 _panelInstance.close() 时触发
            +     * @event   beforeclose
            +     * @type    function
            +     * @example     
            +     *      <button type="button" eventtype="close">text</button>
            +     *      <script>
            +     *      panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            +     *      </script>
            +     */
            +    /**
            +     * 关闭事件
            +     * @event   close
            +     * @type    function
            +     * @example     
            +     *      <button type="button" eventtype="close">text</button>
            +     *      <script>
            +     *      panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            +     *      </script>
            +     */
            +    /**
            +     * Panel 居中显示前会触发的事件<br/>
            +     * 这个事件在用户调用 _panelInstance.center() 时触发
            +     * @event   beforecenter
            +     * @type    function
            +     * @example     
            +     *      panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            +     */
            +    /**
            +     * Panel 居中后会触发的事件
            +     * @event   center
            +     * @type    function
            +     * @example     
            +     *      panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            +     */
            +    /**
            +     * Panel 点击确认按钮触发的事件
            +     * @event   confirm
            +     * @type    function
            +     * @example     
            +     *      <button type="button" eventtype="confirm">text</button>
            +     *      <script>
            +     *      panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            +     *      </script>
            +     */
            +    /**
            +     * Panel 点击确取消按钮触发的事件
            +     * @event   cancel
            +     * @type    function
            +     * @example     
            +     *      <button type="button" eventtype="cancel">text</button>
            +     *      <script>
            +     *      panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            +     *      </script>
            +     */
            +
            +    /**
            +     * 存储 Panel 的基础数据类
            +     * <br /><b>这个类为 Panel 的私有类</b>
            +     * @class   Model
            +     * @namespace   JC.Panel
            +     * @constructor
            +     * @param   {selector|string}   _selector   自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers 
            +     * @param   {string}            _headers    定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys
            +     * @param   {string}            _bodys      定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers
            +     * @param   {string}            _footers    定义模板的 footer 文字
            +     */
            +    function Model( _selector, _headers, _bodys, _footers ){
            +        /**
            +         * panel 的 HTML 对象或者字符串
            +         * <br /> 这是初始化时的原始数据
            +         * @property    selector
            +         * @type    selector|string   
            +         */
            +        this.selector = _selector;
            +        /**
            +         * header 内容 
            +         * <br /> 这是初始化时的原始数据
            +         * @property    headers
            +         * @type    string
            +         */
            +        this.headers = _headers;
            +        /**
            +         * body 内容
            +         * <br /> 这是初始化时的原始数据
            +         * @property bodys
            +         * @type    string
            +         */
            +        this.bodys = _bodys;
            +        /**
            +         * footers 内容
            +         * <br /> 这是初始化时的原始数据
            +         * @property footers
            +         * @type    string
            +         */
            +        this.footers = _footers;
            +        /**
            +         * panel 初始化后的 selector 对象
            +         * @property    panel
            +         * @type    selector
            +         */
            +        this.panel;
            +        /**
            +         * 存储用户事件和默认事件的对象
            +         * @property    _events
            +         * @type    Object
            +         * @private
            +         */
            +        this._events = {};
            +        this._init();
            +    }
            +    
            +    Model.prototype = {
            +        /**
            +         * Model 初始化方法
            +         * @method  _init
            +         * @private
            +         * @return  {Model instance}
            +         */
            +        _init:
            +            function(){
            +                var _p = this, _selector = typeof this.selector != 'undefined' ? $(this.selector) : undefined;
            +                Panel.ignoreClick = true;
            +                if( _selector && _selector.length ){
            +                    this.selector = _selector;
            +                    //JC.log( 'user tpl', this.selector.parent().length );
            +                    if( !this.selector.parent().length ){
            +                        _p.selector.appendTo( $(document.body ) );
            +                        JC.f.autoInit && JC.f.autoInit( _p.selector );
            +                    }
            +                }else if( !_selector || _selector.length === 0 ){
            +                    this.footers = this.bodys;
            +                    this.bodys = this.headers;
            +                    this.headers = this.selector;
            +                    this.selector = undefined;
            +                }
            +                setTimeout( function(){ Panel.ignoreClick = false; }, 1 );
            +                return this;
            +            }
            +        , offsetTop:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._offsetTop = _setter );
            +                return this._offsetTop || 0;
            +            }
            +
            +        , offsetLeft:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._offsetLeft = _setter );
            +                return this._offsetLeft|| 0;
            +            }
            +        , triggerSelector:
            +            function( _setterSelector ){
            +                typeof _setterSelector != 'undefined' 
            +                    && ( this._triggerSelector = _setterSelector )
            +                    ;
            +                return this._triggerSelector;
            +            }
            +        /**
            +         * 添加事件方法
            +         * @method  addEvent
            +         * @param   {string}    _evtName    事件名
            +         * @param   {function}  _cb         事件的回调函数
            +         */
            +        , addEvent:
            +            function( _evtName, _cb ){
            +                if( !(_evtName && _cb ) ) return;
            +                _evtName && ( _evtName = _evtName.toLowerCase() );
            +                if( !(_evtName in this._events ) ){
            +                    this._events[ _evtName ] = []
            +                }
            +                if( /\_default/i.test( _evtName ) ) this._events[ _evtName ].unshift( _cb );
            +                else this._events[ _evtName ].push( _cb );
            +            }
            +        /**
            +         * 获取事件方法
            +         * @method  getEvent
            +         * @param   {string}    _evtName    事件名
            +         * @return  {array}     某类事件类型的所有回调
            +         */
            +        , getEvent:
            +            function( _evtName ){
            +                return this._events[ _evtName ];
            +            }
            +        , panelfocusbutton:
            +            function(){
            +                var _r = Panel.focusButton;
            +                if( this.panel.is( '[panelfocusbutton]' ) ){
            +                    _r = JC.f.parseBool( this.panel.attr('panelfocusbutton') );
            +                }
            +                return _r;
            +            }
            +        , panelclickclose:
            +            function(){
            +                var _r = Panel.clickClose;
            +                if( this.panel.is( '[panelclickclose]' ) ){
            +                    _r = JC.f.parseBool( this.panel.attr('panelclickclose') );
            +                }
            +                return _r;
            +            }
            +        , panelautoclose:
            +            function(){
            +                var _r;
            +                if( this.panel.is( '[panelautoclose]' ) ){
            +                    _r = JC.f.parseBool( this.panel.attr('panelautoclose') );
            +                }
            +                return _r;
            +            }
            +        , panelautoclosems:
            +            function( _ms ){
            +                var _r = Panel.autoCloseMs;
            +                if( this.panel.is( '[panelautoclosems]' ) ){
            +                    _r = parseInt( this.panel.attr('panelautoclosems'), 10 );
            +                }
            +                typeof _ms == 'number' && ( _r = _ms );
            +                return _r;
            +            }
            +
            +        , panelfixed: 
            +            function(){
            +                var _r = Panel.FIXED;
            +                if( this.panel.is( '[panelfixed]' ) ){
            +                    _r = JC.f.parseBool( this.panel.attr('panelfixed') );
            +                }
            +                return _r;
            +            }
            +    };
            +     /**
            +     * 存储 Panel 的基础视图类
            +     * <br /><b>这个类为 Panel 的私有类</b>
            +     * @class   View
            +     * @namespace   JC.Panel
            +     * @constructor
            +     * @param   {Panel.Model}   _model  Panel的基础数据类, see <a href='JC.Panel.Model.html'>Panel.Model</a>
            +     */
            +    function View( _model ){
            +        /**
            +         * Panel的基础数据类, see <a href='JC.Panel.Model.html'>Panel.Model</a>
            +         * @property _model
            +         * @type Panel.Model
            +         * @private
            +         */
            +        this._model = _model;
            +        /**
            +         * 默认模板
            +         * @prototype   _tpl
            +         * @type        string
            +         * @private
            +         */
            +        this._tpl = _deftpl;
            +
            +        this._init();
            +    }
            +    
            +    View.prototype = {
            +        /**
            +         * View 的初始方法
            +         * @method  _init
            +         * @private
            +         * @for View
            +         */
            +        _init:
            +            function(){
            +                if( !this._model.panel ){
            +                    if( this._model.selector ){
            +                        this._model.panel = this._model.selector;
            +                    }else{
            +                        this._model.panel = $(this._tpl);
            +                        this._model.panel.appendTo(document.body);
            +                        JC.f.autoInit && JC.f.autoInit( this._model.panel );
            +                    }
            +                }
            +
            +                this.getHeader();
            +                this.getBody();
            +                this.getFooter();
            +
            +                return this;
            +            }
            +        /**
            +         * 设置Panel的显示位置基于 _src 的左右上下
            +         * @method  positionWith
            +         * @param   {selector}      _src 
            +         */
            +        , positionWith:
            +            function( _src, _selectorDiretion ){
            +                if( !( _src && _src.length ) ) return;
            +                this.getPanel().css( { 'left': '-9999px', 'top': '-9999px', 'display': 'block', 'position': 'absolute' } );
            +                var _soffset = _src.offset(), _swidth = _src.prop('offsetWidth'), _sheight = _src.prop('offsetHeight');
            +                var _lwidth = this.getPanel().prop('offsetWidth'), _lheight = this.getPanel().prop('offsetHeight');
            +                var _wwidth = $(window).width(), _wheight = $(window).height();
            +                var _stop = $(document).scrollTop(), _sleft = $(document).scrollLeft();
            +                var _x = _soffset.left + _sleft
            +                    , _y = _soffset.top + _sheight + 1;
            +
            +                if( typeof _selectorDiretion != 'undefined' ){
            +                    switch( _selectorDiretion ){
            +                        case 'top':
            +                            {
            +                                _y = _soffset.top - _lheight - 1;
            +                                _x = _soffset.left + _swidth / 2 - _lwidth / 2;
            +                                break;
            +                            }
            +                    }
            +                }
            +                _y += this._model.offsetTop();
            +                _x += this._model.offsetLeft();
            +
            +                var _maxY = _stop + _wheight - _lheight, _minY = _stop;
            +                if( _y > _maxY ) _y = _soffset.top - _lheight - 1;
            +                if( _y < _minY ) _y = _stop;
            +
            +                var _maxX = _sleft + _wwidth - _lwidth, _minX = _sleft;
            +                if( _x > _maxX ) _x = _sleft + _wwidth - _lwidth - 1;
            +                if( _x < _minX ) _x = _sleft;
            +
            +                this.getPanel().css( { 'left': _x + 'px', 'top': _y + 'px' } );
            +            }
            +        /**
            +         * 显示 Panel
            +         * @method  show
            +         */
            +        , show:
            +            function(){
            +                this.getPanel().css( { 'z-index': ZINDEX_COUNT++ } ).show();
            +                //this.focusButton();
            +            }
            +        /**
            +         * focus button
            +         * @method  focus button
            +         */
            +        , focusButton:
            +            function(){
            +                if( !this._model.panelfocusbutton() ) return;
            +                var _control = this.getPanel().find( 'input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]' );
            +                !_control.length && ( _control = this.getPanel().find( 'input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]' ) )
            +                _control.length && $( _control[0] ).focus();
            +            }
            +        /**
            +         * 隐藏 Panel
            +         * @method hide
            +         */
            +        , hide:
            +            function(){
            +                this.getPanel().hide();
            +            }
            +        /**
            +         * 关闭 Panel
            +         * @method  close
            +         */
            +        , close:
            +            function(){
            +                //JC.log( 'Panel._view.close()');
            +                this.getPanel().remove();
            +            }
            +        /**
            +         * 获取 Panel 的 selector 对象
            +         * @method  getPanel
            +         * @return  selector
            +         */
            +        , getPanel:
            +            function( _udata ){
            +                if( typeof _udata != 'undefined' ){
            +                    this.getPanel().html( _udata );
            +                }
            +                return this._model.panel;
            +            }
            +        /**
            +         * 获取或设置Panel的 header 内容, see <a href='JC.Panel.html#method_header'>Panel.header</a>
            +         * @method  getHeader
            +         * @param   {string}    _udata  
            +         * @return  string
            +         */
            +        , getHeader:
            +            function( _udata ){
            +                var _selector = this.getPanel().find('div.UPContent > div.hd');
            +                if( typeof _udata != 'undefined' ) this._model.headers = _udata;
            +                if( typeof this._model.headers != 'undefined' ){
            +                    if( !_selector.length ){
            +                        this.getPanel().find('div.UPContent > div.bd')
            +                            .before( _selector = $('<div class="hd">弹出框</div>') );
            +                    }
            +                    _selector.html( this._model.headers );
            +                    this._model.headers = undefined;
            +                }
            +                return _selector;
            +            }
            +        /**
            +         * 获取或设置Panel的 body 内容, see <a href='JC.Panel.html#method_body'>Panel.body</a>
            +         * @method  getBody
            +         * @param   {string}    _udata  
            +         * @return  string
            +         */
            +        , getBody:
            +            function( _udata ){
            +                var _selector = this.getPanel().find('div.UPContent > div.bd');
            +                if( typeof _udata != 'undefined' ) this._model.bodys = _udata;
            +                if( typeof this._model.bodys!= 'undefined' ){
            +                    _selector.html( this._model.bodys);
            +                    this._model.bodys = undefined;
            +                }
            +                return _selector;
            +            }
            +        /**
            +         * 获取或设置Panel的 footer 内容, see <a href='JC.Panel.html#method_footer'>Panel.footer</a>
            +         * @method  getFooter
            +         * @param   {string}    _udata  
            +         * @return  string
            +         */
            +        , getFooter:
            +            function( _udata ){
            +                var _selector = this.getPanel().find('div.UPContent > div.ft');
            +                if( typeof _udata != 'undefined' ) this._model.footers = _udata;
            +                if( typeof this._model.footers != 'undefined' ){
            +                    if( !_selector.length ){
            +                        this.getPanel().find('div.UPContent > div.bd')
            +                            .after( _selector = $('<div class="ft" ></div>'));
            +                    }
            +                    _selector.html( this._model.footers );
            +                    this._model.footers = undefined;
            +                }
            +                return _selector;
            +            }
            +        /**
            +         * 居中显示 Panel
            +         * @method  center
            +         */
            +        , center:
            +            function(){
            +                var _layout = this.getPanel(), _lw = _layout.width(), _lh = _layout.height()
            +                    , _x, _y, _winw = $(window).width(), _winh = $(window).height()
            +                    , _scrleft = $(document).scrollLeft(), _scrtop = $(document).scrollTop()
            +                    , _iframe
            +                    , _p = this
            +                    , _tmpTop = 0
            +                    ;
            +
            +                if( _p._model.panelfixed() ){
            +                    _layout.css( {'left': '-9999px', 'top': '-9999px'} ).show();
            +                    if( _winh > _lh ){
            +                        _tmpTop = ( _winh - _lh ) / 2;
            +                        _tmpTop > 200 && ( _tmpTop = 200 );
            +                    }
            +                    _layout.css( {
            +                        'position': 'fixed'
            +                        , 'left': '0px'
            +                        , 'right': '0px'
            +                        , 'margin': 'auto'
            +                        , 'top': _tmpTop
            +                    });
            +                    return;
            +                }
            +
            +                if( window.parent && window.parent != window ){
            +                    try{
            +                        var _pnt = window.parent
            +                            , _p$ = _pnt.window.$
            +                            , _pwin = _pnt.window
            +                            , _pdoc = _pnt.document
            +                            , _pjwin = _p$( _pwin )
            +                            , _pjdoc = _p$( _pdoc )
            +                            ;
            +                        window.PANEL_WIN_ID = 'frame' + JC.f.ts();
            +
            +                        _pjdoc.find( 'iframe' ).each( function(){
            +                            var _sp = _p$( this )
            +                                , _src = _sp.attr( 'src' )
            +                                , _absSrc = JC.f.relativePath( _src, _pwin.location.href ).trim()
            +                                , _url = ( location.href + '' ).trim()
            +                                ;
            +                            if( _url.indexOf( _absSrc ) > -1 
            +                                && _sp.prop( 'contentWindow' ).PANEL_WIN_ID == window.PANEL_WIN_ID
            +                            ){
            +                                _iframe = _sp;
            +                                return false;
            +                            }
            +                        });
            +
            +                        if( _iframe && _iframe.length ){
            +                            var _rvs = rectVeiwportSize( 
            +                                    selectorToRectangle( _iframe, _p$ ) 
            +                                    , docViewport( _pjwin, _pjdoc, _p$ )
            +                                );
            +                            //JC.dir( _rvs );
            +                            _winw = _rvs.width;
            +                            _winh = _rvs.height;
            +                            _scrtop = _rvs.rect.height - _winh;
            +                            if( _scrtop > ( _rvs.viewport.maxY ) ){
            +                                _scrtop = _rvs.viewport.y + _rvs.rect.y;
            +                            }
            +                            //JC.log( _winw, _winh, _scrtop  );
            +                        }
            +                    }catch(ex){}
            +                }
            +
            +                _layout.css( {'left': '-9999px', 'top': '-9999px'} ).show();
            +                _x = (_winw - _lw) / 2 + _scrleft; 
            +                _y = (_winh - _lh) / 2 + _scrtop;
            +                if( (_winh - _lh  - 100) > 300 ){
            +                    _y -= 100;
            +                }
            +                //JC.log( (_winh - _lh / 2 - 100) )
            +
            +                if( ( _y + _lh - _scrtop ) > _winh ){
            +                    //JC.log('y overflow');
            +                    _y = _scrtop + _winh - _lh;
            +
            +                }
            +
            +                if( _y < _scrtop || _y < 0 ) _y = _scrtop;
            +
            +                _y += this._model.offsetTop();
            +                _x += this._model.offsetLeft();
            +
            +                _layout.css( {left: _x+'px', top: _y+'px'} );
            +
            +                //JC.log( _lw, _lh, _winw, _winh );
            +            }
            +    };
            +    /**
            +     * Panel 的默认模板
            +     * @private
            +     */
            +    var _deftpl =
            +        [
            +        '<div class="UPanel" style="width: 600px;">'
            +        ,'    <div class="UPContent">'
            +        ,'        <div class="bd"></div>'
            +        ,'        <span class="close" eventtype="close"></span>'
            +        ,'    </div><!--end UPContent-->'
            +        ,'</div>'
            +        ].join('')
            +     /**
            +      * 隐藏或者清除所有 Panel
            +      * <h2>使用这个方法应当谨慎, 容易为DOM造成垃圾Panel</h2>
            +      * <br /><b>注意</b>: 这是个方法, 写成class是为了方便生成文档
            +      * @namespace  JC
            +      * @class      hideAllPanel
            +      * @constructor
            +      * @static
            +      * @param      {bool}      _isClose    从DOM清除/隐藏所有Panel(包刮 JC.alert, JC.confirm, JC.Panel, JC.Dialog)
            +      *                                     <br />, true = 从DOM 清除, false = 隐藏, 默认 = false( 隐藏 )
            +      * @example
            +      *     JC.hideAllPanel();         //隐藏所有Panel
            +      *     JC.hideAllPanel( true );   //从DOM 清除所有Panel
            +      */
            +     JC.hideAllPanel = 
            +         function( _isClose ){
            +            $('div.UPanel').each( function(){
            +                var _p = $(this), _ins = Panel.getInstance( _p );
            +                if( !_ins ) return;
            +                _ins.hide();
            +                _isClose && _ins.close();
            +            });
            +         };
            +    /**
            +     * 隐藏 或 从DOM清除所有 JC.alert/JC.confirm
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * @namespace JC
            +     * @class hideAllPopup
            +     * @static
            +     * @constructor
            +     * @param   {bool}  _isClose    为真从DOM清除JC.alert/JC.confirm, 为假隐藏, 默认为false
            +     * @example
            +     *      JC.hideAllPopup();         //隐藏所有JC.alert, JC.confirm
            +     *      JC.hideAllPopup( true );   //从 DOM 清除所有 JC.alert, JC.confirm
            +     */
            +    JC.hideAllPopup =
            +        function( _isClose ){
            +            $('body > div.UPanelPopup_identifer').each( function(){
            +                var _p = $(this), _ins = Panel.getInstance( _p );
            +                if( !_ins ) return;
            +                _ins.hide();
            +                _isClose && _ins.close();
            +            });
            +        };
            +
            +    /**
            +     * 监听Panel的所有点击事件
            +     * <br />如果事件源有 eventtype 属性, 则会触发eventtype的事件类型
            +     * @event   Panel click
            +     * @private
            +     */
            +    $(document).delegate( 'div.UPanel, div.JCPanel', 'click', function( _evt ){
            +        var _panel = $(this), _src = $(_evt.target || _evt.srcElement), _evtName;
            +        if( _src && _src.length && _src.is("[eventtype]") ){
            +            _evtName = _src.attr('eventtype');
            +            //JC.log( _evtName, _panel.data('PanelInstace') );
            +            _evtName && _panel.data('PanelInstace') && _panel.data('PanelInstace').trigger( _evtName, _src, _evt );
            +        }
            +    });
            +
            +    $(document).delegate('div.UPanel, div.JCPanel', 'click', function( _evt ){
            +        var _p = $(this), _ins = Panel.getInstance( _p );
            +        if( _ins && _ins.isClickClose() ){
            +            _evt.stopPropagation();
            +        }
            +    });
            +
            +    $(document).on('click', function( _evt ){
            +        if( Panel.ignoreClick ) return;
            +        $('div.UPanel, div.JCPanel').each( function(){
            +            var _p = $(this), _ins = Panel.getInstance( _p );
            +            if( _ins && _ins.isClickClose() && _ins.layout() && _ins.layout().is(':visible') ){
            +                _ins.hide();
            +                _ins.close();
            +            }
            +        });
            +    });
            +
            +    $(document).on('keyup', function( _evt ){
            +        var _kc = _evt.keyCode;
            +        switch( _kc ){
            +            case 27:
            +                {
            +                    JC.hideAllPanel( 1 );
            +                    break;
            +                }
            +        }
            +    });
            +    var PANEL_ATTR_TYPE = {
            +        'alert': null
            +        , 'confirm': null
            +        , 'msgbox': null
            +        , 'dialog.alert': null
            +        , 'dialog.confirm': null
            +        , 'dialog.msgbox': null
            +        , 'panel': null
            +        , 'dialog': null
            +    };
            +    function rectVeiwportSize( _rect, _vp ){
            +        !_vp && ( _vp = docViewport() );
            +        var _r = { width: 0, height: 0 }
            +            , _beginX = 0, _beginY = 0
            +            ;
            +
            +        //JC.log( JSON.stringify( _rect ), '\n', JSON.stringify( _vp ) );
            +
            +        if( _rect.y < _vp.y && _rect.maxY > _vp.maxY ){
            +            _r.height = _vp.height;
            +        }else if( _rect.y < _vp.y && _rect.maxY < _vp.maxY ){
            +            _r.height = _vp.height - ( _vp.maxY - _rect.maxY );
            +        }else if( _rect.y > _vp.y && _rect.maxY > _vp.maxY ){
            +            _r.height = _vp.maxY - _rect.y;
            +        }else if( _rect.y > _vp.y && _rect.maxY < _vp.maxY ){
            +            _r.height = _rect.height;
            +        }
            +    
            +        if( _rect.x < _vp.x && _rect.maxX > _vp.maxX ){
            +            _r.width = _vp.width;
            +        }else if( _rect.x < _vp.x && _rect.maxX < _vp.maxX ){
            +            _r.width = _vp.width - ( _vp.maxX - _rect.maxX );
            +        }else if( _rect.x > _vp.x && _rect.maxX > _vp.maxX ){
            +            _r.width = _vp.maxX - _rect.x;
            +        }else if( _rect.x > _vp.x && _rect.maxX < _vp.maxX ){
            +            _r.width = _rect.width;
            +        }
            +    
            +        _r.realWidth = _r.width;
            +        _r.realHeight = _r.height;
            +        _r.width < 0 && ( _r.width = 0 );
            +        _r.height < 0 && ( _r.height = 0 );
            +        _r.rect = _rect;
            +        _r.viewport = _vp;
            +
            +        return _r;
            +    }
            +    /**
            +     * 返回选择器的 矩形 位置
            +     */
            +    function selectorToRectangle( _selector, $ ){
            +        $ = $ || window.$;
            +        _selector = $( _selector );
            +        var _offset = _selector.offset()
            +            , _w = _selector.prop('offsetWidth')
            +            , _h = _selector.prop('offsetHeight');
            +
            +        return {
            +            x: _offset.left
            +            , y: _offset.top
            +            , width: _w
            +            , height: _h
            +            , maxX: _offset.left + _w
            +            , maxY: _offset.top + _h
            +        }
            +    }
            +    function docViewport( _win, _doc, $ ){
            +        $ = $ || window.$;
            +        _win = $( _win || window );
            +        _doc = $( _doc || document );
            +        var _r = { 
            +            width: _win.width()
            +            , height: _win.height()
            +            , scrollTop: _doc.scrollTop()
            +            , scrollLeft: _doc.scrollLeft()
            +        };
            +
            +        _r.x = _r.scrollLeft;
            +        _r.y = _r.scrollTop;
            +        _r.maxX = _r.x + _r.width;
            +        _r.maxY = _r.y + _r.height;
            +        return _r;
            +    }
            +
            +    /**
            +     * 从 HTML 属性 自动执行 popup 
            +     * @attr    {string}    paneltype           弹框类型, 
            +     * @attr    {string}    panelmsg            弹框提示
            +     * @attr    {string}    panelstatus         弹框状态, 0|1|2
            +     * @attr    {function}  panelcallback       confirm 回调
            +     * @attr    {function}  panelcancelcallback cancel  回调
            +     */
            +    $(document).on( 'click', function( _evt ){
            +        var _p = $(_evt.target||_evt.srcElement)
            +            , _paneltype = _p.attr('paneltype')
            +
            +            , _panelmsg = _p.attr('panelmsg')
            +            , _panelmsgBox = _p.is('[panelmsgbox]') 
            +                ? JC.f.parentSelector( _p, _p.attr('panelmsgbox') ) 
            +                : null
            +            ;
            +
            +        if( !(_paneltype && ( _panelmsg || ( _panelmsgBox && _panelmsgBox.length ) ) ) ) return;
            +
            +        _paneltype = _paneltype.toLowerCase();
            +        if( !_paneltype in PANEL_ATTR_TYPE ) return;
            +
            +        _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault();
            +
            +        var _panel
            +            , _panelstatus = ( parseInt( _p.attr('panelstatus'), 10 ) || 0 )
            +            , _callback = _p.attr('panelcallback')
            +            , _cancelcallback = _p.attr('panelcancelcallback')
            +            , _closecallback= _p.attr('panelclosecallback')
            +
            +            , _panelbutton = parseInt( _p.attr('panelbutton'), 10 ) || 0
            +
            +            , _panelheader = _p.attr('panelheader') || ''
            +            , _panelheaderBox = _p.is('[panelheaderbox]') 
            +                ? JC.f.parentSelector( _p, _p.attr('panelheaderbox') ) 
            +                : null
            +
            +            , _panelfooter = _p.attr('panelfooter') || ''
            +            , _panelfooterBox = _p.is('[panelfooterbox]') 
            +                ? JC.f.parentSelector( _p, _p.attr('panelfooterbox') ) 
            +                : null
            +            /**
            +             * 隐藏关闭按钮
            +             */
            +            , _hideclose = _p.is('[panelhideclose]') 
            +                ? JC.f.parseBool( _p.attr('panelhideclose') )
            +                : false
            +            ;
            +
            +        _panelmsgBox && ( _panelmsg = JC.f.scriptContent( _panelmsgBox ) || _panelmsg );
            +        _panelheaderBox && _panelheaderBox.length 
            +            && ( _panelheader = JC.f.scriptContent( _panelheaderBox ) || _panelfooter );
            +        _panelfooterBox && _panelfooterBox.length 
            +            && ( _panelfooter = JC.f.scriptContent( _panelfooterBox ) || _panelfooter );
            +
            +        _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault();
            +
            +           ;
            +        
            +        _callback && ( _callback = window[ _callback ] );
            +        _closecallback && ( _closecallback = window[ _closecallback ] );
            +
            +        switch( _paneltype ){
            +            case 'alert': JC.alert && ( _panel = JC.alert( _panelmsg, _p, _panelstatus ) ); break;
            +            case 'confirm': JC.confirm && ( _panel = JC.confirm( _panelmsg, _p, _panelstatus ) ); break;
            +            case 'msgbox': JC.msgbox && ( _panel = JC.msgbox( _panelmsg, _p, _panelstatus ) ); break;
            +            case 'dialog.alert': 
            +                   {
            +                       JC.Dialog && JC.Dialog.alert 
            +                           && ( _panel = JC.Dialog.alert( _panelmsg, _panelstatus ) ); 
            +                       break;
            +                   }
            +            case 'dialog.confirm': 
            +                   {
            +                       JC.Dialog && JC.Dialog.confirm
            +                           && ( _panel = JC.Dialog.confirm( _panelmsg, _panelstatus ) ); 
            +                       break;
            +                   }
            +            case 'dialog.msgbox': 
            +                   {
            +                       JC.Dialog && JC.Dialog.msgbox
            +                           && ( _panel = JC.Dialog.msgbox( _panelmsg, _panelstatus ) ); 
            +                       break;
            +                   }
            +            case 'panel': 
            +            case 'dialog': 
            +                   {
            +                       var _padding = '';
            +                       if( _paneltype == 'panel' ){
            +                           _panel = new Panel( _panelheader, _panelmsg + Panel._getButton( _panelbutton ), _panelfooter );
            +                       }else{
            +                           if( !JC.Dialog ) return;
            +                           _panel = JC.Dialog( _panelheader,  _panelmsg + Panel._getButton( _panelbutton ), _panelfooter );
            +                       }
            +                       _panel.on( 'beforeshow', function( _evt, _ins ){
            +                           !_panelheader && _ins.find( 'div.hd' ).hide();
            +                           !_panelheader && _ins.find( 'div.ft' ).hide();
            +                           Panel._fixWidth( _panelmsg, _panel );
            +                           _hideclose && _ins.find('span.close').hide();
            +                       });
            +                       _paneltype == 'panel' && _panel.show( _p, 'top' );
            +                       break;
            +                   }
            +        }
            +
            +        if( !_panel ) return;
            +            
            +        if( /msgbox/i.test( _paneltype ) ){
            +            _callback && _panel.on( 'close', _callback );
            +        }else{
            +            _callback && _panel.on( 'confirm', _callback );
            +        }
            +        _closecallback && _panel.on( 'close', _closecallback );
            +        _cancelcallback && _panel.on( 'cancel', _cancelcallback );
            +
            +        _panel.triggerSelector( _p );
            +    });
            +
            +    return JC.Panel;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Panel_Panel.js.html b/docs_api/files/.._comps_Panel_Panel.js.html index b90aaec58..900cfd693 100644 --- a/docs_api/files/.._comps_Panel_Panel.js.html +++ b/docs_api/files/.._comps_Panel_Panel.js.html @@ -3,11 +3,17 @@ ../comps/Panel/Panel.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,2338 +252,32 @@

            File: ../comps/Panel/Panel.js

            -//TODO: html popup add trigger ref
            -;(function($){
            -    window.Panel = JC.Panel = Panel;
            -    /**
            -     * 弹出层基础类 JC.Panel
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Panel.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a></p>
            -     * <h2>Panel Layout 可用的 html attribute</h2>
            -     * <dl>
            -     *      <dt>panelclickclose = bool</dt>
            -     *      <dd>点击 Panel 外时, 是否关闭 panel</dd>
            -     *
            -     *      <dt>panelautoclose = bool</dt>
            -     *      <dd>Panel 是否自动关闭, 默认关闭时间间隔 = 2000 ms</dd>
            -     *
            -     *      <dt>panelautoclosems = int, default = 2000 ms</dt>
            -     *      <dd>自动关闭 Panel 的时间间隔</dd>
            -     * </dl>
            -     * <h2>a, button 可用的 html attribute( 自动生成弹框)</h2>
            -     * <dl>
            -     *      <dt>paneltype = string, require</dt>
            -     *      <dd>
            -     *          弹框类型: alert, confirm, msgbox, panel 
            -     *          <br />dialog.alert, dialog.confirm, dialog.msgbox, dialog
            -     *      </dd>
            -     *
            -     *      <dt>panelmsg = string</dt>
            -     *      <dd>要显示的内容</dd>
            -     *
            -     *      <dt>panelmsgBox = script selector</dt>
            -     *      <dd>要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性</dd>
            -     *
            -     *      <dt>panelstatus = int, default = 0</dt>
            -     *      <dd>
            -     *          弹框状态: 0: 成功, 1: 失败, 2: 警告 
            -     *          <br /><b>类型不为 panel, dialog 时生效</b>
            -     *      </dd>
            -     *
            -     *      <dt>panelcallback = function</dt>
            -     *      <dd>
            -     *          点击确定按钮的回调, <b>window 变量域</b>
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     *      </dd>
            -     *
            -     *      <dt>panelcancelcallback = function</dt>
            -     *      <dd>
            -     *          点击取消按钮的回调, <b>window 变量域</b>
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     *      </dd>
            -     *
            -     *      <dt>panelclosecallback = function</dt>
            -     *      <dd>
            -     *          弹框关闭时的回调, <b>window 变量域</b>
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     *      </dd>
            -     *
            -     *      <dt>panelbutton = int, default = 0</dt>
            -     *      <dd>
            -     *          要显示的按钮, 0: 无, 1: 确定, 2: 确定, 取消
            -     *          <br /><b>类型为 panel, dialog 时生效</b>
            -     *      </dd>
            -     *
            -     *      <dt>panelheader = string</dt>
            -     *      <dd>
            -     *          panel header 的显示内容
            -     *          <br /><b>类型为 panel, dialog 时生效</b>
            -     *      </dd>
            -     *
            -     *      <dt>panelheaderBox = script selector</dt>
            -     *      <dd>
            -     *          panel header 的显示内容
            -     *          <br />要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
            -     *          <br /><b>类型为 panel, dialog 时生效</b>
            -     *      </dd>
            -     *
            -     *      <dt>panelfooterbox = script selector</dt>
            -     *      <dd>
            -     *          panel footer 的显示内容
            -     *          <br />要显示的脚本模板, 如果需要显示大量 HTML, 应该使用这个属性
            -     *          <br /><b>类型为 panel, dialog 时生效</b>
            -     *      </dd>
            -    *
            -     *      <dt>panelhideclose = bool, default = false</dt>
            -     *      <dd>
            -     *          是否隐藏关闭按钮
            -     *          <br /><b>类型为 panel, dialog 时生效</b>
            -     *      </dd>
            -     * </dl>
            -     * @namespace JC
            -     * @class Panel
            -     * @constructor
            -     * @param   {selector|string}   _selector   自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers 
            -     * @param   {string}            _headers    定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys
            -     * @param   {string}            _bodys      定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers
            -     * @param   {string}            _footers    定义模板的 footer 文字
            -     * @version dev 0.1
            -     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            -     * @date    2013-06-04
            -     * @example
            -            <script src="../../../lib.js"></script>
            -            <script>JC.use( 'Panel' ); </script>
            -            <script>
            -                var btnstr = [
            -                    '<div style="text-align:center" class="UButton">'
            -                    , '<button type="button" eventtype="confirm">确定</button>'
            -                    , '<button type="button" eventtype="cancel">取消</button>\n'
            -                    , '</div>'
            -                ].join('');
            -                $(document).ready( function(_evt){
            -                    tmpPanel = new JC.Panel( '默认panel', '<h2>test content</h2>' + btnstr, 'test footer');
            -                    tmpPanel.on('close', function(_evt, _panel){
            -                        JC.log('user close evnet');
            -                    });
            -                    tmpPanel.show( 0 );
            -                });
            -            </script>
            -     */
            -    function Panel( _selector, _headers, _bodys, _footers ){
            -        typeof _selector == 'string' && ( _selector = _selector.trim().replace( /[\r\n]+/g, '') ); 
            -        typeof _headers == 'string' && ( _headers = _headers.trim().replace( /[\r\n]+/g, '') ); 
            -        typeof _bodys == 'string' && ( _bodys = _bodys.trim().replace( /[\r\n]+/g, '') ); 
            -
            -        if( Panel.getInstance( _selector ) ) return Panel.getInstance( _selector );
            -        /**
            -         * 存放数据的model层, see <a href='JC.Panel.Model.html'>Panel.Model</a>
            -         * @property _model 
            -         * @private
            -         */
            -        this._model = new Model( _selector, _headers, _bodys, _footers );
            -        /**
            -         * 控制视图的view层, see <a href='JC.Panel.View.html'>Panel.View</a>
            -         * @property    _view 
            -         * @private
            -         */
            -        this._view = new View( this._model );
            -
            -        this._init();
            -    }
            -    /**
            -     * 从 selector 获取 Panel 的实例
            -     * <br /><b>如果从DOM初始化, 不进行判断的话, 会重复初始化多次</b>
            -     * @method getInstance
            -     * @param   {selector}      _selector
            -     * @static
            -     * @return  {Panel instance}
            -     */
            -    Panel.getInstance =
            -        function( _selector ){
            -            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            -                    _selector = $(_selector);
            -            if( _selector && typeof _selector == 'string' ) return;
            -            return $(_selector).data('PanelInstace');
            -        };
            -    /**
            -     * 显示Panel时, 是否 focus 到 按钮上
            -     * focusButton
            -     * @property    focusButton
            -     * @type        bool
            -     * @default     true
            -     * @static
            -     */
            -    Panel.focusButton = true;
            -    /**
            -     * 页面点击时, 是否自动关闭 Panel
            -     * @property    clickClose
            -     * @type        bool
            -     * @default     true
            -     * @static
            -     */
            -    Panel.clickClose = true;
            -    /**
            -     * 自动关闭的时间间隔, 单位毫秒
            -     * <br />调用 ins.autoClose() 时生效
            -     * @property    autoCloseMs
            -     * @type        int
            -     * @default     2000
            -     * @static
            -     */
            -    Panel.autoCloseMs = 2000;
            -    /**
            -     * 修正弹框的默认显示宽度
            -     * @method  _fixWidth
            -     * @param   {string}    _msg    查显示的文本
            -     * @param   {JC.Panel}  _panel
            -     * @param   {int}       _minWidth
            -     * @param   {int}       _maxWidth
            -     * @static
            -     * @private
            -     */
            -    Panel._fixWidth = 
            -        function( _msg, _panel, _minWidth, _maxWidth ){
            -            var _tmp = $('<div class="UPanel_TMP" style="position:absolute; left:-9999px;top:-9999px;">' + _msg + '</div>').appendTo('body'), _w = _tmp.width() + 80;
            -                _tmp.remove();
            -
            -            _minWidth = _minWidth || 200;
            -            _maxWidth = _maxWidth || 500;
            -
            -            _w > _maxWidth && ( _w = _maxWidth );
            -            _w < _minWidth && ( _w = _minWidth );
            -
            -            _panel.selector().css('width', _w);
            -        };
            -    /**
            -     * 获取 显示的 BUTTON
            -     * @method  _getButton
            -     * @param   {int}       _type   0: 没有 BUTTON, 1: confirm, 2: confirm + cancel
            -     * @static
            -     * @private
            -     */
            -    Panel._getButton =
            -        function( _type ){
            -            var _r = [];
            -            if( _type ){
            -                _r.push( '<div style="text-align:center" class="UButton"> ');
            -                if( _type >= 1 ){
            -                    _r.push( '<button type="button" eventtype="confirm">确定</button>' );
            -                }
            -                if( _type >= 2 ){
            -                    _r.push( '<button type="button" eventtype="cancel">取消</button>' );
            -                }
            -                _r.push( '</div>');
            -            }
            -            return _r.join('');
            -        };
            -    
            -    Panel.prototype = {
            -        /**
            -         * 初始化Panel
            -         * @method  _init
            -         * @private
            -         */
            -        _init:
            -            function(){
            -                var _p = this;
            -                _p._view.getPanel().data('PanelInstace', _p);
            -
            -                /**
            -                 * 初始化Panel 默认事件
            -                 * @private
            -                 */
            -                _p._model.addEvent( 'close_default'
            -                                    , function( _evt, _panel ){ _panel._view.close(); } );
            -
            -                _p._model.addEvent( 'show_default'
            -                                    , function( _evt, _panel ){ _panel._view.show(); } );
            -
            -                _p._model.addEvent( 'hide_default'
            -                                    , function( _evt, _panel ){ _panel._view.hide(); } );
            -
            -                _p._model.addEvent( 'confirm_default'
            -                                    , function( _evt, _panel ){ _panel.trigger('close'); } );
            -
            -                _p._model.addEvent( 'cancel_default'
            -                                    , function( _evt, _panel ){ _panel.trigger('close'); } );
            -
            -                _p._model.panelautoclose() && _p.autoClose();
            -
            -               return _p;
            -            }    
            -        /**
            -         * 为Panel绑定事件
            -         * <br /> 内置事件类型有 show, hide, close, center, confirm, cancel
            -         * , beforeshow, beforehide, beforeclose, beforecenter
            -         * <br /> 用户可通过 HTML eventtype 属性自定义事件类型
            -         * @method on
            -         * @param   {string}    _evtName    要绑定的事件名
            -         * @param   {function}  _cb         要绑定的事件回调函数
            -         * @example
            -                //绑定内置事件
            -                <button type="button" eventtype="close">text</button>
            -                <script>
            -                panelInstace.on( 'close', function( _evt, _panel ){ do something } );
            -                </script>
            -
            -                //绑定自定义事件
            -                <button type="button" eventtype="userevent">text</button>
            -                <script>
            -                panelInstace.on( 'userevent', function( _evt, _pan:el ){ do something } );
            -                </script>
            -         */
            -        , on:
            -            function( _evtName, _cb ){
            -                _evtName && _cb && this._model.addEvent( _evtName, _cb );
            -                return this;
            -            }
            -        /**
            -         * 显示 Panel
            -         * <br /> Panel初始后, 默认是隐藏状态, 显示 Panel 需要显式调用 show 方法
            -         * @method  show
            -         * @param   {int|selector}   _position   指定 panel 要显示的位置, 
            -         *  <br />如果 _position 为 int:  0, 表示屏幕居中显示
            -         *  <br />如果 _position 为 selector:  Paenl 的显示位置将基于 _position 的上下左右
            -         * @example
            -         *      panelInstace.show();            //默认显示
            -         *      panelInstace.show( 0 );         //居中显示
            -         *      panelInstace.show( _selector ); //位于 _selector 的上下左右
            -         */
            -        , show:
            -            function( _position, _selectorDiretion ){
            -                var _p = this;
            -                setTimeout(
            -                    function(){
            -                        switch( typeof _position ){
            -                            case 'number': 
            -                                {
            -                                    switch( _position ){
            -                                        case 0: _p.center(); break;
            -                                    }
            -                                    break;
            -                                }
            -                            case 'object':
            -                                {
            -                                    _position = $(_position);
            -                                    _position.length && _p._view.positionWith( _position, _selectorDiretion );
            -
            -                                    if( !_p._model.bindedPositionWithEvent ){
            -                                        _p._model.bindedPositionWithEvent = true;
            -
            -                                        $(window).on('resize', changePosition );
            -                                        _p.on('close', function(){
            -                                            _p._model.bindedPositionWithEvent = false;
            -                                            $(window).unbind('resize', changePosition);
            -                                        });
            -
            -                                        function changePosition(){
            -                                            _p.positionWith( _position, _selectorDiretion );
            -                                        }
            -                                    }
            -
            -                                    break;
            -                                }
            -                        }
            -                    }, 10);
            -                this.trigger('beforeshow', this._view.getPanel() );
            -                this.trigger('show', this._view.getPanel() );
            -
            -                return this;
            -            }
            -        /**
            -         * 设置Panel的显示位置基于 _src 的左右上下
            -         * @method  positionWith
            -         * @param   {selector}      _src 
            -         * @param   {string}        _selectorDiretion   如果 _src 为 selector, _selectorDiretion 可以指定 top, 显示在上方
            -         */
            -        , positionWith: 
            -            function( _src, _selectorDiretion ){ 
            -                _src = $(_src ); 
            -                _src && _src.length && this._view.positionWith( _src, _selectorDiretion ); 
            -                return this;
            -            }
            -        /**
            -         * 隐藏 Panel
            -         * <br /> 隐藏 Panel 设置 css display:none, 不会从DOM 删除 Panel
            -         * @method  hide
            -         */
            -        , hide:
            -            function(){
            -                this.trigger('beforehide', this._view.getPanel() );
            -                this.trigger('hide', this._view.getPanel() );
            -                return this;
            -            }
            -        /**
            -         * 关闭 Panel
            -         * <br /> <b>关闭 Panel 是直接从 DOM 中删除 Panel</b>
            -         * @method  close
            -         */
            -        , close:
            -            function(){
            -                JC.log('Panel.close');
            -                this.trigger('beforeclose', this._view.getPanel() );
            -                this.trigger('close', this._view.getPanel() );
            -                return this;
            -            }
            -        /**
            -         * 判断点击页面时, 是否自动关闭 Panel
            -         * @method  isClickClose
            -         * @return bool
            -         */
            -        , isClickClose:
            -            function(){
            -                return this._model.panelclickclose();
            -            }
            -        /**
            -         * 点击页面时, 添加自动隐藏功能
            -         * @method  clickClose
            -         * @param   {bool}          _removeAutoClose
            -         */
            -        , clickClose:
            -            function( _removeAutoClose ){
            -                _removeAutoClose && this.layout() && this.layout().removeAttr('panelclickclose');
            -                !_removeAutoClose && this.layout() && this.layout().attr('panelclickclose', true);
            -                return this;
            -            }
            -        /**
            -         * clickClose 的别名
            -         * <br />这个方法的存在是为了向后兼容, 请使用 clickClose
            -         */
            -        , addAutoClose:
            -            function(){
            -                this.clickClose.apply( this, sliceArgs( arguments ) );
            -                return this;
            -            }
            -        /**
            -         * 添加自动关闭功能
            -         * @method  autoClose
            -         * @param   {bool}          _removeAutoClose
            -         */
            -        , autoClose:
            -            function( _callback, _ms ){
            -                if( typeof _callback == 'number' ){
            -                    _ms = _callback;
            -                    _callback = null;
            -                }
            -                var _p = this, _tm;
            -                _ms = _p._model.panelautoclosems( _ms );
            -
            -                Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout );
            -                _p.on('close', function(){
            -                    Panel._autoCloseTimeout && clearTimeout( Panel._autoCloseTimeout );
            -                });
            -                Panel._autoCloseTimeout = 
            -                    setTimeout( function(){
            -                        _callback && _p.on( 'close', _callback );
            -                        _p.close();
            -                    }, _ms );
            -
            -                return this;
            -            }
            -         /**
            -         * focus 到 button
            -         * <br />优先查找 input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]
            -         * <br />input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]
            -         * @method  focusButton
            -         */
            -        , focusButton: function(){ this._view.focusButton(); return this; }
            -        /**
            -         * 从DOM清除Panel
            -         * <br /> <b>close 方法清除 Panel可以被用户阻止, 该方法不会被用户阻止</b>
            -         * @method  dispose
            -         */
            -        , dispose:
            -            function(){
            -                JC.log('Panel.dispose');
            -                this._view.close();
            -                return this;
            -            }
            -        /**
            -         * 把 Panel 位置设为屏幕居中
            -         * @method  center
            -         */
            -        , center:
            -            function(){
            -                this.trigger('beforecenter', this._view.getPanel() );
            -                this._view.center();
            -                this.trigger('center', this._view.getPanel() );
            -                return this;
            -            }
            -        /**
            -         * 返回 Panel 的 jquery dom选择器对象
            -         * <br />这个方法以后将会清除, 请使用 layout 方法
            -         * @method  selector
            -         * @return  {selector}
            -         */
            -        , selector: function(){ return this._view.getPanel(); }
            -        /**
            -         * 返回 Panel 的 jquery dom选择器对象
            -         * @method  layout
            -         * @return  {selector}
            -         */
            -        , layout: function(){ return this._view.getPanel(); }
            -        /**
            -         * 从 Panel 选择器中查找内容
            -         * <br />添加这个方法是为了方便jquery 使用者的习惯
            -         * @method  find
            -         * @param   {selector}  _selector
            -         * @return  selector
            -         */
            -        , find: function( _selector ){ return this.layout().find( _selector ); }
            -        /**
            -         * 触发 Panel 已绑定的事件
            -         * <br />用户可以使用该方法主动触发绑定的事件
            -         * @method trigger
            -         * @param   {string}    _evtName    要触发的事件名, 必填参数
            -         * @param   {selector}  _srcElement 触发事件的源对象, 可选参数
            -         * @example
            -         *      panelInstace.trigger('close');
            -         *      panelInstace.trigger('userevent', sourceElement);
            -         */
            -        , trigger:
            -            function( _evtName, _srcElement ){
            -                JC.log( 'Panel.trigger', _evtName );
            -
            -                var _p = this, _evts = this._model.getEvent( _evtName ), _processDefEvt = true;
            -                if( _evts && _evts.length ){
            -                    _srcElement && (_srcElement = $(_srcElement) ) 
            -                        && _srcElement.length && (_srcElement = _srcElement[0]);
            -
            -                    $.each( _evts, function( _ix, _cb ){
            -                        if( _cb.call( _srcElement, _evtName, _p ) === false ) 
            -                            return _processDefEvt = false; 
            -                    });
            -                }
            -
            -                if( _processDefEvt ){
            -                    var _defEvts = this._model.getEvent( _evtName + '_default' );
            -                    if( _defEvts && _defEvts.length ){
            -                        $.each( _defEvts, function( _ix, _cb ){
            -                            if( _cb.call( _srcElement, _evtName, _p ) === false ) 
            -                                return false; 
            -                        });
            -                    }
            -                }
            -                return this;
            -            }
            -        /**
            -         * 获取或者设置 Panel Header 的HTML内容
            -         * <br />如果 Panel默认没有 Header的话, 使用该方法 _html 非空可动态创建一个Header
            -         * @method  header
            -         * @param   {string}    _html   
            -         * @return  {string}    header 的HTML内容
            -         */
            -        , header:
            -            function( _html ){
            -                if( typeof _html != 'undefined' ) this._view.getHeader( _html );
            -                var _selector = this._view.getHeader();
            -                if( _selector && _selector.length ) _html = _selector.html();
            -                return _html || '';
            -            }
            -        /**
            -         * 获取或者设置 Panel body 的HTML内容
            -         * @method  body
            -         * @param   {string}    _html   
            -         * @return  {string}    body 的HTML内容
            -         */
            -        , body:
            -            function( _html ){
            -                if( typeof _html != 'undefined' ) this._view.getBody( _html );
            -                var _selector = this._view.getBody();
            -                if( _selector && _selector.length ) _html = _selector.html();
            -                return _html || '';
            -            }
            -        /**
            -         * 获取或者设置 Panel footer 的HTML内容
            -         * <br />如果 Panel默认没有 footer的话, 使用该方法 _html 非空可动态创建一个footer
            -         * @method  footer
            -         * @param   {string}    _html   
            -         * @return  {string}    footer 的HTML内容
            -         */
            -        , footer:
            -            function( _html ){
            -                if( typeof _html != 'undefined' ) this._view.getFooter( _html );
            -                var _selector = this._view.getFooter();
            -                if( _selector && _selector.length ) _html = _selector.html();
            -                return _html || '';
            -            }
            -        /**
            -         * 获取或者设置 Panel 的HTML内容
            -         * @method  panel
            -         * @param   {string}    _html   
            -         * @return  {string}    panel 的HTML内容
            -         */
            -        , panel:
            -            function( _html ){
            -                if( typeof _html != 'undefined' ) this._view.getPanel( _html );
            -                var _selector = this._view.getPanel();
            -                if( _selector && _selector.length ) _html = _selector.html();
            -                return _html || '';
            -            }
            -        /**
            -         * 获取 html popup/dialog 的触发 node
            -         * @method  triggerSelector
            -         * @param   {Selector}      _setterSelector
            -         * @return  {Selector|null}
            -         */
            -        , triggerSelector:
            -            function( _setterSelector ){
            -                return this._model.triggerSelector( _setterSelector );
            -            }
            -    }
            -    /**
            -     * Panel 显示前会触发的事件<br/>
            -     * 这个事件在用户调用 _panelInstance.show() 时触发
            -     * @event   beforeshow
            -     * @type    function
            -     * @example     
            -     *      panelInstace.on( 'beforeshow', function( _evt, _panelInstance ){ do something });
            -     */
            -    /**
            -     * 显示Panel时会触发的事件
            -     * @event   show
            -     * @type    function
            -     * @example     
            -     *      panelInstace.on( 'show', function( _evt, _panelInstance ){ do something });
            -     */
            -    /**
            -     * Panel 隐藏前会触发的事件<br/>
            -     * <br />这个事件在用户调用 _panelInstance.hide() 时触发
            -     * @event   beforehide
            -     * @type    function
            -     * @example     
            -     *      panelInstace.on( 'beforehide', function( _evt, _panelInstance ){ do something });
            -     */
            -    /**
            -     * Panel 隐藏时会触发的事件<br/>
            -     * <br />这个事件在用户调用 _panelInstance.hide() 时触发
            -     * @event   hide
            -     * @type    function
            -     * @example     
            -     *      panelInstace.on( 'hide', function( _evt, _panelInstance ){ do something });
            -     */
            -    /**
            -     * Panel 关闭前会触发的事件<br/>
            -     * 这个事件在用户调用 _panelInstance.close() 时触发
            -     * @event   beforeclose
            -     * @type    function
            -     * @example     
            -     *      <button type="button" eventtype="close">text</button>
            -     *      <script>
            -     *      panelInstace.on( 'beforeclose', function( _evt, _panelInstance ){ do something });
            -     *      </script>
            -     */
            -    /**
            -     * 关闭事件
            -     * @event   close
            -     * @type    function
            -     * @example     
            -     *      <button type="button" eventtype="close">text</button>
            -     *      <script>
            -     *      panelInstace.on( 'close', function( _evt, _panelInstance ){ do something });
            -     *      </script>
            -     */
            -    /**
            -     * Panel 居中显示前会触发的事件<br/>
            -     * 这个事件在用户调用 _panelInstance.center() 时触发
            -     * @event   beforecenter
            -     * @type    function
            -     * @example     
            -     *      panelInstace.on( 'beforecenter', function( _evt, _panelInstance ){ do something });
            -     */
            -    /**
            -     * Panel 居中后会触发的事件
            -     * @event   center
            -     * @type    function
            -     * @example     
            -     *      panelInstace.on( 'center', function( _evt, _panelInstance ){ do something });
            -     */
            -    /**
            -     * Panel 点击确认按钮触发的事件
            -     * @event   confirm
            -     * @type    function
            -     * @example     
            -     *      <button type="button" eventtype="confirm">text</button>
            -     *      <script>
            -     *      panelInstace.on( 'confirm', function( _evt, _panelInstance ){ do something });
            -     *      </script>
            -     */
            -    /**
            -     * Panel 点击确取消按钮触发的事件
            -     * @event   cancel
            -     * @type    function
            -     * @example     
            -     *      <button type="button" eventtype="cancel">text</button>
            -     *      <script>
            -     *      panelInstace.on( 'cancel', function( _evt, _panelInstance ){ do something });
            -     *      </script>
            -     */
            -
            -    /**
            -     * 存储 Panel 的基础数据类
            -     * <br /><b>这个类为 Panel 的私有类</b>
            -     * @class   Model
            -     * @namespace   JC.Panel
            -     * @constructor
            -     * @param   {selector|string}   _selector   自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers 
            -     * @param   {string}            _headers    定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys
            -     * @param   {string}            _bodys      定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers
            -     * @param   {string}            _footers    定义模板的 footer 文字
            -     */
            -    function Model( _selector, _headers, _bodys, _footers ){
            -        /**
            -         * panel 的 HTML 对象或者字符串
            -         * <br /> 这是初始化时的原始数据
            -         * @property    selector
            -         * @type    selector|string   
            -         */
            -        this.selector = _selector;
            -        /**
            -         * header 内容 
            -         * <br /> 这是初始化时的原始数据
            -         * @property    headers
            -         * @type    string
            -         */
            -        this.headers = _headers;
            -        /**
            -         * body 内容
            -         * <br /> 这是初始化时的原始数据
            -         * @property bodys
            -         * @type    string
            -         */
            -        this.bodys = _bodys;
            -        /**
            -         * footers 内容
            -         * <br /> 这是初始化时的原始数据
            -         * @property footers
            -         * @type    string
            -         */
            -        this.footers = _footers;
            -        /**
            -         * panel 初始化后的 selector 对象
            -         * @property    panel
            -         * @type    selector
            -         */
            -        this.panel;
            -        /**
            -         * 存储用户事件和默认事件的对象
            -         * @property    _events
            -         * @type    Object
            -         * @private
            -         */
            -        this._events = {};
            -        this._init();
            -    }
            -    
            -    Model.prototype = {
            -        /**
            -         * Model 初始化方法
            -         * @method  _init
            -         * @private
            -         * @return  {Model instance}
            -         */
            -        _init:
            -            function(){
            -                var _p = this, _selector = typeof this.selector != 'undefined' ? $(this.selector) : undefined;
            -                Panel.ignoreClick = true;
            -                if( _selector && _selector.length ){
            -                    this.selector = _selector;
            -                    JC.log( 'user tpl', this.selector.parent().length );
            -                    if( !this.selector.parent().length ){
            -                        _p.selector.appendTo( $(document.body ) );
            -                        window.jcAutoInitComps && jcAutoInitComps( _p.selector );
            -                    }
            -                }else if( !_selector || _selector.length === 0 ){
            -                    this.footers = this.bodys;
            -                    this.bodys = this.headers;
            -                    this.headers = this.selector;
            -                    this.selector = undefined;
            -                }
            -                setTimeout( function(){ Panel.ignoreClick = false; }, 1 );
            -                return this;
            -            }
            -        , triggerSelector:
            -            function( _setterSelector ){
            -                typeof _setterSelector != 'undefined' 
            -                    && ( this._triggerSelector = _setterSelector )
            -                    ;
            -                return this._triggerSelector;
            -            }
            -        /**
            -         * 添加事件方法
            -         * @method  addEvent
            -         * @param   {string}    _evtName    事件名
            -         * @param   {function}  _cb         事件的回调函数
            -         */
            -        , addEvent:
            -            function( _evtName, _cb ){
            -                if( !(_evtName && _cb ) ) return;
            -                _evtName && ( _evtName = _evtName.toLowerCase() );
            -                if( !(_evtName in this._events ) ){
            -                    this._events[ _evtName ] = []
            -                }
            -                if( /\_default/i.test( _evtName ) ) this._events[ _evtName ].unshift( _cb );
            -                else this._events[ _evtName ].push( _cb );
            -            }
            -        /**
            -         * 获取事件方法
            -         * @method  getEvent
            -         * @param   {string}    _evtName    事件名
            -         * @return  {array}     某类事件类型的所有回调
            -         */
            -        , getEvent:
            -            function( _evtName ){
            -                return this._events[ _evtName ];
            -            }
            -        , panelfocusbutton:
            -            function(){
            -                var _r = Panel.focusButton;
            -                if( this.panel.is( '[panelfocusbutton]' ) ){
            -                    _r = parseBool( this.panel.attr('panelfocusbutton') );
            -                }
            -                return _r;
            -            }
            -        , panelclickclose:
            -            function(){
            -                var _r = Panel.clickClose;
            -                if( this.panel.is( '[panelclickclose]' ) ){
            -                    _r = parseBool( this.panel.attr('panelclickclose') );
            -                }
            -                return _r;
            -            }
            -        , panelautoclose:
            -            function(){
            -                var _r;
            -                if( this.panel.is( '[panelautoclose]' ) ){
            -                    _r = parseBool( this.panel.attr('panelautoclose') );
            -                }
            -                return _r;
            -            }
            -        , panelautoclosems:
            -            function( _ms ){
            -                var _r = Panel.autoCloseMs;
            -                if( this.panel.is( '[panelautoclosems]' ) ){
            -                    _r = parseInt( this.panel.attr('panelautoclosems'), 10 );
            -                }
            -                typeof _ms == 'number' && ( _r = _ms );
            -                return _r;
            -            }
            -    };
            -     /**
            -     * 存储 Panel 的基础视图类
            -     * <br /><b>这个类为 Panel 的私有类</b>
            -     * @class   View
            -     * @namespace   JC.Panel
            -     * @constructor
            -     * @param   {Panel.Model}   _model  Panel的基础数据类, see <a href='JC.Panel.Model.html'>Panel.Model</a>
            -     */
            -    function View( _model ){
            -        /**
            -         * Panel的基础数据类, see <a href='JC.Panel.Model.html'>Panel.Model</a>
            -         * @property _model
            -         * @type Panel.Model
            -         * @private
            -         */
            -        this._model = _model;
            -        /**
            -         * 默认模板
            -         * @prototype   _tpl
            -         * @type        string
            -         * @private
            -         */
            -        this._tpl = _deftpl;
            -
            -        this._init();
            -    }
            -    
            -    View.prototype = {
            -        /**
            -         * View 的初始方法
            -         * @method  _init
            -         * @private
            -         * @for View
            -         */
            -        _init:
            -            function(){
            -                if( !this._model.panel ){
            -                    if( this._model.selector ){
            -                        this._model.panel = this._model.selector;
            -                    }else{
            -                        this._model.panel = $(this._tpl);
            -                        this._model.panel.appendTo(document.body);
            -                        window.jcAutoInitComps && jcAutoInitComps( this._model.panel );
            -                    }
            -                }
            -
            -                this.getHeader();
            -                this.getBody();
            -                this.getFooter();
            -
            -                return this;
            -            }
            -        /**
            -         * 设置Panel的显示位置基于 _src 的左右上下
            -         * @method  positionWith
            -         * @param   {selector}      _src 
            -         */
            -        , positionWith:
            -            function( _src, _selectorDiretion ){
            -                if( !( _src && _src.length ) ) return;
            -                this.getPanel().css( { 'left': '-9999px', 'top': '-9999px', 'display': 'block', 'position': 'absolute' } );
            -                var _soffset = _src.offset(), _swidth = _src.prop('offsetWidth'), _sheight = _src.prop('offsetHeight');
            -                var _lwidth = this.getPanel().prop('offsetWidth'), _lheight = this.getPanel().prop('offsetHeight');
            -                var _wwidth = $(window).width(), _wheight = $(window).height();
            -                var _stop = $(document).scrollTop(), _sleft = $(document).scrollLeft();
            -                var _x = _soffset.left + _sleft
            -                    , _y = _soffset.top + _sheight + 1;
            -
            -                if( typeof _selectorDiretion != 'undefined' ){
            -                    switch( _selectorDiretion ){
            -                        case 'top':
            -                            {
            -                                _y = _soffset.top - _lheight - 1;
            -                                _x = _soffset.left + _swidth / 2 - _lwidth / 2;
            -                                break;
            -                            }
            -                    }
            -                }
            -
            -                var _maxY = _stop + _wheight - _lheight, _minY = _stop;
            -                if( _y > _maxY ) _y = _soffset.top - _lheight - 1;
            -                if( _y < _minY ) _y = _stop;
            -
            -                var _maxX = _sleft + _wwidth - _lwidth, _minX = _sleft;
            -                if( _x > _maxX ) _x = _sleft + _wwidth - _lwidth - 1;
            -                if( _x < _minX ) _x = _sleft;
            -
            -                this.getPanel().css( { 'left': _x + 'px', 'top': _y + 'px' } );
            -            }
            -        /**
            -         * 显示 Panel
            -         * @method  show
            -         */
            -        , show:
            -            function(){
            -                this.getPanel().css( { 'z-index': ZINDEX_COUNT++ } ).show();
            -                //this.focusButton();
            -            }
            -        /**
            -         * focus button
            -         * @method  focus button
            -         */
            -        , focusButton:
            -            function(){
            -                if( !this._model.panelfocusbutton() ) return;
            -                var _control = this.getPanel().find( 'input[eventtype=confirm], input[type=submit], button[eventtype=confirm], button[type=submit]' );
            -                !_control.length && ( _control = this.getPanel().find( 'input[eventtype=cancel], input[type=buton], button[eventtype=cancel], button[type=button]' ) )
            -                _control.length && $( _control[0] ).focus();
            -            }
            -        /**
            -         * 隐藏 Panel
            -         * @method hide
            -         */
            -        , hide:
            -            function(){
            -                this.getPanel().hide();
            -            }
            -        /**
            -         * 关闭 Panel
            -         * @method  close
            -         */
            -        , close:
            -            function(){
            -                JC.log( 'Panel._view.close()');
            -                this.getPanel().remove();
            -            }
            -        /**
            -         * 获取 Panel 的 selector 对象
            -         * @method  getPanel
            -         * @return  selector
            -         */
            -        , getPanel:
            -            function( _udata ){
            -                if( typeof _udata != 'undefined' ){
            -                    this.getPanel().html( _udata );
            -                }
            -                return this._model.panel;
            -            }
            -        /**
            -         * 获取或设置Panel的 header 内容, see <a href='JC.Panel.html#method_header'>Panel.header</a>
            -         * @method  getHeader
            -         * @param   {string}    _udata  
            -         * @return  string
            -         */
            -        , getHeader:
            -            function( _udata ){
            -                var _selector = this.getPanel().find('div.UPContent > div.hd');
            -                if( typeof _udata != 'undefined' ) this._model.headers = _udata;
            -                if( typeof this._model.headers != 'undefined' ){
            -                    if( !_selector.length ){
            -                        this.getPanel().find('div.UPContent > div.bd')
            -                            .before( _selector = $('<div class="hd">弹出框</div>') );
            -                    }
            -                    _selector.html( this._model.headers );
            -                    this._model.headers = undefined;
            -                }
            -                return _selector;
            -            }
            -        /**
            -         * 获取或设置Panel的 body 内容, see <a href='JC.Panel.html#method_body'>Panel.body</a>
            -         * @method  getBody
            -         * @param   {string}    _udata  
            -         * @return  string
            -         */
            -        , getBody:
            -            function( _udata ){
            -                var _selector = this.getPanel().find('div.UPContent > div.bd');
            -                if( typeof _udata != 'undefined' ) this._model.bodys = _udata;
            -                if( typeof this._model.bodys!= 'undefined' ){
            -                    _selector.html( this._model.bodys);
            -                    this._model.bodys = undefined;
            -                }
            -                return _selector;
            -            }
            -        /**
            -         * 获取或设置Panel的 footer 内容, see <a href='JC.Panel.html#method_footer'>Panel.footer</a>
            -         * @method  getFooter
            -         * @param   {string}    _udata  
            -         * @return  string
            -         */
            -        , getFooter:
            -            function( _udata ){
            -                var _selector = this.getPanel().find('div.UPContent > div.ft');
            -                if( typeof _udata != 'undefined' ) this._model.footers = _udata;
            -                if( typeof this._model.footers != 'undefined' ){
            -                    if( !_selector.length ){
            -                        this.getPanel().find('div.UPContent > div.bd')
            -                            .after( _selector = $('<div class="ft" ></div>'));
            -                    }
            -                    _selector.html( this._model.footers );
            -                    this._model.footers = undefined;
            -                }
            -                return _selector;
            -            }
            -        /**
            -         * 居中显示 Panel
            -         * @method  center
            -         */
            -        , center:
            -            function(){
            -                var _layout = this.getPanel(), _lw = _layout.width(), _lh = _layout.height()
            -                    , _x, _y, _winw = $(window).width(), _winh = $(window).height()
            -                    , _scrleft = $(document).scrollLeft(), _scrtop = $(document).scrollTop()
            -                    ;
            -
            -                _layout.css( {'left': '-9999px', 'top': '-9999px'} ).show();
            -                _x = (_winw - _lw) / 2 + _scrleft; 
            -                _y = (_winh - _lh) / 2 + _scrtop;
            -                if( (_winh - _lh  - 100) > 300 ){
            -                    _y -= 100;
            -                }
            -                JC.log( (_winh - _lh / 2 - 100) )
            -
            -                if( ( _y + _lh - _scrtop ) > _winh ){
            -                    JC.log('y overflow');
            -                    _y = _scrtop + _winh - _lh;
            -
            -                }
            -
            -                if( _y < _scrtop || _y < 0 ) _y = _scrtop;
            -
            -                _layout.css( {left: _x+'px', top: _y+'px'} );
            -
            -                JC.log( _lw, _lh, _winw, _winh );
            -            }
            -    };
            -    /**
            -     * Panel 的默认模板
            -     * @private
            -     */
            -    var _deftpl =
            -        [
            -        '<div class="UPanel" style="width: 600px;">'
            -        ,'    <div class="UPContent">'
            -        ,'        <div class="bd"></div>'
            -        ,'        <span class="close" eventtype="close"></span>'
            -        ,'    </div><!--end UPContent-->'
            -        ,'</div>'
            -        ].join('')
            -     /**
            -      * 隐藏或者清除所有 Panel
            -      * <h2>使用这个方法应当谨慎, 容易为DOM造成垃圾Panel</h2>
            -      * <br /><b>注意</b>: 这是个方法, 写成class是为了方便生成文档
            -      * @namespace  JC
            -      * @class      hideAllPanel
            -      * @constructor
            -      * @static
            -      * @param      {bool}      _isClose    从DOM清除/隐藏所有Panel(包刮 JC.alert, JC.confirm, JC.Panel, JC.Dialog)
            -      *                                     <br />, true = 从DOM 清除, false = 隐藏, 默认 = false( 隐藏 )
            -      * @example
            -      *     JC.hideAllPanel();         //隐藏所有Panel
            -      *     JC.hideAllPanel( true );   //从DOM 清除所有Panel
            -      */
            -     JC.hideAllPanel = 
            -         function( _isClose ){
            -            $('div.UPanel').each( function(){
            -                var _p = $(this), _ins = Panel.getInstance( _p );
            -                if( !_ins ) return;
            -                _ins.hide();
            -                _isClose && _ins.close();
            -            });
            -         };
            -    /**
            -     * 隐藏 或 从DOM清除所有 JC.alert/JC.confirm
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * @namespace JC
            -     * @class hideAllPopup
            -     * @static
            -     * @constructor
            -     * @param   {bool}  _isClose    为真从DOM清除JC.alert/JC.confirm, 为假隐藏, 默认为false
            -     * @example
            -     *      JC.hideAllPopup();         //隐藏所有JC.alert, JC.confirm
            -     *      JC.hideAllPopup( true );   //从 DOM 清除所有 JC.alert, JC.confirm
            -     */
            -    JC.hideAllPopup =
            -        function( _isClose ){
            -            $('body > div.UPanelPopup_identifer').each( function(){
            -                var _p = $(this), _ins = Panel.getInstance( _p );
            -                if( !_ins ) return;
            -                _ins.hide();
            -                _isClose && _ins.close();
            -            });
            -        };
            -
            -    /**
            -     * 监听Panel的所有点击事件
            -     * <br />如果事件源有 eventtype 属性, 则会触发eventtype的事件类型
            -     * @event   Panel click
            -     * @private
            -     */
            -    $(document).delegate( 'div.UPanel', 'click', function( _evt ){
            -        var _panel = $(this), _src = $(_evt.target || _evt.srcElement), _evtName;
            -        if( _src && _src.length && _src.is("[eventtype]") ){
            -            _evtName = _src.attr('eventtype');
            -            JC.log( _evtName, _panel.data('PanelInstace') );
            -            _evtName && _panel.data('PanelInstace') && _panel.data('PanelInstace').trigger( _evtName, _src, _evt );
            -        }
            -    });
            -
            -    $(document).delegate('div.UPanel', 'click', function( _evt ){
            -        var _p = $(this), _ins = Panel.getInstance( _p );
            -        if( _ins && _ins.isClickClose() ){
            -            _evt.stopPropagation();
            +;(function(define, _win) { 'use strict'; 
            +    define( [ 'JC.Panel.default', 'JC.Panel.popup', 'JC.Dialog', 'JC.Dialog.popup' ], function(){
            +    /**
            +     * 这个判断是为了向后兼容 JC 0.1
            +     * 使用 requirejs 的项目可以移除这段判断代码
            +     */
            +    JC.use 
            +        && JC.PATH
            +        && JC.use([ 
            +                JC.PATH + 'comps/Panel/Panel.default.js'
            +                , JC.PATH + 'comps/Panel/Panel.popup.js' 
            +                , JC.PATH + 'comps/Panel/Dialog.js' 
            +                , JC.PATH + 'comps/Panel/Dialog.popup.js' 
            +            ].join())
            +        ;
            +
            +    return JC.Panel;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
                     }
            -    });
            -
            -    $(document).on('click', function( _evt ){
            -        if( Panel.ignoreClick ) return;
            -        $('div.UPanel').each( function(){
            -            var _p = $(this), _ins = Panel.getInstance( _p );
            -            if( _ins && _ins.isClickClose() && _ins.layout() && _ins.layout().is(':visible') ){
            -                _ins.hide();
            -                _ins.close();
            -            }
            -        });
            -    });
            -
            -    $(document).on('keyup', function( _evt ){
            -        var _kc = _evt.keyCode;
            -        switch( _kc ){
            -            case 27:
            -                {
            -                    JC.hideAllPanel( 1 );
            -                    break;
            -                }
            -        }
            -    });
            -    var PANEL_ATTR_TYPE = {
            -        'alert': null
            -        , 'confirm': null
            -        , 'msgbox': null
            -        , 'dialog.alert': null
            -        , 'dialog.confirm': null
            -        , 'dialog.msgbox': null
            -        , 'panel': null
            -        , 'dialog': null
            -    };
            -    /**
            -     * 从 HTML 属性 自动执行 popup 
            -     * @attr    {string}    paneltype           弹框类型, 
            -     * @attr    {string}    panelmsg            弹框提示
            -     * @attr    {string}    panelstatus         弹框状态, 0|1|2
            -     * @attr    {function}  panelcallback       confirm 回调
            -     * @attr    {function}  panelcancelcallback cancel  回调
            -     */
            -    $(document).on( 'click', function( _evt ){
            -        var _p = $(_evt.target||_evt.srcElement)
            -            , _paneltype = _p.attr('paneltype')
            -
            -            , _panelmsg = _p.attr('panelmsg')
            -            , _panelmsgBox = _p.is('[panelmsgbox]') 
            -                ? parentSelector( _p, _p.attr('panelmsgbox') ) 
            -                : null
            -            ;
            -
            -        if( !(_paneltype && ( _panelmsg || ( _panelmsgBox && _panelmsgBox.length ) ) ) ) return;
            -
            -        _paneltype = _paneltype.toLowerCase();
            -        if( !_paneltype in PANEL_ATTR_TYPE ) return;
            -
            -        _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault();
            -
            -        var _panel
            -            , _panelstatus = ( parseInt( _p.attr('panelstatus'), 10 ) || 0 )
            -            , _callback = _p.attr('panelcallback')
            -            , _cancelcallback = _p.attr('panelcancelcallback')
            -            , _closecallback= _p.attr('panelclosecallback')
            -
            -            , _panelbutton = parseInt( _p.attr('panelbutton'), 10 ) || 0
            -
            -            , _panelheader = _p.attr('panelheader') || ''
            -            , _panelheaderBox = _p.is('[panelheaderbox]') 
            -                ? parentSelector( _p, _p.attr('panelheaderbox') ) 
            -                : null
            -
            -            , _panelfooter = _p.attr('panelfooter') || ''
            -            , _panelfooterBox = _p.is('[panelfooterbox]') 
            -                ? parentSelector( _p, _p.attr('panelfooterbox') ) 
            -                : null
            -            /**
            -             * 隐藏关闭按钮
            -             */
            -            , _hideclose = _p.is('[panelhideclose]') 
            -                ? parseBool( _p.attr('panelhideclose') )
            -                : false
            -            ;
            -
            -        _panelmsgBox && ( _panelmsg = scriptContent( _panelmsgBox ) || _panelmsg );
            -        _panelheaderBox && _panelheaderBox.length 
            -            && ( _panelheader = scriptContent( _panelheaderBox ) || _panelfooter );
            -        _panelfooterBox && _panelfooterBox.length 
            -            && ( _panelfooter = scriptContent( _panelfooterBox ) || _panelfooter );
            -
            -        _p.prop('nodeName') && _p.prop('nodeName').toLowerCase() == 'a' && _evt.preventDefault();
            -
            -           ;
            -        
            -        _callback && ( _callback = window[ _callback ] );
            -        _closecallback && ( _closecallback = window[ _closecallback ] );
            -
            -        switch( _paneltype ){
            -            case 'alert': JC.alert && ( _panel = JC.alert( _panelmsg, _p, _panelstatus ) ); break;
            -            case 'confirm': JC.confirm && ( _panel = JC.confirm( _panelmsg, _p, _panelstatus ) ); break;
            -            case 'msgbox': JC.msgbox && ( _panel = JC.msgbox( _panelmsg, _p, _panelstatus ) ); break;
            -            case 'dialog.alert': 
            -                   {
            -                       JC.Dialog && JC.Dialog.alert 
            -                           && ( _panel = JC.Dialog.alert( _panelmsg, _panelstatus ) ); 
            -                       break;
            -                   }
            -            case 'dialog.confirm': 
            -                   {
            -                       JC.Dialog && JC.Dialog.confirm
            -                           && ( _panel = JC.Dialog.confirm( _panelmsg, _panelstatus ) ); 
            -                       break;
            -                   }
            -            case 'dialog.msgbox': 
            -                   {
            -                       JC.Dialog && JC.Dialog.msgbox
            -                           && ( _panel = JC.Dialog.msgbox( _panelmsg, _panelstatus ) ); 
            -                       break;
            -                   }
            -            case 'panel': 
            -            case 'dialog': 
            -                   {
            -                       var _padding = '';
            -                       if( _paneltype == 'panel' ){
            -                           _panel = new Panel( _panelheader, _panelmsg + Panel._getButton( _panelbutton ), _panelfooter );
            -                       }else{
            -                           if( !JC.Dialog ) return;
            -                           _panel = JC.Dialog( _panelheader,  _panelmsg + Panel._getButton( _panelbutton ), _panelfooter );
            -                       }
            -                       _panel.on( 'beforeshow', function( _evt, _ins ){
            -                           !_panelheader && _ins.find( 'div.hd' ).hide();
            -                           !_panelheader && _ins.find( 'div.ft' ).hide();
            -                           Panel._fixWidth( _panelmsg, _panel );
            -                           _hideclose && _ins.find('span.close').hide();
            -                       });
            -                       _paneltype == 'panel' && _panel.show( _p, 'top' );
            -                       break;
            -                   }
            -        }
            -
            -        if( !_panel ) return;
            -            
            -        if( /msgbox/i.test( _paneltype ) ){
            -            _callback && _panel.on( 'close', _callback );
            -        }else{
            -            _callback && _panel.on( 'confirm', _callback );
            -        }
            -        _closecallback && _panel.on( 'close', _closecallback );
            -        _cancelcallback && _panel.on( 'cancel', _cancelcallback );
            -
            -        _panel.triggerSelector( _p );
            -    });
            -
            -}(jQuery));
            -;
            -
            -;(function($){
            -    /**
            -     * msgbox 提示 popup
            -     * <br /> 这个是不带蒙板 不带按钮的 popup 弹框
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.msgbox.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class   msgbox
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {string}    _msg        提示内容
            -     * @param   {selector}  _popupSrc   触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示
            -     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            -     * @param   {function}  _cb         弹框自动关闭后的的回调, <b>如果 _cb 为 int 值, 将视为 _closeMs</b>
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @param   {int}       _closeMs    自动关闭的间隔, 单位毫秒, 默认 2000
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    JC.msgbox = 
            -        function( _msg, _popupSrc, _status, _cb, _closeMs ){
            -            if( typeof _popupSrc == 'number' ){
            -                _status = _popupSrc;
            -                _popupSrc = null;
            -            }
            -            if( typeof _cb == 'number' ){
            -                _closeMs = _cb;
            -                _cb = null;
            -            }
            -            var _ins = _logic.popup( JC.msgbox.tpl || _logic.tpls.msgbox, _msg, _popupSrc, _status );
            -                _cb && _ins.on('close', _cb );
            -                setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 );
            -
            -            return _ins;
            -        };
            -    /**
            -     * 自定义 JC.msgbox 的显示模板
            -     * @property    tpl
            -     * @type    string
            -     * @default undefined
            -     * @static
            -     */
            -    JC.msgbox.tpl;
            -    /**
            -     * alert 提示 popup
            -     * <br /> 这个是不带 蒙板的 popup 弹框
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.alert.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class   alert
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {string}    _msg        提示内容
            -     * @param   {selector}  _popupSrc   触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示
            -     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            -     * @param   {function}  _cb         点击弹框确定按钮的回调
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    JC.alert = 
            -        function( _msg, _popupSrc, _status, _cb ){
            -            if( typeof _popupSrc == 'number' ){
            -                _status = _popupSrc;
            -                _popupSrc = null;
            -            }
            -            return _logic.popup( JC.alert.tpl || _logic.tpls.alert, _msg, _popupSrc, _status, _cb );
            -        };
            -    /**
            -     * 自定义 JC.alert 的显示模板
            -     * @property    tpl
            -     * @type    string
            -     * @default undefined
            -     * @static
            -     */
            -    JC.alert.tpl;
            -    /**
            -     * confirm 提示 popup
            -     * <br /> 这个是不带 蒙板的 popup 弹框
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p>private property see: <a href='JC.alert.html'>JC.alert</a>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.confirm.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class   confirm
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {string}    _msg        提示内容
            -     * @param   {selector}  _popupSrc   触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示
            -     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            -     * @param   {function}  _cb         点击弹框确定按钮的回调
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @param   {function}  _cancelCb   点击弹框取消按钮的回调
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    JC.confirm = 
            -        function( _msg, _popupSrc, _status, _cb, _cancelCb ){
            -            if( typeof _popupSrc == 'number' ){
            -                _status = _popupSrc;
            -                _popupSrc = null;
            -            }
            -            var _ins = _logic.popup( JC.confirm.tpl || _logic.tpls.confirm, _msg, _popupSrc, _status, _cb );
            -            _ins && _cancelCb && _ins.on( 'cancel', _cancelCb );
            -            return _ins;
            -        };
            -    /**
            -     * 自定义 JC.confirm 的显示模板
            -     * @property    tpl
            -     * @type    string
            -     * @default undefined
            -     * @static
            -     */
            -    JC.confirm.tpl;
            -    /**
            -     * 弹框逻辑处理方法集
            -     * @property    _logic
            -     * @for JC.alert
            -     * @private
            -     */
            -    var _logic = {
            -        /**
            -         * 弹框最小宽度
            -         * @property    _logic.minWidth
            -         * @for JC.alert
            -         * @type        int
            -         * @default     180
            -         * @private
            -         */
            -        minWidth: 180
            -        /**
            -         * 弹框最大宽度
            -         * @property    _logic.maxWidth
            -         * @for JC.alert
            -         * @type        int
            -         * @default     500
            -         * @private
            -         */
            -        , maxWidth: 500
            -        /**
            -         * 显示时 X轴的偏移值
            -         * @property    _logic.xoffset
            -         * @type    number
            -         * @default 9
            -         * @for JC.alert
            -         * @private
            -         */
            -        , xoffset: 9
            -        /**
            -         * 显示时 Y轴的偏移值
            -         * @property    _logic.yoffset
            -         * @type    number
            -         * @default 3
            -         * @for JC.alert
            -         * @private
            -         */
            -        , yoffset: 3
            -        /**
            -         * 设置弹框的唯一性
            -         * @method  _logic.popupIdentifier
            -         * @for JC.alert
            -         * @private
            -         * @param   {JC.Panel} _panel  
            -         */
            -        , popupIdentifier:
            -            function( _panel ){
            -                var _int;
            -                if( !_panel ){
            -                    $('body > div.UPanelPopup_identifer').each( function(){
            -                        var _p = $(this), _ins = Panel.getInstance( _p );
            -                        if( !_ins ) return;
            -                        _ins.hide();
            -                        _ins.close();
            -                    });
            -                    //$('body > div.UPanelPopup_identifer').remove();
            -                    $('body > div.UPanel_TMP').remove();
            -                }else{
            -                    _panel.selector().addClass('UPanelPopup_identifer');
            -                    _panel.selector().data('PopupInstance', _panel);
            -                }
            -            }
            -        /**
            -         * 弹框通用处理方法
            -         * @method  _logic.popup
            -         * @for JC.alert
            -         * @private
            -         * @param   {string}    _tpl        弹框模板
            -         * @param   {string}    _msg        弹框提示
            -         * @param   {selector}  _popupSrc   弹框事件源对象  
            -         * @param   {int}       _status     弹框状态
            -         * @param   {function}  _cb         confirm 回调
            -         * @return  JC.Panel
            -         */
            -        , popup:
            -        function( _tpl, _msg, _popupSrc, _status, _cb ){
            -            if( !_msg ) return;
            -            _logic.popupIdentifier();
            -
            -            _popupSrc && ( _popupSrc = $(_popupSrc) );
            -
            -            var _tpl = _tpl
            -                        .replace(/\{msg\}/g, _msg)
            -                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            -            var _ins = new JC.Panel(_tpl);
            -            _logic.popupIdentifier( _ins );
            -            _ins.selector().data('popupSrc', _popupSrc);
            -            _logic.fixWidth( _msg, _ins );
            -
            -            _cb && _ins.on('confirm', _cb);
            -            if( !_popupSrc ) _ins.center();
            -
            -            _ins.on('show_default', function(){
            -                JC.log('user show_default');
            -                if( _popupSrc && _popupSrc.length ){
            -                    _logic.showEffect( _ins, _popupSrc, function(){
            -                        _ins.focusButton();
            -                    });
            -                    return false;
            -                }
            -            });
            -
            -            _ins.on('close_default', function(){
            -                JC.log('user close_default');
            -                if( _popupSrc && _popupSrc.length ){
            -                    _logic.hideEffect( _ins, _popupSrc, function(){
            -                        _ins.selector().remove();
            -                        _ins = null;
            -                    });
            -                }else{
            -                    _ins.selector().remove();
            -                }
            -                return false;
            -            });
            -
            -            _ins.on('hide_default', function(){
            -                JC.log('user hide_default');
            -                if( _popupSrc && _popupSrc.length ){
            -                    _logic.hideEffect( _ins, _popupSrc, function(){
            -                        _ins.selector().hide();
            -                    });
            -                    return false;
            -                }else{
            -                    _ins.selector().hide();
            -                }
            -            });
            -
            -            if( _popupSrc && _popupSrc.length )_ins.selector().css( { 'left': '-9999px', 'top': '-9999px' } );
            -
            -            _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ );
            -            _ins.show();
            -
            -            return _ins;
            -        }
            -        /**
            -         * 隐藏弹框缓动效果
            -         * @method  _logic.hideEffect
            -         * @for JC.alert
            -         * @private
            -         * @param   {JC.Panel}     _panel
            -         * @param   {selector}      _popupSrc
            -         * @param   {function}      _doneCb 缓动完成后的回调
            -         */
            -        , hideEffect:
            -            function( _panel, _popupSrc, _doneCb ){
            -                _popupSrc && ( _popupSrc = $(_popupSrc) );
            -                if( !(_popupSrc && _popupSrc.length ) ) {
            -                    _doneCb && _doneCb( _panel );
            -                    return;
            -                }
            -                if( !( _panel && _panel.selector ) ) return;
            -
            -                var _poffset = _popupSrc.offset(), _selector = _panel.selector();
            -                var _dom = _selector[0];
            -
            -                _dom.interval && clearInterval( _dom.interval );
            -                _dom.defaultWidth && _selector.width( _dom.defaultWidth );
            -                _dom.defaultHeight && _selector.height( _dom.defaultHeight );
            -
            -                var _pw = _popupSrc.width(), _sh = _selector.height();
            -                _dom.defaultWidth = _selector.width();
            -                _dom.defaultHeight = _selector.height();
            -
            -                var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() );
            -                var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh );
            -                    _top = _top - _sh - _logic.yoffset;
            -
            -                _selector.height(0);
            -                _selector.css( { 'left': _left  + 'px' } );
            -
            -                _dom.interval = 
            -                    easyEffect( function( _curVal, _done ){
            -                        _selector.css( {
            -                            'top': _top + _curVal + 'px'
            -                            , 'height': _sh - _curVal + 'px'
            -                        });
            -
            -                        if( _popupSrc && !_popupSrc.is(':visible') ){
            -                            clearInterval( _dom.interval );
            -                            _doneCb && _doneCb( _panel );
            -                        }
            -
            -                        if( _sh === _curVal ) _selector.hide();
            -                        _done && _doneCb && _doneCb( _panel );
            -                    }, _sh );
            -
            -            }
            -        /**
            -         * 隐藏弹框缓动效果
            -         * @method  _logic.showEffect
            -         * @for JC.alert
            -         * @private
            -         * @param   {JC.Panel}     _panel
            -         * @param   {selector}      _popupSrc
            -         */
            -        , showEffect:
            -            function( _panel, _popupSrc, _doneCb ){
            -                _popupSrc && ( _popupSrc = $(_popupSrc) );
            -                if( !(_popupSrc && _popupSrc.length ) ) return;
            -                if( !( _panel && _panel.selector ) ) return;
            -
            -                var _poffset = _popupSrc.offset(), _selector = _panel.selector();
            -                var _dom = _selector[0];
            -
            -                _dom.interval && clearInterval( _dom.interval );
            -                _dom.defaultWidth && _selector.width( _dom.defaultWidth );
            -                _dom.defaultHeight && _selector.height( _dom.defaultHeight );
            -
            -                var _pw = _popupSrc.width(), _sh = _selector.height();
            -                _dom.defaultWidth = _selector.width();
            -                _dom.defaultHeight = _selector.height();
            -
            -                var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() );
            -                var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh, _logic.xoffset );
            -
            -                _selector.height(0);
            -                _selector.css( { 'left': _left  + 'px' } );
            -
            -                JC.log( _top, _poffset.top );
            -
            -                if( _top > _poffset.top ){
            -                    _dom.interval = 
            -                        easyEffect( function( _curVal, _done ){
            -                            _selector.css( {
            -                                'top': _top - _sh - _logic.yoffset + 'px'
            -                                , 'height': _curVal + 'px'
            -                            });
            -                            _done && _doneCb && _doneCb( _panel );
            -                        }, _sh );
            -
            -                }else{
            -                    _dom.interval = 
            -                        easyEffect( function( _curVal, _done ){
            -                            _selector.css( {
            -                                'top': _top - _curVal - _logic.yoffset + 'px'
            -                                , 'height': _curVal + 'px'
            -                            });
            -                            _done && _doneCb && _doneCb( _panel );
            -                        }, _sh );
            -                }
            -
            -            }
            -        /**
            -         * 设置 Panel 的默认X,Y轴
            -         * @method  _logic.onresize
            -         * @private
            -         * @for JC.alert
            -         * @param   {selector}  _panel
            -         */
            -        , onresize:
            -            function( _panel ){
            -                if(  !_panel.selector().is(':visible') ) return;
            -                var _selector = _panel.selector(), _popupSrc = _selector.data('popupSrc');
            -                if( !(_popupSrc && _popupSrc.length) ){
            -                    _panel.center();
            -                }else{
            -                    var _srcoffset = _popupSrc.offset();
            -                    var _srcTop = _srcoffset.top
            -                        , _srcHeight = _popupSrc.height()
            -                        , _targetHeight = _selector.height()
            -                        , _yoffset = 0
            -                        
            -                        , _srcLeft = _srcoffset.left
            -                        , _srcWidth = _popupSrc.width()
            -                        , _targetWidth = _selector.width()
            -                        , _xoffset = 0
            -                        ;
            -
            -                    var _left = _logic.getLeft( _srcLeft, _srcWidth
            -                                , _targetWidth, _xoffset ) + _logic.xoffset;
            -                    var _top = _logic.getTop( _srcTop, _srcHeight
            -                                , _targetHeight, _yoffset ) - _targetHeight - _logic.yoffset;
            -
            -                    _selector.css({
            -                        'left': _left + 'px', 'top': _top + 'px'
            -                    });
            -                }
            -            }
            -        /**
            -         * 取得弹框最要显示的 y 轴
            -         * @method  _logic.getTop
            -         * @for JC.alert
            -         * @private
            -         * @param   {number}    _scrTop         滚动条Y位置
            -         * @param   {number}    _srcHeight      事件源 高度
            -         * @param   {number}    _targetHeight   弹框高度
            -         * @param   {number}    _offset         Y轴偏移值
            -         * @return  {number}
            -         */
            -        , getTop:
            -            function( _srcTop, _srcHeight, _targetHeight, _offset  ){
            -                var _r = _srcTop
            -                    , _scrTop = $(document).scrollTop()
            -                    , _maxTop = $(window).height() - _targetHeight;
            -
            -                _r - _targetHeight < _scrTop && ( _r = _srcTop + _srcHeight + _targetHeight + _offset );
            -
            -                return _r;
            -            }
            -        /**
            -         * 取得弹框最要显示的 x 轴
            -         * @method  _logic.getLeft
            -         * @for JC.alert
            -         * @private
            -         * @param   {number}    _scrTop         滚动条Y位置
            -         * @param   {number}    _srcHeight      事件源 高度
            -         * @param   {number}    _targetHeight   弹框高度
            -         * @param   {number}    _offset         Y轴偏移值
            -         * @return  {number}
            -         */
            -        , getLeft:
            -            function( _srcLeft, _srcWidth, _targetWidth, _offset  ){
            -                _offset == undefined && ( _offset = 5 );
            -                var _r = _srcLeft + _srcWidth / 2 + _offset - _targetWidth / 2
            -                    , _scrLeft = $(document).scrollLeft()
            -                    , _maxLeft = $(window).width() + _scrLeft - _targetWidth;
            -
            -                _r > _maxLeft && ( _r = _maxLeft - 2 );
            -                _r < _scrLeft && ( _r = _scrLeft + 1 );
            -
            -                return _r;
            -            }
            -        /**
            -         * 修正弹框的默认显示宽度
            -         * @method  _logic.fixWidth
            -         * @for     JC.alert
            -         * @private
            -         * @param   {string}    _msg    查显示的文本
            -         * @param   {JC.Panel} _panel
            -         */
            -        , fixWidth:
            -            function( _msg, _panel ){
            -                var _tmp = $('<div class="UPanel_TMP" style="position:absolute; left:-9999px;top:-9999px;">' + _msg + '</div>').appendTo('body'), _w = _tmp.width() + 80;
            -                    _tmp.remove();
            -                _w > _logic.maxWidth && ( _w = _logic.maxWidth );
            -                _w < _logic.minWidth && ( _w = _logic.minWidth );
            -
            -                _panel.selector().css('width', _w);
            -            }
            -        /**
            -         * 获取弹框的显示状态, 默认为0(成功)
            -         * @method  _logic.fixWidth
            -         * @for     JC.alert
            -         * @private
            -         * @param   {int}   _status     弹框状态: 0:成功, 1:失败, 2:警告
            -         * @return  {int}
            -         */
            -        , getStatusClass:
            -            function ( _status ){
            -                var _r = 'UPanelSuccess';
            -                switch( _status ){
            -                    case 0: _r = 'UPanelSuccess'; break;
            -                    case 1: _r = 'UPanelError'; break;
            -                    case 2: _r = 'UPanelAlert'; break;
            -                }
            -                return _r;
            -            }
            -        /**
            -         * 保存弹框的所有默认模板
            -         * @property    _logic.tpls
            -         * @type        Object
            -         * @for         JC.alert
            -         * @private
            -         */
            -        , tpls: {
            -            /**
            -             *  msgbox 弹框的默认模板
            -             *  @property   _logic.tpls.msgbox
            -             *  @type       string
            -             *  @private
            -             */
            -            msgbox:
            -                [
            -                '<div class="UPanel UPanelPopup {status}" >'
            -                ,'    <div class="UPContent">'
            -                ,'        <div class="bd">'
            -                ,'            <dl>'
            -                ,'                <dd class="UPopupContent">'
            -                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            -                ,'                </dd>'
            -                ,'            </dl>'
            -                ,'        </div>'
            -                ,'    </div><!--end UPContent-->'
            -                ,'</div>'
            -                ].join('')
            -            /**
            -             *  alert 弹框的默认模板
            -             *  @property   _logic.tpls.alert
            -             *  @type       string
            -             *  @private
            -             */
            -            , alert:
            -                [
            -                '<div class="UPanel UPanelPopup {status}" >'
            -                ,'    <div class="UPContent">'
            -                ,'        <div class="bd">'
            -                ,'            <dl>'
            -                ,'                <dd class="UPopupContent">'
            -                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            -                ,'                </dd>'
            -                ,'                <dd class="UButton">'
            -                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            -                ,'                </dd>'
            -                ,'            </dl>'
            -                ,'        </div>'
            -                ,'    </div><!--end UPContent-->'
            -                ,'</div>'
            -                ].join('')
            -            /**
            -             *  confirm 弹框的默认模板
            -             *  @property   _logic.tpls.confirm
            -             *  @type       string
            -             *  @private
            -             */
            -            , confirm:
            -                [
            -                '<div class="UPanel UPanelPopup {status}" >'
            -                ,'    <div class="UPContent">'
            -                ,'        <div class="bd">'
            -                ,'            <dl>'
            -                ,'                <dd class="UPopupContent">'
            -                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            -                ,'                </dd>'
            -                ,'                <dd class="UButton">'
            -                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            -                ,'                    <button type="button" class="UPanel_cancel" eventtype="cancel">取消</button>'
            -                ,'                </dd>'
            -                ,'            </dl>'
            -                ,'        </div>'
            -                ,'    </div><!--end UPContent-->'
            -                ,'</div>'
            -                ].join('')
            -        }
            -    };
            -    /**
            -     * 响应窗口改变大小 
            -     */
            -    $(window).on('resize', function( _evt ){
            -        $('body > div.UPanelPopup_identifer').each( function(){
            -            var _p = $(this);
            -            _p.data('PopupInstance') && _logic.onresize( _p.data('PopupInstance') );
            -        });
            -    });
            -}(jQuery));
            -;
            -
            -;(function($){
            -    var isIE6 = !!window.ActiveXObject && !window.XMLHttpRequest;
            -    /**
            -     * 带蒙板的会话弹框
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class   Dialog
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {selector|string}   _selector   自定义弹框模板, 如果 _selector不能解析为 HTML, 将视为@param _headers 
            -     * @param   {string}            _headers    定义模板的 header 文字, 如果 _selector 不能解析为HTML, 视视为@param _bodys
            -     * @param   {string}            _bodys      定义模板的 body 文字, 如果 _selector 不能解析为HTML, 视视为@param _footers
            -     * @param   {string}            _footers    定义模板的 footer 文字
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    var Dialog = window.Dialog = JC.Dialog = 
            -        function( _selector, _headers, _bodys, _footers ){
            -            if( _logic.timeout ) clearTimeout( _logic.timeout );
            -
            -            if( JC.Panel.getInstance( _selector ) ){
            -                _logic.timeout = setTimeout( function(){
            -                    JC.Panel.getInstance( _selector ).show(0);
            -                }, _logic.showMs );
            -
            -                return JC.Panel.getInstance( _selector );
            -            }
            -
            -            _logic.dialogIdentifier();
            -
            -            var _ins = new JC.Panel( _selector, _headers, _bodys, _footers );
            -            _logic.dialogIdentifier( _ins );
            -
            -            _logic.showMask();
            -            _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ );
            -
            -            _ins.on('close_default', function( _evt, _panel){
            -                _logic.hideMask();
            -            });
            -
            -            _ins.on('hide_default', function( _evt, _panel){
            -                _logic.hideMask();
            -            });
            -
            -            _ins.on('show_default', function( _evt, _panel){
            -                _logic.showMask(); 
            -
            -                setTimeout( function(){  
            -                    _logic.showMask(); 
            -                    _ins.selector().css( { 'z-index': window.ZINDEX_COUNT++, 'display': 'block' } );
            -                }, 1 );
            -            });
            -            
            -            _logic.timeout = setTimeout( function(){
            -                _ins.show( 0 );
            -            }, _logic.showMs );
            -
            -            return _ins;
            -        };
            -    /**
            -     * 会话框 msgbox 提示 (不带按钮)
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p>private property see: <a href='JC.Dialog.html'>JC.Dialog</a>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a>, <a href='JC.Dialog.html'>Dialog</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.msgbox.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC.Dialog
            -     * @class   msgbox
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {string}    _msg        提示内容
            -     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            -     * @param   {function}  _cb         弹框自动关闭后的的回调, <b>如果 _cb 为 int 值, 将视为 _closeMs</b>
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @param   {int}       _closeMs    自动关闭的间隔, 单位毫秒, 默认 2000
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    JC.Dialog.msgbox = 
            -        function(_msg, _status, _cb, _closeMs ){
            -            if( !_msg ) return;
            -            var _tpl = ( JC.Dialog.msgbox.tpl || _logic.tpls.msgbox )
            -                        .replace(/\{msg\}/g, _msg)
            -                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            -            var _ins = JC.Dialog(_tpl);
            -
            -            _logic.fixWidth( _msg, _ins );
            -            _cb && _ins.on('close', _cb);
            -            setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 );
            -
            -            return _ins;
            -        };
            -    /**
            -     * 自定义 JC.Dialog.alert 的显示模板
            -     * @property    tpl
            -     * @type    string
            -     * @default undefined
            -     * @static
            -     */
            -    JC.Dialog.msgbox.tpl;
            -    /**
            -     * 会话框 alert 提示
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p>private property see: <a href='JC.Dialog.html'>JC.Dialog</a>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a>, <a href='JC.Dialog.html'>Dialog</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.alert.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC.Dialog
            -     * @class   alert
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {string}    _msg        提示内容
            -     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            -     * @param   {function}  _cb         点击弹框确定按钮的回调
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    JC.Dialog.alert = 
            -        function(_msg, _status, _cb){
            -            if( !_msg ) return;
            -            var _tpl = ( JC.Dialog.alert.tpl || _logic.tpls.alert )
            -                        .replace(/\{msg\}/g, _msg)
            -                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            -            var _ins = JC.Dialog(_tpl);
            -            _logic.fixWidth( _msg, _ins );
            -            _cb && _ins.on('confirm', _cb);
            -
            -            return _ins;
            -        };
            -    /**
            -     * 自定义 JC.Dialog.alert 的显示模板
            -     * @property    tpl
            -     * @type    string
            -     * @default undefined
            -     * @static
            -     */
            -    JC.Dialog.alert.tpl;
            -    /**
            -     * 会话框 confirm 提示
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * <p>private property see: <a href='JC.Dialog.html'>JC.Dialog</a>
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, <a href='JC.Panel.html'>Panel</a>, <a href='JC.Dialog.html'>Dialog</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Dialog.confirm.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC.Dialog
            -     * @class   confirm
            -     * @extends JC.Panel
            -     * @static
            -     * @constructor
            -     * @param   {string}    _msg        提示内容
            -     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            -     * @param   {function}  _cb         点击弹框确定按钮的回调
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @param   {function}  _cancelCb   点击弹框取消按钮的回调
            -<xmp>function( _evtName, _panelIns ){
            -    var _btn = $(this);
            -}</xmp>
            -     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            -     */
            -    JC.Dialog.confirm = 
            -        function(_msg, _status, _cb, _cancelCb ){
            -            if( !_msg ) return;
            -            var _tpl = ( JC.Dialog.confirm.tpl || _logic.tpls.confirm )
            -                        .replace(/\{msg\}/g, _msg)
            -                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            -            var _ins = JC.Dialog(_tpl);
            -            _logic.fixWidth( _msg, _ins );
            -            _cb && _ins.on('confirm', _cb);
            -            _cancelCb && _ins.on( 'cancel', _cancelCb );
            -
            -            return _ins;
            -        };
            -    /**
            -     * 自定义 JC.Dialog.confirm 的显示模板
            -     * @property    tpl
            -     * @type    string
            -     * @default undefined
            -     * @static
            -     */
            -    JC.Dialog.confirm.tpl;
            -    /**
            -     * 显示或隐藏 蒙板
            -     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            -     * @namespace   JC.Dialog
            -     * @class   mask
            -     * @static
            -     * @constructor
            -     * @param   {bool}  _isHide     空/假 显示蒙板, 为真 隐藏蒙板
            -     */
            -    JC.Dialog.mask =
            -        function( _isHide ){
            -            !_isHide && _logic.showMask();
            -            _isHide && _logic.hideMask();
            -        };
            -    /**
            -     * 会话弹框逻辑处理方法集
            -     * @property    _logic
            -     * @for JC.Dialog
            -     * @private
            -     */
            -    var _logic = {
            -        /**
            -         * 延时处理的指针属性
            -         * @property    _logic.timeout
            -         * @type    setTimeout
            -         * @private
            -         * @for JC.Dialog
            -         */
            -        timeout: null
            -        /**
            -         * 延时显示弹框
            -         * <br />延时是为了使用户绑定的 show 事件能够被执行
            -         * @property    _logic.showMs
            -         * @type    int     millisecond
            -         * @private
            -         * @for JC.Dialog
            -         */
            -        , showMs: 10
            -        /**
            -         * 弹框最小宽度
            -         * @property    _logic.minWidth
            -         * @for JC.Dialog
            -         * @type        int
            -         * @default     180
            -         * @private
            -         */
            -        , minWidth: 180
            -        /**
            -         * 弹框最大宽度
            -         * @property    _logic.maxWidth
            -         * @for JC.Dialog
            -         * @type        int
            -         * @default     500
            -         * @private
            -         */
            -        , maxWidth: 500
            -        /**
            -         * 设置会话弹框的唯一性
            -         * @method  _logic.dialogIdentifier
            -         * @for JC.Dialog
            -         * @private
            -         * @param   {JC.Panel} _panel  
            -         */
            -        , dialogIdentifier:
            -            function( _panel ){
            -                if( !_panel ){
            -                    _logic.hideMask();
            -                    $('body > div.UPanelDialog_identifer').each( function(){
            -                        var _p = $(this), _ins = Panel.getInstance( _p );
            -                        if( !_ins ) return;
            -                        _ins.hide();
            -                        _ins.close();
            -                    });
            -                    $('body > div.UPanel_TMP').remove();
            -                }else{
            -                    _panel.selector().addClass('UPanelDialog_identifer');
            -                    _panel.selector().data('DialogInstance', _panel);
            -                }
            -            }
            -        /**
            -         * 显示蒙板
            -         * @method  _logic.showMask
            -         * @private
            -         * @for JC.Dialog
            -         */
            -        , showMask:
            -            function(){
            -                var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            -                if( !_mask.length ){
            -                    $( _logic.tpls.mask ).appendTo('body');
            -                    _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            -                }
            -                _iframemask.show(); _mask.show();
            -
            -                _logic.setMaskSizeForIe6();
            -
            -                _iframemask.css('z-index', window.ZINDEX_COUNT++ );
            -                _mask.css('z-index', window.ZINDEX_COUNT++ );
            -            }
            -        /**
            -         * 隐藏蒙板
            -         * @method  _logic.hideMask
            -         * @private
            -         * @for JC.Dialog
            -         */
            -        , hideMask:
            -            function(){
            -                var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            -                if( _mask.length ) _mask.hide();
            -                if( _iframemask.length ) _iframemask.hide();
            -            }
            -        /**
            -         * 窗口改变大小时, 改变蒙板的大小,
            -         * <br />这个方法主要为了兼容 IE6
            -         * @method  _logic.setMaskSizeForIe6
            -         * @private
            -         * @for JC.Dialog
            -         */
            -        , setMaskSizeForIe6:
            -            function(){
            -                var _mask = $('#UPanelMask'), _iframemask = $('#UPanelMaskIfrmae');
            -                if( !( _mask.length && _iframemask.length ) ) return;
            -
            -                var _css = {
            -                    'position': 'absolute'
            -                    , 'top': '0px'
            -                    , 'left': $(document).scrollLeft() + 'px'
            -                    , 'height': $(document).height() + 'px'
            -                    , 'width': $(window).width()  + 'px'
            -                };
            -
            -                _mask.css( _css );
            -                _iframemask.css( _css );
            -            }
            -        /**
            -         * 获取弹框的显示状态, 默认为0(成功)
            -         * @method  _logic.fixWidth
            -         * @for     JC.Dialog
            -         * @private
            -         * @param   {int}   _status     弹框状态: 0:成功, 1:失败, 2:警告
            -         * @return  {int}
            -         */
            -        , getStatusClass:
            -            function ( _status ){
            -                var _r = 'UPanelSuccess';
            -                switch( _status ){
            -                    case 0: _r = 'UPanelSuccess'; break;
            -                    case 1: _r = 'UPanelError'; break;
            -                    case 2: _r = 'UPanelAlert'; break;
            -                }
            -                return _r;
            -            }
            -        /**
            -         * 修正弹框的默认显示宽度
            -         * @method  _logic.fixWidth
            -         * @for     JC.Dialog
            -         * @private
            -         * @param   {string}    _msg    查显示的文本
            -         * @param   {JC.Panel} _panel
            -         */
            -        , fixWidth:
            -            function( _msg, _panel ){
            -                var _tmp = $('<div class="UPanel_TMP" style="position:absolute; left:-9999px;top:-9999px;">' + _msg + '</div>').appendTo('body'), _w = _tmp.width() + 80;
            -                _w > _logic.maxWidth && ( _w = _logic.maxWidth );
            -                _w < _logic.minWidth && ( _w = _logic.minWidth );
            -
            -                _panel.selector().css('width', _w);
            -            }
            -        /**
            -         * 保存会话弹框的所有默认模板
            -         * @property    _logic.tpls
            -         * @type        Object
            -         * @for         JC.Dialog
            -         * @private
            -         */
            -        , tpls: {
            -            /**
            -             *  msgbox 会话弹框的默认模板
            -             *  @property   _logic.tpls.msgbox
            -             *  @type       string
            -             *  @private
            -             */
            -            msgbox:
            -                [
            -                '<div class="UPanel UPanelPopup {status}" >'
            -                ,'    <div class="UPContent">'
            -                ,'        <div class="bd">'
            -                ,'            <dl>'
            -                ,'                <dd class="UPopupContent">'
            -                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            -                ,'                </dd>'
            -                ,'            </dl>'
            -                ,'        </div>'
            -                ,'    </div><!--end UPContent-->'
            -                ,'</div>'
            -                ].join('')
            -            /**
            -             *  alert 会话弹框的默认模板
            -             *  @property   _logic.tpls.alert
            -             *  @type       string
            -             *  @private
            -             */
            -            , alert:
            -                [
            -                '<div class="UPanel UPanelPopup {status}" >'
            -                ,'    <div class="UPContent">'
            -                ,'        <div class="bd">'
            -                ,'            <dl>'
            -                ,'                <dd class="UPopupContent">'
            -                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            -                ,'                </dd>'
            -                ,'                <dd class="UButton">'
            -                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            -                ,'                </dd>'
            -                ,'            </dl>'
            -                ,'        </div>'
            -                ,'    </div><!--end UPContent-->'
            -                ,'</div>'
            -                ].join('')
            -            /**
            -             *  confirm 会话弹框的默认模板
            -             *  @property   _logic.tpls.confirm
            -             *  @type       string
            -             *  @private
            -             */
            -            , confirm:
            -                [
            -                '<div class="UPanel UPanelPopup {status}" >'
            -                ,'    <div class="UPContent">'
            -                ,'        <div class="bd">'
            -                ,'            <dl>'
            -                ,'                <dd class="UPopupContent">'
            -                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            -                ,'                </dd>'
            -                ,'                <dd class="UButton">'
            -                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            -                ,'                    <button type="button" class="UPanel_cancel" eventtype="cancel">取消</button>'
            -                ,'                </dd>'
            -                ,'            </dl>'
            -                ,'        </div>'
            -                ,'    </div><!--end UPContent-->'
            -                ,'</div>'
            -                ].join('')
            -            /**
            -             *  会话弹框的蒙板模板
            -             *  @property   _logic.tpls.mask
            -             *  @type       string
            -             *  @private
            -             */
            -            , mask:
            -                [
            -                    '<div id="UPanelMask" class="UPanelMask"></div>'
            -                    , '<iframe src="about:blank" id="UPanelMaskIfrmae"'
            -                    , ' frameborder="0" class="UPanelMaskIframe"></iframe>'
            -                ].join('')
            -        }
            -    };
            -    /**
            -     * 响应窗口改变大小和滚动 
            -     */
            -    $(window).on('resize scroll', function( _evt ){
            -        $('body > div.UPanelDialog_identifer').each( function(){
            -            var _p = $(this);
            -            if( _p.data('DialogInstance') ){
            -                if(  !_p.data('DialogInstance').selector().is(':visible') ) return;
            -                if( _evt.type.toLowerCase() == 'resize' ) _p.data('DialogInstance').center(); 
            -                _logic.setMaskSizeForIe6();
            -            }
            -        });
            -    });
            -
            -}(jQuery));
            +        , window
            +    )
            +);
             
                 
            diff --git a/docs_api/files/.._comps_Panel_Panel.popup.js.html b/docs_api/files/.._comps_Panel_Panel.popup.js.html new file mode 100644 index 000000000..3d84b4f96 --- /dev/null +++ b/docs_api/files/.._comps_Panel_Panel.popup.js.html @@ -0,0 +1,863 @@ + + + + + ../comps/Panel/Panel.popup.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/Panel/Panel.popup.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.Panel.default' ], function(){
            +    /**
            +     * msgbox 提示 popup
            +     * <br /> 这个是不带蒙板 不带按钮的 popup 弹框
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.msgbox.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Panel.html'>JC.Panel</a></p>
            +     * @namespace JC
            +     * @class   msgbox
            +     * @extends JC.Panel
            +     * @static
            +     * @constructor
            +     * @param   {string}    _msg        提示内容
            +     * @param   {selector}  _popupSrc   触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示
            +     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            +     * @param   {function}  _cb         弹框自动关闭后的的回调, <b>如果 _cb 为 int 值, 将视为 _closeMs</b>
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @param   {int}       _closeMs    自动关闭的间隔, 单位毫秒, 默认 2000
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    JC.msgbox = 
            +        function( _msg, _popupSrc, _status, _cb, _closeMs ){
            +            if( typeof _popupSrc == 'number' ){
            +                _status = _popupSrc;
            +                _popupSrc = null;
            +            }
            +            if( typeof _cb == 'number' ){
            +                _closeMs = _cb;
            +                _cb = null;
            +            }
            +            var _ins = _logic.popup( JC.msgbox.tpl || _logic.tpls.msgbox, _msg, _popupSrc, _status );
            +                _cb && _ins.on('close', _cb );
            +                setTimeout( function(){ _ins.autoClose( _closeMs ); }, 1 );
            +
            +            return _ins;
            +        };
            +    /**
            +     * 自定义 JC.msgbox 的显示模板
            +     * @property    tpl
            +     * @type    string
            +     * @default undefined
            +     * @static
            +     */
            +    JC.msgbox.tpl;
            +    /**
            +     * alert 提示 popup
            +     * <br /> 这个是不带 蒙板的 popup 弹框
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.alert.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Panel.html'>JC.Panel</a></p>
            +     * @namespace JC
            +     * @class   alert
            +     * @extends JC.Panel
            +     * @static
            +     * @constructor
            +     * @param   {string}    _msg        提示内容
            +     * @param   {selector}  _popupSrc   触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示
            +     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            +     * @param   {function}  _cb         点击弹框确定按钮的回调
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    JC.alert = 
            +        function( _msg, _popupSrc, _status, _cb ){
            +            if( typeof _popupSrc == 'number' ){
            +                _status = _popupSrc;
            +                _popupSrc = null;
            +            }
            +            return _logic.popup( JC.alert.tpl || _logic.tpls.alert, _msg, _popupSrc, _status, _cb );
            +        };
            +    /**
            +     * 自定义 JC.alert 的显示模板
            +     * @property    tpl
            +     * @type    string
            +     * @default undefined
            +     * @static
            +     */
            +    JC.alert.tpl;
            +    /**
            +     * confirm 提示 popup
            +     * <br /> 这个是不带 蒙板的 popup 弹框
            +     * <br /><b>注意, 这是个方法, 写 @class 属性是为了生成文档</b>
            +     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            +     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.confirm.html' target='_blank'>API docs</a>
            +     * | <a href='../../comps/Panel/_demo' target='_blank'>demo link</a></p>
            +     * <p><b>see also</b>: <a href='JC.Panel.html'>JC.Panel</a></p>
            +     * @namespace JC
            +     * @class   confirm
            +     * @extends JC.Panel
            +     * @static
            +     * @constructor
            +     * @param   {string}    _msg        提示内容
            +     * @param   {selector}  _popupSrc   触发弹框的事件源 selector, 不为空显示 缓动效果, 为空居中显示
            +     * @param   {int}       _status     显示弹框的状态, 0: 成功, 1: 错误, 2: 警告
            +     * @param   {function}  _cb         点击弹框确定按钮的回调
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @param   {function}  _cancelCb   点击弹框取消按钮的回调
            +<pre>function( _evtName, _panelIns ){
            +    var _btn = $(this);
            +}</pre>
            +     * @return  <a href='JC.Panel.html'>JC.Panel</a>
            +     */
            +    JC.confirm = 
            +        function( _msg, _popupSrc, _status, _cb, _cancelCb ){
            +            if( typeof _popupSrc == 'number' ){
            +                _status = _popupSrc;
            +                _popupSrc = null;
            +            }
            +            var _ins = _logic.popup( JC.confirm.tpl || _logic.tpls.confirm, _msg, _popupSrc, _status, _cb );
            +            _ins && _cancelCb && _ins.on( 'cancel', _cancelCb );
            +            return _ins;
            +        };
            +    /**
            +     * 自定义 JC.confirm 的显示模板
            +     * @property    tpl
            +     * @type    string
            +     * @default undefined
            +     * @static
            +     */
            +    JC.confirm.tpl;
            +    /**
            +     * 弹框逻辑处理方法集
            +     * @property    _logic
            +     * @for JC.alert
            +     * @private
            +     */
            +    var _logic = {
            +        /**
            +         * 弹框最小宽度
            +         * @property    _logic.minWidth
            +         * @for JC.alert
            +         * @type        int
            +         * @default     180
            +         * @private
            +         */
            +        minWidth: 180
            +        /**
            +         * 弹框最大宽度
            +         * @property    _logic.maxWidth
            +         * @for JC.alert
            +         * @type        int
            +         * @default     500
            +         * @private
            +         */
            +        , maxWidth: 500
            +        /**
            +         * 显示时 X轴的偏移值
            +         * @property    _logic.xoffset
            +         * @type    number
            +         * @default 9
            +         * @for JC.alert
            +         * @private
            +         */
            +        , xoffset: 9
            +        /**
            +         * 显示时 Y轴的偏移值
            +         * @property    _logic.yoffset
            +         * @type    number
            +         * @default 3
            +         * @for JC.alert
            +         * @private
            +         */
            +        , yoffset: 3
            +        /**
            +         * 设置弹框的唯一性
            +         * @method  _logic.popupIdentifier
            +         * @for JC.alert
            +         * @private
            +         * @param   {JC.Panel} _panel  
            +         */
            +        , popupIdentifier:
            +            function( _panel ){
            +                var _int;
            +                if( !_panel ){
            +                    $('body > div.UPanelPopup_identifer').each( function(){
            +                        var _p = $(this), _ins = Panel.getInstance( _p );
            +                        if( !_ins ) return;
            +                        _ins.hide();
            +                        _ins.close();
            +                    });
            +                    //$('body > div.UPanelPopup_identifer').remove();
            +                    $('body > div.UPanel_TMP').remove();
            +                }else{
            +                    _panel.selector().addClass('UPanelPopup_identifer');
            +                    _panel.selector().data('PopupInstance', _panel);
            +                }
            +            }
            +        /**
            +         * 弹框通用处理方法
            +         * @method  _logic.popup
            +         * @for JC.alert
            +         * @private
            +         * @param   {string}    _tpl        弹框模板
            +         * @param   {string}    _msg        弹框提示
            +         * @param   {selector}  _popupSrc   弹框事件源对象  
            +         * @param   {int}       _status     弹框状态
            +         * @param   {function}  _cb         confirm 回调
            +         * @return  JC.Panel
            +         */
            +        , popup:
            +        function( _tpl, _msg, _popupSrc, _status, _cb ){
            +            if( !_msg ) return;
            +            _logic.popupIdentifier();
            +
            +            _popupSrc && ( _popupSrc = $(_popupSrc) );
            +
            +            var _tpl = _tpl
            +                        .replace(/\{msg\}/g, _msg)
            +                        .replace(/\{status\}/g, _logic.getStatusClass(_status||'') );
            +            var _ins = new JC.Panel(_tpl);
            +            _logic.popupIdentifier( _ins );
            +            _ins.selector().data('popupSrc', _popupSrc);
            +            _logic.fixWidth( _msg, _ins );
            +
            +            _cb && _ins.on('confirm', _cb);
            +            if( !_popupSrc ) _ins.center();
            +
            +            _ins.on('show_default', function(){
            +                //JC.log('user show_default');
            +                if( _popupSrc && _popupSrc.length ){
            +                    _logic.showEffect( _ins, _popupSrc, function(){
            +                        _ins.focusButton();
            +                    });
            +                    return false;
            +                }
            +            });
            +
            +            _ins.on('close_default', function(){
            +                //JC.log('user close_default');
            +                if( _popupSrc && _popupSrc.length ){
            +                    _logic.hideEffect( _ins, _popupSrc, function(){
            +                        _ins.selector().remove();
            +                        _ins = null;
            +                    });
            +                }else{
            +                    _ins.selector().remove();
            +                }
            +                return false;
            +            });
            +
            +            _ins.on('hide_default', function(){
            +                //JC.log('user hide_default');
            +                if( _popupSrc && _popupSrc.length ){
            +                    _logic.hideEffect( _ins, _popupSrc, function(){
            +                        _ins.selector().hide();
            +                    });
            +                    return false;
            +                }else{
            +                    _ins.selector().hide();
            +                }
            +            });
            +
            +            if( _popupSrc && _popupSrc.length )_ins.selector().css( { 'left': '-9999px', 'top': '-9999px' } );
            +
            +            _ins.selector().css( 'z-index', window.ZINDEX_COUNT++ );
            +            _ins.show();
            +
            +            return _ins;
            +        }
            +        /**
            +         * 隐藏弹框缓动效果
            +         * @method  _logic.hideEffect
            +         * @for JC.alert
            +         * @private
            +         * @param   {JC.Panel}     _panel
            +         * @param   {selector}      _popupSrc
            +         * @param   {function}      _doneCb 缓动完成后的回调
            +         */
            +        , hideEffect:
            +            function( _panel, _popupSrc, _doneCb ){
            +                _popupSrc && ( _popupSrc = $(_popupSrc) );
            +                if( !(_popupSrc && _popupSrc.length ) ) {
            +                    _doneCb && _doneCb( _panel );
            +                    return;
            +                }
            +                if( !( _panel && _panel.selector ) ) return;
            +
            +                var _poffset = _popupSrc.offset(), _selector = _panel.selector();
            +                var _dom = _selector[0];
            +
            +                _dom.interval && clearInterval( _dom.interval );
            +                _dom.defaultWidth && _selector.width( _dom.defaultWidth );
            +                _dom.defaultHeight && _selector.height( _dom.defaultHeight );
            +
            +                var _pw = _popupSrc.width(), _sh = _selector.height();
            +                _dom.defaultWidth = _selector.width();
            +                _dom.defaultHeight = _selector.height();
            +
            +                var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() );
            +                var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh );
            +                    _top = _top - _sh - _logic.yoffset;
            +
            +                _selector.height(0);
            +                _selector.css( { 'left': _left  + 'px' } );
            +
            +                _dom.interval = 
            +                    JC.f.easyEffect( function( _curVal, _done ){
            +                        _selector.css( {
            +                            'top': _top + _curVal + 'px'
            +                            , 'height': _sh - _curVal + 'px'
            +                        });
            +
            +                        if( _popupSrc && !_popupSrc.is(':visible') ){
            +                            clearInterval( _dom.interval );
            +                            _doneCb && _doneCb( _panel );
            +                        }
            +
            +                        if( _sh === _curVal ) _selector.hide();
            +                        _done && _doneCb && _doneCb( _panel );
            +                    }, _sh );
            +
            +            }
            +        /**
            +         * 隐藏弹框缓动效果
            +         * @method  _logic.showEffect
            +         * @for JC.alert
            +         * @private
            +         * @param   {JC.Panel}     _panel
            +         * @param   {selector}      _popupSrc
            +         */
            +        , showEffect:
            +            function( _panel, _popupSrc, _doneCb ){
            +                _popupSrc && ( _popupSrc = $(_popupSrc) );
            +                if( !(_popupSrc && _popupSrc.length ) ) return;
            +                if( !( _panel && _panel.selector ) ) return;
            +
            +                var _poffset = _popupSrc.offset(), _selector = _panel.selector();
            +                var _dom = _selector[0];
            +
            +                _dom.interval && clearInterval( _dom.interval );
            +                _dom.defaultWidth && _selector.width( _dom.defaultWidth );
            +                _dom.defaultHeight && _selector.height( _dom.defaultHeight );
            +
            +                var _pw = _popupSrc.width(), _sh = _selector.height();
            +                _dom.defaultWidth = _selector.width();
            +                _dom.defaultHeight = _selector.height();
            +
            +                var _left = _logic.getLeft( _poffset.left, _pw, _selector.width() );
            +                var _top = _logic.getTop( _poffset.top, _popupSrc.height(), _sh, _logic.xoffset );
            +
            +                _selector.height(0);
            +                _selector.css( { 'left': _left  + 'px' } );
            +
            +                //JC.log( _top, _poffset.top );
            +
            +                if( _top > _poffset.top ){
            +                    _dom.interval = 
            +                        JC.f.easyEffect( function( _curVal, _done ){
            +                            _selector.css( {
            +                                'top': _top - _sh - _logic.yoffset + 'px'
            +                                , 'height': _curVal + 'px'
            +                            });
            +                            _done && _doneCb && _doneCb( _panel );
            +                        }, _sh );
            +
            +                }else{
            +                    _dom.interval = 
            +                        JC.f.easyEffect( function( _curVal, _done ){
            +                            _selector.css( {
            +                                'top': _top - _curVal - _logic.yoffset + 'px'
            +                                , 'height': _curVal + 'px'
            +                            });
            +                            _done && _doneCb && _doneCb( _panel );
            +                        }, _sh );
            +                }
            +
            +            }
            +        /**
            +         * 设置 Panel 的默认X,Y轴
            +         * @method  _logic.onresize
            +         * @private
            +         * @for JC.alert
            +         * @param   {selector}  _panel
            +         */
            +        , onresize:
            +            function( _panel ){
            +                if(  !_panel.selector().is(':visible') ) return;
            +                var _selector = _panel.selector(), _popupSrc = _selector.data('popupSrc');
            +                if( !(_popupSrc && _popupSrc.length) ){
            +                    _panel.center();
            +                }else{
            +                    var _srcoffset = _popupSrc.offset();
            +                    var _srcTop = _srcoffset.top
            +                        , _srcHeight = _popupSrc.height()
            +                        , _targetHeight = _selector.height()
            +                        , _yoffset = 0
            +                        
            +                        , _srcLeft = _srcoffset.left
            +                        , _srcWidth = _popupSrc.width()
            +                        , _targetWidth = _selector.width()
            +                        , _xoffset = 0
            +                        ;
            +
            +                    var _left = _logic.getLeft( _srcLeft, _srcWidth
            +                                , _targetWidth, _xoffset ) + _logic.xoffset;
            +                    var _top = _logic.getTop( _srcTop, _srcHeight
            +                                , _targetHeight, _yoffset ) - _targetHeight - _logic.yoffset;
            +
            +                    _selector.css({
            +                        'left': _left + 'px', 'top': _top + 'px'
            +                    });
            +                }
            +            }
            +        /**
            +         * 取得弹框最要显示的 y 轴
            +         * @method  _logic.getTop
            +         * @for JC.alert
            +         * @private
            +         * @param   {number}    _scrTop         滚动条Y位置
            +         * @param   {number}    _srcHeight      事件源 高度
            +         * @param   {number}    _targetHeight   弹框高度
            +         * @param   {number}    _offset         Y轴偏移值
            +         * @return  {number}
            +         */
            +        , getTop:
            +            function( _srcTop, _srcHeight, _targetHeight, _offset  ){
            +                var _r = _srcTop
            +                    , _scrTop = $(document).scrollTop()
            +                    , _maxTop = $(window).height() - _targetHeight;
            +
            +                _r - _targetHeight < _scrTop && ( _r = _srcTop + _srcHeight + _targetHeight + _offset );
            +
            +                return _r;
            +            }
            +        /**
            +         * 取得弹框最要显示的 x 轴
            +         * @method  _logic.getLeft
            +         * @for JC.alert
            +         * @private
            +         * @param   {number}    _scrTop         滚动条Y位置
            +         * @param   {number}    _srcHeight      事件源 高度
            +         * @param   {number}    _targetHeight   弹框高度
            +         * @param   {number}    _offset         Y轴偏移值
            +         * @return  {number}
            +         */
            +        , getLeft:
            +            function( _srcLeft, _srcWidth, _targetWidth, _offset  ){
            +                _offset == undefined && ( _offset = 5 );
            +                var _r = _srcLeft + _srcWidth / 2 + _offset - _targetWidth / 2
            +                    , _scrLeft = $(document).scrollLeft()
            +                    , _maxLeft = $(window).width() + _scrLeft - _targetWidth;
            +
            +                _r > _maxLeft && ( _r = _maxLeft - 2 );
            +                _r < _scrLeft && ( _r = _scrLeft + 1 );
            +
            +                return _r;
            +            }
            +        /**
            +         * 修正弹框的默认显示宽度
            +         * @method  _logic.fixWidth
            +         * @for     JC.alert
            +         * @private
            +         * @param   {string}    _msg    查显示的文本
            +         * @param   {JC.Panel} _panel
            +         */
            +        , fixWidth:
            +            function( _msg, _panel ){
            +                var _tmp = $('<div class="UPanel_TMP" style="position:absolute; left:-9999px;top:-9999px;">' + _msg + '</div>').appendTo('body'), _w = _tmp.width() + 80;
            +                    _tmp.remove();
            +                _w > _logic.maxWidth && ( _w = _logic.maxWidth );
            +                _w < _logic.minWidth && ( _w = _logic.minWidth );
            +
            +                _panel.selector().css('width', _w);
            +            }
            +        /**
            +         * 获取弹框的显示状态, 默认为0(成功)
            +         * @method  _logic.fixWidth
            +         * @for     JC.alert
            +         * @private
            +         * @param   {int}   _status     弹框状态: 0:成功, 1:失败, 2:警告
            +         * @return  {int}
            +         */
            +        , getStatusClass:
            +            function ( _status ){
            +                var _r = 'UPanelSuccess';
            +                switch( _status ){
            +                    case 0: _r = 'UPanelSuccess'; break;
            +                    case 1: _r = 'UPanelError'; break;
            +                    case 2: _r = 'UPanelAlert'; break;
            +                }
            +                return _r;
            +            }
            +        /**
            +         * 保存弹框的所有默认模板
            +         * @property    _logic.tpls
            +         * @type        Object
            +         * @for         JC.alert
            +         * @private
            +         */
            +        , tpls: {
            +            /**
            +             *  msgbox 弹框的默认模板
            +             *  @property   _logic.tpls.msgbox
            +             *  @type       string
            +             *  @private
            +             */
            +            msgbox:
            +                [
            +                '<div class="UPanel UPanelPopup {status}" >'
            +                ,'    <div class="UPContent">'
            +                ,'        <div class="bd">'
            +                ,'            <dl>'
            +                ,'                <dd class="UPopupContent">'
            +                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            +                ,'                </dd>'
            +                ,'            </dl>'
            +                ,'        </div>'
            +                ,'    </div><!--end UPContent-->'
            +                ,'</div>'
            +                ].join('')
            +            /**
            +             *  alert 弹框的默认模板
            +             *  @property   _logic.tpls.alert
            +             *  @type       string
            +             *  @private
            +             */
            +            , alert:
            +                [
            +                '<div class="UPanel UPanelPopup {status}" >'
            +                ,'    <div class="UPContent">'
            +                ,'        <div class="bd">'
            +                ,'            <dl>'
            +                ,'                <dd class="UPopupContent">'
            +                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            +                ,'                </dd>'
            +                ,'                <dd class="UButton">'
            +                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            +                ,'                </dd>'
            +                ,'            </dl>'
            +                ,'        </div>'
            +                ,'    </div><!--end UPContent-->'
            +                ,'</div>'
            +                ].join('')
            +            /**
            +             *  confirm 弹框的默认模板
            +             *  @property   _logic.tpls.confirm
            +             *  @type       string
            +             *  @private
            +             */
            +            , confirm:
            +                [
            +                '<div class="UPanel UPanelPopup {status}" >'
            +                ,'    <div class="UPContent">'
            +                ,'        <div class="bd">'
            +                ,'            <dl>'
            +                ,'                <dd class="UPopupContent">'
            +                ,'                <button class="UIcon" align="absMiddle" ></button><div class="UText"><button type="button" class="UPlaceholder"></button>{msg}</div>'
            +                ,'                </dd>'
            +                ,'                <dd class="UButton">'
            +                ,'                    <button type="button" class="UPanel_confirm" eventtype="confirm">确定</button>'
            +                ,'                    <button type="button" class="UPanel_cancel" eventtype="cancel">取消</button>'
            +                ,'                </dd>'
            +                ,'            </dl>'
            +                ,'        </div>'
            +                ,'    </div><!--end UPContent-->'
            +                ,'</div>'
            +                ].join('')
            +        }
            +    };
            +    /**
            +     * 响应窗口改变大小 
            +     */
            +    $(window).on('resize', function( _evt ){
            +        $('body > div.UPanelPopup_identifer').each( function(){
            +            var _p = $(this);
            +            _p.data('PopupInstance') && _logic.onresize( _p.data('PopupInstance') );
            +        });
            +    });
            +
            +    return JC.Panel;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Placeholder_Placeholder.js.html b/docs_api/files/.._comps_Placeholder_Placeholder.js.html index 2258ae24e..2bf96d7bb 100644 --- a/docs_api/files/.._comps_Placeholder_Placeholder.js.html +++ b/docs_api/files/.._comps_Placeholder_Placeholder.js.html @@ -3,11 +3,17 @@ ../comps/Placeholder/Placeholder.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,12 +252,16 @@

            File: ../comps/Placeholder/Placeholder.js

            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
             /**
              * Placeholder 占位符提示功能
            + * <p>
            + *      <b>require</b>: 
            + *          <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
              * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
              * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Placeholder.html' target='_blank'>API docs</a>
              * | <a href='../../comps/Placeholder/_demo' target='_blank'>demo link</a></p>
            - * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a></p>
              * @namespace JC
              * @class Placeholder
              * @extends JC.BaseMVC
            @@ -195,9 +271,8 @@ 

            File: ../comps/Placeholder/Placeholder.js

            * @author qiushaowei <suches@btbtd.org> | 75 Team * @date 2013-10-19 */ -;(function($){ - JC.Placeholder = Placeholder; + JC.f.addAutoInit && JC.f.addAutoInit( Placeholder ); function Placeholder( _selector ){ _selector && ( _selector = $( _selector ) ); @@ -280,13 +355,13 @@

            File: ../comps/Placeholder/Placeholder.js

            return _r; }; /** - * 更新所有 placeholder 实现的状态 + * 更新所有 placeholder 的状态 * @method update * @static */ Placeholder.update = function(){ - var _items = $( printf( '#{0} > div', Placeholder.Model._boxId ) ); + var _items = $( JC.f.printf( '#{0} > div', Placeholder.Model._boxId ) ); if( !_items.length ) return; _items.each( function(){ var _p = $(this), _ins = _p.data( 'CPHIns' ); @@ -392,7 +467,7 @@

            File: ../comps/Placeholder/Placeholder.js

            , placeholder: function(){ if( !this._placeholder ){ - this._placeholder = $( printf( '<div class="{0}"></div>' + this._placeholder = $( JC.f.printf( '<div class="{0}" style="display:none;"></div>' , this.className() ) ) .appendTo( this.placeholderBox() ); @@ -407,7 +482,7 @@

            File: ../comps/Placeholder/Placeholder.js

            function(){ var _r = $( '#' + Placeholder.Model._boxId ); if( !( _r && _r.length ) ){ - _r = $( printf( '<div id="{0}"></div>', Placeholder.Model._boxId ) ).appendTo( document.body ); + _r = $( JC.f.printf( '<div id="{0}"></div>', Placeholder.Model._boxId ) ).appendTo( document.body ); } return _r; } @@ -426,7 +501,7 @@

            File: ../comps/Placeholder/Placeholder.js

            , _v = _p._model.selector().val().trim() , _holder = _p._model.placeholder() ; - if( _v ){ + if( _v || !_p.selector().is( ':visible' ) ){ _holder.hide(); return; } @@ -440,7 +515,6 @@

            File: ../comps/Placeholder/Placeholder.js

            _holder.css( { 'left': _offset.left + 'px' , 'top': _offset.top + 1 + 'px' - , 'line-height': _h + 'px' } ); _holder.show(); @@ -515,6 +589,34 @@

            File: ../comps/Placeholder/Placeholder.js

            ctrl.focus(); } } + /** + * inject jquery show, hide func, for Placeholder change event + */ + var _oldShow= $.fn.show, _oldHide = $.fn.hide, EVENT_BINDER = $( {} ); + $.fn.show = + function(){ + var _r = _oldShow.apply( this, arguments ), _p = this; + setTimeout( function(){ + EVENT_BINDER.trigger( 'show' ); + }, 1 ); + return _r; + }; + + $.fn.hide = + function(){ + var _r = _oldHide.apply( this, arguments ), _p = this; + setTimeout( function(){ + EVENT_BINDER.trigger( 'hide' ); + }, 1 ); + return _r; + }; + + EVENT_BINDER.on( 'show hide', function(){ + EVENT_BINDER.data('timer') && clearTimeout( EVENT_BINDER.data( 'timer' ) ); + EVENT_BINDER.data( 'timer', setTimeout( function(){ + Placeholder.update(); + }, 100 ) ); + }); $(document).ready( function(){ var _insAr = 0; @@ -523,7 +625,16 @@

            File: ../comps/Placeholder/Placeholder.js

            ; }); -}(jQuery)); + return JC.Placeholder; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_PopTips_PopTips.js.html b/docs_api/files/.._comps_PopTips_PopTips.js.html new file mode 100644 index 000000000..0c8ea050d --- /dev/null +++ b/docs_api/files/.._comps_PopTips_PopTips.js.html @@ -0,0 +1,1117 @@ + + + + + ../comps/PopTips/PopTips.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/PopTips/PopTips.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * PopTips 带箭头的气泡提示框功能
            + * <p>
            + *      <b>require</b>: 
            + *          <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + * </p>
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.PopTips.html' target='_blank'>API docs</a>
            + * | <a href='../../comps/PopTips/_demo' target='_blank'>demo link</a></p>
            + *
            + * <h2>页面只要引用本文件, 默认会自动初始化span|em|a|b为class="js_compPoptips"的提示气泡</h2>
            + * <p></p>
            + *
            + *
            + * <h2>可用的 HTML attribute</h2>
            + *
            + * <dl>
            + *    <dt>htmlContent</dt>
            + *    <dd>
            + *       <p>声明气泡提示的内容支持脚本模板<br>
            + *        如果有设置该属性那么会优先选用htmlContent提供的内容
            + *       </p>
            + *    </dd>
            + *
            + *    <dt>ajaxContent</dt>
            + *    <dd>
            + *       <p>声明气泡提示的ajax 模板</p>
            + *    </dd>
            + *
            + *    <dt>content = string </dt>
            + *    <dd>
            + *       <p>声明气泡提示的内容,如果需要提示html内容那么用<b>htmlContent</b>属性<br>
            + *       如果没有设置则去查找title属性,如果title也没有设置,<br/>
            +         则将触发元素的text作为提示内容。</p>
            + *    </dd>
            + *
            + *    <dt>theme = yellow | blue | white | green, <a href="../../modules/JC.PopTips/0.1/res/default/style.html" target="_blank">查看</a> </dt>
            + *    <dd>
            + *       气泡主题,提供黄色、蓝色、白色、绿色四种样式,默认为 yellow.
            + *       <p><b>yellow:</b>黄色<br/>
            + *       <b>blue:</b>蓝色<br/>
            + *       <b>white:</b>白色<br/>
            + *       <b>green:</b>绿色</p>
            + *    </dd>
            + *
            + *    <dt>triggerType = hover | click</dt>
            + *    <dd>
            + *        触发方式: 支持hover和click
            + *        <p>默认为hover</p>
            + *    </dd>
            + *
            + *    <dt>arrowPosition = left | right | top | bottom</dt>
            + *    <dd>
            + *        声明箭头的方向,默认值为left
            + *        <p><b>left:</b>箭头向左(提示框在触发元素的右边)如果右边空间不够,提示框自动显示在左边,如果左边空间不够,提示框显示在上方,如果上方空间,提示框显示到下方<br/>
            + *        <b>right:</b>箭头向右(提示框在触发元素的左边)如果左边空间不够,提示框自动显示在右边,如果右边空间不够,提示框显示在上方,如果上方空间,提示框显示到下方<br/>
            + *        <b>top:</b>箭头向上(提示框在触发元素的下边)如果下边不够,提示框自动显示到上边<br/>
            + *        <b>bottom:</b>箭头向下(提示框在触发元素的上边)如果上边不够,提示框自动显示到下边</p>    
            + *    </dd>
            + *
            + *    <dt>arrowPositionOffset = left | right | top , <a href="../../modules/JC.PopTips/0.1/res/default/style.html#pos" target="_blank">查看</a></dt>
            + *    <dd>
            + *        声明箭头在提示框的位置,默认居中
            + *        <p>如果arrowPosition = left | right, arrowPositionOffset可以设置为top</p>
            + *        <p>如果arrowPosition = top | bottom, arrowPositionOffset可以设置为left | right</p>
            + *    </dd>
            + *
            + *    <dt>offsetXY = num,num</dt>
            + *    <dd>
            + *        声明提示框相对于当前位置的偏移位置(x 坐标,y 坐标),默认值为0
            + *        <p>x < 0,往左偏移,x > 0 往右偏移 <br/>
            + *         y < 0, 往上偏移,y > 0 往下偏移 <br/>
            + *         两个数值以<b>逗号</b>分隔,如果只写一个值表示 y 坐标为0。</p>
            + *    </dd>
            + *
            + *    <dt>popTipsWidth = num</dt>
            + *    <dd>
            + *        声明提示框的宽度,默认自适应
            + *    </dd>
            + *
            + *    <dt>popTipsHeight = num</dt>
            + *    <dd>
            + *        声明提示框的高度,默认自适应
            + *    </dd>
            + * 
            + *    <dt>popTipsMinWidth= num, default = auto</dt>
            + *    <dd>
            + *        声明提示框的最小宽度,默认自适应
            + *    </dd>
            + *
            + *    <dt>popTipsMinHeight = num, default = auto</dt>
            + *    <dd>
            + *        声明提示框的最小高度,默认自适应
            + *    </dd>
            + *
            + *    <dt>beforeShowCallback = function</dt>
            + *    <dd>
            + *        气泡显示前, 触发的回调, <b>window 变量域</b>
            +<pre>function beforeShowCallback( _selector ){
            +    var _ins = this;
            +    JC.log( 'beforeShowCallback', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>afterHideCallback = function</dt>
            + *    <dd>
            + *        气泡隐藏后, 触发的回调, <b>window 变量域</b>
            +<pre>function afterHideCallback( _selector ){
            +    var _ins = this;
            +    JC.log( 'afterHideCallback', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *</dl> 
            + *
            + * @namespace JC
            + * @class PopTips
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.2 2014-09-03
            + * @version dev 0.1 2013-12-13
            + * @author  zuojing   <zuojing1013@gmail.com>, qiushaowei <qiushaowei@360.cn> | 75 Team
            + * @example
            +	<span class="js_compPopTips" style="margin-top:50px; margin-left:200px; display:inline-block;"  
            +		content="1.这个tip显示在右边<br>2.古希腊学者亚里士多<br>3.古希腊学者亚里士多<br>4.古希腊学者亚里士多"  
            +		theme="yellow" 
            +		arrowposition="left"
            +		triggerType="click"
            +		>
            +		<span>古希腊学者亚里士多德曾编<br>
            +			写过全面讲述当时学问的讲义,<br>
            +			被西方奉为“百科全书之父”,<br>
            +			中国汉朝初年的《尔雅》,<br>
            +			是中国百科全书性质著作的渊源。</span>
            +	</span>
            +  */
            +    JC.PopTips = PopTips;
            + 
            +    function PopTips( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        
            +        if( PopTips.getInstance( _selector ) ) return PopTips.getInstance( _selector );
            +        PopTips.getInstance( _selector, this );
            +        //JC.log( PopTips.Model._instanceName );
            + 
            +        this._model = new PopTips.Model( _selector );
            +        this._view = new PopTips.View( this._model );
            + 
            +        this._init();
            + 
            +        //JC.log( 'PopTips:', new Date().getTime() );
            +    }
            +    /**
            +     * 获取或设置 PopTips 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {PopTipsInstance}
            +     */
            +    PopTips.getInstance = function ( _selector, _setter ) {
            +        if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +            _selector = $(_selector);
            +        if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +        typeof _setter != 'undefined' && _selector.data( PopTips.Model._instanceName, _setter );
            +
            +        return _selector.data( PopTips.Model._instanceName );
            +    };
            +    /**
            +     * 初始化可识别的 PopTips 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of PopTipsInstance}
            +     */
            +    PopTips.init = function ( _selector ) {
            +        var _r = [];
            +        
            +        _selector = $( _selector || document );
            +
            +        if ( _selector.length ) {
            +            if ( _selector.hasClass('js_compPopTips') ) {
            +                _r.push( new PopTips(_selector) );
            +            } else {
            +                _selector.find('span.js_compPopTips,a.js_compPopTips,b.js_compPopTips,em.js_compPopTips').each( function() {
            +                    _r.push( new PopTips( this ) );
            +                });
            +            }
            +        }
            +        
            +        return _r;
            +    };
            +
            +    PopTips.update = function () {
            +        var _items = $( JC.f.printf( '#{0}>div', PopTips.Model._boxId ) );
            +
            +        if( !_items.length ) return;
            +
            +        _items.each( function(){
            +            var _p = $(this), 
            +                _ins = _p.data( 'CPopTipsIns' );
            +
            +            if( !_ins ) return;
            +
            +            if ( _ins._model.layout().is(':visible') && _ins._model.layout().offset().left >= -200 ) {
            +                _ins.update();
            +            }
            +
            +        });
            +      
            +    },
            +
            +    BaseMVC.build( PopTips );
            +
            +    JC.f.extendObject( PopTips.prototype, {
            +        _beforeInit: function () {
            +            //JC.log( 'PopTips _beforeInit', new Date().getTime() );
            +        },
            +
            +        _initHanlderEvent: function () {
            +            var _p = this;
            +
            +            _p.on( 'CPopTipsUpdate', function( _evt ){
            +                _p._model.beforeShowCallback()
            +                    && _p._model.beforeShowCallback().call( _p, _p.selector() );
            +
            +            });
            +
            +            var _timerIn = null,
            +                _timerOut = null,
            +                _tipsTimerIn = null,
            +                _tipsTimerOut = null;
            +
            +            if ( _p._model.triggerType() == 'hover' ) {
            +                 _p._model.selector()
            +                .on('mouseenter', function () {
            +                    clearTimeout( _tipsTimerIn );
            +                    clearTimeout( _tipsTimerOut );
            +                    clearTimeout( _timerIn );
            +                    clearTimeout( _timerOut );
            +                    _timerIn = setTimeout( function () {
            +                        _p._view.update();
            +                        _p._view.show();
            +                    }, 50);
            +
            +                })
            +                .on('mouseleave', function () {
            +                    clearTimeout( _tipsTimerIn );
            +                    clearTimeout( _tipsTimerOut );
            +                    clearTimeout( _timerIn );
            +                    clearTimeout( _timerOut );
            +                    _timerOut = setTimeout( function () {
            +                         _p._view.hide();    
            +                    }, 200)
            +                });
            +
            +                _p._model.layout()
            +                .on('mouseenter', function () {
            +                    clearTimeout( _tipsTimerIn );
            +                    clearTimeout( _tipsTimerOut );
            +                    clearTimeout( _timerIn );
            +                    clearTimeout( _timerOut );
            +                    _tipsTimerIn = setTimeout( function () {
            +                        _p._view.update();
            +                        _p._view.show();
            +                       
            +                    }, 50)
            +                })
            +                .on('mouseleave', function () {
            +                    clearTimeout( _tipsTimerIn );
            +                    clearTimeout( _tipsTimerOut );
            +                    clearTimeout( _timerIn );
            +                    clearTimeout( _timerOut );
            +                    _tipsTimerOut = setTimeout( function () {
            +                        _p._view.hide();
            +                    }, 200)
            +                });
            +
            +            }
            +
            +            _p.on( 'update_layout', function( _evt, _html ){
            +                var _json;
            +                try{
            +                    _json = $.parseJSON( _html );
            +                    if( _json && 'errorno' in _json && !_json.errorno && _json.data ){
            +                        _html = _json.data;
            +                    }
            +                }catch( _ex ){
            +                }
            +                _p._model.layout().find( '.js_cpt_ajax_ph' ).html( _html );
            +            });
            +
            +            if ( _p._model.triggerType() == 'click' ) {
            +                _p._model.selector().on('click', function ( _evt ) {
            +                    if ( _p._model.layout().is(':visible') && _p._model.layout().offset().left >= -200 ) {
            +                        _p._view.hide();
            +                    } else {
            +                        _p._view.update();
            +                        _p._view.show();
            +                    }
            +                });
            +            }
            +
            +        }, 
            +
            +        _inited: function () {
            +            //JC.log( 'PopTips _inited', new Date().getTime() );
            +           var _p = $(this);
            +
            +           _p.trigger('CPopTipsUpdate');
            +
            +        },
            +
            +        /**
            +         * 更新 PopTips 状态
            +         * @method update
            +         */
            +        update: function () {
            +
            +            this._view.update();
            +
            +            return this;
            +        }
            +
            +    });
            + 
            +    PopTips.Model._instanceName = "PopTips";
            +    PopTips.Model._boxId = 'CPTBox';
            +
            +    JC.f.extendObject( PopTips.Model.prototype, {
            +        init: function () {
            +            var _p = this;
            +        },
            +
            +        baseTpl: '<div class="CPT CPT_{0}" style="position:absolute;display:none;">'
            +            +   '<div class="CPT_shadow">'
            +            +       '<div class="CPT_container" style="min-width:{4}; min-height: {5}">'
            +            +           '<div class="CPT_arrow CPT_arrow_{1}">'
            +            +               '<em></em>'
            +            +               '<span></span>'
            +            +           '</div>'
            +            +           '<div class="CPT_content"  data-role="content" {3}>'
            +            +               '{2}'
            +            +           '</div>'
            +            +       '</div>'
            +            +   '</div>'
            +            + '</div>',
            +
            +        theme: function () {
            +            var _r = this.stringProp('theme');
            +            
            +            !_r && ( _r = 'yellow' );
            +
            +            return _r;
            +
            +        },
            +
            +        contents: function () {
            +            var _r = this.attrProp('content') || this.attrProp('title');
            +            
            +            !_r && ( _r = this.selector().text() );
            +
            +            return _r;
            +
            +        },
            +
            +        htmlContents: function () {
            +            var _r,
            +                _s = JC.f.parentSelector( this.selector(), this.attrProp('htmlContent') );
            +
            +            _r = JC.f.scriptContent( _s );
            +
            +            return _r;
            +        },
            +
            +        ajaxContent: function () {
            +            var _p = this;
            +            this.is( '[ajaxContent]' ) &&
            +                $.get( this.attrProp( 'ajaxContent' ) ).done( 
            +                    function( _r ){
            +                        _p.trigger( 'update_layout', [ _r ] );
            +                    });
            +        },
            +
            +        arrowPosition: function () {
            +            var _r = this.stringProp('arrowPosition');
            +
            +            !_r && ( _r = 'left' );
            +
            +            return _r;
            +        },
            +
            +        arrowPositionOffset: function () {
            +            var _r = this.stringProp('arrowPositionOffset'),
            +                _arrowPosition = this.arrowPosition();
            +
            +            if ( _arrowPosition === 'left' || _arrowPosition === 'right' ) {
            +                if ( _r != 'top' ) {
            +                    _r = '';
            +                }
            +            }
            +
            +            if ( _arrowPosition === 'top' || _arrowPosition === 'bottom' ) {
            +                if ( _r != 'left' || _r != 'right' ) {
            +                    _r = '';
            +                }
            +            }
            +
            +            return _r;
            +        },
            +
            +        offsetXY: function () {
            +            var _r = this.attrProp('offsetXY').split(','),
            +                _x = parseInt( _r[0], 10 ) || 0,
            +                _y = parseInt( _r[1], 10 ) || 0;
            +
            +            return {
            +                x: _x,
            +                y: _y
            +            };
            +        },
            +
            +        triggerType: function () {
            +            var _r = this.stringProp('triggerType');
            +
            +            !_r && ( _r = 'hover');
            +
            +            return _r;
            +
            +        },
            +
            +        layout: function () {
            +            var _p = this,
            +                _tpl = _p.baseTpl;
            +            
            +            if ( !this._layout ) {
            +                if ( _p.htmlContents() ) {
            +                    this._layout = $( JC.f.printf( _tpl
            +                        , _p.theme()
            +                        , _p.arrowPosition()
            +                        , _p.htmlContents()
            +                        , 'style="width:' + _p.layoutWidth() + ';height:' + _p.layoutHeight() + ';"' 
            +                        , _p.layoutMinWidth(), _p.layoutMinHeight()
            +                        ) )
            +                        .appendTo( this.layoutBox() );
            +                } else if ( this.is( '[ajaxContent]' ) ) {
            +                    this._layout = $( JC.f.printf( _tpl
            +                        , _p.theme()
            +                        , _p.arrowPosition()
            +                        , '<div class="js_cpt_ajax_ph">加载中...</div>'
            +                        , 'style="width:' + _p.layoutWidth() + ';height:' + _p.layoutHeight() + ';"' 
            +                        , _p.layoutMinWidth(), _p.layoutMinHeight()
            +                        ) )
            +                        .appendTo( this.layoutBox() );
            +                    _p.ajaxContent();
            +                } else {
            +                    this._layout = $( JC.f.printf( _tpl
            +                        , _p.theme()
            +                        , _p.arrowPosition()
            +                        , _p.contents()
            +                        , 'style="width:' + _p.layoutWidth() + ';height:' + _p.layoutHeight() + ';"' 
            +                        , _p.layoutMinWidth(), _p.layoutMinHeight()
            +                        ) )
            +                        .appendTo( this.layoutBox() );
            +                }
            +                this._layout.css( { 'left': '-10000px' } ).show();
            +                
            +            }
            +
            +            return this._layout;
            +
            +        },
            +
            +        layoutWidth: function () {
            +            var _r = this.intProp('popTipsWidth');
            +
            +            _r && ( _r = _r + 'px' );
            +            !_r && ( _r = 'auto' );
            +
            +            return _r;
            +        },
            +
            +        layoutMinWidth: function () {
            +            var _r = this.intProp('popTipsMinWidth');
            +            _r && ( _r = _r + 'px' );
            +            !_r && ( _r = 'auto' );
            +            return _r;
            +        },
            +
            +        layoutHeight: function () {
            +           var _r = this.intProp('popTipsHeight');
            +
            +           _r && ( _r = _r + 'px' );
            +           !_r && ( _r = 'auto' );
            +
            +           return _r;
            +        },
            +
            +        layoutMinHeight: function () {
            +           var _r = this.intProp('popTipsMinHeight');
            +           _r && ( _r = _r + 'px' );
            +           !_r && ( _r = 'auto' );
            +
            +           return _r;
            +        },
            +
            +
            +        layoutBox: function () {
            +            var _r = $('#' + PopTips.Model._boxId );
            +
            +            if ( !(_r && _r.length) ) {
            +                _r = $( JC.f.printf( '<div id="{0}"></div>', PopTips.Model._boxId ) )
            +                    .appendTo( document.body );
            +            }
            +
            +            return _r;
            +        },
            +
            +        calcPosOffset: function ( _arrowPosition, _pos, _lw, _lh ) {
            +            var _r = {},
            +                _p = this,
            +                _selector = _p.selector(),
            +                _pos = {
            +                    top: _selector.offset().top + _p.offsetXY().y,
            +                    left: _selector.offset().left + _p.offsetXY().x,
            +                    width: _selector.prop('offsetWidth'),
            +                    height: _selector.prop('offsetHeight')
            +                },
            +                _lw = _p.layout().outerWidth(),
            +                _lh = _p.layout().outerHeight();
            +            //JC.log( _lh, _lw, _arrowPosition, JC.f.ts() );
            +            //JC.log( _p.layout().html() );
            +            
            +            switch ( _arrowPosition ) {
            +                case 'top':
            +                    _r = {
            +                        top: _pos.top + _pos.height + 5 ,
            +                        left: _pos.left + _pos.width / 2 - _lw / 2 
            +                    };
            +                    break;
            +                case 'right':
            +                    _r = {
            +                        top: _pos.top + _pos.height / 2 - _lh / 2,
            +                        left: _pos.left - _lw - 5
            +                    };
            +                    break;
            +                case 'bottom':
            +                    _r = {
            +                        top: _pos.top - _lh - 5,
            +                        left: _pos.left + _pos.width / 2 - _lw / 2
            +                    };
            +
            +                    break;
            +                case 'left':
            +                    _r = {
            +                        top: _pos.top + _pos.height / 2 - _lh / 2,
            +                        left: _pos.left + _pos.width + 5
            +                    };
            +
            +                    break;
            +            }
            +
            +            _r.width = _lw;
            +            _r.height = _lh;
            +  
            +            return _r;
            +        },
            +
            +        /**
            +         * 设置 left top 之后, 获取高度不准确
            +         */
            +        offSet: function ( _offset ) {
            +            this.layout().css({
            +                top: _offset.top + 'px',
            +                left: _offset.left + 'px'
            +            });
            +        },
            +
            +        changePosition: function ( _newAP, _now ) {
            +            var _p = this,
            +                _offset;
            +
            +            _offset = _p.calcPosOffset( _newAP );
            +            _p.changeArrow( _now );
            +            
            +            if ( ( _now === 'top'  ) 
            +                || ( _now === 'bottom' ) ) {
            +                _p.offSet( _offset );
            +            }
            +            
            +            return _offset;
            +        },
            +
            +        changeArrow: function ( _className ) {
            +            var _p = this;
            +            _p.layout().find('div.CPT_arrow')[0].className = 'CPT_arrow CPT_arrow_' + _className;
            +
            +        },
            +
            +        setPosition: function ( _offset, _arrowPosition ) {
            +
            +            var _p = this,
            +                _newAP,
            +                _now,
            +                _win = $(window),
            +                _viewportHeight = _win.outerHeight(),
            +                _viewportWidth = _win.outerWidth(),
            +                _scrollTop = _win.scrollTop(),
            +                _scrollLeft = _win.scrollLeft(),
            +                _viewMaxX = _viewportWidth + _scrollLeft,
            +                _viewMaxY = _viewportHeight + _scrollTop,
            +                _tipsMaxPosX = _offset.width + _offset.left,
            +                _tipsMaxPosY = _offset.top + _offset.height,
            +                _baseP = _p.arrowPositionOffset(),
            +                //_baseP = '',
            +                _afterChangePos,
            +                _winSize = JC.f.winSize(),
            +                _fixed
            +                ;
            +
            +            _baseP && ( _baseP = '_' + _baseP );
            +            
            +
            +            if ( _arrowPosition === 'bottom'  ) { 
            +                if ( _offset.top < _winSize.viewportY ) {
            +                    _newAP = 'top';
            +                    _now = 'top' + _baseP;
            +                    _p.changePosition( _newAP, _now );
            +                    _fixed = true;
            +                } else {
            +                    _p.changeArrow( "bottom" + _baseP );
            +                }
            +            }
            +
            +            if ( _arrowPosition === 'top'  ) {
            +                if( _viewMaxY < _tipsMaxPosY ) {
            +                    _newAP = 'bottom';
            +                    _now = 'bottom' + _baseP;
            +                    _afterChangePos = _p.changePosition( _newAP, _now );
            +                    _fixed = true;
            +                } else  {
            +                    _p.changeArrow( 'top' + _baseP );
            +                }
            +                
            +            }
            +
            +            if ( _arrowPosition === 'right' ) {
            +                if ( _offset.left < _winSize.viewportX ) {
            +                    _newAP = 'left';
            +                    _now = 'left' + _baseP;
            +                    _afterChangePos = _p.changePosition(_newAP, _now);
            +                    _tipsMaxPosX = _afterChangePos.width + _afterChangePos.left;
            +                    _fixed = true;
            +
            +                    if ( _viewMaxX < _tipsMaxPosX ) {
            +                        _newAP = 'bottom';
            +                        _now = 'bottom';
            +                        _afterChangePos = _p.changePosition(_newAP, _now);
            +
            +                        if ( _afterChangePos.top < _winSize.viewportY ) {
            +                            _newAP = 'top';
            +                            _now = 'top';
            +                            _afterChangePos = _p.changePosition(_newAP, _now);
            +                        }
            +
            +                    } else {
            +                        _p.offSet( _afterChangePos );
            +                    }
            +                } else {
            +                    _p.changeArrow('right' + _baseP);
            +                }
            +
            +            }
            +
            +            if ( _arrowPosition === 'left' ) {
            +                
            +                if ( _viewMaxX < _tipsMaxPosX ) {
            +                    _newAP = 'right';
            +                    _now = 'right' + _baseP;
            +                    _afterChangePos = _p.changePosition(_newAP, _now);
            +                    _fixed = true;
            +
            +                    if ( _afterChangePos.left < _winSize.viewportX ) {
            +                        _newAP = 'bottom';
            +                        _now = 'bottom';
            +                        _afterChangePos = _p.changePosition(_newAP, _now);
            +                        //JC.dir( _afterChangePos );
            +
            +                        if ( _afterChangePos.top < _winSize.viewportY ) {
            +                            _newAP = 'top';
            +                            _now = 'top';
            +                            _afterChangePos = _p.changePosition(_newAP, _now);
            +                        }
            +
            +                    } else {
            +                        _p.offSet( _afterChangePos );
            +                    }
            +
            +                } else {
            +                    _p.changeArrow('left' + _baseP);
            +                }
            +            }
            +
            +            !_fixed && _p.offSet( _offset );
            +        },
            +
            +        /**
            +         * PopTips显示前的回调
            +         */
            +        beforeShowCallback: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = 'beforeShowCallback';
            +
            +            return _p.callbackProp(_selector, _key);
            +        },
            +
            +        /**
            +         * PopTips隐藏后的回调
            +        */
            +        afterHideCallback: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = 'afterShowCallback';
            +
            +            return _p.callbackProp(_selector, _key);
            +        }
            +    });
            + 
            +    JC.f.extendObject( PopTips.View.prototype, {
            +        init: function () {
            +            var _p = this;
            +        },
            +
            +        update: function () {
            +            var _p = this,
            +                _selector = _p._model.selector(),
            +                _pos = {
            +                    top: _selector.offset().top,
            +                    left: _selector.offset().left,
            +                    width: _selector.prop('offsetWidth'),
            +                    height: _selector.prop('offsetHeight')
            +                },
            +                _arrowPosition = _p._model.arrowPosition(),
            +                _revertArrow = _arrowPosition, 
            +                _offset, _revertOffset;
            +
            +            switch( _arrowPosition ){
            +                case 'left': _revertArrow = 'right'; break;
            +                case 'right': _revertArrow = 'left'; break;
            +                case 'top': _revertArrow = 'bottom'; break;
            +                case 'bottom': _revertArrow = 'top'; break;
            +            }
            +
            +            _offset = _p._model.calcPosOffset(_arrowPosition, JC.f.cloneObject( _pos ) );
            +            //JC.log( _arrowPosition, _revertArrow );
            +
            +            var _newAP,
            +                _now,
            +                _win = $(window),
            +                _viewportHeight = _win.outerHeight(),
            +                _viewportWidth = _win.outerWidth(),
            +                _scrollTop = _win.scrollTop(),
            +                _scrollLeft = _win.scrollLeft(),
            +                _viewMaxX = _viewportWidth + _scrollLeft,
            +                _viewMaxY = _viewportHeight + _scrollTop,
            +                _tipsMaxPosX = _offset.width + _offset.left,
            +                _tipsMaxPosY = _offset.top + _offset.height,
            +                _baseP = _p._model.arrowPositionOffset(),
            +                _afterChangePos,
            +                _winSize = JC.f.winSize()
            +                ;
            +
            +                ;
            +            if( _tipsMaxPosX > _winSize.maxViewportX ){
            +                _arrowPosition = 'right';
            +                _offset = _p._model.calcPosOffset(_arrowPosition, JC.f.cloneObject( _pos ) );
            +            }
            +
            +            if( _offset.left < _winSize.viewportX ){
            +                _arrowPosition = 'left';
            +                _offset = _p._model.calcPosOffset(_arrowPosition, JC.f.cloneObject( _pos ) );
            +                //JC.dir( _offset );
            +            }
            +
            +            if( _offset.top < _winSize.viewportX ){
            +                _arrowPosition = 'top';
            +                _offset = _p._model.calcPosOffset(_arrowPosition, JC.f.cloneObject( _pos ) );
            +            }
            +            
            +            if( _tipsMaxPosY > _winSize.maxViewportY ){
            +                _arrowPosition = 'bottom';
            +                _offset = _p._model.calcPosOffset(_arrowPosition, JC.f.cloneObject( _pos ) );
            +            }
            +
            +            _p._model.setPosition( _offset, _arrowPosition );
            +
            +            _p._model.layout().data('CPopTipsIns', _p);
            +        },
            +
            +        show: function () {
            +            var _p = this;
            +
            +            //_p._model.layout().show();
            +            
            +        },
            +
            +        hide: function () {
            +            var _p = this;
            +
            +            _p._model.layout().css( { left: '-10000px' } );
            +            
            +
            +            _p._model.afterHideCallback() && _p._model.afterHideCallback().call( _p, _p.selector() );
            +
            +        }
            +
            +    });
            +
            +    $(document).ready( function () {
            +        var _insAr = 0;
            +        PopTips.autoInit
            +            && ( _insAr = PopTips.init() );
            +
            +    });
            +
            +    $(window).on('resize', function () {
            +        JC.f.safeTimeout( function(){
            +            PopTips.update();
            +        }, null, 'PopTipsResize', 20 );
            +        //JC.log('resize');
            +    });
            + 
            +    return JC.PopTips;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_ServerSort_ServerSort.js.html b/docs_api/files/.._comps_ServerSort_ServerSort.js.html new file mode 100644 index 000000000..f7f8eecef --- /dev/null +++ b/docs_api/files/.._comps_ServerSort_ServerSort.js.html @@ -0,0 +1,652 @@ + + + + + ../comps/ServerSort/ServerSort.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/ServerSort/ServerSort.js

            + +
            +
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +/**
            + * 数据库全表排序逻辑
            + *
            + *  <p><b>require</b>:
            + *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *  </p>
            + *
            + *  <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *      | <a href='http://jc.openjavascript.org/docs_api/classes/JC.ServerSort.html' target='_blank'>API docs</a>
            + *      | <a href='../../comps/ServerSort/_demo' target='_blank'>demo link</a></p>
            + *  
            + *  <h2>页面只要引用本脚本, 默认会处理 [div|tr] class="js_compServerSort"</h2>
            + *
            + *  <h2>可用的 HTML attribute</h2>
            + *
            + *  <dl>
            + *      <dt>cssUrl = url, default = location.href</dt>
            + *      <dd>要翻页的URL<dd>
            + *
            + *      <dt>cssSortName = string, default = sortby</dt>
            + *      <dd>排序的字段名<dd>
            + *
            + *      <dt>cssTypeName = string, default = sorttype</dt>
            + *      <dd>排序的类型名: desc, asc<dd>
            + *
            + *      <dt>cssItems = selector, default = |a[sortName]</dt>
            + *      <dd>排序的具体字段选择器<dd>
            + *
            + *      <dt>cssTypeEnum = string, default = desc,asc</dt>
            + *      <dd>排序的种类<dd>
            + *
            + *      <dt>cssClassEnum = string, default = js_cssDesc,js_cssAsc</dt>
            + *      <dd>显示排序样式的 CSS class<dd>
            + *
            + *      <dt>cssCurClassEnum= string, default = js_cssDesc_cur,js_cssAsc_cur</dt>
            + *      <dd>显示当前排序字段样式的 CSS class<dd>
            + *
            + *      <dt>cssResetUrlParams = string, default=page</dt>
            + *      <dd>页面跳转时, 要重置的 URL 参数<dd>
            + *
            + *      <dt>cssUrlFilter = function, <b>window 变量域</b></dt>
            + *      <dd>页面跳转前, 过滤 url 的回调
            +<pre>function urlFilter( _url ){
            +    _url = JC.f.addUrlParams( _url, { rnd: JC.f.ts() } );
            +    return _url;
            +}</pre>
            + *      <dd>
            + *
            + *      <dt>cssDefaultSortName = string, default = first item[sortName]</dt>
            + *      <dd>默认排序字段</dd>
            + *
            + *      <dt>cssDefaultType = string, default = desc</dt>
            + *      <dd>默认排序类型</dd>
            + *  </dl> 
            + *
            + * @namespace   JC
            + * @class       ServerSort
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version 2014-08-15
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <table class="data-table" width="90%">
            +            <thead>
            +                <tr class="js_compServerSort"
            +                    cssUrl="URL"
            +                    cssSortName="sortby"
            +                    cssTypeName="sorttype"
            +                    cssItems="|a[sortName]"
            +                    cssTypeEnum="desc,asc"
            +                    cssClassEnum="js_cssDesc,js_cssAsc"
            +                    cssCurClassEnum="js_cssDesc_cur,js_cssAsc_cur"
            +                    cssResetUrlParams="pz,page"
            +                    cssUrlFilter="urlFilter"
            +                    >
            +                    <th><a href="javascript:;" sortName="order">序号</a></th>
            +                    <th><a href="javascript:;" sortName="keyword">关键词</a></th>
            +                    <th><a href="javascript:;" sortName="dpv">日均PV</a></th>
            +                    <th><a href="javascript:;" sortName="irate">行业添加率</a></th>
            +                    <th><a href="javascript:;" sortName="dprice">平均出价</a></th>
            +                    <th><a href="javascript:;" sortName="drate">日均点击率</a></th>
            +                </tr>
            +            </thead>
            +            <tbody>
            +                <tr>
            +                    <td>2</td>
            +                    <td>关键词</td>
            +                    <td>1000</td>
            +                    <td>1000</td>
            +                    <td>20.00</td>
            +                    <td>3000</td>
            +                </tr>
            +                <tr class="even">
            +                    <td>1</td>
            +                    <td>关键词</td>
            +                    <td>1000</td>
            +                    <td>1000</td>
            +                    <td>20.00</td>
            +                    <td>3000</td>
            +                </tr>
            +            </tbody>
            +        </table>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.ServerSort = ServerSort;
            +
            +    function ServerSort( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, ServerSort ) ) 
            +            return JC.BaseMVC.getInstance( _selector, ServerSort );
            +
            +        JC.BaseMVC.getInstance( _selector, ServerSort, this );
            +
            +        this._model = new ServerSort.Model( _selector );
            +        this._view = new ServerSort.View( this._model );
            +
            +        this._init();
            +
            +        //JC.log( ServerSort.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 ServerSort 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of ServerSortInstance}
            +     */
            +    ServerSort.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compServerSort' )  ){
            +                    _r.push( new ServerSort( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compServerSort, tr.js_compServerSort' ).each( function(){
            +                        _r.push( new ServerSort( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( ServerSort );
            +
            +    JC.f.extendObject( ServerSort.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'ServerSort _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                if( !( _p._model.items() && _p._model.items().length ) ) return;
            +
            +                _p.on( 'inited', function(){
            +                    _p.trigger( 'UPDATE_LAYOUT' );
            +                });
            +
            +                _p._model.items().on( 'click', function( _evt ){
            +                    _evt.preventDefault();
            +                    var _sp = $( this )
            +                        , _preSortName = JC.f.getUrlParam( _p._model.sortName() )
            +                        , _preType = JC.f.getUrlParam( _p._model.typeName() )
            +                        , _sortName = _sp.attr( 'sortName' )
            +                        , _sortType = _sp.attr( 'sortType' )
            +                        , _nextType
            +                        ;
            +
            +                    _nextType = _preType;
            +                    if( _sortName == _p._model.defaultSortName() ){
            +                        if( _nextType ){
            +                            _sortType = _p._model.otherSortType( _nextType );
            +                        }else{
            +                            _sortType = _p._model.otherSortType( _p._model.defaultType() );
            +                        }
            +                    }else{
            +                        _sortType = _p._model.defaultType();
            +                    }
            +                    //JC.log( _p._model.defaultSortName(), '-', _preSortName, '-', _sortName, '-', _sortType, '-', JC.f.ts() );
            +                    _p.trigger( 'UPDATE', [ _sortName, _sortType, _preSortName, _preType ] );
            +                });
            +
            +                _p.on( 'UPDATE', function( _evt, _sortName, _sortType, _preSortName, _preType  ){
            +                    var _url = _p._model.url()
            +                        , _params = {}
            +                        , _resetUrlParams = _p._model.resetUrlParams()
            +                        , _tmpD
            +                        ;
            +
            +                        _params[ _p._model.sortName() ] = _sortName;
            +                        _params[ _p._model.typeName() ] = _sortType;
            +                        _url = JC.f.addUrlParams( _url, _params );
            +
            +                        if( _resetUrlParams && _resetUrlParams.length ){
            +                            $.each( _resetUrlParams, function( _k, _item ){
            +                                if( !_item ) return;
            +                                if( JC.f.hasUrlParam( _url, _item ) ){
            +                                    _tmpD = {};
            +                                    _tmpD[ _item ] = 1;
            +                                    _url = JC.f.addUrlParams( _url, _tmpD );
            +                                }
            +                            });
            +                        }
            +
            +                        _p._model.urlFilter() && ( _url = _p._model.urlFilter()( _url ) );
            +                        
            +                        location.href = _url;
            +                });
            +
            +                _p.on( 'UPDATE_LAYOUT', function( _evt ){
            +                    var _defalutSortName = _p._model.defaultSortName()
            +                        , _defaultType = _p._model.defaultType()
            +                        , _curType = JC.f.getUrlParam( _p._model.typeName() ) || _defaultType
            +                        , _items = _p._model.items();
            +                        ;
            +                    //JC.log( _defalutSortName, _defaultType, _curType );
            +                    if( !( _items &&  _items.length ) ) return;
            +
            +                    $.each( _items, function( _k, _item ){
            +                        _item = $( _item );
            +                        var _sortName = _item.attr( 'sortName' ), _class;
            +
            +                        if( _sortName == _defalutSortName ){
            +                            _class = [ 
            +                                        _p._model.classEnum()[ _p._model.typeIndexAt( _p._model.otherSortType( _curType ) ) ]
            +                                        , _p._model.curClassEnum()[ _p._model.typeIndexAt( _p._model.otherSortType( _curType ) ) ] 
            +                                     ].join( ' ' );
            +                        }else{
            +                            _class = _p._model.classEnum()[ _p._model.typeIndexAt( _defaultType ) ];
            +                        }
            +                        //JC.log( _k, _item, _class );
            +
            +                        if( _class ){
            +                            _item.removeClass( _p._model.classEnum().concat( _p._model.curClassEnum() ).join( ' ' ) );
            +                            _item.addClass( _class );
            +                        }
            +                    });
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'ServerSort _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +    });
            +
            +    ServerSort.Model._instanceName = 'JCServerSort';
            +    JC.f.extendObject( ServerSort.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'ServerSort.Model.init:', new Date().getTime() );
            +            }
            +
            +        , urlFilter: function(){ return this.callbackProp( 'cssUrlFilter' ); }
            +        
            +        , typeIndexAt:
            +            function( _type ){
            +                var _r = 0;
            +                $.each( this.typeEnum(), function( _k, _item ){
            +                    if( _item === _type ){
            +                        _r = _k;
            +                        return false;
            +                    }
            +                });
            +                return _r;
            +            }
            +
            +        , resetUrlParams:
            +            function(){
            +                if( !this._resetUrlParams ){
            +                    this._resetUrlParams = ( this.attrProp( 'cssResetUrlParams' ) || 'page' ).replace( /[\s]+/g, '' );
            +                    this._resetUrlParams && ( this._resetUrlParams = this._resetUrlParams.split(',') )
            +                }
            +                return this._resetUrlParams;
            +            }
            +
            +        , defaultType:
            +            function(){
            +                return this.attrProp( 'cssDefaultType' ) || this.typeEnum()[0];
            +            }
            +
            +        , otherSortType:
            +            function( _type ){
            +                var _r;
            +                if( _type ){
            +                    $.each( this.typeEnum(), function( _k, _item ){
            +                        if( _type != _item ){
            +                            _r = _item;
            +                            return false;
            +                        }
            +                    });
            +                }
            +                _r = _r || this.typeEnum()[0];
            +                return _r;
            +            }
            +
            +        , defaultSortName:
            +            function(){
            +                if( typeof this._defalutSortName == 'undefined' ){
            +                    this._defalutSortName = this.items().first().attr( 'sortName' );
            +                    this.is( '[cssDefaultSortName]' ) 
            +                        && ( this._defalutSortName = this.attrProp( 'cssDefaultSortName' ) || this._defalutSortName );
            +        
            +                    this._defalutSortName = JC.f.getUrlParam( this.sortName() ) || this._defalutSortName;
            +                }
            +                return this._defalutSortName;
            +            }
            +
            +        , items: 
            +            function(){ 
            +                if( typeof this._items == 'undefined' ){
            +                    var _selector = this.attrProp( 'cssItems' ) || '|a[sortName]';
            +                    this._items = JC.f.parentSelector( this.selector(), _selector ) || null;
            +                }
            +                return this._items;
            +            }
            +
            +        , url: function(){ return JC.f.urlDetect( this.attrProp( 'cssUrl' ) || 'URL' ); }
            +
            +        , sortName: function(){ return this.attrProp( 'cssSortName' ) || 'sortby'; }
            +        , typeName: function(){ return this.attrProp( 'cssTypeName' ) || 'sorttype'; }
            +
            +        , typeEnum: 
            +            function(){ 
            +                if( !this._typeEnum ){
            +                    this._typeEnum = ( this.attrProp( 'cssTypeEnum' ) || 'desc,asc' ).replace( /[\s]+/g, '' ).split( ',' );
            +                }
            +                return this._typeEnum;
            +            }
            +
            +        , classEnum: 
            +            function(){ 
            +                if( !this._classEnum ){
            +                    this._classEnum = ( this.attrProp( 'cssClassEnum' ) || 'js_cssDesc,js_cssAsc' ).replace( /[\s]+/g, '' ).split( ',' );
            +                }
            +                return this._classEnum;
            +            }
            +
            +        , curClassEnum: 
            +            function(){ 
            +                if( !this._curClassEnum ){
            +                    this._curClassEnum = ( this.attrProp( 'cssCurClassEnum' ) || 'js_cssDesc_cur,js_cssAsc_cur' ).replace( /[\s]+/g, '' ).split( ',' );
            +                }
            +                return this._curClassEnum;
            +            }
            +
            +    });
            +
            +    JC.f.extendObject( ServerSort.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'ServerSort.View.init:', new Date().getTime() );
            +            }
            +    });
            +
            +    _jdoc.ready( function(){
            +        ServerSort.autoInit && ServerSort.init();
            +    });
            +
            +    return JC.ServerSort;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Slider_Slider.js.html b/docs_api/files/.._comps_Slider_Slider.js.html index 09b5ff01d..4b575906e 100644 --- a/docs_api/files/.._comps_Slider_Slider.js.html +++ b/docs_api/files/.._comps_Slider_Slider.js.html @@ -3,11 +3,17 @@ ../comps/Slider/Slider.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,12 +252,15 @@

            File: ../comps/Slider/Slider.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
                 window.Slider = JC.Slider = Slider;
                 /**
                  * Slider 划动菜单类
                  * <br />页面加载完毕后, Slider 会查找那些有 class = js_autoSlider 的标签进行自动初始化
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p>
            +     * <p><b>require</b>: 
            +     *      <a href='.jQuery.html'>jQuery</a>
            +     *      , <a href='JC.common.html'>JC.common</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Slider.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Slider/_demo' target='_blank'>demo link</a></p>
            @@ -256,9 +331,10 @@ 

            File: ../comps/Slider/Slider.js

            </style> <link href='../../Slider/res/hslider/style.css' rel='stylesheet' /> <script src="../../../lib.js"></script> + <script src="../../../config.js"></script> <script> JC.debug = true; - JC.use( 'Slider' ); + requirejs( [ 'JC.Slider' ] ); function sliderinitedcb(){ var _sliderIns = this; @@ -656,7 +732,7 @@

            File: ../comps/Slider/Slider.js

            this.subitems(); this.totalpage(); - JC.log( printf('w:{0}, h:{1}, iw:{2}, ih:{3}, dr:{4}, si:{6}, hi:{5}, totalpage:{7}' + JC.log( JC.f.printf('w:{0}, h:{1}, iw:{2}, ih:{3}, dr:{4}, si:{6}, hi:{5}, totalpage:{7}' , this.width(), this.height() , this.itemwidth(), this.itemheight() , this.direction(), this.howmanyitem() @@ -745,7 +821,7 @@

            File: ../comps/Slider/Slider.js

            * @default false * @return bool */ - , loop: function(){ return parseBool( this._layout.attr('sliderloop') ); } + , loop: function(){ return JC.f.parseBool( this._layout.attr('sliderloop') ); } /** * 获取每次移动间隔的毫秒数 * @method stepms @@ -773,7 +849,7 @@

            File: ../comps/Slider/Slider.js

            * @default false * @return bool */ - , automove: function(){ return parseBool( this._layout.attr('sliderautomove') ); } + , automove: function(){ return JC.f.parseBool( this._layout.attr('sliderautomove') ); } /** * 获取默认显示的索引 * @method defaultpage @@ -1001,7 +1077,7 @@

            File: ../comps/Slider/Slider.js

            JC.log( 'HorizontalView move, is backwrad', _backwrad, this._model.pointer() ); var _newpointer = this._model.newpointer( _backwrad ); - JC.log( printf( 'is backwrad: {0}, pointer:{1}, new pointer:{2}' + JC.log( JC.f.printf( 'is backwrad: {0}, pointer:{1}, new pointer:{2}' , _backwrad, this._model.pointer(), _newpointer )); @@ -1070,7 +1146,7 @@

            File: ../comps/Slider/Slider.js

            }); JC.log( 'zzzzzzzzzz', _begin, this._itemspace, this._model.moveDirection() ); - _p._model.interval( easyEffect( function( _step, _done ){ + _p._model.interval( JC.f.easyEffect( function( _step, _done ){ //JC.log( _step ); $( _concat ).each(function( _ix, _item ){ _item.css( {'left': _item.data('TMP_LEFT') + (_isPlus? _step : -_step ) + 'px' } ); @@ -1151,7 +1227,16 @@

            File: ../comps/Slider/Slider.js

            Slider.init( document.body ); }); -}(jQuery)); + return JC.Slider; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_StepControl_StepControl.js.html b/docs_api/files/.._comps_StepControl_StepControl.js.html new file mode 100644 index 000000000..e481bf673 --- /dev/null +++ b/docs_api/files/.._comps_StepControl_StepControl.js.html @@ -0,0 +1,610 @@ + + + + + ../comps/StepControl/StepControl.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/StepControl/StepControl.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'JC.Valid' ], function(){
            +/**
            + * 组件用途简述
            + *
            + *<p><b>require</b>:
            + *   <a href="widnow.jQuery.html">jQuery</a>
            + *   , <a href='JC.Valid.html'>JC.Valid</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc2.openjavascript.org/docs_api/classes/JC.StepControl.html' target='_blank'>API docs</a>
            + *   | <a href='../../modules/JC.StepControl/0.1/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本脚本, 默认会处理 div class="js_compStepControl"</h2>
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt></dt>
            + *    <dd><dd>
            + *</dl> 
            + *
            + * @namespace   JC
            + * @class       StepControl
            + * @extends     JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-12-13
            + * @author  qiushaowei <suches@btbtd.org> | 75 Team
            + * @example
            +        <h2>JC.StepControl 示例</h2>
            + */
            +    var _jdoc = $( document ), _jwin = $( window );
            +
            +    JC.StepControl = StepControl;
            +
            +    function StepControl( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +
            +        if( JC.BaseMVC.getInstance( _selector, StepControl ) ) 
            +            return JC.BaseMVC.getInstance( _selector, StepControl );
            +
            +        JC.BaseMVC.getInstance( _selector, StepControl, this );
            +
            +        this._model = new StepControl.Model( _selector );
            +        this._view = new StepControl.View( this._model );
            +
            +        this._init();
            +
            +        JC.log( StepControl.Model._instanceName, 'all inited', new Date().getTime() );
            +    }
            +    /**
            +     * 初始化可识别的 StepControl 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of StepControlInstance}
            +     */
            +    StepControl.init =
            +        function( _selector ){
            +            var _r = [];
            +            _selector = $( _selector || document );
            +
            +            if( _selector.length ){
            +                if( _selector.hasClass( 'js_compStepControl' )  ){
            +                    _r.push( new StepControl( _selector ) );
            +                }else{
            +                    _selector.find( 'div.js_compStepControl' ).each( function(){
            +                        _r.push( new StepControl( this ) );
            +                    });
            +                }
            +            }
            +            return _r;
            +        };
            +
            +    JC.BaseMVC.build( StepControl );
            +
            +    JC.f.extendObject( StepControl.prototype, {
            +        _beforeInit:
            +            function(){
            +                //JC.log( 'StepControl _beforeInit', new Date().getTime() );
            +            }
            +
            +        , _initHanlderEvent:
            +            function(){
            +                var _p = this;
            +
            +                _p.on( 'inited', function(){
            +                    _p.trigger( 'show_index' );
            +                    _p._model.cscInitedCallback() 
            +                        && _p._model.cscInitedCallback().call( _p, _p.selector() );
            +                });
            +
            +                _p._model.cscItems().each( function( _ix, _item ){
            +                    _item = $( _item );
            +
            +                    _item.delegate( '.js_cscNext', 'click', function(){
            +                        var _trigger = $( this );
            +                        _p.trigger( 'next_index', [ _item, _trigger ] );
            +                    });
            +
            +                    _item.delegate( '.js_cscPrev', 'click', function(){
            +                        var _trigger = $( this );
            +                        _p.trigger( 'prev_index', [ _item, _trigger ] );
            +                    });
            +                });
            +
            +                _p.on( 'prev_index', function( _evt, _item, _sp ){
            +                    JC.log( 'prev_index', JC.f.ts() );
            +                    var _validCb = _p._model.cscValidCallback( _sp ) || _p._model.cscValidCallback( _item )
            +                        , _canNext
            +                        , _newIndex
            +                        ;
            +
            +                    _newIndex = _p._model.cscIndex() - 1;
            +                    if( _newIndex >= 0 ){
            +                        _p.trigger( 'show_index', [ _p._model.cscIndex( _newIndex ) ] );
            +                    }
            +                });
            +
            +                _p.on( 'next_index', function( _evt, _item, _sp ){
            +                    if( !( _item ) ) return;
            +                    JC.log( 'next_index', JC.f.ts() );
            +                    var _validCb = _p._model.cscValidCallback( _sp ) || _p._model.cscValidCallback( _item )
            +                        , _canNext
            +                        , _newIndex
            +                        , _form
            +                        ;
            +
            +                    if( _sp && ( _sp.attr( 'type' ).toLowerCase() == 'button' || _sp.attr( 'type' ).toLowerCase() == 'input' ) ){
            +                        if( _validCb ){
            +                            _canNext = _validCb().call( _p, _sp, _item );
            +                        }else{
            +                            _canNext = JC.Valid( _item );
            +                        }
            +                    }else{
            +                        _canNext = true;
            +                    }
            +
            +                    JC.log( '_canNext', _canNext, JC.f.ts() );
            +
            +                    if( !_canNext ) return;
            +                    _newIndex = _p._model.cscIndex() + 1;
            +                    JC.log( _newIndex, _p._model.maxIndex(), _p._model.cscIndex() );
            +
            +                    if( _newIndex <= _p._model.maxIndex() ){
            +                        _p.trigger( 'show_index', [ _p._model.cscIndex( _newIndex ) ] );
            +                    }
            +                });
            +
            +                _p.on( 'show_index', function( _evt, _cix ){
            +                    var _ix = _p._model.cscIndex()
            +                        , _items = _p._model.cscItems()
            +                        , _labels = _p._model.cscLabels()
            +                        ;
            +                    typeof _cix != 'undefined' && ( _ix = _cix );
            +
            +                    _items 
            +                        && _items.length 
            +                        && _items.hide().eq( _ix ).show();
            +
            +                    _labels 
            +                        && _labels.length 
            +                        && _labels.removeClass( _p._model.cscActiveClass() ).eq( _ix ).addClass( _p._model.cscActiveClass() );
            +                });
            +            }
            +
            +        , _inited:
            +            function(){
            +                //JC.log( 'StepControl _inited', new Date().getTime() );
            +                this.trigger( 'inited' );
            +            }
            +
            +        , prev:
            +            function(){
            +                var _p = this, _data = _p._model.current( '.js_cscPrev' );
            +
            +                if( _data.item ){
            +                    _p.trigger( 'prev_index', [ _data.item, _data.button ] );
            +                }
            +
            +                return this;
            +            }
            +
            +        , next:
            +            function(){
            +                var _p = this, _data = _p._model.current( '.js_cscNext' );
            +
            +                if( _data.item ){
            +                    _p.trigger( 'next_index', [ _data.item, _data.button ] );
            +                }
            +
            +                return this;
            +            }
            +
            +        , first:
            +            function(){
            +                this.trigger( 'show_index', [ this._model.cscIndex( 0 ) ] );
            +                return this;
            +            }
            +
            +        , last:
            +            function(){
            +                var _ix;
            +                this._model.cscItems() && this._model.cscItems().length 
            +                    && ( _ix = this._model.cscItems().length - 1 );
            +                typeof _ix != 'undefined' && this.trigger( 'show_index', [ this._model.cscIndex( _ix ) ] );
            +                return this;
            +            }
            +    });
            +
            +    StepControl.Model._instanceName = 'JCStepControl';
            +    JC.f.extendObject( StepControl.Model.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'StepControl.Model.init:', new Date().getTime() );
            +                var _p = this;
            +
            +                _p.cscIndex( _p.cscDefaultIndex() || 0 );
            +            }
            +
            +        , next:
            +            function(){
            +                var _p = this
            +                    , _ix = this.cscIndex() + 1
            +                    , _r = { item: null, label: null, button: null, selector: _p.selector() }
            +                    , _items = _p.cscItems()
            +                    , _labels = _p.cscLabels()
            +                    , _tmp
            +                    ;
            +
            +                if( _items[ _ix ] ){
            +                    _r.item = $( _items[ _ix ] );
            +                    _tmp = _r.item.find( '.js_cscNext' );
            +                    _tmp.length && ( _r.button = _tmp );
            +                }
            +
            +                _labels && _labels.length && _labels[ _ix ] 
            +                    && ( _r.label = $( _labels[ _ix ] ) );
            +
            +                return _r;
            +            }
            +
            +        , prev:
            +            function(){
            +                var _p = this
            +                    , _ix = this.cscIndex() - 1
            +                    , _r = { item: null, label: null, selector: _p.selector() }
            +                    , _items = _p.cscItems()
            +                    , _labels = _p.cscLabels()
            +                    ;
            +
            +                _items[ _ix ] && ( _r.item = $( _items[ _ix ] ) );
            +                _labels && _labels.length && _labels[ _ix ] 
            +                    && ( _r.label = $( _labels[ _ix ] ) );
            +
            +                return _r;
            +            }
            +
            +        , current:
            +            function( _btnSelector ){
            +                _btnSelector = _btnSelector || '.js_cscNext';
            +                var _p = this
            +                    , _ix = this.cscIndex()
            +                    , _r = { item: null, label: null, button: null, selector: _p.selector() }
            +                    , _items = _p.cscItems()
            +                    , _labels = _p.cscLabels()
            +                    , _tmp
            +                    ;
            +
            +                if( _items[ _ix ] ){
            +                    _r.item = $( _items[ _ix ] );
            +                    _tmp = _r.item.find( _btnSelector );
            +                    _tmp.length && ( _r.button = _tmp );
            +                }
            +
            +                _labels && _labels.length && _labels[ _ix ] 
            +                    && ( _r.label = $( _labels[ _ix ] ) );
            +
            +                return _r;
            +            }
            +
            +
            +        , maxIndex: 
            +            function(){ 
            +                var _r = this.cscItems().length - 1; 
            +                _r < 0 && ( _r = 0 );
            +                return _r;
            +            }
            +
            +        , cscIndex:
            +            function( _setter ){
            +                typeof _setter != 'undefined' && ( this._cscIndex = _setter );
            +                return this._cscIndex;
            +            }
            +        
            +        , cscValidCallback: 
            +            function( _selector ){
            +                if( !_selector ) return null;
            +                return this.callbackProp( _selector, 'cscValidCallback' );
            +            }
            +
            +        , cscInitedCallback: 
            +            function(){
            +                return this.callbackProp( 'cscInitedCallback' );
            +            }
            +
            +        , cscItems: function(){ return this.selectorProp( 'cscItems' ); }
            +        , cscLabels: function(){ return this.selectorProp( 'cscLabels' ); }
            +
            +        , cscActiveClass: function(){ return this.attrProp( 'cscActiveClass' ); }
            +
            +        , cscDefaultIndex: function(){ return this.intProp( 'cscDefaultIndex' ) || 0; }
            +    });
            +
            +    JC.f.extendObject( StepControl.View.prototype, {
            +        init:
            +            function(){
            +                //JC.log( 'StepControl.View.init:', new Date().getTime() );
            +            }
            +    });
            +
            +    _jdoc.ready( function(){
            +        setTimeout( function(){ StepControl.autoInit && StepControl.init(); }, 1 );
            +    });
            +
            +    return JC.StepControl;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +)
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Suggest_Suggest.js.html b/docs_api/files/.._comps_Suggest_Suggest.js.html index cafbba7e0..17c927e37 100644 --- a/docs_api/files/.._comps_Suggest_Suggest.js.html +++ b/docs_api/files/.._comps_Suggest_Suggest.js.html @@ -3,11 +3,17 @@ ../comps/Suggest/Suggest.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,11 +252,14 @@

            File: ../comps/Suggest/Suggest.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
                 window.Suggest = JC.Suggest = Suggest;
            +    JC.use && !window.JSON && JC.use( 'plugins.json2' );
                 /**
                  * Suggest 关键词补全提示类
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p>
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Suggest.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Suggest/_demo' target='_blank'>demo link</a></p>
            @@ -214,7 +289,7 @@ 

            File: ../comps/Suggest/Suggest.js

            * <br />{0}=关键词, {1}=回调名称 * </dd> * - * <dt>sugqueryinterval: int, default = 200</dt> + * <dt>sugqueryinterval: int, default = 300</dt> * <dd> * 设置用户输入内容时, 响应的间隔, 避免不必要的请求 * </dd> @@ -255,15 +330,19 @@

            File: ../comps/Suggest/Suggest.js

            * * <dt>sugprevententer: bool, default = false</dt> * <dd>回车时, 是否阻止默认事件, 为真将阻止表单提交事件</dd> + * + * <dt>sugIdSelector = selector</dt> + * <dd> + * 保存 id 的选择器( 只有关键词为 json格式的时候才会生效, { id: 'string', name: 'string' } ) + * </dd> * </dl> * @namespace JC * @class Suggest * @constructor * @param {selector|string} _selector - * @version dev 0.1 + * @version dev 0.2 * @author qiushaowei <suches@btbtd.org> | 75 Team - * @date 2013-08-11 - * @example + * @date 2014-09-17 */ function Suggest( _selector ){ _selector && ( _selector = $(_selector) ); @@ -271,14 +350,98 @@

            File: ../comps/Suggest/Suggest.js

            Suggest.getInstance( _selector, this ); Suggest._allIns.push( this ); - this._model = new Model( _selector ); - this._view = new View( this._model ); + this._model = new Suggest.Model( _selector ); + this._view = new Suggest.View( this._model ); this._init(); } + /** + * 获取或设置 Suggest 的实例 + * @method getInstance + * @param {selector} _selector + * @param {SuggestInstace|null} _setter + * @static + * @return {Suggest instance} + */ + Suggest.getInstance = + function( _selector, _setter ){ + return JC.BaseMVC.getInstance( _selector, Suggest, _setter ); + }; + /** + * 判断 selector 是否可以初始化 Suggest + * @method isSuggest + * @param {selector} _selector + * @static + * @return bool + */ + Suggest.isSuggest = + function( _selector ){ + var _r; + _selector + && ( _selector = $(_selector) ).length + && ( _r = _selector.is( '[sugurl]' ) || _selector.is( 'sugstaticdatacb' ) ); + return _r; + }; + /** + * 设置 Suggest 是否需要自动初始化 + * @property autoInit + * @type bool + * @default true + * @static + */ + Suggest.autoInit = true; + /** + * 自定义列表显示模板 + * @property layoutTpl + * @type string + * @default empty + * @static + */ + Suggest.layoutTpl = ''; + /** + * Suggest 返回列表的内容是否只使用 + * @property layoutTpl + * @type string + * @default empty + * @static + */ + Suggest.layoutTpl = ''; + /** + * 数据过滤回调 + * @property dataFilter + * @type function + * @default undefined + * @static + */ + Suggest.dataFilter; + /** + * 保存所有初始化过的实例 + * @property _allIns + * @type array + * @default [] + * @private + * @static + */ + Suggest._allIns = []; + /** + * 隐藏其他 Suggest 显示列表 + * @method _hideOther + * @param {SuggestInstance} _ins + * @private + * @static + */ + Suggest._hideOther = + function( _ins ){ + for( var i = 0, j = Suggest._allIns.length; i < j; i++ ){ + if( Suggest._allIns[i]._model._id != _ins._model._id ){ + Suggest._allIns[i].hide(); + } + } + }; + - Suggest.prototype = { - _init: + JC.f.extendObject( Suggest.prototype, { + _initHanlderEvent: function(){ var _p = this; @@ -332,6 +495,7 @@

            File: ../comps/Suggest/Suggest.js

            } this._view.update( _data ); + _p.trigger( 'sug_detect_id', _data ); } /** * 显示 Suggest @@ -383,21 +547,13 @@

            File: ../comps/Suggest/Suggest.js

            } }); - _p._model.selector().on('keyup', function( _evt ){ + _p._model.selector().on('keyup', function( _evt, _showPopup ){ var _sp = $(this) , _val = _sp.val().trim() , _keycode = _evt.keyCode , _ignoreTime = _sp.data('IgnoreTime') ; - if( _ignoreTime && ( new Date().getTime() - _ignoreTime ) < 300 ){ - //document.title = _ignoreTime; - return; - } - - - JC.log( 'keyup', _val, new Date().getTime(), _keycode ); - if( _keycode ){ switch( _keycode ){ case 38://up @@ -420,6 +576,7 @@

            File: ../comps/Suggest/Suggest.js

            if( !_val ){ _p.update(); + _p.trigger( 'update_id_selector' ); return; } @@ -430,29 +587,30 @@

            File: ../comps/Suggest/Suggest.js

            } } - if( _p._model.preValue === _val ){ + if( _p._model.preValue === _val && !_showPopup ){ return; } _p._model.preValue = _val; + if( _p._model.initValue ){ + _p._model.initValue = ''; + }else{ + !_showPopup && _p.trigger( 'update_id_selector' ); + } + if( _p._model.cache( _val ) ){ _p.update( _p._model.cache( _val ) ); return; } - JC.log( _val ); - if( _p._model.sugqueryinterval() ){ - if( _p._model.timeout ){ - clearTimeout( _p._model.timeout ); - } - _p._model.timeout = - setTimeout( function(){ - _p._model.getData( _val ); - }, _p._model.sugqueryinterval() ); + JC.f.safeTimeout( function(){ + _p._model.getData( _val ); + }, _p, 'clearSugInterval', _p._model.sugqueryinterval() ); }else{ _p._model.getData( _val ); } + }); _p._model.selector().on('blur', function( _evt ){ @@ -492,6 +650,12 @@

            File: ../comps/Suggest/Suggest.js

            } case 13://回车 { + var _tmpSelectedItem; + if( _p._model.layout().is( ':visible' ) + && ( _tmpSelectedItem = _p._model.layout().find( 'dd.active') ) && _tmpSelectedItem.length ){ + _p.trigger('SuggestSelected', [ _tmpSelectedItem, _p._model.getKeyword( _tmpSelectedItem ) ]); + } + _p.hide(); _sp.data( 'IgnoreTime', new Date().getTime() ); @@ -511,17 +675,71 @@

            File: ../comps/Suggest/Suggest.js

            _p.selector().on( 'click', function(_evt){ _evt.stopPropagation(); - _p.selector().trigger( 'keyup' ); + _p.selector().trigger( 'keyup', true ); Suggest._hideOther( _p ); }); + _p.on( 'SuggestSelected', function( _evt, _sp, _keyword ){ + _p._model.sugselectedcallback() && _p._model.sugselectedcallback().call( _p, _keyword ); + }); + $( _p._model.layout() ).delegate( '.js_sugItem', 'click', function(_evt){ var _sp = $(this), _keyword = _p._model.getKeyword( _sp ); _p.selector().val( _keyword ); _p.hide(); + + _p._model.preValue = _keyword; - _p.trigger('SuggestSelected', [_sp]); - _p._model.sugselectedcallback() && _p._model.sugselectedcallback().call( _p, _keyword ); + _p.trigger('SuggestSelected', [_sp, _keyword ]); + JC.f.safeTimeout( function(){ + _p.selector().trigger( 'blur' ); + }, null, 'SuggestItemClick', 300); + + _p.trigger( 'update_id_selector', [ _sp ] ); + }); + + _p.on( 'update_id_selector', function( _evt, _sp ){ + if( !( _p._model.idSelector() && _p._model.idSelector().length ) ) return; + + if( !_sp ){ + _p._model.idSelector().val( '' ); + }else{ + if( !_sp.is( '[data-id]' ) ) return; + _p._model.idSelector().val( _sp.data( 'id' ) ); + } + }); + + _p.on( 'sug_detect_id', function( _evt, _data ){ + if( !( _p._model.idSelector() && _p._model.idSelector().length ) ) return; + JC.dir( _data ); + if( !_data ) return; + var _q = _data.q, _find = []; + $.each( _data.s, function( _k, _item ){ + if( !$.isPlainObject( _item ) ) return; + if( _item.name === _q || _item.value === _q ){ + _find.push( _item ); + } + }); + JC.log( _find.length ); + if( !_find.length ) return; + if( _find.length > 1 ){ + if( _p._model.idSelector().val() ){ + var _hasItem; + $.each( _find, function( _k, _item ){ + if( _item.id == _p._model.idSelector().val() ){ + _hasItem = true; + return false; + } + }); + if( !_hasItem ){ + _p._model.idSelector().val( _find.first().id ); + } + }else{ + _p._model.idSelector().val( _find.first().id ); + } + }else{ + _p._model.idSelector().val( _find.first().id ); + } }); if( _p._model.sugautoposition() ){ @@ -532,104 +750,16 @@

            File: ../comps/Suggest/Suggest.js

            }); } } - } - /** - * 获取或设置 Suggest 的实例 - * @method getInstance - * @param {selector} _selector - * @param {SuggestInstace|null} _setter - * @static - * @return {Suggest instance} - */ - Suggest.getInstance = - function( _selector, _setter ){ - if( typeof _selector == 'string' && !/</.test( _selector ) ) - _selector = $(_selector); - if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return; - typeof _setter != 'undefined' && _selector.data( 'SuggestInstace', _setter ); - - return _selector.data('SuggestInstace'); - }; - /** - * 判断 selector 是否可以初始化 Suggest - * @method isSuggest - * @param {selector} _selector - * @static - * @return bool - */ - Suggest.isSuggest = - function( _selector ){ - var _r; - _selector - && ( _selector = $(_selector) ).length - && ( _r = _selector.is( '[sugurl]' ) || _selector.is( 'sugstaticdatacb' ) ); - return _r; - }; - /** - * 设置 Suggest 是否需要自动初始化 - * @property autoInit - * @type bool - * @default true - * @static - */ - Suggest.autoInit = true; - /** - * 自定义列表显示模板 - * @property layoutTpl - * @type string - * @default empty - * @static - */ - Suggest.layoutTpl = ''; - /** - * Suggest 返回列表的内容是否只使用 - * @property layoutTpl - * @type string - * @default empty - * @static - */ - Suggest.layoutTpl = ''; - /** - * 数据过滤回调 - * @property dataFilter - * @type function - * @default undefined - * @static - */ - Suggest.dataFilter; - /** - * 保存所有初始化过的实例 - * @property _allIns - * @type array - * @default [] - * @private - * @static - */ - Suggest._allIns = []; - /** - * 隐藏其他 Suggest 显示列表 - * @method _hideOther - * @param {SuggestInstance} _ins - * @private - * @static - */ - Suggest._hideOther = - function( _ins ){ - for( var i = 0, j = Suggest._allIns.length; i < j; i++ ){ - if( Suggest._allIns[i]._model._id != _ins._model._id ){ - Suggest._allIns[i].hide(); - } - } - }; + }); - function Model( _selector ){ - this._selector = _selector; - this._id = 'Suggest_' + new Date().getTime(); - } + JC.BaseMVC.build( Suggest ); + Suggest.Model._instanceName = 'SuggestInstace'; - Model.prototype = { + JC.f.extendObject( Suggest.Model.prototype, { init: function(){ + this._id = 'Suggest_' + new Date().getTime(); + this.initValue = this.selector().val().trim(); return this; } @@ -645,7 +775,7 @@

            File: ../comps/Suggest/Suggest.js

            function(){ var _p = this; !_p._layout && _p.selector().is('[suglayout]') - && ( _p._layout = parentSelector( _p.selector(), _p.selector().attr('suglayout') ) ); + && ( _p._layout = JC.f.parentSelector( _p.selector(), _p.selector().attr('suglayout') ) ); !_p._layout && ( _p._layout = $( _p.suglayouttpl() ) , _p._layout.hide() @@ -666,7 +796,7 @@

            File: ../comps/Suggest/Suggest.js

            , sugautoposition: function(){ this.layout().is('sugautoposition') - && ( this._sugautoposition = parseBool( this.layout().attr('sugautoposition') ) ); + && ( this._sugautoposition = JC.f.parseBool( this.layout().attr('sugautoposition') ) ); return this._sugautoposition; } @@ -718,17 +848,18 @@

            File: ../comps/Suggest/Suggest.js

            } , sugurl: function( _word ){ + _word = encodeURIComponent( _word ); this.selector().is('[sugurl]') && ( this._sugurl = this.selector().attr('sugurl') ); !this.selector().is('[sugurl]') && ( this._sugurl = '?word={0}&callback={1}' ); - this._sugurl = printf( this._sugurl, _word, this.sugdatacallback() ); + this._sugurl = JC.f.printf( this._sugurl, _word, this.sugdatacallback() ); return this._sugurl; } , sugneedscripttag: function(){ this._sugneedscripttag = true; this.selector().is('[sugneedscripttag]') - && ( this._sugneedscripttag = parseBool( this.selector().attr('sugneedscripttag') ) ); + && ( this._sugneedscripttag = JC.f.parseBool( this.selector().attr('sugneedscripttag') ) ); return this._sugneedscripttag; } , getData: @@ -737,7 +868,7 @@

            File: ../comps/Suggest/Suggest.js

            JC.log( _url, new Date().getTime() ); if( this.sugneedscripttag() ){ $( '#' + _scriptId ).remove(); - _script = printf( '<script id="{1}" src="{0}"><\/script>', _url, _scriptId ); + _script = JC.f.printf( '<script id="{1}" src="{0}"><\/script>', _url, _scriptId ); $( _script ).appendTo( document.body ); }else{ $.get( _url, function( _d ){ @@ -778,14 +909,14 @@

            File: ../comps/Suggest/Suggest.js

            function(){ this.selector().is('[sugqueryinterval]') && ( this._sugqueryinterval = parseInt( this.selector().attr('sugqueryinterval') ) ); - this._sugqueryinterval = this._sugqueryinterval || 200; + this._sugqueryinterval = this._sugqueryinterval || 300; return this._sugqueryinterval; } , sugprevententer: function(){ var _r; this.selector().is( '[sugprevententer]' ) - && ( _r = parseBool( this.selector().attr('sugprevententer') ) ) + && ( _r = JC.f.parseBool( this.selector().attr('sugprevententer') ) ) ; return _r; } @@ -843,16 +974,20 @@

            File: ../comps/Suggest/Suggest.js

            function(){ var _r = this.selector(); this.selector().is('[sugplaceholder]') - && ( _r = parentSelector( this.selector(), this.selector().attr('sugplaceholder') ) ); + && ( _r = JC.f.parentSelector( this.selector(), this.selector().attr('sugplaceholder') ) ); return _r; } - }; - - function View( _model ){ - this._model = _model; - } + + , idSelector: + function(){ + var _r; + this.is( '[sugIdSelector]' ) + && ( _r = JC.f.parentSelector( this.selector(), this.attrProp( 'sugIdSelector' ) ) ); + return _r; + } + }); - View.prototype = { + JC.f.extendObject( Suggest.View.prototype, { init: function() { return this; @@ -892,7 +1027,7 @@

            File: ../comps/Suggest/Suggest.js

            } , update: function( _data ){ - var _p = this, _ls = [], _query, _tmp, _text, _subtagname = _p._model.sugsubtagname(); + var _p = this, _ls = [], _query, _tmp, _text, _subtagname = _p._model.sugsubtagname(), _item; if( !( _data && _data.s && _data.s.length ) ){ _p.hide(); @@ -900,9 +1035,18 @@

            File: ../comps/Suggest/Suggest.js

            } for( var i = 0, j = _data.s.length; i < j; i++ ){ - _tmp = _data.s[i], _text = _tmp, _query = _data.q || ''; + _tmp = _data.s[i]; + var _itemData = []; + if( typeof _tmp === 'object' ){ + $.each( _tmp, function( _k, _sitem ){ + _itemData.push( JC.f.printf( 'data-{0}="{1}"', _k, encodeURIComponent( _sitem ) ) ); + }); + _tmp = _tmp.name || _tmp.value || _tmp.id; + } + _text = _tmp; + _query = _data.q || ''; - _text = _text.replace( _query, printf( '<b>{0}</b>', _query ) ); + _text = _text.replace( _query, JC.f.printf( '<b>{0}</b>', _query ) ); /* if( _tmp.indexOf( _query ) > -1 ){ _text = _text.slice( _query.length ); @@ -910,9 +1054,10 @@

            File: ../comps/Suggest/Suggest.js

            } else _query = ''; */ - _ls.push( printf('<{4} keyword="{2}" keyindex="{3}" class="js_sugItem">{1}</{4}>' + _ls.push( JC.f.printf('<{4} keyword="{2}" keyindex="{3}" class="js_sugItem" {5} >{1}</{4}>' , _query, _text, encodeURIComponent( _tmp ), i , _subtagname + , _itemData.join( ' ' ) )); } @@ -931,7 +1076,7 @@

            File: ../comps/Suggest/Suggest.js

            this._model.layout().find( '.js_sugItem' ).removeClass('active'); $(this).trigger( 'TriggerEvent', ['SuggestReset'] ); } - }; + }); /** * 初始化完后的事件 @@ -956,6 +1101,7 @@

            File: ../comps/Suggest/Suggest.js

            $(document).delegate( 'input[type=text]', 'focus', function( _evt ){ var _p = $(this), _ins = Suggest.getInstance( _p ); + if( _p.is( '[readonly]' ) || _p.is( '[disabled]' ) ) return; if( _ins || !Suggest.isSuggest( _p ) || !Suggest.autoInit ) return; JC.log( 'Suggest input fined:', _p.attr('name'), new Date().getTime() ); _ins = new Suggest( _p ); @@ -965,7 +1111,16 @@

            File: ../comps/Suggest/Suggest.js

            $('dl.js_sugLayout, div.js_sugLayout').hide(); }); -}(jQuery)); + return JC.Suggest; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_Tab_Tab.js.html b/docs_api/files/.._comps_Tab_Tab.js.html index 049642980..a8e7017b4 100644 --- a/docs_api/files/.._comps_Tab_Tab.js.html +++ b/docs_api/files/.._comps_Tab_Tab.js.html @@ -3,11 +3,17 @@ ../comps/Tab/Tab.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,17 +252,19 @@

            File: ../comps/Tab/Tab.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
                 window.Tab = JC.Tab = Tab;
            +    JC.f.addAutoInit && JC.f.addAutoInit( Tab );
                 /**
            -     * Tab 菜单类
            -     * <br />DOM 加载完毕后
            -     * , 只要鼠标移动到具有识别符的Tab上面, Tab就会自动初始化, 目前可识别: <b>.js_autoTab</b>( CSS class )
            -     * <br />需要手动初始化, 请使用: var ins = new JC.Tab( _tabSelector );
            +     * Tab 选项卡
            +     * <br />响应式初始化, 当鼠标移动到 Tab 时, Tab 会尝试自动初始化 class = "<b>.js_autoTab</b>" 的 HTML 标签
            +     * <br />需要手动初始化, 请使用: var _ins = new JC.Tab( _tabSelector );
            +     * <p><b>require</b>: 
            +     *      <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Tab.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Tab/_demo/' target='_blank'>demo link</a></p>
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a></p>
                  * <h2>Tab 容器的HTML属性</h2>
                  * <dl>
                  *      <dt>tablabels</dt>
            @@ -210,10 +284,16 @@ 

            File: ../comps/Tab/Tab.js

            * * <dt>tabchangecallback</dt> * <dd>当 tab label 变更时的回调</dd> + * + * <dt>tabQueryKey = url arg name</dt> + * <dd>从URL默认选中tab, value = tab index, index 从0开始</dd> + * + * <dt>tabTriggerDefault</dt> + * <dd>页面初始化完毕时,是否实例化,并初始化当前选中标签</dd> * </dl> * <h2>Label(标签) 容器的HTML属性(AJAX)</h2> * <dl> - * <dt>tabajaxurl</dt> + * <dt>tabAjaxUrl</dt> * <dd>ajax 请求的 URL 地址</dd> * * <dt>tabajaxmethod</dt> @@ -224,23 +304,38 @@

            File: ../comps/Tab/Tab.js

            * * <dt>tabajaxcallback</dt> * <dd>ajax 请求的回调</dd> + * + * <dt>tabIframeUrl</dt> + * <dd>iframe 显示的URL</dd> * </dl> * @namespace JC * @class Tab * @constructor * @param {selector|string} _selector 要初始化的 Tab 选择器 * @param {selector|string} _triggerTarget 初始完毕后要触发的 label - * @version dev 0.1 - * @author qiushaowei <suches@btbtd.org> | 360 75 Team - * @date 2013-07-04 + * @version dev 0.2, 2014-10-14, qiushaowei <suches@btbtd.org> | 360 75 Team + * @version dev 0.1, 2013-07-04, qiushaowei <suches@btbtd.org> | 360 75 Team * @example - <link href='../../../comps/Tab/res/default/style.css' rel='stylesheet' /> + <link href='../../../modules/JC.Tab/res/default/style.css' rel='stylesheet' /> <script src="../../../lib.js"></script> + <script src="../../../config.js"></script> <script> JC.debug = 1; - JC.use( 'Tab' ); - httpRequire(); + requirejs( [ 'JC.Tab' ], function(){ + JC.f.httpRequire(); + + JC.Tab.ajaxCallback = + function( _data, _label, _container ){ + _data && ( _data = $.parseJSON( _data ) ); + if( _data && _data.errorno === 0 ){ + _container.html( JC.f.printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) ); + }else{ + Tab.isAjaxInited( _label, 0 ); + _container.html( '<h2>内容加载失败!</h2>' ); + } + }; + }); function tabactive( _evt, _container, _tabIns ){ var _label = $(this); @@ -255,23 +350,10 @@

            File: ../comps/Tab/Tab.js

            JC.log( 'tab change: ', _label.html(), new Date().getTime() ); } - $(document).ready( function(){ - JC.Tab.ajaxCallback = - function( _data, _label, _container ){ - _data && ( _data = $.parseJSON( _data ) ); - if( _data && _data.errorno === 0 ){ - _container.html( printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) ); - }else{ - Tab.isAjaxInited( _label, 0 ); - _container.html( '<h2>内容加载失败!</h2>' ); - } - }; - }); - function ajaxcallback( _data, _label, _container ){ _data && ( _data = $.parseJSON( _data ) ); if( _data && _data.errorno === 0 ){ - _container.html( printf( '<h2>label attr ajaxcallback</h2>{0}', _data.data ) ); + _container.html( JC.f.printf( '<h2>label attr ajaxcallback</h2>{0}', _data.data ) ); }else{ Tab.isAjaxInited( _label, 0 ); _container.html( '<h2>内容加载失败!</h2>' ); @@ -311,10 +393,10 @@

            File: ../comps/Tab/Tab.js

            > <ul class="le-tabs js_tabLabel2"> <li class="active"><a href="javascript:">电视剧</a></li> - <li><a href="javascript:" tabajaxurl="data/test.php" tabajaxmethod="post" + <li><a href="javascript:" tabAjaxUrl="data/test.php" tabajaxmethod="post" tabajaxdata="{a:1,b:2}" tabajaxcallback="ajaxcallback" >电影</a></li> - <li><a href="javascript:" tabajaxurl="data/test.php" tabajaxcallback="ajaxcallback" >综艺</a></li> - <li><a href="javascript:" tabajaxurl="data/test.php" >热点</a></li> + <li><a href="javascript:" tabAjaxUrl="data/test.php" tabajaxcallback="ajaxcallback" >综艺</a></li> + <li><a href="javascript:" tabAjaxUrl="data/test.php" >热点</a></li> </ul> <div class="views js_tabContent2"> <div class="view-item active">1. 集地议送能拿距还杨雷火,永鲜提只风超洋轻绿动视落清各只江执口。</div> @@ -330,19 +412,19 @@

            File: ../comps/Tab/Tab.js

            _selector && ( _selector = $( _selector ) ); _triggerTarget && ( _triggerTarget = $( _triggerTarget) ); if( Tab.getInstance( _selector ) ) return Tab.getInstance( _selector ); + Tab.getInstance( _selector, this ); /** * Tab 模型类的实例 * @property _model * @type JC.Tab.Model * @private */ - this._model = new Model( _selector, _triggerTarget ); + this._model = new Tab.Model( _selector, _triggerTarget ); /** * Tab 视图类的实例 */ - this._view = new View( this._model ); + this._view = new Tab.View( this._model ); - JC.log( 'initing tab' ); this._init(); } /** @@ -379,11 +461,71 @@

            File: ../comps/Tab/Tab.js

            */ Tab.getInstance = function( _selector, _setter ){ + return JC.BaseMVC.getInstance( _selector, Tab, _setter ); + }; + Tab.triggerDefault = + function( _ins ){ + if( !( _ins && _ins._model && _ins._model.tablabels ) ){ + return _ins; + } + + var _queryKey = _ins._model.tabQueryKey(), _queryIx, _tmp; + if( _queryKey ){ + _queryIx = JC.f.getUrlParam( _queryKey ); + if( _queryIx ){ + _tmp = $( _ins._model.tablabels()[ _queryIx ] ); + if( _tmp && _tmp.length ){ + _tmp.trigger( _ins._model.activeEvent() ); + return _ins; + } + } + } + + _ins._model.tablabels().each( function(){ + var _sp = $( this ); + if( _sp.parent().hasClass( _ins._model.activeClass( _ins._model.tablabelparent( _sp ) ) ) ){ + _sp.trigger( _ins._model.activeEvent() ); + return false; + } + }); + return _ins + }; + /** + * 初始化可识别的 Tab 实例 + * @method init + * @param {selector} _selector + * @static + * @return {Array of TabInstance} + */ + Tab.init = + function( _selector ){ + var _r = [], _tmp; + _selector = $( _selector || document ); + + if( _selector && _selector.length ){ + if( _selector.hasClass( 'js_autoTab' ) || _selector.hasClass( 'js_compTab' ) ){ + _r.push( Tab.triggerDefault( new Tab( _selector ) ) ); + }else{ + _selector.find( 'div.js_autoTab, div.js_compTab' ).each( function(){ + _r.push( Tab.triggerDefault( new Tab( this ) ) ); + }); + } + } + return _r; + }; + /** + * 判断一个容器是否 符合 Tab 数据要求 + * @return bool + */ + Tab.selectorIsTab = + function( _selector ){ var _r; - _selector && ( _selector = $(_selector) ).length && ( - typeof _setter != 'undefined' && _selector.data('TabInstance', _setter) - , _r = _selector.data('TabInstance') - ); + _selector + && ( _selector = $( _selector ) ) + && _selector.length + && ( _selector.attr('tablabels') && _selector.attr('tabcontainers') ) + && ( _r = true ) + ; return _r; }; /** @@ -398,7 +540,7 @@

            File: ../comps/Tab/Tab.js

            function( _data, _label, _container, _textStatus, _jqXHR ){ _data && ( _data = $.parseJSON( _data ) ); if( _data && _data.errorno === 0 ){ - _container.html( printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) ); + _container.html( JC.f.printf( '<h2>JC.Tab.ajaxCallback</h2>{0}', _data.data ) ); }else{ Tab.isAjaxInited( _label, 0 ); _container.html( '<h2>内容加载失败!</h2>' ); @@ -424,7 +566,7 @@

            File: ../comps/Tab/Tab.js

            */ Tab.isAjax = function( _label ){ - return $(_label).attr('tabajaxurl'); + return $(_label).attr('tabAjaxUrl'); }; /** * 判断一个 ajax label 是否已经初始化过 @@ -446,111 +588,138 @@

            File: ../comps/Tab/Tab.js

            function( _label, _setter ){ _setter != 'undefined' && ( $(_label).data('TabAjaxInited', _setter ) ); return $(_label).data('TabAjaxInited'); - } - - Tab.prototype = { - /** - * Tab 内部初始化方法 - * @method _init - * @private - */ - _init: - function(){ - if( !this._model.layoutIsTab() ) return this; - Tab.getInstance( this._model.layout(), this ); - this._view.init(); - - var _triggerTarget = $(this._model.triggerTarget()); - _triggerTarget && _triggerTarget.length - && this._model.tablabel( _triggerTarget ) && _triggerTarget.trigger('click'); - - return this; - } - /** - * 把 _label 设置为活动状态 - * @method active - * @param {selector} _label - */ - , active: - function( _label ){ - var _ix; - if( typeof _label == 'number' ) _ix = _label; - else{ - _label && $(_label).length && ( _ix = this._model.tabindex( _label ) ); - } - - typeof _ix != 'undefined' && ( this._view.active( _ix ) ); - return this; + }; + /** + * @method isIframe + * @static + * @param {selector} _label + * @return {string|undefined} + */ + Tab.isIframe = + function( _label ){ + return $(_label).attr('tabIframeUrl'); + }; + /** + * 判断一个 iframe label 是否已经初始化过 + * <br /> 这个方法需要跟 Tab.isIframe 结合判断才更为准确 + * @method isIframeInited + * @static + * @param {selector} _label + * @param {bool} _setter 如果 _setter 不为空, 则进行赋值 + * @example + function tabactive( _evt, _container, _tabIns ){ + var _label = $(this); + JC.log( 'tab ', _evt.type, _label.html(), new Date().getTime() ); + if( JC.Tab.isIframe( _label ) && ! JC.Tab.isIframeInited( _label ) ){ + _container.html( '<h2>内容加载中...</h2>' ); } - } + } + */ + Tab.isIframeInited = + function( _label, _setter ){ + _setter != 'undefined' && ( $(_label).data('TabIframeInited', _setter ) ); + return $(_label).data('TabIframeInited'); + }; /** * Tab 数据模型类 - * @namespace JC.Tab - * @class Model - * @constructor * @param {selector|string} _selector 要初始化的 Tab 选择器 * @param {selector|string} _triggerTarget 初始完毕后要触发的 label */ - function Model( _selector, _triggerTarget ){ + Tab.Model = + function ( _selector, _triggerTarget ){ /** * Tab 的主容器 - * @property _layout * @type selector * @private */ - this._layout = _selector; + this._selector = _selector; /** * Tab 初始完毕后要触发的label, 可选 - * @property _triggerTarget * @type selector * @private */ this._triggerTarget = _triggerTarget; /** * Tab 的标签列表选择器 - * @property _tablabels * @type selector * @private */ this._tablabels; /** * Tab 的内容列表选择器 - * @property _tabcontainers * @type selector * @private */ this._tabcontainers; /** * 当前标签的所在索引位置 - * @property currentIndex * @type int */ this.currentIndex; - - this._init(); - } - - Model.prototype = { + }; + + JC.BaseMVC.build( Tab ); + + + JC.f.extendObject( Tab.prototype, { /** - * Tab Model 内部初始化方法 + * Tab 内部初始化方法 * @method _init * @private */ - _init: + _initHanlderEvent: + function(){ + var _p = this; + + _p.on( 'inited', function(){ + var _triggerTarget = $( this._model.triggerTarget() ); + _triggerTarget + && _triggerTarget.length + && this._model.tablabel( _triggerTarget ) && _triggerTarget.trigger( _p._model.activeEvent() ); + }); + } + /** + * 把 _label 设置为活动状态 + * @method active + * @param {selector} _label + */ + , active: + function( _label ){ + var _ix; + if( typeof _label == 'number' ) _ix = _label; + else{ + _label && $(_label).length && ( _ix = this._model.tabindex( _label ) ); + } + + typeof _ix != 'undefined' && ( this._view.active( _ix ) ); + return this; + } + , _inited: + function(){ + this.trigger( 'inited' ); + } + }); + + Tab.Model._instanceName = 'TabInstance' + + JC.f.extendObject( Tab.Model.prototype, { + /** + * Tab Model 内部初始化方法 + */ + init: function(){ - if( !this.layoutIsTab() ) return; var _p = this, _re = /^\~[\s]+/g; - if( _p.isFromChild( _p.layout().attr('tablabels') ) ){ - this._tablabels = _p.layout().find( _p.layout().attr('tablabels').replace( _re, '' ) ); + if( _p.isFromChild( _p.selector().attr('tablabels') ) ){ + this._tablabels = _p.selector().find( _p.selector().attr('tablabels').replace( _re, '' ) ); }else{ - this._tablabels = parentSelector( _p.layout(), _p.layout().attr('tablabels') ); + this._tablabels = JC.f.parentSelector( _p.selector(), _p.selector().attr('tablabels') ); } - if( _p.isFromChild( _p.layout().attr('tabcontainers') ) ){ - this._tabcontainers = _p.layout().find( _p.layout().attr('tabcontainers').replace( _re, '' ) ); + if( _p.isFromChild( _p.selector().attr('tabcontainers') ) ){ + this._tabcontainers = _p.selector().find( _p.selector().attr('tabcontainers').replace( _re, '' ) ); }else{ - this._tabcontainers = parentSelector( _p.layout(), _p.layout().attr('tabcontainers') ); + this._tabcontainers = JC.f.parentSelector( _p.selector(), _p.selector().attr('tabcontainers') ); } this._tablabels.each( function(){ _p.tablabel( this, 1 ); } ); @@ -559,22 +728,20 @@

            File: ../comps/Tab/Tab.js

            return this; } + , tabQueryKey: + function(){ + var _r = this.attrProp( 'tabQueryKey' ) || ''; + return _r; + } /** - * 判断是否从 layout 下查找内容 + * 判断是否从 selector 下查找内容 */ , isFromChild: function( _selector ){ return /^\~/.test( $.trim( _selector ) ); } - /** - * 获取 Tab 的主容器 - * @method layout - * @return selector - */ - , layout: function(){ return this._layout; } /** * 获取 Tab 所有 label 或 特定索引的 label - * @method tablabels * @param {int} _ix * @return selector */ @@ -584,7 +751,6 @@

            File: ../comps/Tab/Tab.js

            } /** * 获取 Tab 所有内容container 或 特定索引的 container - * @method tabcontainers * @param {int} _ix * @return selector */ @@ -594,31 +760,22 @@

            File: ../comps/Tab/Tab.js

            } /** * 获取初始化要触发的 label - * @method triggerTarget * @return selector */ , triggerTarget: function(){ return this._triggerTarget; } - /** - * 判断一个容器是否 符合 Tab 数据要求 - * @method layoutIsTab - * @return bool - */ - , layoutIsTab: function(){ return this.layout().attr('tablabels') && this.layout().attr('tabcontainers'); } /** * 获取 Tab 活动状态的 class - * @method activeClass * @return string */ - , activeClass: function(){ return this.layout().attr('tabactiveclass') || Tab.activeClass; } + , activeClass: function(){ return this.selector().attr('tabactiveclass') || Tab.activeClass; } /** * 获取 Tab label 的触发事件名称 * @method activeEvent * @return string */ - , activeEvent: function(){ return this.layout().attr('tabactiveevent') || Tab.activeEvent; } + , activeEvent: function(){ return this.selector().attr('tabactiveevent') || Tab.activeEvent; } /** * 判断 label 是否符合要求, 或者设置一个 label为符合要求 - * @method tablabel * @param {bool} _setter * @return bool */ @@ -631,7 +788,6 @@

            File: ../comps/Tab/Tab.js

            } /** * 判断 container 是否符合要求, 或者设置一个 container为符合要求 - * @method tabcontent * @param {selector} _content * @param {bool} _setter * @return bool @@ -645,7 +801,6 @@

            File: ../comps/Tab/Tab.js

            } /** * 获取或设置 label 的索引位置 - * @method tabindex * @param {selector} _label * @param {int} _setter * @return int @@ -659,57 +814,57 @@

            File: ../comps/Tab/Tab.js

            } /** * 获取Tab label 触发事件后的回调 - * @method tabactivecallback * @return function */ , tabactivecallback: function(){ var _r; - this.layout().attr('tabactivecallback') && ( _r = window[ this.layout().attr('tabactivecallback') ] ); + this.selector().attr('tabactivecallback') && ( _r = window[ this.selector().attr('tabactivecallback') ] ); return _r; } /** * 获取 Tab label 变更后的回调 - * @method tabchangecallback * @return function */ , tabchangecallback: function(){ var _r; - this.layout().attr('tabchangecallback') && ( _r = window[ this.layout().attr('tabchangecallback') ] ); + this.selector().attr('tabchangecallback') && ( _r = window[ this.selector().attr('tabchangecallback') ] ); return _r; } /** * 获取 Tab label 活动状态显示样式的标签 - * @method tablabelparent * @param {selector} _label * @return selector */ , tablabelparent: function( _label ){ var _tmp; - this.layout().attr('tablabelparent') - && ( _tmp = _label.parent( this.layout().attr('tablabelparent') ) ) + this.selector().attr('tablabelparent') + && ( _tmp = _label.parent( this.selector().attr('tablabelparent') ) ) && _tmp.length && ( _label = _tmp ); return _label; } /** * 获取 ajax label 的 URL - * @method tabajaxurl * @param {selector} _label * @return string */ - , tabajaxurl: function( _label ){ return _label.attr('tabajaxurl'); } + , tabAjaxUrl: function( _label ){ return _label.attr('tabAjaxUrl'); } + /** + * 获取 iframe label 的 URL + * @param {selector} _label + * @return string + */ + , tabIframeUrl: function( _label ){ return _label.attr('tabIframeUrl'); } /** * 获取 ajax label 的请求方法 get/post - * @method tabajaxmethod * @param {selector} _label * @return string */ , tabajaxmethod: function( _label ){ return (_label.attr('tabajaxmethod') || 'get').toLowerCase(); } /** * 获取 ajax label 的请求数据 - * @method tabajaxdata * @param {selector} _label * @return object */ @@ -723,7 +878,6 @@

            File: ../comps/Tab/Tab.js

            } /** * 获取 ajax label 请求URL后的回调 - * @method tabajaxcallback * @param {selector} _label * @return function */ @@ -733,34 +887,17 @@

            File: ../comps/Tab/Tab.js

            _label.attr('tabajaxcallback') && ( _tmp = window[ _label.attr('tabajaxcallback') ] ) && ( _r = _tmp ); return _r; } - }; - /** - * Tab 视图模型类 - * @namespace JC.Tab - * @class View - * @constructor - * @param {JC.Tab.Model} _model - */ - function View( _model ){ - /** - * Tab 数据模型类实例引用 - * @property _model - * @type {JC.Tab.Model} - * @private - */ - this._model = _model; - } - - View.prototype = { + }); + + JC.f.extendObject( Tab.View.prototype, { /** * Tab 视图类初始化方法 - * @method init */ init: function() { - JC.log( 'Tab.View:', new Date().getTime() ); var _p = this; - this._model.tablabels().on( this._model.activeEvent(), function( _evt ){ + //JC.log( _p._model.activeEvent(), JC.f.ts() ); + this._model.tablabels().on( _p._model.activeEvent(), function( _evt ){ var _sp = $(this), _r; if( typeof _p._model.currentIndex !== 'undefined' && _p._model.currentIndex === _p._model.tabindex( _sp ) ) return; @@ -776,7 +913,6 @@

            File: ../comps/Tab/Tab.js

            } /** * 设置特定索引位置的 label 为活动状态 - * @method active * @param {int} _ix */ , active: @@ -797,10 +933,10 @@

            File: ../comps/Tab/Tab.js

            if( _r === false ) return; _p.activeAjax( _ix ); + _p.activeIframe( _ix ); } /** * 请求特定索引位置的 ajax tab 数据 - * @method activeAjax * @param {int} _ix */ , activeAjax: @@ -808,14 +944,9 @@

            File: ../comps/Tab/Tab.js

            var _p = this, _label = _p._model.tablabels( _ix ); if( !Tab.isAjax( _label ) ) return; if( Tab.isAjaxInited( _label ) ) return; - var _url = _p._model.tabajaxurl( _label ); + var _url = _p._model.tabAjaxUrl( _label ); if( !_url ) return; - JC.log( _p._model.tabajaxmethod( _label ) - , _p._model.tabajaxdata( _label ) - , _p._model.tabajaxcallback( _label ) - ); - Tab.isAjaxInited( _label, 1 ); $[ _p._model.tabajaxmethod( _label ) ]( _url, _p._model.tabajaxdata( _label ), function( _r, _textStatus, _jqXHR ){ @@ -825,21 +956,57 @@

            File: ../comps/Tab/Tab.js

            !_p._model.tabajaxcallback( _label ) && _p._model.tabcontainers( _ix ).html( _r ); }); } - }; + /** + * 请求特定索引位置的 ajax tab 数据 + * @param {int} _ix + */ + , activeIframe: + function( _ix ){ + var _p = this, _label = _p._model.tablabels( _ix ); + if( !Tab.isIframe( _label ) ) return; + if( Tab.isIframeInited( _label ) ) return; + var _url = _p._model.tabIframeUrl( _label ); + if( !_url ) return; + + Tab.isIframeInited( _label, 1 ); + + _p._model.tabcontainers( _ix ).attr( 'src', _url ); + } + + }); /** * 自动化初始 Tab 实例 * 如果 Tab.autoInit = true, 鼠标移至 Tab 后会自动初始化 Tab */ - $(document).delegate( '.js_autoTab', 'mouseover', function( _evt ){ + $(document).delegate( '.js_autoTab, .js_compTab', 'mouseover', function( _evt ){ if( !Tab.autoInit ) return; var _p = $(this), _tab, _src = _evt.target || _evt.srcElement; if( Tab.getInstance( _p ) ) return; _src && ( _src = $(_src) ); - JC.log( new Date().getTime(), _src.prop('nodeName') ); _tab = new Tab( _p, _src ); }); -}(jQuery)); + $( document ).ready( function(){ + $( 'div.js_autoTab[tabTriggerDefault], div.js_compTab[tabTriggerDefault]' ).each( function(){ + var _p = $( this ) + , _ins = JC.BaseMVC.getInstance( _p, JC.Tab ) + ; + if( !_ins ){ + Tab.triggerDefault( new Tab( _p ) ); + } + }); + }); + + return JC.Tab; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_TableFreeze_TableFreeze.js.html b/docs_api/files/.._comps_TableFreeze_TableFreeze.js.html new file mode 100644 index 000000000..c43534a23 --- /dev/null +++ b/docs_api/files/.._comps_TableFreeze_TableFreeze.js.html @@ -0,0 +1,1165 @@ + + + + + ../comps/TableFreeze/TableFreeze.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../comps/TableFreeze/TableFreeze.js

            + +
            +
            + ;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC' ], function(){
            +
            +//Todo: IE下resize,缩小窗口时tr的高度每一行隔了一像素。
            +//Todo: 鼠标hover效果性能优化
            +
            +/**
            + * TableFreeze 表格固定指定列功能
            + *
            + *<p><b>require</b>:
            + *   <a href='JC.BaseMVC.html'>JC.BaseMVC</a>
            + *</p>
            + *
            + *<p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + *   | <a href='http://jc.openjavascript.org/docs_api/classes/JC.TableFreeze.html' target='_blank'>API docs</a>
            + *   | <a href='../../comps/TableFreeze/_demo' target='_blank'>demo link</a></p>
            + *  
            + *<h2>页面只要引用本文件, 默认会自动初始化div为class="js_compTableFreeze"下的表格</h2>
            + *<p>目前不支持带有tfooter的表格。如果表格带有tfooter,tfooter部分的内容会被清空</p>
            + *<p></p>
            + *
            + *
            + *<h2>可用的 HTML attribute</h2>
            + *
            + *<dl>
            + *    <dt>freezeType = string</dt>
            + *    <dd>
            + *       声明表格列冻结的类型:
            + *       <p><b>prev:</b>左边的列固定,其他滚动</p>
            + *       <p><b>next:</b>右边的列固定,其他滚动</p>
            + *       <p><b>both:</b>两边的列固定,其他滚动</p>
            + *    </dd>
            + *
            + *    <dt>freezeCol = string</dt>
            + *    <dd>
            + *        声明表格要冻结的列数:
            + *        <p>为<b>0:</b>全部滚动,不冻结</p>
            + *        <p>为<b>列表数目:</b>全部冻结, 不滚动</p>
            + *        <p>为<b>num,num:</b>freezeType为<b>both</b>时,第一个数字表示前面冻结的列数<br/>
            + *          第二个数字表示后面冻结的列数。<br/>
            + *           当两个数字加起来等于列数时,表示全部冻结,不会出现有滚动的列。
            + *        </p>
            + *    </dd>
            + *
            + *    <dt>scrollWidth = num</dt>
            + *    <dd>
            + *        声明表格滚动部分的宽度,默认120%
            + *    </dd>
            + *
            + *    <dt>needHoverClass = true|false</dt>
            + *    <dd>
            + *        声明表格行是否需要鼠标hover高亮效果:
            + *        <p>默认值为true</p>
            + *    </dd>
            + *
            + *    <dt>alternateClass = string</dt>
            + *    <dd>
            + *        声明表格索引值为奇数行的背景色的className: (表格行隔行换色)
            + *        <p>如果为空则不指定隔行背景色</p>
            + *    </dd>
            + *
            + *    <dt>beforeCreateTableCallback = function</dt>
            + *    <dd>
            + *        表格创建前, 触发的回调, <b>window 变量域</b>
            +<pre>function beforeCreateTableCallback( _selector ){
            +    var _ins = this;
            +    JC.log( 'beforeCreateTableCallback', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *
            + *    <dt>afterCreateTableCallback = function</dt>
            + *    <dd>
            + *        表格创建后, 触发的回调, <b>window 变量域</b>
            +<pre>function afterCreateTableCallback( _selector ){
            +    var _ins = this;
            +    JC.log( 'afterCreateTableCallback', new Date().getTime() );
            +}</pre>
            + *    </dd>
            + *</dl> 
            + *
            + * @namespace JC
            + * @class TableFreeze
            + * @extends JC.BaseMVC
            + * @constructor
            + * @param   {selector|string}   _selector   
            + * @version dev 0.1 2013-11-25
            + * @author  zuojing   <zuojing1013@gmail.com> | 75 Team
            + * @example
            +        <script>
            +            JC.debug = true;
            +            JC.use('TableFreeze');
            +        </script>
            +        <dl class="defdl">
            +            <dt>TableFreeze example</dt>
            +            <dd>
            +                <dl>
            +                    <dd>
            +                        <div class="js_compTableFreeze" freezeType="prev" freezeCols="2" />
            +                            <dl>
            +                                <dd>
            +                                    <table >
            +                                        <thead>
            +                                            <tr>
            +                                                <th > 
            +                                                    item0
            +                                                </th>
            +                                                <th >
            +                                                    item1
            +                                                </th>
            +                                                <th >
            +                                                    item2
            +                                                </th>
            +                                                <th >
            +                                                    item3
            +                                                </th>
            +                                                <th >
            +                                                    item4
            +                                                </th>
            +                                            </tr>
            +                                        </thead>
            +                                        <tbody>
            +                                            <tr>
            +                                                <td rowspan="3">
            +                                                    col01
            +                                                </td>
            +                                                <td class="breaklw" >
            +                                                    我的我的我的我的我的我的我的我的我的
            +                                                </td>
            +                                                <td rowspan="2" colspan="2">
            +                                                    col02
            +                                                </td>
            +                                                
            +                                                <td>
            +                                                    col04
            +                                                </td>
            +
            +                                            </tr>
            +                                            <tr>
            +                                                <td >
            +                                                    col11
            +                                                </td>
            +                                                
            +                                                <td >
            +                                                    col14
            +                                                </td>
            +                                            </tr>
            +                                              <tr>
            +                                               
            +                                                <td>
            +                                                    col21
            +                                                </td>
            +                                                 <td colspan="3">
            +                                                    col22
            +                                                </td>
            +                                            </tr>
            +                                            <tr>
            +                                                <td>
            +                                                    col30
            +                                                </td>
            +                                                <td rowspan="2">
            +                                                    col31
            +                                                </td>
            +                                                 <td>
            +                                                    col32
            +                                                </td>
            +                                                 <td>
            +                                                    col33
            +                                                </td>
            +                                                <td rowspan="2">
            +                                                    col34
            +                                                </td>
            +                                            </tr>
            +                                            <tr>
            +                                                <td>
            +                                                    col40
            +                                                </td>
            +                                                
            +                                                 <td>
            +                                                    col42
            +                                                </td>
            +                                                 <td>
            +                                                    col43
            +                                                </td>
            +                                            </tr>
            +                                            
            +                                        </tbody>
            +                                    </table>
            +                                </dd>
            +                            </dl>
            +                        </div>
            +                    <dd>
            +                </dl>
            +            </dd>
            +        </dl>
            + */
            +    JC.TableFreeze = TableFreeze;
            +    JC.f.addAutoInit && JC.f.addAutoInit( TableFreeze );
            + 
            +    function TableFreeze( _selector ){
            +        _selector && ( _selector = $( _selector ) );
            +        
            +        if( TableFreeze.getInstance( _selector ) ) return TableFreeze.getInstance( _selector );
            +        TableFreeze.getInstance( _selector, this );
            +        //JC.log( TableFreeze.Model._instanceName );
            + 
            +        this._model = new TableFreeze.Model( _selector );
            +        this._view = new TableFreeze.View( this._model );
            + 
            +        this._init();
            + 
            +        //JC.log( 'TableFreeze:', new Date().getTime() );
            +    }
            +    /**
            +     * 获取或设置 TableFreeze 的实例
            +     * @method  getInstance
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {TableFreezeInstance}
            +     */
            +    TableFreeze.getInstance = function ( _selector, _setter ) {
            +        if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            +            _selector = $(_selector);
            +        if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            +        typeof _setter != 'undefined' && _selector.data( TableFreeze.Model._instanceName, _setter );
            +
            +        return _selector.data( TableFreeze.Model._instanceName );
            +    };
            +    /**
            +     * 初始化可识别的 TableFreeze 实例
            +     * @method  init
            +     * @param   {selector}      _selector
            +     * @static
            +     * @return  {Array of TableFreezeInstance}
            +     */
            +    TableFreeze.init = function ( _selector ) {
            +        var _r = [];
            +        
            +        _selector = $( _selector || document );
            +
            +        if ( _selector.length ) {
            +            if ( _selector.hasClass('js_compTableFreeze') ) {
            +                _r.push( new TableFreeze(_selector) );
            +            } else {
            +                _selector.find('div.js_compTableFreeze').each( function() {
            +                    _r.push( new TableFreeze( this ) );
            +                });
            +            }
            +        }
            +        
            +        return _r;
            +    };
            +
            +    BaseMVC.build( TableFreeze );
            +
            +    JC.f.extendObject( TableFreeze.prototype, {
            +        _beforeInit: function () {
            +            var _p = this,
            +                _table = _p._model.selector().find('>table');
            +            /**
            +             *为了解决ie6下表格的宽度超出父容器的宽度,父容器的宽度会跟随表格的宽度
            +            */
            +            _p._model.alternateClass() && (_table.find('>tbody>tr:odd').addClass(_p._model.alternateClass()));
            +            _p._model.sourceTable = _table.clone();
            +            _p._model.initcolnumWidth = _p._model.colnumWidth(_table);
            +            _p._model.needProcess() && _table.detach();
            +            _p._model.initWidth = _p._model.selector().width();
            +            _p._model.tempWidth = _p._model.initWidth;
            +        },
            +
            +        _initHanlderEvent: function () {
            +            var _p = this,
            +                _hoverClass;
            +
            +            _p._model.beforeCreateTableCallback()
            +                    && _p._model.beforeCreateTableCallback().call( _p, _p.selector() );
            +                    
            +            _p._view.update();
            +
            +            _p._model.afterCreateTableCallback()
            +                    && _p._model.afterCreateTableCallback().call( _p, _p.selector() );
            +
            +            if ( _p._model.needHoverClass() ) {
            +                _p._model.selector().addClass('needHoverClass');
            +                
            +                if ( _p._model.needProcess() ) {
            +                    //_hoverClass = _p._model.hoverClass();
            +                    _hoverClass = "compTFHover";
            +                    //.js-fixed-table>table>tbody>tr,.js-roll-table>table>tbody>tr
            +                    $(document)
            +                        .delegate('tbody .CTF', 'mouseenter', function () {
            +                            var _sp = $(this),
            +                                _item = 'tbody .' + _sp.attr('data-ctf'),
            +                                _trs = _sp.parents('.js_compTableFreeze').find(_item);
            +                                
            +                            _trs.addClass(_hoverClass).attr('status', '1'); 
            +
            +                        } )
            +                        .delegate('tbody .CTF', 'mouseleave', function () {
            +                            var _sp = $(this),
            +                                _item = 'tbody .' + _sp.attr('data-ctf'),
            +                                _trs = _sp.parents('.js_compTableFreeze').find(_item);
            +
            +                            _trs.removeClass(_hoverClass); 
            +                            
            +                        });
            +
            +                }
            +
            +            }
            +        }, 
            +
            +        _inited: function () {
            +            JC.log('TableFreeze inited', new Date().getTime());
            +        },
            +
            +        update: function () {
            +            var _p = this,
            +                _selector = _p._model.selector(),
            +                _currentWidth = _selector.width(),
            +                _trs = _selector.find('.js-fixed-table>table>thead>tr,.js-fixed-table>table>tbody>tr,.js-roll-table>table>thead>tr,.js-roll-table>table>tbody>tr');
            +
            +            ( _currentWidth > _p._model.tempWidth ) && _trs.height('auto');
            +            _p._view.fixHeight();
            +        }
            +        
            +    });
            + 
            +    TableFreeze.Model._instanceName = "TableFreeze";
            +   
            +    JC.f.extendObject( TableFreeze.Model.prototype, {
            +        init: function () {
            +        },
            +
            +        sourceTable: '',
            +
            +        initcolnumWidth: [],
            +
            +        initWidth: 0,
            +
            +        tempWidth: 0,
            +        
            +        /**
            +         * 冻结类型:prev, both, last; 默认为prev
            +         */
            +        freezeType: function () {
            +            var _r = this.stringProp('freezeType') || 'prev' 
            +
            +            !( _r === 'prev' || _r === 'both' || _r === 'last' ) && ( _r = 'prev' );
            +
            +            return _r;
            +        },
            +
            +        /**
            +         * 冻结列数:num,num 默认为1
            +         */
            +        freezeCols: function () {
            +            var _p = this,
            +                _r = _p.attrProp('freezeCols'),
            +                _type = _p.freezeType(),
            +                _t = [];
            +
            +            if ( !_r ) {
            +                ( _type !== 'both' ) && ( _r = 1 );
            +                ( _type === 'both' ) && ( _r =  [1, 1] );
            +               return _r;
            +            }
            +            
            +            _t = _r.split(',');
            +            _t[0] = + _t[0];
            +            _t[1] = + _t[1];
            +
            +            if ( _type === 'both' ) {
            +                if ( _t[0] === 0 && _t[1] === 0 ) {
            +                    _r = 0;
            +                } else {
            +                    _r = _t.slice();
            +                }
            +            } else {
            +                _r = _t[0];
            +            }
            +
            +            return _r
            +        },
            +
            +        /**
            +         * 滚动区域的宽度默认120%
            +         */
            +        scrollWidth: function () {
            +            var _r = this.attrProp('scrollWidth');
            +
            +            !_r && ( _r = '120%' );
            +
            +            return _r;
            +        },
            +
            +        /**
            +         * tr 是否需要hover效果,默认为true
            +         */
            +        needHoverClass: function () {
            +            var _r = this.boolProp('needHoverClass');
            +
            +            ( typeof _r === 'undefined' ) && ( _r = true );
            +
            +            return _r;
            +        },
            +        
            +        // hoverClass: function () {
            +        //     var _r = this.attrProp('hoverClass');
            +
            +        //     ( !_r ) && ( _r = 'compTFHover');
            +
            +        //     return _r;
            +        // },
            +
            +        /**
            +         * tr的隔行换色
            +         */
            +        alternateClass: function () {
            +            var _r = this.attrProp('alternateClass');
            +
            +            return _r;
            +        },
            +
            +        colnum: function () {
            +            var _table = this.sourceTable,
            +                _tr = _table.find('tr:eq(0)'),
            +                _col = _tr.find('>th, >td'),
            +                _r = _col.length;
            +
            +            _col.each( function () {
            +                var _sp = $(this),
            +                    _colspan = _sp.prop('colspan');
            +
            +                ( _sp.prop('colspan') ) && ( _r += ( _colspan - 1 ) );
            +                
            +            } );
            +
            +            return _r;
            +        },
            +
            +        colnumWidth: function ( _table ) {
            +            var _tr = _table.find('tr:eq(0)'),
            +                _col = _tr.find('>th, >td'),
            +                _r = [];
            +
            +            _col.each( function () {
            +                _r.push( $(this).prop('offsetWidth') );
            +            } );
            +
            +            return _r;
            +        },
            +
            +        trElement: function ( _table ) {
            +            var _thead = _table.find('>thead'),
            +                _tbody = _table.find('>tbody'),
            +                _theadTr,
            +                _tbodyTr;
            +
            +            if ( _thead.length ) {
            +                _theadTr = _thead.find('>tr');
            +            } else {
            +                _theadTr = _table.find('>tr:eq(0)');
            +            }
            +
            +            if ( _tbody.length ) {
            +                _tbodyTr = _tbody.find('>tr');
            +            } else {
            +                _tbodyTr = _table.find('>tr:gt(0)');
            +            }
            +
            +            return {
            +                theadTr: _theadTr,
            +                tbodyTr: _tbodyTr
            +            }
            +
            +        },
            +
            +        needProcess: function () {
            +            
            +            //Todo: 正则判断freezeCols的值是否合法
            +
            +            var _p = this,
            +                _freezeCols = _p.freezeCols(),
            +                _freezeType = _p.freezeType(),
            +                _selector = _p.selector(),
            +                //_table = _p.selector().find('>table'),
            +                _table = _p.sourceTable,
            +                _r = true;
            +
            +            if ( _table.find('tr').length === 0 ) {
            +                return false;
            +            }
            +
            +            //全部滚动,在这里处理滚动有耦合
            +            if ( _freezeCols === 0 ) {
            +                _selector.css('overflow-x', 'auto')
            +                    .find('>table').css('width', _p.scrollWidth());
            +                return false;
            +            }
            +
            +            //全部冻结
            +            if ( _freezeType === 'both' && ( _freezeCols[0] + _freezeCols[1] >= _p.colnum() ) ) {
            +                return false;
            +            }
            +
            +            return _r;
            +        },
            +
            +        layout: function ( _freezeType ) {
            +            var _sourceTable = this.sourceTable,
            +                _tableObj = $(_sourceTable[0].cloneNode(false)),
            +                _theadObj = $(_sourceTable.find('thead')[0].cloneNode(false)),
            +                _tbodyObj = $(_sourceTable.find('tbody')[0].cloneNode(false)),
            +                _leftClass = '',
            +                _rightClass = '',
            +                _midClass = '',
            +                _secondTempTpl,
            +                _thirdTempTpl,
            +                _tpl;
            +
            +            switch ( _freezeType ) {
            +                case 'last':
            +                    _leftClass = "js-roll-table compTFLastRoll";
            +                    _rightClass = "js-fixed-table compTFLastFixed";
            +                    break;
            +
            +                case 'both':
            +                    _leftClass = "js-fixed-table compTFBothFixed";
            +                    _rightClass = "js-fixed-table compTFBothFixed";
            +                    _midClass = "js-roll-table compTFBothRoll";
            +                    break;
            +
            +                case 'prev':
            +                default:
            +                    _leftClass = "js-fixed-table compTFPrevFixed";
            +                    _rightClass = "js-roll-table compTFPrevRoll";
            +            }
            +            
            +            _theadObj.html('{0}').appendTo(_tableObj);
            +            _tbodyObj.html('{1}').appendTo(_tableObj);
            +            _secondTempTpl = _tableObj.clone().find('thead').html("{2}").end().find('tbody').html("{3}").end();
            +            if ( !_midClass ) {
            +                _tpl = '<div class="' + _leftClass + '">' + _tableObj[0].outerHTML +'</div>'
            +                     + '<div class="' + _rightClass + '">' + _secondTempTpl[0].outerHTML + '</div>';
            +            } else {
            +                _thirdTempTpl = _tableObj.clone().find('thead').html("{4}").end().find('tbody').html("{5}").end();
            +                _tpl = '<div class="' + _leftClass + '">' + _tableObj[0].outerHTML + '</div>'
            +                     + '<div class="' + _midClass + '">' + _secondTempTpl[0].outerHTML + '</div>'
            +                     + '<div class="' + _rightClass + '">' + _thirdTempTpl[0].outerHTML +  '</div>';
            +            }
            +            
            +            return _tpl;
            +        },
            +
            +        creatTpl: function () {
            +            var _p = this,
            +                _table = _p.sourceTable,
            +                _freezeType = _p.freezeType(),
            +                _freezeCols = _p.freezeCols(),
            +                _colNum = _p.colnum(),
            +                _trElement = _p.trElement(_table),
            +                _theadTr = _trElement.theadTr,
            +                _tbodyTr = _trElement.tbodyTr,
            +                _headerTr = _p.getTpl(_freezeType, _freezeCols, _theadTr, _colNum),
            +                _bodyTr = _p.getTpl(_freezeType, _freezeCols, _tbodyTr, _colNum),
            +                _layout = _p.layout(_freezeType),
            +                _tpl;
            +
            +            switch ( _freezeType ) {
            +                case 'both': 
            +                    {   
            +                        _tpl = JC.f.printf(_layout, _headerTr.leftTr, _bodyTr.leftTr, _headerTr.midTr, 
            +                            _bodyTr.midTr, _headerTr.rightTr, _bodyTr.rightTr);
            +                        break;
            +                    }
            +                case 'last':
            +                case 'prev':
            +                    {   
            +                        _tpl = JC.f.printf(_layout, _headerTr.leftTr, _bodyTr.leftTr, 
            +                            _headerTr.rightTr, _bodyTr.rightTr);
            +                        break;
            +                    }
            +            }
            +
            +            _p.selector().append(_tpl);
            +            
            +        },
            +    
            +        getTpl: function ( _freezeType, _freezeCols, _trs, _colNum ) {
            +           
            +            var _tpl,
            +                _sLeftTpl = [],
            +                _sMidTpl = [],
            +                _sRightTpl = [],
            +                _col = _freezeCols,
            +                _rcol = 0,
            +                _mcol = 0,
            +                _p = this;
            +
            +            switch (_freezeType) {
            +                case 'prev':
            +                    _sLeftTpl = _p.getTr( _trs,  _col );
            +                    _sRightTpl = _p.getTr( _trs, _colNum - _col );
            +                    break;
            +                case 'last':
            +                    _sLeftTpl = _p.getTr( _trs,  _colNum - _col );
            +                    _sRightTpl = _p.getTr( _trs, _col );
            +                    break;
            +                case 'both':
            +                    _col = _freezeCols[0];
            +                    _rcol = _freezeCols[1];
            +                    _mcol = _colNum - _col - _rcol;
            +                    _sLeftTpl = _p.getTr( _trs,  _col );
            +                    _sMidTpl =  _p.getTr( _trs,  _mcol );
            +                    _sRightTpl = _p.getTr( _trs, _rcol );
            +                    break;
            +            }
            +
            +            _tpl = {
            +                leftTr: _sLeftTpl.join(''),
            +                midTr: _sMidTpl.join(''),
            +                rightTr: _sRightTpl.join('')
            +            };
            +
            +            return _tpl;
            +        },
            +
            +        getTr: function ( _trs, _col ) {
            +           
            +            var _row = {},
            +                _temp = [],
            +                _p = this;
            +            _trs.each( function (_ix) {
            +                var _sp = $(this),
            +                    _clasname = 'CTF CTF' + _ix,
            +                    _leftTr = _sp[0].cloneNode(false),
            +                    _rightTr = _sp[0].cloneNode(false),
            +                    _midTr = _sp[0].cloneNode(false),
            +                    _tds = _sp.find('>th,>td'),
            +                    _leftTd = [],
            +                    _rightTd = [],
            +                    _midTd = [],
            +                    _cix = 0,
            +                    _mcix = 0,
            +                    _tr = _sp[0].cloneNode(false);
            +                
            +                _tds.each( function ( _six, _sitem ) {
            +                    
            +                    var _sp = $(this), 
            +                        _colspan = _sp.attr('colspan'),
            +                        _rowspan = _sp.attr('rowspan'),
            +                        _obj = {},
            +                        _key;
            +                    
            +                    if ( _cix >= _col ) {
            +                      return false;
            +                    }
            +
            +                    if ( typeof _rowspan != 'undefined' ) {
            +                        _rowspan = parseInt(_rowspan, 10);
            +
            +                        _obj = {
            +                            six: _six,
            +                            rowspan: _rowspan,
            +                            colspan: _colspan
            +                        };
            +
            +                        for ( var i = 1; i < _rowspan; i++ ) {
            +                            
            +                            if (_colspan) {
            +                                _colspan = parseInt(_colspan, 10);
            +                                for (var j = 0; j < _colspan; j++) {        
            +                                    _six === 0 ? _row[(_ix + i) + ( _six + 1 + j ).toString()] = _obj: _row[(_ix + i) + ( _six + j ).toString()] = _obj;
            +                                }
            +                            } else {
            +                                _six === 0 ? _row[(_ix + i) + ( _six + 1 ).toString()] = _obj: _row[(_ix + i) + ( _six ).toString()] = _obj;
            +                            }
            +                        }
            +
            +                    }
            +                    
            +                    if ( typeof _colspan === 'undefined' ) {
            +                        _cix = _cix + 1;
            +                    } else {
            +                        _cix += parseInt(_colspan, 10);
            +                    }
            +
            +                    _key = _ix + (_six + 1).toString();
            +                    
            +                    if ( _key in _row  ) {
            +                        _cix = _cix + 1;
            +                        if (_row[_key].colspan) {
            +                            return;
            +                        }
            +                    }
            +
            +                    _sp.appendTo( _tr );
            +
            +                });
            +
            +                $(_tr).attr('data-ctf', 'CTF' + _ix).addClass(_clasname);
            +                _temp.push($(_tr)[0].outerHTML);
            +            } );
            +
            +            return _temp;
            +        },
            +
            +        getSum: function ( _array ) {
            +            var _sum = 1,
            +                _len = _array.length;
            +
            +            while ( _len-- ) {
            +                _sum += _array.pop();
            +            }
            +
            +            return _sum;
            +        },
            +
            +        /**
            +         * TableFreeze调用前的回调
            +         */
            +        beforeCreateTableCallback: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = 'beforeCreateTableCallback';
            + 
            +            return _p.callbackProp(_selector, _key);
            +        },
            + 
            +        /**
            +         * TableFreeze调用后的回调
            +         */
            +        afterCreateTableCallback: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _key = 'afterCreateTableCallback';
            + 
            +            return _p.callbackProp(_selector, _key);
            +        }
            +        
            +    });
            + 
            +    JC.f.extendObject( TableFreeze.View.prototype, {
            +        init: function () {
            +           
            +        },
            +
            +        update: function () {
            +            var _p = this,
            +                _selector = _p._model.selector(),
            +                _needProcess = _p._model.needProcess();
            +
            +            if ( _needProcess ) {
            +                _p._model.creatTpl();
            +                _p.fixWidth();
            +                //fix empty cell
            +                _p.selector().find('td:empty').html('&nbsp;');
            +                _p.fixHeight();
            +            }
            +
            +        },
            +
            +        fixWidth: function () {
            +            var _p = this,
            +                _selector = _p.selector(),
            +                _freezeType = _p._model.freezeType(),
            +                _freezeCols = _p._model.freezeCols(),
            +                _totalWidth = _p._model.initWidth,
            +                _scrollWidth = _p._model.scrollWidth(),
            +                _colWidth = _p._model.initcolnumWidth,
            +                _colNum = _colWidth.length,
            +                _leftWidth,
            +                _rightWidth,
            +                _midWidth;
            +
            +            switch ( _freezeType ) {
            +                case 'prev' : 
            +                    {
            +                        _leftWidth = _p._model.getSum(_colWidth.slice(0, _freezeCols));
            +                        _rightWidth = _totalWidth - _leftWidth;
            +
            +                        _selector.find('>.js-fixed-table').width(_leftWidth / _totalWidth * 100 + '%')
            +                            .end()
            +                            .find('>.js-roll-table').width(_rightWidth / _totalWidth * 100 + '%')
            +                            .find('>table').width(_scrollWidth);
            +
            +                        break;
            +                    }
            +
            +                case 'last':
            +                    {
            +                        _rightWidth = _p._model.getSum(_colWidth.slice(_colNum - _freezeCols, _colNum));
            +                        _leftWidth = _totalWidth - _rightWidth - 1;
            +
            +                        _selector.find('>.js-fixed-table').width(_rightWidth / _totalWidth * 100 + '%')
            +                            .end()
            +                            .find('>.js-roll-table').width(_leftWidth / _totalWidth * 100 + '%')
            +                            .find('>table').width(_scrollWidth);
            +
            +                        break;
            +                    }
            +
            +                case 'both':
            +                    {
            +                        _leftWidth = _p._model.getSum(_colWidth.slice(0, _freezeCols[0]));
            +                        _rightWidth = _p._model.getSum(_colWidth.slice(_colNum - _freezeCols[1], _colNum));
            +                        _midWidth = _totalWidth - _leftWidth - _rightWidth;
            +                        //_midWidth = 1 - _leftWidth - _rightWidth;
            +
            +                        _selector.find('>.js-fixed-table:eq(0)').width(_leftWidth / _totalWidth * 100 + '%')
            +                            .end()
            +                            .find('>.js-roll-table').width(_midWidth / _totalWidth * 100 + '%')
            +                            .find('>table').width(_scrollWidth)
            +                            .end()
            +                            .end()
            +                            .find('>.js-fixed-table:eq(1)').width(_rightWidth / _totalWidth * 100 + '%');
            +
            +                        break;
            +                    }
            +            } 
            +
            +        },
            +
            +        fixHeight: function () {
            +            var _p = this,
            +                _selector = _p._model.selector(),
            +                _leftTrs = _selector.find('>.js-fixed-table:eq(0)>table>thead>tr, >.js-fixed-table:eq(0)>table>tbody>tr'),
            +                _rightTrs = _selector.find('>.js-roll-table>table>thead>tr,>.js-roll-table>table>tbody>tr'),
            +                _midTrs = _selector.find('>.js-fixed-table:eq(1)>table>thead>tr, >.js-fixed-table:eq(1)>table>tbody>tr'),
            +                _freezeType = _p._model.freezeType();
            +
            +            _leftTrs.each( function ( _ix, _item ) {
            +                var _sp = $(this),
            +                    _rightTr = _rightTrs.eq(_ix),
            +                    _midTr = _midTrs.eq(_ix),
            +                    _height = Math.max(_sp.prop('offsetHeight'), _rightTr.prop('offsetHeight'));
            +
            +                if ( _freezeType === 'both' ) {
            +                    _height = Math.max(_height, _midTr.prop('offsetHeight'));
            +                    _midTr.height(_height);
            +                }
            +
            +                _sp.height(_height);
            +                _rightTr.height(_height);
            +
            +            } );    
            +
            +            return;
            +        },
            +
            +        highlight: function () {
            +            console.log("highlight");
            +        }
            +
            +    });
            +
            +    $(document).ready( function () {
            +        var _insAr = 0,
            +            _win= $( window );
            +
            +        TableFreeze.autoInit && ( _insAr = TableFreeze.init() );
            +        _win.on( 'resize', CTFResize );
            +
            +        function CTFResize() {
            +            _win.off( 'resize', CTFResize );
            +
            +            $( 'div.js_compTableFreeze' ).each( function () {
            +                var _ins = TableFreeze.getInstance( $( this ) );
            +                _ins && _ins.update() ;
            +                _ins._model.tempWidth = _ins._model.selector().prop('offsetWidth');
            +            });
            +
            +            _win.data('CTFResizeTimeout') && clearTimeout(_win.data('CTFResizeTimeout'));
            +            _win.data('CTFResizeTimeout', setTimeout(function () {
            +                _win.off( 'resize', CTFResize );
            +                _win.on( 'resize', CTFResize );
            +            }, 80 ));
            +
            +        }
            +
            +    });
            + 
            +    return JC.TableFreeze;
            +});}( typeof define === 'function' && define.amd ? define : 
            +        function ( _name, _require, _cb ) { 
            +            typeof _name == 'function' && ( _cb = _name );
            +            typeof _require == 'function' && ( _cb = _require ); 
            +            _cb && _cb(); 
            +        }
            +        , window
            +    )
            +);
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._comps_Tips_Tips.js.html b/docs_api/files/.._comps_Tips_Tips.js.html index cbd32a440..eada3cfbb 100644 --- a/docs_api/files/.._comps_Tips_Tips.js.html +++ b/docs_api/files/.._comps_Tips_Tips.js.html @@ -3,11 +3,17 @@ ../comps/Tips/Tips.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,7 +252,7 @@

            File: ../comps/Tips/Tips.js

            -;(function($){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
                 window.Tips = JC.Tips = Tips;
                 /**
                  * Tips 提示信息类
            @@ -189,7 +261,10 @@ 

            File: ../comps/Tips/Tips.js

            * <br />如果要禁用自动初始化, 请把静态属性 Tips.autoInit 置为 false</p> * <p><b>注意:</b> Tips 默认构造函数只处理单一标签 * <br />, 如果需要处理多个标签, 请使用静态方法 Tips.init( _selector )</p> - * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p> + * <p><b>require</b>: + * <a href='.jQuery.html'>jQuery</a> + * , <a href='JC.common.html'>JC.common</a> + * </p> * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a> * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Tips.html' target='_blank'>API docs</a> * | <a href='../../comps/Tips/_demo' target='_blank'>demo link</a></p> @@ -220,9 +295,9 @@

            File: ../comps/Tips/Tips.js

            * @date 2013-06-23 * @example <script src="../../../lib.js"></script> + <script src="../../../config.js"></script> <script> - JC.use( 'Tips' ); - $(document).ready( function(_evt){ + requirejs( [ 'JC.Tips' ], function(){ //默认是自动初始化, 也就是只要导入 JC.Tips 就会自己初始化 带 title/tipsData 属性的标签 //下面示例是手动初始化 JC.Tips.autoInit = false; @@ -359,9 +434,9 @@

            File: ../comps/Tips/Tips.js

            * @static * @example <script src="../../../lib.js"></script> + <script src="../../../config.js"></script> <script> - JC.use( 'Tips' ); - $(document).ready( function(_evt){ + requirejs( [ 'JC.Tips' ], function(){ JC.Tips.autoInit = false; JC.Tips.init( $( 'a' ) ); }); @@ -596,7 +671,7 @@

            File: ../comps/Tips/Tips.js

            function(){ var _r; this._selector.attr('tipsupdateonce') - && ( _r = parseBool( this._selector.attr('tipsupdateonce') ) ); + && ( _r = JC.f.parseBool( this._selector.attr('tipsupdateonce') ) ); return _r; } , tipsIsUpdated: @@ -793,7 +868,16 @@

            File: ../comps/Tips/Tips.js

            }, 10); }); -}(jQuery)); + return JC.Tips; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_Tree_Tree.js.html b/docs_api/files/.._comps_Tree_Tree.js.html index be84322dc..0bc5b7bce 100644 --- a/docs_api/files/.._comps_Tree_Tree.js.html +++ b/docs_api/files/.._comps_Tree_Tree.js.html @@ -3,11 +3,17 @@ ../comps/Tree/Tree.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -180,12 +252,13 @@

            File: ../comps/Tree/Tree.js

            -;( function( $ ){
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
                 window.Tree = JC.Tree = Tree;
                 /**
                  * 树菜单类 JC.Tree
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a>, 
            -     * <a href='.window.html#method_printf'>window.printf</a></p>
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Tree.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Tree/_demo' target='_blank'>demo link</a></p>
            @@ -198,26 +271,27 @@ 

            File: ../comps/Tree/Tree.js

            * @author qiushaowei <suches@btbtd.org> | 75 Team * @date 2013-06-29 * @example - <link href='../../../comps/Tree/res/default/style.css' rel='stylesheet' /> + <link href='../../../modules/JC.Tree/res/default/style.css' rel='stylesheet' /> <script src="../../../lib.js"></script> + <script src="../../../config.js"></script> <script> - JC.use( 'Tree' ); - $(document).ready( function(){ - var treeData = { - data: {"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]}, - root: ["23",'客户发展部'] - }; - var _tree = new JC.Tree( $('#tree_box2'), treeData ); - _tree.on('RenderLabel', function( _data ){ - var _node = $(this); - _node.html( printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) ); - }); - _tree.on('click', function( _evt ){ - var _p = $(this); - JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') ); - }); - _tree.init(); - //_queryNode && _tree.open( _queryNode ); + requirejs( [ 'JC.Tree' ], function(){ + var treeData = { + data: {"24":[["25","\u4e8c\u7ec4\u4e00\u961f"],["26","\u4e8c\u7ec4\u4e8c\u961f"],["27","\u4e8c\u7ec4\u4e09\u961f"]],"23":[["28","\u9500\u552e\u4e8c\u7ec4"],["24","\u552e\u524d\u5ba1\u6838\u7ec4"]]}, + root: ["23",'客户发展部'] + }; + var _tree = new JC.Tree( $('#tree_box2'), treeData ); + _tree.on('RenderLabel', function( _data ){ + var _node = $(this); + _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) ); + }); + _tree.on('click', function( _evt ){ + var _p = $(this); + JC.log( 'tree click:', _p.html(), _p.attr('dataid'), _p.attr('dataname') ); + }); + _tree.init(); + //_queryNode && _tree.open( _queryNode ); + }); </script> <div id="tree_box2" class="tree_container"></div> @@ -227,7 +301,7 @@

            File: ../comps/Tree/Tree.js

            if( _container && $(_container).length ){ _container = $(_container); if( Tree.getInstance( _container ) ) return Tree.getInstance( _container ); - _container.data( 'TreeIns', this ); + _container.data( Tree.Model._instanceName , this ); } /** * 树的数据模型引用 @@ -254,7 +328,7 @@

            File: ../comps/Tree/Tree.js

            Tree.getInstance = function( _selector ){ _selector = $(_selector); - return _selector.data('TreeIns'); + return _selector.data( Tree.Model._instanceName ); }; /** * 树的数据过滤函数 @@ -300,7 +374,7 @@

            File: ../comps/Tree/Tree.js

            init: function(){ this._view.init(); - this._view.treeRoot().data( 'TreeIns', this ); + this._view.treeRoot().data( Tree.Model._instanceName, this ); return this; } /** @@ -373,16 +447,24 @@

            File: ../comps/Tree/Tree.js

            , event: function( _evtName ){ if( !_evtName ) return; return this._model.event( _evtName ); } /** * 获取或设置树的高亮节点 - * <br /><b>注意:</b> 这个只是数据层面的设置, 不会影响视觉效果 - * @method highlight - * @param {selector} _item + * @method selectedItem + * @param {selector} _selector * @return selector */ + , selectedItem: + function( _selector ){ + return this._view.selectedItem( _selector ); + } , highlight: - function( _item ){ - return this._model.highlight( _item ); + function(){ + return this.selectedItem.apply( this, JC.f.sliceArgs( arguments ) ); } - } + }; + + Tree.Model = Model; + Tree.View = View; + + Tree.Model._instanceName = 'TreeIns'; /** * 树节点的点击事件 * @event click @@ -402,7 +484,7 @@

            File: ../comps/Tree/Tree.js

            * @example _tree.on('RenderLabel', function( _data ){ var _node = $(this); - _node.html( printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) ); + _node.html( JC.f.printf( '<a href="javascript:" dataid="{0}">{1}</a>', _data[0], _data[1] ) ); }); */ @@ -444,7 +526,7 @@

            File: ../comps/Tree/Tree.js

            * @type string * @private */ - this._id = 'tree_' + new Date().getTime() + '_'; + this._id = JC.f.printf( 'tree_{0}_{1}_', new Date().getTime(), Model._insCount++ ); /** * 树当前的高亮节点 * @property _highlight @@ -462,6 +544,8 @@

            File: ../comps/Tree/Tree.js

            this._init(); } + + Model._insCount = 1; Model.prototype = { /** @@ -511,7 +595,11 @@

            File: ../comps/Tree/Tree.js

            * @param {string} _id * @return selector */ - , child: function( _id ){ return this._data.data[ _id ]; } + , child: function( _id ){ + var _r = this._data.data[ _id ]; + !( _r && _r.length ) && ( _r = [] ); + return _r; + } /** * 判断原始数据的某个ID是否有子级节点 * @method hasChild @@ -551,7 +639,7 @@

            File: ../comps/Tree/Tree.js

            */ , highlight: function( _highlight ){ - _highlight && ( this._highlight = _highlight ); + _highlight && ( this._highlight = $( _highlight ) ); return this._highlight; } }; @@ -583,6 +671,7 @@

            File: ../comps/Tree/Tree.js

            init: function() { if( !( this._model.data() && this._model.root() ) ) return; + this._model.container().addClass( 'js_compTree' ); this._process( this._model.child( this._model.root()[0] ), this._initRoot() ); return this; } @@ -606,7 +695,6 @@

            File: ../comps/Tree/Tree.js

            */ , _process: function( _data, _parentNode ){ - for( var i = 0, j = _data.length, _item, _isLast; i < j; i++ ){ _item = _data[i]; _isLast = i === j - 1; @@ -663,8 +751,8 @@

            File: ../comps/Tree/Tree.js

            var _label = this._initLabel( _data ); - var _node = $( printf( '<li><span class="folder_img_closed folder {1}">&nbsp;</span></li>', _data[1], _last ) ); - _node.addClass( printf( 'folder_closed {0} folder', _last1 )); + var _node = $( JC.f.printf( '<li><span class="folder_img_closed folder {1}">&nbsp;</span></li>', _data[1], _last ) ); + _node.addClass( JC.f.printf( 'folder_closed {0} folder', _last1 )); _label.appendTo( _node ); var _r = $( '<ul style="display:none;" class="folder_ul_lst" ></ul>' ) @@ -688,7 +776,7 @@

            File: ../comps/Tree/Tree.js

            var _label = this._initLabel( _data ); - var _node = $( printf( '<li><span class="{1}file">&nbsp;</span></li>', _data[1], _last ) ); + var _node = $( JC.f.printf( '<li><span class="{1}file">&nbsp;</span></li>', _data[1], _last ) ); _node.addClass( 'folder_closed file'); _label.appendTo( _node ); @@ -754,9 +842,7 @@

            File: ../comps/Tree/Tree.js

            var lis = _tgr.parents('li'); - if( this._model.highlight() ) this._model.highlight().removeClass('highlight'); - _tgr.addClass( 'highlight' ); - this._model.highlight( _tgr ); + this.selectedItem( _tgr ); lis.each( function(){ var _sp = $(this), _child = _sp.find( '> span.folderRoot, > span.folder' ); @@ -766,6 +852,19 @@

            File: ../comps/Tree/Tree.js

            } }); } + , selectedItem: + function( _selector ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return this._model.highlight(); + + if( this._model.highlight() ) { + this._model.highlight().removeClass('highlight').removeClass( 'selectedTreeNode' ); + } + _selector.addClass( 'highlight' ).addClass( 'selectedTreeNode' ); + + this._model.highlight( _selector ); + return _selector; + } /** * 关闭树的具体节点 * @method close @@ -793,21 +892,21 @@

            File: ../comps/Tree/Tree.js

            * @default null */ Tree.lastHover = null; - $(document).delegate( 'ul.tree_wrap div.node_ctn', 'mouseenter', function(){ + $(document).delegate( '.js_compTree ul.tree_wrap div.node_ctn', 'mouseenter', function(){ if( Tree.lastHover ) Tree.lastHover.removeClass('ms_over'); $(this).addClass('ms_over'); Tree.lastHover = $(this); }); - $(document).delegate( 'ul.tree_wrap div.node_ctn', 'mouseleave', function(){ + $(document).delegate( '.js_compTree ul.tree_wrap div.node_ctn', 'mouseleave', function(){ if( Tree.lastHover ) Tree.lastHover.removeClass('ms_over'); }); /** * 捕获树文件标签的点击事件 */ - $(document).delegate( 'ul.tree_wrap div.node_ctn', 'click', function( _evt ){ + $(document).delegate( '.js_compTree ul.tree_wrap div.node_ctn', 'click', function( _evt ){ var _p = $(this) , _treeContainer = _p.parents( 'ul.tree_wrap' ) - , _treeIns = _treeContainer.data('TreeIns'); + , _treeIns = _treeContainer.data( Tree.Model._instanceName ); if( !_treeIns ) return; @@ -818,9 +917,7 @@

            File: ../comps/Tree/Tree.js

            }); } - if( _treeIns.highlight() ) _treeIns.highlight().removeClass('highlight'); - _p.addClass('highlight'); - _treeIns.highlight( _p ); + _treeIns.selectedItem( _p ); var _events = _treeIns.event( 'change' ); if( _events && _events.length ){ @@ -832,15 +929,15 @@

            File: ../comps/Tree/Tree.js

            /** * 捕获树文件夹图标的点击事件 */ - $(document).delegate( 'ul.tree_wrap span.folder, ul.tree_wrap span.folderRoot', 'click', function( _evt ){ + $(document).delegate( '.js_compTree ul.tree_wrap span.folder, ul.tree_wrap span.folderRoot', 'click', function( _evt ){ var _p = $(this), _pntLi = _p.parent('li'), _childUl = _pntLi.find( '> ul'); var _treeContainer = _p.parents( 'ul.tree_wrap' ) - , _treeIns = _treeContainer.data('TreeIns'); + , _treeIns = _treeContainer.data( Tree.Model._instanceName ); var _events = _treeIns.event( 'FolderClick' ); if( _events && _events.length ){ $.each( _events, function( _ix, _cb ){ - if( _cb.call( _p, _evt ) === false ) return false; + if( _cb.call( _p, _evt ) === false ) return false; }); } @@ -859,7 +956,16 @@

            File: ../comps/Tree/Tree.js

            } }); -}(jQuery)); + return JC.Tree; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._comps_Valid_Valid.js.html b/docs_api/files/.._comps_Valid_Valid.js.html index 6c6bc7d7d..5627647a7 100644 --- a/docs_api/files/.._comps_Valid_Valid.js.html +++ b/docs_api/files/.._comps_Valid_Valid.js.html @@ -3,11 +3,17 @@ ../comps/Valid/Valid.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -182,11 +254,15 @@

            File: ../comps/Valid/Valid.js

             //TODO: 错误提示 不占用页面宽高, 使用 position = absolute,  date = 2013-08-03
             //TODO: checkbox, radio 错误时, input 添加高亮显示
            -;(function($){
            +//TODO: daterange 支持一对多关系
            +//TODO: datavalid 添加自定义 ajax 数据 和 方法 
            +;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
                 /**
                  * <b>表单验证</b> (单例模式)
                  * <br />全局访问请使用 JC.Valid 或 Valid
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p>
            +     * <p><b>require</b>: 
            +     *      <a href='JC.common.html'>JC.common</a>
            +     * </p>
                  * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
                  * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.Valid.html' target='_blank'>API docs</a>
                  * | <a href='../../comps/Valid/_demo/' target='_blank'>demo link</a></p>
            @@ -209,6 +285,9 @@ 

            File: ../comps/Valid/Valid.js

            * <dd> * 设置 表单所有控件的 em CSS display 显示类型 * </dd> + * + * <dt>ignoreAutoCheckEvent = bool, default = false</dt> + * <dd>是否禁用 自动 check 事件( focus, blur, change )</dd> * </dl> * <h2>Form Control的可用 html attribute</h2> * <dl> @@ -253,20 +332,25 @@

            File: ../comps/Valid/Valid.js

            * <dt>maxlength = int(最大长度)</dt> * <dd>验证内容的最大长度, 但不验证为空的值</dd> * - * <dt>minvalue = [number|ISO date](最小值)</dt> + * <dt>minvalue = number|ISO date(最小值)</dt> * <dd>验证内容的最小值, 但不验证为空的值</dd> * - * <dt>maxvalue = [number|ISO date](最大值)</dt> + * <dt>maxvalue = number|ISO date(最大值)</dt> * <dd>验证内容的最大值, 但不验证为空的值</dd> * - * <dt>validitemcallback = function name</dt> + * <dt>validitemcallback = function</dt> * <dd> * 对一个 control 作检查后的回调, 无论正确与否都会触发, <b>window 变量域</b> -<xmp>function validItemCallback( _item, _isValid){ - JC.log( _item.attr('name'), _isValid ); -}</xmp> +<pre>function validItemCallback( &#95;selector, &#95;isValid ){ +}</pre> * </dd> * + * <dt>validHidden = bool, default = false</dt> + * <dd>是否验证隐藏的控件</dd> + * + * <dt>rangeCanEqual = bool, default = true</dt> + * <dd>nrange 和 daterange 的开始值和结束值是否可以相等</dd> + * * <dt>datatype: 常用数据类型</dt> * <dd><b>n:</b> 检查是否为正确的数字</dd> * <dd><b>n-i.f:</b> 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], n-7.2 = 0.00 ~ 9999999.99</dd> @@ -278,6 +362,8 @@

            File: ../comps/Valid/Valid.js

            * <dd>如果不指定 fromNEl, toNEl, 默认是从父节点下面找到 nrange, 按顺序定为 fromNEl, toNEl</dd> * </dl> * </dd> + * <dd><b>f:</b> 检查是否为正确的数字, default: f-9.2</dd> + * <dd><b>f-i.f:</b> 检查数字格式是否附件要求, i[整数位数], f[浮点数位数], f-7.2 = 0.00 ~ 9999999.99</dd> * <dd><b>d:</b> 检查是否为正确的日期, YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD</dd> * <dd> * <b>daterange:</b> 检查两个control的日期范围 @@ -285,13 +371,14 @@

            File: ../comps/Valid/Valid.js

            * <dd>html attr <b>fromDateEl:</b> 指定开始的 control</dd> * <dd>html attr <b>toDateEl:</b> 指定结束的 control</dd> * <dd>如果不指定 fromDateEl, toDateEl, 默认是从父节点下面找到 daterange, 按顺序定为 fromDateEl, toDateEl</dd> + * <dd>html attr <b>datespan:</b>, 指定开始与结束日期的时间跨度(JC.f.dateDetect)</dd> * </dl> * </dd> * <dd><b>time:</b> 是否为正确的时间, hh:mm:ss</dd> * <dd><b>minute:</b> 是否为正确的时间, hh:mm</dd> * <dd> * <b>bankcard:</b> 是否为正确的银行卡 - * <br />格式为: d{15}, d{16}, d{17}, d{19} + * <br />格式为: 9 ~ 25 位数字 * </dd> * <dd> * <b>cnname:</b> 中文姓名 @@ -299,12 +386,21 @@

            File: ../comps/Valid/Valid.js

            * <br>规则: 长度 2-32个字节, 非 ASCII 算2个字节 * </dd> * <dd> + * <b>enname:</b> 英文姓名 + * <br>格式: 大小写字母 + 空格 + * <br>规则: 长度 2-32个字节, 非 ASCII 算2个字节 + * </dd> + * <dd> + * <b>allname:</b> cnname | enname + * <br />中文姓名和英文姓名的复合验证 + * </dd> + * <dd> * <b>username:</b> 注册用户名 * <br>格式: a-zA-Z0-9_- * <br>规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30 * </dd> * <dd><b>idnumber:</b> 身份证号码, 15~18 位</dd> - * <dd><b>mobilecode:</b> 手机号码, 11位, (13|14|15|16|18|19)[\d]{9}</dd> + * <dd><b>mobilecode:</b> 手机号码, 11位, (13|14|15|16|17|18|19)[\d]{9}</dd> * <dd><b>mobile:</b> mobilecode 的别名</dd> * <dd><b>mobilezonecode:</b> 带 国家代码的手机号码, [+国家代码] [零]11位数字</dd> * <dd><b>phonecode:</b> 电话号码, 7~8 位数字, [1-9][0-9]{6,7}</dd> @@ -366,6 +462,9 @@

            File: ../comps/Valid/Valid.js

            * </dl> * </dd> * + * <dd><b>qq:</b> 检查QQ号码, 5 ~ 11位数字</dd> + * <dd><b>qqall:</b> 检查QQ号码, [ qq | email ]</dd> + * * <dt>subdatatype: 特殊数据类型, 以逗号分隔多个属性</dt> * <dd> * <dl> @@ -405,6 +504,7 @@

            File: ../comps/Valid/Valid.js

            * <dd><b>uniquemsg:</b> 值有重复的提示信息</dd> * <dd><b>uniqueIgnoreCase:</b> 是否忽略大小写</dd> * <dd><b>uniqueIgnoreEmpty:</b> 是否忽略空的值, 如果组中有空值也会被忽略</dd> + * <dd><b>processDisabled:</b> 是否处理 disabled 但 visible 的node</dd> * <dd>unique-n 可以指定 N 个为一组的匹配, unique-2 = 2个一组, unique-3: 三个一组</dd> * </dl> * </dd> @@ -420,23 +520,40 @@

            File: ../comps/Valid/Valid.js

            * {0} 代表 value * </dd> * <dd> + * <b>datavalidCheckCallback:</b> 验证内容正确与否的回调(优先级比 datavalidUrl 高) +<pre>window.datavalidCheckCallback = +function (){ + var _r = { 'errorno': 1, errmsg:'验证码错误' }, _sp = $( this ), _v = _sp.val().trim().toLowerCase(); + + if( _v && _v === window.CHECK_CODE ){ + _r.errorno = 0; + } + + return _r; +};<pre> + * </dd> + * <dd><b>datavalidNoCache:</b> 是否禁止缓存, default = true</dd> + * <dd><b>datavalidAjaxType:</b> ajax 请求类型, default = get</dd> + * <dd><b>datavalidRequestData:</b> ajax 请求数据, json data</dd> + * <dd> * <b>datavalidCallback:</b> 请求 datavalidUrl 后调用的回调 -<xmp>function datavalidCallback( _json ){ +<pre>function datavalidCallback( _json ){ var _selector = $(this); -});</xmp> +});</pre> * </dd> + * <dd> * <b>datavalidKeyupCallback:</b> 每次 keyup 的回调 -<xmp>function datavalidKeyupCallback( _evt ){ +<pre>function datavalidKeyupCallback( _evt ){ var _selector = $(this); -});</xmp> +});</pre> * </dd> * <dd> * <b>datavalidUrlFilter:</b> 请求数据前对 url 进行操作的回调 -<xmp>function datavalidUrlFilter( _url ){ +<pre>function datavalidUrlFilter( _url ){ var _selector = $(this); - _url = addUrlParams( _url, { 'xtest': 'customData' } ); + _url = JC.f.addUrlParams( _url, { 'xtest': 'customData' } ); return _url; -});</xmp> +});</pre> * </dd> * </dl> * </dd> @@ -448,6 +565,41 @@

            File: ../comps/Valid/Valid.js

            * </dd> * </dl> * </dd> + * + * <dd> + * <dl> + * <dt>ucheck: 用户自定义验证</dt> + * <dd><b>ucheckmsg:</b> 验证出错的提示信息</dd> + * <dd><b>ucheckCallback:</b> 用于验证的函数 <b>window变量域</b> + * +<pre>function ucheck_n( _item ){ + var _r = false, _v = JC.f.parseFinance( _item.val() ); + + if( _v === 0 || ( _v >= 30 && _v >= 50 ) ){ + _r = true; + } + return _r; +}</pre> + * </dd> + * </dl> + * </dd> + * <dd> + * <dl> + * <dt>subdatatype = even: 数值必须为偶数</dt> + * </dl> + * </dd> + * <dd> + * <dl> + * <dt>subdatatype = odd: 数值必须为奇数</dt> + * </dl> + * </dd> + * <dt>exdatatype: 特殊数据类型, 以逗号分隔多个属性, 该类型只用于显示视觉效果, 不作为实际验证的判断</dt> + * <dd> + * <dl> + * <dt>datavalid: 判断 control 的值是否合法( 通过HTTP请求验证 )(只用于显示视觉效果, 不作为实际验证的判断)</dt> + <dd>其他参数与 subdatatype = datavalid 相同</dd> + </dl> + </dd> * </dl> * @namespace JC * @class Valid @@ -456,13 +608,14 @@

            File: ../comps/Valid/Valid.js

            * @version 0.1, 2013-05-22 * @author qiushaowei <suches@btbtd.org> | 75 team */ + window.JC = window.JC || {log:function(){}}; JC.Valid = window.Valid = Valid; function Valid(){ /** * 兼容函数式使用 */ - var _args = sliceArgs( arguments ); + var _args = JC.f.sliceArgs( arguments ); if( _args.length ){ return Valid.check.apply( null, _args ); } @@ -485,22 +638,22 @@

            File: ../comps/Valid/Valid.js

            }); $([ this._view, this._model ] ).on(Model.TRIGGER, function( _evt, _evtName ){ - var _data = sliceArgs( arguments ).slice(2); + var _data = JC.f.sliceArgs( arguments ).slice(2); _p.trigger( _evtName, _data ); }); _p.on( Model.CORRECT, function( _evt ){ - var _data = sliceArgs( arguments ).slice(1); + var _data = JC.f.sliceArgs( arguments ).slice(1); _p._view.valid.apply( _p._view, _data ); }); _p.on( Model.ERROR, function( _evt ){ - var _data = sliceArgs( arguments ).slice(1); + var _data = JC.f.sliceArgs( arguments ).slice(1); _p._view.error.apply( _p._view, _data ); }); _p.on( Model.FOCUS_MSG, function( _evt ){ - var _data = sliceArgs( arguments ).slice(1); + var _data = JC.f.sliceArgs( arguments ).slice(1); _p._view.focusmsg.apply( _p._view, _data ); }); @@ -535,6 +688,8 @@

            File: ../comps/Valid/Valid.js

            function( _item ){ var _p = this, _r = true, _item = $( _item ); + if( _item.prop( 'nodeName' ).toLowerCase() == 'object' ) return _r; + if( !_p._model.isAvalible( _item ) ) return _r; if( !_p._model.isValid( _item ) ) return _r; if( Valid.ignore( _item ) ) return _r; @@ -553,13 +708,26 @@

            File: ../comps/Valid/Valid.js

            } } - if( !_p._model.reqmsg( _item ) ){ _r = false; return _r; } - if( !_p._model.lengthValid( _item ) ){ _r = false; return _r; } + if( !_p._model.reqmsg( _item ) ){ + _item.attr( 'datatypestatus', 'false' ); + return _r = false; + } + + if( !_p._model.lengthValid( _item ) ){ + _item.attr( 'datatypestatus', 'false' ); + return _r = false; + } //验证 datatype if( _dt && _p._model[ _dt ] && _item.val() ){ - if( !_p._model[ _dt ]( _item ) ){ _r = false; return _r; } + if( !_p._model[ _dt ]( _item ) ){ + _item.attr( 'datatypestatus', 'false' ); + return _r = false; + } } + + _item.attr( 'datatypestatus', 'true' ); + //验证子类型 var _subDtLs = _item.attr('subdatatype'); if( _subDtLs ){ @@ -582,22 +750,24 @@

            File: ../comps/Valid/Valid.js

            , check: function(){ - var _p = this, _r = true, _items = sliceArgs( arguments ), i, j; + var _p = this, _r = true, _items = JC.f.sliceArgs( arguments ), i, j; $.each( _items, function( _ix, _item ){ _item = $(_item); Valid.isFormValid = false; if( _p._model.isForm( _item ) ){ Valid.isFormValid = true; - var _errorabort = _p._model.isErrorAbort( _item ), tmp; + var _errorabort = _p._model.isErrorAbort( _item ) + , _isIgnoreForm = Valid.ignore( _item ) + , tmp + ; for( i = 0, j = _item[0].length; i < j; i++ ){ - var _sitem = $( $(_item[0][i]) ); - if( !_p._model.isValid( _sitem ) ) continue; + var _sitem = $(_item[0][i]); + if( _isIgnoreForm && ! ( _sitem.val() || '' ).trim() ) continue; !_p.parse( _sitem ) && ( _r = false ); if( _errorabort && !_r ) break; } } else if( Valid.isFormControl( _item ) ) { - if( !_p._model.isValid( _item ) ) return; !_p.parse( _item ) && ( _r = false ); } else{ @@ -608,7 +778,7 @@

            File: ../comps/Valid/Valid.js

            } , clearError: function(){ - var _items = sliceArgs( arguments ), _p = this; + var _items = JC.f.sliceArgs( arguments ), _p = this; $.each( _items, function( _ix, _item ){ $( _item ).each( function(){ var _item = $(this); @@ -647,7 +817,7 @@

            File: ../comps/Valid/Valid.js

            * @return {boolean} */ Valid.checkAll = Valid.check = - function(){ return Valid.getInstance().check.apply( Valid.getInstance(), sliceArgs( arguments ) ); } + function(){ return Valid.getInstance().check.apply( Valid.getInstance(), JC.f.sliceArgs( arguments ) ); } /** * 这个方法是 <a href='JC.Valid.html#method_check'>Valid.check</a> 的别名 * @method checkAll @@ -663,6 +833,30 @@

            File: ../comps/Valid/Valid.js

            * @return {Valid instance} */ Valid.getInstance = function(){ !Valid._instance && new Valid(); return Valid._instance; }; + /** + * 检查是否需要延时 check + * <br />以 html 属性 validCheckTimeout 定义, int 类型, type = ms + * @method checkTimeout + * @param {selector} _selector + * @param {int} _tm + * @static + * @return {Valid instance} + */ + Valid.checkTimeout = + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _tm = parseInt( _selector.attr( 'validCheckTimeout') ) || _tm; + var _dname = 'VALID_CHECK_TIMEOUT'; + if( _tm ){ + _selector.data( _dname ) && clearTimeout( _selector.data( _dname ) ); + _selector.data( _dname , setTimeout( function(){ + Valid.check( _selector ); + }, _tm )); + }else{ + Valid.check( _selector ); + } + }; /** * 判断/设置 selector 的数据是否合法 * <br /> 通过 datavalid 属性判断 @@ -693,7 +887,7 @@

            File: ../comps/Valid/Valid.js

            } }else{ if( _selector && _selector.length ){ - _r = parseBool( _selector.attr('datavalid') ); + _r = JC.f.parseBool( _selector.attr('datavalid') ); } } @@ -707,53 +901,122 @@

            File: ../comps/Valid/Valid.js

            * @static */ Valid.isValid = function( _selector ){ return Valid.getInstance().isValid( _selector ); }; + /** + * 提供对各种显示状态 setTimeout 执行的正确性 控制逻辑 + */ + Valid.statusTimeout = { + valid: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_VALID ) && clearTimeout( _selector.data( Model.TIMEOUT_VALID ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_VALID, _tm ); + } + + , error: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_ERROR ) && clearTimeout( _selector.data( Model.TIMEOUT_ERROR ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_ERROR, _tm ); + } + + , focus: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_FOCUS ) && clearTimeout( _selector.data( Model.TIMEOUT_FOCUS ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_FOCUS, _tm ); + } + + , success: + function( _selector, _tm ){ + _selector && ( _selector = $( _selector ) ); + if( !( _selector && _selector.length ) ) return; + _selector.data( Model.TIMEOUT_SUCCESS ) && clearTimeout( _selector.data( Model.TIMEOUT_SUCCESS ) ); + _tm && Valid.statusTimeout.clear(); + _tm && _selector.data( Model.TIMEOUT_SUCCESS, _tm ); + } + , clear: + function( _selector ){ + for( var k in Valid.statusTimeout ){ + if( k == 'clear' ) continue; + Valid.statusTimeout[ k ]( _selector ); + } + } + }; /** * 把一个表单项的状态设为正确状态 * @method setValid - * @param {selector} _item + * @param {selector} _items * @param {int} _tm 延时 _tm 毫秒显示处理结果, 默认=150 * @static */ - Valid.setValid = function(_item, _tm){ return Valid.getInstance().trigger( Model.CORRECT, sliceArgs( arguments) ); }; + Valid.setValid = function(_items, _tm, _noStyle, _isUserSet){ + _items = $( _items ); + _items.each( function( _ix, _item ){ + _item = $(this); + Valid.statusTimeout.clear( _item ); + $( Valid.getInstance()._view ).trigger( 'setValid', [_item, _tm, _noStyle, _isUserSet] ); + }); + + return Valid.getInstance(); + }; /** * 把一个表单项的状态设为错误状态 * @method setError - * @param {selector} _item + * @param {selector} _items * @param {string} _msgAttr - 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 * <br /> 如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateErrorMsg * @param {bool} _fullMsg - 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写 * @static */ Valid.setError = - function(_item, _msgAttr, _fullMsg){ - if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ - var _autoKey = 'autoGenerateErrorMsg'; - _item.attr( _autoKey, _msgAttr ); - _msgAttr = _autoKey; - } - return Valid.getInstance().trigger( Model.ERROR, sliceArgs( arguments) ); + function(_items, _msgAttr, _fullMsg){ + _items = $(_items); + + _items.each( function( _ix, _item ){ + _item = $(this); + Valid.statusTimeout.clear( _item ); + if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ + var _autoKey = 'autoGenerateErrorMsg'; + _item.attr( _autoKey, _msgAttr ); + _msgAttr = _autoKey; + } + $( Valid.getInstance()._view ).trigger( 'setError', [ _item, _msgAttr, _fullMsg ] ); + }); + return Valid.getInstance(); }; /** * 显示 focusmsg 属性的提示信息( 如果有的话 ) * @method setFocusMsg - * @param {selector} _item + * @param {selector} _items * @param {bool} _setHide * @param {string} _msgAttr - 显示指定需要读取的focusmsg信息属性名, 默认为 focusmsg, 通过该属性可以指定别的属性名 * <br /> 如果 _msgAttr 的第一个字符为空格, 将视为提示信息, 并自动生成属性 autoGenerateFocusMsg * @static */ Valid.focusmsg = Valid.setFocusMsg = - function( _item, _setHide, _msgAttr ){ - if( typeof _setHide == 'string' ){ - _msgAttr = _setHide; - _setHide = false; - } - if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ - var _autoKey = 'autoGenerateFocusMsg'; - _item.attr( _autoKey, _msgAttr ); - _msgAttr = _autoKey; - } - return Valid.getInstance().trigger( Model.FOCUS_MSG, [ _item, _setHide, _msgAttr ] ); + function( _items, _setHide, _msgAttr ){ + _items = $( _items ); + _items.each( function( _ix, _item ){ + _item = $( this ); + Valid.statusTimeout.clear( _item ); + if( typeof _setHide == 'string' ){ + _msgAttr = _setHide; + _setHide = false; + } + if( _msgAttr && _msgAttr.trim() && /^[\s]/.test( _msgAttr ) ){ + var _autoKey = 'autoGenerateFocusMsg'; + _item.attr( _autoKey, _msgAttr ); + _msgAttr = _autoKey; + } + Valid.getInstance().trigger( Model.FOCUS_MSG, [ _item, _setHide, _msgAttr ] ); + }); + return Valid.getInstance(); }; /** * focus 时,是否总是显示 focusmsg 提示信息 @@ -790,7 +1053,7 @@

            File: ../comps/Valid/Valid.js

            * JC.Valid.clearError( 'input.some' ); */ Valid.clearError = - function(){ return Valid.getInstance().clearError.apply( Valid.getInstance(), sliceArgs( arguments ) ); }; + function(){ return Valid.getInstance().clearError.apply( Valid.getInstance(), JC.f.sliceArgs( arguments ) ); }; /** * 验证发生错误时, 是否终止继续验证 * <br /> 为真终止继续验证, 为假将验证表单的所有项, 默认为 false @@ -850,13 +1113,13 @@

            File: ../comps/Valid/Valid.js

            ? _item.removeAttr('ignoreprocess') : _item.attr('ignoreprocess', true) ; - _r = _delIgnore; + _r = !_delIgnore; }else{ _item.is( '[ignoreprocess]' ) && ( ( _item.attr('ignoreprocess') || '' ).trim() - ? ( _r = parseBool( _item.attr('ignoreprocess') ) ) + ? ( _r = JC.f.parseBool( _item.attr('ignoreprocess') ) ) : ( _r = true ) ) ; @@ -888,6 +1151,14 @@

            File: ../comps/Valid/Valid.js

            ; return _r; }; + /** + * 是否禁用 自动 check 事件( focus, blur, change ) + * @property ignoreAutoCheckEvent + * @type bool + * @default false + * @static + */ + Valid.ignoreAutoCheckEvent = false; function Model(){ this._init(); @@ -899,6 +1170,11 @@

            File: ../comps/Valid/Valid.js

            Model.CORRECT = 'ValidCorrect'; Model.FOCUS_MSG = 'ValidFocusMsg'; + Model.TIMEOUT_VALID = 'Valid_ValidTimeout'; + Model.TIMEOUT_ERROR = 'Valid_ErrorTimeout'; + Model.TIMEOUT_FOCUS = 'Valid_FocusTimeout'; + Model.TIMEOUT_SUCCESS = 'Valid_SuccessTimeout'; + Model.SELECTOR_ERROR = '~ em.error, ~ em.errormsg'; Model.CSS_ERROR = 'error errormsg'; @@ -912,8 +1188,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 获取 _item 的检查类型 - * @method parseDatatype - * @private * @static * @param {selector|string} _item */ @@ -929,8 +1203,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 获取 _item 的检查子类型, 所有可用的检查子类型位于 _logic.subdatatype 对象 - * @method parseSubdatatype - * @private * @static * @param {selector|string} _item */ @@ -944,10 +1216,6 @@

            File: ../comps/Valid/Valid.js

            } return _r.toLowerCase().replace(/\-.*/, ''); } - , isAvalible: - function( _item ){ - return ( _item.is(':visible') || this.isValidHidden( _item ) ) && !_item.is('[disabled]'); - } , isForm: function( _item ){ var _r; @@ -960,7 +1228,7 @@

            File: ../comps/Valid/Valid.js

            , isErrorAbort: function( _item ){ var _r = Valid.errorAbort; - _item.is('[errorabort]') && ( _r = parseBool( _item.attr('errorabort') ) ); + _item.is('[errorabort]') && ( _r = JC.f.parseBool( _item.attr('errorabort') ) ); return _r; } , isValid: @@ -981,33 +1249,49 @@

            File: ../comps/Valid/Valid.js

            , isAutoTrim: function( _item ){ _item = $( _item ); - var _r = Valid.autoTrim, _form = getJqParent( _item, 'form' ); - _form && _form.length && _form.is( '[validautotrim]' ) && ( _r = parseBool( _form.attr('validautotrim') ) ); - _item.is( '[validautotrim]' ) && ( _r = parseBool( _item.attr('validautotrim') ) ); + /* + //取form 的时候, 影响性能 + var _r = Valid.autoTrim, _form = $( _item.prop( 'form' ) ); + _form && _form.length && _form.is( '[validautotrim]' ) && ( _r = JC.f.parseBool( _form.attr('validautotrim') ) ); + _item.is( '[validautotrim]' ) && ( _r = JC.f.parseBool( _item.attr('validautotrim') ) ); + */ + var _r = Valid.autoTrim; + _item.is( '[validautotrim]' ) && ( _r = JC.f.parseBool( _item.attr('validautotrim') ) ); return _r; } , isReqmsg: function( _item ){ return _item.is('[reqmsg]'); } , isValidMsg: function( _item ){ _item = $( _item ); - var _r = Valid.showValidStatus, _form = getJqParent( _item, 'form' ); - _form && _form.length && _form.is( '[validmsg]' ) && ( _r = parseBool( _form.attr('validmsg') ) ); - _item.is( '[validmsg]' ) && ( _r = parseBool( _item.attr('validmsg') ) ); + var _r = Valid.showValidStatus, _form = JC.f.getJqParent( _item, 'form' ); + _form && _form.length && _form.is( '[validmsg]' ) && ( _r = JC.f.parseBool( _form.attr('validmsg') ) ); + _item.is( '[validmsg]' ) && ( _r = JC.f.parseBool( _item.attr('validmsg') ) ); return _r; } + , isAvalible: + function( _item ){ + return ( _item.is(':visible') || this.isValidHidden( _item ) ) && !_item.is('[disabled]'); + } + , isValidHidden: function( _item ){ var _r = false; _item.is( '[subdatatype]' ) && /hidden/i.test( _item.attr( 'subdatatype' ) ) + && _item.parent().is( ':visible' ) && ( _r = true ) ; + + _item.is( '[validHidden]' ) + && ( _r = JC.f.parseBool( _item.attr( 'validHidden' ) || 'false' ) ) + ; + return _r; } , validitemcallback: function( _item ){ _item = $( _item ); - var _r = Valid.itemCallback, _form = getJqParent( _item, 'form' ), _tmp; + var _r = Valid.itemCallback, _form = JC.f.getJqParent( _item, 'form' ), _tmp; _form &&_form.length && _form.is( '[validitemcallback]' ) && ( _tmp = _form.attr('validitemcallback') ) @@ -1045,10 +1329,10 @@

            File: ../comps/Valid/Valid.js

            _key && ( _key += _defKey ) && ( _key = _item.attr( _key ) ) - && ( _r = parentSelector( _item, _key ) ) + && ( _r = JC.f.parentSelector( _item, _key ) ) ; - !( _r && _r.length ) && ( _r = parentSelector( _item, _item.attr( _defKey ) ) ); + !( _r && _r.length ) && ( _r = JC.f.parentSelector( _item, _item.attr( _defKey ) ) ); return _r; } @@ -1060,7 +1344,7 @@

            File: ../comps/Valid/Valid.js

            switch( _datatype ){ default: { - return parseISODate( _item.attr('minvalue') ); + return JC.f.parseDate( _item.attr('minvalue'), _item, true ); } } }else{ @@ -1074,11 +1358,11 @@

            File: ../comps/Valid/Valid.js

            , maxvalue: function( _item, _isFloat ){ if( typeof _isFloat == 'string' ){ - var _datatype = _isFloat.toLowerCase().trim(); + var _datatype = _isFloat.toLowerCase().trim(), _r; switch( _datatype ){ default: { - return parseISODate( _item.attr('maxvalue') ); + return JC.f.parseDate( _item.attr('maxvalue'), _item, true ); } } }else{ @@ -1092,8 +1376,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查内容的长度 - * @method lengthValid - * @private * @static * @param {selector} _item * @attr {string} datatype 数字类型 text|bytetext|richtext @@ -1137,7 +1419,7 @@

            File: ../comps/Valid/Valid.js

            _min && ( _len < _min ) && ( _r = false ); _max && ( _len > _max ) && ( _r = false ); - JC.log( 'lengthValid: ', _min, _max, _r, _val.length ); + //JC.log( 'lengthValid: ', _min, _max, _r, _val.length ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); @@ -1146,8 +1428,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查是否为正确的数字<br /> * <br>默认范围 0 - Math.pow(10, 10) - * @method n - * @private * @static * @param {selector} _item * @attr {require} datatype - n | n-整数位数.小数位数 @@ -1178,7 +1458,7 @@

            File: ../comps/Valid/Valid.js

            _p.isMinvalue( _item ) && ( _min = _p.minvalue( _item, /\./.test( _item.attr('minvalue') ) ) || _min ); - if( /^[0]+$/.test( _valStr ) && _valStr.length > 1 ){ + if( /^[0]{2,}$/.test( _valStr ) ){ _r = false; } @@ -1190,7 +1470,82 @@

            File: ../comps/Valid/Valid.js

            _n > _pow && ( _max = Math.pow( 10, _n ) ); }); - _p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) || _max ); + + //_p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) || _max ); + _p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) ); + + if( _val >= _min && _val <= _max ){ + typeof _n != 'undefined' + && typeof _f != 'undefined' + && ( _r = new RegExp( '^(?:\-|)(?:[\\d]{0,'+_n+'}|)(?:\\.[\\d]{1,'+_f+'}|)$' ).test( _valStr ) ); + + typeof _n != 'undefined' + && typeof _f == 'undefined' + && ( _r = new RegExp( '^(?:\-|)[\\d]{1,'+_n+'}$' ).test( _valStr ) ); + + typeof _n == 'undefined' + && typeof _f != 'undefined' + && ( _r = new RegExp( '^(?:\-|)\\.[\\d]{1,'+_f+'}$' ).test( _valStr ) ); + + typeof _f == 'undefined' && /\./.test( _valStr ) && ( _r = false ); + } else _r = false; + + //JC.log( 'n', _val, typeof _n, typeof _f, typeof _min, typeof _max, _min, _max ); + }else _r = false; + + !_r && !_noError && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + + return _r; + } + /** + * 检查是否为正确的整数或者浮点数<br /> + * <br>默认范围 0 - Math.pow(10, 10) + * @static + * @param {selector} _item + * @attr {require} datatype - f | f-整数位数.小数位数 + * @attr {integer|optional} minvalue - 数值的下限 + * @attr {integer|optional} maxvalue - 数值的上限 + * + * @example + <div class="f-l"> + <input type="TEXT" name="company_n" errmsg="请填写正确的正整数" datatype="f" > + </div> + <div class="f-l"> + <input type="TEXT" name="company_n1" errmsg="请填写正确的数字, 范围1-100" datatype="f" minvalue="1", maxvalue="100" > + </div> + <div class="f-l"> + <input type="TEXT" name="company_n2" errmsg="请填写正确的数字" datatype="f-7.2" > + </div> + * + */ + , f: + function( _item, _noError ){ + var _p = this, _r = true + , _valStr = _item.val().trim() + , _val = +_valStr + ,_min = 0 + , _pow = 10 + , _max = Math.pow( 10, _pow ) + , _n, _f, _tmp; + + _p.isMinvalue( _item ) && ( _min = _p.minvalue( _item, /\./.test( _item.attr('minvalue') ) ) || _min ); + + if( /^[0]{2,}$/.test( _valStr ) ){ + _r = false; + } + + if( _r && !isNaN( _val ) && _val >= _min ){ + _item.attr('datatype').replace( /^f[^\-]*\-(.*)$/, function( $0, $1 ){ + _tmp = $1.split('.'); + _n = parseInt( _tmp[0] ); + _f = parseInt( _tmp[1] ); + _n > _pow && ( _max = Math.pow( 10, _n ) ); + }); + + typeof _n == 'undefined' && ( _n = 10 ); + typeof _f == 'undefined' && ( _f = 2 ); + + _p.isMaxvalue( _item ) && ( _max = _p.maxvalue( _item, /\./.test( _item.attr('maxvalue') ) ) ); if( _val >= _min && _val <= _max ){ typeof _n != 'undefined' @@ -1215,14 +1570,13 @@

            File: ../comps/Valid/Valid.js

            return _r; } + /** * 检查两个输入框的数值 * <br /> 数字格式为 0-pow(10,10) * <br /> 带小数点使用 nrange-int.float, 例: nrange-1.2 nrange-2.2 * <br /> <b>注意:</b> 如果不显示指定 fromNEl, toNEl, * 将会从父级查找 datatype=nrange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略 - * @method nrange - * @private * @static * @param {selector} _item * @attr {require} datatype - nrange @@ -1242,7 +1596,7 @@

            File: ../comps/Valid/Valid.js

            */ , nrange: function( _item ){ - var _p = this, _r = _p.n( _item ), _min, _max, _fromNEl, _toNEl, _items; + var _p = this, _r = _p.n( _item ), _min, _max, _fromNEl, _toNEl, _items, _tmp; if( _r ){ if( _item.is( '[fromNEl]' ) ) { @@ -1263,19 +1617,41 @@

            File: ../comps/Valid/Valid.js

            } if( _fromNEl && _fromNEl.length || _toNEl && _toNEl.length ){ - JC.log( 'nrange', _fromNEl.length, _toNEl.length ); + //JC.log( 'nrange', _fromNEl.length, _toNEl.length ); _toNEl.val( $.trim( _toNEl.val() ) ); _fromNEl.val( $.trim( _fromNEl.val() ) ); + + if( _r && _toNEl && _toNEl.length && _toNEl.attr( 'subdatatype' ) && /\beven\b/.test( _toNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.even( _toNEl ) ); + } + if( _r && _toNEl && _toNEl.length && _toNEl.attr( 'subdatatype' ) && /\bodd\b/.test( _toNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.odd( _toNEl ) ); + } + if( _r && _fromNEl && _fromNEl.length && _fromNEl.attr( 'subdatatype' ) && /\beven\b/.test( _fromNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.even( _fromNEl ) ); + } + if( _r && _fromNEl && _fromNEl.length && _fromNEl.attr( 'subdatatype' ) && /\bodd\b/.test( _fromNEl.attr( 'subdatatype' ) ) ){ + _r && ( _r = _p.odd( _fromNEl ) ); + } + if( !_r ){ + return false; + } if( _toNEl[0] != _fromNEl[0] && _toNEl.val().length && _fromNEl.val().length ){ _r && ( _r = _p.n( _toNEl, true ) ); _r && ( _r = _p.n( _fromNEl, true ) ); + _r && ( +_fromNEl.val() ) > ( +_toNEl.val() ) && ( _r = false ); - - JC.log( 'nrange:', +_fromNEl.val(), +_toNEl.val(), _r ); + + _r && ( _tmp = _fromNEl.attr( 'rangeCanEqual' ) || _toNEl.attr( 'rangeCanEqual' ) ) + && !JC.f.parseBool( _tmp ) + && ( JC.f.parseFinance( _fromNEl.val(), 10 ) === JC.f.parseFinance( _toNEl.val(), 10 ) ) + && ( _r = false ); + ; + //JC.log( 'nrange:', +_fromNEl.val(), +_toNEl.val(), _r ); _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _fromNEl ] ); _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _toNEl ] ); @@ -1289,12 +1665,10 @@

            File: ../comps/Valid/Valid.js

            return _r; } + /** * 检查是否为合法的日期, * <br />日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD - * @method d - * @private - * @static * @param {selector} _item * @attr {require} datatype - d * @attr {date string|optional} minvalue - 日期的下限 @@ -1304,12 +1678,14 @@

            File: ../comps/Valid/Valid.js

            <input type="TEXT" name="company_d" errmsg="请填写正确的日期范围2013-05-01 - 2013-05-31" datatype="daterange" minvalue="2013-05-01" maxvalue="2013-05-31" > </div> */ - , d: + , 'd': function( _item, _noError ){ - var _p = this, _val = $.trim( _item.val() ), _r = true, _date = parseISODate( _val ), _tmpDate; + var _p = this, _val = $.trim( _item.val() ), _r = true + , _date = JC.f.parseDate( _val, _item ), _tmpDate; if( _val && _date ){ + if( _p.isMinvalue( _item ) && ( _tmpDate = _p.minvalue( _item, 'd' ) ) ){ _date.getTime() < _tmpDate.getTime() && ( _r = false ); } @@ -1317,21 +1693,22 @@

            File: ../comps/Valid/Valid.js

            if( _r && _p.isMaxvalue( _item ) && ( _tmpDate = _p.maxvalue( _item, 'd' ) ) ){ _date.getTime() > _tmpDate.getTime() && ( _r = false ); } + }else if( _val ){ + _r = false; } !_r && !_noError && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } - , 'date': function(){ return this.d.apply( this, sliceArgs( arguments ) ); } + , 'date': function(){ return this.d.apply( this, JC.f.sliceArgs( arguments ) ); } + , 'ddate': function(){ return this.d.apply( this, JC.f.sliceArgs( arguments ) ); } + /** * 检查两个输入框的日期 * <br />日期格式为 YYYYMMDD, YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD * <br /> <b>注意:</b> 如果不显示指定 fromDateEl, toDateEl, * 将会从父级查找 datatype=daterange属性的input, 如果数量等于2, 则会进行验证, 不等2将忽略 - * @method daterange - * @private - * @static * @param {selector} _item * @attr {require} datatype - daterange * @attr {selector|optional} fromDateEl - 起始日期选择器 @@ -1349,7 +1726,7 @@

            File: ../comps/Valid/Valid.js

            */ , daterange: function( _item ){ - var _p = this, _r = _p.d( _item ), _min, _max, _fromDateEl, _toDateEl, _items; + var _p = this, _r = _p.d( _item ), _min, _max, _fromDateEl, _toDateEl, _items, _tmp, _datespan; if( _r ){ if( _item.is( '[fromDateEl]' ) ) { @@ -1370,20 +1747,36 @@

            File: ../comps/Valid/Valid.js

            } if( _fromDateEl && _fromDateEl.length || _toDateEl && _toDateEl.length ){ - JC.log( 'daterange', _fromDateEl.length, _toDateEl.length ); + //JC.log( 'daterange', _fromDateEl.length, _toDateEl.length ); _toDateEl.val( $.trim( _toDateEl.val() ) ); _fromDateEl.val( $.trim( _fromDateEl.val() ) ); if( _toDateEl[0] != _fromDateEl[0] && _toDateEl.val().length && _fromDateEl.val().length ){ - _r && ( _r = _p.d( _toDateEl, true ) ) && ( _min = parseISODate( _fromDateEl.val() ) ); - _r && ( _r = _p.d( _fromDateEl, true ) ) && ( _max = parseISODate( _toDateEl.val() ) ); + _r && ( _r = _p.d( _toDateEl, true ) ) && ( _min = JC.f.parseDate( _fromDateEl.val(), _fromDateEl ) ); + _r && ( _r = _p.d( _fromDateEl, true ) ) && ( _max = JC.f.parseDate( _toDateEl.val(), _toDateEl ) ); _r && _min && _max && _min.getTime() > _max.getTime() && ( _r = false ); + if( _r && _min && _max ){ + _datespan = ( _fromDateEl.attr( 'datespan' ) || _toDateEl.attr( 'datespan' ) ); + if( _datespan && ( _datespan = JC.f.dateDetect( JC.f.formatISODate( _min ) + _datespan ) ) ){ + if( _max.getTime() > _datespan.getTime() ){ + _r = false; + } + } + } + + _r && ( _tmp = _fromDateEl.attr( 'rangeCanEqual' ) || _toDateEl.attr( 'rangeCanEqual' ) ) + && !JC.f.parseBool( _tmp ) + && _min && _max + && _min.getTime() == _max.getTime() + && ( _r = false ); + ; + _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _fromDateEl ] ); _r && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _toDateEl ] ); @@ -1395,11 +1788,9 @@

            File: ../comps/Valid/Valid.js

            return _r; } + , 'drange': function(){ return this.daterange.apply( this, JC.f.sliceArgs( arguments ) ); } /** * 检查时间格式, 格式为 hh:mm:ss - * @method time - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1414,9 +1805,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查时间格式, 格式为 hh:mm - * @method minute - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1432,9 +1820,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查银行卡号码 * <br />格式为: d{15}, d{16}, d{17}, d{19} - * @method bankcard - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1449,8 +1834,9 @@

            File: ../comps/Valid/Valid.js

            ; _item.val( _v ); var _dig = _v.replace( /[^\d]/g, '' ) - , _r = /^[1-9](?:[\d]{18}|[\d]{16}|[\d]{15}|[\d]{14})$/.test( _dig ) + , _r = /^[0-9](?:[\d]{24}|[\d]{23}|[\d]{22}|[\d]{21}|[\d]{20}|[\d]{19}|[\d]{18}|[\d]{17}|[\d]{16}|[\d]{15}|[\d]{14}|[\d]{13}|[\d]{12}|[\d]{11}|[\d]{10}|[\d]{9}|[\d]{8}|)$/.test( _dig ) ; + /^[0]+$/.test( _dig ) && ( _r = false ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } @@ -1458,9 +1844,6 @@

            File: ../comps/Valid/Valid.js

            * 检查中文姓名 * <br>格式: 汉字和大小写字母 * <br>规则: 长度 2-32个字节, 非 ASCII 算2个字节 - * @method cnname - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1469,9 +1852,47 @@

            File: ../comps/Valid/Valid.js

            </div> */ , cnname: + function( _item, _noStatus ){ + var _p = this + , _r = _p.bytelen( _item.val() ) <= 32 && /^[\u4e00-\u9fa5a-zA-Z.\u3002\u2022]{2,32}$/.test( _item.val() ); + !_noStatus && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查英文 + * <br>格式: 大小写字母 + 空格 + * <br>规则: 长度 2-32个字节, 非 ASCII 算2个字节 + * @param {selector} _item + * @example + <div class="f-l"> + <input type="TEXT" name="company_enname" + datatype="enname" reqmsg="姓名" errmsg="请填写正确的姓名"> + </div> + */ + , enname: + function( _item, _noStatus ){ + var _p = this + , _r = _p.bytelen( _item.val() ) <= 32 && /^[a-zA-Z ]{2,32}$/.test( _item.val() ); + !_noStatus && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查 英文名称/中文名称 + * <br>allname = cnname + enname + * <br>规则: 长度 2-32个字节, 非 ASCII 算2个字节 + * @param {selector} _item + * @example + <div class="f-l"> + <input type="TEXT" name="company_allname" + datatype="allname" reqmsg="姓名" errmsg="请填写正确的姓名"> + </div> + */ + , allname: function( _item ){ var _p = this - , _r = _p.bytelen( _item.val() ) < 32 && /^[\u4e00-\u9fa5a-zA-Z.\u3002\u2022]{2,32}$/.test( _item.val() ); + , _r = _p.bytelen( _item.val() ) <= 32 + && ( _p.cnname( _item, true ) || _p.enname( _item, true ) ) + ; !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } @@ -1479,9 +1900,6 @@

            File: ../comps/Valid/Valid.js

            * 检查注册用户名 * <br>格式: a-zA-Z0-9_- * <br>规则: 首字母必须为 [a-zA-Z0-9], 长度 2 - 30 - * @method username - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1498,9 +1916,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查身份证号码<br /> * 目前只使用最简单的位数判断~ 有待完善 - * @method idnumber - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1515,10 +1930,42 @@

            File: ../comps/Valid/Valid.js

            return _r; } /** - * 检查手机号码<br /> - * @method mobilecode - * @private - * @static + * 检查QQ号码( 5 ~ 11位数字 ) + * @param {selector} _item + * @param {bool} _noError + * @example + <div class="f-l"> + <input type="TEXT" name="qq" + datatype="qq" + errmsg="请填写正确的qq号码"> + </div> + */ + , qq: + function( _item, _noError ){ + var _p = this, _r = /^[1-9][\d]{4,10}$/.test( _item.val() ); + !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查QQ号码( 数字号码|电子邮件 ) + * <br />5 ~ 11位数字 + * @param {selector} _item + * @param {bool} _noError + * @example + <div class="f-l"> + <input type="TEXT" name="qqall" + datatype="qqall" + errmsg="请填写正确的qq号码"> + </div> + */ + , qqall: + function( _item, _noError ){ + var _p = this, _r = _p.qq( _item, true ) || _p.email( _item, true ); + !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + return _r; + } + /** + * 检查手机号码<br /> * @param {selector} _item * @param {bool} _noError * @example @@ -1530,16 +1977,13 @@

            File: ../comps/Valid/Valid.js

            */ , mobilecode: function( _item, _noError ){ - var _p = this, _r = /^(?:13|14|15|16|18|19)[\d]{9}$/.test( _item.val() ); + var _p = this, _r = /^(?:13|14|15|16|17|18|19)[\d]{9}$/.test( _item.val() ); !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查手机号码 * <br />这个方法是 mobilecode 的别名 - * @method mobile - * @private - * @static * @param {selector} _item * @param {bool} _noError */ @@ -1550,9 +1994,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查手机号码加强方法 * <br>格式: [+国家代码] [零]11位数字 - * @method mobilezonecode - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1564,16 +2005,13 @@

            File: ../comps/Valid/Valid.js

            */ , mobilezonecode: function( _item, _noError ){ - var _p = this, _r = /^(?:\+[0-9]{1,6} |)(?:0|)(?:13|14|15|16|18|19)\d{9}$/.test( _item.val() ); + var _p = this, _r = /^(?:\+[0-9]{1,6} |)(?:0|)(?:13|14|15|16|17|18|19)\d{9}$/.test( _item.val() ); !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查电话号码 * <br>格式: 7/8位数字 - * @method phonecode - * @private - * @static * @param {selector} _item * @example <div> @@ -1590,9 +2028,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查电话号码 * <br>格式: [区号]7/8位电话号码 - * @method phone - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1611,9 +2046,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查电话号码 * <br>格式: [+国家代码][ ][电话区号][ ]7/8位电话号码[#分机号] - * @method phoneall - * @private - * @static * @param {selector} _item * @param {bool} _noError * @example @@ -1632,9 +2064,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查电话区号 - * @method phonezone - * @private - * @static * @param {selector} _item * @example <div> @@ -1655,9 +2084,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查电话分机号码 - * @method phoneext - * @private - * @static * @param {selector} _item * @example <div> @@ -1674,9 +2100,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查手机号码/电话号码 * <br />这个方法是原有方法的混合验证 mobilecode + phone - * @method mobilephone - * @private - * @static * @param {selector} _item * @example <div class="f-l label"> @@ -1698,9 +2121,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查手机号码/电话号码, 泛匹配 * <br />这个方法是原有方法的混合验证 mobilezonecode + phoneall - * @method mobilephoneall - * @private - * @static * @param {selector} _item * @example <div class="f-l label"> @@ -1720,9 +2140,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 自定义正则校验 - * @method reg - * @private - * @static * @param {selector} _item * @attr {string} reg-pattern 正则规则 /规则/选项 * @example @@ -1736,7 +2153,7 @@

            File: ../comps/Valid/Valid.js

            if( !_pattern ) _pattern = $.trim(_item.attr('datatype')).replace(/^reg(?:\-|)/i, ''); _pattern.replace( /^\/([\s\S]*)\/([\w]{0,3})$/, function( $0, $1, $2 ){ - JC.log( $1, $2 ); + //JC.log( $1, $2 ); _r = new RegExp( $1, $2 || '' ).test( _item.val() ); }); @@ -1747,9 +2164,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查验证码<br /> * 格式: 为 0-9a-zA-Z, 长度 默认为4 - * @method vcode - * @private - * @static * @param {selector} _item * @attr {string} datatype vcode|vcode-[\d]+ * @example @@ -1765,25 +2179,19 @@

            File: ../comps/Valid/Valid.js

            , vcode: function( _item ){ var _p = this, _r, _len = parseInt( $.trim(_item.attr('datatype')).replace( /^vcode(?:\-|)/i, '' ), 10 ) || 4; - JC.log( 'vcodeValid: ' + _len ); + //JC.log( 'vcodeValid: ' + _len ); _r = new RegExp( '^[0-9a-zA-Z]{'+_len+'}$' ).test( _item.val() ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查文本长度 - * @method text - * @private - * @static * @see length * @attr {string} datatype text */ , text: function(_item){ return true; } /** * 检查文本的字节长度 - * @method bytetext - * @private - * @static * @see length * @attr {string} datatype bytetext */ @@ -1791,18 +2199,12 @@

            File: ../comps/Valid/Valid.js

            /** * 检查富文本的字节 * <br />TODO: 完成富文本长度检查 - * @method richtext - * @private - * @static * @see length * @attr {string} datatype richtext */ , richtext: function(_item){ return true; } /** * 计算字符串的字节长度, 非 ASCII 0-255的字符视为两个字节 - * @method bytelen - * @private - * @static * @param {string} _s */ , bytelen: @@ -1811,9 +2213,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查URL - * @method url - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1824,16 +2223,14 @@

            File: ../comps/Valid/Valid.js

            function( _item ){ var _p = this //, _r = /^((http|ftp|https):\/\/|)[\w-]+(\.[\w-]+)+([\w.,@?^=%&amp;:\/~+#-]*[\w@?^=%&amp;\/~+#-])$/.test( _item.val() ) - , _r = /^(?:htt(?:p|ps)\:\/\/|)((?:(?:(?:\w[\.\-\+]*))\w)*)((?:(?:(?:\w[\.\-\+]*){0,62})\w)+)\.([a-z]{2,6})(?:\/[\w\/\.\#\+\-\~\%\?\_\=\&]*|)$/i.test( _item.val() ) + //, _r = /^(?:htt(?:p|ps)\:\/\/|)((?:(?:(?:\w[\.\-\+]*))\w)*)((?:(?:(?:\w[\.\-\+]*){0,62})\w)+)\.([a-z]{2,6})(?:\/[\w\/\.\#\+\-\~\%\?\_\=\&]*|)$/i.test( _item.val() ) + , _r = /^(?:htt(?:p|ps)\:\/\/|)((?:(?:(?:\w[\.\-\+]*))\w)*)((?:(?:(?:\w[\.\-\+]*){0,62})\w)+)\.([a-z]{2,6})(?:\/[^\s<>]*|)$/i.test( _item.val() ) ; !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查域名 - * @method domain - * @private - * @static * @param {selector} _item <div class="f-l"> <input type="TEXT" name="company_domain" datatype="domain" reqmsg="域名" errmsg="请填写正确的域名"> @@ -1849,9 +2246,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查域名 - * @method stricdomain - * @private - * @static * @param {selector} _item <div class="f-l"> <input type="TEXT" name="company_domain" datatype="stricdomain" reqmsg="域名" errmsg="请填写正确的域名"> @@ -1866,9 +2260,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查电子邮件 - * @method email - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1876,16 +2267,13 @@

            File: ../comps/Valid/Valid.js

            </div> */ , email: - function( _item ){ + function( _item, _noError ){ var _p = this, _r = /^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test( _item.val() ); - !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); + !_noError && !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); return _r; } /** * 检查地区代码 - * @method countrycode - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1900,9 +2288,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 检查邮政编码 - * @method zipcode - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1917,9 +2302,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 纳税人识别号, 15, 18, 20位字符 - * @method taxcode - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -1939,9 +2321,6 @@

            File: ../comps/Valid/Valid.js

            /** * 此类型检查 2|N 个对象填写的值必须一致 * 常用于注意时密码验证/重置密码 - * @method reconfirm - * @private - * @static * @param {selector} _item * @example <dd> @@ -1974,7 +2353,7 @@

            File: ../comps/Valid/Valid.js

            , _KEY = "ReconfirmValidTime" , _typeKey = 'reconfirm' ; - JC.log( _typeKey, new Date().getTime() ); + //JC.log( _typeKey, new Date().getTime() ); _p.isDatatarget( _item, _typeKey ) && (_target = _p.datatarget( _item, _typeKey ) ); !( _target && _target.length ) && ( _target = _p.samesubtypeitems( _item, _typeKey ) ); @@ -2004,6 +2383,9 @@

            File: ../comps/Valid/Valid.js

            $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, $(this) ] ); }); } + + !_r && _item.attr( 'datatypestatus', 'false' ); + _r ? $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _item ] ) : $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'reconfirmmsg', true ] ) @@ -2027,9 +2409,6 @@

            File: ../comps/Valid/Valid.js

            /** * 此类型检查 2|N个对象必须至少有一个是有输入内容的, * <br> 常用于 手机/电话 二填一 - * @method alternative - * @private - * @static * @param {selector} _item * @example <dd> @@ -2068,12 +2447,13 @@

            File: ../comps/Valid/Valid.js

            , _dt = _p.parseDatatype( _item ) , _typeKey = 'alternative' ; - JC.log( _typeKey, new Date().getTime() ); + //JC.log( _typeKey, new Date().getTime() ); _p.isDatatarget( _item, _typeKey ) && (_target = _p.datatarget( _item, _typeKey ) ); !( _target && _target.length ) && ( _target = _p.samesubtypeitems( _item, _typeKey ) ); var _isReturn = false; + var _reqTarget; if( _target.length && !$.trim( _item.val() ) ){ var _hasVal = false; @@ -2107,7 +2487,7 @@

            File: ../comps/Valid/Valid.js

            _p[ _sdt ]( $(this) ); }else if( !$(this).val() ){ $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, $(this) ] ); - var _reqTarget = parentSelector( $(this), $(this).attr( 'reqtargetdatatarget' ) ); + var _reqTarget = JC.f.parentSelector( $(this), $(this).attr( 'reqtargetdatatarget' ) ); _reqTarget && _reqTarget.length && $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _reqTarget ] ) @@ -2122,7 +2502,7 @@

            File: ../comps/Valid/Valid.js

            if( _item[0] == this ) return; var _sp = $(this), _reqTarget; if( _sp.is( '[alternativeReqTarget]' ) ){ - _reqTarget = parentSelector( _sp, _sp.attr('alternativeReqTarget') ); + _reqTarget = JC.f.parentSelector( _sp, _sp.attr('alternativeReqTarget') ); if( _reqTarget && _reqTarget.length ){ _reqTarget.each( function(){ var _ssp = $(this), _v = _ssp.val().trim(); @@ -2136,7 +2516,7 @@

            File: ../comps/Valid/Valid.js

            }); if( _item.is( '[alternativeReqTarget]' ) ){ - _reqTarget = parentSelector( _item, _item.attr('alternativeReqTarget') ); + _reqTarget = JC.f.parentSelector( _item, _item.attr('alternativeReqTarget') ); if( _reqTarget && _reqTarget.length ){ _reqTarget.each( function(){ var _ssp = $(this), _v = _ssp.val().trim(); @@ -2167,6 +2547,7 @@

            File: ../comps/Valid/Valid.js

            $(_p).trigger( Model.TRIGGER, [ Model.CORRECT, _item ] ); } }else{ + !_r && _item.attr( 'datatypestatus', 'false' ); $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'alternativemsg', true ] ); } @@ -2174,20 +2555,18 @@

            File: ../comps/Valid/Valid.js

            } /** * 如果 _item 的值非空, 那么 reqtarget 的值也不能为空 - * @method reqtarget * @param {selector} _item - * @private - * @static */ , 'reqtarget': function( _item ){ var _p = this, _r = true , _v = _item.val().trim(), _tv - , _target = parentSelector( _item, _item.attr('reqtargetdatatarget') || _item.attr('datatarget') ) + , _target = JC.f.parentSelector( _item, _item.attr('reqtargetdatatarget') || _item.attr('datatarget') ) ; if( _v && _target && _target.length ){ _tv = _target.val().trim(); !_tv && ( _r = false ); + !_r && _item.attr( 'datatypestatus', 'false' ); !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _target, 'reqtargetmsg', true ] ); _r && _target.trigger('blur'); }else if( _target && _target.length ){ @@ -2197,11 +2576,70 @@

            File: ../comps/Valid/Valid.js

            return _r; } /** + * 数值必须为偶数 + * @param {selector} _item + */ + , 'even': + function( _item ){ + var _p = this, _r = true + , _v = JC.f.parseFinance( _item.val().trim(), 9 ) || 0 + ; + + if( isNaN( _v ) ){ + _r = false; + }else if( _v % 2 !== 0 ){ + _r = false; + } + + !_r && JC.log( 'even:', _r, JC.f.gid() ); + + //!_r && _item.attr( 'datatypestatus', 'false' ); + !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'evenmsg', true ] ); + + return _r; + } + /** + * 数值必须为奇数 + * @param {selector} _item + */ + , 'odd': + function( _item ){ + var _p = this, _r = true + , _v = JC.f.parseFinance( _item.val().trim(), 9 ) || 0 + ; + + if( isNaN( _v ) ){ + _r = false; + }else if( _v % 2 === 0 ){ + _r = false; + } + + //!_r && _item.attr( 'datatypestatus', 'false' ); + !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'oddmsg', true ] ); + + return _r; + } + + + , ucheck: + function( _item ){ + var _r = true, _p = this; + this.ucheckCallback( _item ) && ( _r = this.ucheckCallback( _item )( _item ) ); + !_r && _item.attr( 'datatypestatus', 'false' ); + !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'ucheckmsg', true ] ); + return _r; + } + , ucheckCallback: + function( _item ){ + var _r; + if( _item && _item.length && _item.is( '[ucheckCallback]' ) ){ + _r = window[ _item.attr( 'ucheckCallback' ) ]; + } + return _r; + } + /** * N 个值必须保持唯一性, 不能有重复 - * @method unique * @param {selector} _item - * @private - * @static */ , 'unique': function( _item ){ @@ -2210,14 +2648,17 @@

            File: ../comps/Valid/Valid.js

            , _len = _p.typeLen( _item.attr('subdatatype') )[0] , _KEY = "UniqueValidTime" , _typeKey = 'unique' - , _ignoreCase = parseBool( _item.attr('uniqueIgnoreCase') ) + , _ignoreCase = JC.f.parseBool( _item.attr('uniqueIgnoreCase') ) + , _errLs, _corLs ; - JC.log( _typeKey, new Date().getTime() ); + //JC.log( _typeKey, new Date().getTime() ); _p.isDatatarget( _item, _typeKey ) && (_target = _p.datatarget( _item, _typeKey ) ); !( _target && _target.length ) && ( _target = _p.samesubtypeitems( _item, _typeKey ) ); + //JC.log( _target && _target.length ? _target.length : 'null' ); + _errLs = []; _corLs = []; @@ -2226,12 +2667,21 @@

            File: ../comps/Valid/Valid.js

            _tmp = {}; _target.each( function( _ix ){ var _sp = $(this); - if( ! _p.isAvalible( _sp ) ) return; + if( _sp.is('[processDisabled]') + && ( !_sp.attr('processDisabled') + || JC.f.parseBool( _sp.attr('processDisabled' ) ) + ) + ){ + if( !( _sp.is(':visible') || _p.isValidHidden( _sp ) ) ) return; + }else{ + if( ! _p.isAvalible( _sp ) ) return; + } if( _p.checkRepeatProcess( _sp, _KEY, true ) ) { _isReturn = true; //return false; } + //JC.log( _ix, _sp.val() ); if( _ix % _len === 0 ){ _group.push( [] ); @@ -2245,15 +2695,16 @@

            File: ../comps/Valid/Valid.js

            $.each( _group, function( _ix, _items ){ var _tmpAr = [], _ignoreEmpty = false; $.each( _items, function( _six, _sitem ){ - var _tmpV, _ignore = parseBool( _sitem.attr('uniqueIgnoreEmpty') ); + var _tmpV, _ignore = JC.f.parseBool( _sitem.attr('uniqueIgnoreEmpty') ); _tmpV = $(_sitem).val().trim(); - _ignore && !_tmpV && _sitem.is(':visible') && ( _ignoreEmpty = true ); + _ignore && !_tmpV && ( _sitem.is(':visible') || _p.isValidHidden( _sitem ) ) && ( _ignoreEmpty = true ); _tmpAr.push( _tmpV ); }); + var _pureVal = _tmpAr.join(''), _compareVal = _tmpAr.join('####'); if( _ignoreEmpty ) return; - var _pureVal = _tmpAr.join(''), _compareVal = _tmpAr.join('IOU~IOU'); if( !_pureVal ) return; _ignoreCase && ( _compareVal = _compareVal.toLowerCase() ); + //JC.log( _compareVal ); if( _compareVal in _tmp ){ _tmp[ _compareVal ].push( _items ); @@ -2280,13 +2731,25 @@

            File: ../comps/Valid/Valid.js

            //if( _isReturn ) return _r; $.each( _corLs, function( _ix, _sitem ){ - Valid.setValid( _sitem ); + var _dt = _p.parseDatatype( _sitem ) + if( _dt && _p[ _dt ] && _sitem.val() ){ + if( _p[ _dt ]( _sitem ) ){ + Valid.setValid( _sitem ); + } + }else{ + Valid.setValid( _sitem ); + } }); + !_r && _item.attr( 'datatypestatus', 'false' ); + !_r && _errLs.length && $.each( _errLs, function( _ix, _sitem ){ _sitem = $( _sitem ); + var _sv = ( _sitem.val() || '' ).trim(); if( _isReturn ) return false; - _sitem.val() + if( ! _sv ) return; + //JC.log('yyyyyyyyyyyyy', _sitem.data('JCValidStatus'), new Date().getTime() ); + _sv && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _sitem, 'uniquemsg', true ] ); } ); @@ -2297,12 +2760,20 @@

            File: ../comps/Valid/Valid.js

            function( _item ){ var _r = true, _p = this; if( !Valid.isFormValid ) return _r; + if( !_item.is( '[datavalid]') ) return _r; - _r = parseBool( _item.attr('datavalid') ); + //JC.log( 'datavalid', new Date().getTime() ); - setTimeout( function(){ - !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'datavalidmsg', true ] ); - }, 1 ); + _r = JC.f.parseBool( _item.attr('datavalid') ); + + if( !_r ){ + !_r && _item.attr( 'datatypestatus', 'false' ); + Valid.statusTimeout.error( _item, + setTimeout( function(){ + $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'datavalidmsg', true ] ); + }, 1 ) + ); + } return _r; } @@ -2337,7 +2808,7 @@

            File: ../comps/Valid/Valid.js

            } , findErrorEle: function( _item ){ - var _p = this, _selector = Model.SELECTOR_ERROR, _r = _item.find( _selector ); + var _p = this, _selector = Model.SELECTOR_ERROR, _r = _item.find( _selector ), _tmp; if( _item.attr('emel') && ( _tmp = _p.getElement( _item.attr('emel'), _item, _selector ) ).length ) _r = _tmp; return _r; @@ -2345,9 +2816,6 @@

            File: ../comps/Valid/Valid.js

            /** * 获取 _selector 对象 * <br />这个方法的存在是为了向后兼容qwrap, qwrap DOM参数都为ID - * @method getElement - * @private - * @static * @param {selector} _selector */ , getElement: @@ -2356,7 +2824,7 @@

            File: ../comps/Valid/Valid.js

            _subselector = _subselector || Model.SELECTOR_ERROR; _selector = $( _item.parent().find( _subselector ) ); }else if( /^[\/\|\<\(]/.test( _selector ) ) { - _selector = parentSelector( _item, _selector ); + _selector = JC.f.parentSelector( _item, _selector ); }else if( /\./.test( _selector ) ) { return $( _selector ); }else if( /^[\w-]+$/.test( _selector ) ) { @@ -2368,9 +2836,6 @@

            File: ../comps/Valid/Valid.js

            /** * 获取对应的错误信息, 默认的错误信息有 reqmsg, errmsg, <br /> * 注意: 错误信息第一个字符如果为空格的话, 将完全使用用户定义的错误信息, 将不会动态添加 请上传/选择/填写 - * @method errorMsg - * @private - * @static * @param {selector} _item * @param {string} _msgAttr - 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 * @param {bool} _fullMsg - 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写 @@ -2403,9 +2868,6 @@

            File: ../comps/Valid/Valid.js

            /** * 检查内容是否为空, * <br>如果声明了该属性, 那么 value 须不为空 - * @method reqmsg - * @private - * @static * @param {selector} _item * @example <div class="f-l"> @@ -2424,7 +2886,7 @@

            File: ../comps/Valid/Valid.js

            } !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item, 'reqmsg' ] ); - JC.log( 'regmsgValid: ' + _r ); + //JC.log( 'regmsgValid: ' + _r ); return _r; } , sametypeitems: @@ -2468,13 +2930,13 @@

            File: ../comps/Valid/Valid.js

            , focusmsgeverytime: function( _item ){ var _r = Valid.focusmsgEverytime; - _item.is( '[focusmsgeverytime]' ) && ( _r = parseBool( _item.attr('focusmsgeverytime') ) ); + _item.is( '[focusmsgeverytime]' ) && ( _r = JC.f.parseBool( _item.attr('focusmsgeverytime') ) ); return _r; } , validemdisplaytype: function( _item ){ _item && ( _item = $( _item ) ); - var _r = Valid.emDisplayType, _form = getJqParent( _item, 'form' ), _tmp; + var _r = Valid.emDisplayType, _form = JC.f.getJqParent( _item, 'form' ), _tmp; _form &&_form.length && _form.is( '[validemdisplaytype]' ) && ( _tmp = _form.attr('validemdisplaytype') ) @@ -2488,7 +2950,8 @@

            File: ../comps/Valid/Valid.js

            return _r; } /** - * 这里需要优化检查, 目前会重复检查 + * 这里需要优化检查, 目前会重复检查(2次) + * */ , checkedType: function( _item, _type ){ @@ -2499,41 +2962,61 @@

            File: ../comps/Valid/Valid.js

            , _items , _tmp , _ckLen = 1 + , _ckMaxLen = 0 , _count = 0 , _finder = _item , _pntIsLabel = _item.parent().prop('nodeName').toLowerCase() == 'label' - , _finderKey = _type + 'finder'; + , _finderKey = _type + 'finder' + , _KEY = 'checkedType_' + _type + , _isReturn ; - JC.log( _item.attr('name') + ', ' + _item.val() ); + if( _p.checkRepeatProcess( _item, _KEY, true ) && !_item.data( 'Last' + _type ) ) { + return !_item.data( 'isErrorVck' ); + } + //JC.log( 'checkedType', JC.f.gid() ); if( _item.is( '[datatarget]' ) ){ - _items = parentSelector( _item, _item.attr('datatarget') ); + _items = JC.f.parentSelector( _item, _item.attr('datatarget') ); _tmp = []; _items.each( function(){ var _sp = $(this); - _sp.is(':visible') + if( + ( _sp.is(':visible') || _p.isValidHidden( _sp ) ) && !_sp.prop('disabled') - && _tmp.push( _sp ); + ){ + _tmp.push( _sp ); + if( _p.checkRepeatProcess( _sp, _KEY, true ) ) { + _isReturn = true; + } + } + }); _items = $( _tmp ); }else{ if( _pntIsLabel ){ if( !_finder.is('[' + _finderKey + ']') ) _finder = _item.parent().parent(); - else _finder = parentSelector( _item, _item.attr( _finderKey ) ); - _tmp = parentSelector( _finder, '|input[datatype]' ); + else _finder = JC.f.parentSelector( _item, _item.attr( _finderKey ) ); + _tmp = JC.f.parentSelector( _finder, '|input[datatype]' ); } else{ - _tmp = parentSelector( _finder, '/input[datatype]' ); + _tmp = JC.f.parentSelector( _finder, '/input[datatype]' ); } _items = []; _tmp.each( function(){ var _sp = $(this); var _re = new RegExp( _type, 'i' ); - _re.test( _sp.attr('datatype') ) - && _sp.is(':visible') - && !_sp.prop('disabled') - && _items.push( _sp ); + + if( + _re.test( _sp.attr('datatype') ) + && ( _sp.is(':visible') || _p.isValidHidden( _sp ) ) + && !_sp.prop('disabled') + ){ + _items.push( _sp ); + if( _p.checkRepeatProcess( _sp, _KEY, true ) ) { + _isReturn = true; + } + } }); _items = $( _items ); } @@ -2549,9 +3032,10 @@

            File: ../comps/Valid/Valid.js

            _items.length && $( _item = _items[ _items.length - 1 ] ).data('Last' + _type, true); if( _items.length ){ - _item.is( '[datatype]' ) - && _item.attr('datatype') - .replace( /[^\-]+?\-([\d]+)/, function( $0, $1 ){ _ckLen = parseInt( $1, 10 ) || _ckLen; } ); + if( _item.is( '[datatype]' ) && _item.attr( 'datatype' ) ){ + _item.attr('datatype').replace( /[^\-]+?\-([\d]+)/, function( $0, $1 ){ _ckLen = parseInt( $1, 10 ) || _ckLen; } ); + _item.attr('datatype').replace( /[^\-]+?\-[\d]+?(?:\.|\-)([\d]+)/, function( $0, $1 ){ _ckMaxLen = parseInt( $1, 10 ) || _ckMaxLen; } ); + } if( _items.length >= _ckLen ){ _items.each( function(){ @@ -2560,9 +3044,22 @@

            File: ../comps/Valid/Valid.js

            if( _count < _ckLen ){ _r = false; + }else if( _ckMaxLen && _count > _ckMaxLen ){ + _r = false; } } + if( !_r ){ + _item.data( 'isErrorVck', true ); + _items.each( function(){ + $( this ).data( 'isErrorVck', true ); + }); + }else{ + _item.data( 'isErrorVck', false ); + _items.each( function(){ + $( this ).data( 'isErrorVck', false ); + }); + } !_r && $(_p).trigger( Model.TRIGGER, [ Model.ERROR, _item ] ); } @@ -2615,6 +3112,23 @@

            File: ../comps/Valid/Valid.js

            ; return _r; } + + , ignoreAutoCheckEvent: + function( _item ){ + var _r = Valid.ignoreAutoCheckEvent, _form; + _item && ( _item = $( _item ) ); + if( _item && _item.length ){ + _form = JC.f.getJqParent( _item, 'form' ); + _form + && _form.length + && _form.is( '[ignoreAutoCheckEvent]' ) + && ( _r = JC.f.parseBool( _form.attr( 'ignoreAutoCheckEvent' ) ) ); + + _item.is( '[ignoreAutoCheckEvent]' ) + && ( _r = JC.f.parseBool( _item.attr( 'ignoreAutoCheckEvent' ) ) ); + } + return _r; + } }; function View( _model ){ @@ -2624,13 +3138,64 @@

            File: ../comps/Valid/Valid.js

            View.prototype = { init: function() { + var _p = this; + + $(_p).on( 'setValid', function( _evt, _item, _tm, _noStyle, _hideFocusMsg ){ + var _tmp; + _item.removeClass( Model.CSS_ERROR ); + _item.find( + JC.f.printf( '~ em:not("em.focusmsg, em.validmsg, {0}")', Model.FILTER_ERROR ) ) + .css('display', _p._model.validemdisplaytype( _item ) + ); + _item.find( Model.SELECTOR_ERROR ).hide(); + _item.attr('emel') + && ( _tmp = _p._model.getElement( _item.attr('emel'), _item ) ) + && _tmp.hide(); + + typeof _noStyle == 'undefined' + && typeof _item.val() != 'object' + && !_item.val().trim() + && ( _noStyle = 1 ); + + _p.validMsg( _item, _noStyle, _hideFocusMsg ); + }); + + $( _p ).on( 'setError', function( _evt, _item, _msgAttr, _fullMsg ){ + var _msg = _p._model.errorMsg.apply( _p._model, [ _item, _msgAttr, _fullMsg ] ) + , _errEm + , _validEm + , _focusEm + , _tmp + ; + + _item.addClass( Model.CSS_ERROR ); + _item.find( JC.f.printf( '~ em:not({0})', Model.FILTER_ERROR ) ).hide(); + + if( _item.is( '[validel]' ) ){ + ( _validEm = _p._model.getElement( _item.attr( 'validel' ) , _item) ) + && _validEm.hide(); + } + if( _item.is( '[focusel]' ) ){ + ( _focusEm = _p._model.getElement( _item.attr( 'focusel' ) , _item) ) + && _focusEm.hide(); + } + if( _item.is( '[emEl]' ) ){ + ( _errEm = _p._model.getElement( _item.attr( 'emEl' ) , _item) ) + && _errEm.addClass( Model.CSS_ERROR ); + } + !( _errEm && _errEm.length ) && ( _errEm = _item.find( Model.SELECTOR_ERROR ) ); + if( !_errEm.length ){ + ( _errEm = $( JC.f.printf( '<em class="{0}"></em>', Model.CSS_ERROR ) ) ).insertAfter( _item ); + } + !_msg.trim() && ( _msg = "&nbsp;" ); + _errEm.html( _msg ).css('display', _p._model.validemdisplaytype( _item ) ); + //JC.log( 'error:', _msg ); + }); + return this; } /** * 显示正确的视觉效果 - * @method valid - * @private - * @static * @param {selector} _item * @param {int} _tm * @param {bool} _noStyle @@ -2638,35 +3203,22 @@

            File: ../comps/Valid/Valid.js

            , valid: function( _item, _tm, _noStyle ){ _item && ( _item = $(_item) ); - var _p = this, _tmp, _focusEm; + var _p = this, _tmp; _item.data( 'JCValidStatus', true ); //if( !_p._model.isValid( _item ) ) return false; - var _hideFocusMsg = !parseBool( _item.attr('validnoerror' ) ); - setTimeout(function(){ - _item.removeClass( Model.CSS_ERROR ); - _item.find( printf( '~ em:not("em.focusmsg, em.validmsg, {0}")', Model.FILTER_ERROR ) ).css('display', _p._model.validemdisplaytype( _item ) ); - _item.find( Model.SELECTOR_ERROR ).hide(); - _item.attr('emel') - && ( _tmp = _p._model.getElement( _item.attr('emel'), _item ) ) - && _tmp.hide(); - - typeof _noStyle == 'undefined' - && typeof _item.val() != 'object' - && !_item.val().trim() - && ( _noStyle = 1 ); - - _p.validMsg( _item, _noStyle, _hideFocusMsg ); - ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, true ); + var _hideFocusMsg = !JC.f.parseBool( _item.attr('validnoerror' ) ); - }, _tm || 150); + Valid.statusTimeout.valid( _item, + setTimeout(function(){ + $(_p).trigger( 'setValid', [ _item, _tm, _noStyle, _hideFocusMsg ] ); + ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, true ); + }, _tm || 150) + ); } , validMsg: function( _item, _noStyle, _hideFocusMsg ){ var _p = this, _msg = ( _item.attr('validmsg') || '' ).trim().toLowerCase(), _focusEm; - /* - */ - if( _p._model.isValidMsg( _item ) ){ if( _msg == 'true' || _msg == '1' ) _msg = ''; !_msg.trim() && ( _msg = '&nbsp;' ); //chrome bug, 内容为空会换行 @@ -2699,9 +3251,6 @@

            File: ../comps/Valid/Valid.js

            } /** * 显示错误的视觉效果 - * @method error - * @private - * @static * @param {selector} _item * @param {string} _msgAttr - 显示指定需要读取的错误信息属性名, 默认为 reqmsg, errmsg, 通过该属性可以指定别的属性名 * @param {bool} _fullMsg - 显示指定错误信息为属性的值, 而不是自动添加的 请上传/选择/填写 @@ -2709,44 +3258,18 @@

            File: ../comps/Valid/Valid.js

            , error: function( _item, _msgAttr, _fullMsg ){ _item && ( _item = $(_item) ); - var _p = this, arg = arguments; + var _p = this, arg = arguments, _tmp; //if( !_p._model.isValid( _item ) ) return true; if( _item.is( '[validnoerror]' ) ) return true; _item.data( 'JCValidStatus', false ); - setTimeout(function(){ - var _msg = _p._model.errorMsg.apply( _p._model, sliceArgs( arg ) ) - , _errEm - , _validEm - , _focusEm - ; - - _item.addClass( Model.CSS_ERROR ); - _item.find( printf( '~ em:not({0})', Model.FILTER_ERROR ) ).hide(); - - if( _item.is( '[validel]' ) ){ - ( _validEm = _p._model.getElement( _item.attr( 'validel' ) , _item) ) - && _validEm.hide(); - } - if( _item.is( '[focusel]' ) ){ - ( _focusEm = _p._model.getElement( _item.attr( 'focusel' ) , _item) ) - && _focusEm.hide(); - } - if( _item.is( '[emEl]' ) ){ - ( _errEm = _p._model.getElement( _item.attr( 'emEl' ) , _item) ) - && _errEm.addClass( Model.CSS_ERROR ); - } - !( _errEm && _errEm.length ) && ( _errEm = _item.find( Model.SELECTOR_ERROR ) ); - if( !_errEm.length ){ - ( _errEm = $( printf( '<em class="{0}"></em>', Model.CSS_ERROR ) ) ).insertAfter( _item ); - } - !_msg.trim() && ( _msg = "&nbsp;" ); - _errEm.html( _msg ).css('display', _p._model.validemdisplaytype( _item ) ); - - JC.log( 'error:', _msg ); + Valid.statusTimeout.error( _item, + setTimeout(function(){ + $(_p).trigger( 'setError', [ _item, _msgAttr, _fullMsg ] ); + ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, false); - }, 150); - ( _tmp = _p._model.validitemcallback( _item ) ) && _tmp( _item, false); + }, 150) + ); return false; } @@ -2756,7 +3279,7 @@

            File: ../comps/Valid/Valid.js

            if( _item && ( _item = $( _item ) ).length && ( _item.is('[focusmsg]') || ( _msgAttr && _item.is( '[' + _msgAttr + ']') ) ) ){ - JC.log( 'focusmsg', new Date().getTime() ); + //JC.log( 'focusmsg', new Date().getTime() ); var _r, _p = this , _focusmsgem = _p._model.findFocusEle( _item ) @@ -2809,15 +3332,38 @@

            File: ../comps/Valid/Valid.js

            * @private */ $(document).delegate( 'input[type=text], input[type=password], textarea', 'blur', function($evt){ - Valid.getInstance().trigger( Model.FOCUS_MSG, [ $(this), true ] ); - Valid.check( $(this) ); + var _p = $(this), _ins = Valid.getInstance(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p, true ] ); + Valid.checkTimeout( _p ); }); + /** + * 响应没有 type 的 文本框 + */ + $(document).delegate( 'input', 'blur', function( _evt ){ + var _p = $(this), _ins = Valid.getInstance(); + if( _p.attr( 'type' ) ) return; + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p, true ] ); + Valid.checkTimeout( _p ); + }); + $(document).delegate( 'input', 'focus', function($evt){ + var _p = $(this), _ins = Valid.getInstance(), _v = ( _p.val()||'').trim(); + if( _p.attr( 'type' ) ) return; + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p ] ); + !_v && Valid.setValid( _p ); + }); + /** * 响应表单子对象的 change 事件, 触发事件时, 检查并显示错误或正确的视觉效果 * @private */ - $(document).delegate( 'select, input[type=file], input[type=checkbox], input[type=radio]', 'change', function($evt){ - Valid.check( $(this) ); + $(document).delegate( 'select, input[type=file], input[type=checkbox], input[type=radio]', 'change', function($evt, _ignore){ + if( _ignore ) return; + var _p = $(this), _ins = Valid.getInstance(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + Valid.checkTimeout( _p ); }); /** * 响应表单子对象的 focus 事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息 @@ -2825,44 +3371,49 @@

            File: ../comps/Valid/Valid.js

            */ $(document).delegate( 'input[type=text], input[type=password], textarea' +', select, input[type=file], input[type=checkbox], input[type=radio]', 'focus', function($evt){ - var _sp = $(this), _v = _sp.val().trim(); - Valid.getInstance().trigger( Model.FOCUS_MSG, [ $(this) ] ); - !_v && Valid.setValid( _sp ); + var _p = $(this), _ins = Valid.getInstance(), _v = ( _p.val() || '' ).trim(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p ] ); + !_v && Valid.setValid( _p ); }); /** * 响应表单子对象的 blur事件, 触发事件时, 如果有 focusmsg 属性, 则显示对应的提示信息 * @private */ $(document).delegate( 'select, input[type=file], input[type=checkbox], input[type=radio]', 'blur', function($evt){ - Valid.getInstance().trigger( Model.FOCUS_MSG, [ $(this), true ] ); + var _p = $(this), _ins = Valid.getInstance(); + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _ins.trigger( Model.FOCUS_MSG, [ _p, true ] ); }); $(document).delegate( 'input[type=hidden][subdatatype]', 'change', function( _evt ){ - var _sp = $(this), _isHidden = false, _tmp; - _sp.is( '[subdatatype]' ) && ( _isHidden = /hidden/i.test( _sp.attr('subdatatype') ) ); - if( _sp.data('HID_CHANGE_CHECK') ){ - _tmp = new Date().getTime() - _sp.data('HID_CHANGE_CHECK') ; + var _p = $(this), _ins = Valid.getInstance(), _isHidden = false, _tmp; + if( _ins._model.ignoreAutoCheckEvent( _p ) ) return; + _p.is( '[subdatatype]' ) && ( _isHidden = /hidden/i.test( _p.attr('subdatatype') ) ); + if( _p.data('HID_CHANGE_CHECK') ){ + _tmp = new Date().getTime() - _p.data('HID_CHANGE_CHECK') ; if( _tmp < 50 ){ return; } } - if( !_sp.val() ){ - //Valid.setValid( _sp ); + if( !_p.val() ){ + //Valid.setValid( _p ); return; } - _sp.data('HID_CHANGE_CHECK', new Date().getTime() ); - JC.log( 'hidden val', new Date().getTime(), _sp.val() ); - Valid.check( _sp ); + _p.data('HID_CHANGE_CHECK', new Date().getTime() ); + //JC.log( 'hidden val', new Date().getTime(), _p.val() ); + Valid.checkTimeout( $(this) ); }); /** - * 初始化 subdatatype = datavalid 相关事件 + * 初始化 [ subdatatype = datavalid | exdatatype = datavalid ] 相关事件 */ - $(document).delegate( 'input[type=text][subdatatype]', 'keyup', function( _evt ){ - var _sp = $(this); + $(document).delegate( 'input[type=text][subdatatype], input[type=text][exdatatype]', 'keyup', function( _evt ){ + var _sp = $(this), _isEx; - var _isDatavalid = /datavalid/i.test( _sp.attr('subdatatype') ); + var _isDatavalid = /datavalid/i.test( _sp.attr('exdatatype') || _sp.attr('subdatatype') ); if( !_isDatavalid ) return; if( _sp.prop('disabled') || _sp.prop('readonly') ) return; + _sp.attr( 'exdatatype' ) && ( _isEx = true ); Valid.dataValid( _sp, false, true ); var _keyUpCb; @@ -2874,11 +3425,18 @@

            File: ../comps/Valid/Valid.js

            if( _sp.data( 'DataValidInited' ) ) return; _sp.data( 'DataValidInited', true ); _sp.data( 'DataValidCache', {} ); + !_sp.is( '[datavalidNoCache]' ) && _sp.attr( 'datavalidNoCache', true ); + + //JC.log( JC.f.parseBool( _sp.attr( 'datavalidNoCache' ) ) ); - _sp.on( 'DataValidUpdate', function( _evt, _v ){ + _sp.on( 'DataValidUpdate', function( _evt, _v, _data ){ var _tmp, _json; - if( !_sp.data( 'DataValidCache') ) return; - _json = _sp.data( 'DataValidCache' )[ _v ]; + if( JC.f.parseBool( _sp.attr( 'datavalidNoCache' ) ) ){ + _json = _data; + }else{ + if( !_sp.data( 'DataValidCache') ) return; + _json = _sp.data( 'DataValidCache' )[ _v ]; + } if( !_json ) return; _v === 'suchestest' && ( _json.data.errorno = 0 ); @@ -2889,11 +3447,20 @@

            File: ../comps/Valid/Valid.js

            ; }); - _sp.on( 'blur', function( _evt, _ignoreProcess ){ - JC.log( 'datavalid', new Date().getTime() ); - if( _ignoreProcess ) return; - var _v = _sp.val().trim(), _tmp, _strData, _url = _sp.attr('datavalidurl'); + _sp.on( 'DataValidVerify', function( _evt, _ignoreStatus, _cb ){ + var _v = _sp.val().trim(), _tmp, _strData + , _url = _sp.attr('datavalidurl') + , _datavalidCheckCallback; if( !_v ) return; + + _sp.attr('datavalidCheckCallback') + && ( _datavalidCheckCallback = window[ _sp.attr('datavalidCheckCallback') ] ) + ; + if( _datavalidCheckCallback ){ + innerDone( _datavalidCheckCallback.call( _sp ) ); + return; + } + if( !_url ) return; _sp.data( 'DataValidTm' ) && clearTimeout( _sp.data( 'DataValidTm') ); @@ -2901,8 +3468,13 @@

            File: ../comps/Valid/Valid.js

            , setTimeout( function(){ _v = _sp.val().trim(); if( !_v ) return; - if( !_sp.data('JCValidStatus') ) return; - _url = printf( _url, _v ); + _v = JC.f.encoder( _sp )( _v ); + + if( !_ignoreStatus ){ + if( !_sp.data('JCValidStatus') ) return; + } + + _url = JC.f.printf( _url, _v ); _sp.attr('datavalidUrlFilter') && ( _tmp = window[ _sp.attr('datavalidUrlFilter') ] ) && ( _url = _tmp.call( _sp, _url ) ) @@ -2911,19 +3483,56 @@

            File: ../comps/Valid/Valid.js

            _sp.trigger( 'DataValidUpdate', _v ); return; } - $.get( _url ).done( function( _d ){ - _strData = _d; - try{ _d = $.parseJSON( _d ); } catch( ex ){ _d = { errorno: 1 }; } - _sp.data( 'DataValidCache' )[ _v ] = { 'key': _v, data: _d, 'text': _strData }; - _sp.trigger( 'DataValidUpdate', _v ); - }); + var _ajaxType = 'get', _requestData; + _sp.attr( 'datavalidAjaxType' ) && ( _ajaxType = _sp.attr( 'datavalidAjaxType' ) || _ajaxType ); + if( _sp.attr( 'datavalidRequestData' ) ){ + try{ _requestData = eval( '(' + _sp.attr('datavalidRequestData') + ')' ); }catch( ex ){} + } + _requestData = _requestData || {}; + + if( _ajaxType.toLowerCase() == 'post' ){ + $.post( _url, _requestData ).done( innerDone ); + }else{ + $.get( _url, _requestData ).done( innerDone ); + } }, 151) ); - + + function innerDone( _d ){ + _strData = _d; + if( typeof _d == 'string' ){ + try{ _d = $.parseJSON( _d ); } catch( ex ){ _d = { errorno: 1 }; } + } + + var _data = { 'key': _v, data: _d, 'text': _strData }; + + !JC.f.parseBool( _sp.attr( 'datavalidNoCache' ) ) + && ( _sp.data( 'DataValidCache' )[ _v ] = _data ); + + _sp.trigger( 'DataValidUpdate', [ _v, _data ] ); + + _cb && _cb.call( _sp, _data ); + } + + }); + + _sp.on( 'blur', function( _evt, _ignoreProcess ){ + //JC.log( 'datavalid', new Date().getTime() ); + if( _ignoreProcess ) return; + _sp.trigger( 'DataValidVerify' ); }); }); -}(jQuery)); + return JC.Valid; +});}( typeof define === 'function' && define.amd ? define : + function ( _name, _require, _cb) { + typeof _name == 'function' && ( _cb = _name ); + typeof _require == 'function' && ( _cb = _require ); + _cb && _cb(); + } + , window + ) +);
            diff --git a/docs_api/files/.._jquery.js.html b/docs_api/files/.._jquery.js.html index c392f8c48..f31574214 100644 --- a/docs_api/files/.._jquery.js.html +++ b/docs_api/files/.._jquery.js.html @@ -3,11 +3,17 @@ ../jquery.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            @@ -195,10 +267,9590 @@

            File: ../jquery.js

            * @namespace window * @global */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<9 + // For `typeof node.method` instead of `node.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + location = window.location, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.9.1", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( list && ( !fired || stack ) ) { + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function() { + + var support, all, a, + input, select, fragment, + opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; + + // Support tests won't run in some limited or non-browser environments + all = div.getElementsByTagName("*"); + a = div.getElementsByTagName("a")[ 0 ]; + if ( !all || !a || !all.length ) { + return {}; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + support = { + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.5/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + checkOn: !!input.value, + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Tests for enctype support on a form (#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + boxModel: document.compatMode === "CSS1Compat", + + // Will be defined later + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + boxSizingReliable: true, + pixelPosition: false + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + support.boxSizing = ( div.offsetWidth === 4 ); + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "<div></div>"; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})(); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var i, l, thisCache, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( !name.indexOf( "data-" ) ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + // Try to fetch any internally stored data first + return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + } + + this.each(function() { + jQuery.data( this, key, value ); + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + hooks.cur = fn; + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val, + self = jQuery(this); + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, notxml, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + // In IE9+, Flash objects don't have .getAttribute (#12945) + // Support: IE9+ + if ( typeof elem.getAttribute !== core_strundefined ) { + try{ ret = elem.getAttribute( name ); }catch( ex ){} + } + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( rboolean.test( name ) ) { + // Set corresponding property to false for boolean attributes + // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 + if ( !getSetAttribute && ruseDefault.test( name ) ) { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } else { + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + var + // Use .prop to determine if this attribute is understood as boolean + prop = jQuery.prop( elem, name ), + + // Fetch it accordingly + attr = typeof prop === "boolean" && elem.getAttribute( name ), + detail = typeof prop === "boolean" ? + + getSetInput && getSetAttribute ? + attr != null : + // oldIE fabricates an empty string for missing boolean attributes + // and conflates checked/selected into attroperties + ruseDefault.test( name ) ? + elem[ jQuery.camelCase( "default-" + name ) ] : + !!attr : + + // fetch an attribute node for properties not recognized as boolean + elem.getAttributeNode( name ); + + return detail && detail.value !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; + +// fix oldIE value attroperty +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return jQuery.nodeName( elem, "input" ) ? + + // Ignore the value *property* by using defaultValue + elem.defaultValue : + + ret && ret.specified ? ret.value : undefined; + }, + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? + ret.value : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret == null ? undefined : ret; + } + }); + }); + + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + event.isTrigger = true; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG <use> instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur != this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + } + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== document.activeElement && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === document.activeElement && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function( window, undefined ) { + +var i, + cachedruns, + Expr, + getText, + isXML, + compile, + hasDuplicate, + outermostContext, + + // Local document vars + setDocument, + document, + docElem, + documentIsXML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + sortOrder, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + support = {}, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Array methods + arr = [], + pop = arr.pop, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + + rnative = /^[^{]+\{\s*\[native code/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, + funescape = function( _, escaped ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + return high !== high ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Use a stripped-down slice if we can't use a native one +try { + slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; +} catch ( e ) { + slice = function( i ) { + var elem, + results = []; + while ( (elem = this[i++]) ) { + results.push( elem ); + } + return results; + }; +} + +/** + * For feature detection + * @param {Function} fn The function to test for native support + */ +function isNative( fn ) { + return rnative.test( fn + "" ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var cache, + keys = []; + + return (cache = function( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + }); +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return fn( div ); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( !documentIsXML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); + return results; + } + } + + // QSA path + if ( support.qsa && !rbuggyQSA.test(selector) ) { + old = true; + nid = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, slice.call( newContext.querySelectorAll( + newSelector + ), 0 ) ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsXML = isXML( doc ); + + // Check if getElementsByTagName("*") returns only elements + support.tagNameNoComments = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if attributes should be retrieved by attribute nodes + support.attributes = assert(function( div ) { + div.innerHTML = "<select></select>"; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }); + + // Check if getElementsByClassName can be trusted + support.getByClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length === 2; + }); + + // Check if getElementById returns elements by name + // Check if getElementsByName privileges form controls or returns elements by ID + support.getByName = assert(function( div ) { + // Inject content + div.id = expando + 0; + div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; + docElem.insertBefore( div, docElem.firstChild ); + + // Test + var pass = doc.getElementsByName && + // buggy browsers will return fewer than the correct 2 + doc.getElementsByName( expando ).length === 2 + + // buggy browsers will return more than the correct 0 + doc.getElementsByName( expando + 0 ).length; + support.getIdNotName = !doc.getElementById( expando ); + + // Cleanup + docElem.removeChild( div ); + + return pass; + }); + + // IE6/7 return modified attributes + Expr.attrHandle = assert(function( div ) { + div.innerHTML = "<a href='#'></a>"; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }) ? + {} : + { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; + + // ID find and filter + if ( support.getIdNotName ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && !documentIsXML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && !documentIsXML ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.tagNameNoComments ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Name + Expr.find["NAME"] = support.getByName && function( tag, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; + + // Class + Expr.find["CLASS"] = support.getByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { + return context.getElementsByClassName( className ); + } + }; + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21), + // no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [ ":focus" ]; + + if ( (support.qsa = isNative(doc.querySelectorAll)) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explictly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = "<select><option selected=''></option></select>"; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE8 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = "<input type='hidden' i=''/>"; + if ( div.querySelectorAll("[i^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + var compare; + + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { + if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { + if ( a === doc || contains( preferredDoc, a ) ) { + return -1; + } + if ( b === doc || contains( preferredDoc, b ) ) { + return 1; + } + return 0; + } + return compare & 4 ? -1 : 1; + } + + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + // Always assume the presence of duplicates if sort doesn't + // pass them to our comparison function (as in Google Chrome). + hasDuplicate = false; + [0, 0].sort( sortOrder ); + support.detectDuplicates = hasDuplicate; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyQSA always contains :focus, so no need for an existence check + if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + var val; + + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + if ( !documentIsXML ) { + name = name.toLowerCase(); + } + if ( (val = Expr.attrHandle[ name ]) ) { + return val( elem ); + } + if ( documentIsXML || support.attributes ) { + return elem.getAttribute( name ); + } + return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? + name : + val && val.specified ? val.value : null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + i = 1, + j = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( ; (elem = results[i]); i++ ) { + if ( elem === results[ i - 1 ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +// Returns a function to use in pseudos for input types +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +// Returns a function to use in pseudos for buttons +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +// Returns a function to use in pseudos for positionals +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[4] ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + + nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifider + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsXML ? + elem.getAttribute("xml:lang") || elem.getAttribute("lang") : + elem.lang) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push( { + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && !documentIsXML && + Expr.relative[ tokens[1].type ] ) { + + context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, slice.call( seed, 0 ) ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + documentIsXML, + results, + rsibling.test( selector ) + ); + return results; +} + +// Deprecated +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Easy API for creating new setFilters +function setFilters() {} +Expr.filters = setFilters.prototype = Expr.pseudos; +Expr.setFilters = new setFilters(); + +// Initialize with the default document +setDocument(); + +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, ret, self, + len = this.length; + + if ( typeof selector !== "string" ) { + self = this; + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + ret = []; + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, this[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true) ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + cur = this[i]; + + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + } + cur = cur.parentNode; + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +jQuery.fn.andSelf = jQuery.fn.addBack; + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( this.length > 1 && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /<tbody/i, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "<select multiple='multiple'>", "</select>" ], + legend: [ 1, "<fieldset>", "</fieldset>" ], + area: [ 1, "<map>", "</map>" ], + param: [ 1, "<object>", "</object>" ], + thead: [ 1, "<table>", "</table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, false, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, false, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1></$2>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function( value ) { + var isFunc = jQuery.isFunction( value ); + + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( !isFunc && typeof value !== "string" ) { + value = jQuery( value ).not( this ).detach(); + } + + return this.domManip( [ value ], true, function( elem ) { + var next = this.nextSibling, + parent = this.parentNode; + + if ( parent ) { + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + }); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, table ? self.html() : undefined ); + } + self.domManip( args, table, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( + table && jQuery.nodeName( this[i], "table" ) ? + findOrAppend( this[i], "tbody" ) : + this[i], + node, + i + ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery.ajax({ + url: node.src, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +function findOrAppend( elem, tag ) { + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + var attr = elem.getAttributeNode("type"); + elem.type = ( attr && attr.specified ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted <tbody> from table fragments + if ( !jQuery.support.tbody ) { + + // String was a <table>, *may* have spurious <tbody> + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare <thead> or <tfoot> + wrap[1] === "<table>" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + var bool = typeof state === "boolean"; + + return this.each(function() { + if ( bool ? state : isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("<iframe frameborder='0' width='0' height='0'/>") + .css( "cssText", "display:block !important" ) + ).appendTo( doc.documentElement ); + + // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse + doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; + doc.write("<!doctype html><html><body>"); + doc.close(); + + display = actualDisplay( nodeName, doc ); + iframe.detach(); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + } + + return display; +} + +// Called ONLY from within css_defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + display = jQuery.css( elem[0], "display" ); + elem.remove(); + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + // certain elements can have dimension info if we invisibly show them + // however, it must have a current display style that would benefit from this + return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? + jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var styles = extra && getStyles( elem ); + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + // if value === "", then remove inline opacity #12685 + if ( ( value >= 1 || value === "" ) && + jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there is no filter style applied in a css rule or unset inline opacity, we are done + if ( value === "" || currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + if ( computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, + curCSS, [ elem, "marginRight" ] ); + } + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + computed = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( computed ) ? + jQuery( elem ).position()[ prop ] + "px" : + computed; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + // Support: Opera <= 12.12 + // Opera reports offsetWidths and offsetHeights less than zero on some elements + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || + (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + }) + .filter(function(){ + var type = this.type; + // Use .is(":disabled") so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !manipulation_rcheckableType.test( type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // Item is non-scalar (array or object), encode its numeric index. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +}); + +jQuery.fn.hover = function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); +}; +var + // Document location + ajaxLocParts, + ajaxLocation, + ajax_nonce = jQuery.now(), + + ajax_rquery = /\?/, + rhash = /#.*$/, + rts = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat("*"); + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + while ( (dataType = dataTypes[i++]) ) { + // Prepend if requested + if ( dataType[0] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + + // Otherwise append + } else { + (structure[ dataType ] = structure[ dataType ] || []).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + }); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var deep, key, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + var selector, response, type, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // If we have elements to modify, make the request + if ( self.length > 0 ) { + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + self.html( selector ? + + // If a selector was specified, locate the right elements in a dummy div + // Exclude scripts to avoid IE 'Permission Denied' errors + jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + + // Otherwise use the full result + responseText ); + + }).complete( callback && function( jqXHR, status ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + }); + } + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ + jQuery.fn[ type ] = function( fn ){ + return this.on( type, fn ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + url: url, + type: method, + dataType: type, + data: data, + success: callback + }); + }; +}); + +jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: ajaxLocation, + type: "GET", + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // Cross-domain detection vars + parts, + // Loop variable + i, + // URL without anti-cache param + cacheURL, + // Response headers as string + responseHeadersString, + // timeout handle + timeoutTimer, + + // To know if global events are to be dispatched + fireGlobals, + + transport, + // Response headers + responseHeaders, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks("once memory"), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( (match = rheaders.exec( responseHeadersString )) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + var lname = name.toLowerCase(); + if ( !state ) { + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( state < 2 ) { + for ( code in map ) { + // Lazy-add the new callback in a way that preserves old ones + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } else { + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ).complete = completeDeferred.add; + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger("ajaxStart"); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + cacheURL = s.url; + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add anti-cache in url if needed + if ( s.cache === false ) { + s.url = rts.test( cacheURL ) ? + + // If there is already a '_' parameter, set its value + cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : + + // Otherwise add one to the end + cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; + } + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout(function() { + jqXHR.abort("timeout"); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch ( e ) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader("etag"); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 ) { + isSuccess = true; + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + isSuccess = true; + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger("ajaxStop"); + } + } + } + + return jqXHR; + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + } +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + var firstDataType, ct, finalDataType, type, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + var conv2, current, conv, tmp, + converters = {}, + i = 0, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ]; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /(?:java|ecma)script/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || jQuery("head")[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement("script"); + + script.async = true; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( script.parentNode ) { + script.parentNode.removeChild( script ); + } + + // Dereference the script + script = null; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + + // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending + // Use native DOM manipulation to avoid our domManip AJAX trickery + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( undefined, true ); + } + } + }; + } +}); +var oldCallbacks = [], + rjsonp = /(=)\?(?=&|$)|\?\?/; + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? + "url" : + typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + + // Insert callback into url or form data + if ( jsonProp ) { + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); + } else if ( s.jsonp !== false ) { + s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + overwritten = window[ callbackName ]; + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +var xhrCallbacks, xhrSupported, + xhrId = 0, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject && function() { + // Abort all pending requests + var key; + for ( key in xhrCallbacks ) { + xhrCallbacks[ key ]( undefined, true ); + } + }; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +xhrSupported = jQuery.ajaxSettings.xhr(); +jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +xhrSupported = jQuery.support.ajax = !!xhrSupported; + +// Create transport if the browser can provide an xhr +if ( xhrSupported ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers["X-Requested-With"] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( err ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + var status, responseHeaders, statusText, responses; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + responses = {}; + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + if ( typeof xhr.responseText === "string" ) { + responses.text = xhr.responseText; + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback( undefined, true ); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value ), + target = tween.cur(), + start = +target || 0, + scale = 1, + maxIterations = 20; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var value, name, index, easing, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + /*jshint validthis:true */ + var prop, index, length, + value, dataShow, toggle, + tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.always(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery._removeData( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + doAnimation.finish = function() { + anim.stop( true ); + }; + // Empty animations, or finishing resolves immediately + if ( empty || jQuery._data( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each(function() { + var index, + data = jQuery._data( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // enable finishing flag on private data + data.finish = true; + + // empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.cur && hooks.cur.finish ) { + hooks.cur.finish.call( this ); + } + + // look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // turn off finishing flag + delete data.finish; + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) ) { + jQuery.fx.start(); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.start = function() { + if ( !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, win, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== core_strundefined ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + return { + top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), + left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) + }; +}; + +jQuery.offset = { + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[ 0 ] ) { + return; + } + + var offsetParent, offset, + parentOffset = { top: 0, left: 0 }, + elem = this[ 0 ]; + + // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent + if ( jQuery.css( elem, "position" ) === "fixed" ) { + // we assume that getBoundingClientRect is available when computed position is fixed + offset = elem.getBoundingClientRect(); + } else { + // Get *real* offsetParent + offsetParent = this.offsetParent(); + + // Get correct offsets + offset = this.offset(); + if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { + parentOffset = offsetParent.offset(); + } + + // Add offsetParent borders + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + } + + // Subtract parent offsets and element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + return { + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.documentElement; + while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.documentElement; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Limit scope pollution from any deprecated API +// (function() { + +// })(); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} -(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; -return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) -}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window); +})( window );
            diff --git a/docs_api/files/.._lib.js.html b/docs_api/files/.._lib.js.html deleted file mode 100644 index 6b486a83e..000000000 --- a/docs_api/files/.._lib.js.html +++ /dev/null @@ -1,1826 +0,0 @@ - - - - - ../lib.js - jquery components - - - - - - - - -
            -
            -
            - -

            - -
            -
            - API Docs for: 0.1 -
            -
            -
            - - -
            -
            - Show: - - - - - - - -
            - - -
            -
            -
            -

            File: ../lib.js

            - -
            -
            -/**
            - * jQuery JavaScript Library v1.9.1
            - * <pre>http://jquery.com/
            - *
            - * Includes Sizzle.js
            - * http://sizzlejs.com/
            - *
            - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
            - * Released under the MIT license
            - * http://jquery.org/license
            - * Date: 2013-2-4</pre>
            - * @class jQuery
            - * @namespace   window
            - * @global
            - */
            -
            -(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
            -return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
            -}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
            -;
            -
            -;
            -/**
            - * 全局函数
            - * @namespace 
            - * @class   window
            - * @static
            - */
            -!String.prototype.trim && ( String.prototype.trim = function(){ return $.trim( this ); } );
            -/**
            - * 如果 console 不可用, 则生成一个模拟的 console 对象
            - */
            -if( !window.console ) window.console = { log:function(){
            -    window.status = [].slice.apply( arguments ).join(' ');
            -}};
            -/**
            - * 声明主要命名空间, 方便迁移
            - */
            -window.JC = window.JC || {
            -    log: function(){ JC.debug && window.console && console.log( sliceArgs( arguments ).join(' ') ); }
            -};
            -window.Bizs = window.Bizs || {};
            -/**
            - * 全局 css z-index 控制属性
            - * @property    ZINDEX_COUNT
            - * @type        int
            - * @default     50001
            - * @static
            - */
            -window.ZINDEX_COUNT = window.ZINDEX_COUNT || 50001;
            -/**
            - * 把函数的参数转为数组
            - * @method  sliceArgs
            - * @param   {arguments}     args
            - * @return Array
            - * @static
            - */
            -function sliceArgs( _arg ){
            -    var _r = [], _i, _len;
            -    for( _i = 0, _len = _arg.length; _i < _len; _i++){
            -        _r.push( _arg[_i] );
            -    }
            -    return _r;
            -}
            - /**
            - * 按格式输出字符串
            - * @method printf
            - * @static
            - * @param   {string}    _str
            - * @return  string
            - * @example
            - *      printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
            - *      //return asdfasdf000sdfasdf1111
            - */
            -function printf( _str ){
            -    for(var i = 1, _len = arguments.length; i < _len; i++){
            -        _str = _str.replace( new RegExp('\\{'+( i - 1 )+'\\}', 'g'), arguments[i] );
            -    }
            -    return _str;
            -}
            -/**
            - * 判断URL中是否有某个get参数
            - * @method  hasUrlParam
            - * @static
            - * @param   {string}    _url
            - * @param   {string}    _key
            - * @return  bool
            - * @example
            - *      var bool = hasUrlParam( 'getkey' );
            - */
            -function hasUrlParam( _url, _key ){
            -    var _r = false;
            -    if( !_key ){ _key = _url; _url = location.href; }
            -    if( /\?/.test( _url ) ){
            -        _url = _url.split( '?' ); _url = _url[ _url.length - 1 ];
            -        _url = _url.split('&');
            -        for( var i = 0, j = _url.length; i < j; i++ ){
            -            if( _url[i].split('=')[0].toLowerCase() == _key.toLowerCase() ){ _r = true; break; };
            -        }
            -    }
            -    return _r;
            -}
            -//这个方法已经废弃, 请使用 hasUrlParam
            -function has_url_param(){ return hasUrlParam.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * 添加URL参数
            - * <br /><b>require:</b> delUrlParam
            - * @method  addUrlParams
            - * @static
            - * @param   {string}    _url
            - * @param   {object}    _params
            - * @return  string
            - * @example
            -        var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );
            - */ 
            -function addUrlParams( _url, _params ){
            -    var sharp = '';
            -    !_params && ( _params = _url, _url = location.href );
            -    _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] );
            -    for( var k in _params ){
            -        _url = delUrlParam(_url, k);
            -        _url.indexOf('?') > -1 
            -            ? _url += '&' + k +'=' + _params[k]
            -            : _url += '?' + k +'=' + _params[k];
            -    }
            -    sharp && ( _url += '#' + sharp );
            -    _url = _url.replace(/\?\&/g, '?' );
            -    return _url;   
            -
            -}
            -//这个方法已经废弃, 请使用 addUrlParams
            -function add_url_params(){ return addUrlParams.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * 取URL参数的值
            - * @method  getUrlParam
            - * @static
            - * @param   {string}    _url
            - * @param   {string}    _key
            - * @return  string
            - * @example
            -        var defaultTag = getUrlParam(location.href, 'tag');  
            - */ 
            -function getUrlParam( _url, _key ){
            -    var result = '', paramAr, i, items;
            -    !_key && ( _key = _url, _url = location.href );
            -    _url.indexOf('#') > -1 && ( _url = _url.split('#')[0] );
            -    if( _url.indexOf('?') > -1 ){
            -        paramAr = _url.split('?')[1].split('&');
            -        for( i = 0; i < paramAr.length; i++ ){
            -            items = paramAr[i].split('=');
            -            items[0] = items[0].replace(/^\s+|\s+$/g, '');
            -            if( items[0].toLowerCase() == _key.toLowerCase() ){
            -                result = items[1];
            -                break;
            -            } 
            -        }
            -    }
            -    return result;
            -}
            -//这个方法已经废弃, 请使用 getUrlParam
            -function get_url_param(){ return getUrlParam.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * 取URL参数的值, 这个方法返回数组
            - * <br />与 getUrlParam 的区别是可以获取 checkbox 的所有值
            - * @method  getUrlParams
            - * @static
            - * @param   {string}    _url
            - * @param   {string}    _key
            - * @return  Array
            - * @example
            -        var params = getUrlParams(location.href, 'tag');  
            - */ 
            -function getUrlParams( _url, _key ){
            -    var _r = [], _params, i, j, _items;
            -    !_key && ( _key = _url, _url = location.href );
            -    _url = _url.replace(/[\?]+/g, '?').split('?');
            -    if( _url.length > 1 ){
            -        _url = _url[1];
            -        _params = _url.split('&');
            -        if( _params.length ){
            -            for( i = 0, j = _params.length; i < j; i++ ){
            -                _items = _params[i].split('=');
            -                if( _items[0].trim() == _key ){
            -                    _r.push( _items[1] || '' );
            -                }
            -            }
            -        }
            -    }
            -    return _r;
            -}
            -/**
            - * 删除URL参数
            - * @method  delUrlParam
            - * @static
            - * @param  {string}    _url
            - * @param  {string}    _key
            - * @return  string
            - * @example
            -        var url = delUrlParam( location.href, 'tag' );
            - */ 
            -function delUrlParam( _url, _key ){
            -    var sharp = '', params, tmpParams = [], i, item;
            -    !_key && ( _key = _url, _url = location.href );
            -    _url.indexOf('#') > -1 && ( sharp = _url.split('#')[1], _url = _url.split('#')[0] );
            -    if( _url.indexOf('?') > -1 ){
            -        params = _url.split('?')[1].split('&');
            -        _url = _url.split('?')[0];
            -        for( i = 0; i < params.length; i++ ){
            -            items = params[i].split('=');
            -            items[0] = items[0].replace(/^\s+|\s+$/g, '');
            -            if( items[0].toLowerCase() == _key.toLowerCase() ) continue;
            -            tmpParams.push( items.join('=') )
            -        }
            -        _url += '?' + tmpParams.join('&');
            -    }
            -    sharp && ( _url += '#' + sharp );
            -    return _url;
            -}
            -//这个方法已经废弃, 请使用 delUrlParam
            -function del_url_param(){ return delUrlParam.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * 提示需要 HTTP 环境
            - * @method  httpRequire
            - * @static
            - * @param  {string}  _msg   要提示的文字, 默认 "本示例需要HTTP环境'
            - * @return  bool     如果是HTTP环境返回true, 否则返回false
            - */
            -function httpRequire( _msg ){
            -    _msg = _msg || '本示例需要HTTP环境';
            -    if( /file\:|\\/.test( location.href ) ){
            -        alert( _msg );
            -        return false;
            -    }
            -    return true;
            -}
            -/**
            - * 删除 URL 的锚点
            - * <br /><b>require:</b> addUrlParams
            - * @method removeUrlSharp
            - * @static
            - * @param   {string}    $url
            - * @param   {bool}      $nornd      是否不添加随机参数
            - * @return  string
            - */
            -function removeUrlSharp($url, $nornd){   
            -    var url = $url.replace(/\#[\s\S]*/, '');
            -    !$nornd && (url = addUrlParams( url, { "rnd": new Date().getTime() } ) );
            -    return url;
            -}
            -/**
            - * 重载页面
            - * <br /><b>require:</b> removeUrlSharp
            - * <br /><b>require:</b> addUrlParams
            - * @method reloadPage
            - * @static
            - * @param   {string}    $url
            - * @param   {bool}      $nornd
            - * @param   {int}       $delayms
            - */ 
            -function reloadPage( _url, _nornd, _delayMs  ){
            -    _delayMs = _delayMs || 0;
            -    setTimeout( function(){
            -        _url = removeUrlSharp( _url || location.href, _nornd );
            -        !_nornd && ( _url = addUrlParams( _url, { 'rnd': new Date().getTime() } ) );
            -        location.href = _url;
            -    }, _delayMs);
            -}
            -//这个方法已经废弃, 请使用 reloadPage
            -function reload_page(){ return reloadPage.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * 取小数点的N位
            - * <br />JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题
            - * @method  parseFinance
            - * @static
            - * @param   {number}    _i
            - * @param   {int}       _dot, default = 2
            - * @return  number
            - */
            -function parseFinance( _i, _dot ){
            -    _i = parseFloat( _i ) || 0;
            -    _dot = _dot || 2;
            -    if( _i && _dot ) {
            -        _i = parseFloat( _i.toFixed( _dot ) );
            -    }
            -    return _i;
            -}
            -//这个方法已经废弃, 请使用 parseFinance
            -function parse_finance_num(){ return parseFinance.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * js 附加字串函数
            - * @method  padChar
            - * @static
            - * @param   {string}    _str
            - * @param   {intl}      _len
            - * @param   {string}    _char
            - * @return  string
            - */
            -function padChar( _str, _len, _char ){
            -	_len  = _len || 2; _char = _char || "0"; 
            -	_str += '';
            -	if( _str.length >_str ) return _str;
            -	_str = new Array( _len + 1 ).join( _char ) + _str
            -	return _str.slice( _str.length - _len );
            -}
            -//这个方法已经废弃, 请使用 padChar
            -function pad_char_f( _str, _len, _char ){ return padChar.apply( null, sliceArgs( arguments ) ); }
            -/**
            - * 格式化日期为 YYYY-mm-dd 格式
            - * <br /><b>require</b>: pad\_char\_f
            - * @method  formatISODate
            - * @static
            - * @param   {date}                  _date       要格式化日期的日期对象
            - * @param   {string|undefined}      _split      定义年月日的分隔符, 默认为 '-'
            - * @return  string
            - *
            - */
            -function formatISODate( _date, _split ){
            -	_date = _date || new Date(); typeof _split == 'undefined' && ( _split = '-' );
            -	return [ _date.getFullYear(), padChar( _date.getMonth() + 1 ), padChar( _date.getDate() ) ].join(_split);
            -}
            -/**
            - * 从 ISODate 字符串解析日期对象
            - * @method  parseISODate
            - * @static
            - * @param   {string}    _datestr
            - * @return  date
            - */
            -function parseISODate( _datestr ){
            -    if( !_datestr ) return;
            -    _datestr = _datestr.replace( /[^\d]+/g, '');
            -    var _r;
            -    if( _datestr.length === 8 ){
            -        _r = new Date( _datestr.slice( 0, 4 )
            -                        , parseInt( _datestr.slice( 4, 6 ), 10 ) - 1
            -                        , parseInt( _datestr.slice( 6 ), 10 ) );
            -    }
            -    return _r;
            -}
            -/**
            - * 获取不带 时分秒的 日期对象
            - * @method  pureDate
            - * @param   {Date}  _d   可选参数, 如果为空 = new Date
            - * @return  Date
            - */
            -function pureDate( _d ){
            -    var _r;
            -    _d = _d || new Date();
            -    _r = new Date( _d.getFullYear(), _d.getMonth(), _d.getDate() );
            -    return _r;
            -}
            -/**
            -* 克隆日期对象
            -* @method  cloneDate
            -* @static
            -* @param   {Date}  _date   需要克隆的日期
            -* @return  {Date}  需要克隆的日期对象
            -*/
            -function cloneDate( _date ){ var d = new Date(); d.setTime( _date.getTime() ); return d; }
            -/**
            - * 判断两个日期是否为同一天
            - * @method  isSameDay
            - * @static
            - * @param   {Date}  _d1     需要判断的日期1
            - * @param   {Date}  _d2     需要判断的日期2
            - * @return {bool}
            - */
            -function isSameDay( _d1, _d2 ){
            -    return [_d1.getFullYear(), _d1.getMonth(), _d1.getDate()].join() === [
            -            _d2.getFullYear(), _d2.getMonth(), _d2.getDate()].join()
            -}
            -/**
            - * 判断两个日期是否为同一月份
            - * @method  isSameMonth
            - * @static
            - * @param   {Date}  _d1     需要判断的日期1
            - * @param   {Date}  _d2     需要判断的日期2
            - * @return {bool}
            - */
            -function isSameMonth( _d1, _d2 ){
            -    return [_d1.getFullYear(), _d1.getMonth()].join() === [
            -            _d2.getFullYear(), _d2.getMonth()].join()
            -}
            -/**
            - * 取得一个月份中最大的一天
            - * @method  maxDayOfMonth
            - * @static
            - * @param   {Date}  _date
            - * @return {int} 月份中最大的一天
            - */
            -function maxDayOfMonth( _date ){
            -    var _r, _d = new Date( _date.getFullYear(), _date.getMonth() + 1 );
            -        _d.setDate( _d.getDate() - 1 );
            -        _r = _d.getDate();
            -    return _r;
            -}
            -/**
            - * 取当前脚本标签的 src路径 
            - * @method  scriptPath
            - * @static
            - * @return  {string} 脚本所在目录的完整路径
            - */
            -function scriptPath(){
            -    var _sc = document.getElementsByTagName('script'), _sc = _sc[ _sc.length - 1 ], _path = _sc.getAttribute('src');
            -    if( /\//.test( _path ) ){ _path = _path.split('/'); _path.pop(); _path = _path.join('/') + '/'; }
            -    else if( /\\/.test( _path ) ){ _path = _path.split('\\'); _path.pop(); _path = _path.join('\\') + '/'; }
            -    return _path;
            -}
            -//这个方法已经废弃, 请使用 scriptPath
            -function script_path_f(){ return scriptPath(); }
            -/**
            - * 缓动函数, 动画效果为按时间缓动 
            - * <br />这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval 
            - * @method  easyEffect
            - * @static
            - * @param   {function}  _cb         缓动运动时的回调
            - * @param   {number}    _maxVal     缓动的最大值, default = 200
            - * @param   {number}    _startVal   缓动的起始值, default = 0
            - * @param   {number}    _duration   缓动的总时间, 单位毫秒, default = 200
            - * @param   {number}    _stepMs     缓动的间隔, 单位毫秒, default = 2
            - * @return  interval
            - * @example
            -        $(document).ready(function(){
            -            window.js_output = $('span.js_output');
            -            window.ls = [];
            -            window.EFF_INTERVAL = easyEffect( effectcallback, 100);
            -        });
            -
            -        function effectcallback( _stepval, _done ){
            -            js_output.html( _stepval );
            -            ls.push( _stepval );
            -
            -            !_done && js_output.html( _stepval );
            -            _done && js_output.html( _stepval + '<br />' + ls.join() );
            -        }
            - */
            -function easyEffect( _cb, _maxVal, _startVal, _duration, _stepMs ){
            -    var _beginDate = new Date(), _timepass
            -        , _maxVal = _maxVal || 200
            -        , _startVal = _startVal || 0
            -        , _maxVal = _maxVal - _startVal 
            -        , _tmp = 0
            -        , _done
            -        , _duration = _duration || 200
            -        , _stepMs = _stepMs || 2
            -        ;
            -    //JC.log( '_maxVal:', _maxVal, '_startVal:', _startVal, '_duration:', _duration, '_stepMs:', _stepMs );
            -
            -    var _interval = setInterval(
            -        function(){
            -            _timepass = new Date() - _beginDate;
            -            _tmp = _timepass / _duration * _maxVal;
            -            _tmp;
            -            if( _tmp >= _maxVal ){
            -                _tmp = _maxVal;
            -                _done = true;
            -                clearInterval( _interval );
            -            }
            -            _cb && _cb( _tmp + _startVal, _done );
            -        }, _stepMs );
            -
            -    return _interval;
            -}
            -/**
            - * 把输入值转换为布尔值
            - * @method parseBool
            - * @param   {*} _input
            - * @return bool
            - * @static
            - */
            -function parseBool( _input ){
            -    if( typeof _input == 'string' ){
            -        _input = _input.replace( /[\s]/g, '' ).toLowerCase();
            -        if( _input && ( _input == 'false' 
            -                        || _input == '0' 
            -                        || _input == 'null'
            -                        || _input == 'undefined'
            -       )) _input = false;
            -       else if( _input ) _input = true;
            -    }
            -    return !!_input;
            -}
            -/**
            - * 判断是否支持 CSS position: fixed
            - * @property    $.support.isFixed
            - * @type        bool
            - * @require jquery
            - * @static
            - */
            -window.jQuery && jQuery.support && (jQuery.support.isFixed = (function ($){
            -    try{
            -        var r, contain = $( document.documentElement ),
            -            el = $( "<div style='position:fixed;top:100px;visibility:hidden;'>x</div>" ).appendTo( contain ),
            -            originalHeight = contain[ 0 ].style.height,
            -            w = window;
            -        
            -        contain.height( screen.height * 2 + "px" );
            -     
            -        w.scrollTo( 0, 100 );
            -     
            -        r = el[ 0 ].getBoundingClientRect().top === 100;
            -     
            -        contain.height( originalHeight );
            -     
            -        el.remove();
            -     
            -        w.scrollTo( 0, 0 );
            -     
            -        return r;
            -    }catch(ex){}
            -})(jQuery));
            -/**
            - * 绑定或清除 mousewheel 事件
            - * @method  mousewheelEvent
            - * @param   {function}  _cb
            - * @param   {bool}      _detach
            - * @static
            - */
            -function mousewheelEvent( _cb, _detach ){
            -    var _evt =  (/Firefox/i.test(navigator.userAgent))
            -        ? "DOMMouseScroll" 
            -        : "mousewheel"
            -        ;
            -    document.attachEvent && ( _evt = 'on' + _evt );
            -
            -    if( _detach ){
            -        document.detachEvent && document.detachEvent( _evt, _cb )
            -        document.removeEventListener && document.removeEventListener( _evt, _cb );
            -    }else{
            -        document.attachEvent && document.attachEvent( _evt, _cb )
            -        document.addEventListener && document.addEventListener( _evt, _cb );
            -    }
            -}
            -/**
            - * 获取 selector 的指定父级标签
            - * @method  getJqParent
            - * @param   {selector}  _selector
            - * @param   {selector}  _filter
            - * @return selector
            - * @require jquery
            - * @static
            - */
            -function getJqParent( _selector, _filter ){
            -    _selector = $(_selector);
            -    var _r;
            -
            -    if( _filter ){
            -        while( (_selector = _selector.parent()).length ){
            -            if( _selector.is( _filter ) ){
            -                _r = _selector;
            -                break;
            -            }
            -        }
            -    }else{
            -        _r = _selector.parent();
            -    }
            -
            -    return _r;
            -}
            -/**
            - * 扩展 jquery 选择器
            - * <br />扩展起始字符的 '/' 符号为 jquery 父节点选择器
            - * <br />扩展起始字符的 '|' 符号为 jquery 子节点选择器
            - * <br />扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )
            - * @method  parentSelector
            - * @param   {selector}  _item
            - * @param   {String}    _selector
            - * @param   {selector}  _finder
            - * @return  selector
            - * @require jquery
            - * @static
            - */
            -function parentSelector( _item, _selector, _finder ){
            -    _item && ( _item = $( _item ) );
            -    if( /\,/.test( _selector ) ){
            -        var _multiSelector = [], _tmp;
            -        _selector = _selector.split(',');
            -        $.each( _selector, function( _ix, _subSelector ){
            -            _subSelector = _subSelector.trim();
            -            _tmp = parentSelector( _item, _subSelector, _finder );
            -            _tmp && _tmp.length 
            -                &&  ( 
            -                        ( _tmp.each( function(){ _multiSelector.push( $(this) ) } ) )
            -                    );
            -        });
            -        return $( _multiSelector );
            -    }
            -    var _pntChildRe = /^([\/]+)/, _childRe = /^([\|]+)/, _pntRe = /^([<\(]+)/;
            -    if( _pntChildRe.test( _selector ) ){
            -        _selector = _selector.replace( _pntChildRe, function( $0, $1 ){
            -            for( var i = 0, j = $1.length; i < j; i++ ){
            -                _item = _item.parent();
            -            }
            -            _finder = _item;
            -            return '';
            -        });
            -        _selector = _selector.trim();
            -        return _selector ? _finder.find( _selector ) : _finder;
            -    }else if( _childRe.test( _selector ) ){
            -        _selector = _selector.replace( _childRe, function( $0, $1 ){
            -            for( var i = 1, j = $1.length; i < j; i++ ){
            -                _item = _item.parent();
            -            }
            -            _finder = _item;
            -            return '';
            -        });
            -        _selector = _selector.trim();
            -        return _selector ? _finder.find( _selector ) : _finder;
            -    }else if( _pntRe.test( _selector ) ){
            -        _selector = _selector.replace( _pntRe, '' ).trim();
            -        if( _selector ){
            -            if( /[\s]/.test( _selector ) ){
            -                var _r;
            -                _selector.replace( /^([^\s]+)([\s\S]+)/, function( $0, $1, $2 ){
            -                    _r = getJqParent( _item, $1 ).find( $2.trim() );
            -                });
            -                return _r || _selector;
            -            }else{
            -                return getJqParent( _item, _selector );
            -            }
            -        }else{
            -            return _item.parent();
            -        }
            -    }else{
            -        return _finder ? _finder.find( _selector ) : jQuery( _selector );
            -    }
            -}
            -/**
            - * 获取脚本模板的内容
            - * @method  scriptContent
            - * @param   {selector}  _selector
            - * @return  string
            - * @static
            - */
            -function scriptContent( _selector ){
            -    var _r = '';
            -    _selector 
            -        && ( _selector = $( _selector ) ).length 
            -        && ( _r = _selector.html().trim().replace( /[\r\n]/g, '') )
            -        ;
            -    return _r;
            -}
            -/**
            - * 取函数名 ( 匿名函数返回空 )
            - * @method  funcName
            - * @param   {function}  _func
            - * @return  string
            - * @static
            - */
            -function funcName(_func){
            -  var _re = /^function\s+([^()]+)[\s\S]*/
            -      , _r = ''
            -      , _fStr = _func.toString();    
            -  //JC.log( _fStr );
            -  _re.test( _fStr ) && ( _r = _fStr.replace( _re, '$1' ) );
            -  return _r.trim();
            -}
            -/**
            - * 动态添加内容时, 初始化可识别的组件
            - * <dl>
            - *      <dt>目前会自动识别的组件,  </dt>
            - *      <dd>
            - *          Bizs.CommonModify, JC.Panel, JC.Dialog
            - *          <br /><b>自动识别的组件不用显式调用  jcAutoInitComps 去识别可识别的组件</b>
            - *      </dd>
            - * </d>
            - * <dl>
            - *      <dt>可识别的组件</dt>
            - *      <dd>
            - *          JC.AutoSelect, JC.Calendar, JC.AutoChecked, JC.AjaxUpload
            - *          <br />Bizs.DisableLogic, Bizs.FormLogic
            - *      </dd>
            - * </d>
            - * @method  jcAutoInitComps
            - * @param   {selector}  _selector
            - * @static
            - */
            -function jcAutoInitComps( _selector ){
            -    _selector = $( _selector || document );
            -    
            -    if( !( _selector && _selector.length && window.JC ) ) return;
            -    /**
            -     * 联动下拉框
            -     */
            -    JC.AutoSelect && JC.AutoSelect( _selector );
            -    /**
            -     * 日历组件
            -     */
            -    JC.Calendar && JC.Calendar.initTrigger( _selector );
            -    /**
            -     * 全选反选
            -     */
            -    JC.AutoChecked && JC.AutoChecked( _selector );
            -    /**
            -     * Ajax 上传
            -     */
            -    JC.AjaxUpload && JC.AjaxUpload.init( _selector );
            -    /**
            -     * Placeholder 占位符
            -     */
            -    JC.Placeholder && JC.Placeholder.init( _selector );
            -
            -    if( !window.Bizs ) return;
            -    /**
            -     * disable / enable
            -     */
            -    Bizs.DisableLogic && Bizs.DisableLogic.init( _selector );
            -    /**
            -     * 表单提交逻辑
            -     */
            -    Bizs.FormLogic && Bizs.FormLogic.init( _selector );
            -}
            -/**
            - * URL 占位符识别功能
            - * @method  urlDetect
            - * @param   {String}    _url    如果 起始字符为 URL, 那么 URL 将祝为本页的URL
            - * @return  string
            - * @static
            - * @example
            - *      urlDetect( '?test' ); //output: ?test
            - *
            - *      urlDetect( 'URL,a=1&b=2' ); //output: your.com?a=1&b=2
            - *      urlDetect( 'URL,a=1,b=2' ); //output: your.com?a=1&b=2
            - *      urlDetect( 'URLa=1&b=2' ); //output: your.com?a=1&b=2
            - */
            -function urlDetect( _url ){
            -    _url = _url || '';
            -    var _r = _url, _tmp, i, j;
            -    if( /^URL/.test( _url ) ){
            -        _tmp = _url.replace( /^URL/, '' ).replace( /[\s]*,[\s]*/g, ',' ).trim().split(',');
            -        _url = location.href;
            -        var _d = {}, _concat = [];
            -        if( _tmp.length ){
            -            for( i = 0, j = _tmp.length; i < j; i ++ ){
            -                 /\&/.test( _tmp[i] )
            -                     ? ( _concat = _concat.concat( _tmp[i].split('&') ) )
            -                     : ( _concat = _concat.concat( _tmp[i] ) )
            -                     ;
            -            }
            -            _tmp = _concat;
            -        }
            -        for( i = 0, j = _tmp.length; i < j; i++ ){
            -            _items = _tmp[i].replace(/[\s]+/g, '').split( '=' );
            -            if( !_items[0] ) continue;
            -            _d[ _items[0] ] = _items[1] || '';
            -        }
            -        _url = addUrlParams( _url, _d );
            -        _r = _url;
            -    }
            -    return _r;
            -}
            -/**
            - * 日期占位符识别功能
            - * @method  dateDetect
            - * @param   {String}    _dateStr    如果 起始字符为 NOW, 那么将视为当前日期
            - * @return  {date|null}
            - * @static
            - * @example
            - *      dateDetect( 'now' ); //2014-10-02
            - *      dateDetect( 'now,3d' ); //2013-10-05
            - *      dateDetect( 'now,-3d' ); //2013-09-29
            - *      dateDetect( 'now,2w' ); //2013-10-16
            - *      dateDetect( 'now,-2m' ); //2013-08-02
            - *      dateDetect( 'now,4y' ); //2017-10-02
            - *
            - *      dateDetect( 'now,1d,1w,1m,1y' ); //2014-11-10
            - */
            -function dateDetect( _dateStr ){
            -    var _r = null   
            -        , _re = /^now/i
            -        , _d, _ar, _item
            -        ;
            -    if( _dateStr && typeof _dateStr == 'string' ){
            -        if( _re.test( _dateStr ) ){
            -            _d = new Date();
            -            _dateStr = _dateStr.replace( _re, '' ).replace(/[\s]+/g, '');
            -            _ar = _dateStr.split(',');
            -
            -            var _red = /d$/i
            -                , _rew = /w$/i
            -                , _rem = /m$/i
            -                , _rey = /y$/i
            -                ;
            -            for( var i = 0, j = _ar.length; i < j; i++ ){
            -                _item = _ar[i] || '';
            -                if( !_item ) continue;
            -                _item = _item.replace( /[^\-\ddwmy]+/gi, '' );
            -
            -                if( _red.test( _item ) ){
            -                    _item = parseInt( _item.replace( _red, '' ), 10 );
            -                    _item && _d.setDate( _d.getDate() + _item );
            -                }else if( _rew.test( _item ) ){
            -                    _item = parseInt( _item.replace( _rew, '' ), 10 );
            -                    _item && _d.setDate( _d.getDate() + _item * 7 );
            -                }else if( _rem.test( _item ) ){
            -                    _item = parseInt( _item.replace( _rem, '' ), 10 );
            -                    _item && _d.setMonth( _d.getMonth() + _item );
            -                }else if( _rey.test( _item ) ){
            -                    _item = parseInt( _item.replace( _rey, '' ), 10 );
            -                    _item && _d.setFullYear( _d.getFullYear() + _item );
            -                }
            -            }
            -            _r = _d;
            -        }else{
            -            _r = parseISODate( _dateStr );
            -        }
            -    }
            -    return _r;
            -}
            -/**
            - * 模块加载器自动识别函数
            - * <br />目前可识别 requirejs
            - * <br />计划支持的加载器 seajs
            - * @method  loaderDetect
            - * @param   {array of dependency|class}     _require
            - * @param   {class|callback}                _class
            - * @param   {callback}                      _cb
            - * @static
            - * @example
            - *      loaderDetect( JC.AutoSelect );
            - *      loaderDetect( [ 'JC.AutoSelect', 'JC.AutoChecked' ], JC.Form );
            - */
            -function loaderDetect( _require, _class, _cb ){
            -    if( !( typeof define === 'function' && define.amd ) ) return;
            -    if( _require.constructor != Array ){
            -        _cb = _class;
            -        _class = _require;
            -        _require = [];
            -    }
            -    define( _require, function() {
            -        _cb && _cb.apply( _class, sliceArgs( arguments ) );
            -        return _class;
            -    });
            -}
            -;(function(){
            -    /**
            -     * inject jquery val func, for hidden change event
            -     */
            -    if( !window.jQuery ) return;
            -    var _oldVal = $.fn.val;
            -    $.fn.val = 
            -        function(){
            -            var _r = _oldVal.apply( this, arguments ), _p = this;
            -            if( 
            -                arguments.length
            -                && ( this.prop('nodeName') || '').toLowerCase() == 'input' 
            -                && this.attr('type').toLowerCase() == 'hidden'
            -            ){
            -                setTimeout( function(){ _p.trigger( 'change' ); }, 1 );
            -            }
            -            return _r;
            -        };
            -}());
            -;
            -
            -//TODO: use 方法 nginx 模式添加 url 最大长度判断
            -//TODO: use add custom type
            -;(function( $ ){
            -    if( window.JC && typeof JC.PATH != 'undefined' ) return;
            -    /**
            -     * JC jquery 组件库 资源调用控制类
            -     * <br />这是一个单例模式, 全局访问使用 JC 或 window.JC
            -     * <p><b>requires</b>: <a href='window.jQuery.html'>jQuery</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/window.JC.html' target='_blank'>API docs</a>
            -     * | <a href='../../_demo' target='_blank'>demo link</a></p>
            -     * @class JC
            -     * @namespace   window
            -     * @static
            -     * @example 
            -     *      JC.use( 组件名[,组件名] );
            -     * @author  qiushaowei   <suches@btbtd.org> | 75 team
            -     * @date    2013-08-04
            -     */
            -    window.JC = {
            -        /**
            -         * JC组件库所在路径
            -         * @property    PATH
            -         * @static
            -         * @type {string}
            -         */
            -        PATH: '/js'
            -        , compsDir: '/comps/'
            -        , bizsDir: '/bizs/'
            -        , pluginsDir: '/plugins/'
            -        /**
            -         * 是否显示调试信息
            -         * @property    debug
            -         * @static
            -         * @type {bool}
            -         */
            -        , debug: false
            -       /**
            -        * 导入JC组件
            -        * @method   use
            -        * @static
            -        * @param    {string}    _names -            模块名
            -        *                                           或者模块下面的某个js文件(test/test1.js, 路径前面不带"/"将视为test模块下的test1.js)
            -        *                                           或者一个绝对路径的js文件, 路径前面带 "/"
            -        *
            -        * @param    {string}    _basePath -         指定要导入资源所在的主目录, 这个主要应用于 nginx 路径输出
            -        * @param    {bool}      _enableNginxStyle -       指定是否需要使用 nginx 路径输出脚本资源
            -        *
            -        * @example
            -                JC.use( 'SomeClass' );                              //导入类 SomeClass
            -                JC.use( 'SomeClass, AnotherClass' );                //导入类 SomeClass, AnotherClass
            -                //
            -                ///  导入类 SomeClass, SomeClass目录下的file1.js, 
            -                ///  AnotherClass, AnotherClass 下的file2.js
            -                //
            -                JC.use( 'SomeClass, comps/SomeClass/file1.js, comps/AnotherClass/file2.js' );   
            -                JC.use( 'SomeClass, plugins/swfobject.js., plugins/json2.js' );   
            -                JC.use( '/js/Test/Test1.js' );     //导入文件  /js/Test/Test1.js, 如果起始处为 "/", 将视为文件的绝对路径
            -                //
            -                /// 导入 URL 资源 // JC.use( 'http://test.com/file1.js', 'https://another.com/file2.js' ); 
            -                //
            -                /// in libpath/_demo/
            -                //
            -                JC.use(
            -                    [
            -                        'Panel'                     //  ../comps/Panel/Panel.js
            -                        , 'Tips'                    //  ../comps/Tips/Tips.js
            -                        , 'Valid'                   //  ../comps/Valid/Valid.js
            -                        , 'Bizs.KillISPCache'       //  ../bizs/KillISPCache/KillISPCache.js
            -                        , 'bizs.TestBizFile'        //  ../bizs/TestBizFile.js
            -                        , 'comps.TestCompFile'      //  ../comps/TestCompFile.js 
            -                        , 'Plugins.rate'            //  ../plugins/rate/rate.js
            -                        , 'plugins.json2'           //  ../plugins/json2.js
            -                        , '/js/fullpathtest.js'     //  /js/fullpathtest.js
            -                    ].join()
            -                );
            -        */ 
            -        , use: function( _items ){
            -                if( ! _items ) return;
            -                var _p = this
            -                    , _paths = []
            -                    , _parts = $.trim( _items ).split(/[\s]*?,[\s]*/)
            -                    , _urlRe = /\:\/\//
            -                    , _pathRplRe = /(\\)\1|(\/)\2/g
            -                    , _compRe = /[\/\\]/
            -                    , _compFileRe = /^comps\./
            -                    , _bizCompRe = /^Bizs\./
            -                    , _bizFileRe = /^bizs\./
            -                    , _pluginCompRe = /^Plugins\./
            -                    , _pluginFileRe = /^plugins\./
            -                    ;
            -
            -                _parts = JC._usePatch( _parts, 'Form', 'AutoSelect' );
            -                _parts = JC._usePatch( _parts, 'Form', 'AutoChecked' );
            -
            -                $.each( _parts, function( _ix, _part ){
            -                    var _isComps = !_compRe.test( _part )
            -                        , _path
            -                        , _isFullpath = /^\//.test( _part )
            -                        ;
            -
            -                    if( _isComps && window.JC[ _part ] ) return;
            -
            -                    if( JC.FILE_MAP && JC.FILE_MAP[ _part ] ){
            -                        _paths.push( JC.FILE_MAP[ _part ] );
            -                        return;
            -                    }
            -
            -                    _path = _part;
            -                    if( _isComps ){
            -                        if( _bizCompRe.test( _path ) ){//业务组件
            -                            _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.bizsDir, _part.replace( _bizCompRe, '' ) );
            -                        }else if( _bizFileRe.test( _path ) ){//业务文件
            -                            _path = printf( '{0}{1}{2}.js', JC.PATH, JC.bizsDir, _part.replace( _bizFileRe, '' ) );
            -                        }else if( _pluginCompRe.test( _path ) ){//插件组件
            -                            _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.pluginsDir, _part.replace( _pluginCompRe, '' ) );
            -                        }else if( _pluginFileRe.test( _path ) ){//插件文件
            -                            _path = printf( '{0}{1}{2}.js', JC.PATH, JC.pluginsDir, _part.replace( _pluginFileRe, '' ) );
            -                        }else if( _compFileRe.test( _path ) ){//组件文件
            -                            _path = printf( '{0}{1}{2}.js', JC.PATH, JC.compsDir, _part.replace( _compFileRe, '' ) );
            -                        }else{//组件
            -                            _path = printf( '{0}{1}{2}/{2}.js', JC.PATH, JC.compsDir, _part );
            -                        }
            -                    }
            -                    !_isComps && !_isFullpath && ( _path = printf( '{0}/{1}', JC.PATH, _part ) );
            -
            -                    if( /\:\/\//.test( _path ) ){
            -                        _path = _path.split('://');
            -                        _path[1] = $.trim( _path[1].replace( _pathRplRe, '$1$2' ) );
            -                        _path = _path.join('://');
            -                    }else{
            -                        _path = $.trim( _path.replace( _pathRplRe, '$1$2' ) );
            -                    }
            -
            -                    if( JC._USE_CACHE[ _path ] ) return;
            -                        JC._USE_CACHE[ _path ] = 1;
            -                    _paths.push( _path );
            -                });
            -
            -                JC.log( _paths );
            -
            -                !JC.enableNginxStyle && JC._writeNormalScript( _paths );
            -                JC.enableNginxStyle && JC._writeNginxScript( _paths );
            -            }
            -        /**
            -         * 调用依赖的类
            -         * <br />这个方法的存在是因为有一些类调整了结构, 但是原有的引用因为向后兼容的需要, 暂时不能去掉
            -         * @method  _usePatch
            -         * @param   {array}     _items
            -         * @param   {string}    _fromClass
            -         * @param   {string}    _patchClass
            -         * @private
            -         * @static
            -         */
            -        , _usePatch:
            -            function( _items, _fromClass, _patchClass ){
            -                var i, j, k, l, _find;
            -                for( i = 0, j = _items.length; i < j; i++ ){
            -                    if( ( $.trim( _items[i].toString() ) == _fromClass ) ){
            -                        _find = true;
            -                        break;
            -                    }
            -                }
            -                _find && !JC[ _patchClass ] && _items.unshift( _patchClass );
            -                return _items;
            -            }
            -       /**
            -        * 输出调试信息, 可通过 JC.debug 指定是否显示调试信息
            -        * @param    {[string[,string]]}  任意参数任意长度的字符串内容
            -        * @method log
            -        * @static
            -        */
            -       , log: function(){ JC.debug && window.console && console.log( sliceArgs( arguments ).join(' ') ); }
            -       /**
            -        * 定义输出路径的 v 参数, 以便控制缓存
            -        * @property     pathPostfix
            -        * @type     string
            -        * @default  empty
            -        * @static
            -        */
            -       , pathPostfix: ''
            -       /**
            -        * 是否启用nginx concat 模块的路径格式  
            -        * @property     enableNginxStyle
            -        * @type bool
            -        * @default  false
            -        * @static
            -        */
            -       , enableNginxStyle: false
            -       /**
            -        * 定义 nginx style 的基础路径
            -        * <br /><b>注意:</b> 如果这个属性为空, 即使 enableNginxStyle = true, 也是直接输出默认路径 
            -        * @property     nginxBasePath
            -        * @type string
            -        * @default  empty
            -        * @static
            -        */
            -       , nginxBasePath: ''
            -       /**
            -        * 资源路径映射对象
            -        * <br />设置 JC.use 逗号(',') 分隔项的 对应URL路径
            -        * @property FILE_MAP
            -        * @type object
            -        * @default null
            -        * @static
            -        * @example
            -                以下例子假定 libpath = http://git.me.btbtd.org/ignore/JQueryComps_dev/
            -                <script>
            -                    JC.FILE_MAP = {
            -                        'Calendar': 'http://jc.openjavascript.org/comps/Calendar/Calendar.js'
            -                        , 'Form': 'http://jc.openjavascript.org/comps/Form/Form.js'
            -                        , 'LunarCalendar': 'http://jc.openjavascript.org/comps/LunarCalendar/LunarCalendar.js'
            -                        , 'Panel': 'http://jc.openjavascript.org/comps/Panel/Panel.js' 
            -                        , 'Tab': 'http://jc.openjavascript.org/comps/Tab/Tab.js'
            -                        , 'Tips': 'http://jc.openjavascript.org/comps/Tips/Tips.js' 
            -                        , 'Tree': 'http://jc.openjavascript.org/comps/Tree/Tree.js'
            -                        , 'Valid': 'http://jc.openjavascript.org/comps/Valid/Valid.js'
            -                        , 'plugins/jquery.form.js': 'http://jc.openjavascript.org/plugins/jquery.form.js'
            -                        , 'plugins/json2.js': 'http://jc.openjavascript.org/plugins/json2.js'
            -                    };
            -
            -                    JC.use( 'Panel, Tips, Valid, plugins/jquery.form.js' );
            -
            -                    $(document).ready(function(){
            -                        //JC.Dialog( 'JC.use example', 'test issue' );
            -                    });
            -                </script>
            -
            -                output should be:
            -                    http://git.me.btbtd.org/ignore/JQueryComps_dev/lib.js
            -                    http://jc.openjavascript.org/comps/Panel/Panel.js
            -                    http://jc.openjavascript.org/comps/Tips/Tips.js
            -                    http://jc.openjavascript.org/comps/Valid/Valid.js
            -                    http://jc.openjavascript.org/plugins/jquery.form.js
            -        */
            -       , FILE_MAP: null
            -       /**
            -        * 输出 nginx concat 模块的脚本路径格式
            -        * @method   _writeNginxScript
            -        * @param    {array} _paths
            -        * @private
            -        * @static
            -        */
            -       , _writeNginxScript:
            -            function( _paths ){
            -                if( !JC.enableNginxStyle ) return;
            -                for( var i = 0, j = _paths.length, _ngpath = [], _npath = []; i < j; i++ ){
            -                    JC.log( _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase(), JC.nginxBasePath.toLowerCase() );
            -                    if(  
            -                         _paths[i].slice( 0, JC.nginxBasePath.length ).toLowerCase() 
            -                        == JC.nginxBasePath.toLowerCase() )
            -                    {
            -                        _ngpath.push( _paths[i].slice( JC.nginxBasePath.length ) );
            -                    }else{
            -                        _npath.push( _paths[i] );
            -                    }
            -                }
            -
            -                var _postfix = JC.pathPostfix ? '?v=' + JC.pathPostfix : '';
            -
            -                _ngpath.length && document.write( printf( '<script src="{0}??{1}{2}"><\/script>'
            -                                                    , JC.nginxBasePath, _ngpath.join(','), _postfix ) );
            -                _npath.length && JC._writeNormalScript( _npath );
            -            }
            -       /**
            -        * 输出的脚本路径格式
            -        * @method   _writeNormalScript
            -        * @param    {array} _paths
            -        * @private
            -        * @static
            -        */
            -       , _writeNormalScript:
            -            function( _paths ){
            -                var _postfix = JC.pathPostfix ? '?v=' + JC.pathPostfix : '';
            -                for( var i = 0, j = _paths.length, _path; i < j; i++ ){
            -                    _path = _paths[i];
            -                    JC.pathPostfix && ( _path = addUrlParams( _path, { 'v': JC.pathPostfix } ) );
            -                    _paths[i] = printf( '<script src="{0}"><\/script>', _path );
            -                }
            -                _paths.length && document.write( _paths.join('') );
            -            }
            -       /**
            -        * 保存 use 过的资源路径, 以便进行唯一性判断, 避免重复加载
            -        * @property     _USE_CACHE
            -        * @type     object
            -        * @default  {}
            -        * @private
            -        * @static
            -        */
            -       , _USE_CACHE: {}
            -    };
            -    /**
            -     * UXC 是 JC 的别名
            -     * <br />存在这个变量是为了向后兼容
            -     * <br />20130804 之前的命名空间是 UXC, 这个命名空间在一段时间后将会清除, 请使用 JC 命名空间
            -     * <p><b>see</b>: <a href='window.JC.html'>JC</a></p>
            -     * @class UXC
            -     * @namespace   window
            -     * @static
            -     * @date    2013-05-22
            -     */
            -    window.UXC = window.JC;
            -    /**
            -     * 自动识别组件库所在路径
            -     */
            -    JC.PATH = scriptPath();
            -    //dev开发时因为脚本没合并, IE找不到库的正确路径, 这个判断仅针对dev开发分支
            -    /\/JQueryComps_dev\//i.test( location.href ) 
            -        && !( /file\:/.test( location.href ) || /\\/.test( location.href ) )
            -        && ( JC.PATH = '/ignore/JQueryComps_dev/' );
            -    /**
            -     * <h2>业务逻辑命名空间</h2>
            -     * <br />这个命名空间的组件主要为满足业务需求, 不是通用组件~
            -     * <br />但在某个项目中应该是常用组件~
            -     * <dl>
            -     *      <dt>业务组件的存放位置:</dt>
            -     *      <dd>libpath/bizs/</dd>
            -     *
            -     *      <dt>使用业务组件</dt>
            -     *      <dd> JC.use( 'Bizs.BizComps' ); //  libpath/bizs/BizComps/BizComps.js </dd>
            -     *
            -     *      <dt>使用业务文件</dt>
            -     *      <dd> JC.use( 'bizs.BizFile' ); //   libpath/bizs/BizFile.js </dd>
            -     * </dl>
            -     * @namespace   window
            -     * @class       Bizs
            -     * @static
            -     */
            -    window.Bizs = window.Bizs || {};
            -}(jQuery));
            -
            -;
            -
            -;(function($){
            -    window.JC && ( window.BaseMVC = JC.BaseMVC = BaseMVC );
            -    /**
            -     * MVC 抽象类 ( <b>仅供扩展用</b> )
            -     * <p>这个类默认已经包含在lib.js里面, 不需要显式引用</p>   
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.BaseMVC.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/BaseMVC/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class BaseMVC
            -     * @constructor
            -     * @param   {selector|string}   _selector   
            -     * @version dev 0.1 2013-09-07
            -     * @author  qiushaowei   <suches@btbtd.org> | 75 Team
            -     */
            -    function BaseMVC( _selector ){
            -        throw new Error( "JC.BaseMVC is an abstract class, can't initialize!" );
            -
            -        if( BaseMVC.getInstance( _selector ) ) return BaseMVC.getInstance( _selector );
            -        BaseMVC.getInstance( _selector, this );
            -
            -        this._model = new BaseMVC.Model( _selector );
            -        this._view = new BaseMVC.View( this._model );
            -
            -        this._init( );
            -    }
            -    
            -    BaseMVC.prototype = {
            -        /**
            -         * 内部初始化方法
            -         * @method  _init
            -         * @param   {selector}  _selector
            -         * @private
            -         */
            -        _init:
            -            function(){
            -                var _p = this;
            -
            -                _p._beforeInit();
            -                _p._initHanlderEvent();
            -
            -                $( [ _p._view, _p._model ] ).on('BindEvent', function( _evt, _evtName, _cb ){
            -                    _p.on( _evtName, _cb );
            -                });
            -
            -                $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){
            -                    var _data = sliceArgs( arguments ).slice( 2 );
            -                    _p.trigger( _evtName, _data );
            -                });
            -
            -                _p._model.init();
            -                _p._view && _p._view.init();
            -
            -                _p._inited();
            -
            -                return _p;
            -            }    
            -        /**
            -         * 初始化之前调用的方法
            -         * @method  _beforeInit
            -         * @private
            -         */
            -        , _beforeInit:
            -            function(){
            -            }
            -        /**
            -         * 内部事件初始化方法
            -         * @method  _initHanlderEvent
            -         * @private
            -         */
            -        , _initHanlderEvent:
            -            function(){
            -            }
            -        /**
            -         * 内部初始化完毕时, 调用的方法
            -         * @method  _inited
            -         * @private
            -         */
            -        , _inited:
            -            function(){
            -            }
            -        /**
            -         * 获取 显示 BaseMVC 的触发源选择器, 比如 a 标签
            -         * @method  selector
            -         * @return  selector
            -         */ 
            -        , selector: function(){ return this._model.selector(); }
            -        /**
            -         * 使用 jquery on 绑定事件
            -         * @method  {string}    on
            -         * @param   {string}    _evtName
            -         * @param   {function}  _cb
            -         * @return  BaseMVCInstance
            -         */
            -        , on: function( _evtName, _cb ){ $(this).on(_evtName, _cb ); return this;}
            -        /**
            -         * 使用 jquery trigger 绑定事件
            -         * @method  {string}    trigger
            -         * @param   {string}    _evtName
            -         * @return  BaseMVCInstance
            -         */
            -        , trigger: function( _evtName, _data ){ $(this).trigger( _evtName, _data ); return this;}
            -    }
            -    /**
            -     * 获取或设置 BaseMVC 的实例
            -     * @method  getInstance
            -     * @param   {selector}      _selector
            -     * @static
            -     * @return  {BaseMVCInstance}
            -     */
            -    /*
            -    BaseMVC.getInstance =
            -        function( _selector, _setter ){
            -            if( typeof _selector == 'string' && !/</.test( _selector ) ) 
            -                    _selector = $(_selector);
            -            if( !(_selector && _selector.length ) || ( typeof _selector == 'string' ) ) return;
            -            typeof _setter != 'undefined' && _selector.data( BaseMVC.Model._instanceName, _setter );
            -
            -            return _selector.data( BaseMVC.Model._instanceName );
            -        };
            -    */
            -    /**
            -     * 是否自动初始化
            -     * @property    autoInit
            -     * @type        bool
            -     * @default     true
            -     * @static
            -     */
            -    BaseMVC.autoInit = true;
            -    /**
            -     * 复制 BaseMVC 的所有方法到 _outClass
            -     * @method  build
            -     * @param   {Class} _outClass
            -     * @static
            -     */
            -    BaseMVC.build =
            -        function( _outClass, _namespace ){
            -            BaseMVC.buildModel( _outClass );
            -            BaseMVC.buildView( _outClass );
            -
            -            BaseMVC.buildClass( BaseMVC, _outClass, _namespace );
            -            BaseMVC.buildClass( BaseMVC.Model, _outClass.Model );
            -            BaseMVC.buildClass( BaseMVC.View, _outClass.View );
            -        };
            -    /**
            -     * 复制 _inClass 的所有方法到 _outClass
            -     * @method  buildClass
            -     * @param   {Class}     _inClass
            -     * @param   {Class}     _outClass
            -     * @param   {string}    _namespace  default='JC', 如果是业务组件, 请显式指明为 'Bizs'
            -     * @static
            -     */
            -    BaseMVC.buildClass = 
            -        function( _inClass, _outClass, _namespace ){
            -            if( !( _inClass && _outClass ) ) return;
            -            var _k
            -                , _fStr, _tmp
            -                //, _inName = funcName( _inClass )
            -                //, _outName = funcName( _outClass )
            -                //, _inRe = _inName && _outName ? new RegExp( _inName, 'g' ) : null
            -                //, _namespace = _namespace ? _namespace + '.' : 'JC.'
            -                ;
            -
            -            //_inName && _outName && JC.log( 'BaseMVC.buildClass:', _inName, 'to', _outName );
            -            if( _outClass ){
            -                for( _k in _inClass ){ 
            -                    if( !_outClass[_k] ){//clone static function
            -                        if( _inClass[_k].constructor == Function ){
            -                            /*
            -                            _fStr = _inClass[ _k ].toString();
            -                            _fStr = _fStr.replace( _inRe, _namespace + _outName );
            -                            _tmp = printf( '( {0}{1}.{2} = {3})', _namespace, _outName, _k, _fStr );
            -                            eval( _tmp  );
            -                            */
            -                        }else{//clone static property
            -                            _outClass[_k] = _inClass[_k];
            -                        }
            -                    }
            -                }
            -
            -                for( _k in _inClass.prototype ) 
            -                    !_outClass.prototype[_k] && ( _outClass.prototype[_k] = _inClass.prototype[_k] );
            -            }
            -        };
            -    /**
            -     * 为 _outClass 生成一个通用 Model 类
            -     * @method  buildModel
            -     * @param   {Class} _outClass
            -     * @static
            -     */
            -    BaseMVC.buildModel =
            -        function( _outClass ){
            -            !_outClass.Model && ( 
            -                        _outClass.Model = function( _selector ){ this._selector = _selector; }
            -                        , _outClass.Model._instanceName = 'CommonIns'
            -                    );
            -        }
            -    /**
            -     * 为 _outClass 生成一个通用 View 类
            -     * @method  buildView
            -     * @param   {Class} _outClass
            -     * @static
            -     */
            -    BaseMVC.buildView =
            -        function( _outClass ){
            -            !_outClass.View && ( _outClass.View = function( _model ){ this._model = _model; } );
            -        }
            -    /**
            -     * MVC Model 类( <b>仅供扩展用</b> )
            -     * <p>这个类默认已经包含在lib.js里面, 不需要显式引用</p>   
            -     * <p><b>require</b>: <a href='window.jQuery.html'>jQuery</a></p>
            -     * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            -     * | <a href='http://jc.openjavascript.org/docs_api/classes/JC.BaseMVC.Model.html' target='_blank'>API docs</a>
            -     * | <a href='../../comps/BaseMVC/_demo' target='_blank'>demo link</a></p>
            -     * @namespace JC
            -     * @class BaseMVC.Model
            -     * @constructor
            -     * @param   {selector|string}   _selector   
            -     * @version dev 0.1 2013-09-11
            -     * @author  qiushaowei   <suches@btbtd.org> | 75 Team
            -     */
            -    BaseMVC.buildModel( BaseMVC );
            -    /**
            -     * 设置 selector 实例引用的 data 属性名
            -     * @property    _instanceName
            -     * @type        string
            -     * @default     BaseMVCIns
            -     * @private
            -     * @static
            -     */
            -    BaseMVC.Model._instanceName = 'BaseMVCIns';
            -    BaseMVC.Model.prototype = {
            -        init:
            -            function(){
            -                return this;
            -            }
            -        /**
            -         * 初始化的 jq 选择器
            -         * @method  selector
            -         * @param   {selector}  _setter
            -         * @return  selector
            -         */
            -        , selector: 
            -            function( _setter ){ 
            -                typeof _setter != 'undefined' && ( this._selector = _setter );
            -                return this._selector; 
            -            }
            -        /**
            -         * 读取 int 属性的值
            -         * @method  intProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  int
            -         */
            -        , intProp:
            -            function( _selector, _key ){
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -                var _r = 0;
            -                _selector 
            -                    && _selector.is( '[' + _key + ']' ) 
            -                    && ( _r = parseInt( _selector.attr( _key ).trim(), 10 ) || _r );
            -                return _r;
            -            }
            -        /**
            -         * 读取 float 属性的值
            -         * @method  floatProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  float
            -         */
            -        , floatProp:
            -            function( _selector, _key ){
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -                var _r = 0;
            -                _selector 
            -                    && _selector.is( '[' + _key + ']' ) 
            -                    && ( _r = parseFloat( _selector.attr( _key ).trim() ) || _r );
            -                return _r;
            -            }
            -        /**
            -         * 读取 string 属性的值
            -         * @method  stringProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  string
            -         */
            -        , stringProp:
            -            function( _selector, _key ){
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -                var _r = ( this.attrProp( _selector, _key ) || '' ).toLowerCase();
            -                return _r;
            -            }
            -        /**
            -         * 读取 html 属性值
            -         * <br />这个跟 stringProp 的区别是不会强制转换为小写
            -         * @method  attrProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  string
            -         */
            -        , attrProp:
            -            function( _selector, _key ){
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -                var _r = '';
            -                _selector
            -                    && _selector.is( '[' + _key + ']' ) 
            -                    && ( _r = _selector.attr( _key ).trim() );
            -                return _r;
            -            }
            -
            -        /**
            -         * 读取 boolean 属性的值
            -         * @method  boolProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string|bool}       _key
            -         * @param   {bool}              _defalut
            -         * @return  {bool|undefined}
            -         */
            -        , boolProp:
            -            function( _selector, _key, _defalut ){
            -                if( typeof _key == 'boolean' ){
            -                    _defalut = _key;
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -                var _r = undefined;
            -                _selector
            -                    && _selector.is( '[' + _key + ']' ) 
            -                    && ( _r = parseBool( _selector.attr( _key ).trim() ) );
            -                return _r;
            -            }
            -        /**
            -         * 读取 callback 属性的值
            -         * @method  callbackProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  {function|undefined}
            -         */
            -        , callbackProp:
            -            function( _selector, _key ){
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -                var _r, _tmp;
            -                _selector 
            -                    && _selector.is( '[' + _key + ']' )
            -                    && ( _tmp = window[ _selector.attr( _key ) ] )
            -                    && ( _r = _tmp )
            -                    ;
            -                return _r;
            -            }
            -        /**
            -         * 获取 selector 属性的 jquery 选择器
            -         * @method  selectorProp
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  bool
            -         */
            -        , selectorProp:
            -            function( _selector, _key ){
            -                var _r;
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -
            -                _selector
            -                    && _selector.is( '[' + _key + ']' ) 
            -                    && ( _r = parentSelector( _selector, _selector.attr( _key ) ) );
            -
            -                return _r;
            -            }
            -        /**
            -         * 判断 _selector 是否具体某种特征
            -         * @method  is
            -         * @param   {selector|string}  _selector    如果 _key 为空将视 _selector 为 _key, _selector 为 this.selector()
            -         * @param   {string}           _key
            -         * @return  bool
            -         */
            -        , is:
            -            function( _selector, _key ){
            -                if( typeof _key == 'undefined' ){
            -                    _key = _selector;
            -                    _selector = this.selector();
            -                }else{
            -                    _selector && ( _selector = $( _selector ) );
            -                }
            -
            -                return _selector && _selector.is( _key );
            -            }
            -    };
            -    
            -    BaseMVC.buildView( BaseMVC );
            -    BaseMVC.View.prototype = {
            -        init:
            -            function() {
            -                return this;
            -            }
            -    };
            -    /*
            -    $(document).ready( function(){
            -        setTimeout( function(){
            -        }, 1 );
            -    });
            -    */
            -}(jQuery));
            -
            -    
            -
            - -
            -
            -
            -
            -
            -
            - - - - - - - - - - diff --git a/docs_api/files/.._plugins_SWFUpload.js.html b/docs_api/files/.._plugins_SWFUpload.js.html new file mode 100644 index 000000000..b1c61250b --- /dev/null +++ b/docs_api/files/.._plugins_SWFUpload.js.html @@ -0,0 +1,1406 @@ + + + + + ../plugins/SWFUpload.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../plugins/SWFUpload.js

            + +
            +
            +/**
            + * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
            + *
            + * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
            + *
            + * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
            + * http://www.opensource.org/licenses/mit-license.php
            + *
            + * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
            + * http://www.opensource.org/licenses/mit-license.php
            + *
            + * SWFObject v2.2 <http://code.google.com/p/swfobject/> 
            + *	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
            + */
            +
            +
            +
            +/* ******************* */
            +/* Constructor & Init  */
            +/* ******************* */
            +var SWFUpload;
            +var swfobject;
            +
            +if (SWFUpload == undefined) {
            +	SWFUpload = function (settings) {
            +		this.initSWFUpload(settings);
            +	};
            +}
            +
            +SWFUpload.prototype.initSWFUpload = function (userSettings) {
            +	try {
            +		this.customSettings = {};	// A container where developers can place their own settings associated with this instance.
            +		this.settings = {};
            +		this.eventQueue = [];
            +		this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
            +		this.movieElement = null;
            +
            +
            +		// Setup global control tracking
            +		SWFUpload.instances[this.movieName] = this;
            +
            +		// Load the settings.  Load the Flash movie.
            +		this.initSettings(userSettings);
            +		this.loadSupport();
            +		if (this.swfuploadPreload()) {
            +			this.loadFlash();
            +		}
            +
            +		this.displayDebugInfo();
            +	} catch (ex) {
            +		delete SWFUpload.instances[this.movieName];
            +		throw ex;
            +	}
            +};
            +
            +/* *************** */
            +/* Static Members  */
            +/* *************** */
            +SWFUpload.instances = {};
            +SWFUpload.movieCount = 0;
            +SWFUpload.version = "2.5.0 2010-01-15 Beta 2";
            +SWFUpload.QUEUE_ERROR = {
            +	QUEUE_LIMIT_EXCEEDED            : -100,
            +	FILE_EXCEEDS_SIZE_LIMIT         : -110,
            +	ZERO_BYTE_FILE                  : -120,
            +	INVALID_FILETYPE                : -130
            +};
            +SWFUpload.UPLOAD_ERROR = {
            +	HTTP_ERROR                      : -200,
            +	MISSING_UPLOAD_URL              : -210,
            +	IO_ERROR                        : -220,
            +	SECURITY_ERROR                  : -230,
            +	UPLOAD_LIMIT_EXCEEDED           : -240,
            +	UPLOAD_FAILED                   : -250,
            +	SPECIFIED_FILE_ID_NOT_FOUND     : -260,
            +	FILE_VALIDATION_FAILED          : -270,
            +	FILE_CANCELLED                  : -280,
            +	UPLOAD_STOPPED                  : -290,
            +	RESIZE                          : -300
            +};
            +SWFUpload.FILE_STATUS = {
            +	QUEUED       : -1,
            +	IN_PROGRESS  : -2,
            +	ERROR        : -3,
            +	COMPLETE     : -4,
            +	CANCELLED    : -5
            +};
            +SWFUpload.UPLOAD_TYPE = {
            +	NORMAL       : -1,
            +	RESIZED      : -2
            +};
            +
            +SWFUpload.BUTTON_ACTION = {
            +	SELECT_FILE             : -100,
            +	SELECT_FILES            : -110,
            +	START_UPLOAD            : -120,
            +	JAVASCRIPT              : -130,	// DEPRECATED
            +	NONE                    : -130
            +};
            +SWFUpload.CURSOR = {
            +	ARROW : -1,
            +	HAND  : -2
            +};
            +SWFUpload.WINDOW_MODE = {
            +	WINDOW       : "window",
            +	TRANSPARENT  : "transparent",
            +	OPAQUE       : "opaque"
            +};
            +
            +SWFUpload.RESIZE_ENCODING = {
            +	JPEG  : -1,
            +	PNG   : -2
            +};
            +
            +// Private: takes a URL, determines if it is relative and converts to an absolute URL
            +// using the current site. Only processes the URL if it can, otherwise returns the URL untouched
            +SWFUpload.completeURL = function (url) {
            +	try {
            +		var path = "", indexSlash = -1;
            +		if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//) || url === "") {
            +			return url;
            +		}
            +		
            +		indexSlash = window.location.pathname.lastIndexOf("/");
            +		if (indexSlash <= 0) {
            +			path = "/";
            +		} else {
            +			path = window.location.pathname.substr(0, indexSlash) + "/";
            +		}
            +		
            +		return path + url;
            +	} catch (ex) {
            +		return url;
            +	}
            +};
            +
            +// Public: assign a new function to onload to use swfobject's domLoad functionality
            +SWFUpload.onload = function () {};
            +
            +
            +/* ******************** */
            +/* Instance Members  */
            +/* ******************** */
            +
            +// Private: initSettings ensures that all the
            +// settings are set, getting a default value if one was not assigned.
            +SWFUpload.prototype.initSettings = function (userSettings) {
            +	this.ensureDefault = function (settingName, defaultValue) {
            +		var setting = userSettings[settingName];
            +		if (setting != undefined) {
            +			this.settings[settingName] = setting;
            +		} else {
            +			this.settings[settingName] = defaultValue;
            +		}
            +	};
            +	
            +	// Upload backend settings
            +	this.ensureDefault("upload_url", "");
            +	this.ensureDefault("preserve_relative_urls", false);
            +	this.ensureDefault("file_post_name", "Filedata");
            +	this.ensureDefault("post_params", {});
            +	this.ensureDefault("use_query_string", false);
            +	this.ensureDefault("requeue_on_error", false);
            +	this.ensureDefault("http_success", []);
            +	this.ensureDefault("assume_success_timeout", 0);
            +	
            +	// File Settings
            +	this.ensureDefault("file_types", "*.*");
            +	this.ensureDefault("file_types_description", "All Files");
            +	this.ensureDefault("file_size_limit", 0);	// Default zero means "unlimited"
            +	this.ensureDefault("file_upload_limit", 0);
            +	this.ensureDefault("file_queue_limit", 0);
            +
            +	// Flash Settings
            +	this.ensureDefault("flash_url", "swfupload.swf");
            +	this.ensureDefault("flash9_url", "swfupload_fp9.swf");
            +	this.ensureDefault("prevent_swf_caching", true);
            +	
            +	// Button Settings
            +	this.ensureDefault("button_image_url", "");
            +	this.ensureDefault("button_width", 1);
            +	this.ensureDefault("button_height", 1);
            +	this.ensureDefault("button_text", "");
            +	this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
            +	this.ensureDefault("button_text_top_padding", 0);
            +	this.ensureDefault("button_text_left_padding", 0);
            +	this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
            +	this.ensureDefault("button_disabled", false);
            +	this.ensureDefault("button_placeholder_id", "");
            +	this.ensureDefault("button_placeholder", null);
            +	this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
            +	this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
            +	
            +	// Debug Settings
            +	this.ensureDefault("debug", false);
            +	this.settings.debug_enabled = this.settings.debug;	// Here to maintain v2 API
            +	
            +	// Event Handlers
            +	this.settings.return_upload_start_handler = this.returnUploadStart;
            +	this.ensureDefault("swfupload_preload_handler", null);
            +	this.ensureDefault("swfupload_load_failed_handler", null);
            +	this.ensureDefault("swfupload_loaded_handler", null);
            +	this.ensureDefault("file_dialog_start_handler", null);
            +	this.ensureDefault("file_queued_handler", null);
            +	this.ensureDefault("file_queue_error_handler", null);
            +	this.ensureDefault("file_dialog_complete_handler", null);
            +	
            +	this.ensureDefault("upload_resize_start_handler", null);
            +	this.ensureDefault("upload_start_handler", null);
            +	this.ensureDefault("upload_progress_handler", null);
            +	this.ensureDefault("upload_error_handler", null);
            +	this.ensureDefault("upload_success_handler", null);
            +	this.ensureDefault("upload_complete_handler", null);
            +	
            +	this.ensureDefault("mouse_click_handler", null);
            +	this.ensureDefault("mouse_out_handler", null);
            +	this.ensureDefault("mouse_over_handler", null);
            +	
            +	this.ensureDefault("debug_handler", this.debugMessage);
            +
            +	this.ensureDefault("custom_settings", {});
            +
            +	// Other settings
            +	this.customSettings = this.settings.custom_settings;
            +	
            +	// Update the flash url if needed
            +	if (!!this.settings.prevent_swf_caching) {
            +		this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
            +		this.settings.flash9_url = this.settings.flash9_url + (this.settings.flash9_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
            +	}
            +	
            +	if (!this.settings.preserve_relative_urls) {
            +		this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
            +		this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
            +	}
            +	
            +	delete this.ensureDefault;
            +};
            +
            +// Initializes the supported functionality based the Flash Player version, state, and event that occur during initialization
            +SWFUpload.prototype.loadSupport = function () {
            +	this.support = {
            +		loading : swfobject.hasFlashPlayerVersion("9.0.28"),
            +		imageResize : swfobject.hasFlashPlayerVersion("10.0.0")
            +	};
            +	
            +};
            +
            +// Private: loadFlash replaces the button_placeholder element with the flash movie.
            +SWFUpload.prototype.loadFlash = function () {
            +	var targetElement, tempParent, wrapperType, flashHTML, els;
            +
            +	if (!this.support.loading) {
            +		this.queueEvent("swfupload_load_failed_handler", ["Flash Player doesn't support SWFUpload"]);
            +		return;
            +	}
            +	
            +	// Make sure an element with the ID we are going to use doesn't already exist
            +	if (document.getElementById(this.movieName) !== null) {
            +		this.support.loading = false;
            +		this.queueEvent("swfupload_load_failed_handler", ["Element ID already in use"]);
            +		return;
            +	}
            +
            +	// Get the element where we will be placing the flash movie
            +	targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
            +
            +	if (targetElement == undefined) {
            +		this.support.loading = false;
            +		this.queueEvent("swfupload_load_failed_handler", ["button place holder not found"]);
            +		return;
            +	}
            +
            +	wrapperType = (targetElement.currentStyle && targetElement.currentStyle["display"] || window.getComputedStyle && document.defaultView.getComputedStyle(targetElement, null).getPropertyValue("display")) !== "block" ? "span" : "div";
            +	
            +	// Append the container and load the flash
            +	tempParent = document.createElement(wrapperType);
            +
            +	flashHTML = this.getFlashHTML();
            +
            +	try {
            +		tempParent.innerHTML = flashHTML;	// Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
            +	} catch (ex) {
            +		this.support.loading = false;
            +		this.queueEvent("swfupload_load_failed_handler", ["Exception loading Flash HTML into placeholder"]);
            +		return;
            +	}
            +
            +	// Try to get the movie element immediately
            +	els = tempParent.getElementsByTagName("object");
            +	if (!els || els.length > 1 || els.length === 0) {
            +		this.support.loading = false;
            +		this.queueEvent("swfupload_load_failed_handler", ["Unable to find movie after adding to DOM"]);
            +		return;
            +	} else if (els.length === 1) {
            +		this.movieElement = els[0];
            +	}
            +	
            +	targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);
            +
            +	// Fix IE Flash/Form bug
            +	if (window[this.movieName] == undefined) {
            +		window[this.movieName] = this.getMovieElement();
            +	}
            +};
            +
            +// Private: getFlashHTML generates the object tag needed to embed the flash in to the document
            +SWFUpload.prototype.getFlashHTML = function (flashVersion) {
            +	// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
            +	return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', (this.support.imageResize ? this.settings.flash_url : this.settings.flash9_url), '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
            +				'<param name="wmode" value="', this.settings.button_window_mode, '" />',
            +				'<param name="movie" value="', (this.support.imageResize ? this.settings.flash_url : this.settings.flash9_url), '" />',
            +				'<param name="quality" value="high" />',
            +				'<param name="allowScriptAccess" value="always" />',
            +				'<param name="flashvars" value="' + this.getFlashVars() + '" />',
            +				'</object>'].join("");
            +};
            +
            +// Private: getFlashVars builds the parameter string that will be passed
            +// to flash in the flashvars param.
            +SWFUpload.prototype.getFlashVars = function () {
            +	// Build a string from the post param object
            +	var httpSuccessString, paramString;
            +	
            +	paramString = this.buildParamString();
            +	httpSuccessString = this.settings.http_success.join(",");
            +	
            +	// Build the parameter string
            +	return ["movieName=", encodeURIComponent(this.movieName),
            +			"&amp;uploadURL=", encodeURIComponent(this.settings.upload_url),
            +			"&amp;useQueryString=", encodeURIComponent(this.settings.use_query_string),
            +			"&amp;requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
            +			"&amp;httpSuccess=", encodeURIComponent(httpSuccessString),
            +			"&amp;assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
            +			"&amp;params=", encodeURIComponent(paramString),
            +			"&amp;filePostName=", encodeURIComponent(this.settings.file_post_name),
            +			"&amp;fileTypes=", encodeURIComponent(this.settings.file_types),
            +			"&amp;fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
            +			"&amp;fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
            +			"&amp;fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
            +			"&amp;fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
            +			"&amp;debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
            +			"&amp;buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
            +			"&amp;buttonWidth=", encodeURIComponent(this.settings.button_width),
            +			"&amp;buttonHeight=", encodeURIComponent(this.settings.button_height),
            +			"&amp;buttonText=", encodeURIComponent(this.settings.button_text),
            +			"&amp;buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
            +			"&amp;buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
            +			"&amp;buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
            +			"&amp;buttonAction=", encodeURIComponent(this.settings.button_action),
            +			"&amp;buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
            +			"&amp;buttonCursor=", encodeURIComponent(this.settings.button_cursor)
            +		].join("");
            +};
            +
            +// Public: get retrieves the DOM reference to the Flash element added by SWFUpload
            +// The element is cached after the first lookup
            +SWFUpload.prototype.getMovieElement = function () {
            +	if (this.movieElement == undefined) {
            +		this.movieElement = document.getElementById(this.movieName);
            +	}
            +
            +	if (this.movieElement === null) {
            +		throw "Could not find Flash element";
            +	}
            +	
            +	return this.movieElement;
            +};
            +
            +// Private: buildParamString takes the name/value pairs in the post_params setting object
            +// and joins them up in to a string formatted "name=value&amp;name=value"
            +SWFUpload.prototype.buildParamString = function () {
            +	var name, postParams, paramStringPairs = [];
            +	
            +	postParams = this.settings.post_params; 
            +
            +	if (typeof(postParams) === "object") {
            +		for (name in postParams) {
            +			if (postParams.hasOwnProperty(name)) {
            +				paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString()));
            +			}
            +		}
            +	}
            +
            +	return paramStringPairs.join("&amp;");
            +};
            +
            +// Public: Used to remove a SWFUpload instance from the page. This method strives to remove
            +// all references to the SWF, and other objects so memory is properly freed.
            +// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state.
            +// Credits: Major improvements provided by steffen
            +SWFUpload.prototype.destroy = function () {
            +	var movieElement;
            +	
            +	try {
            +		// Make sure Flash is done before we try to remove it
            +		this.cancelUpload(null, false);
            +		
            +		movieElement = this.cleanUp();
            +
            +		// Remove the SWFUpload DOM nodes
            +		if (movieElement) {
            +			// Remove the Movie Element from the page
            +			try {
            +				movieElement.parentNode.removeChild(movieElement);
            +			} catch (ex) {}
            +		}
            +
            +		// Remove IE form fix reference
            +		window[this.movieName] = null;
            +
            +		// Destroy other references
            +		SWFUpload.instances[this.movieName] = null;
            +		delete SWFUpload.instances[this.movieName];
            +
            +		this.movieElement = null;
            +		this.settings = null;
            +		this.customSettings = null;
            +		this.eventQueue = null;
            +		this.movieName = null;
            +		
            +		
            +		return true;
            +	} catch (ex2) {
            +		return false;
            +	}
            +};
            +
            +
            +// Public: displayDebugInfo prints out settings and configuration
            +// information about this SWFUpload instance.
            +// This function (and any references to it) can be deleted when placing
            +// SWFUpload in production.
            +SWFUpload.prototype.displayDebugInfo = function () {
            +	this.debug(
            +		[
            +			"---SWFUpload Instance Info---\n",
            +			"Version: ", SWFUpload.version, "\n",
            +			"Movie Name: ", this.movieName, "\n",
            +			"Settings:\n",
            +			"\t", "upload_url:               ", this.settings.upload_url, "\n",
            +			"\t", "flash_url:                ", this.settings.flash_url, "\n",
            +			"\t", "flash9_url:                ", this.settings.flash9_url, "\n",
            +			"\t", "use_query_string:         ", this.settings.use_query_string.toString(), "\n",
            +			"\t", "requeue_on_error:         ", this.settings.requeue_on_error.toString(), "\n",
            +			"\t", "http_success:             ", this.settings.http_success.join(", "), "\n",
            +			"\t", "assume_success_timeout:   ", this.settings.assume_success_timeout, "\n",
            +			"\t", "file_post_name:           ", this.settings.file_post_name, "\n",
            +			"\t", "post_params:              ", this.settings.post_params.toString(), "\n",
            +			"\t", "file_types:               ", this.settings.file_types, "\n",
            +			"\t", "file_types_description:   ", this.settings.file_types_description, "\n",
            +			"\t", "file_size_limit:          ", this.settings.file_size_limit, "\n",
            +			"\t", "file_upload_limit:        ", this.settings.file_upload_limit, "\n",
            +			"\t", "file_queue_limit:         ", this.settings.file_queue_limit, "\n",
            +			"\t", "debug:                    ", this.settings.debug.toString(), "\n",
            +
            +			"\t", "prevent_swf_caching:      ", this.settings.prevent_swf_caching.toString(), "\n",
            +
            +			"\t", "button_placeholder_id:    ", this.settings.button_placeholder_id.toString(), "\n",
            +			"\t", "button_placeholder:       ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n",
            +			"\t", "button_image_url:         ", this.settings.button_image_url.toString(), "\n",
            +			"\t", "button_width:             ", this.settings.button_width.toString(), "\n",
            +			"\t", "button_height:            ", this.settings.button_height.toString(), "\n",
            +			"\t", "button_text:              ", this.settings.button_text.toString(), "\n",
            +			"\t", "button_text_style:        ", this.settings.button_text_style.toString(), "\n",
            +			"\t", "button_text_top_padding:  ", this.settings.button_text_top_padding.toString(), "\n",
            +			"\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
            +			"\t", "button_action:            ", this.settings.button_action.toString(), "\n",
            +			"\t", "button_cursor:            ", this.settings.button_cursor.toString(), "\n",
            +			"\t", "button_disabled:          ", this.settings.button_disabled.toString(), "\n",
            +
            +			"\t", "custom_settings:          ", this.settings.custom_settings.toString(), "\n",
            +			"Event Handlers:\n",
            +			"\t", "swfupload_preload_handler assigned:  ", (typeof this.settings.swfupload_preload_handler === "function").toString(), "\n",
            +			"\t", "swfupload_load_failed_handler assigned:  ", (typeof this.settings.swfupload_load_failed_handler === "function").toString(), "\n",
            +			"\t", "swfupload_loaded_handler assigned:  ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
            +			"\t", "mouse_click_handler assigned:       ", (typeof this.settings.mouse_click_handler === "function").toString(), "\n",
            +			"\t", "mouse_over_handler assigned:        ", (typeof this.settings.mouse_over_handler === "function").toString(), "\n",
            +			"\t", "mouse_out_handler assigned:         ", (typeof this.settings.mouse_out_handler === "function").toString(), "\n",
            +			"\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
            +			"\t", "file_queued_handler assigned:       ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
            +			"\t", "file_queue_error_handler assigned:  ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
            +			"\t", "upload_resize_start_handler assigned:      ", (typeof this.settings.upload_resize_start_handler === "function").toString(), "\n",
            +			"\t", "upload_start_handler assigned:      ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
            +			"\t", "upload_progress_handler assigned:   ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
            +			"\t", "upload_error_handler assigned:      ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
            +			"\t", "upload_success_handler assigned:    ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
            +			"\t", "upload_complete_handler assigned:   ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
            +			"\t", "debug_handler assigned:             ", (typeof this.settings.debug_handler === "function").toString(), "\n",
            +
            +			"Support:\n",
            +			"\t", "Load:                     ", (this.support.loading ? "Yes" : "No"), "\n",
            +			"\t", "Image Resize:             ", (this.support.imageResize ? "Yes" : "No"), "\n"
            +
            +		].join("")
            +	);
            +};
            +
            +/* Note: addSetting and getSetting are no longer used by SWFUpload but are included
            +	the maintain v2 API compatibility
            +*/
            +// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
            +SWFUpload.prototype.addSetting = function (name, value, default_value) {
            +    if (value == undefined) {
            +        return (this.settings[name] = default_value);
            +    } else {
            +        return (this.settings[name] = value);
            +	}
            +};
            +
            +// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found.
            +SWFUpload.prototype.getSetting = function (name) {
            +    if (this.settings[name] != undefined) {
            +        return this.settings[name];
            +	}
            +
            +    return "";
            +};
            +
            +
            +
            +// Private: callFlash handles function calls made to the Flash element.
            +// Calls are made with a setTimeout for some functions to work around
            +// bugs in the ExternalInterface library.
            +SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
            +	var movieElement, returnValue, returnString;
            +	
            +	argumentArray = argumentArray || [];
            +	movieElement = this.getMovieElement();
            +
            +	// Flash's method if calling ExternalInterface methods (code adapted from MooTools).
            +	try {
            +		if (movieElement != undefined) {
            +			returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
            +			returnValue = eval(returnString);
            +		} else {
            +			this.debug("Can't call flash because the movie wasn't found.");
            +		}
            +	} catch (ex) {
            +		this.debug("Exception calling flash function '" + functionName + "': " + ex.message);
            +	}
            +	
            +	// Unescape file post param values
            +	if (returnValue != undefined && typeof returnValue.post === "object") {
            +		returnValue = this.unescapeFilePostParams(returnValue);
            +	}
            +
            +	return returnValue;
            +};
            +
            +/* *****************************
            +	-- Flash control methods --
            +	Your UI should use these
            +	to operate SWFUpload
            +   ***************************** */
            +
            +// WARNING: this function does not work in Flash Player 10
            +// Public: selectFile causes a File Selection Dialog window to appear.  This
            +// dialog only allows 1 file to be selected.
            +SWFUpload.prototype.selectFile = function () {
            +	this.callFlash("SelectFile");
            +};
            +
            +// WARNING: this function does not work in Flash Player 10
            +// Public: selectFiles causes a File Selection Dialog window to appear/ This
            +// dialog allows the user to select any number of files
            +// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
            +// If the selection name length is too long the dialog will fail in an unpredictable manner.  There is no work-around
            +// for this bug.
            +SWFUpload.prototype.selectFiles = function () {
            +	this.callFlash("SelectFiles");
            +};
            +
            +
            +// Public: startUpload starts uploading the first file in the queue unless
            +// the optional parameter 'fileID' specifies the ID 
            +SWFUpload.prototype.startUpload = function (fileID) {
            +	this.callFlash("StartUpload", [fileID]);
            +};
            +
            +// Public: startUpload starts uploading the first file in the queue unless
            +// the optional parameter 'fileID' specifies the ID 
            +SWFUpload.prototype.startResizedUpload = function (fileID, width, height, encoding, quality, allowEnlarging) {
            +	this.callFlash("StartUpload", [fileID, { "width": width, "height" : height, "encoding" : encoding, "quality" : quality, "allowEnlarging" : allowEnlarging }]);
            +};
            +
            +// Public: cancelUpload cancels any queued file.  The fileID parameter may be the file ID or index.
            +// If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
            +// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
            +SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
            +	if (triggerErrorEvent !== false) {
            +		triggerErrorEvent = true;
            +	}
            +	this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
            +};
            +
            +// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
            +// If nothing is currently uploading then nothing happens.
            +SWFUpload.prototype.stopUpload = function () {
            +	this.callFlash("StopUpload");
            +};
            +
            +
            +// Public: requeueUpload requeues any file. If the file is requeued or already queued true is returned.
            +// If the file is not found or is currently uploading false is returned.  Requeuing a file bypasses the
            +// file size, queue size, upload limit and other queue checks.  Certain files can't be requeued (e.g, invalid or zero bytes files).
            +SWFUpload.prototype.requeueUpload = function (indexOrFileID) {
            +	return this.callFlash("RequeueUpload", [indexOrFileID]);
            +};
            +
            +
            +/* ************************
            + * Settings methods
            + *   These methods change the SWFUpload settings.
            + *   SWFUpload settings should not be changed directly on the settings object
            + *   since many of the settings need to be passed to Flash in order to take
            + *   effect.
            + * *********************** */
            +
            +// Public: getStats gets the file statistics object.
            +SWFUpload.prototype.getStats = function () {
            +	return this.callFlash("GetStats");
            +};
            +
            +// Public: setStats changes the SWFUpload statistics.  You shouldn't need to 
            +// change the statistics but you can.  Changing the statistics does not
            +// affect SWFUpload accept for the successful_uploads count which is used
            +// by the upload_limit setting to determine how many files the user may upload.
            +SWFUpload.prototype.setStats = function (statsObject) {
            +	this.callFlash("SetStats", [statsObject]);
            +};
            +
            +// Public: getFile retrieves a File object by ID or Index.  If the file is
            +// not found then 'null' is returned.
            +SWFUpload.prototype.getFile = function (fileID) {
            +	if (typeof(fileID) === "number") {
            +		return this.callFlash("GetFileByIndex", [fileID]);
            +	} else {
            +		return this.callFlash("GetFile", [fileID]);
            +	}
            +};
            +
            +// Public: getFileFromQueue retrieves a File object by ID or Index.  If the file is
            +// not found then 'null' is returned.
            +SWFUpload.prototype.getQueueFile = function (fileID) {
            +	if (typeof(fileID) === "number") {
            +		return this.callFlash("GetFileByQueueIndex", [fileID]);
            +	} else {
            +		return this.callFlash("GetFile", [fileID]);
            +	}
            +};
            +
            +
            +// Public: addFileParam sets a name/value pair that will be posted with the
            +// file specified by the Files ID.  If the name already exists then the
            +// exiting value will be overwritten.
            +SWFUpload.prototype.addFileParam = function (fileID, name, value) {
            +	return this.callFlash("AddFileParam", [fileID, name, value]);
            +};
            +
            +// Public: removeFileParam removes a previously set (by addFileParam) name/value
            +// pair from the specified file.
            +SWFUpload.prototype.removeFileParam = function (fileID, name) {
            +	this.callFlash("RemoveFileParam", [fileID, name]);
            +};
            +
            +// Public: setUploadUrl changes the upload_url setting.
            +SWFUpload.prototype.setUploadURL = function (url) {
            +	this.settings.upload_url = url.toString();
            +	this.callFlash("SetUploadURL", [url]);
            +};
            +
            +// Public: setPostParams changes the post_params setting
            +SWFUpload.prototype.setPostParams = function (paramsObject) {
            +	this.settings.post_params = paramsObject;
            +	this.callFlash("SetPostParams", [paramsObject]);
            +};
            +
            +// Public: addPostParam adds post name/value pair.  Each name can have only one value.
            +SWFUpload.prototype.addPostParam = function (name, value) {
            +	this.settings.post_params[name] = value;
            +	this.callFlash("SetPostParams", [this.settings.post_params]);
            +};
            +
            +// Public: removePostParam deletes post name/value pair.
            +SWFUpload.prototype.removePostParam = function (name) {
            +	delete this.settings.post_params[name];
            +	this.callFlash("SetPostParams", [this.settings.post_params]);
            +};
            +
            +// Public: setFileTypes changes the file_types setting and the file_types_description setting
            +SWFUpload.prototype.setFileTypes = function (types, description) {
            +	this.settings.file_types = types;
            +	this.settings.file_types_description = description;
            +	this.callFlash("SetFileTypes", [types, description]);
            +};
            +
            +// Public: setFileSizeLimit changes the file_size_limit setting
            +SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
            +	this.settings.file_size_limit = fileSizeLimit;
            +	this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
            +};
            +
            +// Public: setFileUploadLimit changes the file_upload_limit setting
            +SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
            +	this.settings.file_upload_limit = fileUploadLimit;
            +	this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
            +};
            +
            +// Public: setFileQueueLimit changes the file_queue_limit setting
            +SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
            +	this.settings.file_queue_limit = fileQueueLimit;
            +	this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
            +};
            +
            +// Public: setFilePostName changes the file_post_name setting
            +SWFUpload.prototype.setFilePostName = function (filePostName) {
            +	this.settings.file_post_name = filePostName;
            +	this.callFlash("SetFilePostName", [filePostName]);
            +};
            +
            +// Public: setUseQueryString changes the use_query_string setting
            +SWFUpload.prototype.setUseQueryString = function (useQueryString) {
            +	this.settings.use_query_string = useQueryString;
            +	this.callFlash("SetUseQueryString", [useQueryString]);
            +};
            +
            +// Public: setRequeueOnError changes the requeue_on_error setting
            +SWFUpload.prototype.setRequeueOnError = function (requeueOnError) {
            +	this.settings.requeue_on_error = requeueOnError;
            +	this.callFlash("SetRequeueOnError", [requeueOnError]);
            +};
            +
            +// Public: setHTTPSuccess changes the http_success setting
            +SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) {
            +	if (typeof http_status_codes === "string") {
            +		http_status_codes = http_status_codes.replace(" ", "").split(",");
            +	}
            +	
            +	this.settings.http_success = http_status_codes;
            +	this.callFlash("SetHTTPSuccess", [http_status_codes]);
            +};
            +
            +// Public: setHTTPSuccess changes the http_success setting
            +SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) {
            +	this.settings.assume_success_timeout = timeout_seconds;
            +	this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]);
            +};
            +
            +// Public: setDebugEnabled changes the debug_enabled setting
            +SWFUpload.prototype.setDebugEnabled = function (debugEnabled) {
            +	this.settings.debug_enabled = debugEnabled;
            +	this.callFlash("SetDebugEnabled", [debugEnabled]);
            +};
            +
            +// Public: setButtonImageURL loads a button image sprite
            +SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) {
            +	if (buttonImageURL == undefined) {
            +		buttonImageURL = "";
            +	}
            +	
            +	this.settings.button_image_url = buttonImageURL;
            +	this.callFlash("SetButtonImageURL", [buttonImageURL]);
            +};
            +
            +// Public: setButtonDimensions resizes the Flash Movie and button
            +SWFUpload.prototype.setButtonDimensions = function (width, height) {
            +	this.settings.button_width = width;
            +	this.settings.button_height = height;
            +	
            +	var movie = this.getMovieElement();
            +	if (movie != undefined) {
            +		movie.style.width = width + "px";
            +		movie.style.height = height + "px";
            +	}
            +	
            +	this.callFlash("SetButtonDimensions", [width, height]);
            +};
            +// Public: setButtonText Changes the text overlaid on the button
            +SWFUpload.prototype.setButtonText = function (html) {
            +	this.settings.button_text = html;
            +	this.callFlash("SetButtonText", [html]);
            +};
            +// Public: setButtonTextPadding changes the top and left padding of the text overlay
            +SWFUpload.prototype.setButtonTextPadding = function (left, top) {
            +	this.settings.button_text_top_padding = top;
            +	this.settings.button_text_left_padding = left;
            +	this.callFlash("SetButtonTextPadding", [left, top]);
            +};
            +
            +// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button
            +SWFUpload.prototype.setButtonTextStyle = function (css) {
            +	this.settings.button_text_style = css;
            +	this.callFlash("SetButtonTextStyle", [css]);
            +};
            +// Public: setButtonDisabled disables/enables the button
            +SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
            +	this.settings.button_disabled = isDisabled;
            +	this.callFlash("SetButtonDisabled", [isDisabled]);
            +};
            +// Public: setButtonAction sets the action that occurs when the button is clicked
            +SWFUpload.prototype.setButtonAction = function (buttonAction) {
            +	this.settings.button_action = buttonAction;
            +	this.callFlash("SetButtonAction", [buttonAction]);
            +};
            +
            +// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button
            +SWFUpload.prototype.setButtonCursor = function (cursor) {
            +	this.settings.button_cursor = cursor;
            +	this.callFlash("SetButtonCursor", [cursor]);
            +};
            +
            +/* *******************************
            +	Flash Event Interfaces
            +	These functions are used by Flash to trigger the various
            +	events.
            +	
            +	All these functions a Private.
            +	
            +	Because the ExternalInterface library is buggy the event calls
            +	are added to a queue and the queue then executed by a setTimeout.
            +	This ensures that events are executed in a determinate order and that
            +	the ExternalInterface bugs are avoided.
            +******************************* */
            +
            +SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) {
            +	// Warning: Don't call this.debug inside here or you'll create an infinite loop
            +	var self = this;
            +	
            +	if (argumentArray == undefined) {
            +		argumentArray = [];
            +	} else if (!(argumentArray instanceof Array)) {
            +		argumentArray = [argumentArray];
            +	}
            +	
            +	if (typeof this.settings[handlerName] === "function") {
            +		// Queue the event
            +		this.eventQueue.push(function () {
            +			this.settings[handlerName].apply(this, argumentArray);
            +		});
            +		
            +		// Execute the next queued event
            +		setTimeout(function () {
            +			self.executeNextEvent();
            +		}, 0);
            +		
            +	} else if (this.settings[handlerName] !== null) {
            +		throw "Event handler " + handlerName + " is unknown or is not a function";
            +	}
            +};
            +
            +// Private: Causes the next event in the queue to be executed.  Since events are queued using a setTimeout
            +// we must queue them in order to garentee that they are executed in order.
            +SWFUpload.prototype.executeNextEvent = function () {
            +	// Warning: Don't call this.debug inside here or you'll create an infinite loop
            +
            +	var  f = this.eventQueue ? this.eventQueue.shift() : null;
            +	if (typeof(f) === "function") {
            +		f.apply(this);
            +	}
            +};
            +
            +// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
            +// properties that contain characters that are not valid for JavaScript identifiers. To work around this
            +// the Flash Component escapes the parameter names and we must unescape again before passing them along.
            +SWFUpload.prototype.unescapeFilePostParams = function (file) {
            +	var reg = /[$]([0-9a-f]{4})/i, unescapedPost = {}, uk, k, match;
            +
            +	if (file != undefined) {
            +		for (k in file.post) {
            +			if (file.post.hasOwnProperty(k)) {
            +				uk = k;
            +				while ((match = reg.exec(uk)) !== null) {
            +					uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
            +				}
            +				unescapedPost[uk] = file.post[k];
            +			}
            +		}
            +
            +		file.post = unescapedPost;
            +	}
            +
            +	return file;
            +};
            +
            +// Private: This event is called by SWFUpload Init after we've determined what the user's Flash Player supports.
            +// Use the swfupload_preload_handler event setting to execute custom code when SWFUpload has loaded.
            +// Return false to prevent SWFUpload from loading and allow your script to do something else if your required feature is
            +// not supported
            +SWFUpload.prototype.swfuploadPreload = function () {
            +	var returnValue;
            +	if (typeof this.settings.swfupload_preload_handler === "function") {
            +		returnValue = this.settings.swfupload_preload_handler.call(this);
            +	} else if (this.settings.swfupload_preload_handler != undefined) {
            +		throw "upload_start_handler must be a function";
            +	}
            +
            +	// Convert undefined to true so if nothing is returned from the upload_start_handler it is
            +	// interpretted as 'true'.
            +	if (returnValue === undefined) {
            +		returnValue = true;
            +	}
            +	
            +	return !!returnValue;
            +}
            +
            +// Private: This event is called by Flash when it has finished loading. Don't modify this.
            +// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded.
            +SWFUpload.prototype.flashReady = function () {
            +	// Check that the movie element is loaded correctly with its ExternalInterface methods defined
            +	var movieElement = 	this.cleanUp();
            +
            +	if (!movieElement) {
            +		this.debug("Flash called back ready but the flash movie can't be found.");
            +		return;
            +	}
            +
            +	this.queueEvent("swfupload_loaded_handler");
            +};
            +
            +// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE.
            +// This function is called by Flash each time the ExternalInterface functions are created.
            +SWFUpload.prototype.cleanUp = function () {
            +	var key, movieElement = this.getMovieElement();
            +	
            +	// Pro-actively unhook all the Flash functions
            +	try {
            +		if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
            +			this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
            +			for (key in movieElement) {
            +				try {
            +					if (typeof(movieElement[key]) === "function") {
            +						movieElement[key] = null;
            +					}
            +				} catch (ex) {
            +				}
            +			}
            +		}
            +	} catch (ex1) {
            +	
            +	}
            +
            +	// Fix Flashes own cleanup code so if the SWF Movie was removed from the page
            +	// it doesn't display errors.
            +	window["__flash__removeCallback"] = function (instance, name) {
            +		try {
            +			if (instance) {
            +				instance[name] = null;
            +			}
            +		} catch (flashEx) {
            +		
            +		}
            +	};
            +	
            +	return movieElement;
            +};
            +
            +/* When the button_action is set to None this event gets fired and executes the mouse_click_handler */
            +SWFUpload.prototype.mouseClick = function () {
            +	this.queueEvent("mouse_click_handler");
            +};
            +SWFUpload.prototype.mouseOver = function () {
            +	this.queueEvent("mouse_over_handler");
            +};
            +SWFUpload.prototype.mouseOut = function () {
            +	this.queueEvent("mouse_out_handler");
            +};
            +
            +/* This is a chance to do something before the browse window opens */
            +SWFUpload.prototype.fileDialogStart = function () {
            +	this.queueEvent("file_dialog_start_handler");
            +};
            +
            +
            +/* Called when a file is successfully added to the queue. */
            +SWFUpload.prototype.fileQueued = function (file) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("file_queued_handler", file);
            +};
            +
            +
            +/* Handle errors that occur when an attempt to queue a file fails. */
            +SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
            +};
            +
            +/* Called after the file dialog has closed and the selected files have been queued.
            +	You could call startUpload here if you want the queued files to begin uploading immediately. */
            +SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
            +	this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
            +};
            +
            +SWFUpload.prototype.uploadResizeStart = function (file, resizeSettings) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("upload_resize_start_handler", [file, resizeSettings.width, resizeSettings.height, resizeSettings.encoding, resizeSettings.quality]);
            +};
            +
            +SWFUpload.prototype.uploadStart = function (file) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("return_upload_start_handler", file);
            +};
            +
            +SWFUpload.prototype.returnUploadStart = function (file) {
            +	var returnValue;
            +	if (typeof this.settings.upload_start_handler === "function") {
            +		file = this.unescapeFilePostParams(file);
            +		returnValue = this.settings.upload_start_handler.call(this, file);
            +	} else if (this.settings.upload_start_handler != undefined) {
            +		throw "upload_start_handler must be a function";
            +	}
            +
            +	// Convert undefined to true so if nothing is returned from the upload_start_handler it is
            +	// interpretted as 'true'.
            +	if (returnValue === undefined) {
            +		returnValue = true;
            +	}
            +	
            +	returnValue = !!returnValue;
            +	
            +	this.callFlash("ReturnUploadStart", [returnValue]);
            +};
            +
            +
            +
            +SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
            +};
            +
            +SWFUpload.prototype.uploadError = function (file, errorCode, message) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("upload_error_handler", [file, errorCode, message]);
            +};
            +
            +SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
            +};
            +
            +SWFUpload.prototype.uploadComplete = function (file) {
            +	file = this.unescapeFilePostParams(file);
            +	this.queueEvent("upload_complete_handler", file);
            +};
            +
            +/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
            +   internal debug console.  You can override this event and have messages written where you want. */
            +SWFUpload.prototype.debug = function (message) {
            +	this.queueEvent("debug_handler", message);
            +};
            +
            +
            +/* **********************************
            +	Debug Console
            +	The debug console is a self contained, in page location
            +	for debug message to be sent.  The Debug Console adds
            +	itself to the body if necessary.
            +
            +	The console is automatically scrolled as messages appear.
            +	
            +	If you are using your own debug handler or when you deploy to production and
            +	have debug disabled you can remove these functions to reduce the file size
            +	and complexity.
            +********************************** */
            +   
            +// Private: debugMessage is the default debug_handler.  If you want to print debug messages
            +// call the debug() function.  When overriding the function your own function should
            +// check to see if the debug setting is true before outputting debug information.
            +SWFUpload.prototype.debugMessage = function (message) {
            +	var exceptionMessage, exceptionValues, key;
            +
            +	if (this.settings.debug) {
            +		exceptionValues = [];
            +
            +		// Check for an exception object and print it nicely
            +		if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") {
            +			for (key in message) {
            +				if (message.hasOwnProperty(key)) {
            +					exceptionValues.push(key + ": " + message[key]);
            +				}
            +			}
            +			exceptionMessage = exceptionValues.join("\n") || "";
            +			exceptionValues = exceptionMessage.split("\n");
            +			exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: ");
            +			SWFUpload.Console.writeLine(exceptionMessage);
            +		} else {
            +			SWFUpload.Console.writeLine(message);
            +		}
            +	}
            +};
            +
            +SWFUpload.Console = {};
            +SWFUpload.Console.writeLine = function (message) {
            +	var console, documentForm;
            +
            +	try {
            +		console = document.getElementById("SWFUpload_Console");
            +
            +		if (!console) {
            +			documentForm = document.createElement("form");
            +			document.getElementsByTagName("body")[0].appendChild(documentForm);
            +
            +			console = document.createElement("textarea");
            +			console.id = "SWFUpload_Console";
            +			console.style.fontFamily = "monospace";
            +			console.setAttribute("wrap", "off");
            +			console.wrap = "off";
            +			console.style.overflow = "auto";
            +			console.style.width = "700px";
            +			console.style.height = "350px";
            +			console.style.margin = "5px";
            +			documentForm.appendChild(console);
            +		}
            +
            +		console.value += message + "\n";
            +
            +		console.scrollTop = console.scrollHeight - console.clientHeight;
            +	} catch (ex) {
            +		alert("Exception: " + ex.name + " Message: " + ex.message);
            +	}
            +};
            +
            +
            +/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
            +	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
            +*/
            +swfobject = function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
            +swfobject.addDomLoadEvent(function () {
            +	if (typeof(SWFUpload.onload) === "function") {
            +		SWFUpload.onload.call(window);
            +	}
            +});
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._plugins_aes.js.html b/docs_api/files/.._plugins_aes.js.html index fbf72e0a8..1c6baf679 100644 --- a/docs_api/files/.._plugins_aes.js.html +++ b/docs_api/files/.._plugins_aes.js.html @@ -3,11 +3,17 @@ ../plugins/aes.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            diff --git a/docs_api/files/.._plugins_jquery.mousewheel.js.html b/docs_api/files/.._plugins_jquery.mousewheel.js.html new file mode 100644 index 000000000..28653614f --- /dev/null +++ b/docs_api/files/.._plugins_jquery.mousewheel.js.html @@ -0,0 +1,503 @@ + + + + + ../plugins/jquery.mousewheel.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../plugins/jquery.mousewheel.js

            + +
            +
            +/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
            + * Licensed under the MIT License (LICENSE.txt).
            + *
            + * Version: 3.1.12
            + *
            + * Requires: jQuery 1.2.2+
            + */
            +
            +/**
            + * jquery.mousewheel 3.1.12
            + * <pre><a href="https://github.com/brandonaaron/jquery-mousewheel">https://github.com/brandonaaron/jquery-mousewheel</a> 
            + * @class mousewheel
            + * @namespace   window.jQuery
            + * @global
            + */
            +
            +(function (factory) {
            +    if ( typeof define === 'function' && define.amd ) {
            +        // AMD. Register as an anonymous module.
            +        define(['jquery'], factory);
            +    } else if (typeof exports === 'object') {
            +        // Node/CommonJS style for Browserify
            +        module.exports = factory;
            +    } else {
            +        // Browser globals
            +        factory(jQuery);
            +    }
            +}(function ($) {
            +
            +    var toFix  = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
            +        toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
            +                    ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
            +        slice  = Array.prototype.slice,
            +        nullLowestDeltaTimeout, lowestDelta;
            +
            +    if ( $.event.fixHooks ) {
            +        for ( var i = toFix.length; i; ) {
            +            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
            +        }
            +    }
            +
            +    var special = $.event.special.mousewheel = {
            +        version: '3.1.12',
            +
            +        setup: function() {
            +            if ( this.addEventListener ) {
            +                for ( var i = toBind.length; i; ) {
            +                    this.addEventListener( toBind[--i], handler, false );
            +                }
            +            } else {
            +                this.onmousewheel = handler;
            +            }
            +            // Store the line height and page height for this particular element
            +            $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
            +            $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
            +        },
            +
            +        teardown: function() {
            +            if ( this.removeEventListener ) {
            +                for ( var i = toBind.length; i; ) {
            +                    this.removeEventListener( toBind[--i], handler, false );
            +                }
            +            } else {
            +                this.onmousewheel = null;
            +            }
            +            // Clean up the data we added to the element
            +            $.removeData(this, 'mousewheel-line-height');
            +            $.removeData(this, 'mousewheel-page-height');
            +        },
            +
            +        getLineHeight: function(elem) {
            +            var $elem = $(elem),
            +                $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
            +            if (!$parent.length) {
            +                $parent = $('body');
            +            }
            +            return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
            +        },
            +
            +        getPageHeight: function(elem) {
            +            return $(elem).height();
            +        },
            +
            +        settings: {
            +            adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
            +            normalizeOffset: true  // calls getBoundingClientRect for each event
            +        }
            +    };
            +
            +    $.fn.extend({
            +        mousewheel: function(fn) {
            +            return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
            +        },
            +
            +        unmousewheel: function(fn) {
            +            return this.unbind('mousewheel', fn);
            +        }
            +    });
            +
            +
            +    function handler(event) {
            +        var orgEvent   = event || window.event,
            +            args       = slice.call(arguments, 1),
            +            delta      = 0,
            +            deltaX     = 0,
            +            deltaY     = 0,
            +            absDelta   = 0,
            +            offsetX    = 0,
            +            offsetY    = 0;
            +        event = $.event.fix(orgEvent);
            +        event.type = 'mousewheel';
            +
            +        // Old school scrollwheel delta
            +        if ( 'detail'      in orgEvent ) { deltaY = orgEvent.detail * -1;      }
            +        if ( 'wheelDelta'  in orgEvent ) { deltaY = orgEvent.wheelDelta;       }
            +        if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY;      }
            +        if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
            +
            +        // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
            +        if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
            +            deltaX = deltaY * -1;
            +            deltaY = 0;
            +        }
            +
            +        // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
            +        delta = deltaY === 0 ? deltaX : deltaY;
            +
            +        // New school wheel delta (wheel event)
            +        if ( 'deltaY' in orgEvent ) {
            +            deltaY = orgEvent.deltaY * -1;
            +            delta  = deltaY;
            +        }
            +        if ( 'deltaX' in orgEvent ) {
            +            deltaX = orgEvent.deltaX;
            +            if ( deltaY === 0 ) { delta  = deltaX * -1; }
            +        }
            +
            +        // No change actually happened, no reason to go any further
            +        if ( deltaY === 0 && deltaX === 0 ) { return; }
            +
            +        // Need to convert lines and pages to pixels if we aren't already in pixels
            +        // There are three delta modes:
            +        //   * deltaMode 0 is by pixels, nothing to do
            +        //   * deltaMode 1 is by lines
            +        //   * deltaMode 2 is by pages
            +        if ( orgEvent.deltaMode === 1 ) {
            +            var lineHeight = $.data(this, 'mousewheel-line-height');
            +            delta  *= lineHeight;
            +            deltaY *= lineHeight;
            +            deltaX *= lineHeight;
            +        } else if ( orgEvent.deltaMode === 2 ) {
            +            var pageHeight = $.data(this, 'mousewheel-page-height');
            +            delta  *= pageHeight;
            +            deltaY *= pageHeight;
            +            deltaX *= pageHeight;
            +        }
            +
            +        // Store lowest absolute delta to normalize the delta values
            +        absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
            +
            +        if ( !lowestDelta || absDelta < lowestDelta ) {
            +            lowestDelta = absDelta;
            +
            +            // Adjust older deltas if necessary
            +            if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
            +                lowestDelta /= 40;
            +            }
            +        }
            +
            +        // Adjust older deltas if necessary
            +        if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
            +            // Divide all the things by 40!
            +            delta  /= 40;
            +            deltaX /= 40;
            +            deltaY /= 40;
            +        }
            +
            +        // Get a whole, normalized value for the deltas
            +        delta  = Math[ delta  >= 1 ? 'floor' : 'ceil' ](delta  / lowestDelta);
            +        deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
            +        deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
            +
            +        // Normalise offsetX and offsetY properties
            +        if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
            +            var boundingRect = this.getBoundingClientRect();
            +            offsetX = event.clientX - boundingRect.left;
            +            offsetY = event.clientY - boundingRect.top;
            +        }
            +
            +        // Add information to the event object
            +        event.deltaX = deltaX;
            +        event.deltaY = deltaY;
            +        event.deltaFactor = lowestDelta;
            +        event.offsetX = offsetX;
            +        event.offsetY = offsetY;
            +        // Go ahead and set deltaMode to 0 since we converted to pixels
            +        // Although this is a little odd since we overwrite the deltaX/Y
            +        // properties with normalized deltas.
            +        event.deltaMode = 0;
            +
            +        // Add event and delta to the front of the arguments
            +        args.unshift(event, delta, deltaX, deltaY);
            +
            +        // Clearout lowestDelta after sometime to better
            +        // handle multiple device types that give different
            +        // a different lowestDelta
            +        // Ex: trackpad = 3 and mouse wheel = 120
            +        if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
            +        nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
            +
            +        return ($.event.dispatch || $.event.handle).apply(this, args);
            +    }
            +
            +    function nullLowestDelta() {
            +        lowestDelta = null;
            +    }
            +
            +    function shouldAdjustOldDeltas(orgEvent, absDelta) {
            +        // If this is an older event and the delta is divisable by 120,
            +        // then we are assuming that the browser is treating this as an
            +        // older mouse wheel event and that we should divide the deltas
            +        // by 40 to try and get a more usable deltaFactor.
            +        // Side note, this actually impacts the reported scroll distance
            +        // in older browsers and can cause scrolling to be slower than native.
            +        // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
            +        return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
            +    }
            +
            +}));
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._plugins_json2.js.html b/docs_api/files/.._plugins_json2.js.html new file mode 100644 index 000000000..b9dc5f71b --- /dev/null +++ b/docs_api/files/.._plugins_json2.js.html @@ -0,0 +1,770 @@ + + + + + ../plugins/json2.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../plugins/json2.js

            + +
            +
            +/**
            + * json2.js 
            + * <br />JSON is a light-weight, language independent, data interchange format.
            + * <p><a href='https://github.com/douglascrockford/JSON-js' target='_blank'>source</a>
            + * | <a href='http://www.json.org/js.html' target='_blank'>docs</a>
            + * </p>
            + * @namespace   window
            + * @class       JSON
            + * @version     2.0
            + */
            +/*
            +    json2.js
            +    2013-05-26
            +
            +    Public Domain.
            +
            +    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
            +
            +    See http://www.JSON.org/js.html
            +
            +
            +    This code should be minified before deployment.
            +    See http://javascript.crockford.com/jsmin.html
            +
            +    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
            +    NOT CONTROL.
            +
            +
            +    This file creates a global JSON object containing two methods: stringify
            +    and parse.
            +
            +        JSON.stringify(value, replacer, space)
            +            value       any JavaScript value, usually an object or array.
            +
            +            replacer    an optional parameter that determines how object
            +                        values are stringified for objects. It can be a
            +                        function or an array of strings.
            +
            +            space       an optional parameter that specifies the indentation
            +                        of nested structures. If it is omitted, the text will
            +                        be packed without extra whitespace. If it is a number,
            +                        it will specify the number of spaces to indent at each
            +                        level. If it is a string (such as '\t' or '&nbsp;'),
            +                        it contains the characters used to indent at each level.
            +
            +            This method produces a JSON text from a JavaScript value.
            +
            +            When an object value is found, if the object contains a toJSON
            +            method, its toJSON method will be called and the result will be
            +            stringified. A toJSON method does not serialize: it returns the
            +            value represented by the name/value pair that should be serialized,
            +            or undefined if nothing should be serialized. The toJSON method
            +            will be passed the key associated with the value, and this will be
            +            bound to the value
            +
            +            For example, this would serialize Dates as ISO strings.
            +
            +                Date.prototype.toJSON = function (key) {
            +                    function f(n) {
            +                        // Format integers to have at least two digits.
            +                        return n < 10 ? '0' + n : n;
            +                    }
            +
            +                    return this.getUTCFullYear()   + '-' +
            +                         f(this.getUTCMonth() + 1) + '-' +
            +                         f(this.getUTCDate())      + 'T' +
            +                         f(this.getUTCHours())     + ':' +
            +                         f(this.getUTCMinutes())   + ':' +
            +                         f(this.getUTCSeconds())   + 'Z';
            +                };
            +
            +            You can provide an optional replacer method. It will be passed the
            +            key and value of each member, with this bound to the containing
            +            object. The value that is returned from your method will be
            +            serialized. If your method returns undefined, then the member will
            +            be excluded from the serialization.
            +
            +            If the replacer parameter is an array of strings, then it will be
            +            used to select the members to be serialized. It filters the results
            +            such that only members with keys listed in the replacer array are
            +            stringified.
            +
            +            Values that do not have JSON representations, such as undefined or
            +            functions, will not be serialized. Such values in objects will be
            +            dropped; in arrays they will be replaced with null. You can use
            +            a replacer function to replace those with JSON values.
            +            JSON.stringify(undefined) returns undefined.
            +
            +            The optional space parameter produces a stringification of the
            +            value that is filled with line breaks and indentation to make it
            +            easier to read.
            +
            +            If the space parameter is a non-empty string, then that string will
            +            be used for indentation. If the space parameter is a number, then
            +            the indentation will be that many spaces.
            +
            +            Example:
            +
            +            text = JSON.stringify(['e', {pluribus: 'unum'}]);
            +            // text is '["e",{"pluribus":"unum"}]'
            +
            +
            +            text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
            +            // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
            +
            +            text = JSON.stringify([new Date()], function (key, value) {
            +                return this[key] instanceof Date ?
            +                    'Date(' + this[key] + ')' : value;
            +            });
            +            // text is '["Date(---current time---)"]'
            +
            +
            +        JSON.parse(text, reviver)
            +            This method parses a JSON text to produce an object or array.
            +            It can throw a SyntaxError exception.
            +
            +            The optional reviver parameter is a function that can filter and
            +            transform the results. It receives each of the keys and values,
            +            and its return value is used instead of the original value.
            +            If it returns what it received, then the structure is not modified.
            +            If it returns undefined then the member is deleted.
            +
            +            Example:
            +
            +            // Parse the text. Values that look like ISO date strings will
            +            // be converted to Date objects.
            +
            +            myData = JSON.parse(text, function (key, value) {
            +                var a;
            +                if (typeof value === 'string') {
            +                    a =
            +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
            +                    if (a) {
            +                        return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
            +                            +a[5], +a[6]));
            +                    }
            +                }
            +                return value;
            +            });
            +
            +            myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
            +                var d;
            +                if (typeof value === 'string' &&
            +                        value.slice(0, 5) === 'Date(' &&
            +                        value.slice(-1) === ')') {
            +                    d = new Date(value.slice(5, -1));
            +                    if (d) {
            +                        return d;
            +                    }
            +                }
            +                return value;
            +            });
            +
            +
            +    This is a reference implementation. You are free to copy, modify, or
            +    redistribute.
            +*/
            +
            +/*jslint evil: true, regexp: true */
            +
            +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
            +    call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
            +    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
            +    lastIndex, length, parse, prototype, push, replace, slice, stringify,
            +    test, toJSON, toString, valueOf
            +*/
            +
            +
            +// Create a JSON object only if one does not already exist. We create the
            +// methods in a closure to avoid creating global variables.
            +
            +if (typeof JSON !== 'object') {
            +    JSON = {};
            +}
            +
            +(function () {
            +    'use strict';
            +
            +    function f(n) {
            +        // Format integers to have at least two digits.
            +        return n < 10 ? '0' + n : n;
            +    }
            +
            +    if (typeof Date.prototype.toJSON !== 'function') {
            +
            +        Date.prototype.toJSON = function () {
            +
            +            return isFinite(this.valueOf())
            +                ? this.getUTCFullYear()     + '-' +
            +                    f(this.getUTCMonth() + 1) + '-' +
            +                    f(this.getUTCDate())      + 'T' +
            +                    f(this.getUTCHours())     + ':' +
            +                    f(this.getUTCMinutes())   + ':' +
            +                    f(this.getUTCSeconds())   + 'Z'
            +                : null;
            +        };
            +
            +        String.prototype.toJSON      =
            +            Number.prototype.toJSON  =
            +            Boolean.prototype.toJSON = function () {
            +                return this.valueOf();
            +            };
            +    }
            +
            +    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            +        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
            +        gap,
            +        indent,
            +        meta = {    // table of character substitutions
            +            '\b': '\\b',
            +            '\t': '\\t',
            +            '\n': '\\n',
            +            '\f': '\\f',
            +            '\r': '\\r',
            +            '"' : '\\"',
            +            '\\': '\\\\'
            +        },
            +        rep;
            +
            +
            +    function quote(string) {
            +
            +// If the string contains no control characters, no quote characters, and no
            +// backslash characters, then we can safely slap some quotes around it.
            +// Otherwise we must also replace the offending characters with safe escape
            +// sequences.
            +
            +        escapable.lastIndex = 0;
            +        return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
            +            var c = meta[a];
            +            return typeof c === 'string'
            +                ? c
            +                : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
            +        }) + '"' : '"' + string + '"';
            +    }
            +
            +
            +    function str(key, holder) {
            +
            +// Produce a string from holder[key].
            +
            +        var i,          // The loop counter.
            +            k,          // The member key.
            +            v,          // The member value.
            +            length,
            +            mind = gap,
            +            partial,
            +            value = holder[key];
            +
            +// If the value has a toJSON method, call it to obtain a replacement value.
            +
            +        if (value && typeof value === 'object' &&
            +                typeof value.toJSON === 'function') {
            +            value = value.toJSON(key);
            +        }
            +
            +// If we were called with a replacer function, then call the replacer to
            +// obtain a replacement value.
            +
            +        if (typeof rep === 'function') {
            +            value = rep.call(holder, key, value);
            +        }
            +
            +// What happens next depends on the value's type.
            +
            +        switch (typeof value) {
            +        case 'string':
            +            return quote(value);
            +
            +        case 'number':
            +
            +// JSON numbers must be finite. Encode non-finite numbers as null.
            +
            +            return isFinite(value) ? String(value) : 'null';
            +
            +        case 'boolean':
            +        case 'null':
            +
            +// If the value is a boolean or null, convert it to a string. Note:
            +// typeof null does not produce 'null'. The case is included here in
            +// the remote chance that this gets fixed someday.
            +
            +            return String(value);
            +
            +// If the type is 'object', we might be dealing with an object or an array or
            +// null.
            +
            +        case 'object':
            +
            +// Due to a specification blunder in ECMAScript, typeof null is 'object',
            +// so watch out for that case.
            +
            +            if (!value) {
            +                return 'null';
            +            }
            +
            +// Make an array to hold the partial results of stringifying this object value.
            +
            +            gap += indent;
            +            partial = [];
            +
            +// Is the value an array?
            +
            +            if (Object.prototype.toString.apply(value) === '[object Array]') {
            +
            +// The value is an array. Stringify every element. Use null as a placeholder
            +// for non-JSON values.
            +
            +                length = value.length;
            +                for (i = 0; i < length; i += 1) {
            +                    partial[i] = str(i, value) || 'null';
            +                }
            +
            +// Join all of the elements together, separated with commas, and wrap them in
            +// brackets.
            +
            +                v = partial.length === 0
            +                    ? '[]'
            +                    : gap
            +                    ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
            +                    : '[' + partial.join(',') + ']';
            +                gap = mind;
            +                return v;
            +            }
            +
            +// If the replacer is an array, use it to select the members to be stringified.
            +
            +            if (rep && typeof rep === 'object') {
            +                length = rep.length;
            +                for (i = 0; i < length; i += 1) {
            +                    if (typeof rep[i] === 'string') {
            +                        k = rep[i];
            +                        v = str(k, value);
            +                        if (v) {
            +                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
            +                        }
            +                    }
            +                }
            +            } else {
            +
            +// Otherwise, iterate through all of the keys in the object.
            +
            +                for (k in value) {
            +                    if (Object.prototype.hasOwnProperty.call(value, k)) {
            +                        v = str(k, value);
            +                        if (v) {
            +                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
            +                        }
            +                    }
            +                }
            +            }
            +
            +// Join all of the member texts together, separated with commas,
            +// and wrap them in braces.
            +
            +            v = partial.length === 0
            +                ? '{}'
            +                : gap
            +                ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
            +                : '{' + partial.join(',') + '}';
            +            gap = mind;
            +            return v;
            +        }
            +    }
            +
            +// If the JSON object does not yet have a stringify method, give it one.
            +
            +    if (typeof JSON.stringify !== 'function') {
            +        JSON.stringify = function (value, replacer, space) {
            +
            +// The stringify method takes a value and an optional replacer, and an optional
            +// space parameter, and returns a JSON text. The replacer can be a function
            +// that can replace values, or an array of strings that will select the keys.
            +// A default replacer method can be provided. Use of the space parameter can
            +// produce text that is more easily readable.
            +
            +            var i;
            +            gap = '';
            +            indent = '';
            +
            +// If the space parameter is a number, make an indent string containing that
            +// many spaces.
            +
            +            if (typeof space === 'number') {
            +                for (i = 0; i < space; i += 1) {
            +                    indent += ' ';
            +                }
            +
            +// If the space parameter is a string, it will be used as the indent string.
            +
            +            } else if (typeof space === 'string') {
            +                indent = space;
            +            }
            +
            +// If there is a replacer, it must be a function or an array.
            +// Otherwise, throw an error.
            +
            +            rep = replacer;
            +            if (replacer && typeof replacer !== 'function' &&
            +                    (typeof replacer !== 'object' ||
            +                    typeof replacer.length !== 'number')) {
            +                throw new Error('JSON.stringify');
            +            }
            +
            +// Make a fake root object containing our value under the key of ''.
            +// Return the result of stringifying the value.
            +
            +            return str('', {'': value});
            +        };
            +    }
            +
            +
            +// If the JSON object does not yet have a parse method, give it one.
            +
            +    if (typeof JSON.parse !== 'function') {
            +        JSON.parse = function (text, reviver) {
            +
            +// The parse method takes a text and an optional reviver function, and returns
            +// a JavaScript value if the text is a valid JSON text.
            +
            +            var j;
            +
            +            function walk(holder, key) {
            +
            +// The walk method is used to recursively walk the resulting structure so
            +// that modifications can be made.
            +
            +                var k, v, value = holder[key];
            +                if (value && typeof value === 'object') {
            +                    for (k in value) {
            +                        if (Object.prototype.hasOwnProperty.call(value, k)) {
            +                            v = walk(value, k);
            +                            if (v !== undefined) {
            +                                value[k] = v;
            +                            } else {
            +                                delete value[k];
            +                            }
            +                        }
            +                    }
            +                }
            +                return reviver.call(holder, key, value);
            +            }
            +
            +
            +// Parsing happens in four stages. In the first stage, we replace certain
            +// Unicode characters with escape sequences. JavaScript handles many characters
            +// incorrectly, either silently deleting them, or treating them as line endings.
            +
            +            text = String(text);
            +            cx.lastIndex = 0;
            +            if (cx.test(text)) {
            +                text = text.replace(cx, function (a) {
            +                    return '\\u' +
            +                        ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
            +                });
            +            }
            +
            +// In the second stage, we run the text against regular expressions that look
            +// for non-JSON patterns. We are especially concerned with '()' and 'new'
            +// because they can cause invocation, and '=' because it can cause mutation.
            +// But just to be safe, we want to reject all unexpected forms.
            +
            +// We split the second stage into 4 regexp operations in order to work around
            +// crippling inefficiencies in IE's and Safari's regexp engines. First we
            +// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
            +// replace all simple value tokens with ']' characters. Third, we delete all
            +// open brackets that follow a colon or comma or that begin the text. Finally,
            +// we look to see that the remaining characters are only whitespace or ']' or
            +// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
            +
            +            if (/^[\],:{}\s]*$/
            +                    .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
            +                        .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
            +                        .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
            +
            +// In the third stage we use the eval function to compile the text into a
            +// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
            +// in JavaScript: it can begin a block or an object literal. We wrap the text
            +// in parens to eliminate the ambiguity.
            +
            +                j = eval('(' + text + ')');
            +
            +// In the optional fourth stage, we recursively walk the new structure, passing
            +// each name/value pair to a reviver function for possible transformation.
            +
            +                return typeof reviver === 'function'
            +                    ? walk({'': j}, '')
            +                    : j;
            +            }
            +
            +// If the text is not JSON parseable, then a SyntaxError is thrown.
            +
            +            throw new SyntaxError('JSON.parse');
            +        };
            +    }
            +}());
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._plugins_raphael.js.html b/docs_api/files/.._plugins_raphael.js.html new file mode 100644 index 000000000..a600f6527 --- /dev/null +++ b/docs_api/files/.._plugins_raphael.js.html @@ -0,0 +1,8394 @@ + + + + + ../plugins/raphael.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../plugins/raphael.js

            + +
            +
            +/**
            + * Raphaël 2.1.2 - JavaScript Vector Library 
            + * <p><a href='https://github.com/openjavascript/jquerycomps' target='_blank'>JC Project Site</a>
            + * | <a href='http://raphaeljs.com/reference.html' target='_blank'>API docs</a>
            + * | <a href='http://raphaeljs.com/' target='_blank'>demo</a>
            + * @namespace   window
            + * @class       Raphael
            + * @version     2.1.2
            + */
            +// ┌────────────────────────────────────────────────────────────────────┐ \\
            +// │ Raphaël 2.1.2 - JavaScript Vector Library                          │ \\
            +// ├────────────────────────────────────────────────────────────────────┤ \\
            +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)    │ \\
            +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com)              │ \\
            +// ├────────────────────────────────────────────────────────────────────┤ \\
            +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
            +// └────────────────────────────────────────────────────────────────────┘ \\
            +// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
            +// 
            +// Licensed under the Apache License, Version 2.0 (the "License");
            +// you may not use this file except in compliance with the License.
            +// You may obtain a copy of the License at
            +// 
            +// http://www.apache.org/licenses/LICENSE-2.0
            +// 
            +// Unless required by applicable law or agreed to in writing, software
            +// distributed under the License is distributed on an "AS IS" BASIS,
            +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
            +// See the License for the specific language governing permissions and
            +// limitations under the License.
            +// ┌────────────────────────────────────────────────────────────┐ \\
            +// │ Eve 0.4.2 - JavaScript Events Library                      │ \\
            +// ├────────────────────────────────────────────────────────────┤ \\
            +// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\
            +// └────────────────────────────────────────────────────────────┘ \\
            +
            +(function (glob) {
            +    var version = "0.4.2",
            +        has = "hasOwnProperty",
            +        separator = /[\.\/]/,
            +        wildcard = "*",
            +        fun = function () {},
            +        numsort = function (a, b) {
            +            return a - b;
            +        },
            +        current_event,
            +        stop,
            +        events = {n: {}},
            +    /*\
            +     * eve
            +     [ method ]
            +
            +     * Fires event with given `name`, given scope and other parameters.
            +
            +     > Arguments
            +
            +     - name (string) name of the *event*, dot (`.`) or slash (`/`) separated
            +     - scope (object) context for the event handlers
            +     - varargs (...) the rest of arguments will be sent to event handlers
            +
            +     = (object) array of returned values from the listeners
            +    \*/
            +        eve = function (name, scope) {
            +			name = String(name);
            +            var e = events,
            +                oldstop = stop,
            +                args = Array.prototype.slice.call(arguments, 2),
            +                listeners = eve.listeners(name),
            +                z = 0,
            +                f = false,
            +                l,
            +                indexed = [],
            +                queue = {},
            +                out = [],
            +                ce = current_event,
            +                errors = [];
            +            current_event = name;
            +            stop = 0;
            +            for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) {
            +                indexed.push(listeners[i].zIndex);
            +                if (listeners[i].zIndex < 0) {
            +                    queue[listeners[i].zIndex] = listeners[i];
            +                }
            +            }
            +            indexed.sort(numsort);
            +            while (indexed[z] < 0) {
            +                l = queue[indexed[z++]];
            +                out.push(l.apply(scope, args));
            +                if (stop) {
            +                    stop = oldstop;
            +                    return out;
            +                }
            +            }
            +            for (i = 0; i < ii; i++) {
            +                l = listeners[i];
            +                if ("zIndex" in l) {
            +                    if (l.zIndex == indexed[z]) {
            +                        out.push(l.apply(scope, args));
            +                        if (stop) {
            +                            break;
            +                        }
            +                        do {
            +                            z++;
            +                            l = queue[indexed[z]];
            +                            l && out.push(l.apply(scope, args));
            +                            if (stop) {
            +                                break;
            +                            }
            +                        } while (l)
            +                    } else {
            +                        queue[l.zIndex] = l;
            +                    }
            +                } else {
            +                    out.push(l.apply(scope, args));
            +                    if (stop) {
            +                        break;
            +                    }
            +                }
            +            }
            +            stop = oldstop;
            +            current_event = ce;
            +            return out.length ? out : null;
            +        };
            +		// Undocumented. Debug only.
            +		eve._events = events;
            +    /*\
            +     * eve.listeners
            +     [ method ]
            +
            +     * Internal method which gives you array of all event handlers that will be triggered by the given `name`.
            +
            +     > Arguments
            +
            +     - name (string) name of the event, dot (`.`) or slash (`/`) separated
            +
            +     = (array) array of event handlers
            +    \*/
            +    eve.listeners = function (name) {
            +        var names = name.split(separator),
            +            e = events,
            +            item,
            +            items,
            +            k,
            +            i,
            +            ii,
            +            j,
            +            jj,
            +            nes,
            +            es = [e],
            +            out = [];
            +        for (i = 0, ii = names.length; i < ii; i++) {
            +            nes = [];
            +            for (j = 0, jj = es.length; j < jj; j++) {
            +                e = es[j].n;
            +                items = [e[names[i]], e[wildcard]];
            +                k = 2;
            +                while (k--) {
            +                    item = items[k];
            +                    if (item) {
            +                        nes.push(item);
            +                        out = out.concat(item.f || []);
            +                    }
            +                }
            +            }
            +            es = nes;
            +        }
            +        return out;
            +    };
            +    
            +    /*\
            +     * eve.on
            +     [ method ]
            +     **
            +     * Binds given event handler with a given name. You can use wildcards “`*`” for the names:
            +     | eve.on("*.under.*", f);
            +     | eve("mouse.under.floor"); // triggers f
            +     * Use @eve to trigger the listener.
            +     **
            +     > Arguments
            +     **
            +     - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
            +     - f (function) event handler function
            +     **
            +     = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment. 
            +     > Example:
            +     | eve.on("mouse", eatIt)(2);
            +     | eve.on("mouse", scream);
            +     | eve.on("mouse", catchIt)(1);
            +     * This will ensure that `catchIt()` function will be called before `eatIt()`.
            +	 *
            +     * If you want to put your handler before non-indexed handlers, specify a negative value.
            +     * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.
            +    \*/
            +    eve.on = function (name, f) {
            +		name = String(name);
            +		if (typeof f != "function") {
            +			return function () {};
            +		}
            +        var names = name.split(separator),
            +            e = events;
            +        for (var i = 0, ii = names.length; i < ii; i++) {
            +            e = e.n;
            +            e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});
            +        }
            +        e.f = e.f || [];
            +        for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {
            +            return fun;
            +        }
            +        e.f.push(f);
            +        return function (zIndex) {
            +            if (+zIndex == +zIndex) {
            +                f.zIndex = +zIndex;
            +            }
            +        };
            +    };
            +    /*\
            +     * eve.f
            +     [ method ]
            +     **
            +     * Returns function that will fire given event with optional arguments.
            +	 * Arguments that will be passed to the result function will be also
            +	 * concated to the list of final arguments.
            + 	 | el.onclick = eve.f("click", 1, 2);
            + 	 | eve.on("click", function (a, b, c) {
            + 	 |     console.log(a, b, c); // 1, 2, [event object]
            + 	 | });
            +     > Arguments
            +	 - event (string) event name
            +	 - varargs (…) and any other arguments
            +	 = (function) possible event handler function
            +    \*/
            +	eve.f = function (event) {
            +		var attrs = [].slice.call(arguments, 1);
            +		return function () {
            +			eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0)));
            +		};
            +	};
            +    /*\
            +     * eve.stop
            +     [ method ]
            +     **
            +     * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.
            +    \*/
            +    eve.stop = function () {
            +        stop = 1;
            +    };
            +    /*\
            +     * eve.nt
            +     [ method ]
            +     **
            +     * Could be used inside event handler to figure out actual name of the event.
            +     **
            +     > Arguments
            +     **
            +     - subname (string) #optional subname of the event
            +     **
            +     = (string) name of the event, if `subname` is not specified
            +     * or
            +     = (boolean) `true`, if current event’s name contains `subname`
            +    \*/
            +    eve.nt = function (subname) {
            +        if (subname) {
            +            return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event);
            +        }
            +        return current_event;
            +    };
            +    /*\
            +     * eve.nts
            +     [ method ]
            +     **
            +     * Could be used inside event handler to figure out actual name of the event.
            +     **
            +     **
            +     = (array) names of the event
            +    \*/
            +    eve.nts = function () {
            +        return current_event.split(separator);
            +    };
            +    /*\
            +     * eve.off
            +     [ method ]
            +     **
            +     * Removes given function from the list of event listeners assigned to given name.
            +	 * If no arguments specified all the events will be cleared.
            +     **
            +     > Arguments
            +     **
            +     - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
            +     - f (function) event handler function
            +    \*/
            +    /*\
            +     * eve.unbind
            +     [ method ]
            +     **
            +     * See @eve.off
            +    \*/
            +    eve.off = eve.unbind = function (name, f) {
            +		if (!name) {
            +		    eve._events = events = {n: {}};
            +			return;
            +		}
            +        var names = name.split(separator),
            +            e,
            +            key,
            +            splice,
            +            i, ii, j, jj,
            +            cur = [events];
            +        for (i = 0, ii = names.length; i < ii; i++) {
            +            for (j = 0; j < cur.length; j += splice.length - 2) {
            +                splice = [j, 1];
            +                e = cur[j].n;
            +                if (names[i] != wildcard) {
            +                    if (e[names[i]]) {
            +                        splice.push(e[names[i]]);
            +                    }
            +                } else {
            +                    for (key in e) if (e[has](key)) {
            +                        splice.push(e[key]);
            +                    }
            +                }
            +                cur.splice.apply(cur, splice);
            +            }
            +        }
            +        for (i = 0, ii = cur.length; i < ii; i++) {
            +            e = cur[i];
            +            while (e.n) {
            +                if (f) {
            +                    if (e.f) {
            +                        for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {
            +                            e.f.splice(j, 1);
            +                            break;
            +                        }
            +                        !e.f.length && delete e.f;
            +                    }
            +                    for (key in e.n) if (e.n[has](key) && e.n[key].f) {
            +                        var funcs = e.n[key].f;
            +                        for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {
            +                            funcs.splice(j, 1);
            +                            break;
            +                        }
            +                        !funcs.length && delete e.n[key].f;
            +                    }
            +                } else {
            +                    delete e.f;
            +                    for (key in e.n) if (e.n[has](key) && e.n[key].f) {
            +                        delete e.n[key].f;
            +                    }
            +                }
            +                e = e.n;
            +            }
            +        }
            +    };
            +    /*\
            +     * eve.once
            +     [ method ]
            +     **
            +     * Binds given event handler with a given name to only run once then unbind itself.
            +     | eve.once("login", f);
            +     | eve("login"); // triggers f
            +     | eve("login"); // no listeners
            +     * Use @eve to trigger the listener.
            +     **
            +     > Arguments
            +     **
            +     - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
            +     - f (function) event handler function
            +     **
            +     = (function) same return function as @eve.on
            +    \*/
            +    eve.once = function (name, f) {
            +        var f2 = function () {
            +            eve.unbind(name, f2);
            +            return f.apply(this, arguments);
            +        };
            +        return eve.on(name, f2);
            +    };
            +    /*\
            +     * eve.version
            +     [ property (string) ]
            +     **
            +     * Current version of the library.
            +    \*/
            +    eve.version = version;
            +    eve.toString = function () {
            +        return "You are running Eve " + version;
            +    };
            +    (typeof module != "undefined" && module.exports) ? (module.exports = eve) : (typeof define != "undefined" ? (define("eve", [], function() { return eve; })) : (glob.eve = eve));
            +})(window || this);
            +// ┌─────────────────────────────────────────────────────────────────────┐ \\
            +// │ "Raphaël 2.1.2" - JavaScript Vector Library                         │ \\
            +// ├─────────────────────────────────────────────────────────────────────┤ \\
            +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
            +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
            +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
            +// └─────────────────────────────────────────────────────────────────────┘ \\
            +
            +(function (glob, factory) {
            +    // AMD support
            +    if (typeof define === "function" && define.amd) {
            +        // Define as an anonymous module
            +        define(["eve"], function( eve ) {
            +            return factory(glob, eve);
            +        });
            +    } else {
            +        // Browser globals (glob is window)
            +        // Raphael adds itself to window
            +        factory(glob, glob.eve);
            +    }
            +}(this, function (window, eve) {
            +    /*\
            +     * Raphael
            +     [ method ]
            +     **
            +     * Creates a canvas object on which to draw.
            +     * You must do this first, as all future calls to drawing methods
            +     * from this instance will be bound to this canvas.
            +     > Parameters
            +     **
            +     - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface
            +     - width (number)
            +     - height (number)
            +     - callback (function) #optional callback function which is going to be executed in the context of newly created paper
            +     * or
            +     - x (number)
            +     - y (number)
            +     - width (number)
            +     - height (number)
            +     - callback (function) #optional callback function which is going to be executed in the context of newly created paper
            +     * or
            +     - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add.
            +     - callback (function) #optional callback function which is going to be executed in the context of newly created paper
            +     * or
            +     - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`.
            +     = (object) @Paper
            +     > Usage
            +     | // Each of the following examples create a canvas
            +     | // that is 320px wide by 200px high.
            +     | // Canvas is created at the viewport’s 10,50 coordinate.
            +     | var paper = Raphael(10, 50, 320, 200);
            +     | // Canvas is created at the top left corner of the #notepad element
            +     | // (or its top right corner in dir="rtl" elements)
            +     | var paper = Raphael(document.getElementById("notepad"), 320, 200);
            +     | // Same as above
            +     | var paper = Raphael("notepad", 320, 200);
            +     | // Image dump
            +     | var set = Raphael(["notepad", 320, 200, {
            +     |     type: "rect",
            +     |     x: 10,
            +     |     y: 10,
            +     |     width: 25,
            +     |     height: 25,
            +     |     stroke: "#f00"
            +     | }, {
            +     |     type: "text",
            +     |     x: 30,
            +     |     y: 40,
            +     |     text: "Dump"
            +     | }]);
            +    \*/
            +    function R(first) {
            +        if (R.is(first, "function")) {
            +            return loaded ? first() : eve.on("raphael.DOMload", first);
            +        } else if (R.is(first, array)) {
            +            return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);
            +        } else {
            +            var args = Array.prototype.slice.call(arguments, 0);
            +            if (R.is(args[args.length - 1], "function")) {
            +                var f = args.pop();
            +                return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {
            +                    f.call(R._engine.create[apply](R, args));
            +                });
            +            } else {
            +                return R._engine.create[apply](R, arguments);
            +            }
            +        }
            +    }
            +    R.version = "2.1.2";
            +    R.eve = eve;
            +    var loaded,
            +        separator = /[, ]+/,
            +        elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1},
            +        formatrg = /\{(\d+)\}/g,
            +        proto = "prototype",
            +        has = "hasOwnProperty",
            +        g = {
            +            doc: document,
            +            win: window
            +        },
            +        oldRaphael = {
            +            was: Object.prototype[has].call(g.win, "Raphael"),
            +            is: g.win.Raphael
            +        },
            +        Paper = function () {
            +            /*\
            +             * Paper.ca
            +             [ property (object) ]
            +             **
            +             * Shortcut for @Paper.customAttributes
            +            \*/
            +            /*\
            +             * Paper.customAttributes
            +             [ property (object) ]
            +             **
            +             * If you have a set of attributes that you would like to represent
            +             * as a function of some number you can do it easily with custom attributes:
            +             > Usage
            +             | paper.customAttributes.hue = function (num) {
            +             |     num = num % 1;
            +             |     return {fill: "hsb(" + num + ", 0.75, 1)"};
            +             | };
            +             | // Custom attribute “hue” will change fill
            +             | // to be given hue with fixed saturation and brightness.
            +             | // Now you can use it like this:
            +             | var c = paper.circle(10, 10, 10).attr({hue: .45});
            +             | // or even like this:
            +             | c.animate({hue: 1}, 1e3);
            +             | 
            +             | // You could also create custom attribute
            +             | // with multiple parameters:
            +             | paper.customAttributes.hsb = function (h, s, b) {
            +             |     return {fill: "hsb(" + [h, s, b].join(",") + ")"};
            +             | };
            +             | c.attr({hsb: "0.5 .8 1"});
            +             | c.animate({hsb: [1, 0, 0.5]}, 1e3);
            +            \*/
            +            this.ca = this.customAttributes = {};
            +        },
            +        paperproto,
            +        appendChild = "appendChild",
            +        apply = "apply",
            +        concat = "concat",
            +        supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test
            +        E = "",
            +        S = " ",
            +        Str = String,
            +        split = "split",
            +        events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S),
            +        touchMap = {
            +            mousedown: "touchstart",
            +            mousemove: "touchmove",
            +            mouseup: "touchend"
            +        },
            +        lowerCase = Str.prototype.toLowerCase,
            +        math = Math,
            +        mmax = math.max,
            +        mmin = math.min,
            +        abs = math.abs,
            +        pow = math.pow,
            +        PI = math.PI,
            +        nu = "number",
            +        string = "string",
            +        array = "array",
            +        toString = "toString",
            +        fillString = "fill",
            +        objectToString = Object.prototype.toString,
            +        paper = {},
            +        push = "push",
            +        ISURL = R._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i,
            +        colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,
            +        isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1},
            +        bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
            +        round = math.round,
            +        setAttribute = "setAttribute",
            +        toFloat = parseFloat,
            +        toInt = parseInt,
            +        upperCase = Str.prototype.toUpperCase,
            +        availableAttrs = R._availableAttrs = {
            +            "arrow-end": "none",
            +            "arrow-start": "none",
            +            blur: 0,
            +            "clip-rect": "0 0 1e9 1e9",
            +            cursor: "default",
            +            cx: 0,
            +            cy: 0,
            +            fill: "#fff",
            +            "fill-opacity": 1,
            +            font: '10px "Arial"',
            +            "font-family": '"Arial"',
            +            "font-size": "10",
            +            "font-style": "normal",
            +            "font-weight": 400,
            +            gradient: 0,
            +            height: 0,
            +            href: "http://raphaeljs.com/",
            +            "letter-spacing": 0,
            +            opacity: 1,
            +            path: "M0,0",
            +            r: 0,
            +            rx: 0,
            +            ry: 0,
            +            src: "",
            +            stroke: "#000",
            +            "stroke-dasharray": "",
            +            "stroke-linecap": "butt",
            +            "stroke-linejoin": "butt",
            +            "stroke-miterlimit": 0,
            +            "stroke-opacity": 1,
            +            "stroke-width": 1,
            +            target: "_blank",
            +            "text-anchor": "middle",
            +            title: "Raphael",
            +            transform: "",
            +            width: 0,
            +            x: 0,
            +            y: 0
            +        },
            +        availableAnimAttrs = R._availableAnimAttrs = {
            +            blur: nu,
            +            "clip-rect": "csv",
            +            cx: nu,
            +            cy: nu,
            +            fill: "colour",
            +            "fill-opacity": nu,
            +            "font-size": nu,
            +            height: nu,
            +            opacity: nu,
            +            path: "path",
            +            r: nu,
            +            rx: nu,
            +            ry: nu,
            +            stroke: "colour",
            +            "stroke-opacity": nu,
            +            "stroke-width": nu,
            +            transform: "transform",
            +            width: nu,
            +            x: nu,
            +            y: nu
            +        },
            +        whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,
            +        commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,
            +        hsrg = {hs: 1, rg: 1},
            +        p2s = /,?([achlmqrstvxz]),?/gi,
            +        pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,
            +        tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,
            +        pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,
            +        radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,
            +        eldata = {},
            +        sortByKey = function (a, b) {
            +            return a.key - b.key;
            +        },
            +        sortByNumber = function (a, b) {
            +            return toFloat(a) - toFloat(b);
            +        },
            +        fun = function () {},
            +        pipe = function (x) {
            +            return x;
            +        },
            +        rectPath = R._rectPath = function (x, y, w, h, r) {
            +            if (r) {
            +                return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]];
            +            }
            +            return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]];
            +        },
            +        ellipsePath = function (x, y, rx, ry) {
            +            if (ry == null) {
            +                ry = rx;
            +            }
            +            return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]];
            +        },
            +        getPath = R._getPath = {
            +            path: function (el) {
            +                return el.attr("path");
            +            },
            +            circle: function (el) {
            +                var a = el.attrs;
            +                return ellipsePath(a.cx, a.cy, a.r);
            +            },
            +            ellipse: function (el) {
            +                var a = el.attrs;
            +                return ellipsePath(a.cx, a.cy, a.rx, a.ry);
            +            },
            +            rect: function (el) {
            +                var a = el.attrs;
            +                return rectPath(a.x, a.y, a.width, a.height, a.r);
            +            },
            +            image: function (el) {
            +                var a = el.attrs;
            +                return rectPath(a.x, a.y, a.width, a.height);
            +            },
            +            text: function (el) {
            +                var bbox = el._getBBox();
            +                return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
            +            },
            +            set : function(el) {
            +                var bbox = el._getBBox();
            +                return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
            +            }
            +        },
            +        /*\
            +         * Raphael.mapPath
            +         [ method ]
            +         **
            +         * Transform the path string with given matrix.
            +         > Parameters
            +         - path (string) path string
            +         - matrix (object) see @Matrix
            +         = (string) transformed path string
            +        \*/
            +        mapPath = R.mapPath = function (path, matrix) {
            +            if (!matrix) {
            +                return path;
            +            }
            +            var x, y, i, j, ii, jj, pathi;
            +            path = path2curve(path);
            +            for (i = 0, ii = path.length; i < ii; i++) {
            +                pathi = path[i];
            +                for (j = 1, jj = pathi.length; j < jj; j += 2) {
            +                    x = matrix.x(pathi[j], pathi[j + 1]);
            +                    y = matrix.y(pathi[j], pathi[j + 1]);
            +                    pathi[j] = x;
            +                    pathi[j + 1] = y;
            +                }
            +            }
            +            return path;
            +        };
            +
            +    R._g = g;
            +    /*\
            +     * Raphael.type
            +     [ property (string) ]
            +     **
            +     * Can be “SVG”, “VML” or empty, depending on browser support.
            +    \*/
            +    R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML");
            +    if (R.type == "VML") {
            +        var d = g.doc.createElement("div"),
            +            b;
            +        d.innerHTML = '<v:shape adj="1"/>';
            +        b = d.firstChild;
            +        b.style.behavior = "url(#default#VML)";
            +        if (!(b && typeof b.adj == "object")) {
            +            return (R.type = E);
            +        }
            +        d = null;
            +    }
            +    /*\
            +     * Raphael.svg
            +     [ property (boolean) ]
            +     **
            +     * `true` if browser supports SVG.
            +    \*/
            +    /*\
            +     * Raphael.vml
            +     [ property (boolean) ]
            +     **
            +     * `true` if browser supports VML.
            +    \*/
            +    R.svg = !(R.vml = R.type == "VML");
            +    R._Paper = Paper;
            +    /*\
            +     * Raphael.fn
            +     [ property (object) ]
            +     **
            +     * You can add your own method to the canvas. For example if you want to draw a pie chart,
            +     * you can create your own pie chart function and ship it as a Raphaël plugin. To do this
            +     * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a
            +     * Raphaël instance is created, otherwise it will take no effect. Please note that the
            +     * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to
            +     * ensure any namespacing ensures proper context.
            +     > Usage
            +     | Raphael.fn.arrow = function (x1, y1, x2, y2, size) {
            +     |     return this.path( ... );
            +     | };
            +     | // or create namespace
            +     | Raphael.fn.mystuff = {
            +     |     arrow: function () {…},
            +     |     star: function () {…},
            +     |     // etc…
            +     | };
            +     | var paper = Raphael(10, 10, 630, 480);
            +     | // then use it
            +     | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"});
            +     | paper.mystuff.arrow();
            +     | paper.mystuff.star();
            +    \*/
            +    R.fn = paperproto = Paper.prototype = R.prototype;
            +    R._id = 0;
            +    R._oid = 0;
            +    /*\
            +     * Raphael.is
            +     [ method ]
            +     **
            +     * Handfull replacement for `typeof` operator.
            +     > Parameters
            +     - o (…) any object or primitive
            +     - type (string) name of the type, i.e. “string”, “function”, “number”, etc.
            +     = (boolean) is given value is of given type
            +    \*/
            +    R.is = function (o, type) {
            +        type = lowerCase.call(type);
            +        if (type == "finite") {
            +            return !isnan[has](+o);
            +        }
            +        if (type == "array") {
            +            return o instanceof Array;
            +        }
            +        return  (type == "null" && o === null) ||
            +                (type == typeof o && o !== null) ||
            +                (type == "object" && o === Object(o)) ||
            +                (type == "array" && Array.isArray && Array.isArray(o)) ||
            +                objectToString.call(o).slice(8, -1).toLowerCase() == type;
            +    };
            +
            +    function clone(obj) {
            +        if (typeof obj == "function" || Object(obj) !== obj) {
            +            return obj;
            +        }
            +        var res = new obj.constructor;
            +        for (var key in obj) if (obj[has](key)) {
            +            res[key] = clone(obj[key]);
            +        }
            +        return res;
            +    }
            +
            +    /*\
            +     * Raphael.angle
            +     [ method ]
            +     **
            +     * Returns angle between two or three points
            +     > Parameters
            +     - x1 (number) x coord of first point
            +     - y1 (number) y coord of first point
            +     - x2 (number) x coord of second point
            +     - y2 (number) y coord of second point
            +     - x3 (number) #optional x coord of third point
            +     - y3 (number) #optional y coord of third point
            +     = (number) angle in degrees.
            +    \*/
            +    R.angle = function (x1, y1, x2, y2, x3, y3) {
            +        if (x3 == null) {
            +            var x = x1 - x2,
            +                y = y1 - y2;
            +            if (!x && !y) {
            +                return 0;
            +            }
            +            return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;
            +        } else {
            +            return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);
            +        }
            +    };
            +    /*\
            +     * Raphael.rad
            +     [ method ]
            +     **
            +     * Transform angle to radians
            +     > Parameters
            +     - deg (number) angle in degrees
            +     = (number) angle in radians.
            +    \*/
            +    R.rad = function (deg) {
            +        return deg % 360 * PI / 180;
            +    };
            +    /*\
            +     * Raphael.deg
            +     [ method ]
            +     **
            +     * Transform angle to degrees
            +     > Parameters
            +     - deg (number) angle in radians
            +     = (number) angle in degrees.
            +    \*/
            +    R.deg = function (rad) {
            +        return rad * 180 / PI % 360;
            +    };
            +    /*\
            +     * Raphael.snapTo
            +     [ method ]
            +     **
            +     * Snaps given value to given grid.
            +     > Parameters
            +     - values (array|number) given array of values or step of the grid
            +     - value (number) value to adjust
            +     - tolerance (number) #optional tolerance for snapping. Default is `10`.
            +     = (number) adjusted value.
            +    \*/
            +    R.snapTo = function (values, value, tolerance) {
            +        tolerance = R.is(tolerance, "finite") ? tolerance : 10;
            +        if (R.is(values, array)) {
            +            var i = values.length;
            +            while (i--) if (abs(values[i] - value) <= tolerance) {
            +                return values[i];
            +            }
            +        } else {
            +            values = +values;
            +            var rem = value % values;
            +            if (rem < tolerance) {
            +                return value - rem;
            +            }
            +            if (rem > values - tolerance) {
            +                return value - rem + values;
            +            }
            +        }
            +        return value;
            +    };
            +
            +    /*\
            +     * Raphael.createUUID
            +     [ method ]
            +     **
            +     * Returns RFC4122, version 4 ID
            +    \*/
            +    var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {
            +        return function () {
            +            return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();
            +        };
            +    })(/[xy]/g, function (c) {
            +        var r = math.random() * 16 | 0,
            +            v = c == "x" ? r : (r & 3 | 8);
            +        return v.toString(16);
            +    });
            +
            +    /*\
            +     * Raphael.setWindow
            +     [ method ]
            +     **
            +     * Used when you need to draw in `&lt;iframe>`. Switched window to the iframe one.
            +     > Parameters
            +     - newwin (window) new window object
            +    \*/
            +    R.setWindow = function (newwin) {
            +        eve("raphael.setWindow", R, g.win, newwin);
            +        g.win = newwin;
            +        g.doc = g.win.document;
            +        if (R._engine.initWin) {
            +            R._engine.initWin(g.win);
            +        }
            +    };
            +    var toHex = function (color) {
            +        if (R.vml) {
            +            // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/
            +            var trim = /^\s+|\s+$/g;
            +            var bod;
            +            try {
            +                var docum = new ActiveXObject("htmlfile");
            +                docum.write("<body>");
            +                docum.close();
            +                bod = docum.body;
            +            } catch(e) {
            +                bod = createPopup().document.body;
            +            }
            +            var range = bod.createTextRange();
            +            toHex = cacher(function (color) {
            +                try {
            +                    bod.style.color = Str(color).replace(trim, E);
            +                    var value = range.queryCommandValue("ForeColor");
            +                    value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);
            +                    return "#" + ("000000" + value.toString(16)).slice(-6);
            +                } catch(e) {
            +                    return "none";
            +                }
            +            });
            +        } else {
            +            var i = g.doc.createElement("i");
            +            i.title = "Rapha\xebl Colour Picker";
            +            i.style.display = "none";
            +            g.doc.body.appendChild(i);
            +            toHex = cacher(function (color) {
            +                i.style.color = color;
            +                return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color");
            +            });
            +        }
            +        return toHex(color);
            +    },
            +    hsbtoString = function () {
            +        return "hsb(" + [this.h, this.s, this.b] + ")";
            +    },
            +    hsltoString = function () {
            +        return "hsl(" + [this.h, this.s, this.l] + ")";
            +    },
            +    rgbtoString = function () {
            +        return this.hex;
            +    },
            +    prepareRGB = function (r, g, b) {
            +        if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) {
            +            b = r.b;
            +            g = r.g;
            +            r = r.r;
            +        }
            +        if (g == null && R.is(r, string)) {
            +            var clr = R.getRGB(r);
            +            r = clr.r;
            +            g = clr.g;
            +            b = clr.b;
            +        }
            +        if (r > 1 || g > 1 || b > 1) {
            +            r /= 255;
            +            g /= 255;
            +            b /= 255;
            +        }
            +
            +        return [r, g, b];
            +    },
            +    packageRGB = function (r, g, b, o) {
            +        r *= 255;
            +        g *= 255;
            +        b *= 255;
            +        var rgb = {
            +            r: r,
            +            g: g,
            +            b: b,
            +            hex: R.rgb(r, g, b),
            +            toString: rgbtoString
            +        };
            +        R.is(o, "finite") && (rgb.opacity = o);
            +        return rgb;
            +    };
            +
            +    /*\
            +     * Raphael.color
            +     [ method ]
            +     **
            +     * Parses the color string and returns object with all values for the given color.
            +     > Parameters
            +     - clr (string) color string in one of the supported formats (see @Raphael.getRGB)
            +     = (object) Combined RGB & HSB object in format:
            +     o {
            +     o     r (number) red,
            +     o     g (number) green,
            +     o     b (number) blue,
            +     o     hex (string) color in HTML/CSS format: #••••••,
            +     o     error (boolean) `true` if string can’t be parsed,
            +     o     h (number) hue,
            +     o     s (number) saturation,
            +     o     v (number) value (brightness),
            +     o     l (number) lightness
            +     o }
            +    \*/
            +    R.color = function (clr) {
            +        var rgb;
            +        if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {
            +            rgb = R.hsb2rgb(clr);
            +            clr.r = rgb.r;
            +            clr.g = rgb.g;
            +            clr.b = rgb.b;
            +            clr.hex = rgb.hex;
            +        } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {
            +            rgb = R.hsl2rgb(clr);
            +            clr.r = rgb.r;
            +            clr.g = rgb.g;
            +            clr.b = rgb.b;
            +            clr.hex = rgb.hex;
            +        } else {
            +            if (R.is(clr, "string")) {
            +                clr = R.getRGB(clr);
            +            }
            +            if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) {
            +                rgb = R.rgb2hsl(clr);
            +                clr.h = rgb.h;
            +                clr.s = rgb.s;
            +                clr.l = rgb.l;
            +                rgb = R.rgb2hsb(clr);
            +                clr.v = rgb.b;
            +            } else {
            +                clr = {hex: "none"};
            +                clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1;
            +            }
            +        }
            +        clr.toString = rgbtoString;
            +        return clr;
            +    };
            +    /*\
            +     * Raphael.hsb2rgb
            +     [ method ]
            +     **
            +     * Converts HSB values to RGB object.
            +     > Parameters
            +     - h (number) hue
            +     - s (number) saturation
            +     - v (number) value or brightness
            +     = (object) RGB object in format:
            +     o {
            +     o     r (number) red,
            +     o     g (number) green,
            +     o     b (number) blue,
            +     o     hex (string) color in HTML/CSS format: #••••••
            +     o }
            +    \*/
            +    R.hsb2rgb = function (h, s, v, o) {
            +        if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) {
            +            v = h.b;
            +            s = h.s;
            +            h = h.h;
            +            o = h.o;
            +        }
            +        h *= 360;
            +        var R, G, B, X, C;
            +        h = (h % 360) / 60;
            +        C = v * s;
            +        X = C * (1 - abs(h % 2 - 1));
            +        R = G = B = v - C;
            +
            +        h = ~~h;
            +        R += [C, X, 0, 0, X, C][h];
            +        G += [X, C, C, X, 0, 0][h];
            +        B += [0, 0, X, C, C, X][h];
            +        return packageRGB(R, G, B, o);
            +    };
            +    /*\
            +     * Raphael.hsl2rgb
            +     [ method ]
            +     **
            +     * Converts HSL values to RGB object.
            +     > Parameters
            +     - h (number) hue
            +     - s (number) saturation
            +     - l (number) luminosity
            +     = (object) RGB object in format:
            +     o {
            +     o     r (number) red,
            +     o     g (number) green,
            +     o     b (number) blue,
            +     o     hex (string) color in HTML/CSS format: #••••••
            +     o }
            +    \*/
            +    R.hsl2rgb = function (h, s, l, o) {
            +        if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) {
            +            l = h.l;
            +            s = h.s;
            +            h = h.h;
            +        }
            +        if (h > 1 || s > 1 || l > 1) {
            +            h /= 360;
            +            s /= 100;
            +            l /= 100;
            +        }
            +        h *= 360;
            +        var R, G, B, X, C;
            +        h = (h % 360) / 60;
            +        C = 2 * s * (l < .5 ? l : 1 - l);
            +        X = C * (1 - abs(h % 2 - 1));
            +        R = G = B = l - C / 2;
            +
            +        h = ~~h;
            +        R += [C, X, 0, 0, X, C][h];
            +        G += [X, C, C, X, 0, 0][h];
            +        B += [0, 0, X, C, C, X][h];
            +        return packageRGB(R, G, B, o);
            +    };
            +    /*\
            +     * Raphael.rgb2hsb
            +     [ method ]
            +     **
            +     * Converts RGB values to HSB object.
            +     > Parameters
            +     - r (number) red
            +     - g (number) green
            +     - b (number) blue
            +     = (object) HSB object in format:
            +     o {
            +     o     h (number) hue
            +     o     s (number) saturation
            +     o     b (number) brightness
            +     o }
            +    \*/
            +    R.rgb2hsb = function (r, g, b) {
            +        b = prepareRGB(r, g, b);
            +        r = b[0];
            +        g = b[1];
            +        b = b[2];
            +
            +        var H, S, V, C;
            +        V = mmax(r, g, b);
            +        C = V - mmin(r, g, b);
            +        H = (C == 0 ? null :
            +             V == r ? (g - b) / C :
            +             V == g ? (b - r) / C + 2 :
            +                      (r - g) / C + 4
            +            );
            +        H = ((H + 360) % 6) * 60 / 360;
            +        S = C == 0 ? 0 : C / V;
            +        return {h: H, s: S, b: V, toString: hsbtoString};
            +    };
            +    /*\
            +     * Raphael.rgb2hsl
            +     [ method ]
            +     **
            +     * Converts RGB values to HSL object.
            +     > Parameters
            +     - r (number) red
            +     - g (number) green
            +     - b (number) blue
            +     = (object) HSL object in format:
            +     o {
            +     o     h (number) hue
            +     o     s (number) saturation
            +     o     l (number) luminosity
            +     o }
            +    \*/
            +    R.rgb2hsl = function (r, g, b) {
            +        b = prepareRGB(r, g, b);
            +        r = b[0];
            +        g = b[1];
            +        b = b[2];
            +
            +        var H, S, L, M, m, C;
            +        M = mmax(r, g, b);
            +        m = mmin(r, g, b);
            +        C = M - m;
            +        H = (C == 0 ? null :
            +             M == r ? (g - b) / C :
            +             M == g ? (b - r) / C + 2 :
            +                      (r - g) / C + 4);
            +        H = ((H + 360) % 6) * 60 / 360;
            +        L = (M + m) / 2;
            +        S = (C == 0 ? 0 :
            +             L < .5 ? C / (2 * L) :
            +                      C / (2 - 2 * L));
            +        return {h: H, s: S, l: L, toString: hsltoString};
            +    };
            +    R._path2string = function () {
            +        return this.join(",").replace(p2s, "$1");
            +    };
            +    function repush(array, item) {
            +        for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {
            +            return array.push(array.splice(i, 1)[0]);
            +        }
            +    }
            +    function cacher(f, scope, postprocessor) {
            +        function newf() {
            +            var arg = Array.prototype.slice.call(arguments, 0),
            +                args = arg.join("\u2400"),
            +                cache = newf.cache = newf.cache || {},
            +                count = newf.count = newf.count || [];
            +            if (cache[has](args)) {
            +                repush(count, args);
            +                return postprocessor ? postprocessor(cache[args]) : cache[args];
            +            }
            +            count.length >= 1e3 && delete cache[count.shift()];
            +            count.push(args);
            +            cache[args] = f[apply](scope, arg);
            +            return postprocessor ? postprocessor(cache[args]) : cache[args];
            +        }
            +        return newf;
            +    }
            +
            +    var preload = R._preload = function (src, f) {
            +        var img = g.doc.createElement("img");
            +        img.style.cssText = "position:absolute;left:-9999em;top:-9999em";
            +        img.onload = function () {
            +            f.call(this);
            +            this.onload = null;
            +            g.doc.body.removeChild(this);
            +        };
            +        img.onerror = function () {
            +            g.doc.body.removeChild(this);
            +        };
            +        g.doc.body.appendChild(img);
            +        img.src = src;
            +    };
            +
            +    function clrToString() {
            +        return this.hex;
            +    }
            +
            +    /*\
            +     * Raphael.getRGB
            +     [ method ]
            +     **
            +     * Parses colour string as RGB object
            +     > Parameters
            +     - colour (string) colour string in one of formats:
            +     # <ul>
            +     #     <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
            +     #     <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
            +     #     <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
            +     #     <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
            +     #     <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
            +     #     <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
            +     #     <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
            +     #     <li>hsl(•••, •••, •••) — same as hsb</li>
            +     #     <li>hsl(•••%, •••%, •••%) — same as hsb</li>
            +     # </ul>
            +     = (object) RGB object in format:
            +     o {
            +     o     r (number) red,
            +     o     g (number) green,
            +     o     b (number) blue
            +     o     hex (string) color in HTML/CSS format: #••••••,
            +     o     error (boolean) true if string can’t be parsed
            +     o }
            +    \*/
            +    R.getRGB = cacher(function (colour) {
            +        if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {
            +            return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};
            +        }
            +        if (colour == "none") {
            +            return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString};
            +        }
            +        !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour));
            +        var res,
            +            red,
            +            green,
            +            blue,
            +            opacity,
            +            t,
            +            values,
            +            rgb = colour.match(colourRegExp);
            +        if (rgb) {
            +            if (rgb[2]) {
            +                blue = toInt(rgb[2].substring(5), 16);
            +                green = toInt(rgb[2].substring(3, 5), 16);
            +                red = toInt(rgb[2].substring(1, 3), 16);
            +            }
            +            if (rgb[3]) {
            +                blue = toInt((t = rgb[3].charAt(3)) + t, 16);
            +                green = toInt((t = rgb[3].charAt(2)) + t, 16);
            +                red = toInt((t = rgb[3].charAt(1)) + t, 16);
            +            }
            +            if (rgb[4]) {
            +                values = rgb[4][split](commaSpaces);
            +                red = toFloat(values[0]);
            +                values[0].slice(-1) == "%" && (red *= 2.55);
            +                green = toFloat(values[1]);
            +                values[1].slice(-1) == "%" && (green *= 2.55);
            +                blue = toFloat(values[2]);
            +                values[2].slice(-1) == "%" && (blue *= 2.55);
            +                rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3]));
            +                values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
            +            }
            +            if (rgb[5]) {
            +                values = rgb[5][split](commaSpaces);
            +                red = toFloat(values[0]);
            +                values[0].slice(-1) == "%" && (red *= 2.55);
            +                green = toFloat(values[1]);
            +                values[1].slice(-1) == "%" && (green *= 2.55);
            +                blue = toFloat(values[2]);
            +                values[2].slice(-1) == "%" && (blue *= 2.55);
            +                (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360);
            +                rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3]));
            +                values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
            +                return R.hsb2rgb(red, green, blue, opacity);
            +            }
            +            if (rgb[6]) {
            +                values = rgb[6][split](commaSpaces);
            +                red = toFloat(values[0]);
            +                values[0].slice(-1) == "%" && (red *= 2.55);
            +                green = toFloat(values[1]);
            +                values[1].slice(-1) == "%" && (green *= 2.55);
            +                blue = toFloat(values[2]);
            +                values[2].slice(-1) == "%" && (blue *= 2.55);
            +                (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360);
            +                rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3]));
            +                values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
            +                return R.hsl2rgb(red, green, blue, opacity);
            +            }
            +            rgb = {r: red, g: green, b: blue, toString: clrToString};
            +            rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1);
            +            R.is(opacity, "finite") && (rgb.opacity = opacity);
            +            return rgb;
            +        }
            +        return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};
            +    }, R);
            +    /*\
            +     * Raphael.hsb
            +     [ method ]
            +     **
            +     * Converts HSB values to hex representation of the colour.
            +     > Parameters
            +     - h (number) hue
            +     - s (number) saturation
            +     - b (number) value or brightness
            +     = (string) hex representation of the colour.
            +    \*/
            +    R.hsb = cacher(function (h, s, b) {
            +        return R.hsb2rgb(h, s, b).hex;
            +    });
            +    /*\
            +     * Raphael.hsl
            +     [ method ]
            +     **
            +     * Converts HSL values to hex representation of the colour.
            +     > Parameters
            +     - h (number) hue
            +     - s (number) saturation
            +     - l (number) luminosity
            +     = (string) hex representation of the colour.
            +    \*/
            +    R.hsl = cacher(function (h, s, l) {
            +        return R.hsl2rgb(h, s, l).hex;
            +    });
            +    /*\
            +     * Raphael.rgb
            +     [ method ]
            +     **
            +     * Converts RGB values to hex representation of the colour.
            +     > Parameters
            +     - r (number) red
            +     - g (number) green
            +     - b (number) blue
            +     = (string) hex representation of the colour.
            +    \*/
            +    R.rgb = cacher(function (r, g, b) {
            +        return "#" + (16777216 | b | (g << 8) | (r << 16)).toString(16).slice(1);
            +    });
            +    /*\
            +     * Raphael.getColor
            +     [ method ]
            +     **
            +     * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset
            +     > Parameters
            +     - value (number) #optional brightness, default is `0.75`
            +     = (string) hex representation of the colour.
            +    \*/
            +    R.getColor = function (value) {
            +        var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},
            +            rgb = this.hsb2rgb(start.h, start.s, start.b);
            +        start.h += .075;
            +        if (start.h > 1) {
            +            start.h = 0;
            +            start.s -= .2;
            +            start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});
            +        }
            +        return rgb.hex;
            +    };
            +    /*\
            +     * Raphael.getColor.reset
            +     [ method ]
            +     **
            +     * Resets spectrum position for @Raphael.getColor back to red.
            +    \*/
            +    R.getColor.reset = function () {
            +        delete this.start;
            +    };
            +
            +    // http://schepers.cc/getting-to-the-point
            +    function catmullRom2bezier(crp, z) {
            +        var d = [];
            +        for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {
            +            var p = [
            +                        {x: +crp[i - 2], y: +crp[i - 1]},
            +                        {x: +crp[i],     y: +crp[i + 1]},
            +                        {x: +crp[i + 2], y: +crp[i + 3]},
            +                        {x: +crp[i + 4], y: +crp[i + 5]}
            +                    ];
            +            if (z) {
            +                if (!i) {
            +                    p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]};
            +                } else if (iLen - 4 == i) {
            +                    p[3] = {x: +crp[0], y: +crp[1]};
            +                } else if (iLen - 2 == i) {
            +                    p[2] = {x: +crp[0], y: +crp[1]};
            +                    p[3] = {x: +crp[2], y: +crp[3]};
            +                }
            +            } else {
            +                if (iLen - 4 == i) {
            +                    p[3] = p[2];
            +                } else if (!i) {
            +                    p[0] = {x: +crp[i], y: +crp[i + 1]};
            +                }
            +            }
            +            d.push(["C",
            +                  (-p[0].x + 6 * p[1].x + p[2].x) / 6,
            +                  (-p[0].y + 6 * p[1].y + p[2].y) / 6,
            +                  (p[1].x + 6 * p[2].x - p[3].x) / 6,
            +                  (p[1].y + 6*p[2].y - p[3].y) / 6,
            +                  p[2].x,
            +                  p[2].y
            +            ]);
            +        }
            +
            +        return d;
            +    }
            +    /*\
            +     * Raphael.parsePathString
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Parses given path string into an array of arrays of path segments.
            +     > Parameters
            +     - pathString (string|array) path string or array of segments (in the last case it will be returned straight away)
            +     = (array) array of segments.
            +    \*/
            +    R.parsePathString = function (pathString) {
            +        if (!pathString) {
            +            return null;
            +        }
            +        var pth = paths(pathString);
            +        if (pth.arr) {
            +            return pathClone(pth.arr);
            +        }
            +
            +        var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0},
            +            data = [];
            +        if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption
            +            data = pathClone(pathString);
            +        }
            +        if (!data.length) {
            +            Str(pathString).replace(pathCommand, function (a, b, c) {
            +                var params = [],
            +                    name = b.toLowerCase();
            +                c.replace(pathValues, function (a, b) {
            +                    b && params.push(+b);
            +                });
            +                if (name == "m" && params.length > 2) {
            +                    data.push([b][concat](params.splice(0, 2)));
            +                    name = "l";
            +                    b = b == "m" ? "l" : "L";
            +                }
            +                if (name == "r") {
            +                    data.push([b][concat](params));
            +                } else while (params.length >= paramCounts[name]) {
            +                    data.push([b][concat](params.splice(0, paramCounts[name])));
            +                    if (!paramCounts[name]) {
            +                        break;
            +                    }
            +                }
            +            });
            +        }
            +        data.toString = R._path2string;
            +        pth.arr = pathClone(data);
            +        return data;
            +    };
            +    /*\
            +     * Raphael.parseTransformString
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Parses given path string into an array of transformations.
            +     > Parameters
            +     - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away)
            +     = (array) array of transformations.
            +    \*/
            +    R.parseTransformString = cacher(function (TString) {
            +        if (!TString) {
            +            return null;
            +        }
            +        var paramCounts = {r: 3, s: 4, t: 2, m: 6},
            +            data = [];
            +        if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption
            +            data = pathClone(TString);
            +        }
            +        if (!data.length) {
            +            Str(TString).replace(tCommand, function (a, b, c) {
            +                var params = [],
            +                    name = lowerCase.call(b);
            +                c.replace(pathValues, function (a, b) {
            +                    b && params.push(+b);
            +                });
            +                data.push([b][concat](params));
            +            });
            +        }
            +        data.toString = R._path2string;
            +        return data;
            +    });
            +    // PATHS
            +    var paths = function (ps) {
            +        var p = paths.ps = paths.ps || {};
            +        if (p[ps]) {
            +            p[ps].sleep = 100;
            +        } else {
            +            p[ps] = {
            +                sleep: 100
            +            };
            +        }
            +        setTimeout(function () {
            +            for (var key in p) if (p[has](key) && key != ps) {
            +                p[key].sleep--;
            +                !p[key].sleep && delete p[key];
            +            }
            +        });
            +        return p[ps];
            +    };
            +    /*\
            +     * Raphael.findDotsAtSegment
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Find dot coordinates on the given cubic bezier curve at the given t.
            +     > Parameters
            +     - p1x (number) x of the first point of the curve
            +     - p1y (number) y of the first point of the curve
            +     - c1x (number) x of the first anchor of the curve
            +     - c1y (number) y of the first anchor of the curve
            +     - c2x (number) x of the second anchor of the curve
            +     - c2y (number) y of the second anchor of the curve
            +     - p2x (number) x of the second point of the curve
            +     - p2y (number) y of the second point of the curve
            +     - t (number) position on the curve (0..1)
            +     = (object) point information in format:
            +     o {
            +     o     x: (number) x coordinate of the point
            +     o     y: (number) y coordinate of the point
            +     o     m: {
            +     o         x: (number) x coordinate of the left anchor
            +     o         y: (number) y coordinate of the left anchor
            +     o     }
            +     o     n: {
            +     o         x: (number) x coordinate of the right anchor
            +     o         y: (number) y coordinate of the right anchor
            +     o     }
            +     o     start: {
            +     o         x: (number) x coordinate of the start of the curve
            +     o         y: (number) y coordinate of the start of the curve
            +     o     }
            +     o     end: {
            +     o         x: (number) x coordinate of the end of the curve
            +     o         y: (number) y coordinate of the end of the curve
            +     o     }
            +     o     alpha: (number) angle of the curve derivative at the point
            +     o }
            +    \*/
            +    R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
            +        var t1 = 1 - t,
            +            t13 = pow(t1, 3),
            +            t12 = pow(t1, 2),
            +            t2 = t * t,
            +            t3 = t2 * t,
            +            x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,
            +            y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,
            +            mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),
            +            my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),
            +            nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),
            +            ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),
            +            ax = t1 * p1x + t * c1x,
            +            ay = t1 * p1y + t * c1y,
            +            cx = t1 * c2x + t * p2x,
            +            cy = t1 * c2y + t * p2y,
            +            alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI);
            +        (mx > nx || my < ny) && (alpha += 180);
            +        return {
            +            x: x,
            +            y: y,
            +            m: {x: mx, y: my},
            +            n: {x: nx, y: ny},
            +            start: {x: ax, y: ay},
            +            end: {x: cx, y: cy},
            +            alpha: alpha
            +        };
            +    };
            +    /*\
            +     * Raphael.bezierBBox
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Return bounding box of a given cubic bezier curve
            +     > Parameters
            +     - p1x (number) x of the first point of the curve
            +     - p1y (number) y of the first point of the curve
            +     - c1x (number) x of the first anchor of the curve
            +     - c1y (number) y of the first anchor of the curve
            +     - c2x (number) x of the second anchor of the curve
            +     - c2y (number) y of the second anchor of the curve
            +     - p2x (number) x of the second point of the curve
            +     - p2y (number) y of the second point of the curve
            +     * or
            +     - bez (array) array of six points for bezier curve
            +     = (object) point information in format:
            +     o {
            +     o     min: {
            +     o         x: (number) x coordinate of the left point
            +     o         y: (number) y coordinate of the top point
            +     o     }
            +     o     max: {
            +     o         x: (number) x coordinate of the right point
            +     o         y: (number) y coordinate of the bottom point
            +     o     }
            +     o }
            +    \*/
            +    R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
            +        if (!R.is(p1x, "array")) {
            +            p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];
            +        }
            +        var bbox = curveDim.apply(null, p1x);
            +        return {
            +            x: bbox.min.x,
            +            y: bbox.min.y,
            +            x2: bbox.max.x,
            +            y2: bbox.max.y,
            +            width: bbox.max.x - bbox.min.x,
            +            height: bbox.max.y - bbox.min.y
            +        };
            +    };
            +    /*\
            +     * Raphael.isPointInsideBBox
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Returns `true` if given point is inside bounding boxes.
            +     > Parameters
            +     - bbox (string) bounding box
            +     - x (string) x coordinate of the point
            +     - y (string) y coordinate of the point
            +     = (boolean) `true` if point inside
            +    \*/
            +    R.isPointInsideBBox = function (bbox, x, y) {
            +        return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2;
            +    };
            +    /*\
            +     * Raphael.isBBoxIntersect
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Returns `true` if two bounding boxes intersect
            +     > Parameters
            +     - bbox1 (string) first bounding box
            +     - bbox2 (string) second bounding box
            +     = (boolean) `true` if they intersect
            +    \*/
            +    R.isBBoxIntersect = function (bbox1, bbox2) {
            +        var i = R.isPointInsideBBox;
            +        return i(bbox2, bbox1.x, bbox1.y)
            +            || i(bbox2, bbox1.x2, bbox1.y)
            +            || i(bbox2, bbox1.x, bbox1.y2)
            +            || i(bbox2, bbox1.x2, bbox1.y2)
            +            || i(bbox1, bbox2.x, bbox2.y)
            +            || i(bbox1, bbox2.x2, bbox2.y)
            +            || i(bbox1, bbox2.x, bbox2.y2)
            +            || i(bbox1, bbox2.x2, bbox2.y2)
            +            || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)
            +            && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);
            +    };
            +    function base3(t, p1, p2, p3, p4) {
            +        var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,
            +            t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;
            +        return t * t2 - 3 * p1 + 3 * p2;
            +    }
            +    function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {
            +        if (z == null) {
            +            z = 1;
            +        }
            +        z = z > 1 ? 1 : z < 0 ? 0 : z;
            +        var z2 = z / 2,
            +            n = 12,
            +            Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],
            +            Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],
            +            sum = 0;
            +        for (var i = 0; i < n; i++) {
            +            var ct = z2 * Tvalues[i] + z2,
            +                xbase = base3(ct, x1, x2, x3, x4),
            +                ybase = base3(ct, y1, y2, y3, y4),
            +                comb = xbase * xbase + ybase * ybase;
            +            sum += Cvalues[i] * math.sqrt(comb);
            +        }
            +        return z2 * sum;
            +    }
            +    function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {
            +        if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {
            +            return;
            +        }
            +        var t = 1,
            +            step = t / 2,
            +            t2 = t - step,
            +            l,
            +            e = .01;
            +        l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);
            +        while (abs(l - ll) > e) {
            +            step /= 2;
            +            t2 += (l < ll ? 1 : -1) * step;
            +            l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);
            +        }
            +        return t2;
            +    }
            +    function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {
            +        if (
            +            mmax(x1, x2) < mmin(x3, x4) ||
            +            mmin(x1, x2) > mmax(x3, x4) ||
            +            mmax(y1, y2) < mmin(y3, y4) ||
            +            mmin(y1, y2) > mmax(y3, y4)
            +        ) {
            +            return;
            +        }
            +        var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),
            +            ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),
            +            denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
            +
            +        if (!denominator) {
            +            return;
            +        }
            +        var px = nx / denominator,
            +            py = ny / denominator,
            +            px2 = +px.toFixed(2),
            +            py2 = +py.toFixed(2);
            +        if (
            +            px2 < +mmin(x1, x2).toFixed(2) ||
            +            px2 > +mmax(x1, x2).toFixed(2) ||
            +            px2 < +mmin(x3, x4).toFixed(2) ||
            +            px2 > +mmax(x3, x4).toFixed(2) ||
            +            py2 < +mmin(y1, y2).toFixed(2) ||
            +            py2 > +mmax(y1, y2).toFixed(2) ||
            +            py2 < +mmin(y3, y4).toFixed(2) ||
            +            py2 > +mmax(y3, y4).toFixed(2)
            +        ) {
            +            return;
            +        }
            +        return {x: px, y: py};
            +    }
            +    function inter(bez1, bez2) {
            +        return interHelper(bez1, bez2);
            +    }
            +    function interCount(bez1, bez2) {
            +        return interHelper(bez1, bez2, 1);
            +    }
            +    function interHelper(bez1, bez2, justCount) {
            +        var bbox1 = R.bezierBBox(bez1),
            +            bbox2 = R.bezierBBox(bez2);
            +        if (!R.isBBoxIntersect(bbox1, bbox2)) {
            +            return justCount ? 0 : [];
            +        }
            +        var l1 = bezlen.apply(0, bez1),
            +            l2 = bezlen.apply(0, bez2),
            +            n1 = mmax(~~(l1 / 5), 1),
            +            n2 = mmax(~~(l2 / 5), 1),
            +            dots1 = [],
            +            dots2 = [],
            +            xy = {},
            +            res = justCount ? 0 : [];
            +        for (var i = 0; i < n1 + 1; i++) {
            +            var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));
            +            dots1.push({x: p.x, y: p.y, t: i / n1});
            +        }
            +        for (i = 0; i < n2 + 1; i++) {
            +            p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));
            +            dots2.push({x: p.x, y: p.y, t: i / n2});
            +        }
            +        for (i = 0; i < n1; i++) {
            +            for (var j = 0; j < n2; j++) {
            +                var di = dots1[i],
            +                    di1 = dots1[i + 1],
            +                    dj = dots2[j],
            +                    dj1 = dots2[j + 1],
            +                    ci = abs(di1.x - di.x) < .001 ? "y" : "x",
            +                    cj = abs(dj1.x - dj.x) < .001 ? "y" : "x",
            +                    is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);
            +                if (is) {
            +                    if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) {
            +                        continue;
            +                    }
            +                    xy[is.x.toFixed(4)] = is.y.toFixed(4);
            +                    var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),
            +                        t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);
            +                    if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) {
            +                        if (justCount) {
            +                            res++;
            +                        } else {
            +                            res.push({
            +                                x: is.x,
            +                                y: is.y,
            +                                t1: mmin(t1, 1),
            +                                t2: mmin(t2, 1)
            +                            });
            +                        }
            +                    }
            +                }
            +            }
            +        }
            +        return res;
            +    }
            +    /*\
            +     * Raphael.pathIntersection
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Finds intersections of two paths
            +     > Parameters
            +     - path1 (string) path string
            +     - path2 (string) path string
            +     = (array) dots of intersection
            +     o [
            +     o     {
            +     o         x: (number) x coordinate of the point
            +     o         y: (number) y coordinate of the point
            +     o         t1: (number) t value for segment of path1
            +     o         t2: (number) t value for segment of path2
            +     o         segment1: (number) order number for segment of path1
            +     o         segment2: (number) order number for segment of path2
            +     o         bez1: (array) eight coordinates representing beziér curve for the segment of path1
            +     o         bez2: (array) eight coordinates representing beziér curve for the segment of path2
            +     o     }
            +     o ]
            +    \*/
            +    R.pathIntersection = function (path1, path2) {
            +        return interPathHelper(path1, path2);
            +    };
            +    R.pathIntersectionNumber = function (path1, path2) {
            +        return interPathHelper(path1, path2, 1);
            +    };
            +    function interPathHelper(path1, path2, justCount) {
            +        path1 = R._path2curve(path1);
            +        path2 = R._path2curve(path2);
            +        var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,
            +            res = justCount ? 0 : [];
            +        for (var i = 0, ii = path1.length; i < ii; i++) {
            +            var pi = path1[i];
            +            if (pi[0] == "M") {
            +                x1 = x1m = pi[1];
            +                y1 = y1m = pi[2];
            +            } else {
            +                if (pi[0] == "C") {
            +                    bez1 = [x1, y1].concat(pi.slice(1));
            +                    x1 = bez1[6];
            +                    y1 = bez1[7];
            +                } else {
            +                    bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];
            +                    x1 = x1m;
            +                    y1 = y1m;
            +                }
            +                for (var j = 0, jj = path2.length; j < jj; j++) {
            +                    var pj = path2[j];
            +                    if (pj[0] == "M") {
            +                        x2 = x2m = pj[1];
            +                        y2 = y2m = pj[2];
            +                    } else {
            +                        if (pj[0] == "C") {
            +                            bez2 = [x2, y2].concat(pj.slice(1));
            +                            x2 = bez2[6];
            +                            y2 = bez2[7];
            +                        } else {
            +                            bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];
            +                            x2 = x2m;
            +                            y2 = y2m;
            +                        }
            +                        var intr = interHelper(bez1, bez2, justCount);
            +                        if (justCount) {
            +                            res += intr;
            +                        } else {
            +                            for (var k = 0, kk = intr.length; k < kk; k++) {
            +                                intr[k].segment1 = i;
            +                                intr[k].segment2 = j;
            +                                intr[k].bez1 = bez1;
            +                                intr[k].bez2 = bez2;
            +                            }
            +                            res = res.concat(intr);
            +                        }
            +                    }
            +                }
            +            }
            +        }
            +        return res;
            +    }
            +    /*\
            +     * Raphael.isPointInsidePath
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Returns `true` if given point is inside a given closed path.
            +     > Parameters
            +     - path (string) path string
            +     - x (number) x of the point
            +     - y (number) y of the point
            +     = (boolean) true, if point is inside the path
            +    \*/
            +    R.isPointInsidePath = function (path, x, y) {
            +        var bbox = R.pathBBox(path);
            +        return R.isPointInsideBBox(bbox, x, y) &&
            +               interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1;
            +    };
            +    R._removedFactory = function (methodname) {
            +        return function () {
            +            eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname);
            +        };
            +    };
            +    /*\
            +     * Raphael.pathBBox
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Return bounding box of a given path
            +     > Parameters
            +     - path (string) path string
            +     = (object) bounding box
            +     o {
            +     o     x: (number) x coordinate of the left top point of the box
            +     o     y: (number) y coordinate of the left top point of the box
            +     o     x2: (number) x coordinate of the right bottom point of the box
            +     o     y2: (number) y coordinate of the right bottom point of the box
            +     o     width: (number) width of the box
            +     o     height: (number) height of the box
            +     o     cx: (number) x coordinate of the center of the box
            +     o     cy: (number) y coordinate of the center of the box
            +     o }
            +    \*/
            +    var pathDimensions = R.pathBBox = function (path) {
            +        var pth = paths(path);
            +        if (pth.bbox) {
            +            return clone(pth.bbox);
            +        }
            +        if (!path) {
            +            return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0};
            +        }
            +        path = path2curve(path);
            +        var x = 0,
            +            y = 0,
            +            X = [],
            +            Y = [],
            +            p;
            +        for (var i = 0, ii = path.length; i < ii; i++) {
            +            p = path[i];
            +            if (p[0] == "M") {
            +                x = p[1];
            +                y = p[2];
            +                X.push(x);
            +                Y.push(y);
            +            } else {
            +                var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);
            +                X = X[concat](dim.min.x, dim.max.x);
            +                Y = Y[concat](dim.min.y, dim.max.y);
            +                x = p[5];
            +                y = p[6];
            +            }
            +        }
            +        var xmin = mmin[apply](0, X),
            +            ymin = mmin[apply](0, Y),
            +            xmax = mmax[apply](0, X),
            +            ymax = mmax[apply](0, Y),
            +            width = xmax - xmin,
            +            height = ymax - ymin,
            +                bb = {
            +                x: xmin,
            +                y: ymin,
            +                x2: xmax,
            +                y2: ymax,
            +                width: width,
            +                height: height,
            +                cx: xmin + width / 2,
            +                cy: ymin + height / 2
            +            };
            +        pth.bbox = clone(bb);
            +        return bb;
            +    },
            +        pathClone = function (pathArray) {
            +            var res = clone(pathArray);
            +            res.toString = R._path2string;
            +            return res;
            +        },
            +        pathToRelative = R._pathToRelative = function (pathArray) {
            +            var pth = paths(pathArray);
            +            if (pth.rel) {
            +                return pathClone(pth.rel);
            +            }
            +            if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
            +                pathArray = R.parsePathString(pathArray);
            +            }
            +            var res = [],
            +                x = 0,
            +                y = 0,
            +                mx = 0,
            +                my = 0,
            +                start = 0;
            +            if (pathArray[0][0] == "M") {
            +                x = pathArray[0][1];
            +                y = pathArray[0][2];
            +                mx = x;
            +                my = y;
            +                start++;
            +                res.push(["M", x, y]);
            +            }
            +            for (var i = start, ii = pathArray.length; i < ii; i++) {
            +                var r = res[i] = [],
            +                    pa = pathArray[i];
            +                if (pa[0] != lowerCase.call(pa[0])) {
            +                    r[0] = lowerCase.call(pa[0]);
            +                    switch (r[0]) {
            +                        case "a":
            +                            r[1] = pa[1];
            +                            r[2] = pa[2];
            +                            r[3] = pa[3];
            +                            r[4] = pa[4];
            +                            r[5] = pa[5];
            +                            r[6] = +(pa[6] - x).toFixed(3);
            +                            r[7] = +(pa[7] - y).toFixed(3);
            +                            break;
            +                        case "v":
            +                            r[1] = +(pa[1] - y).toFixed(3);
            +                            break;
            +                        case "m":
            +                            mx = pa[1];
            +                            my = pa[2];
            +                        default:
            +                            for (var j = 1, jj = pa.length; j < jj; j++) {
            +                                r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3);
            +                            }
            +                    }
            +                } else {
            +                    r = res[i] = [];
            +                    if (pa[0] == "m") {
            +                        mx = pa[1] + x;
            +                        my = pa[2] + y;
            +                    }
            +                    for (var k = 0, kk = pa.length; k < kk; k++) {
            +                        res[i][k] = pa[k];
            +                    }
            +                }
            +                var len = res[i].length;
            +                switch (res[i][0]) {
            +                    case "z":
            +                        x = mx;
            +                        y = my;
            +                        break;
            +                    case "h":
            +                        x += +res[i][len - 1];
            +                        break;
            +                    case "v":
            +                        y += +res[i][len - 1];
            +                        break;
            +                    default:
            +                        x += +res[i][len - 2];
            +                        y += +res[i][len - 1];
            +                }
            +            }
            +            res.toString = R._path2string;
            +            pth.rel = pathClone(res);
            +            return res;
            +        },
            +        pathToAbsolute = R._pathToAbsolute = function (pathArray) {
            +            var pth = paths(pathArray);
            +            if (pth.abs) {
            +                return pathClone(pth.abs);
            +            }
            +            if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
            +                pathArray = R.parsePathString(pathArray);
            +            }
            +            if (!pathArray || !pathArray.length) {
            +                return [["M", 0, 0]];
            +            }
            +            var res = [],
            +                x = 0,
            +                y = 0,
            +                mx = 0,
            +                my = 0,
            +                start = 0;
            +            if (pathArray[0][0] == "M") {
            +                x = +pathArray[0][1];
            +                y = +pathArray[0][2];
            +                mx = x;
            +                my = y;
            +                start++;
            +                res[0] = ["M", x, y];
            +            }
            +            var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z";
            +            for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {
            +                res.push(r = []);
            +                pa = pathArray[i];
            +                if (pa[0] != upperCase.call(pa[0])) {
            +                    r[0] = upperCase.call(pa[0]);
            +                    switch (r[0]) {
            +                        case "A":
            +                            r[1] = pa[1];
            +                            r[2] = pa[2];
            +                            r[3] = pa[3];
            +                            r[4] = pa[4];
            +                            r[5] = pa[5];
            +                            r[6] = +(pa[6] + x);
            +                            r[7] = +(pa[7] + y);
            +                            break;
            +                        case "V":
            +                            r[1] = +pa[1] + y;
            +                            break;
            +                        case "H":
            +                            r[1] = +pa[1] + x;
            +                            break;
            +                        case "R":
            +                            var dots = [x, y][concat](pa.slice(1));
            +                            for (var j = 2, jj = dots.length; j < jj; j++) {
            +                                dots[j] = +dots[j] + x;
            +                                dots[++j] = +dots[j] + y;
            +                            }
            +                            res.pop();
            +                            res = res[concat](catmullRom2bezier(dots, crz));
            +                            break;
            +                        case "M":
            +                            mx = +pa[1] + x;
            +                            my = +pa[2] + y;
            +                        default:
            +                            for (j = 1, jj = pa.length; j < jj; j++) {
            +                                r[j] = +pa[j] + ((j % 2) ? x : y);
            +                            }
            +                    }
            +                } else if (pa[0] == "R") {
            +                    dots = [x, y][concat](pa.slice(1));
            +                    res.pop();
            +                    res = res[concat](catmullRom2bezier(dots, crz));
            +                    r = ["R"][concat](pa.slice(-2));
            +                } else {
            +                    for (var k = 0, kk = pa.length; k < kk; k++) {
            +                        r[k] = pa[k];
            +                    }
            +                }
            +                switch (r[0]) {
            +                    case "Z":
            +                        x = mx;
            +                        y = my;
            +                        break;
            +                    case "H":
            +                        x = r[1];
            +                        break;
            +                    case "V":
            +                        y = r[1];
            +                        break;
            +                    case "M":
            +                        mx = r[r.length - 2];
            +                        my = r[r.length - 1];
            +                    default:
            +                        x = r[r.length - 2];
            +                        y = r[r.length - 1];
            +                }
            +            }
            +            res.toString = R._path2string;
            +            pth.abs = pathClone(res);
            +            return res;
            +        },
            +        l2c = function (x1, y1, x2, y2) {
            +            return [x1, y1, x2, y2, x2, y2];
            +        },
            +        q2c = function (x1, y1, ax, ay, x2, y2) {
            +            var _13 = 1 / 3,
            +                _23 = 2 / 3;
            +            return [
            +                    _13 * x1 + _23 * ax,
            +                    _13 * y1 + _23 * ay,
            +                    _13 * x2 + _23 * ax,
            +                    _13 * y2 + _23 * ay,
            +                    x2,
            +                    y2
            +                ];
            +        },
            +        a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {
            +            // for more information of where this math came from visit:
            +            // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
            +            var _120 = PI * 120 / 180,
            +                rad = PI / 180 * (+angle || 0),
            +                res = [],
            +                xy,
            +                rotate = cacher(function (x, y, rad) {
            +                    var X = x * math.cos(rad) - y * math.sin(rad),
            +                        Y = x * math.sin(rad) + y * math.cos(rad);
            +                    return {x: X, y: Y};
            +                });
            +            if (!recursive) {
            +                xy = rotate(x1, y1, -rad);
            +                x1 = xy.x;
            +                y1 = xy.y;
            +                xy = rotate(x2, y2, -rad);
            +                x2 = xy.x;
            +                y2 = xy.y;
            +                var cos = math.cos(PI / 180 * angle),
            +                    sin = math.sin(PI / 180 * angle),
            +                    x = (x1 - x2) / 2,
            +                    y = (y1 - y2) / 2;
            +                var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);
            +                if (h > 1) {
            +                    h = math.sqrt(h);
            +                    rx = h * rx;
            +                    ry = h * ry;
            +                }
            +                var rx2 = rx * rx,
            +                    ry2 = ry * ry,
            +                    k = (large_arc_flag == sweep_flag ? -1 : 1) *
            +                        math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),
            +                    cx = k * rx * y / ry + (x1 + x2) / 2,
            +                    cy = k * -ry * x / rx + (y1 + y2) / 2,
            +                    f1 = math.asin(((y1 - cy) / ry).toFixed(9)),
            +                    f2 = math.asin(((y2 - cy) / ry).toFixed(9));
            +
            +                f1 = x1 < cx ? PI - f1 : f1;
            +                f2 = x2 < cx ? PI - f2 : f2;
            +                f1 < 0 && (f1 = PI * 2 + f1);
            +                f2 < 0 && (f2 = PI * 2 + f2);
            +                if (sweep_flag && f1 > f2) {
            +                    f1 = f1 - PI * 2;
            +                }
            +                if (!sweep_flag && f2 > f1) {
            +                    f2 = f2 - PI * 2;
            +                }
            +            } else {
            +                f1 = recursive[0];
            +                f2 = recursive[1];
            +                cx = recursive[2];
            +                cy = recursive[3];
            +            }
            +            var df = f2 - f1;
            +            if (abs(df) > _120) {
            +                var f2old = f2,
            +                    x2old = x2,
            +                    y2old = y2;
            +                f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);
            +                x2 = cx + rx * math.cos(f2);
            +                y2 = cy + ry * math.sin(f2);
            +                res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);
            +            }
            +            df = f2 - f1;
            +            var c1 = math.cos(f1),
            +                s1 = math.sin(f1),
            +                c2 = math.cos(f2),
            +                s2 = math.sin(f2),
            +                t = math.tan(df / 4),
            +                hx = 4 / 3 * rx * t,
            +                hy = 4 / 3 * ry * t,
            +                m1 = [x1, y1],
            +                m2 = [x1 + hx * s1, y1 - hy * c1],
            +                m3 = [x2 + hx * s2, y2 - hy * c2],
            +                m4 = [x2, y2];
            +            m2[0] = 2 * m1[0] - m2[0];
            +            m2[1] = 2 * m1[1] - m2[1];
            +            if (recursive) {
            +                return [m2, m3, m4][concat](res);
            +            } else {
            +                res = [m2, m3, m4][concat](res).join()[split](",");
            +                var newres = [];
            +                for (var i = 0, ii = res.length; i < ii; i++) {
            +                    newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;
            +                }
            +                return newres;
            +            }
            +        },
            +        findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
            +            var t1 = 1 - t;
            +            return {
            +                x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,
            +                y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y
            +            };
            +        },
            +        curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
            +            var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),
            +                b = 2 * (c1x - p1x) - 2 * (c2x - c1x),
            +                c = p1x - c1x,
            +                t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,
            +                t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,
            +                y = [p1y, p2y],
            +                x = [p1x, p2x],
            +                dot;
            +            abs(t1) > "1e12" && (t1 = .5);
            +            abs(t2) > "1e12" && (t2 = .5);
            +            if (t1 > 0 && t1 < 1) {
            +                dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
            +                x.push(dot.x);
            +                y.push(dot.y);
            +            }
            +            if (t2 > 0 && t2 < 1) {
            +                dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);
            +                x.push(dot.x);
            +                y.push(dot.y);
            +            }
            +            a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);
            +            b = 2 * (c1y - p1y) - 2 * (c2y - c1y);
            +            c = p1y - c1y;
            +            t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;
            +            t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;
            +            abs(t1) > "1e12" && (t1 = .5);
            +            abs(t2) > "1e12" && (t2 = .5);
            +            if (t1 > 0 && t1 < 1) {
            +                dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
            +                x.push(dot.x);
            +                y.push(dot.y);
            +            }
            +            if (t2 > 0 && t2 < 1) {
            +                dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);
            +                x.push(dot.x);
            +                y.push(dot.y);
            +            }
            +            return {
            +                min: {x: mmin[apply](0, x), y: mmin[apply](0, y)},
            +                max: {x: mmax[apply](0, x), y: mmax[apply](0, y)}
            +            };
            +        }),
            +        path2curve = R._path2curve = cacher(function (path, path2) {
            +            var pth = !path2 && paths(path);
            +            if (!path2 && pth.curve) {
            +                return pathClone(pth.curve);
            +            }
            +            var p = pathToAbsolute(path),
            +                p2 = path2 && pathToAbsolute(path2),
            +                attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},
            +                attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},
            +                processPath = function (path, d, pcom) {
            +                    var nx, ny, tq = {T:1, Q:1};
            +                    if (!path) {
            +                        return ["C", d.x, d.y, d.x, d.y, d.x, d.y];
            +                    }
            +                    !(path[0] in tq) && (d.qx = d.qy = null);
            +                    switch (path[0]) {
            +                        case "M":
            +                            d.X = path[1];
            +                            d.Y = path[2];
            +                            break;
            +                        case "A":
            +                            path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1))));
            +                            break;
            +                        case "S":
            +                            if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S.
            +                                nx = d.x * 2 - d.bx;          // And reflect the previous
            +                                ny = d.y * 2 - d.by;          // command's control point relative to the current point.
            +                            }
            +                            else {                            // or some else or nothing
            +                                nx = d.x;
            +                                ny = d.y;
            +                            }
            +                            path = ["C", nx, ny][concat](path.slice(1));
            +                            break;
            +                        case "T":
            +                            if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T.
            +                                d.qx = d.x * 2 - d.qx;        // And make a reflection similar
            +                                d.qy = d.y * 2 - d.qy;        // to case "S".
            +                            }
            +                            else {                            // or something else or nothing
            +                                d.qx = d.x;
            +                                d.qy = d.y;
            +                            }
            +                            path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));
            +                            break;
            +                        case "Q":
            +                            d.qx = path[1];
            +                            d.qy = path[2];
            +                            path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4]));
            +                            break;
            +                        case "L":
            +                            path = ["C"][concat](l2c(d.x, d.y, path[1], path[2]));
            +                            break;
            +                        case "H":
            +                            path = ["C"][concat](l2c(d.x, d.y, path[1], d.y));
            +                            break;
            +                        case "V":
            +                            path = ["C"][concat](l2c(d.x, d.y, d.x, path[1]));
            +                            break;
            +                        case "Z":
            +                            path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y));
            +                            break;
            +                    }
            +                    return path;
            +                },
            +                fixArc = function (pp, i) {
            +                    if (pp[i].length > 7) {
            +                        pp[i].shift();
            +                        var pi = pp[i];
            +                        while (pi.length) {
            +                            pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6)));
            +                        }
            +                        pp.splice(i, 1);
            +                        ii = mmax(p.length, p2 && p2.length || 0);
            +                    }
            +                },
            +                fixM = function (path1, path2, a1, a2, i) {
            +                    if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") {
            +                        path2.splice(i, 0, ["M", a2.x, a2.y]);
            +                        a1.bx = 0;
            +                        a1.by = 0;
            +                        a1.x = path1[i][1];
            +                        a1.y = path1[i][2];
            +                        ii = mmax(p.length, p2 && p2.length || 0);
            +                    }
            +                };
            +            for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) {
            +                p[i] = processPath(p[i], attrs);
            +                fixArc(p, i);
            +                p2 && (p2[i] = processPath(p2[i], attrs2));
            +                p2 && fixArc(p2, i);
            +                fixM(p, p2, attrs, attrs2, i);
            +                fixM(p2, p, attrs2, attrs, i);
            +                var seg = p[i],
            +                    seg2 = p2 && p2[i],
            +                    seglen = seg.length,
            +                    seg2len = p2 && seg2.length;
            +                attrs.x = seg[seglen - 2];
            +                attrs.y = seg[seglen - 1];
            +                attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;
            +                attrs.by = toFloat(seg[seglen - 3]) || attrs.y;
            +                attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x);
            +                attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y);
            +                attrs2.x = p2 && seg2[seg2len - 2];
            +                attrs2.y = p2 && seg2[seg2len - 1];
            +            }
            +            if (!p2) {
            +                pth.curve = pathClone(p);
            +            }
            +            return p2 ? [p, p2] : p;
            +        }, null, pathClone),
            +        parseDots = R._parseDots = cacher(function (gradient) {
            +            var dots = [];
            +            for (var i = 0, ii = gradient.length; i < ii; i++) {
            +                var dot = {},
            +                    par = gradient[i].match(/^([^:]*):?([\d\.]*)/);
            +                dot.color = R.getRGB(par[1]);
            +                if (dot.color.error) {
            +                    return null;
            +                }
            +                dot.color = dot.color.hex;
            +                par[2] && (dot.offset = par[2] + "%");
            +                dots.push(dot);
            +            }
            +            for (i = 1, ii = dots.length - 1; i < ii; i++) {
            +                if (!dots[i].offset) {
            +                    var start = toFloat(dots[i - 1].offset || 0),
            +                        end = 0;
            +                    for (var j = i + 1; j < ii; j++) {
            +                        if (dots[j].offset) {
            +                            end = dots[j].offset;
            +                            break;
            +                        }
            +                    }
            +                    if (!end) {
            +                        end = 100;
            +                        j = ii;
            +                    }
            +                    end = toFloat(end);
            +                    var d = (end - start) / (j - i + 1);
            +                    for (; i < j; i++) {
            +                        start += d;
            +                        dots[i].offset = start + "%";
            +                    }
            +                }
            +            }
            +            return dots;
            +        }),
            +        tear = R._tear = function (el, paper) {
            +            el == paper.top && (paper.top = el.prev);
            +            el == paper.bottom && (paper.bottom = el.next);
            +            el.next && (el.next.prev = el.prev);
            +            el.prev && (el.prev.next = el.next);
            +        },
            +        tofront = R._tofront = function (el, paper) {
            +            if (paper.top === el) {
            +                return;
            +            }
            +            tear(el, paper);
            +            el.next = null;
            +            el.prev = paper.top;
            +            paper.top.next = el;
            +            paper.top = el;
            +        },
            +        toback = R._toback = function (el, paper) {
            +            if (paper.bottom === el) {
            +                return;
            +            }
            +            tear(el, paper);
            +            el.next = paper.bottom;
            +            el.prev = null;
            +            paper.bottom.prev = el;
            +            paper.bottom = el;
            +        },
            +        insertafter = R._insertafter = function (el, el2, paper) {
            +            tear(el, paper);
            +            el2 == paper.top && (paper.top = el);
            +            el2.next && (el2.next.prev = el);
            +            el.next = el2.next;
            +            el.prev = el2;
            +            el2.next = el;
            +        },
            +        insertbefore = R._insertbefore = function (el, el2, paper) {
            +            tear(el, paper);
            +            el2 == paper.bottom && (paper.bottom = el);
            +            el2.prev && (el2.prev.next = el);
            +            el.prev = el2.prev;
            +            el2.prev = el;
            +            el.next = el2;
            +        },
            +        /*\
            +         * Raphael.toMatrix
            +         [ method ]
            +         **
            +         * Utility method
            +         **
            +         * Returns matrix of transformations applied to a given path
            +         > Parameters
            +         - path (string) path string
            +         - transform (string|array) transformation string
            +         = (object) @Matrix
            +        \*/
            +        toMatrix = R.toMatrix = function (path, transform) {
            +            var bb = pathDimensions(path),
            +                el = {
            +                    _: {
            +                        transform: E
            +                    },
            +                    getBBox: function () {
            +                        return bb;
            +                    }
            +                };
            +            extractTransform(el, transform);
            +            return el.matrix;
            +        },
            +        /*\
            +         * Raphael.transformPath
            +         [ method ]
            +         **
            +         * Utility method
            +         **
            +         * Returns path transformed by a given transformation
            +         > Parameters
            +         - path (string) path string
            +         - transform (string|array) transformation string
            +         = (string) path
            +        \*/
            +        transformPath = R.transformPath = function (path, transform) {
            +            return mapPath(path, toMatrix(path, transform));
            +        },
            +        extractTransform = R._extractTransform = function (el, tstr) {
            +            if (tstr == null) {
            +                return el._.transform;
            +            }
            +            tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
            +            var tdata = R.parseTransformString(tstr),
            +                deg = 0,
            +                dx = 0,
            +                dy = 0,
            +                sx = 1,
            +                sy = 1,
            +                _ = el._,
            +                m = new Matrix;
            +            _.transform = tdata || [];
            +            if (tdata) {
            +                for (var i = 0, ii = tdata.length; i < ii; i++) {
            +                    var t = tdata[i],
            +                        tlen = t.length,
            +                        command = Str(t[0]).toLowerCase(),
            +                        absolute = t[0] != command,
            +                        inver = absolute ? m.invert() : 0,
            +                        x1,
            +                        y1,
            +                        x2,
            +                        y2,
            +                        bb;
            +                    if (command == "t" && tlen == 3) {
            +                        if (absolute) {
            +                            x1 = inver.x(0, 0);
            +                            y1 = inver.y(0, 0);
            +                            x2 = inver.x(t[1], t[2]);
            +                            y2 = inver.y(t[1], t[2]);
            +                            m.translate(x2 - x1, y2 - y1);
            +                        } else {
            +                            m.translate(t[1], t[2]);
            +                        }
            +                    } else if (command == "r") {
            +                        if (tlen == 2) {
            +                            bb = bb || el.getBBox(1);
            +                            m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2);
            +                            deg += t[1];
            +                        } else if (tlen == 4) {
            +                            if (absolute) {
            +                                x2 = inver.x(t[2], t[3]);
            +                                y2 = inver.y(t[2], t[3]);
            +                                m.rotate(t[1], x2, y2);
            +                            } else {
            +                                m.rotate(t[1], t[2], t[3]);
            +                            }
            +                            deg += t[1];
            +                        }
            +                    } else if (command == "s") {
            +                        if (tlen == 2 || tlen == 3) {
            +                            bb = bb || el.getBBox(1);
            +                            m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2);
            +                            sx *= t[1];
            +                            sy *= t[tlen - 1];
            +                        } else if (tlen == 5) {
            +                            if (absolute) {
            +                                x2 = inver.x(t[3], t[4]);
            +                                y2 = inver.y(t[3], t[4]);
            +                                m.scale(t[1], t[2], x2, y2);
            +                            } else {
            +                                m.scale(t[1], t[2], t[3], t[4]);
            +                            }
            +                            sx *= t[1];
            +                            sy *= t[2];
            +                        }
            +                    } else if (command == "m" && tlen == 7) {
            +                        m.add(t[1], t[2], t[3], t[4], t[5], t[6]);
            +                    }
            +                    _.dirtyT = 1;
            +                    el.matrix = m;
            +                }
            +            }
            +
            +            /*\
            +             * Element.matrix
            +             [ property (object) ]
            +             **
            +             * Keeps @Matrix object, which represents element transformation
            +            \*/
            +            el.matrix = m;
            +
            +            _.sx = sx;
            +            _.sy = sy;
            +            _.deg = deg;
            +            _.dx = dx = m.e;
            +            _.dy = dy = m.f;
            +
            +            if (sx == 1 && sy == 1 && !deg && _.bbox) {
            +                _.bbox.x += +dx;
            +                _.bbox.y += +dy;
            +            } else {
            +                _.dirtyT = 1;
            +            }
            +        },
            +        getEmpty = function (item) {
            +            var l = item[0];
            +            switch (l.toLowerCase()) {
            +                case "t": return [l, 0, 0];
            +                case "m": return [l, 1, 0, 0, 1, 0, 0];
            +                case "r": if (item.length == 4) {
            +                    return [l, 0, item[2], item[3]];
            +                } else {
            +                    return [l, 0];
            +                }
            +                case "s": if (item.length == 5) {
            +                    return [l, 1, 1, item[3], item[4]];
            +                } else if (item.length == 3) {
            +                    return [l, 1, 1];
            +                } else {
            +                    return [l, 1];
            +                }
            +            }
            +        },
            +        equaliseTransform = R._equaliseTransform = function (t1, t2) {
            +            t2 = Str(t2).replace(/\.{3}|\u2026/g, t1);
            +            t1 = R.parseTransformString(t1) || [];
            +            t2 = R.parseTransformString(t2) || [];
            +            var maxlength = mmax(t1.length, t2.length),
            +                from = [],
            +                to = [],
            +                i = 0, j, jj,
            +                tt1, tt2;
            +            for (; i < maxlength; i++) {
            +                tt1 = t1[i] || getEmpty(t2[i]);
            +                tt2 = t2[i] || getEmpty(tt1);
            +                if ((tt1[0] != tt2[0]) ||
            +                    (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) ||
            +                    (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4]))
            +                    ) {
            +                    return;
            +                }
            +                from[i] = [];
            +                to[i] = [];
            +                for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) {
            +                    j in tt1 && (from[i][j] = tt1[j]);
            +                    j in tt2 && (to[i][j] = tt2[j]);
            +                }
            +            }
            +            return {
            +                from: from,
            +                to: to
            +            };
            +        };
            +    R._getContainer = function (x, y, w, h) {
            +        var container;
            +        container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
            +        if (container == null) {
            +            return;
            +        }
            +        if (container.tagName) {
            +            if (y == null) {
            +                return {
            +                    container: container,
            +                    width: container.style.pixelWidth || container.offsetWidth,
            +                    height: container.style.pixelHeight || container.offsetHeight
            +                };
            +            } else {
            +                return {
            +                    container: container,
            +                    width: y,
            +                    height: w
            +                };
            +            }
            +        }
            +        return {
            +            container: 1,
            +            x: x,
            +            y: y,
            +            width: w,
            +            height: h
            +        };
            +    };
            +    /*\
            +     * Raphael.pathToRelative
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Converts path to relative form
            +     > Parameters
            +     - pathString (string|array) path string or array of segments
            +     = (array) array of segments.
            +    \*/
            +    R.pathToRelative = pathToRelative;
            +    R._engine = {};
            +    /*\
            +     * Raphael.path2curve
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Converts path to a new path where all segments are cubic bezier curves.
            +     > Parameters
            +     - pathString (string|array) path string or array of segments
            +     = (array) array of segments.
            +    \*/
            +    R.path2curve = path2curve;
            +    /*\
            +     * Raphael.matrix
            +     [ method ]
            +     **
            +     * Utility method
            +     **
            +     * Returns matrix based on given parameters.
            +     > Parameters
            +     - a (number)
            +     - b (number)
            +     - c (number)
            +     - d (number)
            +     - e (number)
            +     - f (number)
            +     = (object) @Matrix
            +    \*/
            +    R.matrix = function (a, b, c, d, e, f) {
            +        return new Matrix(a, b, c, d, e, f);
            +    };
            +    function Matrix(a, b, c, d, e, f) {
            +        if (a != null) {
            +            this.a = +a;
            +            this.b = +b;
            +            this.c = +c;
            +            this.d = +d;
            +            this.e = +e;
            +            this.f = +f;
            +        } else {
            +            this.a = 1;
            +            this.b = 0;
            +            this.c = 0;
            +            this.d = 1;
            +            this.e = 0;
            +            this.f = 0;
            +        }
            +    }
            +    (function (matrixproto) {
            +        /*\
            +         * Matrix.add
            +         [ method ]
            +         **
            +         * Adds given matrix to existing one.
            +         > Parameters
            +         - a (number)
            +         - b (number)
            +         - c (number)
            +         - d (number)
            +         - e (number)
            +         - f (number)
            +         or
            +         - matrix (object) @Matrix
            +        \*/
            +        matrixproto.add = function (a, b, c, d, e, f) {
            +            var out = [[], [], []],
            +                m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],
            +                matrix = [[a, c, e], [b, d, f], [0, 0, 1]],
            +                x, y, z, res;
            +
            +            if (a && a instanceof Matrix) {
            +                matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];
            +            }
            +
            +            for (x = 0; x < 3; x++) {
            +                for (y = 0; y < 3; y++) {
            +                    res = 0;
            +                    for (z = 0; z < 3; z++) {
            +                        res += m[x][z] * matrix[z][y];
            +                    }
            +                    out[x][y] = res;
            +                }
            +            }
            +            this.a = out[0][0];
            +            this.b = out[1][0];
            +            this.c = out[0][1];
            +            this.d = out[1][1];
            +            this.e = out[0][2];
            +            this.f = out[1][2];
            +        };
            +        /*\
            +         * Matrix.invert
            +         [ method ]
            +         **
            +         * Returns inverted version of the matrix
            +         = (object) @Matrix
            +        \*/
            +        matrixproto.invert = function () {
            +            var me = this,
            +                x = me.a * me.d - me.b * me.c;
            +            return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x);
            +        };
            +        /*\
            +         * Matrix.clone
            +         [ method ]
            +         **
            +         * Returns copy of the matrix
            +         = (object) @Matrix
            +        \*/
            +        matrixproto.clone = function () {
            +            return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);
            +        };
            +        /*\
            +         * Matrix.translate
            +         [ method ]
            +         **
            +         * Translate the matrix
            +         > Parameters
            +         - x (number)
            +         - y (number)
            +        \*/
            +        matrixproto.translate = function (x, y) {
            +            this.add(1, 0, 0, 1, x, y);
            +        };
            +        /*\
            +         * Matrix.scale
            +         [ method ]
            +         **
            +         * Scales the matrix
            +         > Parameters
            +         - x (number)
            +         - y (number) #optional
            +         - cx (number) #optional
            +         - cy (number) #optional
            +        \*/
            +        matrixproto.scale = function (x, y, cx, cy) {
            +            y == null && (y = x);
            +            (cx || cy) && this.add(1, 0, 0, 1, cx, cy);
            +            this.add(x, 0, 0, y, 0, 0);
            +            (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);
            +        };
            +        /*\
            +         * Matrix.rotate
            +         [ method ]
            +         **
            +         * Rotates the matrix
            +         > Parameters
            +         - a (number)
            +         - x (number)
            +         - y (number)
            +        \*/
            +        matrixproto.rotate = function (a, x, y) {
            +            a = R.rad(a);
            +            x = x || 0;
            +            y = y || 0;
            +            var cos = +math.cos(a).toFixed(9),
            +                sin = +math.sin(a).toFixed(9);
            +            this.add(cos, sin, -sin, cos, x, y);
            +            this.add(1, 0, 0, 1, -x, -y);
            +        };
            +        /*\
            +         * Matrix.x
            +         [ method ]
            +         **
            +         * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y
            +         > Parameters
            +         - x (number)
            +         - y (number)
            +         = (number) x
            +        \*/
            +        matrixproto.x = function (x, y) {
            +            return x * this.a + y * this.c + this.e;
            +        };
            +        /*\
            +         * Matrix.y
            +         [ method ]
            +         **
            +         * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x
            +         > Parameters
            +         - x (number)
            +         - y (number)
            +         = (number) y
            +        \*/
            +        matrixproto.y = function (x, y) {
            +            return x * this.b + y * this.d + this.f;
            +        };
            +        matrixproto.get = function (i) {
            +            return +this[Str.fromCharCode(97 + i)].toFixed(4);
            +        };
            +        matrixproto.toString = function () {
            +            return R.svg ?
            +                "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" :
            +                [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join();
            +        };
            +        matrixproto.toFilter = function () {
            +            return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) +
            +                ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) +
            +                ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')";
            +        };
            +        matrixproto.offset = function () {
            +            return [this.e.toFixed(4), this.f.toFixed(4)];
            +        };
            +        function norm(a) {
            +            return a[0] * a[0] + a[1] * a[1];
            +        }
            +        function normalize(a) {
            +            var mag = math.sqrt(norm(a));
            +            a[0] && (a[0] /= mag);
            +            a[1] && (a[1] /= mag);
            +        }
            +        /*\
            +         * Matrix.split
            +         [ method ]
            +         **
            +         * Splits matrix into primitive transformations
            +         = (object) in format:
            +         o dx (number) translation by x
            +         o dy (number) translation by y
            +         o scalex (number) scale by x
            +         o scaley (number) scale by y
            +         o shear (number) shear
            +         o rotate (number) rotation in deg
            +         o isSimple (boolean) could it be represented via simple transformations
            +        \*/
            +        matrixproto.split = function () {
            +            var out = {};
            +            // translation
            +            out.dx = this.e;
            +            out.dy = this.f;
            +
            +            // scale and shear
            +            var row = [[this.a, this.c], [this.b, this.d]];
            +            out.scalex = math.sqrt(norm(row[0]));
            +            normalize(row[0]);
            +
            +            out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1];
            +            row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear];
            +
            +            out.scaley = math.sqrt(norm(row[1]));
            +            normalize(row[1]);
            +            out.shear /= out.scaley;
            +
            +            // rotation
            +            var sin = -row[0][1],
            +                cos = row[1][1];
            +            if (cos < 0) {
            +                out.rotate = R.deg(math.acos(cos));
            +                if (sin < 0) {
            +                    out.rotate = 360 - out.rotate;
            +                }
            +            } else {
            +                out.rotate = R.deg(math.asin(sin));
            +            }
            +
            +            out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate);
            +            out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate;
            +            out.noRotation = !+out.shear.toFixed(9) && !out.rotate;
            +            return out;
            +        };
            +        /*\
            +         * Matrix.toTransformString
            +         [ method ]
            +         **
            +         * Return transform string that represents given matrix
            +         = (string) transform string
            +        \*/
            +        matrixproto.toTransformString = function (shorter) {
            +            var s = shorter || this[split]();
            +            if (s.isSimple) {
            +                s.scalex = +s.scalex.toFixed(4);
            +                s.scaley = +s.scaley.toFixed(4);
            +                s.rotate = +s.rotate.toFixed(4);
            +                return  (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) +
            +                        (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) +
            +                        (s.rotate ? "r" + [s.rotate, 0, 0] : E);
            +            } else {
            +                return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];
            +            }
            +        };
            +    })(Matrix.prototype);
            +
            +    // WebKit rendering bug workaround method
            +    var version = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/);
            +    if ((navigator.vendor == "Apple Computer, Inc.") && (version && version[1] < 4 || navigator.platform.slice(0, 2) == "iP") ||
            +        (navigator.vendor == "Google Inc." && version && version[1] < 8)) {
            +        /*\
            +         * Paper.safari
            +         [ method ]
            +         **
            +         * There is an inconvenient rendering bug in Safari (WebKit):
            +         * sometimes the rendering should be forced.
            +         * This method should help with dealing with this bug.
            +        \*/
            +        paperproto.safari = function () {
            +            var rect = this.rect(-99, -99, this.width + 99, this.height + 99).attr({stroke: "none"});
            +            setTimeout(function () {rect.remove();});
            +        };
            +    } else {
            +        paperproto.safari = fun;
            +    }
            +
            +    var preventDefault = function () {
            +        this.returnValue = false;
            +    },
            +    preventTouch = function () {
            +        return this.originalEvent.preventDefault();
            +    },
            +    stopPropagation = function () {
            +        this.cancelBubble = true;
            +    },
            +    stopTouch = function () {
            +        return this.originalEvent.stopPropagation();
            +    },
            +    getEventPosition = function (e) {
            +        var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
            +            scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;
            +
            +        return {
            +            x: e.clientX + scrollX,
            +            y: e.clientY + scrollY
            +        };
            +    },
            +    addEvent = (function () {
            +        if (g.doc.addEventListener) {
            +            return function (obj, type, fn, element) {
            +                var f = function (e) {
            +                    var pos = getEventPosition(e);
            +                    return fn.call(element, e, pos.x, pos.y);
            +                };
            +                obj.addEventListener(type, f, false);
            +
            +                if (supportsTouch && touchMap[type]) {
            +                    var _f = function (e) {
            +                        var pos = getEventPosition(e),
            +                            olde = e;
            +
            +                        for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {
            +                            if (e.targetTouches[i].target == obj) {
            +                                e = e.targetTouches[i];
            +                                e.originalEvent = olde;
            +                                e.preventDefault = preventTouch;
            +                                e.stopPropagation = stopTouch;
            +                                break;
            +                            }
            +                        }
            +
            +                        return fn.call(element, e, pos.x, pos.y);
            +                    };
            +                    obj.addEventListener(touchMap[type], _f, false);
            +                }
            +
            +                return function () {
            +                    obj.removeEventListener(type, f, false);
            +
            +                    if (supportsTouch && touchMap[type])
            +                        obj.removeEventListener(touchMap[type], f, false);
            +
            +                    return true;
            +                };
            +            };
            +        } else if (g.doc.attachEvent) {
            +            return function (obj, type, fn, element) {
            +                var f = function (e) {
            +                    e = e || g.win.event;
            +                    var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
            +                        scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,
            +                        x = e.clientX + scrollX,
            +                        y = e.clientY + scrollY;
            +                    e.preventDefault = e.preventDefault || preventDefault;
            +                    e.stopPropagation = e.stopPropagation || stopPropagation;
            +                    return fn.call(element, e, x, y);
            +                };
            +                obj.attachEvent("on" + type, f);
            +                var detacher = function () {
            +                    obj.detachEvent("on" + type, f);
            +                    return true;
            +                };
            +                return detacher;
            +            };
            +        }
            +    })(),
            +    drag = [],
            +    dragMove = function (e) {
            +        var x = e.clientX,
            +            y = e.clientY,
            +            scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
            +            scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,
            +            dragi,
            +            j = drag.length;
            +        while (j--) {
            +            dragi = drag[j];
            +            if (supportsTouch && e.touches) {
            +                var i = e.touches.length,
            +                    touch;
            +                while (i--) {
            +                    touch = e.touches[i];
            +                    if (touch.identifier == dragi.el._drag.id) {
            +                        x = touch.clientX;
            +                        y = touch.clientY;
            +                        (e.originalEvent ? e.originalEvent : e).preventDefault();
            +                        break;
            +                    }
            +                }
            +            } else {
            +                e.preventDefault();
            +            }
            +            var node = dragi.el.node,
            +                o,
            +                next = node.nextSibling,
            +                parent = node.parentNode,
            +                display = node.style.display;
            +            g.win.opera && parent.removeChild(node);
            +            node.style.display = "none";
            +            o = dragi.el.paper.getElementByPoint(x, y);
            +            node.style.display = display;
            +            g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node));
            +            o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o);
            +            x += scrollX;
            +            y += scrollY;
            +            eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);
            +        }
            +    },
            +    dragUp = function (e) {
            +        R.unmousemove(dragMove).unmouseup(dragUp);
            +        var i = drag.length,
            +            dragi;
            +        while (i--) {
            +            dragi = drag[i];
            +            dragi.el._drag = {};
            +            eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);
            +        }
            +        drag = [];
            +    },
            +    /*\
            +     * Raphael.el
            +     [ property (object) ]
            +     **
            +     * You can add your own method to elements. This is usefull when you want to hack default functionality or
            +     * want to wrap some common transformation or attributes in one method. In difference to canvas methods,
            +     * you can redefine element method at any time. Expending element methods wouldn’t affect set.
            +     > Usage
            +     | Raphael.el.red = function () {
            +     |     this.attr({fill: "#f00"});
            +     | };
            +     | // then use it
            +     | paper.circle(100, 100, 20).red();
            +    \*/
            +    elproto = R.el = {};
            +    /*\
            +     * Element.click
            +     [ method ]
            +     **
            +     * Adds event handler for click for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.unclick
            +     [ method ]
            +     **
            +     * Removes event handler for click for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.dblclick
            +     [ method ]
            +     **
            +     * Adds event handler for double click for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.undblclick
            +     [ method ]
            +     **
            +     * Removes event handler for double click for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.mousedown
            +     [ method ]
            +     **
            +     * Adds event handler for mousedown for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.unmousedown
            +     [ method ]
            +     **
            +     * Removes event handler for mousedown for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.mousemove
            +     [ method ]
            +     **
            +     * Adds event handler for mousemove for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.unmousemove
            +     [ method ]
            +     **
            +     * Removes event handler for mousemove for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.mouseout
            +     [ method ]
            +     **
            +     * Adds event handler for mouseout for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.unmouseout
            +     [ method ]
            +     **
            +     * Removes event handler for mouseout for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.mouseover
            +     [ method ]
            +     **
            +     * Adds event handler for mouseover for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.unmouseover
            +     [ method ]
            +     **
            +     * Removes event handler for mouseover for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.mouseup
            +     [ method ]
            +     **
            +     * Adds event handler for mouseup for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.unmouseup
            +     [ method ]
            +     **
            +     * Removes event handler for mouseup for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.touchstart
            +     [ method ]
            +     **
            +     * Adds event handler for touchstart for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.untouchstart
            +     [ method ]
            +     **
            +     * Removes event handler for touchstart for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.touchmove
            +     [ method ]
            +     **
            +     * Adds event handler for touchmove for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.untouchmove
            +     [ method ]
            +     **
            +     * Removes event handler for touchmove for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.touchend
            +     [ method ]
            +     **
            +     * Adds event handler for touchend for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.untouchend
            +     [ method ]
            +     **
            +     * Removes event handler for touchend for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +
            +    /*\
            +     * Element.touchcancel
            +     [ method ]
            +     **
            +     * Adds event handler for touchcancel for the element.
            +     > Parameters
            +     - handler (function) handler for the event
            +     = (object) @Element
            +    \*/
            +    /*\
            +     * Element.untouchcancel
            +     [ method ]
            +     **
            +     * Removes event handler for touchcancel for the element.
            +     > Parameters
            +     - handler (function) #optional handler for the event
            +     = (object) @Element
            +    \*/
            +    for (var i = events.length; i--;) {
            +        (function (eventName) {
            +            R[eventName] = elproto[eventName] = function (fn, scope) {
            +                if (R.is(fn, "function")) {
            +                    this.events = this.events || [];
            +                    this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)});
            +                }
            +                return this;
            +            };
            +            R["un" + eventName] = elproto["un" + eventName] = function (fn) {
            +                var events = this.events || [],
            +                    l = events.length;
            +                while (l--){
            +                    if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) {
            +                        events[l].unbind();
            +                        events.splice(l, 1);
            +                        !events.length && delete this.events;
            +                    }
            +                }
            +                return this;
            +            };
            +        })(events[i]);
            +    }
            +
            +    /*\
            +     * Element.data
            +     [ method ]
            +     **
            +     * Adds or retrieves given value asociated with given key.
            +     ** 
            +     * See also @Element.removeData
            +     > Parameters
            +     - key (string) key to store data
            +     - value (any) #optional value to store
            +     = (object) @Element
            +     * or, if value is not specified:
            +     = (any) value
            +     * or, if key and value are not specified:
            +     = (object) Key/value pairs for all the data associated with the element.
            +     > Usage
            +     | for (var i = 0, i < 5, i++) {
            +     |     paper.circle(10 + 15 * i, 10, 10)
            +     |          .attr({fill: "#000"})
            +     |          .data("i", i)
            +     |          .click(function () {
            +     |             alert(this.data("i"));
            +     |          });
            +     | }
            +    \*/
            +    elproto.data = function (key, value) {
            +        var data = eldata[this.id] = eldata[this.id] || {};
            +        if (arguments.length == 0) {
            +            return data;
            +        }
            +        if (arguments.length == 1) {
            +            if (R.is(key, "object")) {
            +                for (var i in key) if (key[has](i)) {
            +                    this.data(i, key[i]);
            +                }
            +                return this;
            +            }
            +            eve("raphael.data.get." + this.id, this, data[key], key);
            +            return data[key];
            +        }
            +        data[key] = value;
            +        eve("raphael.data.set." + this.id, this, value, key);
            +        return this;
            +    };
            +    /*\
            +     * Element.removeData
            +     [ method ]
            +     **
            +     * Removes value associated with an element by given key.
            +     * If key is not provided, removes all the data of the element.
            +     > Parameters
            +     - key (string) #optional key
            +     = (object) @Element
            +    \*/
            +    elproto.removeData = function (key) {
            +        if (key == null) {
            +            eldata[this.id] = {};
            +        } else {
            +            eldata[this.id] && delete eldata[this.id][key];
            +        }
            +        return this;
            +    };
            +     /*\
            +     * Element.getData
            +     [ method ]
            +     **
            +     * Retrieves the element data
            +     = (object) data
            +    \*/
            +    elproto.getData = function () {
            +        return clone(eldata[this.id] || {});
            +    };
            +    /*\
            +     * Element.hover
            +     [ method ]
            +     **
            +     * Adds event handlers for hover for the element.
            +     > Parameters
            +     - f_in (function) handler for hover in
            +     - f_out (function) handler for hover out
            +     - icontext (object) #optional context for hover in handler
            +     - ocontext (object) #optional context for hover out handler
            +     = (object) @Element
            +    \*/
            +    elproto.hover = function (f_in, f_out, scope_in, scope_out) {
            +        return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);
            +    };
            +    /*\
            +     * Element.unhover
            +     [ method ]
            +     **
            +     * Removes event handlers for hover for the element.
            +     > Parameters
            +     - f_in (function) handler for hover in
            +     - f_out (function) handler for hover out
            +     = (object) @Element
            +    \*/
            +    elproto.unhover = function (f_in, f_out) {
            +        return this.unmouseover(f_in).unmouseout(f_out);
            +    };
            +    var draggable = [];
            +    /*\
            +     * Element.drag
            +     [ method ]
            +     **
            +     * Adds event handlers for drag of the element.
            +     > Parameters
            +     - onmove (function) handler for moving
            +     - onstart (function) handler for drag start
            +     - onend (function) handler for drag end
            +     - mcontext (object) #optional context for moving handler
            +     - scontext (object) #optional context for drag start handler
            +     - econtext (object) #optional context for drag end handler
            +     * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start, 
            +     * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element 
            +     * `drag.over.<id>` will be fired as well.
            +     *
            +     * Start event and start handler will be called in specified context or in context of the element with following parameters:
            +     o x (number) x position of the mouse
            +     o y (number) y position of the mouse
            +     o event (object) DOM event object
            +     * Move event and move handler will be called in specified context or in context of the element with following parameters:
            +     o dx (number) shift by x from the start point
            +     o dy (number) shift by y from the start point
            +     o x (number) x position of the mouse
            +     o y (number) y position of the mouse
            +     o event (object) DOM event object
            +     * End event and end handler will be called in specified context or in context of the element with following parameters:
            +     o event (object) DOM event object
            +     = (object) @Element
            +    \*/
            +    elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {
            +        function start(e) {
            +            (e.originalEvent || e).preventDefault();
            +            var x = e.clientX,
            +                y = e.clientY,
            +                scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
            +                scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;
            +            this._drag.id = e.identifier;
            +            if (supportsTouch && e.touches) {
            +                var i = e.touches.length, touch;
            +                while (i--) {
            +                    touch = e.touches[i];
            +                    this._drag.id = touch.identifier;
            +                    if (touch.identifier == this._drag.id) {
            +                        x = touch.clientX;
            +                        y = touch.clientY;
            +                        break;
            +                    }
            +                }
            +            }
            +            this._drag.x = x + scrollX;
            +            this._drag.y = y + scrollY;
            +            !drag.length && R.mousemove(dragMove).mouseup(dragUp);
            +            drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});
            +            onstart && eve.on("raphael.drag.start." + this.id, onstart);
            +            onmove && eve.on("raphael.drag.move." + this.id, onmove);
            +            onend && eve.on("raphael.drag.end." + this.id, onend);
            +            eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e);
            +        }
            +        this._drag = {};
            +        draggable.push({el: this, start: start});
            +        this.mousedown(start);
            +        return this;
            +    };
            +    /*\
            +     * Element.onDragOver
            +     [ method ]
            +     **
            +     * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id).
            +     > Parameters
            +     - f (function) handler for event, first argument would be the element you are dragging over
            +    \*/
            +    elproto.onDragOver = function (f) {
            +        f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id);
            +    };
            +    /*\
            +     * Element.undrag
            +     [ method ]
            +     **
            +     * Removes all drag event handlers from given element.
            +    \*/
            +    elproto.undrag = function () {
            +        var i = draggable.length;
            +        while (i--) if (draggable[i].el == this) {
            +            this.unmousedown(draggable[i].start);
            +            draggable.splice(i, 1);
            +            eve.unbind("raphael.drag.*." + this.id);
            +        }
            +        !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);
            +        drag = [];
            +    };
            +    /*\
            +     * Paper.circle
            +     [ method ]
            +     **
            +     * Draws a circle.
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate of the centre
            +     - y (number) y coordinate of the centre
            +     - r (number) radius
            +     = (object) Raphaël element object with type “circle”
            +     **
            +     > Usage
            +     | var c = paper.circle(50, 50, 40);
            +    \*/
            +    paperproto.circle = function (x, y, r) {
            +        var out = R._engine.circle(this, x || 0, y || 0, r || 0);
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Paper.rect
            +     [ method ]
            +     *
            +     * Draws a rectangle.
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate of the top left corner
            +     - y (number) y coordinate of the top left corner
            +     - width (number) width
            +     - height (number) height
            +     - r (number) #optional radius for rounded corners, default is 0
            +     = (object) Raphaël element object with type “rect”
            +     **
            +     > Usage
            +     | // regular rectangle
            +     | var c = paper.rect(10, 10, 50, 50);
            +     | // rectangle with rounded corners
            +     | var c = paper.rect(40, 40, 50, 50, 10);
            +    \*/
            +    paperproto.rect = function (x, y, w, h, r) {
            +        var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Paper.ellipse
            +     [ method ]
            +     **
            +     * Draws an ellipse.
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate of the centre
            +     - y (number) y coordinate of the centre
            +     - rx (number) horizontal radius
            +     - ry (number) vertical radius
            +     = (object) Raphaël element object with type “ellipse”
            +     **
            +     > Usage
            +     | var c = paper.ellipse(50, 50, 40, 20);
            +    \*/
            +    paperproto.ellipse = function (x, y, rx, ry) {
            +        var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Paper.path
            +     [ method ]
            +     **
            +     * Creates a path element by given path data string.
            +     > Parameters
            +     - pathString (string) #optional path string in SVG format.
            +     * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:
            +     | "M10,20L30,40"
            +     * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative.
            +     *
            +     # <p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path's data attribute's format are described in the SVG specification.">SVG path string format</a>.</p>
            +     # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody>
            +     # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr>
            +     # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr>
            +     # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr>
            +     # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr>
            +     # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr>
            +     # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr>
            +     # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr>
            +     # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr>
            +     # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr>
            +     # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr>
            +     # <tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table>
            +     * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.
            +     * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.
            +     > Usage
            +     | var c = paper.path("M10 10L90 90");
            +     | // draw a diagonal line:
            +     | // move to 10,10, line to 90,90
            +     * For example of path strings, check out these icons: http://raphaeljs.com/icons/
            +    \*/
            +    paperproto.path = function (pathString) {
            +        pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);
            +        var out = R._engine.path(R.format[apply](R, arguments), this);
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Paper.image
            +     [ method ]
            +     **
            +     * Embeds an image into the surface.
            +     **
            +     > Parameters
            +     **
            +     - src (string) URI of the source image
            +     - x (number) x coordinate position
            +     - y (number) y coordinate position
            +     - width (number) width of the image
            +     - height (number) height of the image
            +     = (object) Raphaël element object with type “image”
            +     **
            +     > Usage
            +     | var c = paper.image("apple.png", 10, 10, 80, 80);
            +    \*/
            +    paperproto.image = function (src, x, y, w, h) {
            +        var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0);
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Paper.text
            +     [ method ]
            +     **
            +     * Draws a text string. If you need line breaks, put “\n” in the string.
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate position
            +     - y (number) y coordinate position
            +     - text (string) The text string to draw
            +     = (object) Raphaël element object with type “text”
            +     **
            +     > Usage
            +     | var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!");
            +    \*/
            +    paperproto.text = function (x, y, text) {
            +        var out = R._engine.text(this, x || 0, y || 0, Str(text));
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Paper.set
            +     [ method ]
            +     **
            +     * Creates array-like object to keep and operate several elements at once.
            +     * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.
            +     * Sets act as pseudo elements — all methods available to an element can be used on a set.
            +     = (object) array-like object that represents set of elements
            +     **
            +     > Usage
            +     | var st = paper.set();
            +     | st.push(
            +     |     paper.circle(10, 10, 5),
            +     |     paper.circle(30, 10, 5)
            +     | );
            +     | st.attr({fill: "red"}); // changes the fill of both circles
            +    \*/
            +    paperproto.set = function (itemsArray) {
            +        !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length));
            +        var out = new Set(itemsArray);
            +        this.__set__ && this.__set__.push(out);
            +        out["paper"] = this;
            +        out["type"] = "set";
            +        return out;
            +    };
            +    /*\
            +     * Paper.setStart
            +     [ method ]
            +     **
            +     * Creates @Paper.set. All elements that will be created after calling this method and before calling
            +     * @Paper.setFinish will be added to the set.
            +     **
            +     > Usage
            +     | paper.setStart();
            +     | paper.circle(10, 10, 5),
            +     | paper.circle(30, 10, 5)
            +     | var st = paper.setFinish();
            +     | st.attr({fill: "red"}); // changes the fill of both circles
            +    \*/
            +    paperproto.setStart = function (set) {
            +        this.__set__ = set || this.set();
            +    };
            +    /*\
            +     * Paper.setFinish
            +     [ method ]
            +     **
            +     * See @Paper.setStart. This method finishes catching and returns resulting set.
            +     **
            +     = (object) set
            +    \*/
            +    paperproto.setFinish = function (set) {
            +        var out = this.__set__;
            +        delete this.__set__;
            +        return out;
            +    };
            +    /*\
            +     * Paper.setSize
            +     [ method ]
            +     **
            +     * If you need to change dimensions of the canvas call this method
            +     **
            +     > Parameters
            +     **
            +     - width (number) new width of the canvas
            +     - height (number) new height of the canvas
            +    \*/
            +    paperproto.setSize = function (width, height) {
            +        return R._engine.setSize.call(this, width, height);
            +    };
            +    /*\
            +     * Paper.setViewBox
            +     [ method ]
            +     **
            +     * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by 
            +     * specifying new boundaries.
            +     **
            +     > Parameters
            +     **
            +     - x (number) new x position, default is `0`
            +     - y (number) new y position, default is `0`
            +     - w (number) new width of the canvas
            +     - h (number) new height of the canvas
            +     - fit (boolean) `true` if you want graphics to fit into new boundary box
            +    \*/
            +    paperproto.setViewBox = function (x, y, w, h, fit) {
            +        return R._engine.setViewBox.call(this, x, y, w, h, fit);
            +    };
            +    /*\
            +     * Paper.top
            +     [ property ]
            +     **
            +     * Points to the topmost element on the paper
            +    \*/
            +    /*\
            +     * Paper.bottom
            +     [ property ]
            +     **
            +     * Points to the bottom element on the paper
            +    \*/
            +    paperproto.top = paperproto.bottom = null;
            +    /*\
            +     * Paper.raphael
            +     [ property ]
            +     **
            +     * Points to the @Raphael object/function
            +    \*/
            +    paperproto.raphael = R;
            +    var getOffset = function (elem) {
            +        var box = elem.getBoundingClientRect(),
            +            doc = elem.ownerDocument,
            +            body = doc.body,
            +            docElem = doc.documentElement,
            +            clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
            +            top  = box.top  + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop,
            +            left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft;
            +        return {
            +            y: top,
            +            x: left
            +        };
            +    };
            +    /*\
            +     * Paper.getElementByPoint
            +     [ method ]
            +     **
            +     * Returns you topmost element under given point.
            +     **
            +     = (object) Raphaël element object
            +     > Parameters
            +     **
            +     - x (number) x coordinate from the top left corner of the window
            +     - y (number) y coordinate from the top left corner of the window
            +     > Usage
            +     | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"});
            +    \*/
            +    paperproto.getElementByPoint = function (x, y) {
            +        var paper = this,
            +            svg = paper.canvas,
            +            target = g.doc.elementFromPoint(x, y);
            +        if (g.win.opera && target.tagName == "svg") {
            +            var so = getOffset(svg),
            +                sr = svg.createSVGRect();
            +            sr.x = x - so.x;
            +            sr.y = y - so.y;
            +            sr.width = sr.height = 1;
            +            var hits = svg.getIntersectionList(sr, null);
            +            if (hits.length) {
            +                target = hits[hits.length - 1];
            +            }
            +        }
            +        if (!target) {
            +            return null;
            +        }
            +        while (target.parentNode && target != svg.parentNode && !target.raphael) {
            +            target = target.parentNode;
            +        }
            +        target == paper.canvas.parentNode && (target = svg);
            +        target = target && target.raphael ? paper.getById(target.raphaelid) : null;
            +        return target;
            +    };
            +
            +    /*\
            +     * Paper.getElementsByBBox
            +     [ method ]
            +     **
            +     * Returns set of elements that have an intersecting bounding box
            +     **
            +     > Parameters
            +     **
            +     - bbox (object) bbox to check with
            +     = (object) @Set
            +     \*/
            +    paperproto.getElementsByBBox = function (bbox) {
            +        var set = this.set();
            +        this.forEach(function (el) {
            +            if (R.isBBoxIntersect(el.getBBox(), bbox)) {
            +                set.push(el);
            +            }
            +        });
            +        return set;
            +    };
            +
            +    /*\
            +     * Paper.getById
            +     [ method ]
            +     **
            +     * Returns you element by its internal ID.
            +     **
            +     > Parameters
            +     **
            +     - id (number) id
            +     = (object) Raphaël element object
            +    \*/
            +    paperproto.getById = function (id) {
            +        var bot = this.bottom;
            +        while (bot) {
            +            if (bot.id == id) {
            +                return bot;
            +            }
            +            bot = bot.next;
            +        }
            +        return null;
            +    };
            +    /*\
            +     * Paper.forEach
            +     [ method ]
            +     **
            +     * Executes given function for each element on the paper
            +     *
            +     * If callback function returns `false` it will stop loop running.
            +     **
            +     > Parameters
            +     **
            +     - callback (function) function to run
            +     - thisArg (object) context object for the callback
            +     = (object) Paper object
            +     > Usage
            +     | paper.forEach(function (el) {
            +     |     el.attr({ stroke: "blue" });
            +     | });
            +    \*/
            +    paperproto.forEach = function (callback, thisArg) {
            +        var bot = this.bottom;
            +        while (bot) {
            +            if (callback.call(thisArg, bot) === false) {
            +                return this;
            +            }
            +            bot = bot.next;
            +        }
            +        return this;
            +    };
            +    /*\
            +     * Paper.getElementsByPoint
            +     [ method ]
            +     **
            +     * Returns set of elements that have common point inside
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate of the point
            +     - y (number) y coordinate of the point
            +     = (object) @Set
            +    \*/
            +    paperproto.getElementsByPoint = function (x, y) {
            +        var set = this.set();
            +        this.forEach(function (el) {
            +            if (el.isPointInside(x, y)) {
            +                set.push(el);
            +            }
            +        });
            +        return set;
            +    };
            +    function x_y() {
            +        return this.x + S + this.y;
            +    }
            +    function x_y_w_h() {
            +        return this.x + S + this.y + S + this.width + " \xd7 " + this.height;
            +    }
            +    /*\
            +     * Element.isPointInside
            +     [ method ]
            +     **
            +     * Determine if given point is inside this element’s shape
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate of the point
            +     - y (number) y coordinate of the point
            +     = (boolean) `true` if point inside the shape
            +    \*/
            +    elproto.isPointInside = function (x, y) {
            +        var rp = this.realPath = getPath[this.type](this);
            +        if (this.attr('transform') && this.attr('transform').length) {
            +            rp = R.transformPath(rp, this.attr('transform'));
            +        }
            +        return R.isPointInsidePath(rp, x, y);
            +    };
            +    /*\
            +     * Element.getBBox
            +     [ method ]
            +     **
            +     * Return bounding box for a given element
            +     **
            +     > Parameters
            +     **
            +     - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.
            +     = (object) Bounding box object:
            +     o {
            +     o     x: (number) top left corner x
            +     o     y: (number) top left corner y
            +     o     x2: (number) bottom right corner x
            +     o     y2: (number) bottom right corner y
            +     o     width: (number) width
            +     o     height: (number) height
            +     o }
            +    \*/
            +    elproto.getBBox = function (isWithoutTransform) {
            +        if (this.removed) {
            +            return {};
            +        }
            +        var _ = this._;
            +        if (isWithoutTransform) {
            +            if (_.dirty || !_.bboxwt) {
            +                this.realPath = getPath[this.type](this);
            +                _.bboxwt = pathDimensions(this.realPath);
            +                _.bboxwt.toString = x_y_w_h;
            +                _.dirty = 0;
            +            }
            +            return _.bboxwt;
            +        }
            +        if (_.dirty || _.dirtyT || !_.bbox) {
            +            if (_.dirty || !this.realPath) {
            +                _.bboxwt = 0;
            +                this.realPath = getPath[this.type](this);
            +            }
            +            _.bbox = pathDimensions(mapPath(this.realPath, this.matrix));
            +            _.bbox.toString = x_y_w_h;
            +            _.dirty = _.dirtyT = 0;
            +        }
            +        return _.bbox;
            +    };
            +    /*\
            +     * Element.clone
            +     [ method ]
            +     **
            +     = (object) clone of a given element
            +     **
            +    \*/
            +    elproto.clone = function () {
            +        if (this.removed) {
            +            return null;
            +        }
            +        var out = this.paper[this.type]().attr(this.attr());
            +        this.__set__ && this.__set__.push(out);
            +        return out;
            +    };
            +    /*\
            +     * Element.glow
            +     [ method ]
            +     **
            +     * Return set of elements that create glow-like effect around given element. See @Paper.set.
            +     *
            +     * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.
            +     **
            +     > Parameters
            +     **
            +     - glow (object) #optional parameters object with all properties optional:
            +     o {
            +     o     width (number) size of the glow, default is `10`
            +     o     fill (boolean) will it be filled, default is `false`
            +     o     opacity (number) opacity, default is `0.5`
            +     o     offsetx (number) horizontal offset, default is `0`
            +     o     offsety (number) vertical offset, default is `0`
            +     o     color (string) glow colour, default is `black`
            +     o }
            +     = (object) @Paper.set of elements that represents glow
            +    \*/
            +    elproto.glow = function (glow) {
            +        if (this.type == "text") {
            +            return null;
            +        }
            +        glow = glow || {};
            +        var s = {
            +            width: (glow.width || 10) + (+this.attr("stroke-width") || 1),
            +            fill: glow.fill || false,
            +            opacity: glow.opacity || .5,
            +            offsetx: glow.offsetx || 0,
            +            offsety: glow.offsety || 0,
            +            color: glow.color || "#000"
            +        },
            +            c = s.width / 2,
            +            r = this.paper,
            +            out = r.set(),
            +            path = this.realPath || getPath[this.type](this);
            +        path = this.matrix ? mapPath(path, this.matrix) : path;
            +        for (var i = 1; i < c + 1; i++) {
            +            out.push(r.path(path).attr({
            +                stroke: s.color,
            +                fill: s.fill ? s.color : "none",
            +                "stroke-linejoin": "round",
            +                "stroke-linecap": "round",
            +                "stroke-width": +(s.width / c * i).toFixed(3),
            +                opacity: +(s.opacity / c).toFixed(3)
            +            }));
            +        }
            +        return out.insertBefore(this).translate(s.offsetx, s.offsety);
            +    };
            +    var curveslengths = {},
            +    getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {
            +        if (length == null) {
            +            return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);
            +        } else {
            +            return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));
            +        }
            +    },
            +    getLengthFactory = function (istotal, subpath) {
            +        return function (path, length, onlystart) {
            +            path = path2curve(path);
            +            var x, y, p, l, sp = "", subpaths = {}, point,
            +                len = 0;
            +            for (var i = 0, ii = path.length; i < ii; i++) {
            +                p = path[i];
            +                if (p[0] == "M") {
            +                    x = +p[1];
            +                    y = +p[2];
            +                } else {
            +                    l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);
            +                    if (len + l > length) {
            +                        if (subpath && !subpaths.start) {
            +                            point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);
            +                            sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];
            +                            if (onlystart) {return sp;}
            +                            subpaths.start = sp;
            +                            sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join();
            +                            len += l;
            +                            x = +p[5];
            +                            y = +p[6];
            +                            continue;
            +                        }
            +                        if (!istotal && !subpath) {
            +                            point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);
            +                            return {x: point.x, y: point.y, alpha: point.alpha};
            +                        }
            +                    }
            +                    len += l;
            +                    x = +p[5];
            +                    y = +p[6];
            +                }
            +                sp += p.shift() + p;
            +            }
            +            subpaths.end = sp;
            +            point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);
            +            point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha});
            +            return point;
            +        };
            +    };
            +    var getTotalLength = getLengthFactory(1),
            +        getPointAtLength = getLengthFactory(),
            +        getSubpathsAtLength = getLengthFactory(0, 1);
            +    /*\
            +     * Raphael.getTotalLength
            +     [ method ]
            +     **
            +     * Returns length of the given path in pixels.
            +     **
            +     > Parameters
            +     **
            +     - path (string) SVG path string.
            +     **
            +     = (number) length.
            +    \*/
            +    R.getTotalLength = getTotalLength;
            +    /*\
            +     * Raphael.getPointAtLength
            +     [ method ]
            +     **
            +     * Return coordinates of the point located at the given length on the given path.
            +     **
            +     > Parameters
            +     **
            +     - path (string) SVG path string
            +     - length (number)
            +     **
            +     = (object) representation of the point:
            +     o {
            +     o     x: (number) x coordinate
            +     o     y: (number) y coordinate
            +     o     alpha: (number) angle of derivative
            +     o }
            +    \*/
            +    R.getPointAtLength = getPointAtLength;
            +    /*\
            +     * Raphael.getSubpath
            +     [ method ]
            +     **
            +     * Return subpath of a given path from given length to given length.
            +     **
            +     > Parameters
            +     **
            +     - path (string) SVG path string
            +     - from (number) position of the start of the segment
            +     - to (number) position of the end of the segment
            +     **
            +     = (string) pathstring for the segment
            +    \*/
            +    R.getSubpath = function (path, from, to) {
            +        if (this.getTotalLength(path) - to < 1e-6) {
            +            return getSubpathsAtLength(path, from).end;
            +        }
            +        var a = getSubpathsAtLength(path, to, 1);
            +        return from ? getSubpathsAtLength(a, from).end : a;
            +    };
            +    /*\
            +     * Element.getTotalLength
            +     [ method ]
            +     **
            +     * Returns length of the path in pixels. Only works for element of “path” type.
            +     = (number) length.
            +    \*/
            +    elproto.getTotalLength = function () {
            +        var path = this.getPath();
            +        if (!path) {
            +            return;
            +        }
            +
            +        if (this.node.getTotalLength) {
            +            return this.node.getTotalLength();
            +        }
            +
            +        return getTotalLength(path);
            +    };
            +    /*\
            +     * Element.getPointAtLength
            +     [ method ]
            +     **
            +     * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.
            +     **
            +     > Parameters
            +     **
            +     - length (number)
            +     **
            +     = (object) representation of the point:
            +     o {
            +     o     x: (number) x coordinate
            +     o     y: (number) y coordinate
            +     o     alpha: (number) angle of derivative
            +     o }
            +    \*/
            +    elproto.getPointAtLength = function (length) {
            +        var path = this.getPath();
            +        if (!path) {
            +            return;
            +        }
            +
            +        return getPointAtLength(path, length);
            +    };
            +    /*\
            +     * Element.getPath
            +     [ method ]
            +     **
            +     * Returns path of the element. Only works for elements of “path” type and simple elements like circle.
            +     = (object) path
            +     **
            +    \*/
            +    elproto.getPath = function () {
            +        var path,
            +            getPath = R._getPath[this.type];
            +        
            +        if (this.type == "text" || this.type == "set") {
            +            return;
            +        }
            +
            +        if (getPath) {
            +            path = getPath(this);
            +        }
            +
            +        return path;
            +    };
            +    /*\
            +     * Element.getSubpath
            +     [ method ]
            +     **
            +     * Return subpath of a given element from given length to given length. Only works for element of “path” type.
            +     **
            +     > Parameters
            +     **
            +     - from (number) position of the start of the segment
            +     - to (number) position of the end of the segment
            +     **
            +     = (string) pathstring for the segment
            +    \*/
            +    elproto.getSubpath = function (from, to) {
            +        var path = this.getPath();
            +        if (!path) {
            +            return;
            +        }
            +
            +        return R.getSubpath(path, from, to);
            +    };
            +    /*\
            +     * Raphael.easing_formulas
            +     [ property ]
            +     **
            +     * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:
            +     # <ul>
            +     #     <li>“linear”</li>
            +     #     <li>“&lt;” or “easeIn” or “ease-in”</li>
            +     #     <li>“>” or “easeOut” or “ease-out”</li>
            +     #     <li>“&lt;>” or “easeInOut” or “ease-in-out”</li>
            +     #     <li>“backIn” or “back-in”</li>
            +     #     <li>“backOut” or “back-out”</li>
            +     #     <li>“elastic”</li>
            +     #     <li>“bounce”</li>
            +     # </ul>
            +     # <p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p>
            +    \*/
            +    var ef = R.easing_formulas = {
            +        linear: function (n) {
            +            return n;
            +        },
            +        "<": function (n) {
            +            return pow(n, 1.7);
            +        },
            +        ">": function (n) {
            +            return pow(n, .48);
            +        },
            +        "<>": function (n) {
            +            var q = .48 - n / 1.04,
            +                Q = math.sqrt(.1734 + q * q),
            +                x = Q - q,
            +                X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1),
            +                y = -Q - q,
            +                Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1),
            +                t = X + Y + .5;
            +            return (1 - t) * 3 * t * t + t * t * t;
            +        },
            +        backIn: function (n) {
            +            var s = 1.70158;
            +            return n * n * ((s + 1) * n - s);
            +        },
            +        backOut: function (n) {
            +            n = n - 1;
            +            var s = 1.70158;
            +            return n * n * ((s + 1) * n + s) + 1;
            +        },
            +        elastic: function (n) {
            +            if (n == !!n) {
            +                return n;
            +            }
            +            return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1;
            +        },
            +        bounce: function (n) {
            +            var s = 7.5625,
            +                p = 2.75,
            +                l;
            +            if (n < (1 / p)) {
            +                l = s * n * n;
            +            } else {
            +                if (n < (2 / p)) {
            +                    n -= (1.5 / p);
            +                    l = s * n * n + .75;
            +                } else {
            +                    if (n < (2.5 / p)) {
            +                        n -= (2.25 / p);
            +                        l = s * n * n + .9375;
            +                    } else {
            +                        n -= (2.625 / p);
            +                        l = s * n * n + .984375;
            +                    }
            +                }
            +            }
            +            return l;
            +        }
            +    };
            +    ef.easeIn = ef["ease-in"] = ef["<"];
            +    ef.easeOut = ef["ease-out"] = ef[">"];
            +    ef.easeInOut = ef["ease-in-out"] = ef["<>"];
            +    ef["back-in"] = ef.backIn;
            +    ef["back-out"] = ef.backOut;
            +
            +    var animationElements = [],
            +        requestAnimFrame = window.requestAnimationFrame       ||
            +                           window.webkitRequestAnimationFrame ||
            +                           window.mozRequestAnimationFrame    ||
            +                           window.oRequestAnimationFrame      ||
            +                           window.msRequestAnimationFrame     ||
            +                           function (callback) {
            +                               setTimeout(callback, 16);
            +                           },
            +        animation = function () {
            +            var Now = +new Date,
            +                l = 0;
            +            for (; l < animationElements.length; l++) {
            +                var e = animationElements[l];
            +                if (e.el.removed || e.paused) {
            +                    continue;
            +                }
            +                var time = Now - e.start,
            +                    ms = e.ms,
            +                    easing = e.easing,
            +                    from = e.from,
            +                    diff = e.diff,
            +                    to = e.to,
            +                    t = e.t,
            +                    that = e.el,
            +                    set = {},
            +                    now,
            +                    init = {},
            +                    key;
            +                if (e.initstatus) {
            +                    time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;
            +                    e.status = e.initstatus;
            +                    delete e.initstatus;
            +                    e.stop && animationElements.splice(l--, 1);
            +                } else {
            +                    e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;
            +                }
            +                if (time < 0) {
            +                    continue;
            +                }
            +                if (time < ms) {
            +                    var pos = easing(time / ms);
            +                    for (var attr in from) if (from[has](attr)) {
            +                        switch (availableAnimAttrs[attr]) {
            +                            case nu:
            +                                now = +from[attr] + pos * ms * diff[attr];
            +                                break;
            +                            case "colour":
            +                                now = "rgb(" + [
            +                                    upto255(round(from[attr].r + pos * ms * diff[attr].r)),
            +                                    upto255(round(from[attr].g + pos * ms * diff[attr].g)),
            +                                    upto255(round(from[attr].b + pos * ms * diff[attr].b))
            +                                ].join(",") + ")";
            +                                break;
            +                            case "path":
            +                                now = [];
            +                                for (var i = 0, ii = from[attr].length; i < ii; i++) {
            +                                    now[i] = [from[attr][i][0]];
            +                                    for (var j = 1, jj = from[attr][i].length; j < jj; j++) {
            +                                        now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];
            +                                    }
            +                                    now[i] = now[i].join(S);
            +                                }
            +                                now = now.join(S);
            +                                break;
            +                            case "transform":
            +                                if (diff[attr].real) {
            +                                    now = [];
            +                                    for (i = 0, ii = from[attr].length; i < ii; i++) {
            +                                        now[i] = [from[attr][i][0]];
            +                                        for (j = 1, jj = from[attr][i].length; j < jj; j++) {
            +                                            now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j];
            +                                        }
            +                                    }
            +                                } else {
            +                                    var get = function (i) {
            +                                        return +from[attr][i] + pos * ms * diff[attr][i];
            +                                    };
            +                                    // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]];
            +                                    now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]];
            +                                }
            +                                break;
            +                            case "csv":
            +                                if (attr == "clip-rect") {
            +                                    now = [];
            +                                    i = 4;
            +                                    while (i--) {
            +                                        now[i] = +from[attr][i] + pos * ms * diff[attr][i];
            +                                    }
            +                                }
            +                                break;
            +                            default:
            +                                var from2 = [][concat](from[attr]);
            +                                now = [];
            +                                i = that.paper.customAttributes[attr].length;
            +                                while (i--) {
            +                                    now[i] = +from2[i] + pos * ms * diff[attr][i];
            +                                }
            +                                break;
            +                        }
            +                        set[attr] = now;
            +                    }
            +                    that.attr(set);
            +                    (function (id, that, anim) {
            +                        setTimeout(function () {
            +                            eve("raphael.anim.frame." + id, that, anim);
            +                        });
            +                    })(that.id, that, e.anim);
            +                } else {
            +                    (function(f, el, a) {
            +                        setTimeout(function() {
            +                            eve("raphael.anim.frame." + el.id, el, a);
            +                            eve("raphael.anim.finish." + el.id, el, a);
            +                            R.is(f, "function") && f.call(el);
            +                        });
            +                    })(e.callback, that, e.anim);
            +                    that.attr(to);
            +                    animationElements.splice(l--, 1);
            +                    if (e.repeat > 1 && !e.next) {
            +                        for (key in to) if (to[has](key)) {
            +                            init[key] = e.totalOrigin[key];
            +                        }
            +                        e.el.attr(init);
            +                        runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);
            +                    }
            +                    if (e.next && !e.stop) {
            +                        runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);
            +                    }
            +                }
            +            }
            +            R.svg && that && that.paper && that.paper.safari();
            +            animationElements.length && requestAnimFrame(animation);
            +        },
            +        upto255 = function (color) {
            +            return color > 255 ? 255 : color < 0 ? 0 : color;
            +        };
            +    /*\
            +     * Element.animateWith
            +     [ method ]
            +     **
            +     * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.
            +     **
            +     > Parameters
            +     **
            +     - el (object) element to sync with
            +     - anim (object) animation to sync with
            +     - params (object) #optional final attributes for the element, see also @Element.attr
            +     - ms (number) #optional number of milliseconds for animation to run
            +     - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
            +     - callback (function) #optional callback function. Will be called at the end of animation.
            +     * or
            +     - element (object) element to sync with
            +     - anim (object) animation to sync with
            +     - animation (object) #optional animation object, see @Raphael.animation
            +     **
            +     = (object) original element
            +    \*/
            +    elproto.animateWith = function (el, anim, params, ms, easing, callback) {
            +        var element = this;
            +        if (element.removed) {
            +            callback && callback.call(element);
            +            return element;
            +        }
            +        var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),
            +            x, y;
            +        runAnimation(a, element, a.percents[0], null, element.attr());
            +        for (var i = 0, ii = animationElements.length; i < ii; i++) {
            +            if (animationElements[i].anim == anim && animationElements[i].el == el) {
            +                animationElements[ii - 1].start = animationElements[i].start;
            +                break;
            +            }
            +        }
            +        return element;
            +        // 
            +        // 
            +        // var a = params ? R.animation(params, ms, easing, callback) : anim,
            +        //     status = element.status(anim);
            +        // return this.animate(a).status(a, status * anim.ms / a.ms);
            +    };
            +    function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {
            +        var cx = 3 * p1x,
            +            bx = 3 * (p2x - p1x) - cx,
            +            ax = 1 - cx - bx,
            +            cy = 3 * p1y,
            +            by = 3 * (p2y - p1y) - cy,
            +            ay = 1 - cy - by;
            +        function sampleCurveX(t) {
            +            return ((ax * t + bx) * t + cx) * t;
            +        }
            +        function solve(x, epsilon) {
            +            var t = solveCurveX(x, epsilon);
            +            return ((ay * t + by) * t + cy) * t;
            +        }
            +        function solveCurveX(x, epsilon) {
            +            var t0, t1, t2, x2, d2, i;
            +            for(t2 = x, i = 0; i < 8; i++) {
            +                x2 = sampleCurveX(t2) - x;
            +                if (abs(x2) < epsilon) {
            +                    return t2;
            +                }
            +                d2 = (3 * ax * t2 + 2 * bx) * t2 + cx;
            +                if (abs(d2) < 1e-6) {
            +                    break;
            +                }
            +                t2 = t2 - x2 / d2;
            +            }
            +            t0 = 0;
            +            t1 = 1;
            +            t2 = x;
            +            if (t2 < t0) {
            +                return t0;
            +            }
            +            if (t2 > t1) {
            +                return t1;
            +            }
            +            while (t0 < t1) {
            +                x2 = sampleCurveX(t2);
            +                if (abs(x2 - x) < epsilon) {
            +                    return t2;
            +                }
            +                if (x > x2) {
            +                    t0 = t2;
            +                } else {
            +                    t1 = t2;
            +                }
            +                t2 = (t1 - t0) / 2 + t0;
            +            }
            +            return t2;
            +        }
            +        return solve(t, 1 / (200 * duration));
            +    }
            +    elproto.onAnimation = function (f) {
            +        f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id);
            +        return this;
            +    };
            +    function Animation(anim, ms) {
            +        var percents = [],
            +            newAnim = {};
            +        this.ms = ms;
            +        this.times = 1;
            +        if (anim) {
            +            for (var attr in anim) if (anim[has](attr)) {
            +                newAnim[toFloat(attr)] = anim[attr];
            +                percents.push(toFloat(attr));
            +            }
            +            percents.sort(sortByNumber);
            +        }
            +        this.anim = newAnim;
            +        this.top = percents[percents.length - 1];
            +        this.percents = percents;
            +    }
            +    /*\
            +     * Animation.delay
            +     [ method ]
            +     **
            +     * Creates a copy of existing animation object with given delay.
            +     **
            +     > Parameters
            +     **
            +     - delay (number) number of ms to pass between animation start and actual animation
            +     **
            +     = (object) new altered Animation object
            +     | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3);
            +     | circle1.animate(anim); // run the given animation immediately
            +     | circle2.animate(anim.delay(500)); // run the given animation after 500 ms
            +    \*/
            +    Animation.prototype.delay = function (delay) {
            +        var a = new Animation(this.anim, this.ms);
            +        a.times = this.times;
            +        a.del = +delay || 0;
            +        return a;
            +    };
            +    /*\
            +     * Animation.repeat
            +     [ method ]
            +     **
            +     * Creates a copy of existing animation object with given repetition.
            +     **
            +     > Parameters
            +     **
            +     - repeat (number) number iterations of animation. For infinite animation pass `Infinity`
            +     **
            +     = (object) new altered Animation object
            +    \*/
            +    Animation.prototype.repeat = function (times) {
            +        var a = new Animation(this.anim, this.ms);
            +        a.del = this.del;
            +        a.times = math.floor(mmax(times, 0)) || 1;
            +        return a;
            +    };
            +    function runAnimation(anim, element, percent, status, totalOrigin, times) {
            +        percent = toFloat(percent);
            +        var params,
            +            isInAnim,
            +            isInAnimSet,
            +            percents = [],
            +            next,
            +            prev,
            +            timestamp,
            +            ms = anim.ms,
            +            from = {},
            +            to = {},
            +            diff = {};
            +        if (status) {
            +            for (i = 0, ii = animationElements.length; i < ii; i++) {
            +                var e = animationElements[i];
            +                if (e.el.id == element.id && e.anim == anim) {
            +                    if (e.percent != percent) {
            +                        animationElements.splice(i, 1);
            +                        isInAnimSet = 1;
            +                    } else {
            +                        isInAnim = e;
            +                    }
            +                    element.attr(e.totalOrigin);
            +                    break;
            +                }
            +            }
            +        } else {
            +            status = +to; // NaN
            +        }
            +        for (var i = 0, ii = anim.percents.length; i < ii; i++) {
            +            if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) {
            +                percent = anim.percents[i];
            +                prev = anim.percents[i - 1] || 0;
            +                ms = ms / anim.top * (percent - prev);
            +                next = anim.percents[i + 1];
            +                params = anim.anim[percent];
            +                break;
            +            } else if (status) {
            +                element.attr(anim.anim[anim.percents[i]]);
            +            }
            +        }
            +        if (!params) {
            +            return;
            +        }
            +        if (!isInAnim) {
            +            for (var attr in params) if (params[has](attr)) {
            +                if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {
            +                    from[attr] = element.attr(attr);
            +                    (from[attr] == null) && (from[attr] = availableAttrs[attr]);
            +                    to[attr] = params[attr];
            +                    switch (availableAnimAttrs[attr]) {
            +                        case nu:
            +                            diff[attr] = (to[attr] - from[attr]) / ms;
            +                            break;
            +                        case "colour":
            +                            from[attr] = R.getRGB(from[attr]);
            +                            var toColour = R.getRGB(to[attr]);
            +                            diff[attr] = {
            +                                r: (toColour.r - from[attr].r) / ms,
            +                                g: (toColour.g - from[attr].g) / ms,
            +                                b: (toColour.b - from[attr].b) / ms
            +                            };
            +                            break;
            +                        case "path":
            +                            var pathes = path2curve(from[attr], to[attr]),
            +                                toPath = pathes[1];
            +                            from[attr] = pathes[0];
            +                            diff[attr] = [];
            +                            for (i = 0, ii = from[attr].length; i < ii; i++) {
            +                                diff[attr][i] = [0];
            +                                for (var j = 1, jj = from[attr][i].length; j < jj; j++) {
            +                                    diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms;
            +                                }
            +                            }
            +                            break;
            +                        case "transform":
            +                            var _ = element._,
            +                                eq = equaliseTransform(_[attr], to[attr]);
            +                            if (eq) {
            +                                from[attr] = eq.from;
            +                                to[attr] = eq.to;
            +                                diff[attr] = [];
            +                                diff[attr].real = true;
            +                                for (i = 0, ii = from[attr].length; i < ii; i++) {
            +                                    diff[attr][i] = [from[attr][i][0]];
            +                                    for (j = 1, jj = from[attr][i].length; j < jj; j++) {
            +                                        diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;
            +                                    }
            +                                }
            +                            } else {
            +                                var m = (element.matrix || new Matrix),
            +                                    to2 = {
            +                                        _: {transform: _.transform},
            +                                        getBBox: function () {
            +                                            return element.getBBox(1);
            +                                        }
            +                                    };
            +                                from[attr] = [
            +                                    m.a,
            +                                    m.b,
            +                                    m.c,
            +                                    m.d,
            +                                    m.e,
            +                                    m.f
            +                                ];
            +                                extractTransform(to2, to[attr]);
            +                                to[attr] = to2._.transform;
            +                                diff[attr] = [
            +                                    (to2.matrix.a - m.a) / ms,
            +                                    (to2.matrix.b - m.b) / ms,
            +                                    (to2.matrix.c - m.c) / ms,
            +                                    (to2.matrix.d - m.d) / ms,
            +                                    (to2.matrix.e - m.e) / ms,
            +                                    (to2.matrix.f - m.f) / ms
            +                                ];
            +                                // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy];
            +                                // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }};
            +                                // extractTransform(to2, to[attr]);
            +                                // diff[attr] = [
            +                                //     (to2._.sx - _.sx) / ms,
            +                                //     (to2._.sy - _.sy) / ms,
            +                                //     (to2._.deg - _.deg) / ms,
            +                                //     (to2._.dx - _.dx) / ms,
            +                                //     (to2._.dy - _.dy) / ms
            +                                // ];
            +                            }
            +                            break;
            +                        case "csv":
            +                            var values = Str(params[attr])[split](separator),
            +                                from2 = Str(from[attr])[split](separator);
            +                            if (attr == "clip-rect") {
            +                                from[attr] = from2;
            +                                diff[attr] = [];
            +                                i = from2.length;
            +                                while (i--) {
            +                                    diff[attr][i] = (values[i] - from[attr][i]) / ms;
            +                                }
            +                            }
            +                            to[attr] = values;
            +                            break;
            +                        default:
            +                            values = [][concat](params[attr]);
            +                            from2 = [][concat](from[attr]);
            +                            diff[attr] = [];
            +                            i = element.paper.customAttributes[attr].length;
            +                            while (i--) {
            +                                diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms;
            +                            }
            +                            break;
            +                    }
            +                }
            +            }
            +            var easing = params.easing,
            +                easyeasy = R.easing_formulas[easing];
            +            if (!easyeasy) {
            +                easyeasy = Str(easing).match(bezierrg);
            +                if (easyeasy && easyeasy.length == 5) {
            +                    var curve = easyeasy;
            +                    easyeasy = function (t) {
            +                        return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms);
            +                    };
            +                } else {
            +                    easyeasy = pipe;
            +                }
            +            }
            +            timestamp = params.start || anim.start || +new Date;
            +            e = {
            +                anim: anim,
            +                percent: percent,
            +                timestamp: timestamp,
            +                start: timestamp + (anim.del || 0),
            +                status: 0,
            +                initstatus: status || 0,
            +                stop: false,
            +                ms: ms,
            +                easing: easyeasy,
            +                from: from,
            +                diff: diff,
            +                to: to,
            +                el: element,
            +                callback: params.callback,
            +                prev: prev,
            +                next: next,
            +                repeat: times || anim.times,
            +                origin: element.attr(),
            +                totalOrigin: totalOrigin
            +            };
            +            animationElements.push(e);
            +            if (status && !isInAnim && !isInAnimSet) {
            +                e.stop = true;
            +                e.start = new Date - ms * status;
            +                if (animationElements.length == 1) {
            +                    return animation();
            +                }
            +            }
            +            if (isInAnimSet) {
            +                e.start = new Date - e.ms * status;
            +            }
            +            animationElements.length == 1 && requestAnimFrame(animation);
            +        } else {
            +            isInAnim.initstatus = status;
            +            isInAnim.start = new Date - isInAnim.ms * status;
            +        }
            +        eve("raphael.anim.start." + element.id, element, anim);
            +    }
            +    /*\
            +     * Raphael.animation
            +     [ method ]
            +     **
            +     * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods.
            +     * See also @Animation.delay and @Animation.repeat methods.
            +     **
            +     > Parameters
            +     **
            +     - params (object) final attributes for the element, see also @Element.attr
            +     - ms (number) number of milliseconds for animation to run
            +     - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
            +     - callback (function) #optional callback function. Will be called at the end of animation.
            +     **
            +     = (object) @Animation
            +    \*/
            +    R.animation = function (params, ms, easing, callback) {
            +        if (params instanceof Animation) {
            +            return params;
            +        }
            +        if (R.is(easing, "function") || !easing) {
            +            callback = callback || easing || null;
            +            easing = null;
            +        }
            +        params = Object(params);
            +        ms = +ms || 0;
            +        var p = {},
            +            json,
            +            attr;
            +        for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) {
            +            json = true;
            +            p[attr] = params[attr];
            +        }
            +        if (!json) {
            +            return new Animation(params, ms);
            +        } else {
            +            easing && (p.easing = easing);
            +            callback && (p.callback = callback);
            +            return new Animation({100: p}, ms);
            +        }
            +    };
            +    /*\
            +     * Element.animate
            +     [ method ]
            +     **
            +     * Creates and starts animation for given element.
            +     **
            +     > Parameters
            +     **
            +     - params (object) final attributes for the element, see also @Element.attr
            +     - ms (number) number of milliseconds for animation to run
            +     - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
            +     - callback (function) #optional callback function. Will be called at the end of animation.
            +     * or
            +     - animation (object) animation object, see @Raphael.animation
            +     **
            +     = (object) original element
            +    \*/
            +    elproto.animate = function (params, ms, easing, callback) {
            +        var element = this;
            +        if (element.removed) {
            +            callback && callback.call(element);
            +            return element;
            +        }
            +        var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);
            +        runAnimation(anim, element, anim.percents[0], null, element.attr());
            +        return element;
            +    };
            +    /*\
            +     * Element.setTime
            +     [ method ]
            +     **
            +     * Sets the status of animation of the element in milliseconds. Similar to @Element.status method.
            +     **
            +     > Parameters
            +     **
            +     - anim (object) animation object
            +     - value (number) number of milliseconds from the beginning of the animation
            +     **
            +     = (object) original element if `value` is specified
            +     * Note, that during animation following events are triggered:
            +     *
            +     * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`.
            +    \*/
            +    elproto.setTime = function (anim, value) {
            +        if (anim && value != null) {
            +            this.status(anim, mmin(value, anim.ms) / anim.ms);
            +        }
            +        return this;
            +    };
            +    /*\
            +     * Element.status
            +     [ method ]
            +     **
            +     * Gets or sets the status of animation of the element.
            +     **
            +     > Parameters
            +     **
            +     - anim (object) #optional animation object
            +     - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.
            +     **
            +     = (number) status
            +     * or
            +     = (array) status if `anim` is not specified. Array of objects in format:
            +     o {
            +     o     anim: (object) animation object
            +     o     status: (number) status
            +     o }
            +     * or
            +     = (object) original element if `value` is specified
            +    \*/
            +    elproto.status = function (anim, value) {
            +        var out = [],
            +            i = 0,
            +            len,
            +            e;
            +        if (value != null) {
            +            runAnimation(anim, this, -1, mmin(value, 1));
            +            return this;
            +        } else {
            +            len = animationElements.length;
            +            for (; i < len; i++) {
            +                e = animationElements[i];
            +                if (e.el.id == this.id && (!anim || e.anim == anim)) {
            +                    if (anim) {
            +                        return e.status;
            +                    }
            +                    out.push({
            +                        anim: e.anim,
            +                        status: e.status
            +                    });
            +                }
            +            }
            +            if (anim) {
            +                return 0;
            +            }
            +            return out;
            +        }
            +    };
            +    /*\
            +     * Element.pause
            +     [ method ]
            +     **
            +     * Stops animation of the element with ability to resume it later on.
            +     **
            +     > Parameters
            +     **
            +     - anim (object) #optional animation object
            +     **
            +     = (object) original element
            +    \*/
            +    elproto.pause = function (anim) {
            +        for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
            +            if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) {
            +                animationElements[i].paused = true;
            +            }
            +        }
            +        return this;
            +    };
            +    /*\
            +     * Element.resume
            +     [ method ]
            +     **
            +     * Resumes animation if it was paused with @Element.pause method.
            +     **
            +     > Parameters
            +     **
            +     - anim (object) #optional animation object
            +     **
            +     = (object) original element
            +    \*/
            +    elproto.resume = function (anim) {
            +        for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
            +            var e = animationElements[i];
            +            if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {
            +                delete e.paused;
            +                this.status(e.anim, e.status);
            +            }
            +        }
            +        return this;
            +    };
            +    /*\
            +     * Element.stop
            +     [ method ]
            +     **
            +     * Stops animation of the element.
            +     **
            +     > Parameters
            +     **
            +     - anim (object) #optional animation object
            +     **
            +     = (object) original element
            +    \*/
            +    elproto.stop = function (anim) {
            +        for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
            +            if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) {
            +                animationElements.splice(i--, 1);
            +            }
            +        }
            +        return this;
            +    };
            +    function stopAnimation(paper) {
            +        for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {
            +            animationElements.splice(i--, 1);
            +        }
            +    }
            +    eve.on("raphael.remove", stopAnimation);
            +    eve.on("raphael.clear", stopAnimation);
            +    elproto.toString = function () {
            +        return "Rapha\xebl\u2019s object";
            +    };
            +
            +    // Set
            +    var Set = function (items) {
            +        this.items = [];
            +        this.length = 0;
            +        this.type = "set";
            +        if (items) {
            +            for (var i = 0, ii = items.length; i < ii; i++) {
            +                if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) {
            +                    this[this.items.length] = this.items[this.items.length] = items[i];
            +                    this.length++;
            +                }
            +            }
            +        }
            +    },
            +    setproto = Set.prototype;
            +    /*\
            +     * Set.push
            +     [ method ]
            +     **
            +     * Adds each argument to the current set.
            +     = (object) original element
            +    \*/
            +    setproto.push = function () {
            +        var item,
            +            len;
            +        for (var i = 0, ii = arguments.length; i < ii; i++) {
            +            item = arguments[i];
            +            if (item && (item.constructor == elproto.constructor || item.constructor == Set)) {
            +                len = this.items.length;
            +                this[len] = this.items[len] = item;
            +                this.length++;
            +            }
            +        }
            +        return this;
            +    };
            +    /*\
            +     * Set.pop
            +     [ method ]
            +     **
            +     * Removes last element and returns it.
            +     = (object) element
            +    \*/
            +    setproto.pop = function () {
            +        this.length && delete this[this.length--];
            +        return this.items.pop();
            +    };
            +    /*\
            +     * Set.forEach
            +     [ method ]
            +     **
            +     * Executes given function for each element in the set.
            +     *
            +     * If function returns `false` it will stop loop running.
            +     **
            +     > Parameters
            +     **
            +     - callback (function) function to run
            +     - thisArg (object) context object for the callback
            +     = (object) Set object
            +    \*/
            +    setproto.forEach = function (callback, thisArg) {
            +        for (var i = 0, ii = this.items.length; i < ii; i++) {
            +            if (callback.call(thisArg, this.items[i], i) === false) {
            +                return this;
            +            }
            +        }
            +        return this;
            +    };
            +    for (var method in elproto) if (elproto[has](method)) {
            +        setproto[method] = (function (methodname) {
            +            return function () {
            +                var arg = arguments;
            +                return this.forEach(function (el) {
            +                    el[methodname][apply](el, arg);
            +                });
            +            };
            +        })(method);
            +    }
            +    setproto.attr = function (name, value) {
            +        if (name && R.is(name, array) && R.is(name[0], "object")) {
            +            for (var j = 0, jj = name.length; j < jj; j++) {
            +                this.items[j].attr(name[j]);
            +            }
            +        } else {
            +            for (var i = 0, ii = this.items.length; i < ii; i++) {
            +                this.items[i].attr(name, value);
            +            }
            +        }
            +        return this;
            +    };
            +    /*\
            +     * Set.clear
            +     [ method ]
            +     **
            +     * Removeds all elements from the set
            +    \*/
            +    setproto.clear = function () {
            +        while (this.length) {
            +            this.pop();
            +        }
            +    };
            +    /*\
            +     * Set.splice
            +     [ method ]
            +     **
            +     * Removes given element from the set
            +     **
            +     > Parameters
            +     **
            +     - index (number) position of the deletion
            +     - count (number) number of element to remove
            +     - insertion… (object) #optional elements to insert
            +     = (object) set elements that were deleted
            +    \*/
            +    setproto.splice = function (index, count, insertion) {
            +        index = index < 0 ? mmax(this.length + index, 0) : index;
            +        count = mmax(0, mmin(this.length - index, count));
            +        var tail = [],
            +            todel = [],
            +            args = [],
            +            i;
            +        for (i = 2; i < arguments.length; i++) {
            +            args.push(arguments[i]);
            +        }
            +        for (i = 0; i < count; i++) {
            +            todel.push(this[index + i]);
            +        }
            +        for (; i < this.length - index; i++) {
            +            tail.push(this[index + i]);
            +        }
            +        var arglen = args.length;
            +        for (i = 0; i < arglen + tail.length; i++) {
            +            this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen];
            +        }
            +        i = this.items.length = this.length -= count - arglen;
            +        while (this[i]) {
            +            delete this[i++];
            +        }
            +        return new Set(todel);
            +    };
            +    /*\
            +     * Set.exclude
            +     [ method ]
            +     **
            +     * Removes given element from the set
            +     **
            +     > Parameters
            +     **
            +     - element (object) element to remove
            +     = (boolean) `true` if object was found & removed from the set
            +    \*/
            +    setproto.exclude = function (el) {
            +        for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {
            +            this.splice(i, 1);
            +            return true;
            +        }
            +    };
            +    setproto.animate = function (params, ms, easing, callback) {
            +        (R.is(easing, "function") || !easing) && (callback = easing || null);
            +        var len = this.items.length,
            +            i = len,
            +            item,
            +            set = this,
            +            collector;
            +        if (!len) {
            +            return this;
            +        }
            +        callback && (collector = function () {
            +            !--len && callback.call(set);
            +        });
            +        easing = R.is(easing, string) ? easing : collector;
            +        var anim = R.animation(params, ms, easing, collector);
            +        item = this.items[--i].animate(anim);
            +        while (i--) {
            +            this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim);
            +            (this.items[i] && !this.items[i].removed) || len--;
            +        }
            +        return this;
            +    };
            +    setproto.insertAfter = function (el) {
            +        var i = this.items.length;
            +        while (i--) {
            +            this.items[i].insertAfter(el);
            +        }
            +        return this;
            +    };
            +    setproto.getBBox = function () {
            +        var x = [],
            +            y = [],
            +            x2 = [],
            +            y2 = [];
            +        for (var i = this.items.length; i--;) if (!this.items[i].removed) {
            +            var box = this.items[i].getBBox();
            +            x.push(box.x);
            +            y.push(box.y);
            +            x2.push(box.x + box.width);
            +            y2.push(box.y + box.height);
            +        }
            +        x = mmin[apply](0, x);
            +        y = mmin[apply](0, y);
            +        x2 = mmax[apply](0, x2);
            +        y2 = mmax[apply](0, y2);
            +        return {
            +            x: x,
            +            y: y,
            +            x2: x2,
            +            y2: y2,
            +            width: x2 - x,
            +            height: y2 - y
            +        };
            +    };
            +    setproto.clone = function (s) {
            +        s = this.paper.set();
            +        for (var i = 0, ii = this.items.length; i < ii; i++) {
            +            s.push(this.items[i].clone());
            +        }
            +        return s;
            +    };
            +    setproto.toString = function () {
            +        return "Rapha\xebl\u2018s set";
            +    };
            +
            +    setproto.glow = function(glowConfig) {
            +        var ret = this.paper.set();
            +        this.forEach(function(shape, index){
            +            var g = shape.glow(glowConfig);
            +            if(g != null){
            +                g.forEach(function(shape2, index2){
            +                    ret.push(shape2);
            +                });
            +            }
            +        });
            +        return ret;
            +    };
            +
            +
            +    /*\
            +     * Set.isPointInside
            +     [ method ]
            +     **
            +     * Determine if given point is inside this set’s elements
            +     **
            +     > Parameters
            +     **
            +     - x (number) x coordinate of the point
            +     - y (number) y coordinate of the point
            +     = (boolean) `true` if point is inside any of the set's elements
            +     \*/
            +    setproto.isPointInside = function (x, y) {
            +        var isPointInside = false;
            +        this.forEach(function (el) {
            +            if (el.isPointInside(x, y)) {
            +                console.log('runned');
            +                isPointInside = true;
            +                return false; // stop loop
            +            }
            +        });
            +        return isPointInside;
            +    };
            +
            +    /*\
            +     * Raphael.registerFont
            +     [ method ]
            +     **
            +     * Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.
            +     * Returns original parameter, so it could be used with chaining.
            +     # <a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a>
            +     **
            +     > Parameters
            +     **
            +     - font (object) the font to register
            +     = (object) the font you passed in
            +     > Usage
            +     | Cufon.registerFont(Raphael.registerFont({…}));
            +    \*/
            +    R.registerFont = function (font) {
            +        if (!font.face) {
            +            return font;
            +        }
            +        this.fonts = this.fonts || {};
            +        var fontcopy = {
            +                w: font.w,
            +                face: {},
            +                glyphs: {}
            +            },
            +            family = font.face["font-family"];
            +        for (var prop in font.face) if (font.face[has](prop)) {
            +            fontcopy.face[prop] = font.face[prop];
            +        }
            +        if (this.fonts[family]) {
            +            this.fonts[family].push(fontcopy);
            +        } else {
            +            this.fonts[family] = [fontcopy];
            +        }
            +        if (!font.svg) {
            +            fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10);
            +            for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {
            +                var path = font.glyphs[glyph];
            +                fontcopy.glyphs[glyph] = {
            +                    w: path.w,
            +                    k: {},
            +                    d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) {
            +                            return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M";
            +                        }) + "z"
            +                };
            +                if (path.k) {
            +                    for (var k in path.k) if (path[has](k)) {
            +                        fontcopy.glyphs[glyph].k[k] = path.k[k];
            +                    }
            +                }
            +            }
            +        }
            +        return font;
            +    };
            +    /*\
            +     * Paper.getFont
            +     [ method ]
            +     **
            +     * Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.
            +     **
            +     > Parameters
            +     **
            +     - family (string) font family name or any word from it
            +     - weight (string) #optional font weight
            +     - style (string) #optional font style
            +     - stretch (string) #optional font stretch
            +     = (object) the font object
            +     > Usage
            +     | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30);
            +    \*/
            +    paperproto.getFont = function (family, weight, style, stretch) {
            +        stretch = stretch || "normal";
            +        style = style || "normal";
            +        weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400;
            +        if (!R.fonts) {
            +            return;
            +        }
            +        var font = R.fonts[family];
            +        if (!font) {
            +            var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i");
            +            for (var fontName in R.fonts) if (R.fonts[has](fontName)) {
            +                if (name.test(fontName)) {
            +                    font = R.fonts[fontName];
            +                    break;
            +                }
            +            }
            +        }
            +        var thefont;
            +        if (font) {
            +            for (var i = 0, ii = font.length; i < ii; i++) {
            +                thefont = font[i];
            +                if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) {
            +                    break;
            +                }
            +            }
            +        }
            +        return thefont;
            +    };
            +    /*\
            +     * Paper.print
            +     [ method ]
            +     **
            +     * Creates path that represent given text written using given font at given position with given size.
            +     * Result of the method is path element that contains whole text as a separate path.
            +     **
            +     > Parameters
            +     **
            +     - x (number) x position of the text
            +     - y (number) y position of the text
            +     - string (string) text to print
            +     - font (object) font object, see @Paper.getFont
            +     - size (number) #optional size of the font, default is `16`
            +     - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"`
            +     - letter_spacing (number) #optional number in range `-1..1`, default is `0`
            +     - line_spacing (number) #optional number in range `1..3`, default is `1`
            +     = (object) resulting path element, which consist of all letters
            +     > Usage
            +     | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"});
            +    \*/
            +    paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) {
            +        origin = origin || "middle"; // baseline|middle
            +        letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);
            +        line_spacing = mmax(mmin(line_spacing || 1, 3), 1);
            +        var letters = Str(string)[split](E),
            +            shift = 0,
            +            notfirst = 0,
            +            path = E,
            +            scale;
            +        R.is(font, "string") && (font = this.getFont(font));
            +        if (font) {
            +            scale = (size || 16) / font.face["units-per-em"];
            +            var bb = font.face.bbox[split](separator),
            +                top = +bb[0],
            +                lineHeight = bb[3] - bb[1],
            +                shifty = 0,
            +                height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2);
            +            for (var i = 0, ii = letters.length; i < ii; i++) {
            +                if (letters[i] == "\n") {
            +                    shift = 0;
            +                    curr = 0;
            +                    notfirst = 0;
            +                    shifty += lineHeight * line_spacing;
            +                } else {
            +                    var prev = notfirst && font.glyphs[letters[i - 1]] || {},
            +                        curr = font.glyphs[letters[i]];
            +                    shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0;
            +                    notfirst = 1;
            +                }
            +                if (curr && curr.d) {
            +                    path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]);
            +                }
            +            }
            +        }
            +        return this.path(path).attr({
            +            fill: "#000",
            +            stroke: "none"
            +        });
            +    };
            +
            +    /*\
            +     * Paper.add
            +     [ method ]
            +     **
            +     * Imports elements in JSON array in format `{type: type, <attributes>}`
            +     **
            +     > Parameters
            +     **
            +     - json (array)
            +     = (object) resulting set of imported elements
            +     > Usage
            +     | paper.add([
            +     |     {
            +     |         type: "circle",
            +     |         cx: 10,
            +     |         cy: 10,
            +     |         r: 5
            +     |     },
            +     |     {
            +     |         type: "rect",
            +     |         x: 10,
            +     |         y: 10,
            +     |         width: 10,
            +     |         height: 10,
            +     |         fill: "#fc0"
            +     |     }
            +     | ]);
            +    \*/
            +    paperproto.add = function (json) {
            +        if (R.is(json, "array")) {
            +            var res = this.set(),
            +                i = 0,
            +                ii = json.length,
            +                j;
            +            for (; i < ii; i++) {
            +                j = json[i] || {};
            +                elements[has](j.type) && res.push(this[j.type]().attr(j));
            +            }
            +        }
            +        return res;
            +    };
            +
            +    /*\
            +     * Raphael.format
            +     [ method ]
            +     **
            +     * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument.
            +     **
            +     > Parameters
            +     **
            +     - token (string) string to format
            +     - … (string) rest of arguments will be treated as parameters for replacement
            +     = (string) formated string
            +     > Usage
            +     | var x = 10,
            +     |     y = 20,
            +     |     width = 40,
            +     |     height = 50;
            +     | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"
            +     | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width));
            +    \*/
            +    R.format = function (token, params) {
            +        var args = R.is(params, array) ? [0][concat](params) : arguments;
            +        token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) {
            +            return args[++i] == null ? E : args[i];
            +        }));
            +        return token || E;
            +    };
            +    /*\
            +     * Raphael.fullfill
            +     [ method ]
            +     **
            +     * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument.
            +     **
            +     > Parameters
            +     **
            +     - token (string) string to format
            +     - json (object) object which properties will be used as a replacement
            +     = (string) formated string
            +     > Usage
            +     | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"
            +     | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", {
            +     |     x: 10,
            +     |     y: 20,
            +     |     dim: {
            +     |         width: 40,
            +     |         height: 50,
            +     |         "negative width": -40
            +     |     }
            +     | }));
            +    \*/
            +    R.fullfill = (function () {
            +        var tokenRegex = /\{([^\}]+)\}/g,
            +            objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties
            +            replacer = function (all, key, obj) {
            +                var res = obj;
            +                key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {
            +                    name = name || quotedName;
            +                    if (res) {
            +                        if (name in res) {
            +                            res = res[name];
            +                        }
            +                        typeof res == "function" && isFunc && (res = res());
            +                    }
            +                });
            +                res = (res == null || res == obj ? all : res) + "";
            +                return res;
            +            };
            +        return function (str, obj) {
            +            return String(str).replace(tokenRegex, function (all, key) {
            +                return replacer(all, key, obj);
            +            });
            +        };
            +    })();
            +    /*\
            +     * Raphael.ninja
            +     [ method ]
            +     **
            +     * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method.
            +     * Beware, that in this case plugins could stop working, because they are depending on global variable existance.
            +     **
            +     = (object) Raphael object
            +     > Usage
            +     | (function (local_raphael) {
            +     |     var paper = local_raphael(10, 10, 320, 200);
            +     |     …
            +     | })(Raphael.ninja());
            +    \*/
            +    R.ninja = function () {
            +        oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
            +        return R;
            +    };
            +    /*\
            +     * Raphael.st
            +     [ property (object) ]
            +     **
            +     * You can add your own method to elements and sets. It is wise to add a set method for each element method
            +     * you added, so you will be able to call the same method on sets too.
            +     **
            +     * See also @Raphael.el.
            +     > Usage
            +     | Raphael.el.red = function () {
            +     |     this.attr({fill: "#f00"});
            +     | };
            +     | Raphael.st.red = function () {
            +     |     this.forEach(function (el) {
            +     |         el.red();
            +     |     });
            +     | };
            +     | // then use it
            +     | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();
            +    \*/
            +    R.st = setproto;
            +    // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
            +    (function (doc, loaded, f) {
            +        if (doc.readyState == null && doc.addEventListener){
            +            doc.addEventListener(loaded, f = function () {
            +                doc.removeEventListener(loaded, f, false);
            +                doc.readyState = "complete";
            +            }, false);
            +            doc.readyState = "loading";
            +        }
            +        function isLoaded() {
            +            (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload");
            +        }
            +        isLoaded();
            +    })(document, "DOMContentLoaded");
            +
            +    eve.on("raphael.DOMload", function () {
            +        loaded = true;
            +    });
            +
            +// ┌─────────────────────────────────────────────────────────────────────┐ \\
            +// │ Raphaël - JavaScript Vector Library                                 │ \\
            +// ├─────────────────────────────────────────────────────────────────────┤ \\
            +// │ SVG Module                                                          │ \\
            +// ├─────────────────────────────────────────────────────────────────────┤ \\
            +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
            +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
            +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
            +// └─────────────────────────────────────────────────────────────────────┘ \\
            +
            +(function(){
            +    if (!R.svg) {
            +        return;
            +    }
            +    var has = "hasOwnProperty",
            +        Str = String,
            +        toFloat = parseFloat,
            +        toInt = parseInt,
            +        math = Math,
            +        mmax = math.max,
            +        abs = math.abs,
            +        pow = math.pow,
            +        separator = /[, ]+/,
            +        eve = R.eve,
            +        E = "",
            +        S = " ";
            +    var xlink = "http://www.w3.org/1999/xlink",
            +        markers = {
            +            block: "M5,0 0,2.5 5,5z",
            +            classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z",
            +            diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z",
            +            open: "M6,1 1,3.5 6,6",
            +            oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"
            +        },
            +        markerCounter = {};
            +    R.toString = function () {
            +        return  "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version;
            +    };
            +    var $ = function (el, attr) {
            +        if (attr) {
            +            if (typeof el == "string") {
            +                el = $(el);
            +            }
            +            for (var key in attr) if (attr[has](key)) {
            +                if (key.substring(0, 6) == "xlink:") {
            +                    el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));
            +                } else {
            +                    el.setAttribute(key, Str(attr[key]));
            +                }
            +            }
            +        } else {
            +            el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el);
            +            el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)");
            +        }
            +        return el;
            +    },
            +    addGradientFill = function (element, gradient) {
            +        var type = "linear",
            +            id = element.id + gradient,
            +            fx = .5, fy = .5,
            +            o = element.node,
            +            SVG = element.paper,
            +            s = o.style,
            +            el = R._g.doc.getElementById(id);
            +        if (!el) {
            +            gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {
            +                type = "radial";
            +                if (_fx && _fy) {
            +                    fx = toFloat(_fx);
            +                    fy = toFloat(_fy);
            +                    var dir = ((fy > .5) * 2 - 1);
            +                    pow(fx - .5, 2) + pow(fy - .5, 2) > .25 &&
            +                        (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) &&
            +                        fy != .5 &&
            +                        (fy = fy.toFixed(5) - 1e-5 * dir);
            +                }
            +                return E;
            +            });
            +            gradient = gradient.split(/\s*\-\s*/);
            +            if (type == "linear") {
            +                var angle = gradient.shift();
            +                angle = -toFloat(angle);
            +                if (isNaN(angle)) {
            +                    return null;
            +                }
            +                var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],
            +                    max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1);
            +                vector[2] *= max;
            +                vector[3] *= max;
            +                if (vector[2] < 0) {
            +                    vector[0] = -vector[2];
            +                    vector[2] = 0;
            +                }
            +                if (vector[3] < 0) {
            +                    vector[1] = -vector[3];
            +                    vector[3] = 0;
            +                }
            +            }
            +            var dots = R._parseDots(gradient);
            +            if (!dots) {
            +                return null;
            +            }
            +            id = id.replace(/[\(\)\s,\xb0#]/g, "_");
            +            
            +            if (element.gradient && id != element.gradient.id) {
            +                SVG.defs.removeChild(element.gradient);
            +                delete element.gradient;
            +            }
            +
            +            if (!element.gradient) {
            +                el = $(type + "Gradient", {id: id});
            +                element.gradient = el;
            +                $(el, type == "radial" ? {
            +                    fx: fx,
            +                    fy: fy
            +                } : {
            +                    x1: vector[0],
            +                    y1: vector[1],
            +                    x2: vector[2],
            +                    y2: vector[3],
            +                    gradientTransform: element.matrix.invert()
            +                });
            +                SVG.defs.appendChild(el);
            +                for (var i = 0, ii = dots.length; i < ii; i++) {
            +                    el.appendChild($("stop", {
            +                        offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%",
            +                        "stop-color": dots[i].color || "#fff"
            +                    }));
            +                }
            +            }
            +        }
            +        $(o, {
            +            fill: "url(#" + id + ")",
            +            opacity: 1,
            +            "fill-opacity": 1
            +        });
            +        s.fill = E;
            +        s.opacity = 1;
            +        s.fillOpacity = 1;
            +        return 1;
            +    },
            +    updatePosition = function (o) {
            +        var bbox = o.getBBox(1);
            +        $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"});
            +    },
            +    addArrow = function (o, value, isEnd) {
            +        if (o.type == "path") {
            +            var values = Str(value).toLowerCase().split("-"),
            +                p = o.paper,
            +                se = isEnd ? "end" : "start",
            +                node = o.node,
            +                attrs = o.attrs,
            +                stroke = attrs["stroke-width"],
            +                i = values.length,
            +                type = "classic",
            +                from,
            +                to,
            +                dx,
            +                refX,
            +                attr,
            +                w = 3,
            +                h = 3,
            +                t = 5;
            +            while (i--) {
            +                switch (values[i]) {
            +                    case "block":
            +                    case "classic":
            +                    case "oval":
            +                    case "diamond":
            +                    case "open":
            +                    case "none":
            +                        type = values[i];
            +                        break;
            +                    case "wide": h = 5; break;
            +                    case "narrow": h = 2; break;
            +                    case "long": w = 5; break;
            +                    case "short": w = 2; break;
            +                }
            +            }
            +            if (type == "open") {
            +                w += 2;
            +                h += 2;
            +                t += 2;
            +                dx = 1;
            +                refX = isEnd ? 4 : 1;
            +                attr = {
            +                    fill: "none",
            +                    stroke: attrs.stroke
            +                };
            +            } else {
            +                refX = dx = w / 2;
            +                attr = {
            +                    fill: attrs.stroke,
            +                    stroke: "none"
            +                };
            +            }
            +            if (o._.arrows) {
            +                if (isEnd) {
            +                    o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;
            +                    o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;
            +                } else {
            +                    o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;
            +                    o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;
            +                }
            +            } else {
            +                o._.arrows = {};
            +            }
            +            if (type != "none") {
            +                var pathId = "raphael-marker-" + type,
            +                    markerId = "raphael-marker-" + se + type + w + h;
            +                if (!R._g.doc.getElementById(pathId)) {
            +                    p.defs.appendChild($($("path"), {
            +                        "stroke-linecap": "round",
            +                        d: markers[type],
            +                        id: pathId
            +                    }));
            +                    markerCounter[pathId] = 1;
            +                } else {
            +                    markerCounter[pathId]++;
            +                }
            +                var marker = R._g.doc.getElementById(markerId),
            +                    use;
            +                if (!marker) {
            +                    marker = $($("marker"), {
            +                        id: markerId,
            +                        markerHeight: h,
            +                        markerWidth: w,
            +                        orient: "auto",
            +                        refX: refX,
            +                        refY: h / 2
            +                    });
            +                    use = $($("use"), {
            +                        "xlink:href": "#" + pathId,
            +                        transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")",
            +                        "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4)
            +                    });
            +                    marker.appendChild(use);
            +                    p.defs.appendChild(marker);
            +                    markerCounter[markerId] = 1;
            +                } else {
            +                    markerCounter[markerId]++;
            +                    use = marker.getElementsByTagName("use")[0];
            +                }
            +                $(use, attr);
            +                var delta = dx * (type != "diamond" && type != "oval");
            +                if (isEnd) {
            +                    from = o._.arrows.startdx * stroke || 0;
            +                    to = R.getTotalLength(attrs.path) - delta * stroke;
            +                } else {
            +                    from = delta * stroke;
            +                    to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);
            +                }
            +                attr = {};
            +                attr["marker-" + se] = "url(#" + markerId + ")";
            +                if (to || from) {
            +                    attr.d = R.getSubpath(attrs.path, from, to);
            +                }
            +                $(node, attr);
            +                o._.arrows[se + "Path"] = pathId;
            +                o._.arrows[se + "Marker"] = markerId;
            +                o._.arrows[se + "dx"] = delta;
            +                o._.arrows[se + "Type"] = type;
            +                o._.arrows[se + "String"] = value;
            +            } else {
            +                if (isEnd) {
            +                    from = o._.arrows.startdx * stroke || 0;
            +                    to = R.getTotalLength(attrs.path) - from;
            +                } else {
            +                    from = 0;
            +                    to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);
            +                }
            +                o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)});
            +                delete o._.arrows[se + "Path"];
            +                delete o._.arrows[se + "Marker"];
            +                delete o._.arrows[se + "dx"];
            +                delete o._.arrows[se + "Type"];
            +                delete o._.arrows[se + "String"];
            +            }
            +            for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {
            +                var item = R._g.doc.getElementById(attr);
            +                item && item.parentNode.removeChild(item);
            +            }
            +        }
            +    },
            +    dasharray = {
            +        "": [0],
            +        "none": [0],
            +        "-": [3, 1],
            +        ".": [1, 1],
            +        "-.": [3, 1, 1, 1],
            +        "-..": [3, 1, 1, 1, 1, 1],
            +        ". ": [1, 3],
            +        "- ": [4, 3],
            +        "--": [8, 3],
            +        "- .": [4, 3, 1, 3],
            +        "--.": [8, 3, 1, 3],
            +        "--..": [8, 3, 1, 3, 1, 3]
            +    },
            +    addDashes = function (o, value, params) {
            +        value = dasharray[Str(value).toLowerCase()];
            +        if (value) {
            +            var width = o.attrs["stroke-width"] || "1",
            +                butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0,
            +                dashes = [],
            +                i = value.length;
            +            while (i--) {
            +                dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;
            +            }
            +            $(o.node, {"stroke-dasharray": dashes.join(",")});
            +        }
            +    },
            +    setFillAndStroke = function (o, params) {
            +        var node = o.node,
            +            attrs = o.attrs,
            +            vis = node.style.visibility;
            +        node.style.visibility = "hidden";
            +        for (var att in params) {
            +            if (params[has](att)) {
            +                if (!R._availableAttrs[has](att)) {
            +                    continue;
            +                }
            +                var value = params[att];
            +                attrs[att] = value;
            +                switch (att) {
            +                    case "blur":
            +                        o.blur(value);
            +                        break;
            +                    case "href":
            +                    case "title":
            +                        var hl = $("title");
            +                        var val = R._g.doc.createTextNode(value);
            +                        hl.appendChild(val);
            +                        node.appendChild(hl);
            +                        break;
            +                    case "target":
            +                        var pn = node.parentNode;
            +                        if (pn.tagName.toLowerCase() != "a") {
            +                            var hl = $("a");
            +                            pn.insertBefore(hl, node);
            +                            hl.appendChild(node);
            +                            pn = hl;
            +                        }
            +                        if (att == "target") {
            +                            pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value);
            +                        } else {
            +                            pn.setAttributeNS(xlink, att, value);
            +                        }
            +                        break;
            +                    case "cursor":
            +                        node.style.cursor = value;
            +                        break;
            +                    case "transform":
            +                        o.transform(value);
            +                        break;
            +                    case "arrow-start":
            +                        addArrow(o, value);
            +                        break;
            +                    case "arrow-end":
            +                        addArrow(o, value, 1);
            +                        break;
            +                    case "clip-rect":
            +                        var rect = Str(value).split(separator);
            +                        if (rect.length == 4) {
            +                            o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);
            +                            var el = $("clipPath"),
            +                                rc = $("rect");
            +                            el.id = R.createUUID();
            +                            $(rc, {
            +                                x: rect[0],
            +                                y: rect[1],
            +                                width: rect[2],
            +                                height: rect[3]
            +                            });
            +                            el.appendChild(rc);
            +                            o.paper.defs.appendChild(el);
            +                            $(node, {"clip-path": "url(#" + el.id + ")"});
            +                            o.clip = rc;
            +                        }
            +                        if (!value) {
            +                            var path = node.getAttribute("clip-path");
            +                            if (path) {
            +                                var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E));
            +                                clip && clip.parentNode.removeChild(clip);
            +                                $(node, {"clip-path": E});
            +                                delete o.clip;
            +                            }
            +                        }
            +                    break;
            +                    case "path":
            +                        if (o.type == "path") {
            +                            $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"});
            +                            o._.dirty = 1;
            +                            if (o._.arrows) {
            +                                "startString" in o._.arrows && addArrow(o, o._.arrows.startString);
            +                                "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);
            +                            }
            +                        }
            +                        break;
            +                    case "width":
            +                        node.setAttribute(att, value);
            +                        o._.dirty = 1;
            +                        if (attrs.fx) {
            +                            att = "x";
            +                            value = attrs.x;
            +                        } else {
            +                            break;
            +                        }
            +                    case "x":
            +                        if (attrs.fx) {
            +                            value = -attrs.x - (attrs.width || 0);
            +                        }
            +                    case "rx":
            +                        if (att == "rx" && o.type == "rect") {
            +                            break;
            +                        }
            +                    case "cx":
            +                        node.setAttribute(att, value);
            +                        o.pattern && updatePosition(o);
            +                        o._.dirty = 1;
            +                        break;
            +                    case "height":
            +                        node.setAttribute(att, value);
            +                        o._.dirty = 1;
            +                        if (attrs.fy) {
            +                            att = "y";
            +                            value = attrs.y;
            +                        } else {
            +                            break;
            +                        }
            +                    case "y":
            +                        if (attrs.fy) {
            +                            value = -attrs.y - (attrs.height || 0);
            +                        }
            +                    case "ry":
            +                        if (att == "ry" && o.type == "rect") {
            +                            break;
            +                        }
            +                    case "cy":
            +                        node.setAttribute(att, value);
            +                        o.pattern && updatePosition(o);
            +                        o._.dirty = 1;
            +                        break;
            +                    case "r":
            +                        if (o.type == "rect") {
            +                            $(node, {rx: value, ry: value});
            +                        } else {
            +                            node.setAttribute(att, value);
            +                        }
            +                        o._.dirty = 1;
            +                        break;
            +                    case "src":
            +                        if (o.type == "image") {
            +                            node.setAttributeNS(xlink, "href", value);
            +                        }
            +                        break;
            +                    case "stroke-width":
            +                        if (o._.sx != 1 || o._.sy != 1) {
            +                            value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;
            +                        }
            +                        if (o.paper._vbSize) {
            +                            value *= o.paper._vbSize;
            +                        }
            +                        node.setAttribute(att, value);
            +                        if (attrs["stroke-dasharray"]) {
            +                            addDashes(o, attrs["stroke-dasharray"], params);
            +                        }
            +                        if (o._.arrows) {
            +                            "startString" in o._.arrows && addArrow(o, o._.arrows.startString);
            +                            "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);
            +                        }
            +                        break;
            +                    case "stroke-dasharray":
            +                        addDashes(o, value, params);
            +                        break;
            +                    case "fill":
            +                        var isURL = Str(value).match(R._ISURL);
            +                        if (isURL) {
            +                            el = $("pattern");
            +                            var ig = $("image");
            +                            el.id = R.createUUID();
            +                            $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});
            +                            $(ig, {x: 0, y: 0, "xlink:href": isURL[1]});
            +                            el.appendChild(ig);
            +
            +                            (function (el) {
            +                                R._preload(isURL[1], function () {
            +                                    var w = this.offsetWidth,
            +                                        h = this.offsetHeight;
            +                                    $(el, {width: w, height: h});
            +                                    $(ig, {width: w, height: h});
            +                                    o.paper.safari();
            +                                });
            +                            })(el);
            +                            o.paper.defs.appendChild(el);
            +                            $(node, {fill: "url(#" + el.id + ")"});
            +                            o.pattern = el;
            +                            o.pattern && updatePosition(o);
            +                            break;
            +                        }
            +                        var clr = R.getRGB(value);
            +                        if (!clr.error) {
            +                            delete params.gradient;
            +                            delete attrs.gradient;
            +                            !R.is(attrs.opacity, "undefined") &&
            +                                R.is(params.opacity, "undefined") &&
            +                                $(node, {opacity: attrs.opacity});
            +                            !R.is(attrs["fill-opacity"], "undefined") &&
            +                                R.is(params["fill-opacity"], "undefined") &&
            +                                $(node, {"fill-opacity": attrs["fill-opacity"]});
            +                        } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) {
            +                            if ("opacity" in attrs || "fill-opacity" in attrs) {
            +                                var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E));
            +                                if (gradient) {
            +                                    var stops = gradient.getElementsByTagName("stop");
            +                                    $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)});
            +                                }
            +                            }
            +                            attrs.gradient = value;
            +                            attrs.fill = "none";
            +                            break;
            +                        }
            +                        clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});
            +                    case "stroke":
            +                        clr = R.getRGB(value);
            +                        node.setAttribute(att, clr.hex);
            +                        att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});
            +                        if (att == "stroke" && o._.arrows) {
            +                            "startString" in o._.arrows && addArrow(o, o._.arrows.startString);
            +                            "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);
            +                        }
            +                        break;
            +                    case "gradient":
            +                        (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value);
            +                        break;
            +                    case "opacity":
            +                        if (attrs.gradient && !attrs[has]("stroke-opacity")) {
            +                            $(node, {"stroke-opacity": value > 1 ? value / 100 : value});
            +                        }
            +                        // fall
            +                    case "fill-opacity":
            +                        if (attrs.gradient) {
            +                            gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E));
            +                            if (gradient) {
            +                                stops = gradient.getElementsByTagName("stop");
            +                                $(stops[stops.length - 1], {"stop-opacity": value});
            +                            }
            +                            break;
            +                        }
            +                    default:
            +                        att == "font-size" && (value = toInt(value, 10) + "px");
            +                        var cssrule = att.replace(/(\-.)/g, function (w) {
            +                            return w.substring(1).toUpperCase();
            +                        });
            +                        node.style[cssrule] = value;
            +                        o._.dirty = 1;
            +                        node.setAttribute(att, value);
            +                        break;
            +                }
            +            }
            +        }
            +
            +        tuneText(o, params);
            +        node.style.visibility = vis;
            +    },
            +    leading = 1.2,
            +    tuneText = function (el, params) {
            +        if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) {
            +            return;
            +        }
            +        var a = el.attrs,
            +            node = el.node,
            +            fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10;
            +
            +        if (params[has]("text")) {
            +            a.text = params.text;
            +            while (node.firstChild) {
            +                node.removeChild(node.firstChild);
            +            }
            +            var texts = Str(params.text).split("\n"),
            +                tspans = [],
            +                tspan;
            +            for (var i = 0, ii = texts.length; i < ii; i++) {
            +                tspan = $("tspan");
            +                i && $(tspan, {dy: fontSize * leading, x: a.x});
            +                tspan.appendChild(R._g.doc.createTextNode(texts[i]));
            +                node.appendChild(tspan);
            +                tspans[i] = tspan;
            +            }
            +        } else {
            +            tspans = node.getElementsByTagName("tspan");
            +            for (i = 0, ii = tspans.length; i < ii; i++) if (i) {
            +                $(tspans[i], {dy: fontSize * leading, x: a.x});
            +            } else {
            +                $(tspans[0], {dy: 0});
            +            }
            +        }
            +        $(node, {x: a.x, y: a.y});
            +        el._.dirty = 1;
            +        var bb = el._getBBox(),
            +            dif = a.y - (bb.y + bb.height / 2);
            +        dif && R.is(dif, "finite") && $(tspans[0], {dy: dif});
            +    },
            +    Element = function (node, svg) {
            +        var X = 0,
            +            Y = 0;
            +        /*\
            +         * Element.node
            +         [ property (object) ]
            +         **
            +         * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.
            +         **
            +         * Note: Don’t mess with it.
            +         > Usage
            +         | // draw a circle at coordinate 10,10 with radius of 10
            +         | var c = paper.circle(10, 10, 10);
            +         | c.node.onclick = function () {
            +         |     c.attr("fill", "red");
            +         | };
            +        \*/
            +        this[0] = this.node = node;
            +        /*\
            +         * Element.raphael
            +         [ property (object) ]
            +         **
            +         * Internal reference to @Raphael object. In case it is not available.
            +         > Usage
            +         | Raphael.el.red = function () {
            +         |     var hsb = this.paper.raphael.rgb2hsb(this.attr("fill"));
            +         |     hsb.h = 1;
            +         |     this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});
            +         | }
            +        \*/
            +        node.raphael = true;
            +        /*\
            +         * Element.id
            +         [ property (number) ]
            +         **
            +         * Unique id of the element. Especially usesful when you want to listen to events of the element, 
            +         * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.
            +        \*/
            +        this.id = R._oid++;
            +        node.raphaelid = this.id;
            +        this.matrix = R.matrix();
            +        this.realPath = null;
            +        /*\
            +         * Element.paper
            +         [ property (object) ]
            +         **
            +         * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.
            +         > Usage
            +         | Raphael.el.cross = function () {
            +         |     this.attr({fill: "red"});
            +         |     this.paper.path("M10,10L50,50M50,10L10,50")
            +         |         .attr({stroke: "red"});
            +         | }
            +        \*/
            +        this.paper = svg;
            +        this.attrs = this.attrs || {};
            +        this._ = {
            +            transform: [],
            +            sx: 1,
            +            sy: 1,
            +            deg: 0,
            +            dx: 0,
            +            dy: 0,
            +            dirty: 1
            +        };
            +        !svg.bottom && (svg.bottom = this);
            +        /*\
            +         * Element.prev
            +         [ property (object) ]
            +         **
            +         * Reference to the previous element in the hierarchy.
            +        \*/
            +        this.prev = svg.top;
            +        svg.top && (svg.top.next = this);
            +        svg.top = this;
            +        /*\
            +         * Element.next
            +         [ property (object) ]
            +         **
            +         * Reference to the next element in the hierarchy.
            +        \*/
            +        this.next = null;
            +    },
            +    elproto = R.el;
            +
            +    Element.prototype = elproto;
            +    elproto.constructor = Element;
            +
            +    R._engine.path = function (pathString, SVG) {
            +        var el = $("path");
            +        SVG.canvas && SVG.canvas.appendChild(el);
            +        var p = new Element(el, SVG);
            +        p.type = "path";
            +        setFillAndStroke(p, {
            +            fill: "none",
            +            stroke: "#000",
            +            path: pathString
            +        });
            +        return p;
            +    };
            +    /*\
            +     * Element.rotate
            +     [ method ]
            +     **
            +     * Deprecated! Use @Element.transform instead.
            +     * Adds rotation by given angle around given point to the list of
            +     * transformations of the element.
            +     > Parameters
            +     - deg (number) angle in degrees
            +     - cx (number) #optional x coordinate of the centre of rotation
            +     - cy (number) #optional y coordinate of the centre of rotation
            +     * If cx & cy aren’t specified centre of the shape is used as a point of rotation.
            +     = (object) @Element
            +    \*/
            +    elproto.rotate = function (deg, cx, cy) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        deg = Str(deg).split(separator);
            +        if (deg.length - 1) {
            +            cx = toFloat(deg[1]);
            +            cy = toFloat(deg[2]);
            +        }
            +        deg = toFloat(deg[0]);
            +        (cy == null) && (cx = cy);
            +        if (cx == null || cy == null) {
            +            var bbox = this.getBBox(1);
            +            cx = bbox.x + bbox.width / 2;
            +            cy = bbox.y + bbox.height / 2;
            +        }
            +        this.transform(this._.transform.concat([["r", deg, cx, cy]]));
            +        return this;
            +    };
            +    /*\
            +     * Element.scale
            +     [ method ]
            +     **
            +     * Deprecated! Use @Element.transform instead.
            +     * Adds scale by given amount relative to given point to the list of
            +     * transformations of the element.
            +     > Parameters
            +     - sx (number) horisontal scale amount
            +     - sy (number) vertical scale amount
            +     - cx (number) #optional x coordinate of the centre of scale
            +     - cy (number) #optional y coordinate of the centre of scale
            +     * If cx & cy aren’t specified centre of the shape is used instead.
            +     = (object) @Element
            +    \*/
            +    elproto.scale = function (sx, sy, cx, cy) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        sx = Str(sx).split(separator);
            +        if (sx.length - 1) {
            +            sy = toFloat(sx[1]);
            +            cx = toFloat(sx[2]);
            +            cy = toFloat(sx[3]);
            +        }
            +        sx = toFloat(sx[0]);
            +        (sy == null) && (sy = sx);
            +        (cy == null) && (cx = cy);
            +        if (cx == null || cy == null) {
            +            var bbox = this.getBBox(1);
            +        }
            +        cx = cx == null ? bbox.x + bbox.width / 2 : cx;
            +        cy = cy == null ? bbox.y + bbox.height / 2 : cy;
            +        this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));
            +        return this;
            +    };
            +    /*\
            +     * Element.translate
            +     [ method ]
            +     **
            +     * Deprecated! Use @Element.transform instead.
            +     * Adds translation by given amount to the list of transformations of the element.
            +     > Parameters
            +     - dx (number) horisontal shift
            +     - dy (number) vertical shift
            +     = (object) @Element
            +    \*/
            +    elproto.translate = function (dx, dy) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        dx = Str(dx).split(separator);
            +        if (dx.length - 1) {
            +            dy = toFloat(dx[1]);
            +        }
            +        dx = toFloat(dx[0]) || 0;
            +        dy = +dy || 0;
            +        this.transform(this._.transform.concat([["t", dx, dy]]));
            +        return this;
            +    };
            +    /*\
            +     * Element.transform
            +     [ method ]
            +     **
            +     * Adds transformation to the element which is separate to other attributes,
            +     * i.e. translation doesn’t change `x` or `y` of the rectange. The format
            +     * of transformation string is similar to the path string syntax:
            +     | "t100,100r30,100,100s2,2,100,100r45s1.5"
            +     * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for
            +     * scale and `m` is for matrix.
            +     *
            +     * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`.
            +     *
            +     * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;
            +     * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin
            +     * coordinates as optional parameters, the default is the centre point of the element.
            +     * Matrix accepts six parameters.
            +     > Usage
            +     | var el = paper.rect(10, 20, 300, 200);
            +     | // translate 100, 100, rotate 45°, translate -100, 0
            +     | el.transform("t100,100r45t-100,0");
            +     | // if you want you can append or prepend transformations
            +     | el.transform("...t50,50");
            +     | el.transform("s2...");
            +     | // or even wrap
            +     | el.transform("t50,50...t-50-50");
            +     | // to reset transformation call method with empty string
            +     | el.transform("");
            +     | // to get current value call it without parameters
            +     | console.log(el.transform());
            +     > Parameters
            +     - tstr (string) #optional transformation string
            +     * If tstr isn’t specified
            +     = (string) current transformation string
            +     * else
            +     = (object) @Element
            +    \*/
            +    elproto.transform = function (tstr) {
            +        var _ = this._;
            +        if (tstr == null) {
            +            return _.transform;
            +        }
            +        R._extractTransform(this, tstr);
            +
            +        this.clip && $(this.clip, {transform: this.matrix.invert()});
            +        this.pattern && updatePosition(this);
            +        this.node && $(this.node, {transform: this.matrix});
            +    
            +        if (_.sx != 1 || _.sy != 1) {
            +            var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1;
            +            this.attr({"stroke-width": sw});
            +        }
            +
            +        return this;
            +    };
            +    /*\
            +     * Element.hide
            +     [ method ]
            +     **
            +     * Makes element invisible. See @Element.show.
            +     = (object) @Element
            +    \*/
            +    elproto.hide = function () {
            +        !this.removed && this.paper.safari(this.node.style.display = "none");
            +        return this;
            +    };
            +    /*\
            +     * Element.show
            +     [ method ]
            +     **
            +     * Makes element visible. See @Element.hide.
            +     = (object) @Element
            +    \*/
            +    elproto.show = function () {
            +        !this.removed && this.paper.safari(this.node.style.display = "");
            +        return this;
            +    };
            +    /*\
            +     * Element.remove
            +     [ method ]
            +     **
            +     * Removes element from the paper.
            +    \*/
            +    elproto.remove = function () {
            +        if (this.removed || !this.node.parentNode) {
            +            return;
            +        }
            +        var paper = this.paper;
            +        paper.__set__ && paper.__set__.exclude(this);
            +        eve.unbind("raphael.*.*." + this.id);
            +        if (this.gradient) {
            +            paper.defs.removeChild(this.gradient);
            +        }
            +        R._tear(this, paper);
            +        if (this.node.parentNode.tagName.toLowerCase() == "a") {
            +            this.node.parentNode.parentNode.removeChild(this.node.parentNode);
            +        } else {
            +            this.node.parentNode.removeChild(this.node);
            +        }
            +        for (var i in this) {
            +            this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
            +        }
            +        this.removed = true;
            +    };
            +    elproto._getBBox = function () {
            +        if (this.node.style.display == "none") {
            +            this.show();
            +            var hide = true;
            +        }
            +        var bbox = {};
            +        try {
            +            bbox = this.node.getBBox();
            +        } catch(e) {
            +            // Firefox 3.0.x plays badly here
            +        } finally {
            +            bbox = bbox || {};
            +        }
            +        hide && this.hide();
            +        return bbox;
            +    };
            +    /*\
            +     * Element.attr
            +     [ method ]
            +     **
            +     * Sets the attributes of the element.
            +     > Parameters
            +     - attrName (string) attribute’s name
            +     - value (string) value
            +     * or
            +     - params (object) object of name/value pairs
            +     * or
            +     - attrName (string) attribute’s name
            +     * or
            +     - attrNames (array) in this case method returns array of current values for given attribute names
            +     = (object) @Element if attrsName & value or params are passed in.
            +     = (...) value of the attribute if only attrsName is passed in.
            +     = (array) array of values of the attribute if attrsNames is passed in.
            +     = (object) object of attributes if nothing is passed in.
            +     > Possible parameters
            +     # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p>
            +     o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`.
            +     o clip-rect (string) comma or space separated values: x, y, width and height
            +     o cursor (string) CSS type of the cursor
            +     o cx (number) the x-axis coordinate of the center of the circle, or ellipse
            +     o cy (number) the y-axis coordinate of the center of the circle, or ellipse
            +     o fill (string) colour, gradient or image
            +     o fill-opacity (number)
            +     o font (string)
            +     o font-family (string)
            +     o font-size (number) font size in pixels
            +     o font-weight (string)
            +     o height (number)
            +     o href (string) URL, if specified element behaves as hyperlink
            +     o opacity (number)
            +     o path (string) SVG path string format
            +     o r (number) radius of the circle, ellipse or rounded corner on the rect
            +     o rx (number) horisontal radius of the ellipse
            +     o ry (number) vertical radius of the ellipse
            +     o src (string) image URL, only works for @Element.image element
            +     o stroke (string) stroke colour
            +     o stroke-dasharray (string) [“”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]
            +     o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]
            +     o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]
            +     o stroke-miterlimit (number)
            +     o stroke-opacity (number)
            +     o stroke-width (number) stroke width in pixels, default is '1'
            +     o target (string) used with href
            +     o text (string) contents of the text element. Use `\n` for multiline text
            +     o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”
            +     o title (string) will create tooltip with a given text
            +     o transform (string) see @Element.transform
            +     o width (number)
            +     o x (number)
            +     o y (number)
            +     > Gradients
            +     * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°
            +     * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.
            +     *
            +     * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –
            +     * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point
            +     * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.
            +     > Path String
            +     # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>
            +     > Colour Parsing
            +     # <ul>
            +     #     <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
            +     #     <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
            +     #     <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
            +     #     <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
            +     #     <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
            +     #     <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200,&nbsp;100,&nbsp;0, .5)</code>”)</li>
            +     #     <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%,&nbsp;175%,&nbsp;0%, 50%)</code>”)</li>
            +     #     <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
            +     #     <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
            +     #     <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>
            +     #     <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>
            +     #     <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>
            +     #     <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>
            +     #     <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg,&nbsp;1,&nbsp;.5)</code>” or, if you want to go fancy, “<code>hsl(240°,&nbsp;1,&nbsp;.5)</code>”</li>
            +     # </ul>
            +    \*/
            +    elproto.attr = function (name, value) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (name == null) {
            +            var res = {};
            +            for (var a in this.attrs) if (this.attrs[has](a)) {
            +                res[a] = this.attrs[a];
            +            }
            +            res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
            +            res.transform = this._.transform;
            +            return res;
            +        }
            +        if (value == null && R.is(name, "string")) {
            +            if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {
            +                return this.attrs.gradient;
            +            }
            +            if (name == "transform") {
            +                return this._.transform;
            +            }
            +            var names = name.split(separator),
            +                out = {};
            +            for (var i = 0, ii = names.length; i < ii; i++) {
            +                name = names[i];
            +                if (name in this.attrs) {
            +                    out[name] = this.attrs[name];
            +                } else if (R.is(this.paper.customAttributes[name], "function")) {
            +                    out[name] = this.paper.customAttributes[name].def;
            +                } else {
            +                    out[name] = R._availableAttrs[name];
            +                }
            +            }
            +            return ii - 1 ? out : out[names[0]];
            +        }
            +        if (value == null && R.is(name, "array")) {
            +            out = {};
            +            for (i = 0, ii = name.length; i < ii; i++) {
            +                out[name[i]] = this.attr(name[i]);
            +            }
            +            return out;
            +        }
            +        if (value != null) {
            +            var params = {};
            +            params[name] = value;
            +        } else if (name != null && R.is(name, "object")) {
            +            params = name;
            +        }
            +        for (var key in params) {
            +            eve("raphael.attr." + key + "." + this.id, this, params[key]);
            +        }
            +        for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
            +            var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
            +            this.attrs[key] = params[key];
            +            for (var subkey in par) if (par[has](subkey)) {
            +                params[subkey] = par[subkey];
            +            }
            +        }
            +        setFillAndStroke(this, params);
            +        return this;
            +    };
            +    /*\
            +     * Element.toFront
            +     [ method ]
            +     **
            +     * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.
            +     = (object) @Element
            +    \*/
            +    elproto.toFront = function () {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (this.node.parentNode.tagName.toLowerCase() == "a") {
            +            this.node.parentNode.parentNode.appendChild(this.node.parentNode);
            +        } else {
            +            this.node.parentNode.appendChild(this.node);
            +        }
            +        var svg = this.paper;
            +        svg.top != this && R._tofront(this, svg);
            +        return this;
            +    };
            +    /*\
            +     * Element.toBack
            +     [ method ]
            +     **
            +     * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.
            +     = (object) @Element
            +    \*/
            +    elproto.toBack = function () {
            +        if (this.removed) {
            +            return this;
            +        }
            +        var parent = this.node.parentNode;
            +        if (parent.tagName.toLowerCase() == "a") {
            +            parent.parentNode.insertBefore(this.node.parentNode, this.node.parentNode.parentNode.firstChild); 
            +        } else if (parent.firstChild != this.node) {
            +            parent.insertBefore(this.node, this.node.parentNode.firstChild);
            +        }
            +        R._toback(this, this.paper);
            +        var svg = this.paper;
            +        return this;
            +    };
            +    /*\
            +     * Element.insertAfter
            +     [ method ]
            +     **
            +     * Inserts current object after the given one.
            +     = (object) @Element
            +    \*/
            +    elproto.insertAfter = function (element) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        var node = element.node || element[element.length - 1].node;
            +        if (node.nextSibling) {
            +            node.parentNode.insertBefore(this.node, node.nextSibling);
            +        } else {
            +            node.parentNode.appendChild(this.node);
            +        }
            +        R._insertafter(this, element, this.paper);
            +        return this;
            +    };
            +    /*\
            +     * Element.insertBefore
            +     [ method ]
            +     **
            +     * Inserts current object before the given one.
            +     = (object) @Element
            +    \*/
            +    elproto.insertBefore = function (element) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        var node = element.node || element[0].node;
            +        node.parentNode.insertBefore(this.node, node);
            +        R._insertbefore(this, element, this.paper);
            +        return this;
            +    };
            +    elproto.blur = function (size) {
            +        // Experimental. No Safari support. Use it on your own risk.
            +        var t = this;
            +        if (+size !== 0) {
            +            var fltr = $("filter"),
            +                blur = $("feGaussianBlur");
            +            t.attrs.blur = size;
            +            fltr.id = R.createUUID();
            +            $(blur, {stdDeviation: +size || 1.5});
            +            fltr.appendChild(blur);
            +            t.paper.defs.appendChild(fltr);
            +            t._blur = fltr;
            +            $(t.node, {filter: "url(#" + fltr.id + ")"});
            +        } else {
            +            if (t._blur) {
            +                t._blur.parentNode.removeChild(t._blur);
            +                delete t._blur;
            +                delete t.attrs.blur;
            +            }
            +            t.node.removeAttribute("filter");
            +        }
            +        return t;
            +    };
            +    R._engine.circle = function (svg, x, y, r) {
            +        var el = $("circle");
            +        svg.canvas && svg.canvas.appendChild(el);
            +        var res = new Element(el, svg);
            +        res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"};
            +        res.type = "circle";
            +        $(el, res.attrs);
            +        return res;
            +    };
            +    R._engine.rect = function (svg, x, y, w, h, r) {
            +        var el = $("rect");
            +        svg.canvas && svg.canvas.appendChild(el);
            +        var res = new Element(el, svg);
            +        res.attrs = {x: x, y: y, width: w, height: h, r: r || 0, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"};
            +        res.type = "rect";
            +        $(el, res.attrs);
            +        return res;
            +    };
            +    R._engine.ellipse = function (svg, x, y, rx, ry) {
            +        var el = $("ellipse");
            +        svg.canvas && svg.canvas.appendChild(el);
            +        var res = new Element(el, svg);
            +        res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"};
            +        res.type = "ellipse";
            +        $(el, res.attrs);
            +        return res;
            +    };
            +    R._engine.image = function (svg, src, x, y, w, h) {
            +        var el = $("image");
            +        $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"});
            +        el.setAttributeNS(xlink, "href", src);
            +        svg.canvas && svg.canvas.appendChild(el);
            +        var res = new Element(el, svg);
            +        res.attrs = {x: x, y: y, width: w, height: h, src: src};
            +        res.type = "image";
            +        return res;
            +    };
            +    R._engine.text = function (svg, x, y, text) {
            +        var el = $("text");
            +        svg.canvas && svg.canvas.appendChild(el);
            +        var res = new Element(el, svg);
            +        res.attrs = {
            +            x: x,
            +            y: y,
            +            "text-anchor": "middle",
            +            text: text,
            +            font: R._availableAttrs.font,
            +            stroke: "none",
            +            fill: "#000"
            +        };
            +        res.type = "text";
            +        setFillAndStroke(res, res.attrs);
            +        return res;
            +    };
            +    R._engine.setSize = function (width, height) {
            +        this.width = width || this.width;
            +        this.height = height || this.height;
            +        this.canvas.setAttribute("width", this.width);
            +        this.canvas.setAttribute("height", this.height);
            +        if (this._viewBox) {
            +            this.setViewBox.apply(this, this._viewBox);
            +        }
            +        return this;
            +    };
            +    R._engine.create = function () {
            +        var con = R._getContainer.apply(0, arguments),
            +            container = con && con.container,
            +            x = con.x,
            +            y = con.y,
            +            width = con.width,
            +            height = con.height;
            +        if (!container) {
            +            throw new Error("SVG container not found.");
            +        }
            +        var cnvs = $("svg"),
            +            css = "overflow:hidden;",
            +            isFloating;
            +        x = x || 0;
            +        y = y || 0;
            +        width = width || 512;
            +        height = height || 342;
            +        $(cnvs, {
            +            height: height,
            +            version: 1.1,
            +            width: width,
            +            xmlns: "http://www.w3.org/2000/svg"
            +        });
            +        if (container == 1) {
            +            cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px";
            +            R._g.doc.body.appendChild(cnvs);
            +            isFloating = 1;
            +        } else {
            +            cnvs.style.cssText = css + "position:relative";
            +            if (container.firstChild) {
            +                container.insertBefore(cnvs, container.firstChild);
            +            } else {
            +                container.appendChild(cnvs);
            +            }
            +        }
            +        container = new R._Paper;
            +        container.width = width;
            +        container.height = height;
            +        container.canvas = cnvs;
            +        container.clear();
            +        container._left = container._top = 0;
            +        isFloating && (container.renderfix = function () {});
            +        container.renderfix();
            +        return container;
            +    };
            +    R._engine.setViewBox = function (x, y, w, h, fit) {
            +        eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
            +        var size = mmax(w / this.width, h / this.height),
            +            top = this.top,
            +            aspectRatio = fit ? "meet" : "xMinYMin",
            +            vb,
            +            sw;
            +        if (x == null) {
            +            if (this._vbSize) {
            +                size = 1;
            +            }
            +            delete this._vbSize;
            +            vb = "0 0 " + this.width + S + this.height;
            +        } else {
            +            this._vbSize = size;
            +            vb = x + S + y + S + w + S + h;
            +        }
            +        $(this.canvas, {
            +            viewBox: vb,
            +            preserveAspectRatio: aspectRatio
            +        });
            +        while (size && top) {
            +            sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1;
            +            top.attr({"stroke-width": sw});
            +            top._.dirty = 1;
            +            top._.dirtyT = 1;
            +            top = top.prev;
            +        }
            +        this._viewBox = [x, y, w, h, !!fit];
            +        return this;
            +    };
            +    /*\
            +     * Paper.renderfix
            +     [ method ]
            +     **
            +     * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant
            +     * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.
            +     * This method fixes the issue.
            +     **
            +       Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method.
            +    \*/
            +    R.prototype.renderfix = function () {
            +        var cnvs = this.canvas,
            +            s = cnvs.style,
            +            pos;
            +        try {
            +            pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix();
            +        } catch (e) {
            +            pos = cnvs.createSVGMatrix();
            +        }
            +        var left = -pos.e % 1,
            +            top = -pos.f % 1;
            +        if (left || top) {
            +            if (left) {
            +                this._left = (this._left + left) % 1;
            +                s.left = this._left + "px";
            +            }
            +            if (top) {
            +                this._top = (this._top + top) % 1;
            +                s.top = this._top + "px";
            +            }
            +        }
            +    };
            +    /*\
            +     * Paper.clear
            +     [ method ]
            +     **
            +     * Clears the paper, i.e. removes all the elements.
            +    \*/
            +    R.prototype.clear = function () {
            +        R.eve("raphael.clear", this);
            +        var c = this.canvas;
            +        while (c.firstChild) {
            +            c.removeChild(c.firstChild);
            +        }
            +        this.bottom = this.top = null;
            +        (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version));
            +        c.appendChild(this.desc);
            +        c.appendChild(this.defs = $("defs"));
            +    };
            +    /*\
            +     * Paper.remove
            +     [ method ]
            +     **
            +     * Removes the paper from the DOM.
            +    \*/
            +    R.prototype.remove = function () {
            +        eve("raphael.remove", this);
            +        this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
            +        for (var i in this) {
            +            this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
            +        }
            +    };
            +    var setproto = R.st;
            +    for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
            +        setproto[method] = (function (methodname) {
            +            return function () {
            +                var arg = arguments;
            +                return this.forEach(function (el) {
            +                    el[methodname].apply(el, arg);
            +                });
            +            };
            +        })(method);
            +    }
            +})();
            +
            +// ┌─────────────────────────────────────────────────────────────────────┐ \\
            +// │ Raphaël - JavaScript Vector Library                                 │ \\
            +// ├─────────────────────────────────────────────────────────────────────┤ \\
            +// │ VML Module                                                          │ \\
            +// ├─────────────────────────────────────────────────────────────────────┤ \\
            +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
            +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
            +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
            +// └─────────────────────────────────────────────────────────────────────┘ \\
            +
            +(function(){
            +    if (!R.vml) {
            +        return;
            +    }
            +    var has = "hasOwnProperty",
            +        Str = String,
            +        toFloat = parseFloat,
            +        math = Math,
            +        round = math.round,
            +        mmax = math.max,
            +        mmin = math.min,
            +        abs = math.abs,
            +        fillString = "fill",
            +        separator = /[, ]+/,
            +        eve = R.eve,
            +        ms = " progid:DXImageTransform.Microsoft",
            +        S = " ",
            +        E = "",
            +        map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"},
            +        bites = /([clmz]),?([^clmz]*)/gi,
            +        blurregexp = / progid:\S+Blur\([^\)]+\)/g,
            +        val = /-?[^,\s-]+/g,
            +        cssDot = "position:absolute;left:0;top:0;width:1px;height:1px",
            +        zoom = 21600,
            +        pathTypes = {path: 1, rect: 1, image: 1},
            +        ovalTypes = {circle: 1, ellipse: 1},
            +        path2vml = function (path) {
            +            var total =  /[ahqstv]/ig,
            +                command = R._pathToAbsolute;
            +            Str(path).match(total) && (command = R._path2curve);
            +            total = /[clmz]/g;
            +            if (command == R._pathToAbsolute && !Str(path).match(total)) {
            +                var res = Str(path).replace(bites, function (all, command, args) {
            +                    var vals = [],
            +                        isMove = command.toLowerCase() == "m",
            +                        res = map[command];
            +                    args.replace(val, function (value) {
            +                        if (isMove && vals.length == 2) {
            +                            res += vals + map[command == "m" ? "l" : "L"];
            +                            vals = [];
            +                        }
            +                        vals.push(round(value * zoom));
            +                    });
            +                    return res + vals;
            +                });
            +                return res;
            +            }
            +            var pa = command(path), p, r;
            +            res = [];
            +            for (var i = 0, ii = pa.length; i < ii; i++) {
            +                p = pa[i];
            +                r = pa[i][0].toLowerCase();
            +                r == "z" && (r = "x");
            +                for (var j = 1, jj = p.length; j < jj; j++) {
            +                    r += round(p[j] * zoom) + (j != jj - 1 ? "," : E);
            +                }
            +                res.push(r);
            +            }
            +            return res.join(S);
            +        },
            +        compensation = function (deg, dx, dy) {
            +            var m = R.matrix();
            +            m.rotate(-deg, .5, .5);
            +            return {
            +                dx: m.x(dx, dy),
            +                dy: m.y(dx, dy)
            +            };
            +        },
            +        setCoords = function (p, sx, sy, dx, dy, deg) {
            +            var _ = p._,
            +                m = p.matrix,
            +                fillpos = _.fillpos,
            +                o = p.node,
            +                s = o.style,
            +                y = 1,
            +                flip = "",
            +                dxdy,
            +                kx = zoom / sx,
            +                ky = zoom / sy;
            +            s.visibility = "hidden";
            +            if (!sx || !sy) {
            +                return;
            +            }
            +            o.coordsize = abs(kx) + S + abs(ky);
            +            s.rotation = deg * (sx * sy < 0 ? -1 : 1);
            +            if (deg) {
            +                var c = compensation(deg, dx, dy);
            +                dx = c.dx;
            +                dy = c.dy;
            +            }
            +            sx < 0 && (flip += "x");
            +            sy < 0 && (flip += " y") && (y = -1);
            +            s.flip = flip;
            +            o.coordorigin = (dx * -kx) + S + (dy * -ky);
            +            if (fillpos || _.fillsize) {
            +                var fill = o.getElementsByTagName(fillString);
            +                fill = fill && fill[0];
            +                o.removeChild(fill);
            +                if (fillpos) {
            +                    c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));
            +                    fill.position = c.dx * y + S + c.dy * y;
            +                }
            +                if (_.fillsize) {
            +                    fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);
            +                }
            +                o.appendChild(fill);
            +            }
            +            s.visibility = "visible";
            +        };
            +    R.toString = function () {
            +        return  "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version;
            +    };
            +    var addArrow = function (o, value, isEnd) {
            +        var values = Str(value).toLowerCase().split("-"),
            +            se = isEnd ? "end" : "start",
            +            i = values.length,
            +            type = "classic",
            +            w = "medium",
            +            h = "medium";
            +        while (i--) {
            +            switch (values[i]) {
            +                case "block":
            +                case "classic":
            +                case "oval":
            +                case "diamond":
            +                case "open":
            +                case "none":
            +                    type = values[i];
            +                    break;
            +                case "wide":
            +                case "narrow": h = values[i]; break;
            +                case "long":
            +                case "short": w = values[i]; break;
            +            }
            +        }
            +        var stroke = o.node.getElementsByTagName("stroke")[0];
            +        stroke[se + "arrow"] = type;
            +        stroke[se + "arrowlength"] = w;
            +        stroke[se + "arrowwidth"] = h;
            +    },
            +    setFillAndStroke = function (o, params) {
            +        // o.paper.canvas.style.display = "none";
            +        o.attrs = o.attrs || {};
            +        var node = o.node,
            +            a = o.attrs,
            +            s = node.style,
            +            xy,
            +            newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),
            +            isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),
            +            res = o;
            +
            +
            +        for (var par in params) if (params[has](par)) {
            +            a[par] = params[par];
            +        }
            +        if (newpath) {
            +            a.path = R._getPath[o.type](o);
            +            o._.dirty = 1;
            +        }
            +        params.href && (node.href = params.href);
            +        params.title && (node.title = params.title);
            +        params.target && (node.target = params.target);
            +        params.cursor && (s.cursor = params.cursor);
            +        "blur" in params && o.blur(params.blur);
            +        if (params.path && o.type == "path" || newpath) {
            +            node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path);
            +            if (o.type == "image") {
            +                o._.fillpos = [a.x, a.y];
            +                o._.fillsize = [a.width, a.height];
            +                setCoords(o, 1, 1, 0, 0, 0);
            +            }
            +        }
            +        "transform" in params && o.transform(params.transform);
            +        if (isOval) {
            +            var cx = +a.cx,
            +                cy = +a.cy,
            +                rx = +a.rx || +a.r || 0,
            +                ry = +a.ry || +a.r || 0;
            +            node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));
            +            o._.dirty = 1;
            +        }
            +        if ("clip-rect" in params) {
            +            var rect = Str(params["clip-rect"]).split(separator);
            +            if (rect.length == 4) {
            +                rect[2] = +rect[2] + (+rect[0]);
            +                rect[3] = +rect[3] + (+rect[1]);
            +                var div = node.clipRect || R._g.doc.createElement("div"),
            +                    dstyle = div.style;
            +                dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);
            +                if (!node.clipRect) {
            +                    dstyle.position = "absolute";
            +                    dstyle.top = 0;
            +                    dstyle.left = 0;
            +                    dstyle.width = o.paper.width + "px";
            +                    dstyle.height = o.paper.height + "px";
            +                    node.parentNode.insertBefore(div, node);
            +                    div.appendChild(node);
            +                    node.clipRect = div;
            +                }
            +            }
            +            if (!params["clip-rect"]) {
            +                node.clipRect && (node.clipRect.style.clip = "auto");
            +            }
            +        }
            +        if (o.textpath) {
            +            var textpathStyle = o.textpath.style;
            +            params.font && (textpathStyle.font = params.font);
            +            params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"');
            +            params["font-size"] && (textpathStyle.fontSize = params["font-size"]);
            +            params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]);
            +            params["font-style"] && (textpathStyle.fontStyle = params["font-style"]);
            +        }
            +        if ("arrow-start" in params) {
            +            addArrow(res, params["arrow-start"]);
            +        }
            +        if ("arrow-end" in params) {
            +            addArrow(res, params["arrow-end"], 1);
            +        }
            +        if (params.opacity != null || 
            +            params["stroke-width"] != null ||
            +            params.fill != null ||
            +            params.src != null ||
            +            params.stroke != null ||
            +            params["stroke-width"] != null ||
            +            params["stroke-opacity"] != null ||
            +            params["fill-opacity"] != null ||
            +            params["stroke-dasharray"] != null ||
            +            params["stroke-miterlimit"] != null ||
            +            params["stroke-linejoin"] != null ||
            +            params["stroke-linecap"] != null) {
            +            var fill = node.getElementsByTagName(fillString),
            +                newfill = false;
            +            fill = fill && fill[0];
            +            !fill && (newfill = fill = createNode(fillString));
            +            if (o.type == "image" && params.src) {
            +                fill.src = params.src;
            +            }
            +            params.fill && (fill.on = true);
            +            if (fill.on == null || params.fill == "none" || params.fill === null) {
            +                fill.on = false;
            +            }
            +            if (fill.on && params.fill) {
            +                var isURL = Str(params.fill).match(R._ISURL);
            +                if (isURL) {
            +                    fill.parentNode == node && node.removeChild(fill);
            +                    fill.rotate = true;
            +                    fill.src = isURL[1];
            +                    fill.type = "tile";
            +                    var bbox = o.getBBox(1);
            +                    fill.position = bbox.x + S + bbox.y;
            +                    o._.fillpos = [bbox.x, bbox.y];
            +
            +                    R._preload(isURL[1], function () {
            +                        o._.fillsize = [this.offsetWidth, this.offsetHeight];
            +                    });
            +                } else {
            +                    fill.color = R.getRGB(params.fill).hex;
            +                    fill.src = E;
            +                    fill.type = "solid";
            +                    if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) {
            +                        a.fill = "none";
            +                        a.gradient = params.fill;
            +                        fill.rotate = false;
            +                    }
            +                }
            +            }
            +            if ("fill-opacity" in params || "opacity" in params) {
            +                var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);
            +                opacity = mmin(mmax(opacity, 0), 1);
            +                fill.opacity = opacity;
            +                if (fill.src) {
            +                    fill.color = "none";
            +                }
            +            }
            +            node.appendChild(fill);
            +            var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]),
            +            newstroke = false;
            +            !stroke && (newstroke = stroke = createNode("stroke"));
            +            if ((params.stroke && params.stroke != "none") ||
            +                params["stroke-width"] ||
            +                params["stroke-opacity"] != null ||
            +                params["stroke-dasharray"] ||
            +                params["stroke-miterlimit"] ||
            +                params["stroke-linejoin"] ||
            +                params["stroke-linecap"]) {
            +                stroke.on = true;
            +            }
            +            (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);
            +            var strokeColor = R.getRGB(params.stroke);
            +            stroke.on && params.stroke && (stroke.color = strokeColor.hex);
            +            opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);
            +            var width = (toFloat(params["stroke-width"]) || 1) * .75;
            +            opacity = mmin(mmax(opacity, 0), 1);
            +            params["stroke-width"] == null && (width = a["stroke-width"]);
            +            params["stroke-width"] && (stroke.weight = width);
            +            width && width < 1 && (opacity *= width) && (stroke.weight = 1);
            +            stroke.opacity = opacity;
            +        
            +            params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter");
            +            stroke.miterlimit = params["stroke-miterlimit"] || 8;
            +            params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round");
            +            if ("stroke-dasharray" in params) {
            +                var dasharray = {
            +                    "-": "shortdash",
            +                    ".": "shortdot",
            +                    "-.": "shortdashdot",
            +                    "-..": "shortdashdotdot",
            +                    ". ": "dot",
            +                    "- ": "dash",
            +                    "--": "longdash",
            +                    "- .": "dashdot",
            +                    "--.": "longdashdot",
            +                    "--..": "longdashdotdot"
            +                };
            +                stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E;
            +            }
            +            newstroke && node.appendChild(stroke);
            +        }
            +        if (res.type == "text") {
            +            res.paper.canvas.style.display = E;
            +            var span = res.paper.span,
            +                m = 100,
            +                fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/);
            +            s = span.style;
            +            a.font && (s.font = a.font);
            +            a["font-family"] && (s.fontFamily = a["font-family"]);
            +            a["font-weight"] && (s.fontWeight = a["font-weight"]);
            +            a["font-style"] && (s.fontStyle = a["font-style"]);
            +            fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10;
            +            s.fontSize = fontSize * m + "px";
            +            res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "&#60;").replace(/&/g, "&#38;").replace(/\n/g, "<br>"));
            +            var brect = span.getBoundingClientRect();
            +            res.W = a.w = (brect.right - brect.left) / m;
            +            res.H = a.h = (brect.bottom - brect.top) / m;
            +            // res.paper.canvas.style.display = "none";
            +            res.X = a.x;
            +            res.Y = a.y + res.H / 2;
            +
            +            ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));
            +            var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"];
            +            for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {
            +                res._.dirty = 1;
            +                break;
            +            }
            +        
            +            // text-anchor emulation
            +            switch (a["text-anchor"]) {
            +                case "start":
            +                    res.textpath.style["v-text-align"] = "left";
            +                    res.bbx = res.W / 2;
            +                break;
            +                case "end":
            +                    res.textpath.style["v-text-align"] = "right";
            +                    res.bbx = -res.W / 2;
            +                break;
            +                default:
            +                    res.textpath.style["v-text-align"] = "center";
            +                    res.bbx = 0;
            +                break;
            +            }
            +            res.textpath.style["v-text-kern"] = true;
            +        }
            +        // res.paper.canvas.style.display = E;
            +    },
            +    addGradientFill = function (o, gradient, fill) {
            +        o.attrs = o.attrs || {};
            +        var attrs = o.attrs,
            +            pow = Math.pow,
            +            opacity,
            +            oindex,
            +            type = "linear",
            +            fxfy = ".5 .5";
            +        o.attrs.gradient = gradient;
            +        gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {
            +            type = "radial";
            +            if (fx && fy) {
            +                fx = toFloat(fx);
            +                fy = toFloat(fy);
            +                pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);
            +                fxfy = fx + S + fy;
            +            }
            +            return E;
            +        });
            +        gradient = gradient.split(/\s*\-\s*/);
            +        if (type == "linear") {
            +            var angle = gradient.shift();
            +            angle = -toFloat(angle);
            +            if (isNaN(angle)) {
            +                return null;
            +            }
            +        }
            +        var dots = R._parseDots(gradient);
            +        if (!dots) {
            +            return null;
            +        }
            +        o = o.shape || o.node;
            +        if (dots.length) {
            +            o.removeChild(fill);
            +            fill.on = true;
            +            fill.method = "none";
            +            fill.color = dots[0].color;
            +            fill.color2 = dots[dots.length - 1].color;
            +            var clrs = [];
            +            for (var i = 0, ii = dots.length; i < ii; i++) {
            +                dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);
            +            }
            +            fill.colors = clrs.length ? clrs.join() : "0% " + fill.color;
            +            if (type == "radial") {
            +                fill.type = "gradientTitle";
            +                fill.focus = "100%";
            +                fill.focussize = "0 0";
            +                fill.focusposition = fxfy;
            +                fill.angle = 0;
            +            } else {
            +                // fill.rotate= true;
            +                fill.type = "gradient";
            +                fill.angle = (270 - angle) % 360;
            +            }
            +            o.appendChild(fill);
            +        }
            +        return 1;
            +    },
            +    Element = function (node, vml) {
            +        this[0] = this.node = node;
            +        node.raphael = true;
            +        this.id = R._oid++;
            +        node.raphaelid = this.id;
            +        this.X = 0;
            +        this.Y = 0;
            +        this.attrs = {};
            +        this.paper = vml;
            +        this.matrix = R.matrix();
            +        this._ = {
            +            transform: [],
            +            sx: 1,
            +            sy: 1,
            +            dx: 0,
            +            dy: 0,
            +            deg: 0,
            +            dirty: 1,
            +            dirtyT: 1
            +        };
            +        !vml.bottom && (vml.bottom = this);
            +        this.prev = vml.top;
            +        vml.top && (vml.top.next = this);
            +        vml.top = this;
            +        this.next = null;
            +    };
            +    var elproto = R.el;
            +
            +    Element.prototype = elproto;
            +    elproto.constructor = Element;
            +    elproto.transform = function (tstr) {
            +        if (tstr == null) {
            +            return this._.transform;
            +        }
            +        var vbs = this.paper._viewBoxShift,
            +            vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E,
            +            oldt;
            +        if (vbs) {
            +            oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E);
            +        }
            +        R._extractTransform(this, vbt + tstr);
            +        var matrix = this.matrix.clone(),
            +            skew = this.skew,
            +            o = this.node,
            +            split,
            +            isGrad = ~Str(this.attrs.fill).indexOf("-"),
            +            isPatt = !Str(this.attrs.fill).indexOf("url(");
            +        matrix.translate(1, 1);
            +        if (isPatt || isGrad || this.type == "image") {
            +            skew.matrix = "1 0 0 1";
            +            skew.offset = "0 0";
            +            split = matrix.split();
            +            if ((isGrad && split.noRotation) || !split.isSimple) {
            +                o.style.filter = matrix.toFilter();
            +                var bb = this.getBBox(),
            +                    bbt = this.getBBox(1),
            +                    dx = bb.x - bbt.x,
            +                    dy = bb.y - bbt.y;
            +                o.coordorigin = (dx * -zoom) + S + (dy * -zoom);
            +                setCoords(this, 1, 1, dx, dy, 0);
            +            } else {
            +                o.style.filter = E;
            +                setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);
            +            }
            +        } else {
            +            o.style.filter = E;
            +            skew.matrix = Str(matrix);
            +            skew.offset = matrix.offset();
            +        }
            +        oldt && (this._.transform = oldt);
            +        return this;
            +    };
            +    elproto.rotate = function (deg, cx, cy) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (deg == null) {
            +            return;
            +        }
            +        deg = Str(deg).split(separator);
            +        if (deg.length - 1) {
            +            cx = toFloat(deg[1]);
            +            cy = toFloat(deg[2]);
            +        }
            +        deg = toFloat(deg[0]);
            +        (cy == null) && (cx = cy);
            +        if (cx == null || cy == null) {
            +            var bbox = this.getBBox(1);
            +            cx = bbox.x + bbox.width / 2;
            +            cy = bbox.y + bbox.height / 2;
            +        }
            +        this._.dirtyT = 1;
            +        this.transform(this._.transform.concat([["r", deg, cx, cy]]));
            +        return this;
            +    };
            +    elproto.translate = function (dx, dy) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        dx = Str(dx).split(separator);
            +        if (dx.length - 1) {
            +            dy = toFloat(dx[1]);
            +        }
            +        dx = toFloat(dx[0]) || 0;
            +        dy = +dy || 0;
            +        if (this._.bbox) {
            +            this._.bbox.x += dx;
            +            this._.bbox.y += dy;
            +        }
            +        this.transform(this._.transform.concat([["t", dx, dy]]));
            +        return this;
            +    };
            +    elproto.scale = function (sx, sy, cx, cy) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        sx = Str(sx).split(separator);
            +        if (sx.length - 1) {
            +            sy = toFloat(sx[1]);
            +            cx = toFloat(sx[2]);
            +            cy = toFloat(sx[3]);
            +            isNaN(cx) && (cx = null);
            +            isNaN(cy) && (cy = null);
            +        }
            +        sx = toFloat(sx[0]);
            +        (sy == null) && (sy = sx);
            +        (cy == null) && (cx = cy);
            +        if (cx == null || cy == null) {
            +            var bbox = this.getBBox(1);
            +        }
            +        cx = cx == null ? bbox.x + bbox.width / 2 : cx;
            +        cy = cy == null ? bbox.y + bbox.height / 2 : cy;
            +    
            +        this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));
            +        this._.dirtyT = 1;
            +        return this;
            +    };
            +    elproto.hide = function () {
            +        !this.removed && (this.node.style.display = "none");
            +        return this;
            +    };
            +    elproto.show = function () {
            +        !this.removed && (this.node.style.display = E);
            +        return this;
            +    };
            +    elproto._getBBox = function () {
            +        if (this.removed) {
            +            return {};
            +        }
            +        return {
            +            x: this.X + (this.bbx || 0) - this.W / 2,
            +            y: this.Y - this.H,
            +            width: this.W,
            +            height: this.H
            +        };
            +    };
            +    elproto.remove = function () {
            +        if (this.removed || !this.node.parentNode) {
            +            return;
            +        }
            +        this.paper.__set__ && this.paper.__set__.exclude(this);
            +        R.eve.unbind("raphael.*.*." + this.id);
            +        R._tear(this, this.paper);
            +        this.node.parentNode.removeChild(this.node);
            +        this.shape && this.shape.parentNode.removeChild(this.shape);
            +        for (var i in this) {
            +            this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
            +        }
            +        this.removed = true;
            +    };
            +    elproto.attr = function (name, value) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (name == null) {
            +            var res = {};
            +            for (var a in this.attrs) if (this.attrs[has](a)) {
            +                res[a] = this.attrs[a];
            +            }
            +            res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
            +            res.transform = this._.transform;
            +            return res;
            +        }
            +        if (value == null && R.is(name, "string")) {
            +            if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) {
            +                return this.attrs.gradient;
            +            }
            +            var names = name.split(separator),
            +                out = {};
            +            for (var i = 0, ii = names.length; i < ii; i++) {
            +                name = names[i];
            +                if (name in this.attrs) {
            +                    out[name] = this.attrs[name];
            +                } else if (R.is(this.paper.customAttributes[name], "function")) {
            +                    out[name] = this.paper.customAttributes[name].def;
            +                } else {
            +                    out[name] = R._availableAttrs[name];
            +                }
            +            }
            +            return ii - 1 ? out : out[names[0]];
            +        }
            +        if (this.attrs && value == null && R.is(name, "array")) {
            +            out = {};
            +            for (i = 0, ii = name.length; i < ii; i++) {
            +                out[name[i]] = this.attr(name[i]);
            +            }
            +            return out;
            +        }
            +        var params;
            +        if (value != null) {
            +            params = {};
            +            params[name] = value;
            +        }
            +        value == null && R.is(name, "object") && (params = name);
            +        for (var key in params) {
            +            eve("raphael.attr." + key + "." + this.id, this, params[key]);
            +        }
            +        if (params) {
            +            for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
            +                var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
            +                this.attrs[key] = params[key];
            +                for (var subkey in par) if (par[has](subkey)) {
            +                    params[subkey] = par[subkey];
            +                }
            +            }
            +            // this.paper.canvas.style.display = "none";
            +            if (params.text && this.type == "text") {
            +                this.textpath.string = params.text;
            +            }
            +            setFillAndStroke(this, params);
            +            // this.paper.canvas.style.display = E;
            +        }
            +        return this;
            +    };
            +    elproto.toFront = function () {
            +        !this.removed && this.node.parentNode.appendChild(this.node);
            +        this.paper && this.paper.top != this && R._tofront(this, this.paper);
            +        return this;
            +    };
            +    elproto.toBack = function () {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (this.node.parentNode.firstChild != this.node) {
            +            this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);
            +            R._toback(this, this.paper);
            +        }
            +        return this;
            +    };
            +    elproto.insertAfter = function (element) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (element.constructor == R.st.constructor) {
            +            element = element[element.length - 1];
            +        }
            +        if (element.node.nextSibling) {
            +            element.node.parentNode.insertBefore(this.node, element.node.nextSibling);
            +        } else {
            +            element.node.parentNode.appendChild(this.node);
            +        }
            +        R._insertafter(this, element, this.paper);
            +        return this;
            +    };
            +    elproto.insertBefore = function (element) {
            +        if (this.removed) {
            +            return this;
            +        }
            +        if (element.constructor == R.st.constructor) {
            +            element = element[0];
            +        }
            +        element.node.parentNode.insertBefore(this.node, element.node);
            +        R._insertbefore(this, element, this.paper);
            +        return this;
            +    };
            +    elproto.blur = function (size) {
            +        var s = this.node.runtimeStyle,
            +            f = s.filter;
            +        f = f.replace(blurregexp, E);
            +        if (+size !== 0) {
            +            this.attrs.blur = size;
            +            s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")";
            +            s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5));
            +        } else {
            +            s.filter = f;
            +            s.margin = 0;
            +            delete this.attrs.blur;
            +        }
            +        return this;
            +    };
            +
            +    R._engine.path = function (pathString, vml) {
            +        var el = createNode("shape");
            +        el.style.cssText = cssDot;
            +        el.coordsize = zoom + S + zoom;
            +        el.coordorigin = vml.coordorigin;
            +        var p = new Element(el, vml),
            +            attr = {fill: "none", stroke: "#000"};
            +        pathString && (attr.path = pathString);
            +        p.type = "path";
            +        p.path = [];
            +        p.Path = E;
            +        setFillAndStroke(p, attr);
            +        vml.canvas.appendChild(el);
            +        var skew = createNode("skew");
            +        skew.on = true;
            +        el.appendChild(skew);
            +        p.skew = skew;
            +        p.transform(E);
            +        return p;
            +    };
            +    R._engine.rect = function (vml, x, y, w, h, r) {
            +        var path = R._rectPath(x, y, w, h, r),
            +            res = vml.path(path),
            +            a = res.attrs;
            +        res.X = a.x = x;
            +        res.Y = a.y = y;
            +        res.W = a.width = w;
            +        res.H = a.height = h;
            +        a.r = r;
            +        a.path = path;
            +        res.type = "rect";
            +        return res;
            +    };
            +    R._engine.ellipse = function (vml, x, y, rx, ry) {
            +        var res = vml.path(),
            +            a = res.attrs;
            +        res.X = x - rx;
            +        res.Y = y - ry;
            +        res.W = rx * 2;
            +        res.H = ry * 2;
            +        res.type = "ellipse";
            +        setFillAndStroke(res, {
            +            cx: x,
            +            cy: y,
            +            rx: rx,
            +            ry: ry
            +        });
            +        return res;
            +    };
            +    R._engine.circle = function (vml, x, y, r) {
            +        var res = vml.path(),
            +            a = res.attrs;
            +        res.X = x - r;
            +        res.Y = y - r;
            +        res.W = res.H = r * 2;
            +        res.type = "circle";
            +        setFillAndStroke(res, {
            +            cx: x,
            +            cy: y,
            +            r: r
            +        });
            +        return res;
            +    };
            +    R._engine.image = function (vml, src, x, y, w, h) {
            +        var path = R._rectPath(x, y, w, h),
            +            res = vml.path(path).attr({stroke: "none"}),
            +            a = res.attrs,
            +            node = res.node,
            +            fill = node.getElementsByTagName(fillString)[0];
            +        a.src = src;
            +        res.X = a.x = x;
            +        res.Y = a.y = y;
            +        res.W = a.width = w;
            +        res.H = a.height = h;
            +        a.path = path;
            +        res.type = "image";
            +        fill.parentNode == node && node.removeChild(fill);
            +        fill.rotate = true;
            +        fill.src = src;
            +        fill.type = "tile";
            +        res._.fillpos = [x, y];
            +        res._.fillsize = [w, h];
            +        node.appendChild(fill);
            +        setCoords(res, 1, 1, 0, 0, 0);
            +        return res;
            +    };
            +    R._engine.text = function (vml, x, y, text) {
            +        var el = createNode("shape"),
            +            path = createNode("path"),
            +            o = createNode("textpath");
            +        x = x || 0;
            +        y = y || 0;
            +        text = text || "";
            +        path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1);
            +        path.textpathok = true;
            +        o.string = Str(text);
            +        o.on = true;
            +        el.style.cssText = cssDot;
            +        el.coordsize = zoom + S + zoom;
            +        el.coordorigin = "0 0";
            +        var p = new Element(el, vml),
            +            attr = {
            +                fill: "#000",
            +                stroke: "none",
            +                font: R._availableAttrs.font,
            +                text: text
            +            };
            +        p.shape = el;
            +        p.path = path;
            +        p.textpath = o;
            +        p.type = "text";
            +        p.attrs.text = Str(text);
            +        p.attrs.x = x;
            +        p.attrs.y = y;
            +        p.attrs.w = 1;
            +        p.attrs.h = 1;
            +        setFillAndStroke(p, attr);
            +        el.appendChild(o);
            +        el.appendChild(path);
            +        vml.canvas.appendChild(el);
            +        var skew = createNode("skew");
            +        skew.on = true;
            +        el.appendChild(skew);
            +        p.skew = skew;
            +        p.transform(E);
            +        return p;
            +    };
            +    R._engine.setSize = function (width, height) {
            +        var cs = this.canvas.style;
            +        this.width = width;
            +        this.height = height;
            +        width == +width && (width += "px");
            +        height == +height && (height += "px");
            +        cs.width = width;
            +        cs.height = height;
            +        cs.clip = "rect(0 " + width + " " + height + " 0)";
            +        if (this._viewBox) {
            +            R._engine.setViewBox.apply(this, this._viewBox);
            +        }
            +        return this;
            +    };
            +    R._engine.setViewBox = function (x, y, w, h, fit) {
            +        R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
            +        var width = this.width,
            +            height = this.height,
            +            size = 1 / mmax(w / width, h / height),
            +            H, W;
            +        if (fit) {
            +            H = height / h;
            +            W = width / w;
            +            if (w * H < width) {
            +                x -= (width - w * H) / 2 / H;
            +            }
            +            if (h * W < height) {
            +                y -= (height - h * W) / 2 / W;
            +            }
            +        }
            +        this._viewBox = [x, y, w, h, !!fit];
            +        this._viewBoxShift = {
            +            dx: -x,
            +            dy: -y,
            +            scale: size
            +        };
            +        this.forEach(function (el) {
            +            el.transform("...");
            +        });
            +        return this;
            +    };
            +    var createNode;
            +    R._engine.initWin = function (win) {
            +            var doc = win.document;
            +            doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
            +            try {
            +                !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
            +                createNode = function (tagName) {
            +                    return doc.createElement('<rvml:' + tagName + ' class="rvml">');
            +                };
            +            } catch (e) {
            +                createNode = function (tagName) {
            +                    return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
            +                };
            +            }
            +        };
            +    R._engine.initWin(R._g.win);
            +    R._engine.create = function () {
            +        var con = R._getContainer.apply(0, arguments),
            +            container = con.container,
            +            height = con.height,
            +            s,
            +            width = con.width,
            +            x = con.x,
            +            y = con.y;
            +        if (!container) {
            +            throw new Error("VML container not found.");
            +        }
            +        var res = new R._Paper,
            +            c = res.canvas = R._g.doc.createElement("div"),
            +            cs = c.style;
            +        x = x || 0;
            +        y = y || 0;
            +        width = width || 512;
            +        height = height || 342;
            +        res.width = width;
            +        res.height = height;
            +        width == +width && (width += "px");
            +        height == +height && (height += "px");
            +        res.coordsize = zoom * 1e3 + S + zoom * 1e3;
            +        res.coordorigin = "0 0";
            +        res.span = R._g.doc.createElement("span");
            +        res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";
            +        c.appendChild(res.span);
            +        cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height);
            +        if (container == 1) {
            +            R._g.doc.body.appendChild(c);
            +            cs.left = x + "px";
            +            cs.top = y + "px";
            +            cs.position = "absolute";
            +        } else {
            +            if (container.firstChild) {
            +                container.insertBefore(c, container.firstChild);
            +            } else {
            +                container.appendChild(c);
            +            }
            +        }
            +        res.renderfix = function () {};
            +        return res;
            +    };
            +    R.prototype.clear = function () {
            +        R.eve("raphael.clear", this);
            +        this.canvas.innerHTML = E;
            +        this.span = R._g.doc.createElement("span");
            +        this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";
            +        this.canvas.appendChild(this.span);
            +        this.bottom = this.top = null;
            +    };
            +    R.prototype.remove = function () {
            +        R.eve("raphael.remove", this);
            +        this.canvas.parentNode.removeChild(this.canvas);
            +        for (var i in this) {
            +            this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
            +        }
            +        return true;
            +    };
            +
            +    var setproto = R.st;
            +    for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
            +        setproto[method] = (function (methodname) {
            +            return function () {
            +                var arg = arguments;
            +                return this.forEach(function (el) {
            +                    el[methodname].apply(el, arg);
            +                });
            +            };
            +        })(method);
            +    }
            +})();
            +
            +    // EXPOSE
            +    // SVG and VML are appended just before the EXPOSE line
            +    // Even with AMD, Raphael should be defined globally
            +    oldRaphael.was ? (g.win.Raphael = R) : (Raphael = R);
            +
            +    return R;
            +}));
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/files/.._plugins_rate_spec_lib_jasmine.js.html b/docs_api/files/.._plugins_rate_spec_lib_jasmine.js.html index 32b9bae87..110fa696f 100644 --- a/docs_api/files/.._plugins_rate_spec_lib_jasmine.js.html +++ b/docs_api/files/.._plugins_rate_spec_lib_jasmine.js.html @@ -3,11 +3,17 @@ ../plugins/rate/spec/lib/jasmine.js - jquery components - + + + - + + + + + @@ -41,7 +47,11 @@

            APIs

            diff --git a/docs_api/files/.._plugins_swfobject.js.html b/docs_api/files/.._plugins_swfobject.js.html new file mode 100644 index 000000000..d8e1a3747 --- /dev/null +++ b/docs_api/files/.._plugins_swfobject.js.html @@ -0,0 +1,1105 @@ + + + + + ../plugins/swfobject.js - jquery components + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.1 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../plugins/swfobject.js

            + +
            +
            +/**
            + * swfobject v2.3
            + * <br />An open source Javascript framework for detecting the Adobe Flash Player plugin and embedding Flash (swf) files.
            + * <p><a href='https://github.com/swfobject/swfobject' target='_blank'>source</a>
            + * | <a href='https://code.google.com/p/swfobject/wiki/documentation' target='_blank'>docs</a>
            + * | <a href='../../modules/swfobject/2.3/_demo' target='_blank'>demo link</a>
            + * | <a href='http://www.bobbyvandersluis.com/swfobject/generator/index.html' target='_blank'>html generator</a>
            + * </p>
            + * @namespace   window
            + * @class       swfobject
            + * @version     2.3
            + */
            +
            +/*!    swfobject v2.3.20130521 <http://github.com/swfobject/swfobject>
            +    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
            +*/
            +
            +/* global ActiveXObject: false */
            +
            +window.swfobject = function () {
            +
            +    var UNDEF = "undefined",
            +        OBJECT = "object",
            +        SHOCKWAVE_FLASH = "Shockwave Flash",
            +        SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
            +        FLASH_MIME_TYPE = "application/x-shockwave-flash",
            +        EXPRESS_INSTALL_ID = "SWFObjectExprInst",
            +        ON_READY_STATE_CHANGE = "onreadystatechange",
            +
            +        win = window,
            +        doc = document,
            +        nav = navigator,
            +
            +        plugin = false,
            +        domLoadFnArr = [],
            +        regObjArr = [],
            +        objIdArr = [],
            +        listenersArr = [],
            +        storedFbContent,
            +        storedFbContentId,
            +        storedCallbackFn,
            +        storedCallbackObj,
            +        isDomLoaded = false,
            +        isExpressInstallActive = false,
            +        dynamicStylesheet,
            +        dynamicStylesheetMedia,
            +        autoHideShow = true,
            +        encodeURIEnabled = false,
            +
            +    /* Centralized function for browser feature detection
            +        - User agent string detection is only used when no good alternative is possible
            +        - Is executed directly for optimal performance
            +    */
            +    ua = function () {
            +        var w3cdom = typeof doc.getElementById !== UNDEF && typeof doc.getElementsByTagName !== UNDEF && typeof doc.createElement !== UNDEF,
            +            u = nav.userAgent.toLowerCase(),
            +            p = nav.platform.toLowerCase(),
            +            windows = p ? /win/.test(p) : /win/.test(u),
            +            mac = p ? /mac/.test(p) : /mac/.test(u),
            +            webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
            +            ie = nav.appName === "Microsoft Internet Explorer",
            +            playerVersion = [0, 0, 0],
            +            d = null;
            +        if (typeof nav.plugins !== UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] === OBJECT) {
            +            d = nav.plugins[SHOCKWAVE_FLASH].description;
            +            // nav.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
            +            if (d && (typeof nav.mimeTypes !== UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) {
            +                plugin = true;
            +                ie = false; // cascaded feature detection for Internet Explorer
            +                d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
            +                playerVersion[0] = toInt(d.replace(/^(.*)\..*$/, "$1"));
            +                playerVersion[1] = toInt(d.replace(/^.*\.(.*)\s.*$/, "$1"));
            +                playerVersion[2] = /[a-zA-Z]/.test(d) ? toInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1")) : 0;
            +            }
            +        }
            +        else if (typeof win.ActiveXObject !== UNDEF) {
            +            try {
            +                var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
            +                if (a) { // a will return null when ActiveX is disabled
            +                    d = a.GetVariable("$version");
            +                    if (d) {
            +                        ie = true; // cascaded feature detection for Internet Explorer
            +                        d = d.split(" ")[1].split(",");
            +                        playerVersion = [toInt(d[0]), toInt(d[1]), toInt(d[2])];
            +                    }
            +                }
            +            }
            +            catch (e) {}
            +        }
            +        return {w3: w3cdom, pv: playerVersion, wk: webkit, ie: ie, win: windows, mac: mac};
            +    }(),
            +
            +    /* Cross-browser onDomLoad
            +        - Will fire an event as soon as the DOM of a web page is loaded
            +        - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
            +        - Regular onload serves as fallback
            +    */
            +    onDomLoad = function () {
            +        if (!ua.w3) { return; }
            +        if ((typeof doc.readyState !== UNDEF && (doc.readyState === "complete" || doc.readyState === "interactive")) || (typeof doc.readyState === UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
            +            callDomLoadFunctions();
            +        }
            +        if (!isDomLoaded) {
            +            if (typeof doc.addEventListener !== UNDEF) {
            +                doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
            +            }
            +            if (ua.ie) {
            +                doc.attachEvent(ON_READY_STATE_CHANGE, function detach() {
            +                    if (doc.readyState === "complete") {
            +                        doc.detachEvent(ON_READY_STATE_CHANGE, detach);
            +                        callDomLoadFunctions();
            +                    }
            +                });
            +                if (win == top) { // if not inside an iframe
            +                    (function checkDomLoadedIE() {
            +                        if (isDomLoaded) { return; }
            +                        try {
            +                            doc.documentElement.doScroll("left");
            +                        }
            +                        catch (e) {
            +                            setTimeout(checkDomLoadedIE, 0);
            +                            return;
            +                        }
            +                        callDomLoadFunctions();
            +                    }());
            +                }
            +            }
            +            if (ua.wk) {
            +                (function checkDomLoadedWK() {
            +                    if (isDomLoaded) { return; }
            +                    if (!/loaded|complete/.test(doc.readyState)) {
            +                        setTimeout(checkDomLoadedWK, 0);
            +                        return;
            +                    }
            +                    callDomLoadFunctions();
            +                }());
            +            }
            +        }
            +    }();
            +
            +    function callDomLoadFunctions() {
            +        if (isDomLoaded || !document.getElementsByTagName("body")[0]) { return; }
            +        try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
            +            var t, span = createElement("span");
            +            span.style.display = "none"; //hide the span in case someone has styled spans via CSS
            +            t = doc.getElementsByTagName("body")[0].appendChild(span);
            +            t.parentNode.removeChild(t);
            +            t = null; //clear the variables
            +            span = null;
            +        }
            +        catch (e) { return; }
            +        isDomLoaded = true;
            +        var dl = domLoadFnArr.length;
            +        for (var i = 0; i < dl; i++) {
            +            domLoadFnArr[i]();
            +        }
            +    }
            +
            +    function addDomLoadEvent(fn) {
            +        if (isDomLoaded) {
            +            fn();
            +        }
            +        else {
            +            domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
            +        }
            +    }
            +
            +    /* Cross-browser onload
            +        - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
            +        - Will fire an event as soon as a web page including all of its assets are loaded
            +     */
            +    function addLoadEvent(fn) {
            +        if (typeof win.addEventListener !== UNDEF) {
            +            win.addEventListener("load", fn, false);
            +        }
            +        else if (typeof doc.addEventListener !== UNDEF) {
            +            doc.addEventListener("load", fn, false);
            +        }
            +        else if (typeof win.attachEvent !== UNDEF) {
            +            addListener(win, "onload", fn);
            +        }
            +        else if (typeof win.onload === "function") {
            +            var fnOld = win.onload;
            +            win.onload = function () {
            +                fnOld();
            +                fn();
            +            };
            +        }
            +        else {
            +            win.onload = fn;
            +        }
            +    }
            +
            +    /* Detect the Flash Player version for non-Internet Explorer browsers
            +        - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
            +          a. Both release and build numbers can be detected
            +          b. Avoid wrong descriptions by corrupt installers provided by Adobe
            +          c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
            +        - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
            +    */
            +    function testPlayerVersion() {
            +        var b = doc.getElementsByTagName("body")[0];
            +        var o = createElement(OBJECT);
            +        o.setAttribute("style", "visibility: hidden;");
            +        o.setAttribute("type", FLASH_MIME_TYPE);
            +        var t = b.appendChild(o);
            +        if (t) {
            +            var counter = 0;
            +            (function checkGetVariable() {
            +                if (typeof t.GetVariable !== UNDEF) {
            +                    try {
            +                        var d = t.GetVariable("$version");
            +                        if (d) {
            +                            d = d.split(" ")[1].split(",");
            +                            ua.pv = [toInt(d[0]), toInt(d[1]), toInt(d[2])];
            +                        }
            +                    } catch (e) {
            +                        //t.GetVariable("$version") is known to fail in Flash Player 8 on Firefox
            +                        //If this error is encountered, assume FP8 or lower. Time to upgrade.
            +                        ua.pv = [8, 0, 0];
            +                    }
            +                }
            +                else if (counter < 10) {
            +                    counter++;
            +                    setTimeout(checkGetVariable, 10);
            +                    return;
            +                }
            +                b.removeChild(o);
            +                t = null;
            +                matchVersions();
            +            }());
            +        }
            +        else {
            +            matchVersions();
            +        }
            +    }
            +
            +    /* Perform Flash Player and SWF version matching; static publishing only
            +    */
            +    function matchVersions() {
            +        var rl = regObjArr.length;
            +        if (rl > 0) {
            +            for (var i = 0; i < rl; i++) { // for each registered object element
            +                var id = regObjArr[i].id;
            +                var cb = regObjArr[i].callbackFn;
            +                var cbObj = {success: false, id: id};
            +                if (ua.pv[0] > 0) {
            +                    var obj = getElementById(id);
            +                    if (obj) {
            +                        if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
            +                            setVisibility(id, true);
            +                            if (cb) {
            +                                cbObj.success = true;
            +                                cbObj.ref = getObjectById(id);
            +                                cbObj.id = id;
            +                                cb(cbObj);
            +                            }
            +                        }
            +                        else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
            +                            var att = {};
            +                            att.data = regObjArr[i].expressInstall;
            +                            att.width = obj.getAttribute("width") || "0";
            +                            att.height = obj.getAttribute("height") || "0";
            +                            if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
            +                            if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
            +                            // parse HTML object param element's name-value pairs
            +                            var par = {};
            +                            var p = obj.getElementsByTagName("param");
            +                            var pl = p.length;
            +                            for (var j = 0; j < pl; j++) {
            +                                if (p[j].getAttribute("name").toLowerCase() !== "movie") {
            +                                    par[p[j].getAttribute("name")] = p[j].getAttribute("value");
            +                                }
            +                            }
            +                            showExpressInstall(att, par, id, cb);
            +                        }
            +                        else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display fallback content instead of SWF
            +                            displayFbContent(obj);
            +                            if (cb) { cb(cbObj); }
            +                        }
            +                    }
            +                }
            +                else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or fallback content)
            +                    setVisibility(id, true);
            +                    if (cb) {
            +                        var o = getObjectById(id); // test whether there is an HTML object element or not
            +                        if (o && typeof o.SetVariable !== UNDEF) {
            +                            cbObj.success = true;
            +                            cbObj.ref = o;
            +                            cbObj.id = o.id;
            +                        }
            +                        cb(cbObj);
            +                    }
            +                }
            +            }
            +        }
            +    }
            +
            +    /* Main function
            +        - Will preferably execute onDomLoad, otherwise onload (as a fallback)
            +    */
            +    domLoadFnArr[0] = function () {
            +        if (plugin) {
            +            testPlayerVersion();
            +        }
            +        else {
            +            matchVersions();
            +        }
            +    };
            +
            +    function getObjectById(objectIdStr) {
            +        var r = null,
            +            o = getElementById(objectIdStr);
            +
            +        if (o && o.nodeName.toUpperCase() === "OBJECT") {
            +            //If targeted object is valid Flash file
            +            if (typeof o.SetVariable !== UNDEF) {
            +                r = o;
            +            } else {
            +                //If SetVariable is not working on targeted object but a nested object is
            +                //available, assume classic nested object markup. Return nested object.
            +
            +                //If SetVariable is not working on targeted object and there is no nested object,
            +                //return the original object anyway. This is probably new simplified markup.
            +
            +                r = o.getElementsByTagName(OBJECT)[0] || o;
            +            }
            +        }
            +
            +        return r;
            +    }
            +
            +    /* Requirements for Adobe Express Install
            +        - only one instance can be active at a time
            +        - fp 6.0.65 or higher
            +        - Win/Mac OS only
            +        - no Webkit engines older than version 312
            +    */
            +    function canExpressInstall() {
            +        return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
            +    }
            +
            +    /* Show the Adobe Express Install dialog
            +        - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
            +    */
            +    function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
            +
            +        var obj = getElementById(replaceElemIdStr);
            +
            +        //Ensure that replaceElemIdStr is really a string and not an element
            +        replaceElemIdStr = getId(replaceElemIdStr);
            +
            +        isExpressInstallActive = true;
            +        storedCallbackFn = callbackFn || null;
            +        storedCallbackObj = {success: false, id: replaceElemIdStr};
            +
            +        if (obj) {
            +            if (obj.nodeName.toUpperCase() === "OBJECT") { // static publishing
            +                storedFbContent = abstractFbContent(obj);
            +                storedFbContentId = null;
            +            }
            +            else { // dynamic publishing
            +                storedFbContent = obj;
            +                storedFbContentId = replaceElemIdStr;
            +            }
            +            att.id = EXPRESS_INSTALL_ID;
            +            if (typeof att.width === UNDEF || (!/%$/.test(att.width) && toInt(att.width) < 310)) { att.width = "310"; }
            +            if (typeof att.height === UNDEF || (!/%$/.test(att.height) && toInt(att.height) < 137)) { att.height = "137"; }
            +            var pt = ua.ie ? "ActiveX" : "PlugIn",
            +                fv = "MMredirectURL=" + encodeURIComponent(win.location.toString().replace(/&/g, "%26")) + "&MMplayerType=" + pt + "&MMdoctitle=" + encodeURIComponent(doc.title.slice(0, 47) + " - Flash Player Installation");
            +            if (typeof par.flashvars !== UNDEF) {
            +                par.flashvars += "&" + fv;
            +            }
            +            else {
            +                par.flashvars = fv;
            +            }
            +            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
            +            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
            +            if (ua.ie && obj.readyState != 4) {
            +                var newObj = createElement("div");
            +                replaceElemIdStr += "SWFObjectNew";
            +                newObj.setAttribute("id", replaceElemIdStr);
            +                obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
            +                obj.style.display = "none";
            +                removeSWF(obj); //removeSWF accepts elements now
            +            }
            +            createSWF(att, par, replaceElemIdStr);
            +        }
            +    }
            +
            +    /* Functions to abstract and display fallback content
            +    */
            +    function displayFbContent(obj) {
            +        if (ua.ie && obj.readyState != 4) {
            +            // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
            +            // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
            +            obj.style.display = "none";
            +            var el = createElement("div");
            +            obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the fallback content
            +            el.parentNode.replaceChild(abstractFbContent(obj), el);
            +            removeSWF(obj); //removeSWF accepts elements now
            +        }
            +        else {
            +            obj.parentNode.replaceChild(abstractFbContent(obj), obj);
            +        }
            +    }
            +
            +    function abstractFbContent(obj) {
            +        var ac = createElement("div");
            +        if (ua.win && ua.ie) {
            +            ac.innerHTML = obj.innerHTML;
            +        }
            +        else {
            +            var nestedObj = obj.getElementsByTagName(OBJECT)[0];
            +            if (nestedObj) {
            +                var c = nestedObj.childNodes;
            +                if (c) {
            +                    var cl = c.length;
            +                    for (var i = 0; i < cl; i++) {
            +                        if (!(c[i].nodeType == 1 && c[i].nodeName === "PARAM") && !(c[i].nodeType == 8)) {
            +                            ac.appendChild(c[i].cloneNode(true));
            +                        }
            +                    }
            +                }
            +            }
            +        }
            +        return ac;
            +    }
            +
            +    function createIeObject(url, paramStr) {
            +        var div = createElement("div");
            +        div.innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='" + url + "'>" + paramStr + "</object>";
            +        return div.firstChild;
            +    }
            +
            +    /* Cross-browser dynamic SWF creation
            +    */
            +    function createSWF(attObj, parObj, id) {
            +        var r, el = getElementById(id);
            +        id = getId(id); // ensure id is truly an ID and not an element
            +
            +        if (ua.wk && ua.wk < 312) { return r; }
            +
            +        if (el) {
            +            var o = (ua.ie) ? createElement("div") : createElement(OBJECT),
            +                attr,
            +                attrLower,
            +                param;
            +
            +            if (typeof attObj.id === UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the fallback content
            +                attObj.id = id;
            +            }
            +
            +            //Add params
            +            for (param in parObj) {
            +                //filter out prototype additions from other potential libraries and IE specific param element
            +                if (parObj.hasOwnProperty(param) && param.toLowerCase() !== "movie") {
            +                    createObjParam(o, param, parObj[param]);
            +                }
            +            }
            +
            +            //Create IE object, complete with param nodes
            +            if (ua.ie) { o = createIeObject(attObj.data, o.innerHTML); }
            +
            +            //Add attributes to object
            +            for (attr in attObj) {
            +                if (attObj.hasOwnProperty(attr)) { // filter out prototype additions from other potential libraries
            +                    attrLower = attr.toLowerCase();
            +
            +                    // 'class' is an ECMA4 reserved keyword
            +                    if (attrLower === "styleclass") {
            +                        o.setAttribute("class", attObj[attr]);
            +                    } else if (attrLower !== "classid" && attrLower !== "data") {
            +                        o.setAttribute(attr, attObj[attr]);
            +                    }
            +                }
            +            }
            +
            +            if (ua.ie) {
            +                objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
            +            } else {
            +                o.setAttribute("type", FLASH_MIME_TYPE);
            +                o.setAttribute("data", attObj.data);
            +            }
            +
            +            el.parentNode.replaceChild(o, el);
            +            r = o;
            +        }
            +
            +        return r;
            +    }
            +
            +    function createObjParam(el, pName, pValue) {
            +        var p = createElement("param");
            +        p.setAttribute("name", pName);
            +        p.setAttribute("value", pValue);
            +        el.appendChild(p);
            +    }
            +
            +    /* Cross-browser SWF removal
            +        - Especially needed to safely and completely remove a SWF in Internet Explorer
            +    */
            +    function removeSWF(id) {
            +        var obj = getElementById(id);
            +        if (obj && obj.nodeName.toUpperCase() === "OBJECT") {
            +            if (ua.ie) {
            +                obj.style.display = "none";
            +                (function removeSWFInIE() {
            +                    if (obj.readyState == 4) {
            +                        //This step prevents memory leaks in Internet Explorer
            +                        for (var i in obj) {
            +                            if (typeof obj[i] === "function") {
            +                                obj[i] = null;
            +                            }
            +                        }
            +                        obj.parentNode.removeChild(obj);
            +                    } else {
            +                        setTimeout(removeSWFInIE, 10);
            +                    }
            +                }());
            +            }
            +            else {
            +                obj.parentNode.removeChild(obj);
            +            }
            +        }
            +    }
            +
            +    function isElement(id) {
            +        return (id && id.nodeType && id.nodeType === 1);
            +    }
            +
            +    function getId(thing) {
            +        return (isElement(thing)) ? thing.id : thing;
            +    }
            +
            +    /* Functions to optimize JavaScript compression
            +    */
            +    function getElementById(id) {
            +
            +        //Allow users to pass an element OR an element's ID
            +        if (isElement(id)) { return id; }
            +
            +        var el = null;
            +        try {
            +            el = doc.getElementById(id);
            +        }
            +        catch (e) {}
            +        return el;
            +    }
            +
            +    function createElement(el) {
            +        return doc.createElement(el);
            +    }
            +
            +    //To aid compression; replaces 14 instances of pareseInt with radix
            +    function toInt(str) {
            +        return parseInt(str, 10);
            +    }
            +
            +    /* Updated attachEvent function for Internet Explorer
            +        - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
            +    */
            +    function addListener(target, eventType, fn) {
            +        target.attachEvent(eventType, fn);
            +        listenersArr[listenersArr.length] = [target, eventType, fn];
            +    }
            +
            +    /* Flash Player and SWF content version matching
            +    */
            +    function hasPlayerVersion(rv) {
            +        rv += ""; //Coerce number to string, if needed.
            +        var pv = ua.pv, v = rv.split(".");
            +        v[0] = toInt(v[0]);
            +        v[1] = toInt(v[1]) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
            +        v[2] = toInt(v[2]) || 0;
            +        return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
            +    }
            +
            +    /* Cross-browser dynamic CSS creation
            +        - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
            +    */
            +    function createCSS(sel, decl, media, newStyle) {
            +        var h = doc.getElementsByTagName("head")[0];
            +        if (!h) { return; } // to also support badly authored HTML pages that lack a head element
            +        var m = (typeof media === "string") ? media : "screen";
            +        if (newStyle) {
            +            dynamicStylesheet = null;
            +            dynamicStylesheetMedia = null;
            +        }
            +        if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
            +            // create dynamic stylesheet + get a global reference to it
            +            var s = createElement("style");
            +            s.setAttribute("type", "text/css");
            +            s.setAttribute("media", m);
            +            dynamicStylesheet = h.appendChild(s);
            +            if (ua.ie && typeof doc.styleSheets !== UNDEF && doc.styleSheets.length > 0) {
            +                dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
            +            }
            +            dynamicStylesheetMedia = m;
            +        }
            +        // add style rule
            +        if (dynamicStylesheet) {
            +            if (typeof dynamicStylesheet.addRule !== UNDEF) {
            +                dynamicStylesheet.addRule(sel, decl);
            +            } else if (typeof doc.createTextNode !== UNDEF) {
            +                dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
            +            }
            +        }
            +    }
            +
            +    function setVisibility(id, isVisible) {
            +        if (!autoHideShow) { return; }
            +        var v = isVisible ? "visible" : "hidden",
            +            el = getElementById(id);
            +        if (isDomLoaded && el) {
            +            el.style.visibility = v;
            +        } else if (typeof id === "string") {
            +            createCSS("#" + id, "visibility:" + v);
            +        }
            +    }
            +
            +    /* Filter to avoid XSS attacks
            +    */
            +    function urlEncodeIfNecessary(s) {
            +        var regex = /[\\\"<>\.;]/;
            +        var hasBadChars = regex.exec(s) !== null;
            +        return hasBadChars && typeof encodeURIComponent !== UNDEF ? encodeURIComponent(s) : s;
            +    }
            +
            +    /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
            +    */
            +    var cleanup = function () {
            +        if (ua.ie) {
            +            window.attachEvent("onunload", function () {
            +                // remove listeners to avoid memory leaks
            +                var ll = listenersArr.length;
            +                for (var i = 0; i < ll; i++) {
            +                    listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
            +                }
            +                // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
            +                var il = objIdArr.length;
            +                for (var j = 0; j < il; j++) {
            +                    removeSWF(objIdArr[j]);
            +                }
            +                // cleanup library's main closures to avoid memory leaks
            +                for (var k in ua) {
            +                    ua[k] = null;
            +                }
            +                ua = null;
            +                for (var l in swfobject) {
            +                    swfobject[l] = null;
            +                }
            +                swfobject = null;
            +            });
            +        }
            +    }();
            +
            +    return {
            +        /* Public API
            +            - Reference: http://code.google.com/p/swfobject/wiki/documentation
            +        */
            +        registerObject: function (objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
            +            if (ua.w3 && objectIdStr && swfVersionStr) {
            +                var regObj = {};
            +                regObj.id = objectIdStr;
            +                regObj.swfVersion = swfVersionStr;
            +                regObj.expressInstall = xiSwfUrlStr;
            +                regObj.callbackFn = callbackFn;
            +                regObjArr[regObjArr.length] = regObj;
            +                setVisibility(objectIdStr, false);
            +            }
            +            else if (callbackFn) {
            +                callbackFn({success: false, id: objectIdStr});
            +            }
            +        },
            +
            +        getObjectById: function (objectIdStr) {
            +            if (ua.w3) {
            +                return getObjectById(objectIdStr);
            +            }
            +        },
            +
            +        embedSWF: function (swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
            +
            +            var id = getId(replaceElemIdStr),
            +                callbackObj = {success: false, id: id};
            +
            +            if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
            +                setVisibility(id, false);
            +                addDomLoadEvent(function () {
            +                    widthStr += ""; // auto-convert to string
            +                    heightStr += "";
            +                    var att = {};
            +                    if (attObj && typeof attObj === OBJECT) {
            +                        for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
            +                            att[i] = attObj[i];
            +                        }
            +                    }
            +                    att.data = swfUrlStr;
            +                    att.width = widthStr;
            +                    att.height = heightStr;
            +                    var par = {};
            +                    if (parObj && typeof parObj === OBJECT) {
            +                        for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
            +                            par[j] = parObj[j];
            +                        }
            +                    }
            +                    if (flashvarsObj && typeof flashvarsObj === OBJECT) {
            +                        for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
            +                            if (flashvarsObj.hasOwnProperty(k)) {
            +
            +                                var key = (encodeURIEnabled) ? encodeURIComponent(k) : k,
            +                                    value = (encodeURIEnabled) ? encodeURIComponent(flashvarsObj[k]) : flashvarsObj[k];
            +
            +                                if (typeof par.flashvars !== UNDEF) {
            +                                    par.flashvars += "&" + key + "=" + value;
            +                                }
            +                                else {
            +                                    par.flashvars = key + "=" + value;
            +                                }
            +
            +                            }
            +                        }
            +                    }
            +                    if (hasPlayerVersion(swfVersionStr)) { // create SWF
            +                        var obj = createSWF(att, par, replaceElemIdStr);
            +                        if (att.id == id) {
            +                            setVisibility(id, true);
            +                        }
            +                        callbackObj.success = true;
            +                        callbackObj.ref = obj;
            +                        callbackObj.id = obj.id;
            +                    }
            +                    else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
            +                        att.data = xiSwfUrlStr;
            +                        showExpressInstall(att, par, replaceElemIdStr, callbackFn);
            +                        return;
            +                    }
            +                    else { // show fallback content
            +                        setVisibility(id, true);
            +                    }
            +                    if (callbackFn) { callbackFn(callbackObj); }
            +                });
            +            }
            +            else if (callbackFn) { callbackFn(callbackObj); }
            +        },
            +
            +        switchOffAutoHideShow: function () {
            +            autoHideShow = false;
            +        },
            +
            +        enableUriEncoding: function (bool) {
            +            encodeURIEnabled = (typeof bool === UNDEF) ? true : bool;
            +        },
            +
            +        ua: ua,
            +
            +        getFlashPlayerVersion: function () {
            +            return {major: ua.pv[0], minor: ua.pv[1], release: ua.pv[2]};
            +        },
            +
            +        hasFlashPlayerVersion: hasPlayerVersion,
            +
            +        createSWF: function (attObj, parObj, replaceElemIdStr) {
            +            if (ua.w3) {
            +                return createSWF(attObj, parObj, replaceElemIdStr);
            +            }
            +            else {
            +                return undefined;
            +            }
            +        },
            +
            +        showExpressInstall: function (att, par, replaceElemIdStr, callbackFn) {
            +            if (ua.w3 && canExpressInstall()) {
            +                showExpressInstall(att, par, replaceElemIdStr, callbackFn);
            +            }
            +        },
            +
            +        removeSWF: function (objElemIdStr) {
            +            if (ua.w3) {
            +                removeSWF(objElemIdStr);
            +            }
            +        },
            +
            +        createCSS: function (selStr, declStr, mediaStr, newStyleBoolean) {
            +            if (ua.w3) {
            +                createCSS(selStr, declStr, mediaStr, newStyleBoolean);
            +            }
            +        },
            +
            +        addDomLoadEvent: addDomLoadEvent,
            +
            +        addLoadEvent: addLoadEvent,
            +
            +        getQueryParamValue: function (param) {
            +            var q = doc.location.search || doc.location.hash;
            +            if (q) {
            +                if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
            +                if (!param) {
            +                    return urlEncodeIfNecessary(q);
            +                }
            +                var pairs = q.split("&");
            +                for (var i = 0; i < pairs.length; i++) {
            +                    if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
            +                        return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
            +                    }
            +                }
            +            }
            +            return "";
            +        },
            +
            +        // For internal usage only
            +        expressInstallCallback: function () {
            +            if (isExpressInstallActive) {
            +                var obj = getElementById(EXPRESS_INSTALL_ID);
            +                if (obj && storedFbContent) {
            +                    obj.parentNode.replaceChild(storedFbContent, obj);
            +                    if (storedFbContentId) {
            +                        setVisibility(storedFbContentId, true);
            +                        if (ua.ie) { storedFbContent.style.display = "block"; }
            +                    }
            +                    if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
            +                }
            +                isExpressInstallActive = false;
            +            }
            +        },
            +
            +        version: "2.3"
            +
            +    };
            +}();
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/docs_api/index.html b/docs_api/index.html index bb688954b..86135f4aa 100644 --- a/docs_api/index.html +++ b/docs_api/index.html @@ -3,11 +3,17 @@ jquery components - + + + - + + + + +
            @@ -34,44 +40,79 @@

            APIs

            diff --git a/docs_api/jc_logo.png b/docs_api/jc_logo.png old mode 100644 new mode 100755 diff --git a/document.html b/document.html old mode 100644 new mode 100755 diff --git a/flash/pub_folder_move_to_JC.FChart_0.1_swf.txt b/flash/pub_folder_move_to_JC.FChart_0.1_swf.txt new file mode 100755 index 000000000..8d1c8b69c --- /dev/null +++ b/flash/pub_folder_move_to_JC.FChart_0.1_swf.txt @@ -0,0 +1 @@ + diff --git a/index.php b/index.php old mode 100644 new mode 100755 index 212555562..bf1e0ffc6 --- a/index.php +++ b/index.php @@ -1,3 +1,5 @@ diff --git a/jquery.js b/jquery.js old mode 100644 new mode 100755 index 235299c5a..1d8d5df56 --- a/jquery.js +++ b/jquery.js @@ -13,7 +13,9587 @@ * @namespace window * @global */ +(function( window, undefined ) { -(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
            a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
            t
            ",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
            ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; -return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
            ",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
            ","
            "],area:[1,"",""],param:[1,"",""],thead:[1,"","
            "],tr:[2,"","
            "],col:[2,"","
            "],td:[3,"","
            "],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
            ","
            "]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) -}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("